mirror of
https://github.com/AlexKrunch/AnonIB-3D.git
synced 2024-11-21 19:44:17 -05:00
1 line
6.1 MiB
1 line
6.1 MiB
{"version":3,"sources":["webpack:///./node_modules/@angular/common/fesm5/common.js","webpack:///./node_modules/@angular/common/fesm5/http.js","webpack:///./node_modules/@angular/compiler/fesm5/compiler.js","webpack:///./node_modules/@angular/core/fesm5/core.js","webpack:///./node_modules/@angular/forms/fesm5/forms.js","webpack:///./node_modules/@angular/platform-browser-dynamic/fesm5/platform-browser-dynamic.js","webpack:///./node_modules/@angular/platform-browser/fesm5/platform-browser.js","webpack:///./node_modules/@angular/router/fesm5/router.js","webpack:///./node_modules/angularx-qrcode/dist/angularx-qrcode.module.js","webpack:///./node_modules/angularx-qrcode/dist/components/angularx-qrcode/angularx-qrcode.component.js","webpack:///./node_modules/angularx-qrcode/dist/components/angularx-qrcode/index.js","webpack:///./node_modules/angularx-qrcode/dist/components/index.js","webpack:///./node_modules/angularx-qrcode/dist/index.js","webpack:///./node_modules/babylonjs-gui/babylon.gui.min.js","webpack:///./node_modules/babylonjs/babylon.js","webpack:///./node_modules/ngx-device-detector/ngx-device-detector.umd.js","webpack:///./node_modules/ngx-pagination/dist/ngx-pagination.js","webpack:///./node_modules/ngx-twitter-timeline/fesm5/ngx-twitter-timeline.js","webpack:///./node_modules/pepjs/dist/pep.js","webpack:///./node_modules/qrcodejs2/qrcode.js","webpack:///./node_modules/rxjs/_esm5/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/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/endWith.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/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/isInteropObservable.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/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/tslib/tslib.es6.js"],"names":[],"mappings":";;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AACA;AACA;AACA;AACA;;AAEoc;AACrW;;AAE/F;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,+BAA+B,4DAAc;;AAE7C;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;AACA;AACA,WAAW,oBAAoB;AAC/B,WAAW,cAAc;AACzB;AACA;AACA,kBAAkB,4CAA4C;AAC9D,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA,wBAAwB,4DAAc;;AAEtC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,uBAAuB;AAC9C;AACA;AACA;AACA;AACA,uBAAuB,sBAAsB;AAC7C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B,0DAAY;AACxC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qCAAqC,qBAAqB;AAC1D;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,+BAA+B,YAAY;AAC3C,+BAA+B,cAAc;AAC7C;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B,YAAY;AAC3C,+BAA+B,cAAc;AAC7C;AACA;AACA;AACA;AACA;AACA,8CAA8C,kCAAkC;AAChF;AACA;AACA;AACA,2CAA2C,+BAA+B;AAC1E;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,4BAA4B,wDAAU;AACtC,QAAQ,gEAAU;AAClB,QAAQ,wDAAU;AAClB;AACA;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;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA,IAAI,uDAAS;AACb;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,2BAA2B,wDAAU;AACrC,QAAQ,gEAAU;AAClB,QAAQ,qDAAO,IAAI,8DAAQ,KAAK,qDAAO,IAAI,4DAAM;AACjD,QAAQ,wDAAU;AAClB;AACA;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;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA,IAAI,uDAAS;AACb;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,2BAA2B,wDAAU;AACrC,QAAQ,gEAAU;AAClB,QAAQ,qDAAO,IAAI,8DAAQ,KAAK,qDAAO,IAAI,4DAAM;AACjD,QAAQ,wDAAU;AAClB;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;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;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;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yBAAyB,4BAA4B;AACrD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC,8CAA8C;AAC/C;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,CAAC,8BAA8B;AAC/B;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,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,CAAC,oCAAoC;AACrC;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;AACA;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;AACA;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,aAAa,oDAAM;AACnB,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,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;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;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,0BAA0B;AAC1B;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,kBAAkB,EAAE,IAAI,IAAI,IAAI,IAAI;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB,oDAAM,sCAAsC,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;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,OAAO;AACtD;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,+BAA+B,4DAAc;AAC7C;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,IAAI,uDAAS;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,2BAA2B,wDAAU;AACrC,QAAQ,gEAAU;AAClB,QAAQ,qDAAO,IAAI,4DAAM,CAAC,uDAAS;AACnC,QAAQ,qDAAO,IAAI,8DAAQ,KAAK,qDAAO,IAAI,4DAAM;AACjD,QAAQ,wDAAU;AAClB;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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,sBAAsB,sDAAQ,mBAAmB,oBAAoB,UAAU;AAC/E;AACA;AACA,qBAAqB,oDAAM;AAC3B;AACA;AACA;AACA;AACA;AACA,mBAAmB,QAAQ,gBAAgB;AAC3C;AACA;AACA;AACA;AACA,iBAAiB,0BAA0B;AAC3C;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,oBAAoB,yEAAmB;AACvC;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,mGAAmG,gEAAU;AAC7G;AACA,SAAS;AACT,sDAAsD,+CAA+C,EAAE;AACvG;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,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,IAAI,wDAAU;AACd,QAAQ,2DAAK;AACb,QAAQ,wDAAU;AAClB,QAAQ,wDAAU;AAClB;AACA,IAAI,wDAAU;AACd,QAAQ,2DAAK;AACb,QAAQ,wDAAU;AAClB,QAAQ,wDAAU;AAClB;AACA,cAAc,wDAAU;AACxB,QAAQ,+DAAS,EAAE,wBAAwB;AAC3C,QAAQ,wDAAU,uBAAuB,6DAAe,EAAE,6DAAe;AACzE,YAAY,wDAAU,EAAE,uDAAS;AACjC;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0BAA0B,gBAAgB;AAC1C;AACA;AACA;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;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,sDAAsD,yDAAW;AACjE;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B,sEAAwB;AACvD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI,wDAAU;AACd,QAAQ,2DAAK;AACb,QAAQ,wDAAU,gBAAgB,kDAAI;AACtC;AACA,IAAI,wDAAU;AACd,QAAQ,2DAAK;AACb,QAAQ,wDAAU,gBAAgB,sDAAQ;AAC1C;AACA,IAAI,wDAAU;AACd,QAAQ,2DAAK;AACb,QAAQ,wDAAU;AAClB;AACA,IAAI,wDAAU;AACd,QAAQ,2DAAK;AACb,QAAQ,wDAAU,gBAAgB,6DAAe;AACjD;AACA,wBAAwB,wDAAU;AAClC,QAAQ,+DAAS,EAAE,kCAAkC;AACrD,QAAQ,wDAAU,uBAAuB,8DAAgB;AACzD;AACA;AACA,CAAC;;AAED;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;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;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,KAAK;AACL;AACA,0BAA0B,wBAAwB,EAAE;AACpD;AACA,gBAAgB,+DAAS;AACzB;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,SAAS;AACT,uBAAuB,yBAAyB;AAChD;AACA;AACA,0DAA0D,UAAU;AACpE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA,IAAI,wDAAU;AACd,QAAQ,2DAAK;AACb,QAAQ,wDAAU;AAClB,QAAQ,wDAAU;AAClB;AACA,IAAI,wDAAU;AACd,QAAQ,2DAAK;AACb,QAAQ,wDAAU;AAClB,QAAQ,wDAAU;AAClB;AACA,IAAI,wDAAU;AACd,QAAQ,2DAAK;AACb,QAAQ,wDAAU,gBAAgB,yDAAW;AAC7C,QAAQ,wDAAU,uBAAuB,yDAAW;AACpD;AACA,cAAc,wDAAU;AACxB,QAAQ,+DAAS,EAAE,+BAA+B;AAClD,QAAQ,wDAAU,uBAAuB,8DAAgB,EAAE,yDAAW;AACtE,YAAY,6DAAe;AAC3B;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;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,IAAI,wDAAU;AACd,QAAQ,2DAAK;AACb,QAAQ,wDAAU;AAClB,QAAQ,wDAAU;AAClB;AACA,IAAI,wDAAU;AACd,QAAQ,2DAAK;AACb,QAAQ,wDAAU;AAClB,QAAQ,wDAAU;AAClB;AACA,IAAI,wDAAU;AACd,QAAQ,2DAAK;AACb,QAAQ,wDAAU;AAClB,QAAQ,wDAAU;AAClB;AACA,WAAW,wDAAU;AACrB,QAAQ,+DAAS,EAAE,qBAAqB;AACxC,QAAQ,wDAAU,uBAAuB,8DAAgB,EAAE,yDAAW;AACtE;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA,8EAA8E,gEAAU;AACxF;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,+CAA+C,0BAA0B;AACzE;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,IAAI,wDAAU;AACd,QAAQ,2DAAK;AACb,QAAQ,wDAAU;AAClB,QAAQ,wDAAU;AAClB;AACA,eAAe,wDAAU;AACzB,QAAQ,+DAAS,EAAE,yBAAyB;AAC5C;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,IAAI,wDAAU;AACd,QAAQ,2DAAK;AACb,QAAQ,wDAAU;AAClB;AACA,mBAAmB,wDAAU;AAC7B,QAAQ,+DAAS,EAAE,6BAA6B;AAChD,QAAQ,qDAAO,IAAI,0DAAI;AACvB,QAAQ,wDAAU,uBAAuB,8DAAgB,EAAE,yDAAW;AACtE;AACA;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,sBAAsB,wDAAU;AAChC,QAAQ,+DAAS,EAAE,gCAAgC;AACnD,QAAQ,qDAAO,IAAI,0DAAI;AACvB,QAAQ,wDAAU,uBAAuB,8DAAgB,EAAE,yDAAW;AACtE;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,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,IAAI,wDAAU;AACd,QAAQ,2DAAK;AACb,QAAQ,wDAAU;AAClB,QAAQ,wDAAU;AAClB;AACA,eAAe,wDAAU;AACzB,QAAQ,+DAAS,EAAE,yBAAyB;AAC5C,QAAQ,wDAAU;AAClB;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,mBAAmB,wDAAU;AAC7B,QAAQ,+DAAS,EAAE,6BAA6B;AAChD,QAAQ,qDAAO,IAAI,+DAAS;AAC5B,QAAQ,qDAAO,IAAI,0DAAI;AACvB,QAAQ,wDAAU,+BAA+B,yDAAW;AAC5D,YAAY,8DAAgB;AAC5B;AACA;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,iBAAiB,oDAAM;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI,wDAAU;AACd,QAAQ,2DAAK;AACb,QAAQ,wDAAU;AAClB,QAAQ,wDAAU;AAClB;AACA,cAAc,wDAAU;AACxB,QAAQ,+DAAS,EAAE,wBAAwB;AAC3C,QAAQ,wDAAU,uBAAuB,6DAAe,EAAE,wDAAU,EAAE,uDAAS;AAC/E;AACA;AACA,CAAC;;AAED;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,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,mEAAmE;AACnE,kEAAkE;AAClE;AACA;AACA,yCAAyC,sDAAQ,sDAAsD,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,0BAA0B,sDAAQ,mCAAmC,UAAU;AAC/E;AACA;AACA;AACA;AACA,uBAAuB,QAAQ,gBAAgB;AAC/C;AACA;AACA;AACA;AACA,qBAAqB,0BAA0B;AAC/C;AACA;AACA,IAAI,wDAAU;AACd,QAAQ,2DAAK;AACb,QAAQ,wDAAU;AAClB;AACA,IAAI,wDAAU;AACd,QAAQ,2DAAK;AACb,QAAQ,wDAAU,gBAAgB,yDAAW;AAC7C;AACA,uBAAuB,wDAAU;AACjC,QAAQ,+DAAS,EAAE,iCAAiC;AACpD,QAAQ,wDAAU,uBAAuB,8DAAgB;AACzD;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,qEAAqE,gEAAU;AAC/E;;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,iCAAiC;AACjC;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,SAAS,sDAAQ,GAAG,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;AACA;AACA,IAAI;AACJ;AACA;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,qBAAqB,oDAAM,sCAAsC,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,gDAAgD,wDAAU;AAC1D,QAAQ,0DAAI,EAAE,2BAA2B;AACzC,QAAQ,qDAAO,IAAI,4DAAM,CAAC,uDAAS;AACnC,QAAQ,wDAAU;AAClB;AACA;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,+BAA+B;AAC/B;AACA;AACA,+BAA+B;AAC/B;AACA;AACA,+BAA+B;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;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;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sDAAsD,wDAAU;AAChE,QAAQ,0DAAI,EAAE,iBAAiB;AAC/B,QAAQ,qDAAO,IAAI,4DAAM,CAAC,uDAAS;AACnC,QAAQ,wDAAU;AAClB;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sBAAsB,kBAAkB;AACxC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sDAAsD,wDAAU;AAChE,QAAQ,0DAAI,EAAE,kBAAkB;AAChC,QAAQ,qDAAO,IAAI,4DAAM,CAAC,uDAAS;AACnC,QAAQ,wDAAU;AAClB;AACA;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;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sCAAsC,sBAAsB;AAC5D,uCAAuC,uBAAuB;AAC9D;AACA;AACA;AACA,wDAAwD,wDAAU;AAClE,QAAQ,0DAAI,EAAE,mBAAmB;AACjC,QAAQ,qDAAO,IAAI,4DAAM,CAAC,uDAAS;AACnC,QAAQ,wDAAU;AAClB;AACA;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;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,eAAe,0DAAY;AAC3B;AACA;AACA;AACA;AACA;AACA,sFAAsF,6CAA6C,EAAE;AACrI;AACA;AACA,YAAY,gEAAU;AACtB;AACA;AACA,YAAY,mEAAa;AACzB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8BAA8B,wDAAU;AACxC,QAAQ,0DAAI,EAAE,6BAA6B;AAC3C,QAAQ,wDAAU,uBAAuB,+DAAiB;AAC1D;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,sCAAsC,wDAAU;AAChD,QAAQ,0DAAI,EAAE,oBAAoB;AAClC;AACA;AACA,CAAC;AACD;AACA;AACA,gCAAgC,EAAE;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;AACA;AACA;AACA,gEAAgE,2DAA2D,EAAE;AAC7H;AACA;AACA,sCAAsC,wDAAU;AAChD,QAAQ,0DAAI,EAAE,oBAAoB;AAClC;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,sCAAsC,wDAAU;AAChD,QAAQ,0DAAI,EAAE,oBAAoB;AAClC;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,KAAK,kBAAkB;AACvB,KAAK,2BAA2B;AAChC,KAAK,8BAA8B;AACnC,KAAK,yBAAyB;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,cAAc;AAClC,6BAA6B,yBAAyB;AACtD,uBAAuB,yBAAyB;AAChD;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,gCAAgC,uBAAuB;AACvD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B,wDAAU;AACtC,QAAQ,0DAAI,EAAE,2BAA2B;AACzC,QAAQ,qDAAO,IAAI,4DAAM,CAAC,uDAAS;AACnC,QAAQ,wDAAU;AAClB;AACA;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,8EAA8E,gBAAgB;AAC9F;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wCAAwC,wDAAU;AAClD,QAAQ,0DAAI,EAAE,iCAAiC;AAC/C,QAAQ,wDAAU;AAClB;AACA;AACA,CAAC;;AAED;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wCAAwC,wDAAU;AAClD,QAAQ,0DAAI,EAAE,iCAAiC;AAC/C;AACA;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,qDAAqD,uCAAuC;AAC5F,eAAe,wDAAU;AACzB,QAAQ,0DAAI,EAAE,4BAA4B;AAC1C;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;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mCAAmC,+BAA+B;AAClE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA,mBAAmB,wDAAU;AAC7B,QAAQ,0DAAI,EAAE,gCAAgC;AAC9C,QAAQ,wDAAU,uBAAuB,6DAAe;AACxD;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;;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,iBAAiB,EAAE,kBAAkB,EAAE,kBAAkB;AACvE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kCAAkC,wDAAU;AAC5C,QAAQ,0DAAI,EAAE,iBAAiB;AAC/B,QAAQ,qDAAO,IAAI,4DAAM,CAAC,uDAAS;AACnC,QAAQ,wDAAU;AAClB;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,iBAAiB,EAAE,kBAAkB,EAAE,kBAAkB;AACvE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kCAAkC,wDAAU;AAC5C,QAAQ,0DAAI,EAAE,kBAAkB;AAChC,QAAQ,qDAAO,IAAI,4DAAM,CAAC,uDAAS;AACnC,QAAQ,wDAAU;AAClB;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,iBAAiB,EAAE,kBAAkB,EAAE,kBAAkB;AACvE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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,oCAAoC,wDAAU;AAC9C,QAAQ,0DAAI,EAAE,mBAAmB;AACjC,QAAQ,qDAAO,IAAI,4DAAM,CAAC,uDAAS;AACnC,QAAQ,wDAAU;AAClB;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;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,mDAAmD,sDAAsD;AACzG;AACA,8BAA8B,wDAAU;AACxC,QAAQ,0DAAI,EAAE,6BAA6B;AAC3C;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;;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,mBAAmB,wDAAU;AAC7B,QAAQ,8DAAQ;AAChB;AACA;AACA;AACA,iBAAiB,0DAA0D;AAC3E;AACA,SAAS;AACT;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gCAAgC,wDAAU;AAC1C,QAAQ,8DAAQ;AAChB;AACA;AACA,yBAAyB,8CAA8C;AACvE,SAAS;AACT;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB,4DAAc;;AAEjC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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,kBAAkB,qDAAO;;AAEzB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uCAAuC,sEAAgB,EAAE,2CAA2C,oCAAoC,4DAAM,oBAAoB,EAAE,EAAE;AACtK;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mCAAmC,eAAe;AAClD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uCAAuC,eAAe;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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,kEAAkE;AAClE;AACA;AACA;AACA,oEAAoE,eAAe;AACnF;AACA;AACA;AACA,2EAA2E;AAC3E;AACA;AACA;AACA,uEAAuE;AACvE;AACA;AACA;AACA,+FAA+F;AAC/F;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEu9D;AACv9D;;;;;;;;;;;;;AC9pLA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AACA;AACA;AACA;AACA;;AAEqF;AACe;AAC9D;AACkB;AACM;;AAE9D;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,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,sCAAsC,sDAAQ;AAC9C;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,qCAAqC,mEAAmE,EAAE;AAC1G;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+DAA+D,8BAA8B;AAC7F,mEAAmE,gCAAgC;AACnG,+DAA+D,gCAAgC;AAC/F,mEAAmE,kCAAkC;AACrG;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB,oDAAM;AAC3B;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,2DAA2D,oBAAoB,sCAAsC,EAAE;AACvH;AACA;AACA;AACA,wDAAwD,oBAAoB,sCAAsC,EAAE;AACpH;AACA;AACA;AACA;AACA;AACA,2DAA2D,oBAAoB,sCAAsC,EAAE;AACvH;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,yDAAyD,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,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,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,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,IAAI,uDAAS;AACb;AACA;AACA;AACA;AACA,8BAA8B,WAAW;AACzC;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,IAAI,uDAAS;AACb;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,IAAI,uDAAS;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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,sBAAsB,+CAAE,WAAW,gEAAS,iBAAiB,kCAAkC,EAAE;AACjG;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gCAAgC,6DAAM,mBAAmB,sCAAsC,EAAE;AACjG;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yCAAyC,0DAAG;AAC5C;AACA;AACA;AACA;AACA;AACA,yBAAyB;AACzB;AACA,yCAAyC,0DAAG;AAC5C;AACA;AACA;AACA;AACA;AACA,yBAAyB;AACzB;AACA,yCAAyC,0DAAG;AAC5C;AACA;AACA;AACA;AACA;AACA,yBAAyB;AACzB;AACA;AACA;AACA,yCAAyC,0DAAG,iBAAiB,iBAAiB,EAAE;AAChF;AACA;AACA;AACA;AACA;AACA;AACA,6FAA6F;AAC7F;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iCAAiC,cAAc;AAC/C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iCAAiC,cAAc;AAC/C;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,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iCAAiC,cAAc;AAC/C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iCAAiC,cAAc;AAC/C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iCAAiC,cAAc;AAC/C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iCAAiC,cAAc;AAC/C;AACA;AACA,iBAAiB,wDAAU;AAC3B,QAAQ,gEAAU;AAClB,QAAQ,wDAAU;AAClB;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,4BAA4B,4DAAc;AAC1C;AACA;AACA;AACA;AACA;AACA;AACA,sBAAsB,wDAAU;AAChC,QAAQ,gEAAU;AAClB;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6DAA6D,+CAA+C;AAC5G;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB,+CAAU;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;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,yBAAyB,wDAAU;AACnC,QAAQ,gEAAU;AAClB,QAAQ,qDAAO,IAAI,4DAAM,CAAC,wDAAQ;AAClC,QAAQ,wDAAU;AAClB;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,wDAAU;AACjC,QAAQ,gEAAU;AAClB,QAAQ,wDAAU;AAClB;AACA;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,iBAAiB,wDAAU;AAC3B,QAAQ,gEAAU;AAClB,QAAQ,wDAAU;AAClB;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,mBAAmB,+CAAU;AAC7B;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,qBAAqB,wDAAU;AAC/B,QAAQ,gEAAU;AAClB,QAAQ,wDAAU;AAClB;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,4DAAc;AACzC,2BAA2B,4DAAc;AACzC;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,6BAA6B,yEAAiB;AAC9C;AACA;AACA;AACA;AACA,8BAA8B,wDAAU;AACxC,QAAQ,gEAAU;AAClB,QAAQ,qDAAO,IAAI,4DAAM,CAAC,wDAAQ,IAAI,qDAAO,IAAI,4DAAM,CAAC,yDAAW;AACnE,QAAQ,qDAAO,IAAI,4DAAM;AACzB,QAAQ,wDAAU;AAClB;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,6BAA6B,mDAAmD;AAChF;AACA;AACA;AACA,0BAA0B,wDAAU;AACpC,QAAQ,gEAAU;AAClB,QAAQ,qDAAO,IAAI,4DAAM;AACzB,QAAQ,wDAAU;AAClB;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,gFAAgF,sDAAsD,EAAE;AACxI;AACA;AACA;AACA,8BAA8B,wDAAU;AACxC,QAAQ,gEAAU;AAClB,QAAQ,wDAAU,oCAAoC,sDAAQ;AAC9D;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,iBAAiB,0DAA0D;AAC3E;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,oDAAoD,wDAAU;AAC9D,QAAQ,8DAAQ;AAChB;AACA;AACA,iBAAiB,4EAA4E;AAC7F,iBAAiB,qEAAqE;AACtF,iBAAiB,oDAAoD;AACrE,iBAAiB,sDAAsD;AACvE;AACA,SAAS;AACT;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,wDAAU;AACjC,QAAQ,8DAAQ;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,0DAA0D;AAC3E;AACA,iBAAiB,oDAAoD;AACrE;AACA,iBAAiB,+CAA+C;AAChE;AACA,SAAS;AACT;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B,wDAAU;AACtC,QAAQ,8DAAQ;AAChB;AACA;AACA,iBAAiB,kEAAkE;AACnF,iBAAiB,sEAAsE;AACvF;AACA,SAAS;AACT;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAE83B;AAC93B;;;;;;;;;;;;;AC/4DA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AA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AAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AACA;AACA;AACA;AACA;;AAEwE;;AAExE;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,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;AACA;AACA;AACA;AACA;AACA,2CAA2C,eAAe;AAC1D,2CAA2C,eAAe;AAC1D,2CAA2C,eAAe;AAC1D,4CAA4C,eAAe;AAC3D,2CAA2C,eAAe;AAC1D,0CAA0C,eAAe;AACzD,4CAA4C,eAAe;AAC3D,4CAA4C,eAAe;AAC3D,yCAAyC,eAAe;AACxD,yCAAyC,eAAe;AACxD,6CAA6C,eAAe;AAC5D,4CAA4C,eAAe;AAC3D,0CAA0C,eAAe;AACzD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb,4CAA4C,uCAAuC;AACnF,4CAA4C,6DAA6D;AACzG,4CAA4C,oDAAoD;AAChG;AACA;AACA;AACA;AACA,aAAa;AACb,yCAAyC,uDAAuD;AAChG,yCAAyC,uDAAuD;AAChG,0CAA0C,8CAA8C;AACxF,0CAA0C,iCAAiC;AAC3E,2CAA2C,kCAAkC;AAC7E,yCAAyC,iDAAiD;AAC1F,yCAAyC,iCAAiC;AAC1E,yCAAyC,uDAAuD;AAChG,yCAAyC,oEAAoE;AAC7G,yCAAyC,oEAAoE;AAC7G,0CAA0C,8DAA8D;AACxG,yCAAyC,oEAAoE;AAC7G,+CAA+C,uDAAuD;AACtG,6CAA6C,iEAAiE;AAC9G,0CAA0C,sBAAsB;AAChE,8CAA8C,sBAAsB;AACpE,4CAA4C,uCAAuC;AACnF,6CAA6C,uCAAuC;AACpF,4CAA4C,iDAAiD;AAC7F,+CAA+C,sEAAsE;AACrH;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;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AChD;AACA,uCAAuC,2CAA2C;AAClF;AACA;AACA;AACA;AACA,sEAAsE,sDAAQ;AAC9E;AACA;AACA,WAAW,sDAAQ;AACnB;AACA;AACA,sEAAsE,sDAAQ;AAC9E;AACA;AACA,eAAe,sDAAQ;AACvB;AACA;AACA;AACA;AACA,eAAe,sDAAQ;AACvB;AACA;AACA,mEAAmE,sDAAQ;AAC3E;AACA;AACA;AACA;AACA;AACA;AACA,0DAA0D,sDAAsD,EAAE;AAClH;AACA,2CAA2C,sDAAQ;AACnD;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8BAA8B,0BAA0B,EAAE;AAC1D,oCAAoC,gCAAgC,EAAE;AACtE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B,wBAAwB,EAAE;AACtD,uCAAuC,mCAAmC,EAAE;AAC5E;AACA,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;;AAEA;AACA;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,mCAAmC;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,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,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;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,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,IAAI,uDAAS;AACb;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,QAAQ,uDAAS;AACjB;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;AACA;AACA;AACA;AACA;AACA;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,qBAAqB,sDAAQ;AAC7B;AACA;AACA;AACA;AACA,yBAAyB,sDAAQ;AACjC;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,kDAAkD,sDAAQ;AAC1D;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,0CAA0C,sDAAQ,GAAG;AACrD,gDAAgD,sDAAQ,GAAG;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;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,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,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,IAAI,uDAAS;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iCAAiC,gBAAgB;AACjD;AACA;AACA,4CAA4C,gBAAgB;AAC5D;AACA,CAAC;AACD;AACA,IAAI,uDAAS;AACb;AACA;AACA;AACA;AACA,iCAAiC,gBAAgB;AACjD;AACA;AACA;AACA,CAAC;AACD;AACA,IAAI,uDAAS;AACb;AACA;AACA;AACA;AACA,iCAAiC,gBAAgB;AACjD;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA,IAAI,uDAAS;AACb;AACA;AACA;AACA;AACA;AACA;AACA,iCAAiC,gBAAgB;AACjD;AACA;AACA;AACA,CAAC;AACD;AACA,IAAI,uDAAS;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iCAAiC,gBAAgB;AACjD;AACA;AACA;AACA,CAAC;AACD;AACA,IAAI,uDAAS;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iCAAiC,gBAAgB;AACjD;AACA;AACA;AACA,CAAC;AACD;AACA,IAAI,uDAAS;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iCAAiC,gBAAgB;AACjD;AACA;AACA;AACA,CAAC;AACD;AACA,IAAI,uDAAS;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iCAAiC,gBAAgB;AACjD;AACA;AACA;AACA,CAAC;AACD;AACA,IAAI,uDAAS;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iCAAiC,gBAAgB;AACjD;AACA;AACA;AACA,CAAC;AACD;AACA,IAAI,uDAAS;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iCAAiC,gBAAgB;AACjD;AACA;AACA;AACA,CAAC;AACD;AACA,IAAI,uDAAS;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iCAAiC,gBAAgB;AACjD;AACA;AACA;AACA,CAAC;AACD;AACA,IAAI,uDAAS;AACb;AACA;AACA;AACA;AACA;AACA;AACA,iCAAiC,gBAAgB;AACjD;AACA;AACA;AACA,CAAC;AACD;AACA,IAAI,uDAAS;AACb;AACA;AACA;AACA;AACA;AACA;AACA,iCAAiC,gBAAgB;AACjD;AACA;AACA;AACA,CAAC;AACD;AACA,IAAI,uDAAS;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iCAAiC,gBAAgB;AACjD;AACA;AACA;AACA,CAAC;AACD;AACA,IAAI,uDAAS;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iCAAiC,gBAAgB;AACjD;AACA;AACA;AACA,CAAC;AACD;AACA,IAAI,uDAAS;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iCAAiC,gBAAgB;AACjD;AACA;AACA;AACA,CAAC;AACD;AACA,IAAI,uDAAS;AACb;AACA;AACA;AACA;AACA;AACA;AACA,iCAAiC,gBAAgB;AACjD;AACA;AACA;AACA,CAAC;AACD;AACA,IAAI,uDAAS;AACb;AACA;AACA;AACA;AACA;AACA;AACA,iCAAiC,gBAAgB;AACjD;AACA;AACA;AACA,CAAC;AACD;AACA,IAAI,uDAAS;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iCAAiC,gBAAgB;AACjD;AACA;AACA;AACA,CAAC;AACD;AACA,IAAI,uDAAS;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iCAAiC,gBAAgB;AACjD;AACA;AACA;AACA,CAAC;AACD;AACA,IAAI,uDAAS;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iCAAiC,gBAAgB;AACjD;AACA;AACA;AACA,CAAC;AACD;AACA,IAAI,uDAAS;AACb;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA,CAAC,gDAAgD;AACjD;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,CAAC;;AAED;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,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,SAAS;AACT;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,IAAI,uDAAS;AACb;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,IAAI,uDAAS;AACb;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,IAAI,uDAAS;AACb;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,aAAa,oDAAM;AACnB;AACA;AACA,mBAAmB,oBAAoB;AACvC,iBAAiB,oDAAM;AACvB,uBAAuB,QAAQ;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB,oDAAM;AAC3B;AACA,iBAAiB,oDAAM;AACvB;AACA,aAAa,oDAAM;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,aAAa,oDAAM;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,oDAAM;AACnB;AACA,iBAAiB,oDAAM;AACvB,aAAa,oDAAM;AACnB;AACA;AACA;AACA;AACA;AACA,aAAa,oDAAM;AACnB;AACA;AACA,eAAe,eAAe;AAC9B;AACA;AACA;AACA,aAAa,oDAAM;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,oDAAM;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,CAAC,wBAAwB;AACzB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,oDAAM;AACnB,aAAa,oDAAM;AACnB,aAAa,oDAAM;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,oDAAM;AACnB;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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,IAAI,uDAAS;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,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,aAAa,oDAAM;AACnB,aAAa,oDAAM;AACnB;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,IAAI,uDAAS;AACb;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,IAAI,uDAAS;AACb;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,IAAI,uDAAS;AACb;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,IAAI,uDAAS;AACb;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,qDAAqD,sDAAQ,oCAAoC;AACjG;AACA,oEAAoE,qCAAqC;AACzG;AACA;AACA,oEAAoE,iCAAiC;AACrG;AACA;AACA;AACA,SAAS;AACT,qCAAqC,EAAE,sDAAQ;AAC/C;AACA;AACA;AACA;AACA,SAAS;AACT,sCAAsC,mCAAmC;AACzE;AACA,6BAA6B,oCAAoC;AACjE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sCAAsC,sDAAQ;AAC9C;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,gCAAgC,sDAAQ,qBAAqB,EAAE;AACnH;AACA;AACA;AACA;AACA,kCAAkC;AAClC;AACA,oCAAoC,sDAAQ,oBAAoB,8CAA8C;AAC9G,SAAS;AACT,gCAAgC;AAChC;AACA;AACA;AACA;AACA;AACA;AACA,+CAA+C,oEAAoE;AACnH;AACA,oDAAoD,mEAAmE;AACvH,oDAAoD,oEAAoE;AACxH,eAAe,sDAAQ;AACvB;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,mCAAmC,sDAAQ,4BAA4B,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,qCAAqC,sDAAQ;AAC7C;AACA;AACA;AACA;AACA;AACA,8DAA8D,gDAAgD;AAC9G;AACA;AACA,0DAA0D,2BAA2B,EAAE;AACvF;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uCAAuC,sDAAQ;AAC/C;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,IAAI,uDAAS;AACb;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,EAAE,sDAAQ;AACxF,yCAAyC,kFAAkF;AAC3H;AACA,6BAA6B,oCAAoC;AACjE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sCAAsC,sDAAQ;AAC9C;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,gCAAgC,sDAAQ,qBAAqB,EAAE;AACnH;AACA;AACA;AACA;AACA,kCAAkC;AAClC;AACA,oCAAoC,sDAAQ,oBAAoB,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,wCAAwC,sDAAQ,kCAAkC,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,mCAAmC,sDAAQ,4BAA4B,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,qCAAqC,sDAAQ;AAC7C;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,qDAAqD,sDAAQ,iFAAiF,gCAAgC,EAAE;AAChL;AACA;AACA;AACA,2CAA2C,sDAAQ;AACnD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA,uCAAuC,sDAAQ;AAC/C;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,IAAI,uDAAS;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yBAAyB;AACzB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yDAAyD;AACzD;AACA;AACA,aAAa;AACb,2EAA2E,sDAAQ;AACnF,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,gCAAgC,sDAAQ,qBAAqB,EAAE;AACnH;AACA;AACA;AACA;AACA,kCAAkC;AAClC;AACA,oCAAoC,sDAAQ,oBAAoB,8CAA8C;AAC9G,SAAS;AACT,gCAAgC;AAChC;AACA;AACA;AACA,8CAA8C;AAC9C,sDAAsD,qBAAqB;AAC3E;AACA;AACA;AACA;AACA,8CAA8C;AAC9C,sDAAsD,qBAAqB;AAC3E,eAAe,sDAAQ;AACvB;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,mCAAmC,sDAAQ,4BAA4B,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,IAAI,uDAAS;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,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,IAAI,uDAAS;AACb;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,oBAAoB,sDAAQ;AAC5B;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,iCAAiC;AACjC;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;AACA,CAAC,0CAA0C;AAC3C;AACA,IAAI,uDAAS;AACb;AACA,mCAAmC,kBAAkB;AACrD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA,IAAI,uDAAS;AACb;AACA,mCAAmC,kBAAkB;AACrD,oCAAoC,mBAAmB;AACvD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA,IAAI,uDAAS;AACb;AACA,mCAAmC,kBAAkB;AACrD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA,IAAI,uDAAS;AACb;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;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,IAAI,uDAAS;AACb;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,IAAI,uDAAS;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mDAAmD,+BAA+B;AAClF;AACA,CAAC;AACD;AACA,IAAI,uDAAS;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wDAAwD,cAAc;AACtE;AACA;AACA;AACA;AACA,CAAC;AACD;AACA,IAAI,uDAAS;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qDAAqD,cAAc;AACnE;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA,IAAI,uDAAS;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qDAAqD,cAAc;AACnE;AACA;AACA;AACA;AACA,CAAC;AACD;AACA,IAAI,uDAAS;AACb;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,IAAI,uDAAS;AACb;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,IAAI,uDAAS;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2DAA2D,cAAc;AACzE;AACA;AACA;AACA;AACA,CAAC;AACD;AACA,IAAI,uDAAS;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wDAAwD,cAAc;AACtE;AACA;AACA;AACA;AACA,CAAC;AACD;AACA,IAAI,uDAAS;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oDAAoD,aAAa;AACjE;AACA;AACA;AACA;AACA,CAAC;AACD;AACA,IAAI,uDAAS;AACb;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,IAAI,uDAAS;AACb;AACA,mCAAmC,kBAAkB;AACrD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wDAAwD,cAAc;AACtE;AACA;AACA;AACA;AACA,CAAC;AACD;AACA,IAAI,uDAAS;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gDAAgD,cAAc;AAC9D;AACA;AACA;AACA;AACA,CAAC;AACD;AACA,IAAI,uDAAS;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sDAAsD,cAAc;AACpE;AACA;AACA;AACA;AACA,CAAC;AACD;AACA,IAAI,uDAAS;AACb;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,IAAI,uDAAS;AACb;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,IAAI,uDAAS;AACb;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,IAAI,uDAAS;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qDAAqD,cAAc;AACnE;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA,IAAI,uDAAS;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oDAAoD,cAAc;AAClE;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA,IAAI,uDAAS;AACb;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,IAAI,uDAAS;AACb;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,IAAI,uDAAS;AACb;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,IAAI,uDAAS;AACb;AACA,mCAAmC,kBAAkB;AACrD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA,IAAI,uDAAS;AACb;AACA,mCAAmC,kBAAkB;AACrD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA,IAAI,uDAAS;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA,IAAI,uDAAS;AACb;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,IAAI,uDAAS;AACb;AACA,mCAAmC,kBAAkB;AACrD;AACA;AACA;AACA;AACA;AACA,sDAAsD,6BAA6B;AACnF;AACA,CAAC;AACD;AACA,IAAI,uDAAS;AACb;AACA,mCAAmC,kBAAkB;AACrD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA,IAAI,uDAAS;AACb;AACA,mCAAmC,kBAAkB;AACrD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA,IAAI,uDAAS;AACb;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,IAAI,uDAAS;AACb;AACA,mCAAmC,gBAAgB;AACnD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA,IAAI,uDAAS;AACb;AACA,mCAAmC,mBAAmB;AACtD;AACA;AACA;AACA;AACA;AACA,0DAA0D,oCAAoC;AAC9F;AACA;AACA;AACA;AACA,CAAC;AACD;AACA,IAAI,uDAAS;AACb;AACA,8BAA8B,WAAW;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uDAAuD,iCAAiC;AACxF;AACA,CAAC;AACD;AACA,IAAI,uDAAS;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA,IAAI,uDAAS;AACb;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;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,sDAAsD,wCAAwC,EAAE;AAChG;AACA;AACA;AACA,6EAA6E,sCAAsC;AACnH,2EAA2E,sCAAsC;AACjH,kFAAkF,YAAY;AAC9F,6EAA6E,2CAA2C;AACxH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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,IAAI,uDAAS;AACb;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,IAAI,uDAAS;AACb;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,IAAI,uDAAS;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;AACD;AACA;AACA;AACA;AACA,gCAAgC,mBAAmB;AACnD;AACA;AACA;AACA,gCAAgC,mBAAmB;AACnD,mCAAmC,sBAAsB;AACzD;AACA;AACA;AACA,mCAAmC,sBAAsB;AACzD,gCAAgC,mBAAmB;AACnD;AACA;AACA;AACA;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;AACA,0BAA0B,sDAAQ,iCAAiC,gBAAgB;AACnF;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,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,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,6DAA6D,sDAAQ;AACrE;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,wDAAwD,sDAAQ;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,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,4CAA4C,sDAAQ;AACpD;AACA;AACA,wDAAwD,sDAAQ;AAChE,sCAAsC,+CAA+C,EAAE;AACvF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA,oDAAoD,sDAAQ,0CAA0C,yDAAyD,EAAE;AACjK;AACA,wCAAwC,sDAAQ;AAChD;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,4EAA4E,sDAAQ;AACpF;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,IAAI,uDAAS;AACb;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,IAAI,uDAAS;AACb;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,mCAAmC,sDAAQ,WAAW,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,0CAA0C,sDAAQ,kCAAkC,gDAAgD,EAAE;AACtI;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sCAAsC,sDAAQ;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,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;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,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;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,oBAAoB,sDAAQ;AAC5B;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA,kCAAkC,eAAe;AACjD;AACA;AACA;AACA,CAAC;AACD;AACA,IAAI,uDAAS;AACb;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;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,kDAAkD,mCAAmC,EAAE;AACvF;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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,sDAAQ,oCAAoC,iBAAiB;AACxF;AACA;AACA;AACA;AACA,mBAAmB,QAAQ,gBAAgB;AAC3C;AACA;AACA;AACA;AACA,iBAAiB,0BAA0B;AAC3C;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,IAAI,uDAAS;AACb;AACA;AACA;AACA;AACA;AACA,qBAAqB,oDAAM;AAC3B;AACA,qBAAqB,oDAAM;AAC3B,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,eAAe,sDAAQ;AACvB;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,qBAAqB,oDAAM;AAC3B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB,sDAAQ;AAC3B,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,IAAI,uDAAS;AACb;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,kCAAkC,sDAAQ;AAC1C;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kCAAkC,sDAAQ;AAC1C;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2CAA2C,2CAA2C,EAAE;AACxF;AACA;AACA;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,gEAAgE,EAAE;AAC9G;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,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,iBAAiB,oDAAM;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,+BAA+B,+BAA+B;AAC9D;AACA;AACA;AACA;AACA;AACA,gCAAgC,sDAAQ,uCAAuC,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,IAAI,uDAAS;AACb;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,8BAA8B,sDAAQ,kDAAkD,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;AACA,IAAI,uDAAS;AACb;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,sCAAsC,sDAAQ;AAC9C,4CAA4C,sDAAQ;AACpD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0DAA0D,8CAA8C,EAAE;AAC1G;AACA;AACA;AACA;AACA,gCAAgC,gBAAgB;AAChD;AACA;AACA;AACA;AACA,sCAAsC,sDAAQ;AAC9C;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,gDAAgD,sDAAQ,mCAAmC,0CAA0C,EAAE;AACvI;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oEAAoE,sDAAQ,qCAAqC,0CAA0C,EAAE;AAC7J;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,8CAA8C,sDAAQ,+BAA+B,yCAAyC,EAAE;AAChI;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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,sEAAsE,wDAAwD,EAAE;AAChI;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb,4DAA4D,yCAAyC,EAAE;AACvG;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;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,IAAI,uDAAS;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB,sDAAQ,0CAA0C,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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AClF,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,IAAI,uDAAS;AACb;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,qBAAqB,sDAAQ;AAC7B;AACA,0BAA0B,sDAAQ,iCAAiC,UAAU;AAC7E;AACA;AACA,kCAAkC,sDAAQ,mCAAmC,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,0CAA0C,uBAAuB;AACjE;AACA,gDAAgD,mDAAmD,EAAE;AACrG;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4CAA4C,sDAAQ,4BAA4B,6DAA6D,EAAE;AAC/I,SAAS;AACT;AACA;AACA;AACA;AACA;AACA,4CAA4C,sDAAQ,4BAA4B,6DAA6D,EAAE;AAC/I,SAAS;AACT;AACA;AACA;AACA,8BAA8B,sDAAQ,8BAA8B,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,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,mDAAmD,sDAAQ;AAC3D;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,eAAe,sDAAQ;AACvB;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,yBAAyB,oDAAM;AAC/B;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,sDAAsD,sDAAQ;AAC9D,kDAAkD,sDAAQ;AAC1D;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;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,SAAS,sDAAQ,GAAG,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,oEAAoE,sDAAQ;AAC5E;AACA;AACA,wEAAwE,sDAAQ;AAChF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oDAAoD,sDAAQ,4BAA4B,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,eAAe,sDAAQ;AACvB;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,gCAAgC,sDAAQ;AACxC;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,IAAI,uDAAS;AACb;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,6DAA6D,2BAA2B;AACxF;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,6CAA6C,sDAAQ;AACrD;AACA;AACA;AACA;AACA,uDAAuD,uBAAuB;AAC9E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2DAA2D,sDAAQ;AACnE;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,IAAI,uDAAS;AACb;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;AACA;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,mCAAmC;AACnC,gCAAgC;AAChC,2BAA2B;AAC3B,gCAAgC;AAChC,8BAA8B;AAC9B,mCAAmC;AACnC,oCAAoC;AACpC,oCAAoC;AACpC,kCAAkC;AAClC,qCAAqC;AACrC,oCAAoC;AACpC,uCAAuC;AACvC,mCAAmC;AACnC,wBAAwB;AACxB,+BAA+B;AAC/B,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,iCAAiC;AACjC,iCAAiC;AACjC,wBAAwB;AACxB,8BAA8B;AAC9B,iCAAiC;AACjC,0BAA0B;AAC1B,mCAAmC;AACnC,oCAAoC;AACpC,qCAAqC;AACrC,0CAA0C;AAC1C,2CAA2C;AAC3C,mCAAmC;AACnC,mCAAmC;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,kCAAkC;AAClC,2BAA2B;AAC3B,8BAA8B;AAC9B,yBAAyB;AACzB,gCAAgC;AAChC,wCAAwC;AACxC,sCAAsC;AACtC,4CAA4C;AAC5C,4BAA4B;AAC5B;AACA,gCAAgC;AAChC;AACA,gCAAgC;AAChC,iCAAiC;AACjC,yCAAyC;AACzC,uCAAuC;AACvC,kCAAkC;AAClC,+BAA+B;AAC/B;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,4BAA4B,gBAAgB;AAC5C,0EAA0E,UAAU,uDAAuD,EAAE,EAAE;AAC/I;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gGAAgG,0BAA0B,EAAE;AAC5H;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA,8BAA8B,wCAAwC;AACtE;AACA;AACA,wDAAwD,gCAAgC;AACxF;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,CAAC,4DAA4D;AAC7D;AACA;AACA;AACA;AACA;AACA,6CAA6C,oDAAoD,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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sBAAsB,sDAAQ,8BAA8B,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,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB,QAAQ,gBAAgB;AAC3C;AACA;AACA;AACA;AACA,iBAAiB,0BAA0B;AAC3C;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sDAAsD,UAAU,2CAA2C,EAAE,EAAE;AAC/G;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,uBAAuB,eAAe;AACtC;AACA;AACA;AACA;AACA;;AAEA;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,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA,SAAS;AACT;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kDAAkD,uDAAuD;AACzG;AACA,uCAAuC,sDAAQ;AAC/C,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yCAAyC,yBAAyB,EAAE;AACpE;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8BAA8B,gEAAgE;AAC9F;AACA,8BAA8B,mDAAmD;AACjF;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL,8BAA8B,wDAAwD;AACtF;AACA,8BAA8B,4DAA4D;AAC1F;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;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+CAA+C,gCAAgC;AAC/E;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA,oDAAoD,qCAAqC;AACzF;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wDAAwD,yCAAyC;AACjG;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yDAAyD,0CAA0C;AACnG;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qDAAqD,sCAAsC;AAC3F;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kDAAkD,mCAAmC;AACrF;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mDAAmD,oCAAoC;AACvF;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA,kDAAkD,mCAAmC;AACrF;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA,mDAAmD,oCAAoC;AACvF;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA,oDAAoD,qCAAqC;AACzF;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA,+BAA+B,sDAAQ,oCAAoC,iBAAiB;AAC5F;AACA;AACA;AACA;AACA,uBAAuB,QAAQ,gBAAgB;AAC/C;AACA;AACA;AACA;AACA,qBAAqB,0BAA0B;AAC/C;AACA;AACA;AACA;AACA,+BAA+B,sDAAQ,oCAAoC,iBAAiB;AAC5F;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,QAAQ,gBAAgB;AAC/C;AACA;AACA;AACA;AACA,qBAAqB,0BAA0B;AAC/C;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,gDAAgD,0CAA0C,EAAE;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;AACA,0BAA0B,sDAAQ,gCAAgC,UAAU;AAC5E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oEAAoE,sDAAQ,mCAAmC,oDAAoD,EAAE;AACrK;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,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yBAAyB,oDAAM;AAC/B;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iEAAiE,aAAa;AAC9E,qEAAqE,aAAa;AAClF,6EAA6E,aAAa;AAC1F;AACA;AACA,kDAAkD,wBAAwB,EAAE;AAC5E,kCAAkC,0EAA0E,EAAE;AAC9G,kCAAkC,sDAAsD,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;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,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oEAAoE,aAAa;AACjF;AACA;AACA;AACA,8DAA8D,gDAAgD;AAC9G,wEAAwE,aAAa;AACrF,gFAAgF,aAAa;AAC7F;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA,wCAAwC,sDAAQ,0BAA0B,sCAAsC,EAAE;AAClH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0BAA0B;AAC1B,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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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;;AAEA;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,+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,iCAAiC;AACjC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb,6EAA6E,iCAAiC,EAAE,uBAAuB,6CAA6C,EAAE;AACtL;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,sCAAsC,sBAAsB;AAC5D,4CAA4C,yBAAyB;AACrE;AACA;AACA;AACA;AACA;AACA;AACA,mCAAmC,sDAAQ,gDAAgD,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,uEAAuE,qCAAqC,EAAE;AAC9G;AACA;AACA;AACA;AACA;AACA,yCAAyC,sDAAQ;AACjD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0BAA0B,sDAAQ,sCAAsC,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,sGAAsG,sDAAQ;AAC9G;AACA;AACA,oEAAoE,qCAAqC;AACzG;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA,qCAAqC,sDAAQ;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,iBAAiB,oDAAM;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0BAA0B,sDAAQ,qCAAqC,UAAU;AACjF;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,8EAA8E,kCAAkC,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;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sEAAsE,yCAAyC,EAAE;AACjH;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA,uBAAuB,wBAAwB;AAC/C;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,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA,SAAS;AACT;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,qDAAqD,sDAAQ;AAC7D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yCAAyC,sDAAQ;AACjD;AACA;AACA;AACA;AACA,yDAAyD,sDAAQ;AACjE;AACA,yCAAyC,sDAAQ;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,iBAAiB;AACjB,oHAAoH,0CAA0C,EAAE;AAChK,wEAAwE,sDAAQ;AAChF;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6CAA6C,sDAAQ;AACrD;AACA;AACA;AACA;AACA,uBAAuB,wBAAwB;AAC/C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iDAAiD,sDAAQ;AACzD;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,wBAAwB;AAC/C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iDAAiD,sDAAQ;AACzD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+CAA+C,sDAAQ;AACvD;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,SAAS;AACT;AACA;AACA;AACA,sFAAsF,kCAAkC,EAAE;AAC1H;AACA;AACA;AACA;AACA;AACA,qCAAqC,sDAAQ;AAC7C;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,wEAAwE,0BAA0B;AAClG,sEAAsE,oCAAoC;AAC1G;AACA;AACA,wBAAwB,uBAAuB;AAC/C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oDAAoD,sDAAQ;AAC5D;AACA;AACA;AACA,kKAAkK,0CAA0C,EAAE;AAC9M,oDAAoD,sDAAQ;AAC5D;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA,IAAI,uDAAS;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB,sDAAQ;AAC3B;AACA,mDAAmD,sDAAQ;AAC3D;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8BAA8B,sDAAQ;AACtC;AACA;AACA;AACA;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,SAAS;AACT;AACA;AACA,KAAK;AACL;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,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kDAAkD,4CAA4C,EAAE;AAChG;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,oDAAM;AACnB,aAAa,oDAAM;AACnB;AACA;AACA;AACA,YAAY;AACZ;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;AACA;AACA;AACA;AACA;AACA,6BAA6B,cAAc;AAC3C;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;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;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;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,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wHAAwH,4DAA4D,EAAE;AACtL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA,iEAAiE,IAAI;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,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,eAAe,sDAAQ,GAAG,yEAAyE;AACnG;AACA;AACA;AACA,SAAS,yMAAyM;AAClN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oFAAoF,8CAA8C,EAAE;AACpI,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,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8DAA8D,oBAAoB,EAAE;AACpF,+CAA+C,eAAe,EAAE;AAChE;AACA,uGAAuG,uBAAuB,EAAE;AAChI;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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,sDAAQ,yDAAyD,UAAU;AACjG;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,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,SAAS;AACT;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,kCAAkC,sDAAQ,6CAA6C,oBAAoB;AAC3G;AACA,4IAA4I,0CAA0C,EAAE;AACxL,kDAAkD,sDAAQ;AAC1D;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,uCAAuC,sDAAQ,4DAA4D,yBAAyB;AACpI;AACA,gHAAgH,0CAA0C,EAAE;AAC5J;AACA;AACA;AACA,wEAAwE,sDAAQ;AAChF;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,iBAAiB,oDAAM;AACvB;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,YAAY;AACZ;;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;AACA,sBAAsB,sDAAQ,wDAAwD,UAAU;AAChG;AACA;AACA;AACA;AACA,8CAA8C,sDAAQ,yDAAyD,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,4BAA4B,aAAa;AACzC;AACA;AACA;AACA;AACA;AACA;AACA,gCAAgC,sDAAQ,uCAAuC,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,aAAa,oDAAM;AACnB;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;AACA,qCAAqC,sDAAQ,0CAA0C,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,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;AACA,qBAAqB;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yBAAyB;AACzB;AACA;AACA;AACA;AACA;AACA,8BAA8B,sDAAQ,sCAAsC,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,qCAAqC;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY,uDAAS;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8DAA8D,sDAAQ;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,gCAAgC;AAChC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,sDAAQ,GAAG,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,+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,IAAI,uDAAS;AACb;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;AACA,qCAAqC,sDAAQ,sDAAsD,uBAAuB;AAC1H;AACA;AACA;AACA;AACA,uBAAuB,QAAQ,gBAAgB;AAC/C;AACA;AACA;AACA;AACA,qBAAqB,0BAA0B;AAC/C;AACA;AACA;AACA,0BAA0B,sDAAQ,4BAA4B,UAAU;AACxE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sCAAsC,sDAAQ,qCAAqC,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,gDAAgD,sDAAQ;AACxD;AACA;AACA;AACA;AACA,sCAAsC,uBAAuB,EAAE;AAC/D;AACA;AACA;AACA;AACA,+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,4CAA4C,sDAAQ,uCAAuC,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,IAAI,uDAAS;AACb;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;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,qCAAqC,sDAAQ,4DAA4D,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;AACA,oCAAoC,sDAAQ,mDAAmD,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,6CAA6C,sDAAQ;AACrD;AACA;AACA;AACA;AACA;AACA;AACA,gEAAgE;AAChE;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA,0CAA0C,sDAAQ;AAClD,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,wBAAwB,sDAAQ;AAChC,SAAS,EAAE,EAAE;AACb;AACA;AACA;AACA,kDAAkD,+EAA+E,EAAE;AACnI;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0FAA0F,mEAAmE,EAAE;AAC/J;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA,iFAAiF,+DAA+D,EAAE;AAClJ,iDAAiD,sDAAsD,EAAE;AACzG;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA,SAAS;AACT,mDAAmD,+DAA+D,EAAE;AACpH;AACA;AACA;AACA;AACA;AACA,4BAA4B,sDAAQ;AACpC;AACA,SAAS;AACT;AACA;AACA;AACA;AACA,mDAAmD,+DAA+D,EAAE;AACpH;AACA,qBAAqB,iCAAiC,sDAAQ,uDAAuD;AACrH;AACA;AACA;AACA;AACA;AACA;AACA,uDAAuD,wIAAwI,EAAE;AACjM;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kDAAkD,sDAAQ;AAC1D;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,uBAAuB,sDAAQ,gCAAgC;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;AACA,8BAA8B,sDAAQ,4CAA4C,UAAU;AAC5F;AACA;AACA;AACA,gDAAgD,sDAAQ,mDAAmD,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;AACA,wCAAwC,sDAAQ,mDAAmD,sBAAsB;AACzH;AACA;AACA;AACA;AACA;AACA,2BAA2B,QAAQ,gBAAgB;AACnD;AACA;AACA;AACA;AACA,yBAAyB,0BAA0B;AACnD;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,oDAAoD,sDAAQ;AAC5D;AACA;AACA;AACA;AACA;AACA,wDAAwD,sDAAQ;AAChE;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,sDAAsD,sDAAQ;AAC9D;AACA;AACA;AACA,sDAAsD,sDAAQ;AAC9D;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,kEAAkE,sDAAQ;AAC1E;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;AACA,uCAAuC,sDAAQ,4DAA4D,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,+DAA+D,mCAAmC,sDAAQ,qBAAqB,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,sDAAsD,sDAAQ,mDAAmD,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;AACA,sCAAsC,sDAAQ,6BAA6B,UAAU;AACrF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iEAAiE,sDAAQ,sDAAsD,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,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,IAAI,uDAAS;AACb;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;AACA;AACA;AACA,6DAA6D,sDAAQ;AACrE;AACA;AACA,iDAAiD,gBAAgB;AACjE;AACA;AACA,2DAA2D,sDAAQ;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;AACA;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,4CAA4C,sDAAQ;AACpD;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,IAAI,uDAAS;AACb;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;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,yDAAyD,sDAAQ,0CAA0C;AAC3G,wEAAwE;AACxE;AACA;AACA,8CAA8C,sDAAQ,wDAAwD,sDAAQ;AACtH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI,uDAAS;AACb;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;AACA;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,mBAAmB;AAC5D;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,oDAAoD,oGAAoG,EAAE;AAC1J;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8CAA8C,sDAAQ;AACtD,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;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;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AA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AACA;AACA;AACA;AACA;;AAEyG;AACzC;AACzB;;AAEvC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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;AACA,IAAI;AACJ;AACA;AACA;AACA,IAAI;AACJ;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,0CAA0C,sDAAQ;AAClD;AACA;AACA,6EAA6E,sDAAQ;AACrF;AACA,2CAA2C,sDAAQ;AACnD;AACA;AACA;AACA;AACA,yDAAyD,YAAY;AACrE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB,uBAAuB;AAC/C;AACA;AACA;AACA,6CAA6C,sDAAQ;AACrD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB,uBAAuB;AAC/C;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kFAAkF,sDAAQ;AAC1F;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,wBAAwB,uBAAuB;AAC/C;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gFAAgF,sDAAQ;AACxF;AACA;AACA;AACA;AACA;AACA;AACA,mEAAmE,UAAU,EAAE;AAC/E;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,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,0EAA0E,UAAU,+BAA+B,EAAE,EAAE;AACvH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0BAA0B,WAAW;AACrC,YAAY,sDAAQ,EAAE,2EAA2E;AACjG,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0BAA0B,WAAW;AACrC,YAAY,sDAAQ,EAAE,yEAAyE;AAC/F,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA,0BAA0B,WAAW;AACrC,YAAY,sDAAQ,EAAE,yEAAyE;AAC/F,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA,YAAY,sDAAQ,EAAE,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,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,CAAC,oDAAoD;AACrD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yBAAyB,UAAU;AACnC;AACA,CAAC,+CAA+C,sBAAsB,EAAE,cAAc,EAAE;AACxF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B,aAAa;AACzC,6BAA6B,aAAa;AAC1C;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,+EAA+E;AAC/E;AACA;AACA;AACA;AACA,sBAAsB,oBAAoB;AAC1C;AACA;AACA;AACA;AACA,iCAAiC;AACjC;AACA;AACA;AACA,sBAAsB,MAAM,MAAM;AAClC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,QAAQ;AAC/B,YAAY,sDAAQ,EAAE,mDAAmD;AACzE,CAAC,+CAA+C,sBAAsB,EAAE,cAAc,EAAE;AACxF;AACA;AACA;AACA;AACA;AACA,+CAA+C,SAAS,sDAAQ,EAAE,aAAa,MAAM,EAAE,+CAA+C,sBAAsB,EAAE,cAAc,EAAE;AAC9K;AACA;AACA;AACA;AACA,uEAAuE,UAAU,2CAA2C,EAAE,EAAE;AAChI;AACA;AACA;AACA;AACA,yEAAyE,UAAU,2CAA2C,EAAE,EAAE;AAClI;AACA;AACA;AACA;AACA,gFAAgF,UAAU,qCAAqC,EAAE,EAAE;AACnI;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,6BAA6B;AAC5C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;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;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,oCAAoC,sDAAQ;AAC5C,MAAM;AACN;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,sDAAsD,sDAAQ;AAC9D;AACA,kDAAkD,sDAAQ;AAC1D;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,oEAAoE,+BAA+B;AACnG;AACA;AACA;AACA,oFAAoF,6BAA6B;AACjH;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4DAA4D,sDAAQ;AACpE,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;AACA,IAAI;AACJ;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,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;;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;AACA;AACA;AACA;AACA,CAAC;AACD;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,QAAQ;AACR;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,0CAA0C,+CAA+C;AACzF;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,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;AACA,+BAA+B,uBAAuB;AACtD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0EAA0E,sDAAQ;AAClF;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;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,0CAA0C,kCAAkC;AAC5E;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B,mCAAmC,sDAAQ,mCAAmC;AAC1G;AACA;AACA;AACA,4BAA4B,iCAAiC;AAC7D;AACA;AACA;AACA,4BAA4B,+CAA+C;AAC3E;AACA;AACA;AACA,4BAA4B,8DAA8D,sDAAQ,qDAAqD;AACvJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uEAAuE,sDAAQ;AAC/E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B,mCAAmC,sDAAQ,mCAAmC;AAC1G;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;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,kBAAkB,sDAAQ;AAC1B;AACA;AACA,iEAAiE,uBAAuB;AACxF;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,8DAA8D,iBAAiB,EAAE;AACjF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,2CAA2C,EAAE;;AAEpE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+EAA+E,gBAAgB;AAC/F;AACA,QAAQ,4CAA4C;AACpD;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA,gEAAgE,8BAA8B;AAC9F,QAAQ,oCAAoC;AAC5C;AACA;AACA;AACA;AACA;AACA;AACA,iCAAiC,4BAA4B;AAC7D;AACA;AACA;AACA;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;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,uBAAuB;AAC3C;AACA;AACA,iCAAiC,sDAAQ;AACzC;;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,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,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;AACA,KAAK;AACL;AACA;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;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;AACA,gDAAgD,eAAe;AAC/D;AACA;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;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,0BAA0B,wCAAwC,EAAE;AACpE;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;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,8CAA8C,sBAAsB;AACpE;AACA;AACA;AACA;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,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;AACA;AACA;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;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;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,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,wCAAwC,sDAAQ;AAChD;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,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,yCAAyC,4BAA4B;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,mDAAmD,0DAA0D,EAAE;AAC/G;AACA,kEAAkE,wCAAwC,EAAE;AAC5G;AACA;AACA;AACA;AACA;AACA;AACA,0DAA0D,2BAA2B,EAAE;AACvF;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,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,uFAAuF;AACvF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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;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,uCAAuC,oBAAoB,EAAE;AAC7D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mCAAmC,qCAAqC;AACxE;AACA;AACA,mCAAmC,4CAA4C,sDAAQ,mCAAmC;AAC1H;AACA;AACA;AACA;AACA,uCAAuC,mDAAmD,sDAAQ,0CAA0C;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,+CAA+C,sBAAsB;AACrE;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,2BAA2B,0BAA0B;AACrD;AACA;AACA;AACA;AACA;AACA;AACA,yDAAyD,YAAY,EAAE,sBAAsB,iBAAiB,EAAE;AAChH;AACA;AACA;AACA;AACA;AACA,4BAA4B,wDAAU;AACtC;AACA,QAAQ,qDAAO,8BAA8B,qDAAO;AACpD,QAAQ,wDAAU;AAClB;AACA;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,cAAc,wDAAU;AACxB;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,cAAc,uBAAuB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kEAAkE,qBAAqB;AACvF;AACA;AACA;AACA,mEAAmE,qBAAqB;AACxF;AACA,gBAAgB,yBAAyB;AACzC;AACA;AACA;AACA;AACA;AACA,gBAAgB,0BAA0B;AAC1C;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iDAAiD;AACjD;AACA;AACA;AACA,wDAAwD;AACxD;AACA;AACA;AACA,4DAA4D,kBAAkB;AAC9E,eAAe,wDAAU;AACzB;AACA;AACA;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;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,CAAC;AACD;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,IAAI,uDAAS;AACb;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;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,IAAI,uDAAS;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iCAAiC,iBAAiB;AAClD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oDAAoD,yCAAyC;AAC7F;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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,uCAAuC,iDAAY;AACnD;AACA;AACA;AACA;AACA;AACA,CAAC,CAAC,4CAAO;;AAET;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;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;AACA;AACA;AACA,2DAA2D,yBAAyB;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,8BAA8B,yBAAyB;AACvD;AACA;AACA;AACA;AACA;AACA;AACA,YAAY,WAAW;AACvB;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,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,gEAAgE,2BAA2B;AAC3F;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB,wDAAU;AAC5B;AACA,QAAQ,wDAAU;AAClB;AACA;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,4EAA4E,kCAAkC;AAC9G;AACA;AACA;AACA,2EAA2E,4BAA4B;AACvG;AACA;AACA;AACA;AACA,oEAAoE,6CAA6C;AACjH;AACA;AACA;AACA,qEAAqE,gDAAgD;AACrH;AACA;AACA;AACA,oEAAoE,8CAA8C;AAClH;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yCAAyC,wBAAwB;AACjE;AACA;AACA,0BAA0B,wDAAU;AACpC;AACA,QAAQ,wDAAU;AAClB;AACA;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,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,0BAA0B,oCAAoC;AAC9D;AACA;AACA;AACA,kDAAkD,oFAAoF;AACtI;AACA;AACA;AACA;AACA;AACA,6CAA6C,0CAA0C,EAAE;AACzF,kDAAkD,kCAAkC,yBAAyB,qCAAqC,EAAE,EAAE,EAAE,EAAE;AAC1J;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB,aAAa;AACb,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;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,2DAA2D,uCAAuC;AAClG;AACA;AACA,kCAAkC,eAAe;AACjD;AACA;AACA,0BAA0B,uBAAuB,EAAE;AACnD;AACA;AACA,KAAK;AACL;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,kBAAkB,wDAAU;AAC5B;AACA,QAAQ,wDAAU;AAClB;AACA;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,cAAc,sDAAQ,GAAG;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,+CAA+C,oBAAoB,8BAA8B,cAAc,EAAE,EAAE,EAAE,EAAE;AACvH,oCAAoC,+CAAU;AAC9C;AACA;AACA;AACA;AACA;AACA,aAAa;AACb,SAAS;AACT,2BAA2B,+CAAU;AACrC;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,YAAY,kDAAK,kCAAkC,4DAAK;AACxD;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;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,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,+CAA+C,+BAA+B,EAAE;AAChF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qDAAqD,uBAAuB,EAAE;AAC9E;AACA;AACA;AACA;AACA;AACA,0BAA0B,2BAA2B,EAAE;AACvD;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,wCAAwC,wDAAU;AAClD;AACA,QAAQ,wDAAU;AAClB;AACA;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;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;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC,kDAAkD;AACnD;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;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;AACA;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;AACA,eAAe,IAAI;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6CAA6C,8BAA8B;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,iDAAiD,2BAA2B;AAC5E;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,gDAAgD,mBAAmB;AACnE;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,iBAAiB,oDAAM;AACvB;AACA;AACA;AACA,eAAe,mEAAc,MAAM,CAAC;AACpC,qCAAqC,2BAA2B,EAAE;AAClE,mCAAmC,gDAAgD,EAAE;AACrF,mCAAmC,iDAAiD,EAAE;AACtF;AACA;AACA,iBAAiB,oDAAM;AACvB;AACA;AACA;AACA;AACA;AACA,eAAe,mEAAc,wEAAwE,CAAC;AACtG,qCAAqC,gDAAgD,EAAE;AACvF,sCAAsC,mDAAmD,EAAE;AAC3F;AACA,6BAA6B,wDAAU;AACvC;AACA,QAAQ,qDAAO;AACf,QAAQ,wDAAU;AAClB;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,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;;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,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI,uDAAS;AACb;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY;AACZ;AACA,uCAAuC,MAAM;AAC7C;AACA;AACA;AACA;AACA;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,MAAM;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI,uDAAS;AACb;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,IAAI,uDAAS;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,oDAAoD,sDAAQ;AAC5D;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,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;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,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,0CAA0C,gCAAgC;AAC1E;AACA;AACA;AACA;AACA,4CAA4C,8DAA8D;AAC1G;AACA,+CAA+C,sCAAsC;AACrF;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wDAAwD,yBAAyB;AACjF;AACA,CAAC;AACD;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,SAAS;AACT;AACA;AACA,KAAK;AACL;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,8BAA8B,4BAA4B;AAC1D;AACA,oCAAoC,4BAA4B;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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;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;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,kBAAkB,4BAA4B;AAC9C;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,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,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,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,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;AACA;AACA;AACA,uDAAuD,qBAAqB;AAC5E;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;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;AACA;AACA;AACA,uDAAuD,qBAAqB;AAC5E;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;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;AACA;AACA;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;AACA;AACA;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;AACA;AACA;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;AACA;AACA;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,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,KAAK;AACL;AACA;AACA;AACA;AACA,KAAK;AACL,KAAK,kDAAkD;AACvD;AACA,KAAK,0EAA0E;AAC/E,KAAK,0EAA0E;AAC/E;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB,wDAAU;AAClC,kBAAkB,0CAA0C;AAC5D,QAAQ,wDAAU;AAClB;AACA;AACA,CAAC;;AAED;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,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,aAAa;AACb;AACA;AACA;AACA;AACA;AACA,4BAA4B;AAC5B;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb,SAAS;AACT,KAAK;AACL;AACA,qDAAqD,aAAa,EAAE;AACpE;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,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,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;AACA,sBAAsB,sDAAQ,kCAAkC,UAAU;AAC1E;AACA;AACA;AACA;AACA,mBAAmB,QAAQ,gBAAgB;AAC3C;AACA;AACA;AACA;AACA,iBAAiB,0BAA0B;AAC3C;AACA;AACA;AACA;AACA;AACA,oBAAoB,uBAAuB;AAC3C;AACA;AACA;AACA;AACA;AACA,0BAA0B,sDAAQ,iCAAiC,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,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,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,qBAAqB,oDAAM;AAC3B;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,oDAAM;AACvB;AACA;AACA;AACA;AACA;AACA;AACA,kDAAkD,wCAAwC;AAC1F;AACA,gBAAgB;AAChB,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,aAAa,oDAAM;AACnB;AACA;AACA;AACA,mBAAmB,qBAAqB;AACxC,iBAAiB,oDAAM;AACvB,iBAAiB,oDAAM;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA,mBAAmB,oBAAoB;AACvC,iBAAiB,oDAAM;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,oDAAM;AACvB,iBAAiB,oDAAM;AACvB;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,uBAAuB,wBAAwB;AAC/C,qBAAqB,oDAAM;AAC3B;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;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,SAAS;AACpC;AACA;AACA,8CAA8C,sDAAQ;AACtD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,SAAS;AACpC;AACA;AACA,yCAAyC,sDAAQ;AACjD;AACA;AACA;AACA;AACA;AACA,mBAAmB,0BAA0B;AAC7C;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;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI,uDAAS;AACb;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,CAAC;AACD;AACA,IAAI,uDAAS;AACb;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,IAAI,uDAAS;AACb;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,iBAAiB,oDAAM;AACvB;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,iBAAiB,oDAAM;AACvB;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,qBAAqB,oDAAM;AAC3B;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,8CAA8C,sDAAQ;AACtD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,SAAS;AACpC;AACA;AACA,yCAAyC,sDAAQ;AACjD;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,mDAAmD,sDAAQ;AAC3D;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,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,sDAAsD;AACtD,0CAA0C,EAAE;AAC5C,oDAAoD;AACpD,0CAA0C,EAAE;AAC5C;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,mDAAmD,sDAAQ;AAC3D;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,qCAAqC,sDAAQ;AAC7C;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,2DAA2D,sDAAQ;AACnE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yCAAyC,sDAAQ;AACjD;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,IAAI,uDAAS;AACb;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;AACA;AACA;AACA;AACA;AACA;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;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;;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,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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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;;AAEA;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC,kDAAkD;AACnD;AACA;AACA;AACA;AACA;AACA,0DAA0D,iBAAiB;AAC3E;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,uBAAuB;AAC3C;AACA;AACA;AACA,4CAA4C,iCAAiC,EAAE;AAC/E;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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;;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,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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,kBAAkB;AACzC;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,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;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,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;AACA;AACA;AACA;AACA;AACA;AACA;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,qCAAqC;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,qCAAqC;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,mDAAmD,eAAe;AAClE;AACA;AACA;AACA;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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,oBAAoB;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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,oBAAoB;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,oCAAoC,oBAAoB;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;;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,uBAAuB,qBAAqB;AAC5C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,iCAAiC;AACxD;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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,MAAM;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,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;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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,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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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;AACA;AACA;AACA;AACA;AACA;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,kBAAkB;AAClE;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,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;AACA;AACA;AACA;AACA;AACA;AACA,oDAAoD;AACpD;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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,mBAAmB,mCAAmC;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,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;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;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,cAAc;AACrC;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,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,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,kCAAkC,+BAA+B;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;;AAEA;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;AACA,yBAAyB;AACzB,0CAA0C,EAAE;AAC5C;AACA;AACA,yBAAyB,wFAAwF,EAAE;AACnH;AACA;AACA;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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,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,oCAAoC,2BAA2B,OAAO;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;AACA;AACA;AACA;AACA;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,sDAAQ,6CAA6C,oBAAoB;AACnH;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B,QAAQ,gBAAgB;AACvD;AACA;AACA;AACA;AACA,6BAA6B,0BAA0B;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;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mCAAmC,+BAA+B;AAClE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc,mBAAmB;AACjC;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,yDAAyD,8BAA8B,EAAE;AACzF;AACA;AACA;AACA;AACA;AACA,qEAAqE,uCAAuC;AAC5G;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sEAAsE,+BAA+B;AACrG;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;;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;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uDAAuD,sCAAsC;AAC7F;AACA;AACA;AACA;AACA;AACA;AACA,sCAAsC,4CAA4C;AAClF;AACA;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,kDAAkD,2BAA2B;AAC7E;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;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,4CAA4C,wCAAwC;AACpF;AACA;AACA;AACA;AACA,cAAc,sCAAsC;AACpD;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,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,8CAA8C,uCAAuC;AACrF;AACA;AACA;AACA,kDAAkD,sCAAsC;AACxF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY,sCAAsC;AAClD;AACA,mDAAmD,6BAA6B;AAChF;AACA;AACA;AACA;AACA;AACA;AACA,oDAAoD,8BAA8B;AAClF,mEAAmE,gCAAgC;AACnG,sDAAsD,qBAAqB;AAC3E,0DAA0D,uBAAuB;AACjF;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI,uDAAS;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA,wBAAwB,gDAAgD;AACxE;AACA;AACA;AACA;AACA;AACA,YAAY,kBAAkB,mCAAmC,sBAAsB;AACvF;AACA,6DAA6D,2CAA2C,6CAA6C,EAAE,EAAE;AACzJ;AACA,2CAA2C,kBAAkB;AAC7D,+CAA+C,mBAAmB;AAClE;AACA,uDAAuD,2CAA2C,2CAA2C,EAAE,EAAE;AACjJ;AACA,8BAA8B,kCAAkC;AAChE;AACA;AACA,IAAI,uDAAS;AACb;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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;AACA;AACA;AACA,mCAAmC,qBAAqB;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,CAAC;AACD;AACA,wDAAwD,uBAAuB;AAC/E;AACA;AACA,gFAAgF;AAChF;AACA;AACA;AACA;AACA,IAAI,uDAAS;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+CAA+C,aAAa,EAAE;AAC9D;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,2BAA2B,yBAAyB;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,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,2BAA2B,yBAAyB;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,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;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;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;AACA;AACA;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;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,6DAA6D,wCAAwC;AACrG;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;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,qBAAqB,MAAM,IAAI;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mFAAmF,MAAM;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU,qCAAqC;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;AACA;AACA,2BAA2B,mBAAmB;AAC9C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,mBAAmB;AAC9C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kCAAkC,qBAAqB;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,4BAA4B;AAC5B,mBAAmB,yBAAyB;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,mBAAmB,uBAAuB;AAC1C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB,yBAAyB;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,mBAAmB,yBAAyB;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,mBAAmB,yBAAyB;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,mBAAmB,yBAAyB;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,mBAAmB,yBAAyB;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,mBAAmB,yBAAyB;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,mBAAmB,yBAAyB;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,mBAAmB,yBAAyB;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,mBAAmB,mBAAmB;AACtC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB,yBAAyB;AAC5C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6BAA6B,yCAAyC,EAAE;AACxE;AACA;AACA;AACA,IAAI,uDAAS;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+CAA+C,aAAa,EAAE;AAC9D;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA,IAAI,uDAAS;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;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;AACA;AACA,4DAA4D;AAC5D;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;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;AACA;AACA;AACA;AACA;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,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,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,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,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,4DAA4D;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB,iBAAiB;AACpC;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,uBAAuB,qBAAqB;AAC5C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wCAAwC,8BAA8B;AACtE;AACA;AACA;AACA,4DAA4D;AAC5D,8BAA8B,8BAA8B;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wCAAwC,8BAA8B;AACtE;AACA;AACA;AACA,4DAA4D;AAC5D,8BAA8B,8BAA8B;AAC5D,8BAA8B,8BAA8B;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wCAAwC,8BAA8B;AACtE;AACA;AACA;AACA,4DAA4D;AAC5D,8BAA8B,8BAA8B;AAC5D,8BAA8B,8BAA8B;AAC5D,8BAA8B,8BAA8B;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wCAAwC,8BAA8B;AACtE;AACA;AACA;AACA,4DAA4D;AAC5D,8BAA8B,8BAA8B;AAC5D,8BAA8B,8BAA8B;AAC5D,8BAA8B,8BAA8B;AAC5D,8BAA8B,8BAA8B;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wCAAwC,8BAA8B;AACtE;AACA;AACA;AACA,4DAA4D;AAC5D,gDAAgD,8BAA8B;AAC9E;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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,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;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,8CAA8C,6BAA6B;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,kDAAkD,0BAA0B;AAC5E;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;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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;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;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;AACA;AACA;AACA;AACA,0DAA0D,iCAAiC;AAC3F;AACA;AACA;AACA;AACA;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;;AAEA;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;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAE0vP;AAC1vP;;;;;;;;;;;;;AC/ykBA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AACA;AACA;AACA;AACA;;AAEiG;AACiK;AAC5N;AACD;AACe;;AAEpD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0BAA0B,iDAAiD,EAAE;AAC7E;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0BAA0B,iDAAiD,EAAE;AAC7E;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA,0BAA0B,mDAAmD,EAAE;AAC/E;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0BAA0B,mDAAmD,EAAE;AAC/E;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0BAA0B,oDAAoD,EAAE;AAChF;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA,0BAA0B,mDAAmD,EAAE;AAC/E;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,0BAA0B,kDAAkD,EAAE;AAC9E;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA,0BAA0B,oDAAoD,EAAE;AAChF;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA,0BAA0B,iDAAiD,EAAE;AAC7E;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA,0BAA0B,mDAAmD,EAAE;AAC/E;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0BAA0B,kDAAkD,EAAE;AAC9E;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA,0BAA0B,qDAAqD,EAAE;AACjF;AACA;AACA,KAAK;AACL;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,0BAA0B,aAAa,EAAE;AACzC;AACA;AACA,KAAK;AACL;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,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI,uDAAS;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0BAA0B,aAAa,EAAE;AACzC;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,0BAA0B,aAAa,EAAE;AACzC;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;AACA,kBAAkB,2EAA2E;AAC7F,IAAI;AACJ;AACA;AACA,eAAe;AACf;AACA;AACA;AACA;AACA;AACA,wBAAwB,4DAAc;AACtC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8BAA8B,4DAAc;AAC5C,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;AACA;AACA;AACA;AACA;AACA,mCAAmC,KAAK,MAAM;AAC9C;AACA;AACA;AACA;AACA;AACA;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;AACA;AACA,mCAAmC,KAAK,MAAM;AAC9C;AACA;AACA;AACA;AACA;AACA;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;AACA,mCAAmC,KAAK;AACxC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mDAAmD,mBAAmB;AACtE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mCAAmC,KAAK;AACxC;AACA;AACA;AACA;AACA;AACA;AACA,gDAAgD;AAChD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mCAAmC,KAAK;AACxC;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;AACA,mCAAmC,KAAK,YAAY;AACpD;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,mCAAmC,KAAK,YAAY;AACpD;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,mCAAmC,KAAK,UAAU;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,4BAA4B;AAC5B;AACA;AACA;AACA,iBAAiB,aAAa,oDAAoD;AAClF;AACA;AACA;AACA;AACA;AACA;AACA,mDAAmD,aAAa;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,mBAAmB,qDAAQ,mBAAmB,0DAAG;AACjD;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA,cAAc,gEAAU,MAAM,iDAAI;AAClC,UAAU,mEAAa;AACvB;AACA;AACA;AACA;AACA;AACA,wCAAwC,mBAAmB,EAAE;AAC7D;AACA;AACA,wCAAwC,mBAAmB,EAAE;AAC7D;AACA;AACA;AACA,gCAAgC,sDAAQ,GAAG;AAC3C,KAAK,IAAI;AACT;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B,4DAAc;;AAE1C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,gEAAU,cAAc,qCAAqC,EAAE;AAChF;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,6EAA6E,oBAAoB;AACjG,8EAA8E,qBAAqB;AACnG;AACA;AACA;AACA,mCAAmC,wDAAU;AAC7C,QAAQ,+DAAS;AACjB;AACA,mBAAmB,yEAAyE;AAC5F;AACA,SAAS;AACT,QAAQ,wDAAU,uBAAuB,uDAAS,EAAE,wDAAU;AAC9D;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,gEAAU,cAAc,6BAA6B,EAAE;AACxE;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,yEAAO,KAAK,yEAAO;AACvC;AACA;AACA;AACA;AACA;AACA;AACA,kCAAkC,4DAAc;AAChD;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,oEAAoE,wBAAwB;AAC5F;AACA;AACA;AACA;AACA;AACA,2BAA2B,wDAAU;AACrC,QAAQ,+DAAS;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA,SAAS;AACT,QAAQ,qDAAO,IAAI,8DAAQ,KAAK,qDAAO,IAAI,4DAAM;AACjD,QAAQ,wDAAU,uBAAuB,uDAAS,EAAE,wDAAU;AAC9D;AACA;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,iBAAiB,gEAAU,cAAc,4BAA4B,EAAE;AACvE;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,0CAA0C,4CAA4C;AACtF;AACA,qEAAqE,qBAAqB;AAC1F;AACA;AACA;AACA,0BAA0B,wDAAU;AACpC,QAAQ,+DAAS;AACjB;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA,SAAS;AACT,QAAQ,wDAAU,uBAAuB,uDAAS,EAAE,wDAAU;AAC9D;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI,uDAAS;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,0BAA0B,wBAAwB,EAAE;AACpD;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0BAA0B,wBAAwB,EAAE;AACpD;AACA;AACA,KAAK;AACL;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,gEAAU,cAAc,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,2BAA2B,wDAAU;AACrC,QAAQ,gEAAU;AAClB;AACA;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,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,IAAI,wDAAU;AACd,QAAQ,2DAAK;AACb,QAAQ,wDAAU;AAClB;AACA,IAAI,wDAAU;AACd,QAAQ,2DAAK;AACb,QAAQ,wDAAU;AAClB;AACA,IAAI,wDAAU;AACd,QAAQ,2DAAK;AACb,QAAQ,wDAAU;AAClB;AACA,gCAAgC,wDAAU;AAC1C,QAAQ,+DAAS;AACjB;AACA,mBAAmB,oDAAoD;AACvE;AACA,SAAS;AACT,QAAQ,wDAAU,uBAAuB,uDAAS,EAAE,wDAAU;AAC9D,kCAAkC,sDAAQ;AAC1C;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,gEAAU,cAAc,2BAA2B,EAAE;AACtE;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,0CAA0C,4CAA4C;AACtF;AACA,oEAAoE,qBAAqB;AACzF;AACA;AACA;AACA,yBAAyB,wDAAU;AACnC,QAAQ,+DAAS;AACjB;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA,SAAS;AACT,QAAQ,wDAAU,uBAAuB,uDAAS,EAAE,wDAAU;AAC9D;AACA;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,iBAAiB,gEAAU,cAAc,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;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,sCAAsC;AACtC,sCAAsC;AACtC,4BAA4B,6DAAe;AAC3C;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,wEAAwE,uCAAuC;AAC/G;AACA;AACA;AACA;AACA,0BAA0B,sDAAQ,qDAAqD,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,IAAI,wDAAU;AACd,QAAQ,2DAAK;AACb,QAAQ,wDAAU;AAClB,QAAQ,wDAAU;AAClB;AACA,iCAAiC,wDAAU;AAC3C,QAAQ,+DAAS;AACjB;AACA,mBAAmB,uEAAuE;AAC1F;AACA,SAAS;AACT,QAAQ,wDAAU,uBAAuB,uDAAS,EAAE,wDAAU;AAC9D;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,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,IAAI,wDAAU;AACd,QAAQ,2DAAK;AACb,QAAQ,wDAAU;AAClB,QAAQ,wDAAU;AAClB;AACA,IAAI,wDAAU;AACd,QAAQ,2DAAK;AACb,QAAQ,wDAAU;AAClB,QAAQ,wDAAU;AAClB;AACA,qBAAqB,wDAAU;AAC/B,QAAQ,+DAAS,EAAE,qBAAqB;AACxC,QAAQ,qDAAO,IAAI,8DAAQ,KAAK,qDAAO,IAAI,0DAAI;AAC/C,QAAQ,wDAAU,uBAAuB,wDAAU,EAAE,uDAAS;AAC9D;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,gEAAU,cAAc,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;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sCAAsC;AACtC,sCAAsC;AACtC,4BAA4B,6DAAe;AAC3C;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;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,0BAA0B,sDAAQ,qDAAqD,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,IAAI,wDAAU;AACd,QAAQ,2DAAK;AACb,QAAQ,wDAAU;AAClB,QAAQ,wDAAU;AAClB;AACA,yCAAyC,wDAAU;AACnD,QAAQ,+DAAS;AACjB;AACA,mBAAmB,iEAAiE;AACpF;AACA,SAAS;AACT,QAAQ,wDAAU,uBAAuB,uDAAS,EAAE,wDAAU;AAC9D;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,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,IAAI,wDAAU;AACd,QAAQ,2DAAK;AACb,QAAQ,wDAAU;AAClB,QAAQ,wDAAU;AAClB;AACA,IAAI,wDAAU;AACd,QAAQ,2DAAK;AACb,QAAQ,wDAAU;AAClB,QAAQ,wDAAU;AAClB;AACA,6BAA6B,wDAAU;AACvC,QAAQ,+DAAS,EAAE,qBAAqB;AACxC,QAAQ,qDAAO,IAAI,8DAAQ,KAAK,qDAAO,IAAI,0DAAI;AAC/C,QAAQ,wDAAU,uBAAuB,wDAAU,EAAE,uDAAS;AAC9D;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,sDAAQ;AACnB;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,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,YAAY,qEAAe;AAC3B;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,SAAS,+DAAS;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI,uDAAS;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,0BAA0B,8CAA8C,EAAE;AAC1E;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,0BAA0B,6CAA6C,EAAE;AACzE;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,0BAA0B,yDAAyD,EAAE;AACrF;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,0BAA0B,4CAA4C,EAAE;AACxE;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,KAAK;AACL;AACA,yEAAyE;AACzE;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,IAAI,uDAAS;AACb;AACA;AACA;AACA,sBAAsB,wDAAU;AAChC,QAAQ,+DAAS,EAAE,mFAAmF;AACtG,QAAQ,qDAAO,IAAI,0DAAI;AACvB,QAAQ,wDAAU;AAClB;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI,uDAAS;AACb;AACA;AACA;AACA,2BAA2B,wDAAU;AACrC,QAAQ,+DAAS;AACjB;AACA;AACA,SAAS;AACT,QAAQ,qDAAO,IAAI,0DAAI;AACvB,QAAQ,wDAAU;AAClB;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,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,gDAAgD;AAChD;AACA;AACA;AACA;AACA,6EAA6E;AAC7E;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;AACA;AACA;AACA;AACA;AACA,0BAA0B,8BAA8B,EAAE;AAC1D;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0BAA0B,gCAAgC,EAAE;AAC5D;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0BAA0B,+BAA+B,EAAE;AAC3D;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0BAA0B,iCAAiC,EAAE;AAC7D;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0BAA0B,iCAAiC,EAAE;AAC7D;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,qFAAqF;AACrF;AACA;AACA,0BAA0B,uBAAuB,EAAE;AACnD;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0BAA0B,sBAAsB,EAAE;AAClD;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,6DAA6D,uBAAuB;AACpF;AACA;AACA;AACA,kEAAkE,4BAA4B;AAC9F;AACA;AACA,gDAAgD;AAChD;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,8BAA8B,WAAW;AACzC;AACA;AACA,+CAA+C,0BAA0B,iBAAiB,EAAE,EAAE;AAC9F;AACA;AACA;AACA;AACA;AACA;AACA,+CAA+C;AAC/C;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,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,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,8BAA8B,WAAW;AACzC;AACA;AACA,+CAA+C,iBAAiB,sDAAQ,GAAG,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,8BAA8B,WAAW;AACzC;AACA,+CAA+C,gBAAgB,sDAAQ,GAAG,SAAS,iBAAiB,GAAG,EAAE;AACzG,qCAAqC,4CAA4C;AACjF;AACA,4DAA4D,wBAAwB,EAAE;AACtF;AACA;AACA;AACA;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,8BAA8B,WAAW;AACzC;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,QAAQ;AACR;AACA;AACA,qCAAqC,kBAAkB;AACvD;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8BAA8B,WAAW;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uCAAuC;AACvC;AACA;AACA;AACA,4CAA4C;AAC5C;AACA,qDAAqD,+BAA+B;AACpF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qEAAqE,yCAAyC;AAC9G;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,gCAAgC,0DAAY;AAC5C,iCAAiC,0DAAY;AAC7C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qDAAqD,kCAAkC,EAAE;AACzF;AACA;AACA;AACA,qDAAqD,sBAAsB,EAAE;AAC7E;AACA;AACA;AACA,qDAAqD,wBAAwB,EAAE;AAC/E;AACA;AACA;AACA,8BAA8B,WAAW;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8BAA8B,WAAW;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2EAA2E,+BAA+B;AAC1G;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,8BAA8B;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA,oCAAoC,+BAA+B;AACnE,8BAA8B;AAC9B,+BAA+B;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA,8BAA8B;AAC9B,+BAA+B;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wCAAwC,mBAAmB;AAC3D;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wCAAwC,qBAAqB;AAC7D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8BAA8B;AAC9B;AACA;AACA;AACA,8BAA8B;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8BAA8B;AAC9B,+BAA+B;AAC/B;AACA,kBAAkB,gCAAgC;AAClD;AACA,8BAA8B;AAC9B,+BAA+B;AAC/B;AACA;AACA;AACA,IAAI,uDAAS;AACb;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,oDAAoD;AACpD,8BAA8B;AAC9B;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,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,mCAAmC,kBAAkB;AACrD,iCAAiC,cAAc;AAC/C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sDAAsD;AACtD;AACA;AACA;AACA,+DAA+D,cAAc;AAC7E;AACA;AACA;AACA,8DAA8D,sBAAsB;AACpF;AACA;AACA;AACA;AACA;AACA,4DAA4D,yBAAyB;AACrF;AACA;AACA;AACA;AACA;AACA;AACA,gDAAgD;AAChD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yDAAyD;AACzD;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,sEAAsE;AAC7E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI,GAAG,mBAAmB;AAC1B;AACA;AACA;AACA,IAAI,uDAAS;AACb;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,YAAY,sCAAsC;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,yEAAyE,EAAE;AAC3E;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA,+BAA+B,OAAO;AACtC;AACA,sBAAsB,6BAA6B;AACnD,+BAA+B,OAAO;AACtC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oDAAoD;AACpD,8BAA8B;AAC9B;AACA;AACA;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;AACA,QAAQ;AACR,+BAA+B,OAAO;AACtC;AACA,wBAAwB,eAAe;AACvC,+BAA+B,OAAO;AACtC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oDAAoD;AACpD,8BAA8B;AAC9B;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;AACA;AACA;AACA;AACA;AACA,oDAAoD;AACpD,8BAA8B;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA,+BAA+B,MAAM;AACrC;AACA,mBAAmB,mCAAmC;AACtD;AACA,+BAA+B,MAAM;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA,iBAAiB,8BAA8B;AAC/C;AACA,QAAQ;AACR;AACA,oCAAoC,MAAM;AAC1C,kDAAkD;AAClD;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,sCAAsC;AACtC;AACA;AACA,SAAS;AACT;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,yDAAyD,iCAAiC,EAAE;AAC5F;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,oDAAoD,kCAAkC;AACtF;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA,sCAAsC;AACtC;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA,qDAAqD,8BAA8B,EAAE;AACrF;AACA;AACA;AACA;AACA;AACA;AACA,0BAA0B,sDAAQ,6CAA6C,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,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,0BAA0B;AAC1B,2BAA2B;AAC3B;AACA;AACA;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;AACA;AACA,OAAO,iBAAiB;AACxB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI,uDAAS;AACb;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,+CAA+C,6BAA6B;AAC5E;AACA;AACA;AACA;AACA;AACA;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,0EAA0E,EAAE;AAC5E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0BAA0B,6BAA6B,EAAE;AACzD;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8BAA8B;AAC9B;AACA;AACA,8BAA8B;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oDAAoD;AACpD,8BAA8B;AAC9B;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;AACA,8BAA8B;AAC9B;AACA;AACA,8BAA8B;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oDAAoD;AACpD,8BAA8B;AAC9B;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;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,oDAAoD;AACpD,8BAA8B;AAC9B;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,SAAS;AACT;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA,yCAAyC,iBAAiB;AAC1D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yDAAyD,oBAAoB,EAAE;AAC/E;AACA;AACA;AACA;AACA;AACA,qDAAqD,0CAA0C,EAAE;AACjG,yCAAyC,sBAAsB,EAAE;AACjE;AACA;AACA;AACA,sDAAsD,8CAA8C,EAAE;AACtG;AACA;AACA;AACA;AACA,+CAA+C,wCAAwC,EAAE;AACzF;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA,0BAA0B,sDAAQ,gCAAgC,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,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,gEAAU,cAAc,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,IAAI,uDAAS;AACb;AACA;AACA;AACA;AACA,6BAA6B,0DAAY;AACzC;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;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,IAAI,wDAAU;AACd,QAAQ,2DAAK;AACb,QAAQ,wDAAU;AAClB;AACA,aAAa,wDAAU;AACvB,QAAQ,+DAAS;AACjB;AACA;AACA,mBAAmB,yDAAyD;AAC5E;AACA;AACA,SAAS;AACT,QAAQ,qDAAO,IAAI,8DAAQ,KAAK,qDAAO,IAAI,0DAAI,KAAK,qDAAO,IAAI,4DAAM;AACrE,QAAQ,qDAAO,IAAI,8DAAQ,KAAK,qDAAO,IAAI,0DAAI,KAAK,qDAAO,IAAI,4DAAM;AACrE,QAAQ,wDAAU;AAClB;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,iBAAiB,gEAAU,cAAc,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,IAAI,uDAAS;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI,wDAAU;AACd,QAAQ,2DAAK;AACb,QAAQ,wDAAU;AAClB;AACA,oCAAoC,wDAAU;AAC9C,QAAQ,+DAAS,EAAE,wFAAwF;AAC3G,QAAQ,qDAAO,IAAI,0DAAI,KAAK,qDAAO,IAAI,8DAAQ;AAC/C,QAAQ,qDAAO,IAAI,8DAAQ,KAAK,qDAAO,IAAI,0DAAI,KAAK,qDAAO,IAAI,4DAAM;AACrE,QAAQ,qDAAO,IAAI,8DAAQ,KAAK,qDAAO,IAAI,0DAAI,KAAK,qDAAO,IAAI,4DAAM;AACrE,QAAQ,wDAAU;AAClB;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,gEAAU,cAAc,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,IAAI,uDAAS;AACb;AACA;AACA;AACA;AACA;AACA,2BAA2B,0DAAY;AACvC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iDAAiD,8DAA8D;AAC/G;AACA;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DAAO,IAAI,4DAAM;AACrE,QAAQ,wDAAU;AAClB;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6CAA6C,4DAAc;AAC3D;AACA;AACA,iBAAiB,gEAAU,cAAc,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,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,qCAAqC,sCAAsC;AAC3E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI,uDAAS;AACb;AACA;AACA;AACA;AACA,2BAA2B,0DAAY;AACvC;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;AAC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;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,gEAAU,cAAc,sBAAsB,EAAE;AACjE;AACA;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,IAAI,uDAAS;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI,wDAAU;AACd,QAAQ,2DAAK;AACb,QAAQ,wDAAU;AAClB;AACA,oBAAoB,wDAAU;AAC9B,QAAQ,+DAAS,EAAE,kEAAkE;AACrF,QAAQ,qDAAO,IAAI,8DAAQ,KAAK,qDAAO,IAAI,0DAAI,KAAK,qDAAO,IAAI,8DAAQ;AACvE,QAAQ,qDAAO,IAAI,8DAAQ,KAAK,qDAAO,IAAI,0DAAI,KAAK,qDAAO,IAAI,4DAAM;AACrE,QAAQ,qDAAO,IAAI,8DAAQ,KAAK,qDAAO,IAAI,0DAAI,KAAK,qDAAO,IAAI,4DAAM;AACrE,QAAQ,wDAAU;AAClB;AACA;AACA,CAAC;AACD;AACA;AACA,iBAAiB,gEAAU,cAAc,sBAAsB,EAAE;AACjE;AACA;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,IAAI,uDAAS;AACb;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,IAAI,wDAAU;AACd,QAAQ,2DAAK;AACb,QAAQ,wDAAU;AAClB;AACA,oBAAoB,wDAAU;AAC9B,QAAQ,+DAAS,EAAE,kEAAkE;AACrF,QAAQ,qDAAO,IAAI,8DAAQ,KAAK,qDAAO,IAAI,0DAAI,KAAK,qDAAO,IAAI,8DAAQ;AACvE,QAAQ,qDAAO,IAAI,8DAAQ,KAAK,qDAAO,IAAI,0DAAI,KAAK,qDAAO,IAAI,4DAAM;AACrE,QAAQ,qDAAO,IAAI,8DAAQ,KAAK,qDAAO,IAAI,0DAAI,KAAK,qDAAO,IAAI,4DAAM;AACrE,QAAQ,wDAAU;AAClB;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,gEAAU,cAAc,wBAAwB,EAAE;AACnE;AACA;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,qCAAqC,sCAAsC;AAC3E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI,uDAAS;AACb;AACA;AACA;AACA;AACA;AACA,2BAA2B,0DAAY;AACvC;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,6CAA6C,EAAE;AACzE;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,IAAI,wDAAU;AACd,QAAQ,2DAAK;AACb,QAAQ,wDAAU;AAClB;AACA,IAAI,wDAAU;AACd,QAAQ,2DAAK;AACb,QAAQ,wDAAU;AAClB,QAAQ,wDAAU;AAClB;AACA,IAAI,wDAAU;AACd,QAAQ,2DAAK;AACb,QAAQ,wDAAU;AAClB;AACA,IA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;AACA;AACA;AACA,gCAAgC,wDAAU;AAC1C,QAAQ,+DAAS;AACjB;AACA;AACA,mBAAmB;AACnB,SAAS;AACT;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA,iBAAiB,gEAAU,cAAc,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;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,wEAAwE,qBAAqB;AAC7F,IAAI,wDAAU;AACd,QAAQ,2DAAK;AACb,QAAQ,wDAAU;AAClB,QAAQ,wDAAU;AAClB;AACA,qBAAqB,wDAAU;AAC/B,QAAQ,+DAAS;AACjB;AACA;AACA,SAAS;AACT;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA,iBAAiB,gEAAU,cAAc,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,IAAI,wDAAU;AACd,QAAQ,2DAAK;AACb,QAAQ,wDAAU;AAClB;AACA,yBAAyB,wDAAU;AACnC,QAAQ,+DAAS;AACjB;AACA;AACA,mBAAmB;AACnB,SAAS;AACT;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA,iBAAiB,gEAAU,cAAc,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,IAAI,wDAAU;AACd,QAAQ,2DAAK;AACb,QAAQ,wDAAU;AAClB;AACA,yBAAyB,wDAAU;AACnC,QAAQ,+DAAS;AACjB;AACA;AACA,mBAAmB;AACnB,SAAS;AACT;AACA;AACA,CAAC;AACD;AACA;AACA,iBAAiB,gEAAU,cAAc,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;AACA;AACA;AACA,8DAA8D,iCAAiC;AAC/F,0EAA0E,qBAAqB;AAC/F,+DAA+D,oDAAoD;AACnH,IAAI,wDAAU;AACd,QAAQ,2DAAK;AACb,QAAQ,wDAAU;AAClB;AACA,uBAAuB,wDAAU;AACjC,QAAQ,+DAAS;AACjB;AACA;AACA,mBAAmB;AACnB,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,+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,wDAAwD,gCAAgC,EAAE;AAC1F;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,kBAAkB,wDAAU;AAC5B,QAAQ,gEAAU;AAClB;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB,qDAAO;;AAEzB;AACA;AACA;AACA;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,wDAAU;AAC7B,QAAQ,+DAAS;AACjB;AACA,mBAAmB,mBAAmB;AACtC,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,gCAAgC,wDAAU;AAC1C,QAAQ,8DAAQ;AAChB;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,kBAAkB,wDAAU;AAC5B,QAAQ,8DAAQ;AAChB;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,iBAAiB;AACjB;AACA;AACA;AACA,kDAAkD,wDAAU;AAC5D,QAAQ,8DAAQ;AAChB;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEimF;AACjmF;;;;;;;;;;;;;ACpiLA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AACA;AACA;AACA;AACA;;AAEyd;AACmX;AACpxB;AACD;AAC0B;;AAEjF;AACA;AACA;AACA;AACA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,CAAC,0DAAY;AAC5D,KAAK,UAAU,8DAAgB,cAAc,eAAe;AAC5D,KAAK,UAAU,6DAAe,uCAAuC,8DAAgB,GAAG;AACxF;;AAEA;AACA,IAAI,uDAAS;AACb;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,yBAAyB,wDAAU;AACnC,QAAQ,gEAAU;AAClB;AACA;AACA,CAAC,CAAC,gEAAc;;AAEhB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI,8FAAoC;AACxC;AACA,iBAAiB,8DAAgB;AACjC,mBAAmB,cAAc,UAAU,gEAAc,0CAA0C,GAAG;AACtG;AACA,KAAK;AACL,KAAK,UAAU,yDAAW,YAAY,oEAAoB,EAAE;AAC5D;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI,uDAAS;AACb;AACA;AACA,uBAAuB,qDAAO;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC,CAAC,gEAAc;;AAEhB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB,qDAAO;;AAEzB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gCAAgC,UAAU,gEAAc,4CAA4C;AACpG,6BAA6B,2EAAqB;;AAElD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAE2Y;AAC3Y;;;;;;;;;;;;;ACndA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AACA;AACA;AACA;AACA;;AAEuF;AAC+C;AAC4Z;;AAEliB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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,+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,IAAI,uDAAS;AACb;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,IAAI,qDAAO;AACX,mBAAmB,qDAAO;AAC1B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI,uDAAS;AACb;AACA;AACA;AACA,iEAAiE,0CAA0C;AAC3G,iDAAiD,4CAA4C;AAC7F,wEAAwE,wBAAwB;AAChG,0EAA0E,kBAAkB;AAC5F,mEAAmE,iBAAiB;AACpF;AACA;AACA,wCAAwC,sDAAQ;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,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,+DAA+D,aAAa;AAC5E,6DAA6D,QAAQ,yEAAiB,wBAAwB;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,iBAAiB,wDAAQ;;AAEzB;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,IAAI,uDAAS;AACb;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,8BAA8B,wDAAU;AACxC,QAAQ,gEAAU;AAClB,QAAQ,qDAAO,IAAI,4DAAM;AACzB,QAAQ,wDAAU;AAClB;AACA;AACA,CAAC,CAAC,gEAAgB;;AAElB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB,4DAAc;AACtC;AACA;AACA;AACA;AACA,qBAAqB,mEAAqB;AAC1C;AACA;AACA,yCAAyC,+DAA+D,EAAE;AAC1G,wCAAwC,uBAAuB,EAAE;AACjE,SAAS;AACT;AACA;AACA;AACA;AACA,iBAAiB,6DAAe;AAChC;AACA,0CAA0C,sDAAQ;AAClD;AACA,KAAK;AACL;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8CAA8C,CAAC,0EAAoB,8BAA8B;AACjG;AACA,QAAQ,qDAAO;AACf,6CAA6C,wBAAwB;AACrE;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ,qDAAO,8CAA8C,uCAAuC;AACpG,QAAQ,qDAAO,6CAA6C,sCAAsC;AAClG;AACA,gCAAgC,qDAAO;AACvC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA,aAAa,qDAAO;AACpB,YAAY,qDAAO;AACnB;AACA,QAAQ,qDAAO;AACf;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,iBAAiB,qDAAO,SAAS,qDAAO;AACxC;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sBAAsB,4DAAc;AACpC,cAAc,oDAAM;AACpB;AACA;AACA;AACA;AACA,cAAc,mBAAmB;AACjC;AACA;AACA;AACA;AACA,WAAW,kEAAY;AACvB;AACA;AACA;AACA,yCAAyC,sDAAQ,GAAG;AACpD,wBAAwB,6BAA6B;AACrD;AACA;AACA,6CAA6C,uCAAuC,EAAE,IAAI;AAC1F;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,6DAAe;AAChC;AACA;AACA,aAAa,0DAAY,MAAM,sDAAQ;AACvC;AACA;AACA,KAAK;AACL;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gCAAgC,4DAAc;AAC9C;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kDAAkD,mBAAmB;AACrE;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,oBAAoB;AAC3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB,wDAAU;AAC7B,QAAQ,gEAAU;AAClB,QAAQ,qDAAO,IAAI,4DAAM;AACzB,QAAQ,wDAAU,8BAA8B,oDAAM;AACtD;AACA;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,uBAAuB,wDAAU;AACjC,QAAQ,gEAAU;AAClB;AACA;AACA,CAAC;AACD;AACA,IAAI,uDAAS;AACb;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,0BAA0B,wDAAU;AACpC,QAAQ,gEAAU;AAClB,QAAQ,qDAAO,IAAI,4DAAM;AACzB,QAAQ,wDAAU;AAClB;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,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,iBAAiB,+DAAiB;AAClC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,+DAAiB;AAClC,iBAAiB,+DAAiB;AAClC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uDAAuD;AACvD,qDAAqD;AACrD,0BAA0B,wDAAU;AACpC,QAAQ,gEAAU;AAClB,QAAQ,wDAAU;AAClB;AACA;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,oBAAoB,iEAAmB;AACvC,0DAA0D,iEAAmB;AAC7E;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,iEAAmB;AACvC;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,IAAI,uDAAS;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kFAAkF,sEAAsE;AACxJ;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA,IAAI,uDAAS;AACb;AACA;AACA;AACA;AACA;AACA,wCAAwC,+DAAiB;AACzD,oDAAoD,eAAe;AACnE;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,IAAI,uDAAS;AACb;AACA;AACA;AACA,4BAA4B,wEAAgB;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,+DAA+D,aAAa;AAC5E;AACA;AACA;AACA;AACA;AACA;AACA,8BAA8B,oDAAM;AACpC;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,sBAAsB,wDAAU;AAChC,QAAQ,gEAAU;AAClB,QAAQ,qDAAO,IAAI,4DAAM;AACzB,QAAQ,qDAAO,IAAI,8DAAQ,KAAK,qDAAO,IAAI,4DAAM,CAAC,yDAAW;AAC7D,QAAQ,wDAAU,+BAA+B,oDAAM;AACvD;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,gCAAgC,4DAAc;AAC9C,uCAAuC,mBAAmB;AAC1D,wBAAwB,4DAAc;AACtC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,WAAW,iBAAiB;AACzC;AACA;AACA;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,0BAA0B,wDAAU;AACpC,QAAQ,gEAAU;AAClB;AACA;AACA,CAAC;AACD;AACA,IAAI,uDAAS;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,4CAA4C,6BAA6B;AACzE;AACA;AACA;AACA;AACA;AACA,gDAAgD;AAChD;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA,4CAA4C;AAC5C,aAAa;AACb;AACA;AACA;AACA,gCAAgC,gBAAgB;AAChD;AACA;AACA;AACA;AACA;AACA,6CAA6C,mBAAmB,EAAE;AAClE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA,yEAAyE,oDAAoD;AAC7H,2BAA2B,wDAAU;AACrC,QAAQ,gEAAU;AAClB,QAAQ,qDAAO,IAAI,4DAAM;AACzB,QAAQ,qDAAO,IAAI,4DAAM;AACzB,QAAQ,qDAAO,IAAI,8DAAQ,KAAK,qDAAO,IAAI,4DAAM;AACjD,QAAQ,wDAAU,oDAAoD,sDAAQ;AAC9E;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6BAA6B,qBAAqB,EAAE,2BAA2B,sBAAsB,EAAE,2BAA2B,sBAAsB,EAAE,yBAAyB,uBAAuB;AAC1M;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI,uDAAS;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+DAA+D,4DAA4D;AAC3H;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,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;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6CAA6C,uBAAuB,EAAE;AACtE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0CAA0C,wDAAU;AACpD,QAAQ,gEAAU;AAClB,QAAQ,qDAAO,IAAI,4DAAM;AACzB,QAAQ,wDAAU;AAClB;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,CAAC;AACD;AACA,IAAI,uDAAS;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,6DAAe;AAChC;AACA,iBAAiB,6DAAe;AAChC;AACA;AACA;AACA,uBAAuB,oEAAc;AACrC,iBAAiB,6DAAe;AAChC;AACA;AACA;AACA,uBAAuB,qEAAe;AACtC,iBAAiB,6DAAe;AAChC;AACA;AACA;AACA;AACA,iBAAiB,6DAAe;AAChC;AACA;AACA;AACA;AACA;AACA,uBAAuB,mEAAa;AACpC,iBAAiB,6DAAe;AAChC;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,uBAAuB,wDAAU;AACjC,QAAQ,gEAAU;AAClB,QAAQ,qDAAO,IAAI,4DAAM;AACzB,QAAQ,wDAAU;AAClB;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA,IAAI,uDAAS;AACb;AACA;AACA;AACA,sDAAsD,eAAe;AACrE;AACA,CAAC;AACD;AACA,IAAI,uDAAS;AACb;AACA;AACA;AACA,uDAAuD,gBAAgB;AACvE;AACA,CAAC;AACD;AACA,IAAI,uDAAS;AACb;AACA;AACA;AACA,wDAAwD,iBAAiB;AACzE;AACA,CAAC;AACD;AACA,IAAI,uDAAS;AACb;AACA;AACA;AACA,qDAAqD,cAAc;AACnE;AACA,CAAC;AACD;AACA,IAAI,uDAAS;AACb;AACA;AACA;AACA,6DAA6D,sBAAsB;AACnF;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK,UAAU,yDAAW,YAAY,oEAAoB,EAAE;AAC5D,KAAK,UAAU,kEAAoB,yCAAyC;AAC5E,KAAK,UAAU,gEAAgB,yDAAyD;AACxF,KAAK,uDAAuD;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK,UAAU,uDAAS,6BAA6B;AACrD,KAAK,wEAAwE;AAC7E;AACA,sBAAsB,2EAAqB,CAAC,0DAAY;AACxD;AACA;AACA;AACA;AACA;AACA,eAAe,0DAAY;AAC3B;AACA;AACA;AACA;AACA;AACA;AACA,KAAK,UAAU,uDAAS,kBAAkB;AAC1C,KAAK,UAAU,0DAAY,sCAAsC;AACjE;AACA;AACA;AACA;AACA,2BAA2B,oDAAM,EAAE,yDAAW;AAC9C,KAAK;AACL,KAAK,6FAA6F;AAClG;AACA;AACA;AACA;AACA,kDAAkD,sDAAQ,OAAO,sDAAQ;AACzE,KAAK;AACL,KAAK,0EAA0E;AAC/E;AACA;AACA;AACA;AACA,KAAK;AACL,KAAK,UAAU,8DAAgB,oCAAoC;AACnE,KAAK,8DAA8D;AACnE,KAAK,kFAAkF;AACvF,KAAK,UAAU,yDAAW,YAAY,yDAAW,SAAS,oDAAM,GAAG;AACnE,KAAK,8EAA8E,oDAAM,GAAG;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,iBAAiB,UAAU,oDAAM,0BAA0B;AAC3D,iBAAiB,sCAAsC,oDAAM,EAAE;AAC/D;AACA;AACA;AACA;AACA;AACA,sCAAsC,wDAAU;AAChD,QAAQ,8DAAQ,EAAE,gDAAgD,4DAAY,EAAE,+DAAiB,GAAG;AACpG,QAAQ,qDAAO,IAAI,8DAAQ,KAAK,qDAAO,IAAI,8DAAQ,KAAK,qDAAO,IAAI,4DAAM;AACzE,QAAQ,wDAAU;AAClB;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA,oBAAoB,4DAAM;AAC1B;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,kDAAkD;AAC1G;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,2BAA2B,sEAAgB,EAAE,uDAAuD;AACpG,WAAW,wDAAU;AACrB,QAAQ,gEAAU,EAAE,uDAAuD;AAC3E,QAAQ,qDAAO,IAAI,4DAAM;AACzB,QAAQ,wDAAU;AAClB;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA,qBAAqB,4DAAM;AAC3B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4CAA4C,qCAAqC;AACjF;AACA;AACA;AACA;AACA,oDAAoD,wCAAwC;AAC5F,4BAA4B,sEAAgB,EAAE,yDAAyD;AACvG,YAAY,wDAAU;AACtB,QAAQ,gEAAU,EAAE,wDAAwD;AAC5E,QAAQ,qDAAO,IAAI,4DAAM;AACzB,QAAQ,wDAAU;AAClB;AACA;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,uCAAuC,4DAAc;AACrD;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;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,yDAAyD,yBAAyB;AAClF;AACA;AACA;AACA,qDAAqD,wBAAwB;AAC7E;AACA;AACA;AACA,qDAAqD,uCAAuC;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,sCAAsC,wDAAU;AAChD,QAAQ,gEAAU;AAClB;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,iCAAiC,wDAAU;AAC3C,QAAQ,8DAAQ;AAChB,yBAAyB,2EAA2E,oDAAM,GAAG;AAC7G,SAAS;AACT;AACA;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;AACA,QAAQ;AACR;AACA,0BAA0B,iCAAiC,aAAa,GAAG;AAC3E;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA,wCAAwC,yDAAyD;AACjG;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB,qDAAO;;AAEzB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEmjE;AACnjE;;;;;;;;;;;;;AC/7EA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AACA;AACA;AACA;AACA;;AAEiG;AACkd;AACje;AAC6C;AACmD;AAC9H;;AAEpD;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;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI,uDAAS;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2C;AACA;AACA,yCAAyC;AACzC,uC;AACA;AACA,6BAA6B;AAC7B;AACA;AACA;AACA;AACA;AACA;AACA,sDAAsD,wEAAwE;AAC9H;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI,uDAAS;AACb;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,IAAI,uDAAS;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uDAAuD,yEAAyE;AAChI;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI,uDAAS;AACb;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,IAAI,uDAAS;AACb;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,IAAI,uDAAS;AACb;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,IAAI,uDAAS;AACb;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,IAAI,uDAAS;AACb;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,IAAI,uDAAS;AACb;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,2DAA2D,8DAA8D;AACzH;AACA,CAAC;AACD;AACA;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;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;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;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,KAAK,+CAA+C;AACpD;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,wDAAU;AACrC,QAAQ,+DAAS,EAAE,8CAA8C;AACjE;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;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;AACA;AACA;AACA,uBAAuB,sDAAQ,GAAG,MAAM,qBAAqB,IAAI,sDAAQ,GAAG;AAC5E;AACA;AACA;AACA;AACA;;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,+CAAE,GAAG;AACpB;AACA;AACA;AACA;AACA;AACA,mCAAmC,0DAAG,eAAe,mBAAmB,EAAE;AAC1E;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,WAAW,uCAAE,6CAA6C,gEAAS,IAAI,2DAAI,IAAI,0DAAG,cAAc,YAAY,EAAE;AAC9G;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B,+DAAQ,IAAI,4DAAK,oBAAoB,wBAAwB,EAAE;AAC3F;AACA;AACA,QAAQ,mEAAa;AACrB;AACA;AACA,QAAQ,gEAAU;AAClB;AACA;AACA;AACA,eAAe,iDAAI;AACnB;AACA,WAAW,+CAAE;AACb;;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;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;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;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,KAAK;AACL;AACA,8CAA8C,2CAA2C;AACzF;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2CAA2C,yBAAyB,EAAE;AACtE;AACA;AACA,yDAAyD,kCAAkC;AAC3F;AACA;AACA,0BAA0B,0CAA0C,EAAE;AACtE;AACA;AACA,KAAK;AACL;AACA,sDAAsD,6BAA6B;AACnF;AACA,CAAC;AACD;AACA;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;AACA;AACA,SAAS;AACT;AACA;AACA,KAAK;AACL;AACA,iDAAiD,4BAA4B;AAC7E;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,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;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,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,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA,eAAe,+CAAU,iBAAiB,6CAA6C,EAAE;AACzF;AACA;AACA,eAAe,+CAAU,iBAAiB,iDAAiD,EAAE;AAC7F;AACA;AACA,eAAe,+CAAU,iBAAiB,iHAAiH,EAAE;AAC7J;AACA;AACA,eAAe,+CAAU,iBAAiB,iJAAiJ,EAAE;AAC7L;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2CAA2C,yDAAW;AACtD;AACA;AACA;AACA;AACA,uCAAuC,0DAAG,8BAA8B,iGAAiG,EAAE;AAC3K,8BAA8B,iEAAU;AACxC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA,qCAAqC,0DAAG;AACxC;AACA,SAAS;AACT,4BAA4B,iEAAU;AACtC;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4CAA4C;AAC5C;AACA;AACA;AACA;AACA;AACA;AACA,sBAAsB,0DAAG,sBAAsB,0CAA0C,EAAE;AAC3F;AACA;AACA;AACA;AACA;AACA;AACA,gFAAgF,uEAAuE,EAAE;AACzJ;AACA;AACA;AACA,eAAe,uCAAE,eAAe,sDAAQ,eAAe,0DAAG;AAC1D;AACA,kCAAkC,iEAAU;AAC5C;AACA;AACA;AACA,2BAA2B,+CAAE;AAC7B;AACA;AACA,aAAa;AACb,SAAS,GAAG,gEAAS,IAAI,4DAAK,eAAe,YAAY,EAAE,GAAG,iEAAU;AACxE,6BAA6B,+CAAU;AACvC;AACA,2BAA2B,+CAAE,2BAA2B;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,yEAAyE;AACzE;AACA;AACA;AACA,4DAA4D,+DAAQ;AACpE,2DAA2D;AAC3D;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4DAA4D,+DAAQ;AACpE;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA,0BAA0B,0DAAG;AAC7B;AACA,2DAA2D;AAC3D,iBAAiB;AACjB;AACA,mBAAmB,+CAAE,iCAAiC;AACtD;AACA;AACA;AACA;AACA;AACA;AACA,iCAAiC,+DAAQ;AACzC;AACA;AACA;AACA;AACA;AACA,wCAAwC,0DAAG,sBAAsB,wDAAwD,EAAE;AAC3H;AACA;AACA,uBAAuB,+CAAE,yCAAyC;AAClE;AACA;AACA,kCAAkC,0DAAG;AACrC;AACA,aAAa;AACb,SAAS;AACT;AACA;AACA;AACA;AACA;AACA,mBAAmB,+CAAE;AACrB;AACA;AACA;AACA;AACA,uBAAuB,+CAAE;AACzB;AACA,kEAAkE,+DAAQ;AAC1E;AACA;AACA,8BAA8B,0DAAG;AACjC;AACA;AACA,qBAAqB;AACrB;AACA;AACA,aAAa;AACb;AACA,eAAe,+CAAE;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,+CAAE;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,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA,oDAAoD;AACpD,kDAAkD,EAAE;AACpD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wCAAwC,sDAAQ,+DAA+D,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,CAAC;AACD;AACA;AACA;AACA,eAAe,+CAAE;AACjB,cAAc,iDAAI,eAAe,0DAAG;AACpC;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;AACA,4BAA4B,sDAAQ,uCAAuC,kBAAkB;AAC7F;AACA;AACA,8DAA8D;AAC9D;AACA;AACA;AACA,mBAAmB,QAAQ,gBAAgB;AAC3C;AACA;AACA;AACA;AACA,iBAAiB,0BAA0B;AAC3C;AACA,WAAW,sDAAQ,GAAG;AACtB;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B,sDAAQ,uCAAuC,kBAAkB;AAC7F;AACA;AACA,8DAA8D;AAC9D;AACA;AACA;AACA,mBAAmB,QAAQ,gBAAgB;AAC3C;AACA;AACA;AACA;AACA,iBAAiB,0BAA0B;AAC3C;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,gDAAgD,gBAAgB,EAAE;AAClE;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,gDAAgD,kDAAkD,gBAAgB,EAAE,EAAE;AACtH;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA,sBAAsB,sDAAQ,gCAAgC,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,sBAAsB,sDAAQ,gCAAgC,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,+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;AACA,eAAe,4BAA4B;AAC3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI,uDAAS;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kDAAkD,iCAAiC;AACnF;AACA,CAAC;AACD;AACA;AACA,uBAAuB,oDAAe,uBAAuB;AAC7D,0BAA0B,oDAAe,GAAG;AAC5C,wBAAwB,oDAAe,GAAG;AAC1C,+BAA+B,oDAAe,GAAG;AACjD,uBAAuB,oDAAe;AACtC;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;AACA;AACA;AACA;AACA;AACA;AACA,0BAA0B,yCAAyC,EAAE;AACrE;AACA;AACA,KAAK;AACL;AACA;AACA,0BAA0B,+BAA+B,EAAE;AAC3D;AACA;AACA,KAAK;AACL;AACA;AACA,0BAA0B,uCAAuC,EAAE;AACnE;AACA;AACA,KAAK;AACL;AACA;AACA,0BAA0B,2CAA2C,EAAE;AACvE;AACA;AACA,KAAK;AACL;AACA;AACA,0BAA0B,yCAAyC,EAAE;AACrE;AACA;AACA,KAAK;AACL;AACA;AACA,0BAA0B,6CAA6C,EAAE;AACzE;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,kDAAkD,0DAAG,eAAe,6BAA6B,EAAE;AACnG;AACA;AACA,SAAS;AACT;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,0CAA0C,0DAAG,eAAe,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,qBAAqB,sDAAQ,GAAG;AAChC,mBAAmB,sDAAQ,GAAG;AAC9B,sBAAsB,sDAAQ,GAAG;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;AACA;AACA;AACA;AACA;AACA;AACA,0BAA0B,+BAA+B,EAAE;AAC3D;AACA;AACA,KAAK;AACL;AACA;AACA,0BAA0B,uCAAuC,EAAE;AACnE;AACA;AACA,KAAK;AACL;AACA;AACA,0BAA0B,2CAA2C,EAAE;AACvE;AACA;AACA,KAAK;AACL;AACA;AACA,0BAA0B,yCAAyC,EAAE;AACrE;AACA;AACA,KAAK;AACL;AACA;AACA,0BAA0B,6CAA6C,EAAE;AACzE;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;AACA,eAAe,4BAA4B;AAC3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI,uDAAS;AACb;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;;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;AACA,0BAA0B,sDAAQ,qCAAqC,UAAU;AACjF;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,QAAQ,gBAAgB;AAC/C;AACA;AACA;AACA;AACA,qBAAqB,0BAA0B;AAC/C;AACA;AACA,KAAK;AACL;AACA;AACA,kCAAkC,oDAAe,aAAa,oDAAe,gBAAgB,oDAAe,qBAAqB,oDAAe,kBAAkB,oDAAe;AACjL;;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,uBAAuB,sDAAQ,QAAQ,qBAAqB;AAC5D;AACA;AACA,uBAAuB,sDAAQ;AAC/B;AACA;AACA;AACA,mBAAmB,sDAAQ;AAC3B;AACA;AACA;AACA;AACA,4DAA4D;AAC5D;AACA;AACA,4CAA4C;AAC5C;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA,eAAe,sDAAQ;AACvB,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;AACA,sBAAsB;AACtB;AACA,sBAAsB;AACtB;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,mBAAmB,+CAAE;AACrB;AACA;AACA,mCAAmC,+DAAQ,2BAA2B,uDAAuD,+CAAE,QAAQ,EAAE;AACzI;AACA;AACA;AACA;AACA,mBAAmB,+CAAE;AACrB,eAAe,iDAAI;AACnB,kBAAkB,gEAAS,mBAAmB,iEAAiE,EAAE,GAAG,6DAAM,mBAAmB,UAAU,EAAE;AACzJ;AACA,0DAA0D,8CAA8C;AACxG,wDAAwD,4CAA4C;AACpG;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,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,iDAAI;AACnB,kBAAkB,+DAAQ,mBAAmB,6DAA6D,EAAE,GAAG,4DAAK,oBAAoB,wBAAwB,EAAE;AAClK;AACA;AACA;AACA,eAAe,iDAAI;AACnB,kBAAkB,gEAAS,mBAAmB,uBAAuB,iDAAI;AACzE;AACA;AACA;AACA,YAAY,EAAE,GAAG,4DAAK,oBAAoB,wBAAwB,EAAE;AACpE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,+CAAE;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,+CAAE;AACjB;AACA;AACA;AACA;AACA;AACA,mBAAmB,+CAAE;AACrB,kBAAkB,iDAAI,mBAAmB,0DAAG;AAC5C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mCAAmC,4DAAK;AACxC,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B,yCAAyC,EAAE;AAC1E,kCAAkC,mBAAmB,EAAE;AACvD,8BAA8B,iDAAI,8BAA8B,0DAAG;AACnE,sBAAsB,iDAAI,gBAAgB,0DAAG;AAC7C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uCAAuC,4DAAK;AAC5C,aAAa;AACb;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA,mBAAmB,+CAAE;AACrB,6BAA6B,iDAAI,qBAAqB,+DAAQ;AAC9D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mCAAmC,4DAAK;AACxC,SAAS;AACT,mCAAmC,4DAAK,oBAAoB,wBAAwB,EAAE;AACtF;AACA;AACA;AACA,sDAAsD,0DAAG;AACzD;AACA,0BAA0B,sDAAQ,GAAG;AACrC;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA,mBAAmB,+CAAE,GAAG;AACxB;AACA;AACA;AACA,iEAAiE,0DAAG;AACpE;AACA,8BAA8B;AAC9B,aAAa;AACb;AACA;AACA,gCAAgC,iDAAI,YAAY,+DAAQ;AACxD,gEAAgE,0DAAG;AACnE;AACA;AACA,aAAa;AACb,SAAS;AACT,sCAAsC,2DAAI,IAAI,0DAAG,cAAc,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,4CAA4C,mCAAmC;AAC/E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sEAAsE,iBAAiB,sDAAQ,GAAG,uDAAuD,yEAAyE;AAClO;AACA;AACA;AACA,mBAAmB,+CAAE;AACrB;AACA;AACA,uBAAuB,+CAAU,iBAAiB,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;AACA,gCAAgC,sDAAQ,uCAAuC,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,kFAAkF,sDAAQ,GAAG;AAC7F;AACA;AACA;AACA;AACA;AACA,qGAAqG,sDAAQ,GAAG;AAChH;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,4CAA4C,uBAAuB,EAAE;AACrE,+CAA+C,sDAAQ,GAAG;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;AACA,4BAA4B,sDAAQ,uCAAuC,kBAAkB;AAC7F;AACA;AACA,kDAAkD;AAClD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB,QAAQ,gBAAgB;AAC3C;AACA;AACA;AACA;AACA,iBAAiB,0BAA0B;AAC3C;AACA,WAAW,sDAAQ,GAAG;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B,sDAAQ,uCAAuC,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,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,iBAAiB,4DAAc;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mCAAmC,0DAAG;AACtC;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA,mBAAmB,iDAAI;AACvB;AACA;AACA,2DAA2D,+DAAQ;AACnE,iCAAiC,6DAAe;AAChD,2BAA2B,+CAAE;AAC7B;AACA;AACA,2BAA2B,iDAAI;AAC/B;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,WAAW,+CAAE;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,+BAA+B,oDAAe;AAC9C;AACA;AACA,0BAA0B,4CAAO;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,mBAAmB;AACnC;AACA;AACA,wCAAwC,wDAAwD;AAChG,sCAAsC,sDAAsD;AAC5F,qCAAqC,yDAAW;AAChD,oCAAoC,sDAAQ;AAC5C,kCAAkC,oDAAM;AACxC,iDAAiD,oDAAM;AACvD;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,qBAAqB,0CAA0C;AAC/D;AACA,wCAAwC,sDAAsD,mBAAmB,EAAE,EAAE;AACrH,aAAa;AACb;AACA;AACA;AACA;AACA,0BAA0B,+CAA+C,EAAE;AAC3E;AACA;AACA,KAAK;AACL;AACA,sDAAsD,yBAAyB;AAC/E;AACA;AACA;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,gDAAgD,gBAAgB;AAChE;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,0CAA0C,uBAAuB;AACjE;AACA,YAAY,+DAAS;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB,sDAAQ,GAAG;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,iDAAiD,2BAA2B;AAC5E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gCAAgC,WAAW,6BAA6B;AACxE,YAAY,+DAAS,+BAA+B,oDAAM;AAC1D;AACA;AACA;AACA;AACA;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,gCAAgC,WAAW,6BAA6B;AACxE;AACA;AACA;AACA;AACA,oDAAoD,0CAA0C;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,SAAS,IAAI;AACb;AACA;AACA;AACA;AACA,kBAAkB,gEAAS;AAC3B;AACA;AACA;AACA;AACA,sDAAsD,EAAE;AACxD;AACA;AACA,uBAAuB,+CAAE;AACzB;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;AACA,oCAAoC,mGAAmG,EAAE;AACzI;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oCAAoC,kHAAkH,EAAE;AACxJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yDAAyD,+DAAQ;AACjE;AACA,8BAA8B,0DAAG;AACjC;AACA;AACA,gCAAgC;AAChC,qBAAqB;AACrB,iBAAiB;AACjB;AACA;AACA,kCAAkC,+CAAE,EAAE,6CAA6C;AACnF;AACA,gEAAgE,+DAAQ;AACxE;AACA,2BAA2B,+CAAE;AAC7B;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB,0BAA0B,0DAAG,cAAc,UAAU,EAAE;AACvD,aAAa;AACb;AACA;AACA,oEAAoE,0DAAG;AACvE;AACA;AACA;AACA;AACA,wHAAwH,gCAAgC,EAAE;AAC1J;AACA,wBAAwB;AACxB,aAAa;AACb,qEAAqE,+DAAQ;AAC7E;AACA,2BAA2B,+CAAE;AAC7B;AACA;AACA,wDAAwD,0DAAG;AAC3D;AACA,4BAA4B;AAC5B,iBAAiB;AACjB,aAAa;AACb,2EAA2E,+DAAQ;AACnF;AACA,2BAA2B,+CAAE;AAC7B;AACA;AACA,2FAA2F,0DAAG;AAC9F;AACA;AACA,qBAAqB;AACrB;AACA;AACA,2BAA2B,+CAAE;AAC7B;AACA,aAAa;AACb,oEAAoE,+DAAQ;AAC5E;AACA,2BAA2B,+CAAE;AAC7B;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB,0BAA0B,0DAAG,cAAc,UAAU,EAAE;AACvD,aAAa;AACb;AACA;AACA,uDAAuD,0DAAG;AAC1D;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,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,kDAAkD,mBAAmB;AACrE;AACA;AACA,wCAAwC,mBAAmB;AAC3D;AACA;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,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;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;A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wDAAU;AAClB;AACA,IAAI,wDAAU;AACd,QAAQ,kEAAY;AACpB,QAAQ,wDAAU;AAClB,QAAQ,wDAAU;AAClB,QAAQ,wDAAU;AAClB;AACA,yBAAyB,wDAAU;AACnC,QAAQ,+DAAS,EAAE,4BAA4B;AAC/C,QAAQ,wDAAU;AAClB,YAAY,gEAAgB;AAC5B;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,IAAI,wDAAU;AACd,QAAQ,qEAAe,cAAc,oBAAoB;AACzD,QAAQ,wDAAU,gBAAgB,uDAAS;AAC3C;AACA,IAAI,wDAAU;AACd,QAAQ,qEAAe,sBAAsB,oBAAoB;AACjE,QAAQ,wDAAU,gBAAgB,uDAAS;AAC3C;AACA,IAAI,wDAAU;AACd,QAAQ,2DAAK;AACb,QAAQ,wDAAU;AAClB;AACA,IAAI,wDAAU;AACd,QAAQ,2DAAK;AACb,QAAQ,wDAAU;AAClB,QAAQ,wDAAU;AAClB;AACA,uBAAuB,wDAAU;AACjC,QAAQ,+DAAS;AACjB;AACA;AACA,SAAS;AACT,QAAQ,wDAAU,+BAA+B,wDAAU,EAAE,uDAAS;AACtE,YAAY,+DAAiB;AAC7B;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,+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,kCAAkC,0DAAY;AAC9C,oCAAoC,0DAAY;AAChD;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,IAAI,wDAAU;AACd,QAAQ,4DAAM;AACd,QAAQ,wDAAU;AAClB;AACA,IAAI,wDAAU;AACd,QAAQ,4DAAM;AACd,QAAQ,wDAAU;AAClB;AACA,mBAAmB,wDAAU;AAC7B,QAAQ,+DAAS,EAAE,gDAAgD;AACnE,QAAQ,qDAAO,IAAI,+DAAS;AAC5B,QAAQ,wDAAU,+CAA+C,8DAAgB;AACjF,YAAY,sEAAwB,UAAU,+DAAiB;AAC/D;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,yBAAyB,iEAAU,cAAc,QAAQ,+CAAE,OAAO,EAAE;AACpE;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2DAA2D,QAAQ,+CAAE,OAAO;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,sBAAsB,6DAAM,eAAe,mCAAmC,EAAE,GAAG,gEAAS,cAAc,wBAAwB,EAAE;AACpI,wCAAwC,EAAE;AAC1C;AACA;AACA,yCAAyC,yDAAW;AACpD;AACA;AACA;AACA;AACA;AACA,yDAAyD,iCAAiC;AAC1F;AACA;AACA;AACA;AACA,gCAAgC,sDAAQ,uCAAuC,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,eAAe,iDAAI,WAAW,+DAAQ,IAAI,0DAAG,eAAe,eAAe,EAAE;AAC7E;AACA;AACA;AACA;AACA;AACA,gCAAgC,+DAAQ;AACxC;AACA;AACA,aAAa;AACb,SAAS;AACT;AACA,sBAAsB,wDAAU;AAChC,QAAQ,gEAAU;AAClB,QAAQ,wDAAU,+BAA+B,mEAAqB,EAAE,sDAAQ;AAChF,YAAY,sDAAQ;AACpB;AACA;AACA,CAAC;;AAED;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;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,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B,4DAAc;AAC7C;AACA;AACA;AACA,+BAA+B,4DAAc;AAC7C;AACA,IAAI,wDAAQ;AACZ,KAAK,yDAAyD;AAC9D;AACA;AACA;AACA;AACA,YAAY,4DAAc,yCAAyC,wDAAQ,EAAE,sDAAQ;AACrF,YAAY,mEAAqB,EAAE,sDAAQ;AAC3C,sCAAsC,sDAAQ,8BAA8B,sDAAQ;AACpF;AACA,KAAK;AACL;AACA,KAAK,iEAAiE;AACtE,KAAK,UAAU,mEAAqB,YAAY,oEAAsB,EAAE;AACxE;AACA;AACA;AACA,KAAK,2CAA2C,uBAAuB,EAAE;AACzE;AACA;AACA,eAAe,0DAAY;AAC3B;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,wCAAwC,sDAAQ,QAAQ,sDAAQ;AAChE,iBAAiB;AACjB,iBAAiB,8DAA8D,EAAE;AACjF;AACA,6BAA6B,gEAAgB;AAC7C;AACA;AACA,wBAAwB,gEAAgB,OAAO,oDAAM,CAAC,6DAAa,OAAO,sDAAQ;AAClF;AACA,iBAAiB;AACjB;AACA;AACA;AACA,mCAAmC,gEAAgB;AACnD,iBAAiB;AACjB;AACA;AACA;AACA;AACA,iBAAiB;AACjB,iBAAiB,UAAU,0DAAY,+CAA+C;AACtF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA,oCAAoC,wDAAU;AAC9C,QAAQ,8DAAQ;AAChB;AACA;AACA;AACA,SAAS;AACT,QAAQ,qDAAO,IAAI,8DAAQ,KAAK,qDAAO,IAAI,4DAAM,yBAAyB,qDAAO,IAAI,8DAAQ;AAC7F,QAAQ,wDAAU;AAClB;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6BAA6B,cAAc;AAC3C,iCAAiC,oEAAoB;AACrD,YAAY,oEAAoB;AAChC;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,UAAU,0EAA4B,iCAAiC;AAChF,SAAS,iDAAiD;AAC1D;AACA;AACA;AACA,0BAA0B,WAAW;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,yEAAO;AAC3B;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,6CAA6C,4CAAO;AACpD;AACA;AACA;AACA,kCAAkC,oEAAoB;AACtD;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,+BAA+B,+CAAE;AACjC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA,oCAAoC,4DAAc;AAClD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB,wDAAU;AAClC,QAAQ,gEAAU;AAClB,QAAQ,wDAAU,uBAAuB,sDAAQ;AACjD;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6BAA6B,4DAAc;AAC3C;AACA;AACA;AACA;AACA,qBAAqB,6DAAe;AACpC;AACA;AACA;AACA,SAAS;AACT,SAAS,2FAA2F;AACpG,SAAS,UAAU,oEAAsB,gDAAgD;AACzF;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB,qDAAO;;AAEzB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAE+nD;AAC/nD;;;;;;;;;;;;;ACv1KA;AAAA;AAAA;AAAA;AAAyC;AACM;AAC/C;AACA;AACA;AACA;AACA,SAAS,OAAO,sDAAQ;AACxB;AACA;AACA,wBAAwB,2DAAe;AACvC;AACA;AACA,wBAAwB,2DAAe;AACvC;AACA,iBAAiB,IAAI;AACrB;AACA;AACA,CAAC;AACuB;AACxB,kD;;;;;;;;;;;;ACnBA;AAAA;AAAA;AAAA;AAAA;AAAsF;AAClD;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,8BAA8B,sCAAM;AACpC;AACA;AACA,8BAA8B,sDAAmB;AACjD;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS,OAAO,uDAAS;AACzB;AACA,qCAAqC,qEAAuB;AAC5D;AACA,iBAAiB,IAAI;AACrB;AACA;AACA,kDAAkD;AAClD,SAAS,OAAO,wDAAU,GAAG;AAC7B,MAAM;AACN;AACA,8BAA8B,OAAO,mDAAK,EAAE;A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,gCAAgC,6BAA6B,gCAAgC,4CAA4C,+BAA+B,0BAA0B,4BAA4B,sBAAsB,4FAA4F,oEAAoE,YAAY,iBAAiB,sBAAsB,YAAY,IAAI,GAAG,gFAAgF,6CAA6C,SAAS,KAAK,G;;;;;;;;;;;ACA7/2gE;AACA,CAAC,KAA4D,oBAAoB,mBAAO,CAAC,iEAAe,GAAG,mBAAO,CAAC,uEAAiB;AACpI,CAAC,SACyE;AAC1E,CAAC,wCAAwC;;AAEzC;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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,QAAQ,8CAA8C,GAAG,2BAA2B,GAAG;AACrG,UAAU,sBAAsB,OAAO,0CAA0C,EAAE,GAAG;AACtF,UAAU,QAAQ,6CAA6C,GAAG,2BAA2B,GAAG;AAChG,cAAc,uBAAuB,2BAA2B,GAAG;AACnE;AACA;AACA,iBAAiB,mCAAmC;AACpD;AACA,oBAAoB,4CAA4C;AAChE;AACA;AACA;AACA;AACA,aAAa,QAAQ,kCAAkC,GAAG,OAAO,6EAA6E,EAAE,GAAG;AACnJ,cAAc,mCAAmC;AACjD,aAAa,sCAAsC;AACnD;AACA,iBAAiB,EAAE,GAAG;AACtB,YAAY,6BAA6B;AACzC,SAAS,oEAAoE,OAAO,WAAW;AAC/F,cAAc,2BAA2B;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc,uBAAuB,uBAAuB,GAAG;AAC/D;AACA,aAAa,sBAAsB,uBAAuB,GAAG;AAC7D;AACA;AACA,iBAAiB,qCAAqC;AACtD;AACA,oBAAoB,4CAA4C;AAChE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB,sDAAsD,yBAAyB,GAAG;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,CAAC,IAAI;;;AAGL;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,eAAe,EAAE;AACjB,eAAe,EAAE;AACjB,gBAAgB;AAChB;AACA;AACA,eAAe,EAAE;AACjB,eAAe,EAAE;AACjB,gBAAgB;AAChB;AACA;AACA,uBAAuB,EAAE;AACzB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,EAAE;AACjB,eAAe,EAAE;AACjB,gBAAgB;AAChB;AACA;AACA,eAAe,EAAE;AACjB,eAAe,EAAE;AACjB,gBAAgB;AAChB;AACA;AACA,uBAAuB,EAAE;AACzB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA,cAAc,WAAW;AACzB;AACA;AACA;AACA;;AAEA;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,gBAAgB;AAChB;AACA;AACA;AACA,uBAAuB,EAAE;AACzB,uBAAuB,EAAE;AACzB;AACA,uBAAuB,EAAE;AACzB,aAAa,0BAA0B;AACvC,aAAa,qCAAqC;AAClD,aAAa,mCAAmC;AAChD,aAAa,2CAA2C;AACxD;AACA;AACA;AACA;AACA;AACA,aAAa,IAAI;AACjB,SAAS;AACT;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA,aAAa;AACb,SAAS;AACT;AACA;AACA,2BAA2B,EAAE;AAC7B,2BAA2B,EAAE;AAC7B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,EAAE;AAClB;AACA;AACA;AACA;AACA,gBAAgB,EAAE;AAClB;AACA;AACA,uBAAuB,EAAE;AACzB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,EAAE;AAClB;AACA;AACA;AACA;AACA;AACA,gBAAgB,EAAE;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;;AAEA;AACA;AACA;AACA;AACA,gBAAgB,EAAE;AAClB;AACA;AACA;AACA;AACA;AACA,gBAAgB,EAAE;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;;AAEA;AACA;AACA;AACA;AACA,gBAAgB,EAAE;AAClB;AACA;AACA;AACA;AACA;AACA,gBAAgB,EAAE;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;;AAEA;AACA,SAAS,wBAAwB;AACjC;AACA;AACA,wDAAwD;AACxD,SAAS,gCAAgC,+CAA+C,IAAI;AAC5F,MAAM;AACN;AACA,CAAC;;AAED;AACA;AACA,cAAc,WAAW;AACzB;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA,iBAAiB,IAAI;AACrB;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,8CAA8C,cAAc;;AAE5D,CAAC;;;;;;;;;;;;;ACteD;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAiK;AAClH;;AAE/C;AACA;AACA,0BAA0B,0DAAY;AACtC;AACA;AACA;AACA,yDAAyD,wBAAwB;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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,sBAAsB;AAClD;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,uDAAuD,0BAA0B,EAAE;AACnF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAC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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,SAAS,OAAO,uDAAS;AACzB;AACA;AACA;AACA,qCAAqC,qEAAuB;AAC5D,mCAAmC,+DAAiB;AACpD,iBAAiB,IAAI;AACrB;AACA;AACA,8DAA8D,WAAW;AACzE;AACA,gBAAgB,OAAO,mDAAK,EAAE;AAC9B,qBAAqB,OAAO,mDAAK,EAAE;AACnC,4BAA4B,OAAO,mDAAK,EAAE;AAC1C,sBAAsB,OAAO,mDAAK,EAAE;AACpC,wBAAwB,OAAO,mDAAK,EAAE;AACtC,2BAA2B,OAAO,mDAAK,EAAE;AACzC,uBAAuB,OAAO,mDAAK,EAAE;AACrC,yCAAyC,OAAO,mDAAK,EAAE;AACvD,mCAAmC,OAAO,mDAAK,EAAE;AACjD,sCAAsC,OAAO,mDAAK,EAAE;AACpD,wBAAwB,OAAO,oDAAM,EAAE;AACvC;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8BAA8B,0DAAY;AAC1C;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,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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS,OAAO,uDAAS;AACzB;AACA;AACA,iBAAiB,IAAI;AACrB;AACA;AACA,8DAA8D;AAC9D,SAAS,2BAA2B;AACpC,SAAS,OAAO,+DAAiB,GAAG;AACpC,MAAM;AACN;AACA,gBAAgB,OAAO,mDAAK,EAAE;AAC9B,qBAAqB,OAAO,mDAAK,EAAE;AACnC,wBAAwB,OAAO,oDAAM,EAAE;AACvC;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA,SAAS,OAAO,sDAAQ;AACxB,8BAA8B,4DAAY;AAC1C;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,IAAI;AACrB;AACA;AACA,sDAAsD,WAAW;AACjE;AACA,CAAC;;AAED;AACA;AACA;;AAEwK;;;;;;;;;;;;;ACrhBxK;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAkC;AACD;AACoE;;AAErG;AACA;AACA,cAAc,uFAAuF;AACrG;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA,eAAe,+CAAU;AACzB,mBAAmB,EAAE;AACrB,oBAAoB;AACpB;AACA;AACA;AACA;AACA,uBAAuB,EAAE;AACzB,wBAAwB;AACxB;AACA;AACA;AACA;AACA,aAAa;AACb,SAAS;AACT;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA,mBAAmB,EAAE;AACrB,mBAAmB,EAAE;AACrB,mBAAmB,EAAE;AACrB,mBAAmB,EAAE;AACrB,oBAAoB;AACpB;AACA;AACA,uBAAuB,EAAE;AACzB;AACA,uBAAuB,EAAE;AACzB;AACA,uBAAuB,EAAE;AACzB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,EAAE;AACzB,wBAAwB;AACxB;AACA;AACA;AACA,aAAa;AACb;AACA,SAAS;AACT;AACA;AACA,SAAS,OAAO,wDAAU;AAC1B;AACA,iBAAiB;AACjB;AACA;AACA,4DAA4D,WAAW;AACvE,mEAAmE,sEAAgB,EAAE,wDAAwD,wCAAwC,EAAE,wDAAwD;AAC/O;AACA,CAAC;;AAED;AACA;AACA,cAAc,uFAAuF;AACrG;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;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB,EAAE;AACrB,oBAAoB;AACpB;AACA;AACA,uBAAuB,EAAE;AACzB;AACA;AACA;AACA;AACA,gCAAgC,sDAAQ,GAAG,iDAAiD,sDAAQ,GAAG;AACvG;AACA,uBAAuB,EAAE;AACzB,wBAAwB;AACxB;AACA;AACA;AACA,aAAa;AACb;AACA,uBAAuB,EAAE;AACzB,wBAAwB;AACxB;AACA,8BAA8B,6BAA6B,EAAE;AAC7D,SAAS;AACT,mBAAmB,EAAE;AACrB,oBAAoB;AACpB;AACA,wBAAwB,2BAA2B,EAAE;AACrD;AACA;AACA,SAAS,OAAO,uDAAS;AACzB;AACA;AACA,iBAAiB;AACjB;AACA;AACA,8DAA8D;AAC9D,SAAS,OAAO,wDAAU,EAAE;AAC5B,SAAS;AACT,MAAM;AACN;AACA,gBAAgB,OAAO,mDAAK,EAAE;AAC9B,gBAAgB,OAAO,mDAAK,EAAE;AAC9B;AACA;AACA,CAAC;;AAED;AACA;AACA,cAAc,uFAAuF;AACrG;AACA;AACA;AACA;AACA;AACA,SAAS,OAAO,sDAAQ;AACxB;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA,CAAC;;AAED;AACA;AACA,cAAc,uFAAuF;AACrG;;AAEA;AACA;AACA,cAAc,uFAAuF;AACrG;;AAE4F;;AAE5F,gD;;;;;;;;;;;ACrNA;AACA;AACA;AACA;;AAEA;AACA,EAAE,KAA4D;AAC9D,EAAE,SAC0C;AAC5C,CAAC,oBAAoB;;AAErB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,OAAO;AACpB,aAAa,OAAO;AACpB,cAAc,MAAM;AACpB;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;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA,sBAAsB,wBAAwB;AAC9C;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,KAAK;AACL;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;;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,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA,KAAK;AACL;AACA;AACA,yBAAyB,2CAA2C;;AAEpE;AACA;AACA;AACA,KAAK;AACL;AACA;AACA,yBAAyB,2CAA2C;;AAEpE;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,OAAO;;AAEP;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,KAAK;;AAEL;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA,OAAO;AACP,KAAK;;AAEL;AACA;AACA;AACA;AACA,OAAO;AACP,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,MAAM;AACrB,gBAAgB,MAAM;AACtB;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,eAAe,MAAM;AACrB,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;AACA;AACA,qBAAqB,wBAAwB;AAC7C;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP,KAAK;AACL;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA,qDAAqD,gBAAgB;AACrE;AACA;;AAEA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA,sDAAsD,gBAAgB;AACtE;AACA;;AAEA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,eAAe,MAAM;AACrB,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,WAAW;;AAEX;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,KAAK;AACL;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;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,KAAK;AACL;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP,KAAK;AACL;AACA;AACA,KAAK;AACL;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,aAAa,6BAA6B,yBAAyB,EAAE;AACrE;AACA;AACA,KAAK,mDAAmD;AACxD,KAAK,mDAAmD;AACxD,KAAK,sDAAsD;AAC3D,KAAK,sDAAsD;AAC3D,KAAK,wDAAwD;AAC7D,KAAK,4DAA4D;AACjE,KAAK,4DAA4D;AACjE,KAAK;AACL;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;;AAEP;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA,0CAA0C,aAAa;AACvD,GAAG;;AAEH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;;AAEA;AACA;AACA;AACA;AACA;AACA,wCAAwC,uBAAuB;;AAE/D;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;;AAEA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB,wBAAwB;AAC1C;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,2BAA2B,wCAAwC;AACnE;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,2BAA2B,wCAAwC;AACnE;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,2BAA2B,wCAAwC;AACnE;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;;AAEA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA,KAAK;AACL;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT,OAAO;AACP;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,OAAO;AACP,KAAK;AACL;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT,OAAO;AACP;AACA,OAAO;AACP;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,OAAO;AACP;AACA;AACA,OAAO;AACP;AACA;AACA,OAAO;AACP;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,KAAK;AACL;;AAEA;AACA;AACA;AACA,wBAAwB;AACxB;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;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;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,wBAAwB,eAAe;AACvC;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,SAAS;;AAET;AACA;AACA,SAAS;AACT;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA,WAAW;;AAEX;AACA;AACA,WAAW;;AAEX;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA,aAAa;;AAEb;AACA;AACA,aAAa;;AAEb;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,yCAAyC,wBAAwB;AACjE;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA,OAAO;AACP;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;;AAEA;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,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,SAAS;AACT;AACA;AACA;AACA,OAAO;AACP;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA,CAAC,G;;;;;;;;;;;AC9/CD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA,MAAM,IAA0B;;AAEhC;AACA,OAAO,EAGuB;;AAE9B,CAAC,oBAAoB;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,uCAAuC,OAAO;AAC9C;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA,IAAI;AACJ;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,GAAG;AACH;AACA,8CAA8C,OAAO;AACrD;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,wBAAwB,uBAAuB,iCAAiC,4BAA4B,qBAAqB,0BAA0B,+DAA+D;AAC1N,gCAAgC,2BAA2B,yBAAyB,iBAAiB,gDAAgD,qCAAqC,sCAAsC,yCAAyC,cAAc,qBAAqB,OAAO,8CAA8C,cAAc,qBAAqB,OAAO;AAC3Y,qCAAqC,qDAAqD,qDAAqD,kCAAkC,0BAA0B,qCAAqC,uBAAuB;AACvQ,0BAA0B;AAC1B,2CAA2C,6CAA6C,aAAa,KAAK,KAAK,+CAA+C,aAAa,KAAK,KAAK,+CAA+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oC,gEAAgE;AACpG,oCAAoC,2EAA2E;;AAE/G,oBAAoB,cAAc;AAClC,qBAAqB,cAAc;AACnC;AACA,kCAAkC,mCAAmC;AACrE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,EAAE;;AAEF;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,aAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wCAAwC,yBAAyB;;AAEjE,oBAAoB,cAAc;AAClC;;AAEA,qBAAqB,cAAc;AACnC,qCAAqC,yBAAyB,UAAU,SAAS,uBAAuB,yBAAyB,iGAAiG;AAClO;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,EAAE,oBAAoB;AACtB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6CAA6C,QAAQ;AACrD;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,aAAa,SAAS;AACtB,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,yCAAyC,6HAA6H;AACtK;AACA,aAAa;AACb;AACA,aAAa;AACb;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,aAAa,YAAY;AACzB,aAAa,OAAO;AACpB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,aAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA,oBAAoB,cAAc;AAClC,qBAAqB,cAAc;AACnC;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,aAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA,EAAE;;AAEF;AACA;AACA;AACA;AACA,YAAY,OAAO;AACnB,YAAY,OAAO;AACnB,aAAa,OAAO;AACpB;AACA;AACA;AACA;;AAEA,iDAAiD,UAAU;AAC3D;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,IAAI;AACJ;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA,wEAAwE,EAAE;AAC1E;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,oBAAoB;AACpB,6CAA6C;AAC7C;AACA,YAAY,mBAAmB;AAC/B,YAAY,cAAc;AAC1B,YAAY,OAAO;AACnB,YAAY,OAAO;AACnB,YAAY,OAAO;AACnB,YAAY,OAAO;AACnB,YAAY,OAAO;AACnB,YAAY,oBAAoB;AAChC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,YAAY,OAAO;AACnB;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;;A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U;AACN;AACA;AACN;AAC8B;AACxB;AACF;AACE;AACU;AACV;AACA;AACJ;AACI;AACA;AACT;AAC3C;;;;;;;;;;;;;ACtDA;AAAA;AAAA;AAAA;AAAA;AAAA;AACiC;AACG;AACU;AAC9C;AACA,IAAI,+CAAiB;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB,0DAAY;AAC/B;AACA;AACA;AACA;AACA,mBAAmB,0DAAY;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,CAAC,gDAAO;AACe;AACxB;;;;;;;;;;;;;AC9CA;AAAA;AAAA;AAAA;AAAA;AAAA;AACiC;AACG;AACqC;AACzE;AACA,IAAI,+CAAiB;AACrB;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,sBAAsB,qFAAuB;AAC7C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC,CAAC,gDAAO;AACkB;AAC3B;;;;;;;;;;;;;AC1CA;AAAA;AAAA;AAAA;AAAA;AACiC;AACS;AAC1C;AACA,IAAI,+CAAiB;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC,CAAC,sDAAU;AACe;AAC3B;;;;;;;;;;;;;AC3BA;AAAA;AAAA;AAAA;AAAA;AAAA;AAC2C;AACN;AACgB;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,uBAAuB,yDAAE;AACzB;AACA,uBAAuB,yEAAU;AACjC;AACA,uBAAuB,+DAAK;AAC5B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACuB;AACxB;;;;;;;;;;;;;ACrEA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AACmD;AAC6B;AACpC;AACV;AAClC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB,uEAAY;AAC/B;AACA;AACA;AACA;AACA,qCAAqC,8CAAM;AAC3C;AACA;AACA;AACA,YAAY,8CAAM;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,8CAAM;AACtB;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,yBAAyB,sEAAiB;AAC1C;AACA;AACA;AACA;AACA,wBAAwB,uBAAuB;AAC/C;AACA;AACA;AACA;AACA;AACA,eAAe,gEAAa;AAC5B;AACA;AACA;AACA;AACA;AACA;AACA,0CAA0C,kBAAkB,EAAE,kBAAkB,oBAAoB,EAAE,eAAe,uBAAuB,EAAE;AAC9I,SAAS;AACT;AACA;AACA;AACA;AACA;AACA,CAAC;AACqB;AACtB;AACA;AACA,sBAAsB,8CAAM;AAC5B;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;AC7GA;AAAA;AAAA;AAAA;AAAA;AACkC;AACuB;AAClD;AACP;AACA,4BAA4B,EAAE;AAC9B;AACA,YAAY,8CAAM;AAClB;AACA;AACA;AACA,YAAY,6EAAe;AAC3B;AACA,KAAK;AACL,2BAA2B;AAC3B;AACA;;;;;;;;;;;;;AChBA;AAAA;AAAA;AAAA;AAAA;AACiC;AACS;AAC1C;AACA,IAAI,+CAAiB;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC,CAAC,sDAAU;AACe;AAC3B;;;;;;;;;;;;;ACpBA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AACiC;AACG;AACM;AACI;AACc;AACa;AACb;AAC5D;AACA,IAAI,+CAAiB;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,sBAAsB,qFAAuB;AAC7C;AACA;AACA,2BAA2B,0DAAY;AACvC;AACA;AACA;AACA,+BAA+B,wEAAmB;AAClD;AACA;AACA,4CAA4C,wEAAmB;AAC/D;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,kCAAkC,sDAAK;AACvC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC,CAAC,gDAAO;AACgB;AACzB;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;;;;;;;;;;;;;ACpHA;AAAA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iCAAiC,mBAAmB;AACpD;AACA,CAAC;AACoB;AACrB;;;;;;;;;;;;;AClBA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AACiC;AACS;AACA;AACI;AAC2B;AACb;AACyB;AACrF;AACA,IAAI,+CAAiB;AACrB;AACA;AACA;AACA;AACA;AACA;AACA,CAAC,CAAC,sDAAU;AACiB;AAC7B;AACA,IAAI,+CAAiB;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sBAAsB,0EAAkB;AACxC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sBAAsB,qFAAuB;AAC7C;AACA;AACA;AACA;AACA;AACA,2BAA2B,SAAS;AACpC;AACA;AACA;AACA;AACA;AACA;AACA,sBAAsB,qFAAuB;AAC7C;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,SAAS;AAChC;AACA;AACA;AACA;AACA;AACA;AACA,sBAAsB,qFAAuB;AAC7C;AACA;AACA;AACA;AACA;AACA,uBAAuB,SAAS;AAChC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sBAAsB,qFAAuB;AAC7C;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sBAAsB,qFAAuB;AAC7C;AACA;AACA;AACA,mBAAmB,0DAAY;AAC/B;AACA;AACA;AACA,mBAAmB,0DAAY;AAC/B;AACA;AACA;AACA,uBAAuB,wEAAmB;AAC1C;AACA;AACA;AACA,6BAA6B,sDAAU;AACvC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC,CAAC,sDAAU;AACO;AACnB;AACA,IAAI,+CAAiB;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,mBAAmB,0DAAY;AAC/B;AACA;AACA;AACA,CAAC;AAC2B;AAC5B;;;;;;;;;;;;;AC7JA;AAAA;AAAA;AAAA;AAAA;AACiC;AACa;AAC9C;AACA,IAAI,+CAAiB;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,CAAC,CAAC,0DAAY;AACiB;AAC/B;;;;;;;;;;;;;AC/BA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AACiC;AACc;AACK;AACN;AACuC;AACnD;AACuB;AACzD;AACA,IAAI,+CAAiB;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oCAAoC,+CAAa;AACjD;AACA;AACA;AACA,wCAAwC,+CAAa;AACrD;AACA;AACA;AACA;AACA,kEAAkE,0EAAkB;AACpF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yBAAyB,0EAAkB,iBAAiB,aAAa;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,CAAC,CAAC,0DAAY;AACQ;AACtB;AACA,IAAI,+CAAiB;AACrB;AACA;AACA;AACA;AACA;AACA,YAAY,mEAAU;AACtB;AACA;AACA;AACA;AACA;AACA;AACA,mCAAmC,+CAAa;AAChD;AACA,oBAAoB,mEAAU;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,8CAAM;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wDAAwD,8CAAM;AAC9D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,6EAAe;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,6EAAe;AACnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mDAAmD,6CAA6C;AAChG,qBAAqB,8CAAM;AAC3B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,8CAAM;AACtB;AACA;AACA;AACA,gBAAgB,6EAAe;AAC/B;AACA;AACA;AACA;AACA,aAAa,8CAAM;AACnB;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,8CAAM;AACtB;AACA;AACA;AACA;AACA;AACA,gBAAgB,6EAAe;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA,4EAA4E,0EAAkB;AAC9F;AACA;;;;;;;;;;;;;AC7OA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AACyC;AACE;AACI;AACJ;AACM;AACgB;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,YAAY,mEAAU;AACtB,wBAAwB,+DAAQ;AAChC,0BAA0B,6DAAW;AACrC;AACA,oCAAoC,6DAAW,cAAc,6EAAmB;AAChF,gDAAgD,6DAAW,cAAc,6DAAW;AACpF;AACA;AACA,YAAY,6DAAO;AACnB;AACA;AACA;AACA;AACA,oBAAoB,+DAAQ;AAC5B,gCAAgC,+DAAQ;AACxC,kCAAkC,6DAAW;AAC7C;AACA;AACA,kCAAkC,6DAAW;AAC7C,2CAA2C,6EAAmB;AAC9D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sBAAsB,6EAAmB;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,KAAK;AACL;AACA,CAAC;AACuB;AACxB;AACA,+CAA+C,oCAAoC,6EAAmB,sBAAsB,EAAE;AAC9H;AACA;;;;;;;;;;;;;ACnIA;AAAA;AAAA;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;;;;;;;;;;;;;AClBA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AACiC;AACc;AACJ;AACA;AACI;AACyB;AACxE;AACA,IAAI,+CAAiB;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gDAAgD,0DAAY;AAC5D;AACA;AACA;AACA;AACA,6BAA6B,0DAAY;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oEAAmB;AAClC;AACA;AACA,CAAC,CAAC,sDAAU;AACqB;AACjC;AACO;AACP,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,IAAI,+CAAiB;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,CAAC,CAAC,0DAAiB;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA,IAAI,+CAAiB;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,CAAC,CAAC,sDAAU;AACZ;;;;;;;;;;;;;AC9IA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AACiC;AACU;AACF;AACK;AAC9C;AACA,IAAI,+CAAiB;AACrB;AACA;AACA;AACA;AACA;AACA,wBAAwB,oDAAI;AAC5B;AACA;AACA;AACA;AACA;AACA,aAAa,iEAAS;AACtB;AACA;AACA;AACA,8BAA8B,oDAAI;AAClC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB,oDAAI;AAC5B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,CAAC,CAAC,sDAAU;AACqB;AACjC;;;;;;;;;;;;;AClDA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAC2C;AACI;AACR;AACG;AACQ;AAC3C;AACP;AACA,YAAY,qEAAW;AACvB;AACA;AACA;AACA;AACA;AACA,gCAAgC,uBAAuB;AACvD;AACA;AACA,sFAAsF,0DAAG,kBAAkB,QAAQ,6DAAO,mEAAmE,EAAE;AAC/L;AACA;AACA;AACA;AACA;AACA,wBAAwB,uBAAuB;AAC/C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB,sDAAU;AAC7B;AACA;AACA,kCAAkC,0DAAY;AAC9C;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,uCAAuC,0DAAY;AACnD;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;;;;;;;;;;;;;AClGA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAC2C;AACI;AACR;AACW;AACR;AACnC;AACP;AACA,YAAY,qEAAW;AACvB;AACA;AACA;AACA;AACA;AACA,gCAAgC,uBAAuB;AACvD;AACA;AACA,0FAA0F,0DAAG,kBAAkB,QAAQ,6DAAO,mEAAmE,EAAE;AACnM;AACA;AACA;AACA;AACA;AACA,wBAAwB,uBAAuB;AAC/C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB,sDAAU;AAC7B;AACA;AACA;AACA;AACA,mDAAmD,0DAAY;AAC/D;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,uCAAuC,0DAAY;AACnD;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;;;;;;;;;;;;;AC1GA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AACiC;AACiB;AACR;AACW;AACS;AACtB;AACxC;AACO;AACP;AACA,oBAAoB,uBAAuB;AAC3C;AACA;AACA;AACA;AACA,QAAQ,qEAAW;AACnB;AACA;AACA;AACA;AACA;AACA,oCAAoC,6DAAO;AAC3C;AACA;AACA,WAAW,4DAAS;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACgC;AACjC;AACA,IAAI,+CAAiB;AACrB;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,yBAAyB,iFAAiB;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,CAAC,CAAC,gEAAe;AACkB;AACnC;;;;;;;;;;;;;ACpGA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AACkD;AACxB;AACI;AACqB;AAC5C;AACP;AACA,oBAAoB,uBAAuB;AAC3C;AACA;AACA,iEAAiE,qEAAW;AAC5E,eAAe,kDAAI;AACnB;AACA,WAAW,sEAAS,GAAG,sCAAE;AACzB;AACA;;;;;;;;;;;;;ACfA;AAAA;AAAA;AAAA;AAAA;AAAA;AAC2C;AACb;AACE;AACzB;AACP,eAAe,sDAAU;AACzB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6BAA6B,kDAAI,UAAU,oDAAK;AAChD;AACA,KAAK;AACL;AACA;;;;;;;;;;;;;AClBA;AAAA;AAAA;AAAA;AAAA;AAAA;AAC2C;AACpC,8BAA8B,sDAAU,wBAAwB,8BAA8B,EAAE;AAChG;AACP;AACA;AACO;AACP,eAAe,sDAAU,wBAAwB,wCAAwC,8BAA8B,EAAE,EAAE,EAAE;AAC7H;AACA;;;;;;;;;;;;;ACTA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AACiC;AACU;AACD;AACV;AAC8B;AACT;AACd;AAChC;AACP;AACA,oBAAoB,uBAAuB;AAC3C;AACA;AACA;AACA;AACA;AACA;AACA,gCAAgC,6DAAO;AACvC;AACA;AACA;AACA,eAAe,4CAAK;AACpB;AACA;AACA,sCAAsC,0DAAG,kBAAkB,2CAA2C,EAAE;AACxG;AACA,eAAe,sDAAU;AACzB;AACA,KAAK;AACL;AACA;AACA,IAAI,+CAAiB;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,SAAS;AAChC;AACA,oCAAoC,iFAAiB;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,CAAC,CAAC,gEAAe;AACjB;;;;;;;;;;;;;ACzEA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAC2C;AACG;AACI;AACgB;AAClB;AACR;AACI;AACE;AACI;AACA;AAC3C;AACP;AACA,6BAA6B,sDAAU;AACvC;AACA;AACA,mBAAmB,sDAAU,CAAC,qEAAW;AACzC;AACA;AACA,YAAY,qFAAmB;AAC/B,mBAAmB,sEAAc;AACjC;AACA,iBAAiB,iEAAS;AAC1B,mBAAmB,gEAAW;AAC9B;AACA,iBAAiB,qEAAW;AAC5B,mBAAmB,4DAAS;AAC5B;AACA,iBAAiB,mEAAU;AAC3B,mBAAmB,kEAAY;AAC/B;AACA;AACA;AACA;AACA;;;;;;;;;;;;;AClCA;AAAA;AAAA;AAAA;AAAA;AAAA;AAC2C;AACI;AACa;AACrD;AACP;AACA,mBAAmB,sDAAU,CAAC,+EAAgB;AAC9C;AACA;AACA,mBAAmB,sDAAU;AAC7B,0BAA0B,0DAAY;AACtC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA,SAAS;AACT;AACA;AACA;;;;;;;;;;;;;AC1BA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAC2C;AACD;AACM;AACT;AACvC;AACO;AACP,QAAQ,mEAAU;AAClB;AACA;AACA;AACA;AACA,0DAA0D,0DAAG,kBAAkB,QAAQ,6DAAO,mEAAmE,EAAE;AACnK;AACA,eAAe,sDAAU;AACzB;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;;;;;;;;;;;;;AC9DA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAC2C;AACD;AACM;AACT;AAChC;AACP;AACA,gEAAgE,0DAAG,kBAAkB,QAAQ,6DAAO,mEAAmE,EAAE;AACzK;AACA,eAAe,sDAAU;AACzB;AACA;AACA,4BAA4B,uBAAuB;AACnD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,mEAAU;AACvB;AACA;AACA,4BAA4B,yCAAyC;AACrE,KAAK;AACL;AACA;;;;;;;;;;;;;AC/BA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAC2C;AACI;AACkB;AACC;AAC3D;AACP;AACA;AACA;AACA;AACA,mBAAmB,sDAAU,CAAC,qFAAmB;AACjD;AACA;AACA,mBAAmB,sDAAU;AAC7B,0BAA0B,0DAAY;AACtC;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA,iCAAiC,yDAAe;AAChD;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;;;;;;;;;;;;;ACnDA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAC2C;AACI;AACwB;AACD;AAC/D;AACP;AACA,mBAAmB,sDAAU,CAAC,yFAAqB;AACnD;AACA;AACA,mBAAmB,sDAAU;AAC7B,0BAA0B,0DAAY;AACtC;AACA,uCAAuC,6DAAiB;AACxD;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;AAAA;AAAA;AAAA;AAAA;AAC2C;AACI;AACiB;AACzD;AACP;AACA,mBAAmB,sDAAU,CAAC,mFAAkB;AAChD;AACA;AACA,mBAAmB,sDAAU;AAC7B,0BAA0B,0DAAY;AACtC;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;AAAA;AAAA;AAAA;AAAA;AAC2C;AACC;AACM;AAC3C;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mDAAmD,uDAAQ;AAC3D;AACA;AACA,yDAAyD,qEAAW;AACpE;AACA,yBAAyB,uDAAQ;AACjC;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,sDAAU;AACzB;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;AAAA;AAAA;AAAA;AACgC;AACA;AACzB;AACP;AACA,qBAAqB,4CAAK;AAC1B;AACA;AACA,sBAAsB,4CAAK;AAC3B;AACA,WAAW,oDAAK,cAAc,+CAA+C,EAAE;AAC/E;AACA;;;;;;;;;;;;;ACZA;AAAA;AAAA;AAAA;AAAA;AAAA;AAC2C;AACA;AACG;AACvC;AACP;AACA;AACA;AACA;AACA,oBAAoB,sDAAK;AACzB;AACA,SAAS,iEAAS;AAClB;AACA;AACA;AACA,oBAAoB,sDAAK;AACzB;AACA,eAAe,sDAAU;AACzB,6DAA6D,qDAAqD;AAClH;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,mBAAmB,+DAA+D;AAClF;AACA;;;;;;;;;;;;;AC3BA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAC2C;AACO;AACD;AACT;AACjC;AACP;AACA,oBAAoB,uBAAuB;AAC3C;AACA;AACA;AACA;AACA;AACA,QAAQ,qEAAW;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oFAAoF,sDAAU;AAC9F;AACA;AACA,WAAW,oEAAQ,aAAa,4DAAS;AACzC;AACA;;;;;;;;;;;;;AC3BA;AAAA;AAAA;AAAA;AAAA;AAAA;AAC2C;AACP;AAC7B,8BAA8B,sDAAU,CAAC,+CAAI;AAC7C;AACP;AACA;AACA;;;;;;;;;;;;;ACPA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AACkD;AACV;AACR;AACE;AAC3B;AACP;AACA,oBAAoB,uBAAuB;AAC3C;AACA;AACA;AACA,QAAQ,qEAAW;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB,oDAAK;AACxB;AACA,+BAA+B,4DAAS,oBAAoB,sDAAM;AAClE;AACA,mBAAmB,4DAAS;AAC5B;AACA;AACA;;;;;;;;;;;;;AC1BA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAC2C;AACb;AACY;AACV;AACzB;AACP;AACA,oBAAoB,uBAAuB;AAC3C;AACA;AACA;AACA,eAAe,4CAAK;AACpB;AACA;AACA,gCAAgC,6DAAO;AACvC;AACA;AACA,eAAe,sDAAU;AACzB,mCAAmC,yFAAyF;AAC5H,eAAe,kDAAI;AACnB,oCAAoC,wBAAwB,EAAE;AAC9D;AACA;AACA,SAAS;AACT,KAAK;AACL;AACA;;;;;;;;;;;;;AC1BA;AAAA;AAAA;AAAA;AAAA;AAAA;AAC2C;AACI;AACxC;AACP;AACA,mBAAmB,sDAAU;AAC7B;AACA,2BAA2B,uCAAuC;AAClE;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,mBAAmB,sDAAU;AAC7B;AACA,mCAAmC,0DAAY;AAC/C,8DAA8D,qFAAqF;AACnJ;AACA,SAAS;AACT;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACA,4CAA4C,6FAA6F;AACzI;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;ACtCA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AACiC;AACS;AACF;AACa;AACS;AACvD;AACP;AACA,oBAAoB,uBAAuB;AAC3C;AACA;AACA;AACA,YAAY,6DAAO;AACnB;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,4DAAS;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACuB;AACxB;AACA,IAAI,+CAAiB;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,2BAA2B;AACtD;AACA,mCAAmC,iFAAiB;AACpD;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,CAAC,gEAAe;AACS;AAC1B;;;;;;;;;;;;;AC7EA;AAAA;AAAA;AAAA;AAAA;AAC2C;AACpC;AACP;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,sDAAU;AACzB;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA,KAAK;AACL;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;AC9CA;AAAA;AAAA;AAAA;AAC2C;AACpC;AACP,qBAAqB,sDAAU;AAC/B;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;;;;;;;;;;;;;ACXA;AAAA;AAAA;AAAA;AAC2C;AACpC;AACP;AACA,mBAAmB,sDAAU,wBAAwB,gCAAgC,EAAE;AACvF;AACA;AACA,mBAAmB,sDAAU,wBAAwB,yCAAyC,uCAAuC,EAAE,EAAE;AACzI;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;ACdA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAC2C;AACA;AACG;AACI;AAC3C;AACP;AACA;AACA;AACA;AACA,QAAQ,iEAAS;AACjB;AACA;AACA,aAAa,qEAAW;AACxB;AACA;AACA,SAAS,qEAAW;AACpB,oBAAoB,sDAAK;AACzB;AACA,eAAe,sDAAU;AACzB,kBAAkB,iEAAS;AAC3B;AACA;AACA;AACA;AACA,SAAS;AACT,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;ACxCA;AAAA;AAAA;AAAA;AAAA;AAAA;AAC2C;AACb;AACE;AACzB;AACP,eAAe,sDAAU;AACzB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8BAA8B,kDAAI,WAAW,4CAAK;AAClD;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;;;;;;;;;;;;;AChCA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AACiC;AACO;AACE;AACC;AACU;AACS;AACe;AACtE;AACP;AACA,oBAAoB,uBAAuB;AAC3C;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,4DAAS;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACsB;AACvB;AACA,IAAI,+CAAiB;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY,6DAAO;AACnB;AACA;AACA,8BAA8B,kEAAe;AAC7C,oDAAoD,kEAAe;AACnE;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,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,CAAC,CAAC,sDAAU;AACa;AACzB;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,kCAAkC,kEAAe;AACjD;AACA;AACA;AACA;AACA;AACA,kCAAkC,+BAA+B,IAAI;AACrE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA,IAAI,+CAAiB;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gCAAgC,kEAAe;AAC/C;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,eAAe,iFAAiB;AAChC;AACA;AACA,CAAC,CAAC,gEAAe;AACjB;;;;;;;;;;;;;ACvNA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AACiC;AACW;AACM;AACG;AACS;AACvD;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA,IAAI,+CAAiB;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,+DAAQ;AACnC,6BAA6B,6DAAW;AACxC,uCAAuC,6DAAW;AAClD;AACA;AACA,wCAAwC,iFAAiB;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;AACA;AACA;AACA;AACA;AACA,CAAC,CAAC,gEAAe;AACjB;;;;;;;;;;;;;ACpEA;AAAA;AAAA;AAAA;AAAA;AAAA;AAC2C;AACX;AACY;AACrC;AACP;AACA,oBAAoB,sDAAK;AACzB;AACA,WAAW,oDAAK,cAAc,QAAQ,+DAAK,sBAAsB,EAAE;AACnE;AACA;;;;;;;;;;;;;ACVA;AAAA;AAAA;AAAA;AAAA;AAAA;AACiC;AACoB;AACS;AACvD;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA,IAAI,+CAAiB;AACrB;AACA;AACA;AACA,kBAAkB,iFAAiB;AACnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC,CAAC,gEAAe;AACjB;;;;;;;;;;;;;ACpCA;AAAA;AAAA;AAAA;AAAA;AACiC;AACU;AACpC;AACP;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,IAAI,+CAAiB;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC,CAAC,sDAAU;AACZ;AACA,IAAI,+CAAiB;AACrB;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,CAAC,sDAAU;AACZ;;;;;;;;;;;;;ACzFA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AACiC;AACU;AACA;AACO;AAC3C;AACP;AACA,oBAAoB,sDAAK;AACzB,QAAQ,qEAAW;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,CAAC;AACD;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA,IAAI,+CAAiB;AACrB;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,qCAAqC;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC,CAAC,sDAAU;AACZ;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;;;;;;;;;;;;;ACnJA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AACiC;AACc;AACe;AACT;AAC9C;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA,IAAI,+CAAiB;AACrB;AACA;AACA;AACA;AACA;AACA,kBAAkB,iFAAiB;AACnC;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,+BAA+B,0DAAY;AAC3C,uBAAuB;AACvB;AACA,gCAAgC,iFAAiB;AACjD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC,CAAC,gEAAe;AACjB;;;;;;;;;;;;;AC1GA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AACiC;AACc;AACH;AACM;AACG;AACS;AACvD;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA,IAAI,+CAAiB;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,8BAA8B,+DAAQ;AACtC,gCAAgC,6DAAW;AAC3C,uBAAuB,6DAAW;AAClC;AACA;AACA,sCAAsC,0DAAY;AAClD;AACA;AACA;AACA,oCAAoC,iFAAiB;AACrD;AACA;AACA;AACA;AACA,CAAC,CAAC,gEAAe;AACjB;;;;;;;;;;;;;ACjFA;AAAA;AAAA;AAAA;AAAA;AAAA;AACiC;AACoB;AACS;AACvD;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA,IAAI,+CAAiB;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB,iFAAiB;AACtC;AACA;AACA;AACA,CAAC,CAAC,gEAAe;AACjB;;;;;;;;;;;;;AC5CA;AAAA;AAAA;AAAA;AACoE;AAC7D;AACP,8BAA8B,wBAAwB,+EAAqB,WAAW;AACtF;AACA;;;;;;;;;;;;;ACLA;AAAA;AAAA;AAAA;AAAA;AAAA;AAC0C;AAC0B;AAC1B;AAC1C;AACO;AACP;AACA,oBAAoB,uBAAuB;AAC3C;AACA;AACA;AACA;AACA;AACA;AACA,oCAAoC,6DAAO;AAC3C;AACA;AACA,8BAA8B,yBAAyB,6DAAI,oCAAoC,+EAAqB,WAAW;AAC/H;AACA;;;;;;;;;;;;;ACnBA;AAAA;AAAA;AAAA;AAC8D;AACvD;AACP;AACA,oBAAoB,uBAAuB;AAC3C;AACA;AACA,8BAA8B,yBAAyB,yDAAY,8CAA8C;AACjH;AACA;;;;;;;;;;;;;ACTA;AAAA;AAAA;AAAA;AACsC;AAC/B;AACP,WAAW,0DAAQ;AACnB;AACA;;;;;;;;;;;;;ACLA;AAAA;AAAA;AAAA;AACsC;AAC/B;AACP,WAAW,0DAAQ;AACnB;AACA;;;;;;;;;;;;;ACLA;AAAA;AAAA;AAAA;AACwC;AACjC;AACP,WAAW,4DAAS,cAAc,wBAAwB,EAAE;AAC5D;AACA;;;;;;;;;;;;;ACLA;AAAA;AAAA;AAAA;AAAA;AACiC;AACU;AACpC;AACP,8BAA8B,0DAA0D;AACxF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA,IAAI,+CAAiB;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,CAAC,CAAC,sDAAU;AACZ;;;;;;;;;;;;;ACrDA;AAAA;AAAA;AAAA;AAAA;AAAA;AACiC;AACoB;AACS;AACvD;AACP,8BAA8B,4DAA4D;AAC1F;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA,IAAI,+CAAiB;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,uBAAuB,iFAAiB;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,CAAC,CAAC,gEAAe;AACjB;;;;;;;;;;;;;AC3EA;AAAA;AAAA;AAAA;AAAA;AAAA;AACiC;AACU;AACA;AACpC;AACP;AACA,oBAAoB,sDAAK;AACzB;AACA,8BAA8B,kEAAkE;AAChG;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA,IAAI,+CAAiB;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,CAAC,CAAC,sDAAU;AACZ;AACA;AACA;AACA;;;;;;;;;;;;;AC/DA;AAAA;AAAA;AAAA;AAAA;AACiC;AACU;AACpC;AACP;AACA;AACA;AACA,8BAA8B,8DAA8D;AAC5F;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA,IAAI,+CAAiB;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC,CAAC,sDAAU;AACZ;;;;;;;;;;;;;ACtCA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AACiC;AACU;AACH;AACG;AACI;AACxC;AACP;AACA,oBAAoB,sDAAK;AACzB;AACA,wBAAwB,2DAAM;AAC9B;AACA,8BAA8B,4DAA4D;AAC1F;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA,IAAI,+CAAiB;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,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kCAAkC,0DAAY;AAC9C;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kCAAkC,0DAAY;AAC9C;AACA;AACA,CAAC,CAAC,sDAAU;AACZ;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;;;;;;;;;;;;;ACzFA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AACiC;AACU;AACA;AACU;AACS;AACvD;AACP;AACA;AACA;AACA;AACA;AACA;AACA,8BAA8B,kEAAkE;AAChG;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA,IAAI,+CAAiB;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,mCAAmC,iFAAiB;AACpD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC,CAAC,gEAAe;AACjB;AACA,IAAI,+CAAiB;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC,CAAC,sDAAU;AACZ;AACA,IAAI,+CAAiB;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,CAAC,CAAC,sDAAU;AACZ;;;;;;;;;;;;;AC9HA;AAAA;AAAA;AAAA;AAAA;AACiC;AACU;AACpC;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA,IAAI,+CAAiB;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC,CAAC,sDAAU;AACZ;;;;;;;;;;;;;AC1BA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AACiC;AACoB;AACS;AACvD;AACP,8BAA8B,gEAAgE;AAC9F;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA,IAAI,+CAAiB;AACrB;AACA;AACA;AACA;AACA;AACA,sBAAsB,iFAAiB;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,CAAC,CAAC,gEAAe;AACa;AAC9B;;;;;;;;;;;;;AChEA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AACiC;AACU;AACC;AACM;AAC3C;AACP,8BAA8B,4EAA4E;AAC1G;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA,IAAI,+CAAiB;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB,+DAAQ;AAC1B,wBAAwB,6DAAW;AACnC,8CAA8C,6DAAW;AACzD;AACA;AACA;AACA;AACA,qBAAqB,+DAAQ;AAC7B,2BAA2B,6DAAW;AACtC,8CAA8C,6DAAW;AACzD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC,CAAC,sDAAU;AACZ;;;;;;;;;;;;;AC1DA;AAAA;AAAA;AAAA;AAC8D;AACvD;AACP,WAAW,kFAAoB,kBAAkB,8DAA8D,EAAE;AACjH;AACA;;;;;;;;;;;;;ACLA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAC0E;AACxC;AACY;AACI;AACpB;AACvB;AACP;AACA,kBAAkB,qFAAuB;AACzC;AACA;AACA;AACA,2BAA2B,sDAAM,kBAAkB,oBAAoB,EAAE,GAAG,kDAAI;AAChF,cAAc,sEAAc;AAC5B,cAAc,kEAAY,cAAc,YAAY,qFAAuB,GAAG,EAAE;AAChF;AACA;AACA;;;;;;;;;;;;;ACjBA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AACoD;AACN;AACF;AACkB;AACZ;AAC3C;AACP;AACA,oBAAoB,uBAAuB;AAC3C;AACA;AACA;AACA;AACA,YAAY,qEAAW;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB,iEAAY,SAAS,iEAAM;AAC9C;AACA;AACA,mBAAmB,iEAAY,SAAS,uEAAS;AACjD;AACA;AACA,mBAAmB,iEAAY,SAAS,+DAAK;AAC7C;AACA;AACA;AACA;;;;;;;;;;;;;AC/BA;AAAA;AAAA;AAAA;AAAA;AACiC;AACU;AACpC;AACP,8BAA8B,mEAAmE;AACjG;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA,IAAI,+CAAiB;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,CAAC,CAAC,sDAAU;AACZ;;;;;;;;;;;;;AClDA;AAAA;AAAA;AAAA;AAAA;AAAA;AACiC;AACoB;AACS;AACvD;AACP,8BAA8B,+CAA+C;AAC7E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA,IAAI,+CAAiB;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB,iFAAiB;AACtC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC,CAAC,gEAAe;AACjB;;;;;;;;;;;;;AC5CA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AACiC;AACoB;AACS;AAClC;AACc;AACnC;AACP;AACA,kCAAkC,gDAAgD,QAAQ,6DAAI,qBAAqB,gDAAG,mBAAmB,oCAAoC,EAAE,GAAG,EAAE,GAAG;AACvL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA,IAAI,+CAAiB;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB,iFAAiB;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,CAAC,CAAC,gEAAe;AACjB;;;;;;;;;;;;;ACvEA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AACiC;AACW;AACM;AACG;AACS;AACvD;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8BAA8B,wEAAwE;AACtG;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACyB;AAC1B;AACA,IAAI,+CAAiB;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,yBAAyB,+DAAQ;AACjC,2BAA2B,6DAAW;AACtC,kCAAkC,6DAAW;AAC7C;AACA;AACA;AACA;AACA;AACA,6BAA6B;AAC7B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,iFAAiB;AAClC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC,CAAC,gEAAe;AACW;AAC5B;;;;;;;;;;;;;ACnGA;AAAA;AAAA;AAAA;AAAA;AACiC;AACU;AACpC;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA,IAAI,+CAAiB;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC,CAAC,sDAAU;AACZ;;;;;;;;;;;;;AC1CA;AAAA;AAAA;AAAA;AAAA;AAAA;AACiC;AACU;AACI;AACxC;AACP,8BAA8B,mDAAmD;AACjF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA,IAAI,+CAAiB;AACrB;AACA;AACA,sBAAsB,0DAAY;AAClC;AACA;AACA;AACA,CAAC,CAAC,sDAAU;AACZ;;;;;;;;;;;;;ACzBA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AACiC;AACU;AACpC;AACP;AACA;AACA;AACA,8BAA8B,8EAA8E;AAC5G;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AAC4B;AAC7B;AACA,IAAI,+CAAiB;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,CAAC,CAAC,sDAAU;AACmB;AAC/B;;;;;;;;;;;;;ACzDA;AAAA;AAAA;AAAA;AACsD;AAC/C;AACP,8BAA8B,wBAAwB,iEAAiB,oCAAoC;AAC3G;AACA;;;;;;;;;;;;;ACLA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AACgD;AACd;AACJ;AACoB;AACJ;AACF;AACrC;AACP;AACA,8BAA8B,gCAAgC,sDAAM,kBAAkB,gCAAgC,EAAE,IAAI,uDAAQ,EAAE,kDAAI,uBAAuB,sEAAc,iBAAiB,kEAAY,cAAc,YAAY,2DAAU,GAAG,EAAE,GAAG;AACxP;AACA;;;;;;;;;;;;;ACXA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AACiC;AACU;AACI;AACJ;AACN;AAC9B;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA,IAAI,+CAAiB;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,yEAAyE,gDAAO;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,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,CAAC,sDAAU;AACZ;AACA,IAAI,+CAAiB;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC,CAAC,sDAAU;AACZ;AACA,IAAI,+CAAiB;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B,0DAAY;AAC3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC,CAAC,sDAAU;AACiB;AAC7B;AACA,IAAI,+CAAiB;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC,CAAC,0DAAY;AACd;;;;;;;;;;;;;ACrLA;AAAA;AAAA;AAAA;AAAA;AACiC;AACU;AACpC;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA,IAAI,+CAAiB;AACrB;AACA;AACA;AACA;AACA;AACA;AACA,CAAC,CAAC,sDAAU;AACZ;;;;;;;;;;;;;ACzBA;AAAA;AAAA;AAAA;AAAA;AACiC;AACU;AACpC;AACP,8BAA8B,2CAA2C;AACzE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA,IAAI,+CAAiB;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC,CAAC,sDAAU;AACZ;;;;;;;;;;;;;AChCA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AACgD;AACd;AACI;AACQ;AACI;AACN;AACrC;AACP;AACA,8BAA8B,gCAAgC,sDAAM,kBAAkB,gCAAgC,EAAE,IAAI,uDAAQ,EAAE,0DAAQ,uBAAuB,sEAAc,iBAAiB,kEAAY,cAAc,YAAY,2DAAU,GAAG,EAAE,GAAG;AAC5P;AACA;;;;;;;;;;;;;ACXA;AAAA;AAAA;AAAA;AAAA;AAAA;AACiC;AACU;AACpC;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACsB;AACvB;AACA,IAAI,+CAAiB;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC,CAAC,sDAAU;AACZ;;;;;;;;;;;;;AC5CA;AAAA;AAAA;AAAA;AAAA;AACiC;AACU;AACpC;AACP,8BAA8B,8CAA8C;AAC5E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA,IAAI,+CAAiB;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC,CAAC,sDAAU;AACZ;;;;;;;;;;;;;AC3BA;AAAA;AAAA;AAAA;AAAA;AAAA;AACiC;AACU;AACI;AACxC;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA,IAAI,+CAAiB;AACrB;AACA;AACA;AACA;AACA,8BAA8B,0DAAY;AAC1C;AACA;AACA;AACA,yBAAyB,0DAAY;AACrC;AACA;AACA;AACA;AACA,yBAAyB,0DAAY;AACrC;AACA;AACA;AACA,CAAC,CAAC,sDAAU;AACZ;;;;;;;;;;;;;ACrCA;AAAA;AAAA;AAAA;AACkC;AAC3B;AACP;AACA,2BAA2B,mCAAmC;AAC9D,2BAA2B,sBAAsB;AACjD,WAAW,sDAAM;AACjB;AACA;;;;;;;;;;;;;ACRA;AAAA;AAAA;AAAA;AAC2D;AACpD;AACP;AACA,oBAAoB,uBAAuB;AAC3C;AACA;AACA,8BAA8B,yBAAyB,uDAAW,8CAA8C;AAChH;AACA;;;;;;;;;;;;;ACTA;AAAA;AAAA;AAAA;AAAA;AACsC;AACM;AACrC;AACP;AACA;AACA;AACA,WAAW,0DAAQ,CAAC,uDAAQ;AAC5B;AACA;;;;;;;;;;;;;ACTA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AACiC;AAC6B;AACT;AACzB;AACc;AACnC;AACP;AACA;AACA;AACA;AACA,kCAAkC,8CAA8C,QAAQ,6DAAI,qBAAqB,gDAAG,mBAAmB,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;AAC2B;AAC5B;AACA,IAAI,+CAAiB;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,iBAAiB,iFAAiB;AAClC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC,CAAC,gEAAe;AACa;AAC9B;;;;;;;;;;;;;AC9FA;AAAA;AAAA;AAAA;AACsC;AAC/B;AACP;AACA;AACA;AACA;AACA,eAAe,0DAAQ,cAAc,wBAAwB,EAAE;AAC/D;AACA;AACA;AACA;AACA,WAAW,0DAAQ,cAAc,wBAAwB,EAAE;AAC3D;AACA;;;;;;;;;;;;;ACdA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AACiC;AACW;AACM;AACY;AACT;AAC9C;AACP;AACA;AACA;AACA,8BAA8B,0EAA0E;AACxG;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AAC4B;AAC7B;AACA,IAAI,+CAAiB;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sBAAsB,+DAAQ;AAC9B;AACA,wBAAwB,6DAAW;AACnC,kCAAkC,6DAAW;AAC7C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,iFAAiB;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,CAAC,CAAC,gEAAe;AACc;AAC/B;;;;;;;;;;;;;AC1FA;AAAA;AAAA;AAAA;AACkC;AAC3B;AACP;AACA,2BAA2B,mCAAmC;AAC9D,2BAA2B,sBAAsB;AACjD,WAAW,sDAAM;AACjB;AACA;;;;;;;;;;;;;ACRA;AAAA;AAAA;AAAA;AAAA;AACsF;AAC/E;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gDAAgD,iGAA+B;AAC/E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AAC4B;AAC7B;;;;;;;;;;;;;ACrCA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AACiC;AACU;AACI;AACxC;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AAC4B;AAC7B;AACA,IAAI,+CAAiB;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6BAA6B,0DAAY;AACzC;AACA;AACA,6BAA6B,0DAAY;AACzC;AACA;AACA,6BAA6B,0DAAY;AACzC;AACA;AACA,CAAC,CAAC,sDAAU;AACmB;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AAC2B;AAC5B;;;;;;;;;;;;;ACjEA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AACiC;AACS;AACA;AACW;AACS;AACvD;AACP;AACA,oBAAoB,uBAAuB;AAC3C;AACA;AACA,oCAAoC,6DAAO;AAC3C;AACA;AACA,8BAA8B,gEAAgE;AAC9F;AACO;AACP;AACA,oBAAoB,uBAAuB;AAC3C;AACA;AACA;AACA,oCAAoC,6DAAO;AAC3C;AACA;AACA;AACA,WAAW,6DAAI;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA,IAAI,+CAAiB;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB,iFAAiB;AACtC;AACA;AACA;AACA;AACA;AACA;AACA,CAAC,CAAC,gEAAe;AACjB;;;;;;;;;;;;;ACpEA;AAAA;AAAA;AAAA;AAAA;AACiC;AACU;AACpC;AACP,8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AACA,oBAAoB,uBAAuB;AAC3C;AACA;AACA;AACA,wCAAwC,6DAAO;AAC/C;AACA;AACA,gCAAgC,qDAAU;AAC1C;AACA;AACA;;;;;;;;;;;;;ACfA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAC8B;AACQ;AACY;AACd;AAC7B;AACP;AACA;AACA,mBAAmB,uDAAI,CAAC,kDAAI,qBAAqB,0DAAQ,KAAK,sEAAc;AAC5E;AACA;AACA;AACA,eAAe,uDAAI,CAAC,kDAAI;AACxB;AACA,SAAS,GAAG,0DAAQ;AACpB;AACA;AACA;;;;;;;;;;;;;ACjBA;AAAA;AAAA;AAAA;AAAA;AACiC;AACU;AACpC;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA,IAAI,+CAAiB;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,CAAC,CAAC,sDAAU;AACZ;;;;;;;;;;;;;ACzDA;AAAA;AAAA;AAAA;AAAA;AAAA;AACiC;AACU;AACC;AACrC;AACP;AACA;AACA;AACA;AACA;AACA,mBAAmB,+DAAK;AACxB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA,IAAI,+CAAiB;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC,CAAC,sDAAU;AACZ;;;;;;;;;;;;;ACpDA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AACiC;AACI;AACO;AACM;AACG;AACS;AACvD;AACP,8BAA8B,sDAAsD;AACpF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA,IAAI,+CAAiB;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,iCAAiC,gDAAO;AACxC,sBAAsB,+DAAQ;AAC9B,wBAAwB,6DAAW;AACnC;AACA;AACA;AACA,mCAAmC,iFAAiB;AACpD;AACA;AACA,CAAC,CAAC,gEAAe;AACjB;;;;;;;;;;;;;AChFA;AAAA;AAAA;AAAA;AAAA;AACiC;AACU;AACpC;AACP;AACA;AACA;AACA,8BAA8B,sDAAsD;AACpF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA,IAAI,+CAAiB;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC,CAAC,sDAAU;AACZ;;;;;;;;;;;;;ACzCA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AACiC;AACI;AACO;AACM;AACG;AACS;AACvD;AACP,8BAA8B,6DAA6D;AAC3F;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA,IAAI,+CAAiB;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6BAA6B,gDAAO;AACpC,0BAA0B,+DAAQ;AAClC,gCAAgC,6DAAW;AAC3C,6DAA6D,6DAAW;AACxE;AACA,sCAAsC,iFAAiB;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,CAAC,CAAC,gEAAe;AACjB;;;;;;;;;;;;;ACzEA;AAAA;AAAA;AAAA;AAAA;AAAA;AACiC;AACoB;AACS;AACvD;AACP,8BAA8B,kDAAkD;AAChF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yBAAyB,iFAAiB;AAC1C;AACA;AACA;AACA,CAAC;AACD;AACA,IAAI,+CAAiB;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC,CAAC,gEAAe;AACjB;;;;;;;;;;;;;AC5CA;AAAA;AAAA;AAAA;AAAA;AAAA;AACiC;AACU;AACA;AACpC;AACP;AACA,oBAAoB,sDAAK;AACzB;AACA,8BAA8B,+DAA+D;AAC7F;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA,IAAI,+CAAiB;AACrB;AACA;AACA;AACA;AACA;AACA,oEAAoE,oCAAoC;AACxG;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC,CAAC,sDAAU;AACZ;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;AC/CA;AAAA;AAAA;AAAA;AAAA;AACiC;AACU;AACpC;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA,IAAI,+CAAiB;AACrB;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,CAAC,sDAAU;AACZ;;;;;;;;;;;;;ACtEA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AACiC;AACU;AACC;AACM;AAC3C;AACP,8BAA8B,oEAAoE;AAClG;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACgC;AACjC;AACA,IAAI,+CAAiB;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,2BAA2B,+DAAQ;AACnC,iCAAiC,6DAAW;AAC5C,2CAA2C,6DAAW;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,CAAC,CAAC,sDAAU;AACuB;AACnC;AACA,IAAI,+CAAiB;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC,CAAC,sDAAU;AACZ;;;;;;;;;;;;;ACvGA;AAAA;AAAA;AAAA;AAAA;AAAA;AACwC;AACF;AACD;AACrC;AACA,eAAe,gDAAO;AACtB;AACO;AACP,8BAA8B,QAAQ,0DAAQ,GAAG,4DAAS,+BAA+B;AACzF;AACA;;;;;;;;;;;;;ACVA;AAAA;AAAA;AAAA;AACiD;AAC1C;AACP,8BAA8B,4EAA4E;AAC1G;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0BAA0B,4DAAa;AACvC;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;;;;;;;;;;;;;ACtCA;AAAA;AAAA;AAAA;AAAA;AAAA;AACiC;AACU;AACK;AACzC;AACP,8BAA8B,2DAA2D;AACzF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA,IAAI,+CAAiB;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,kCAAkC,2DAAU;AAC5C;AACA;AACA;AACA,CAAC,CAAC,sDAAU;AACZ;;;;;;;;;;;;;ACnEA;AAAA;AAAA;AAAA;AAAA;AACiC;AACU;AACpC;AACP,8BAA8B,6CAA6C;AAC3E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA,IAAI,+CAAiB;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC,CAAC,sDAAU;AACZ;;;;;;;;;;;;;AC9BA;AAAA;AAAA;AAAA;AAAA;AAAA;AACiC;AACU;AAC+B;AACnE;AACP,8BAA8B,iDAAiD;AAC/E;AACA;AACA;AACA;AACA;AACA,sBAAsB,qFAAuB;AAC7C;AACA;AACA;AACA;AACA,wCAAwC,sDAAU;AAClD;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA,IAAI,+CAAiB;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC,CAAC,sDAAU;AACZ;;;;;;;;;;;;;ACjDA;AAAA;AAAA;AAAA;AAAA;AAAA;AACiC;AACoB;AACS;AACvD;AACP,8BAA8B,qDAAqD;AACnF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA,IAAI,+CAAiB;AACrB;AACA;AACA;AACA,4CAA4C,iFAAiB;AAC7D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC,CAAC,gEAAe;AACjB;;;;;;;;;;;;;ACvCA;AAAA;AAAA;AAAA;AAAA;AACiC;AACU;AACpC;AACP,8BAA8B,sDAAsD;AACpF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA,IAAI,+CAAiB;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,CAAC,CAAC,sDAAU;AACZ;;;;;;;;;;;;;AC5CA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AACoD;AACN;AACF;AACkB;AACZ;AAC3C;AACP;AACA,oBAAoB,uBAAuB;AAC3C;AACA;AACA;AACA;AACA,YAAY,qEAAW;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB,iEAAY,CAAC,iEAAM;AACtC;AACA;AACA,mBAAmB,iEAAY,CAAC,uEAAS;AACzC;AACA;AACA,mBAAmB,iEAAY,CAAC,+DAAK;AACrC;AACA;AACA;AACA;;;;;;;;;;;;;AC/BA;AAAA;AAAA;AAAA;AAC4E;AACrE;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB,uFAAqB;AACxC;AACA;AACA,CAAC;AACD;;;;;;;;;;;;;ACpBA;AAAA;AAAA;AAAA;AAAA;AACwC;AACI;AACrC;AACP,WAAW,4DAAS,CAAC,uDAAQ;AAC7B;AACA;;;;;;;;;;;;;ACNA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AACiC;AACoB;AACS;AAClC;AACc;AACnC;AACP;AACA,kCAAkC,+CAA+C,QAAQ,6DAAI,qBAAqB,gDAAG,mBAAmB,oCAAoC,EAAE,GAAG,EAAE,GAAG;AACtL;AACA,8BAA8B,oDAAoD;AAClF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA,IAAI,+CAAiB;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0CAA0C,iFAAiB;AAC3D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC,CAAC,gEAAe;AACjB;;;;;;;;;;;;;ACrEA;AAAA;AAAA;AAAA;AACwC;AACjC;AACP,4BAA4B,4DAAS,cAAc,wBAAwB,EAAE,oBAAoB,4DAAS,cAAc,wBAAwB,EAAE;AAClJ;AACA;;;;;;;;;;;;;ACLA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AACiC;AACU;AAC+B;AAC9B;AACrC;AACP;AACA;AACA,mBAAmB,+DAAK;AACxB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sBAAsB,qFAAuB;AAC7C;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA,IAAI,+CAAiB;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC,CAAC,sDAAU;AACZ;;;;;;;;;;;;;AChDA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AACiC;AACU;AAC+B;AAC9B;AACrC;AACP;AACA;AACA,mBAAmB,+DAAK;AACxB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sBAAsB,qFAAuB;AAC7C;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA,IAAI,+CAAiB;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,2BAA2B,WAAW;AACtC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC,CAAC,sDAAU;AACZ;;;;;;;;;;;;;AC/DA;AAAA;AAAA;AAAA;AAAA;AAAA;AACiC;AACoB;AACS;AACvD;AACP,8BAA8B,qDAAqD;AACnF;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mCAAmC,iFAAiB;AACpD;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA,IAAI,+CAAiB;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC,CAAC,gEAAe;AACjB;;;;;;;;;;;;;AClCA;AAAA;AAAA;AAAA;AAAA;AACiC;AACU;AACpC;AACP,8BAA8B,sDAAsD;AACpF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA,IAAI,+CAAiB;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,CAAC,CAAC,sDAAU;AACZ;;;;;;;;;;;;;AC9CA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AACiC;AACU;AACP;AACY;AACzC;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA,IAAI,+CAAiB;AACrB;AACA;AACA,yBAAyB,+CAAI;AAC7B,0BAA0B,+CAAI;AAC9B,6BAA6B,+CAAI;AACjC,mCAAmC,+CAAI;AACvC,yCAAyC,+CAAI;AAC7C,YAAY,mEAAU;AACtB;AACA;AACA;AACA;AACA;AACA,oDAAoD,+CAAI;AACxD,sDAAsD,+CAAI;AAC1D,4DAA4D,+CAAI;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,CAAC,CAAC,sDAAU;AACZ;;;;;;;;;;;;;AC1EA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AACiC;AACoB;AACS;AACvD;AACP;AACA;AACA;AACO;AACP;AACA;AACA;AACA,8BAA8B,6FAA6F;AAC3H;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA,IAAI,+CAAiB;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,uCAAuC,iFAAiB;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,CAAC,CAAC,gEAAe;AACjB;;;;;;;;;;;;;AC1FA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AACiC;AACU;AACA;AACQ;AAC5C;AACP;AACA,oBAAoB,sDAAK;AACzB;AACA;AACA,iBAAiB,+DAAqB;AACtC;AACA,8BAA8B,oGAAoG;AAClI;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA,IAAI,+CAAiB;AACrB;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,CAAC,sDAAU;AACZ;AACA;AACA;AACA;AACA;;;;;;;;;;;;;AChFA;AAAA;AAAA;AAAA;AAAA;AAC4B;AACoB;AACzC;AACP;AACA;AACA;AACA,WAAW,gDAAG;AACd;AACA,2BAA2B,sBAAsB,EAAE;AACnD;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA,eAAe,2DAAU;AACzB;AACA;;;;;;;;;;;;;ACpBA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAC2C;AACb;AACc;AAChB;AACrB;AACP;AACA,oBAAoB,sDAAK;AACzB;AACA;AACA,eAAe,+DAAK;AACpB,+BAA+B,kDAAI;AACnC;AACA,yBAAyB,wDAAwD;AACjF,aAAa,GAAG,8DAA8D,GAAG,gDAAG;AACpF;AACA;AACA,aAAa;AACb,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACuB;AACxB;;;;;;;;;;;;;AC7BA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAC2C;AACS;AACR;AACU;AAC/C;AACP;AACA,oBAAoB,sDAAK;AACzB;AACA,WAAW,gEAAW,MAAM,yEAAU,KAAK,+DAAY;AACvD;AACA;;;;;;;;;;;;;ACXA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AACiC;AACU;AACH;AACa;AACS;AACvD;AACP;AACA,oBAAoB,sDAAK;AACzB;AACA;AACA,8BAA8B,2DAAM;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA,IAAI,+CAAiB;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,iFAAiB;AACxC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC,CAAC,gEAAe;AACjB;;;;;;;;;;;;;ACnEA;AAAA;AAAA;AAAA;AAAA;AAAA;AAC2C;AACf;AACrB;AACP;AACA,oBAAoB,sDAAK;AACzB;AACA,WAAW,gDAAG,mBAAmB,8CAA8C,EAAE;AACjF;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACoB;AACrB;;;;;;;;;;;;;ACjBA;AAAA;AAAA;AAAA;AACkC;AAClC;AACA;AACA;AACA;AACA;AACA;AACA;AACO;AACP,WAAW,sDAAM;AACjB;AACA;;;;;;;;;;;;;ACZA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AACiC;AACI;AACgB;AACS;AACvD;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iCAAiC,iFAAiB;AAClD;AACA;AACA;AACA;AACA,CAAC;AACD;AACA,IAAI,+CAAiB;AACrB;AACA;AACA,2BAA2B,gDAAO;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,0CAA0C,gDAAO;AACjD;AACA;AACA;AACA,CAAC,CAAC,gEAAe;AACjB;;;;;;;;;;;;;AClEA;AAAA;AAAA;AAAA;AAAA;AAAA;AACiC;AACU;AACN;AAC9B;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA,IAAI,+CAAiB;AACrB;AACA;AACA;AACA;AACA;AACA,6BAA6B,gDAAO;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,yBAAyB;AAChD;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B,gDAAO;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,CAAC,CAAC,sDAAU;AACZ;;;;;;;;;;;;;AC7EA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AACiC;AACI;AACM;AACA;AACG;AACI;AAC3C;AACP,oBAAoB,sDAAK;AACzB;AACA;AACA,QAAQ,qEAAW;AACnB;AACA;AACA,QAAQ,qEAAW;AACnB;AACA;AACA,aAAa,iEAAS;AACtB;AACA;AACA,QAAQ,qEAAW;AACnB;AACA;AACA,aAAa,iEAAS;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA,IAAI,+CAAiB;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,KAAK;AACL;AACA,CAAC,CAAC,gDAAO;AACT;AACA,IAAI,+CAAiB;AACrB;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,CAAC,sDAAU;AACZ;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;;;;;;;;;;;;;AC1JA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AACiC;AACI;AACU;AACH;AACM;AACG;AACS;AACvD;AACP,8BAA8B,yEAAyE;AACvG;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA,IAAI,+CAAiB;AACrB;AACA;AACA;AACA;AACA;AACA,2CAA2C,iFAAiB;AAC5D;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,kCAAkC,+DAAQ;AAC1C,oCAAoC,6DAAW;AAC/C,kCAAkC,6DAAW;AAC7C;AACA;AACA,mCAAmC,gDAAO;AAC1C,uCAAuC,0DAAY;AACnD,iCAAiC;AACjC;AACA,wCAAwC,iFAAiB;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC,CAAC,gEAAe;AACjB;;;;;;;;;;;;;ACjIA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AACiC;AACI;AACO;AACM;AACG;AACS;AACvD;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA,IAAI,+CAAiB;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,uCAAuC,gDAAO;AAC9C;AACA,8BAA8B,+DAAQ;AACtC,gCAAgC,6DAAW;AAC3C,sBAAsB,6DAAW;AACjC;AACA;AACA;AACA;AACA,gDAAgD,iFAAiB;AACjE;AACA;AACA;AACA,CAAC,CAAC,gEAAe;AACjB;;;;;;;;;;;;;ACnFA;AAAA;AAAA;AAAA;AAAA;AAAA;AACiC;AACoB;AACS;AACvD;AACP;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,IAAI,+CAAiB;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,SAAS;AAChC;AACA;AACA,uBAAuB,SAAS;AAChC;AACA,sBAAsB,iFAAiB;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,CAAC,CAAC,gEAAe;AACjB;;;;;;;;;;;;;AClFA;AAAA;AAAA;AAAA;AACqD;AAC9C;AACP;AACA,oBAAoB,uBAAuB;AAC3C;AACA;AACA;AACA,gCAAgC,mDAAS;AACzC;AACA;AACA;;;;;;;;;;;;;ACXA;AAAA;AAAA;AAAA;AACgD;AACzC;AACP,8BAA8B,wBAAwB,2DAAW,WAAW;AAC5E;AACA;;;;;;;;;;;;;ACLA;AAAA;AAAA;AAAA;AAAA;AACiC;AACc;AAC/C;AACA,IAAI,+CAAiB;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC,CAAC,0DAAY;AACI;AAClB;;;;;;;;;;;;;ACjBA;AAAA;AAAA;AAAA;AAAA;AACiC;AACW;AAC5C;AACA,IAAI,+CAAiB;AACrB;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,CAAC,CAAC,wDAAW;AACmB;AAChC;;;;;;;;;;;;;ACrCA;AAAA;AAAA;AAAA;AAAA;AACiC;AACiB;AAClD;AACA,IAAI,+CAAiB;AACrB;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,CAAC,8DAAc;AACmB;AACnC;;;;;;;;;;;;;AChCA;AAAA;AAAA;AAAA;AAAA;AAAA;AACiC;AACa;AACF;AAC5C;AACA,IAAI,+CAAiB;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6DAA6D,yDAAS;AACtE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY,yDAAS;AACrB;AACA;AACA;AACA;AACA;AACA,CAAC,CAAC,wDAAW;AACS;AACtB;;;;;;;;;;;;;ACtCA;AAAA;AAAA;AAAA;AAAA;AACiC;AACiB;AAClD;AACA,IAAI,+CAAiB;AACrB;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,CAAC,8DAAc;AACS;AACzB;;;;;;;;;;;;;AChCA;AAAA;AAAA;AAAA;AAAA;AACiC;AACC;AAClC;AACA,IAAI,+CAAiB;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;AACA;AACA;AACA;AACA;AACA;AACA;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,CAAC,8CAAM;AACe;AACvB;;;;;;;;;;;;;AC7FA;AAAA;AAAA;AAAA;AAAA;AACiC;AACQ;AACzC;AACA,IAAI,+CAAiB;AACrB;AACA;AACA,kBAAkB,oDAAS;AAC3B;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC,CAAC,oDAAS;AACe;AAC1B;;;;;;;;;;;;;ACzDA;AAAA;AAAA;AAAA;AAAA;AACiC;AACW;AAC5C;AACA,IAAI,+CAAiB;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,CAAC,CAAC,wDAAW;AACU;AACvB;;;;;;;;;;;;;ACxCA;AAAA;AAAA;AAAA;AAAA;AACiC;AACiB;AAClD;AACA,IAAI,+CAAiB;AACrB;AACA;AACA;AACA;AACA,CAAC,CAAC,8DAAc;AACU;AAC1B;;;;;;;;;;;;;ACXA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AACiC;AACW;AACM;AAClD;AACA,IAAI,+CAAiB;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oEAAoE,oBAAoB,EAAE;AAC1F;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC,CAAC,8DAAc;AACgB;AAChC;AACA,IAAI,+CAAiB;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC,CAAC,wDAAW;AACY;AACzB;;;;;;;;;;;;;AC3GA;AAAA;AAAA;AAAA;AAAA;AAC8D;AACM;AAC7D,uCAAuC,gFAAuB,CAAC,0EAAoB;AAC1F;;;;;;;;;;;;;ACJA;AAAA;AAAA;AAAA;AAAA;AAC0C;AACM;AACzC,6BAA6B,4DAAa,CAAC,sDAAU;AAC5D;;;;;;;;;;;;;ACJA;AAAA;AAAA;AAAA;AAAA;AAC4C;AACM;AAC3C,8BAA8B,8DAAc,CAAC,wDAAW;AAC/D;;;;;;;;;;;;;ACJA;AAAA;AAAA;AAAA;AAAA;AAC4C;AACM;AAC3C,8BAA8B,8DAAc,CAAC,wDAAW;AAC/D;;;;;;;;;;;;;ACJA;AAAA;AAAA;AAAA;AAAA;AACO;AACP;AACA;AACA;AACA;AACA;AACO;AACA;AACP;;;;;;;;;;;;;ACTA;AAAA;AAAA;AACO;AACP;;;;;;;;;;;;;ACFA;AAAA;AAAA;AAAA;AACO;AACP;AACA;AACO;AACP;;;;;;;;;;;;;ACLA;AAAA;AAAA;AAAA;AACiC;AACjC;AACA,IAAI,+CAAiB;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACkC;AACnC;;;;;;;;;;;;;ACbA;AAAA;AAAA;AAAA;AACiC;AACjC;AACA,IAAI,+CAAiB;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACqB;AACtB;;;;;;;;;;;;;ACbA;AAAA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO;AACP;AACA;AACA;AACA,4CAA4C,6BAA6B,EAAE;AAC3E;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;;;;;;;;;;;;;ACpBA;AAAA;AAAA;AAAA;AACiC;AACjC;AACA,IAAI,+CAAiB;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACkC;AACnC;;;;;;;;;;;;;ACbA;AAAA;AAAA;AAAA;AACiC;AACjC;AACA,IAAI,+CAAiB;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACuB;AACxB;;;;;;;;;;;;;ACbA;AAAA;AAAA;AAAA;AACiC;AACjC;AACA,IAAI,+CAAiB;AACrB;AACA;AACA,0GAA0G,sCAAsC,EAAE;AAClJ;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AAC8B;AAC/B;;;;;;;;;;;;;ACfA;AAAA;AAAA;AACO,mBAAmB,MAAM;AAChC;;;;;;;;;;;;;ACFA;AAAA;AAAA;AACO;AACP,4BAA4B,WAAW,EAAE;AACzC;AACA;;;;;;;;;;;;;ACJA;AAAA;AAAA;AACO;AACP;AACA;AACA;;;;;;;;;;;;;ACJA;AAAA;AAAA;AACO,8CAA8C,0CAA0C,EAAE;AACjG;;;;;;;;;;;;;ACFA;AAAA;AAAA;AACO,iCAAiC,qEAAqE,EAAE;AAC/G;;;;;;;;;;;;;ACFA;AAAA;AAAA;AACO;AACP;AACA;AACA;;;;;;;;;;;;;ACJA;AAAA;AAAA;AACO;AACP;AACA;AACA;;;;;;;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;AACP;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB,MAAM,gBAAgB;AACzC;AACA;AACA;AACA;AACA,iBAAiB,sBAAsB;AACvC;AACA;AACA;;AAEO;AACP,4BAA4B,sBAAsB;AAClD;AACA;AACA;;AAEO;AACP;AACA;;AAEO;AACP;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;;AAEO;AACP;AACA,iBAAiB,4CAA4C,SAAS,EAAE,qDAAqD,aAAa,EAAE;AAC5I,yBAAyB,6BAA6B,oBAAoB,gDAAgD,gBAAgB,EAAE,KAAK;AACjJ;;AAEO;AACP;AACA;AACA,2GAA2G,sFAAsF,aAAa,EAAE;AAChN,sBAAsB,8BAA8B,gDAAgD,uDAAuD,EAAE,EAAE,GAAG;AAClK,4CAA4C,sCAAsC,UAAU,oBAAoB,EAAE,EAAE,UAAU;AAC9H;;AAEO;AACP,gCAAgC,uCAAuC,aAAa,EAAE,EAAE,OAAO,kBAAkB;AACjH;AACA;;AAEO;AACP;AACA;AACA;AACA;AACA;AACA;;AAEO;AACP,4CAA4C;AAC5C","file":"vendor.js","sourcesContent":["/**\n * @license Angular v6.1.10\n * (c) 2010-2018 Google, Inc. https://angular.io/\n * License: MIT\n */\n\nimport { InjectionToken, EventEmitter, Injectable, Inject, Optional, LOCALE_ID, Directive, ElementRef, Input, IterableDiffers, KeyValueDiffers, Renderer2, ɵisListLikeIterable, ɵstringify, ComponentFactoryResolver, Injector, NgModuleFactory, NgModuleRef, Type, ViewContainerRef, TemplateRef, isDevMode, Host, Attribute, Pipe, ChangeDetectorRef, WrappedValue, ɵisObservable, ɵisPromise, NgModule, Version, defineInjectable, inject } from '@angular/core';\nimport { __read, __decorate, __metadata, __param, __extends, __values, __assign } 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 * @usageNotes\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 * @usageNotes\n *\n * 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 *\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_1.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 Location_1 = Location;\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 = 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 Location.prototype.isCurrentPathEqualTo = function (path, query) {\n if (query === void 0) { query = ''; }\n return this.path() == this.normalize(path + Location_1.normalizeQueryParams(query));\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 = function (url) {\n return Location_1.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 Location.prototype.prepareExternalUrl = 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 Location.prototype.go = 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 Location.prototype.replaceState = 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 Location.prototype.forward = function () { this._platformStrategy.forward(); };\n /**\n * Navigates back in the platform's history.\n */\n Location.prototype.back = function () { this._platformStrategy.back(); };\n /**\n * Subscribe to the platform's `popState` events.\n */\n Location.prototype.subscribe = 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 Location.normalizeQueryParams = 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 Location.joinWithSlash = 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 Location.stripTrailingSlash = 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 var Location_1;\n Location = Location_1 = __decorate([\n Injectable(),\n __metadata(\"design:paramtypes\", [LocationStrategy])\n ], Location);\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 * @usageNotes\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 = __decorate([\n Injectable(),\n __param(1, Optional()), __param(1, Inject(APP_BASE_HREF)),\n __metadata(\"design:paramtypes\", [PlatformLocation, String])\n ], HashLocationStrategy);\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 * @usageNotes\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 = __decorate([\n Injectable(),\n __param(1, Optional()), __param(1, Inject(APP_BASE_HREF)),\n __metadata(\"design:paramtypes\", [PlatformLocation, String])\n ], PathLocationStrategy);\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 * [\"I18n guide\"](guide/i18n#i18n-pipes) 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 */\nvar NumberFormatStyle;\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 */\nvar Plural;\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 */\nvar FormStyle;\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 */\nvar TranslationWidth;\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 */\nvar FormatWidth;\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 */\nvar NumberSymbol;\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 */\nvar WeekDay;\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 [\"I18n guide\"](guide/i18n#i18n-pipes) 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 [\"I18n guide\"](guide/i18n#i18n-pipes) 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[\"FractionalSeconds\"] = 6] = \"FractionalSeconds\";\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 */\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}\nfunction formatFractionalSeconds(milliseconds, digits) {\n var strMs = padNumber(milliseconds, 3);\n return strMs.substr(0, digits);\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);\n if (offset > 0 || part > -offset) {\n part += offset;\n }\n if (name === DateType.Hours) {\n if (part === 0 && offset === -12) {\n part = 12;\n }\n }\n else if (name === DateType.FractionalSeconds) {\n return formatFractionalSeconds(part, size);\n }\n var localeMinus = getLocaleNumberSymbol(locale, NumberSymbol.MinusSign);\n return padNumber(part, size, localeMinus, trim, negWrap);\n };\n}\nfunction getDatePart(part, date) {\n switch (part) {\n case DateType.FullYear:\n return date.getFullYear();\n case DateType.Month:\n return date.getMonth();\n case DateType.Date:\n return date.getDate();\n case DateType.Hours:\n return date.getHours();\n case DateType.Minutes:\n return date.getMinutes();\n case DateType.Seconds:\n return date.getSeconds();\n case DateType.FractionalSeconds:\n return date.getMilliseconds();\n case DateType.Day:\n return date.getDay();\n default:\n throw new Error(\"Unknown DateType value \\\"\" + part + \"\\\".\");\n }\n}\n/**\n * 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 { // 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\n case 'S':\n formatter = dateGetter(DateType.FractionalSeconds, 1);\n break;\n case 'SS':\n formatter = dateGetter(DateType.FractionalSeconds, 2);\n break;\n case 'SSS':\n formatter = dateGetter(DateType.FractionalSeconds, 3);\n break;\n // 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 // if we have 2 time the currency character, the second one is ignored\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++) { /* 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, \n /** @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 = __decorate([\n Injectable(),\n __param(0, Inject(LOCALE_ID)),\n __param(1, Optional()), __param(1, Inject(DEPRECATED_PLURAL_FN)),\n __metadata(\"design:paramtypes\", [String, Object])\n ], NgLocaleLocalization);\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 var e_1, _a;\n name = encodeURIComponent(name);\n try {\n for (var _b = __values(cookieStr.split(';')), _c = _b.next(); !_c.done; _c = _b.next()) {\n var cookie = _c.value;\n var eqIndex = cookie.indexOf('=');\n var _d = __read(eqIndex == -1 ? [cookie, ''] : [cookie.slice(0, eqIndex), cookie.slice(eqIndex + 1)], 2), cookieName = _d[0], cookieValue = _d[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 (_c && !_c.done && (_a = _b.return)) _a.call(_b);\n }\n finally { if (e_1) throw e_1.error; }\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 */\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 (value) {\n this._removeClasses(this._initialClasses);\n this._initialClasses = typeof value === 'string' ? value.split(/\\s+/) : [];\n this._applyClasses(this._initialClasses);\n this._applyClasses(this._rawClass);\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(NgClass.prototype, \"ngClass\", {\n set: function (value) {\n this._removeClasses(this._rawClass);\n this._applyClasses(this._initialClasses);\n this._iterableDiffer = null;\n this._keyValueDiffer = null;\n this._rawClass = typeof value === 'string' ? value.split(/\\s+/) : value;\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 NgClass.prototype._applyClasses = 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 NgClass.prototype._removeClasses = 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 __decorate([\n Input('class'),\n __metadata(\"design:type\", String),\n __metadata(\"design:paramtypes\", [String])\n ], NgClass.prototype, \"klass\", null);\n __decorate([\n Input(),\n __metadata(\"design:type\", Object),\n __metadata(\"design:paramtypes\", [Object])\n ], NgClass.prototype, \"ngClass\", null);\n NgClass = __decorate([\n Directive({ selector: '[ngClass]' }),\n __metadata(\"design:paramtypes\", [IterableDiffers, KeyValueDiffers,\n ElementRef, Renderer2])\n ], NgClass);\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 * @usageNotes\n *\n * ### Fine tune control\n *\n * You can control the component creation process by using the following optional attributes:\n *\n * * `ngComponentOutletInjector`: Optional custom {@link Injector} that will be used as parent for\n * the Component. Defaults to the injector of the current view container.\n *\n * * `ngComponentOutletContent`: Optional list of projectable nodes to insert into the content\n * section of the component, if exists.\n *\n * * `ngComponentOutletNgModuleFactory`: Optional module factory to allow dynamically loading other\n * module, then load a component from that module.\n *\n * ### Syntax\n *\n * Simple\n * ```\n * <ng-container *ngComponentOutlet=\"componentTypeExpression\"></ng-container>\n * ```\n *\n * Customized injector/content\n * ```\n * <ng-container *ngComponentOutlet=\"componentTypeExpression;\n * injector: injectorExpression;\n * content: contentNodesExpression;\">\n * </ng-container>\n * ```\n *\n * Customized ngModuleFactory\n * ```\n * <ng-container *ngComponentOutlet=\"componentTypeExpression;\n * ngModuleFactory: moduleFactory;\">\n * </ng-container>\n * ```\n *\n * ### A simple example\n *\n * {@example common/ngComponentOutlet/ts/module.ts region='SimpleExample'}\n *\n * A more complete example with additional options:\n *\n * {@example common/ngComponentOutlet/ts/module.ts region='CompleteExample'}\n\n * A more complete example with ngModuleFactory:\n *\n * {@example common/ngComponentOutlet/ts/module.ts region='NgModuleFactoryExample'}\n *\n * @experimental\n * @ngModule CommonModule\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 __decorate([\n Input(),\n __metadata(\"design:type\", Type)\n ], NgComponentOutlet.prototype, \"ngComponentOutlet\", void 0);\n __decorate([\n Input(),\n __metadata(\"design:type\", Injector)\n ], NgComponentOutlet.prototype, \"ngComponentOutletInjector\", void 0);\n __decorate([\n Input(),\n __metadata(\"design:type\", Array)\n ], NgComponentOutlet.prototype, \"ngComponentOutletContent\", void 0);\n __decorate([\n Input(),\n __metadata(\"design:type\", NgModuleFactory)\n ], NgComponentOutlet.prototype, \"ngComponentOutletNgModuleFactory\", void 0);\n NgComponentOutlet = __decorate([\n Directive({ selector: '[ngComponentOutlet]' }),\n __metadata(\"design:paramtypes\", [ViewContainerRef])\n ], NgComponentOutlet);\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 */\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 * @usageNotes\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 * @ngModule CommonModule\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._ngForOfDirty = true;\n this._differ = null;\n }\n Object.defineProperty(NgForOf.prototype, \"ngForOf\", {\n set: function (ngForOf) {\n this._ngForOf = ngForOf;\n this._ngForOfDirty = true;\n },\n enumerable: true,\n configurable: true\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.ngDoCheck = function () {\n if (this._ngForOfDirty) {\n this._ngForOfDirty = false;\n // React on ngForOf changes only once all inputs have been initialized\n var value = this._ngForOf;\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 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 viewRef.context.ngForOf = this._ngForOf;\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 __decorate([\n Input(),\n __metadata(\"design:type\", Object),\n __metadata(\"design:paramtypes\", [Object])\n ], NgForOf.prototype, \"ngForOf\", null);\n __decorate([\n Input(),\n __metadata(\"design:type\", Function),\n __metadata(\"design:paramtypes\", [Function])\n ], NgForOf.prototype, \"ngForTrackBy\", null);\n __decorate([\n Input(),\n __metadata(\"design:type\", TemplateRef),\n __metadata(\"design:paramtypes\", [TemplateRef])\n ], NgForOf.prototype, \"ngForTemplate\", null);\n NgForOf = __decorate([\n Directive({ selector: '[ngFor][ngForOf]' }),\n __metadata(\"design:paramtypes\", [ViewContainerRef, TemplateRef,\n IterableDiffers])\n ], NgForOf);\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 *\n * @usageNotes\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 * @ngModule CommonModule\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 __decorate([\n Input(),\n __metadata(\"design:type\", Object),\n __metadata(\"design:paramtypes\", [Object])\n ], NgIf.prototype, \"ngIf\", null);\n __decorate([\n Input(),\n __metadata(\"design:type\", Object),\n __metadata(\"design:paramtypes\", [Object])\n ], NgIf.prototype, \"ngIfThen\", null);\n __decorate([\n Input(),\n __metadata(\"design:type\", Object),\n __metadata(\"design:paramtypes\", [Object])\n ], NgIf.prototype, \"ngIfElse\", null);\n NgIf = __decorate([\n Directive({ selector: '[ngIf]' }),\n __metadata(\"design:paramtypes\", [ViewContainerRef, TemplateRef])\n ], NgIf);\n return NgIf;\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 NgSwitch.prototype._addCase = function () { return this._caseCount++; };\n /** @internal */\n NgSwitch.prototype._addDefault = function (view) {\n if (!this._defaultViews) {\n this._defaultViews = [];\n }\n this._defaultViews.push(view);\n };\n /** @internal */\n NgSwitch.prototype._matchCase = 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 __decorate([\n Input(),\n __metadata(\"design:type\", Object),\n __metadata(\"design:paramtypes\", [Object])\n ], NgSwitch.prototype, \"ngSwitch\", null);\n NgSwitch = __decorate([\n Directive({ selector: '[ngSwitch]' })\n ], NgSwitch);\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 __decorate([\n Input(),\n __metadata(\"design:type\", Object)\n ], NgSwitchCase.prototype, \"ngSwitchCase\", void 0);\n NgSwitchCase = __decorate([\n Directive({ selector: '[ngSwitchCase]' }),\n __param(2, Host()),\n __metadata(\"design:paramtypes\", [ViewContainerRef, TemplateRef,\n NgSwitch])\n ], NgSwitchCase);\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 = __decorate([\n Directive({ selector: '[ngSwitchDefault]' }),\n __param(2, Host()),\n __metadata(\"design:paramtypes\", [ViewContainerRef, TemplateRef,\n NgSwitch])\n ], NgSwitchDefault);\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 __decorate([\n Input(),\n __metadata(\"design:type\", Number),\n __metadata(\"design:paramtypes\", [Number])\n ], NgPlural.prototype, \"ngPlural\", null);\n NgPlural = __decorate([\n Directive({ selector: '[ngPlural]' }),\n __metadata(\"design:paramtypes\", [NgLocalization])\n ], NgPlural);\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 = __decorate([\n Directive({ selector: '[ngPluralCase]' }),\n __param(0, Attribute('ngPluralCase')),\n __param(3, Host()),\n __metadata(\"design:paramtypes\", [String, TemplateRef,\n ViewContainerRef, NgPlural])\n ], NgPluralCase);\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 (values) {\n this._ngStyle = values;\n if (!this._differ && values) {\n this._differ = this._differs.find(values).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 __decorate([\n Input(),\n __metadata(\"design:type\", Object),\n __metadata(\"design:paramtypes\", [Object])\n ], NgStyle.prototype, \"ngStyle\", null);\n NgStyle = __decorate([\n Directive({ selector: '[ngStyle]' }),\n __metadata(\"design:paramtypes\", [KeyValueDiffers, ElementRef, Renderer2])\n ], NgStyle);\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 * @description\n *\n * Inserts an embedded view from a prepared `TemplateRef`.\n *\n * You can attach a context object to the `EmbeddedViewRef` by setting `[ngTemplateOutletContext]`.\n * `[ngTemplateOutletContext]` should be an object, the object's keys will be available for binding\n * by the local template `let` declarations.\n *\n * @usageNotes\n * ```\n * <ng-container *ngTemplateOutlet=\"templateRefExp; context: contextExp\"></ng-container>\n * ```\n *\n * Using the key `$implicit` in the context object will set its value as default.\n *\n * ### Example\n *\n * {@example common/ngTemplateOutlet/ts/module.ts region='NgTemplateOutlet'}\n *\n */\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 NgTemplateOutlet.prototype._shouldRecreateView = function (changes) {\n var ctxChange = changes['ngTemplateOutletContext'];\n return !!changes['ngTemplateOutlet'] || (ctxChange && this._hasContextShapeChanged(ctxChange));\n };\n NgTemplateOutlet.prototype._hasContextShapeChanged = function (ctxChange) {\n var e_1, _a;\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 };\n NgTemplateOutlet.prototype._updateExistingContext = function (ctx) {\n var e_2, _a;\n try {\n for (var _b = __values(Object.keys(ctx)), _c = _b.next(); !_c.done; _c = _b.next()) {\n var propName = _c.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 (_c && !_c.done && (_a = _b.return)) _a.call(_b);\n }\n finally { if (e_2) throw e_2.error; }\n }\n };\n __decorate([\n Input(),\n __metadata(\"design:type\", Object)\n ], NgTemplateOutlet.prototype, \"ngTemplateOutletContext\", void 0);\n __decorate([\n Input(),\n __metadata(\"design:type\", TemplateRef)\n ], NgTemplateOutlet.prototype, \"ngTemplateOutlet\", void 0);\n NgTemplateOutlet = __decorate([\n Directive({ selector: '[ngTemplateOutlet]' }),\n __metadata(\"design:paramtypes\", [ViewContainerRef])\n ], NgTemplateOutlet);\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 // first Thursday of the year. not support ?\n 'w': datePartGetterFactory({}),\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 * @usageNotes\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_1 = DeprecatedDatePipe;\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_1, value);\n }\n }\n return DateFormatter.format(date, this._locale, DeprecatedDatePipe_1._ALIASES[pattern] || pattern);\n };\n var DeprecatedDatePipe_1;\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 = DeprecatedDatePipe_1 = __decorate([\n Pipe({ name: 'date', pure: true }),\n __param(0, Inject(LOCALE_ID)),\n __metadata(\"design:paramtypes\", [String])\n ], DeprecatedDatePipe);\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) { // min integer digits\n minInt = parseIntAutoRadix(parts[1]);\n }\n if (parts[3] != null) { // min fraction digits\n minFraction = parseIntAutoRadix(parts[3]);\n }\n if (parts[5] != null) { // 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 * 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 * @usageNotes\n *\n * ### Example\n *\n * {@example common/pipes/ts/number_pipe.ts region='DeprecatedNumberPipe'}\n *\n * @ngModule CommonModule\n */\nvar DeprecatedDecimalPipe = /** @class */ (function () {\n function DeprecatedDecimalPipe(_locale) {\n this._locale = _locale;\n }\n DeprecatedDecimalPipe_1 = DeprecatedDecimalPipe;\n DeprecatedDecimalPipe.prototype.transform = function (value, digits) {\n return formatNumber$1(DeprecatedDecimalPipe_1, this._locale, value, NumberFormatStyle.Decimal, digits);\n };\n var DeprecatedDecimalPipe_1;\n DeprecatedDecimalPipe = DeprecatedDecimalPipe_1 = __decorate([\n Pipe({ name: 'number' }),\n __param(0, Inject(LOCALE_ID)),\n __metadata(\"design:paramtypes\", [String])\n ], DeprecatedDecimalPipe);\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 * @usageNotes\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_1 = DeprecatedPercentPipe;\n DeprecatedPercentPipe.prototype.transform = function (value, digits) {\n return formatNumber$1(DeprecatedPercentPipe_1, this._locale, value, NumberFormatStyle.Percent, digits);\n };\n var DeprecatedPercentPipe_1;\n DeprecatedPercentPipe = DeprecatedPercentPipe_1 = __decorate([\n Pipe({ name: 'percent' }),\n __param(0, Inject(LOCALE_ID)),\n __metadata(\"design:paramtypes\", [String])\n ], DeprecatedPercentPipe);\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 * @usageNotes\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_1 = DeprecatedCurrencyPipe;\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_1, this._locale, value, NumberFormatStyle.Currency, digits, currencyCode, symbolDisplay);\n };\n var DeprecatedCurrencyPipe_1;\n DeprecatedCurrencyPipe = DeprecatedCurrencyPipe_1 = __decorate([\n Pipe({ name: 'currency' }),\n __param(0, Inject(LOCALE_ID)),\n __metadata(\"design:paramtypes\", [String])\n ], DeprecatedCurrencyPipe);\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 * @usageNotes\n *\n * ### Examples\n *\n * This example binds a `Promise` to the view. Clicking the `Resolve` button resolves the\n * promise.\n *\n * {@example common/pipes/ts/async_pipe.ts region='AsyncPipePromise'}\n *\n * It's also possible to use `async` with Observables. The example below binds the `time` Observable\n * to the view. The Observable continuously updates the view with the current time.\n *\n * {@example common/pipes/ts/async_pipe.ts region='AsyncPipeObservable'}\n *\n */\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_1 = AsyncPipe;\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_1, 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 var AsyncPipe_1;\n AsyncPipe = AsyncPipe_1 = __decorate([\n Pipe({ name: 'async', pure: false }),\n __metadata(\"design:paramtypes\", [ChangeDetectorRef])\n ], AsyncPipe);\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 all lower case.\n *\n * @see `UpperCasePipe`\n * @see `TitleCasePipe`\n * @usageNotes\n *\n * The following example defines a view that allows the user to enter\n * text, and then uses the pipe to convert the input text to all lower case.\n *\n * <code-example path=\"common/pipes/ts/lowerupper_pipe.ts\" region='LowerUpperPipe'></code-example>\n *\n * @ngModule CommonModule\n */\nvar LowerCasePipe = /** @class */ (function () {\n function LowerCasePipe() {\n }\n LowerCasePipe_1 = LowerCasePipe;\n /**\n * @param value The string to transform to lower case.\n */\n LowerCasePipe.prototype.transform = function (value) {\n if (!value)\n return value;\n if (typeof value !== 'string') {\n throw invalidPipeArgumentError(LowerCasePipe_1, value);\n }\n return value.toLowerCase();\n };\n var LowerCasePipe_1;\n LowerCasePipe = LowerCasePipe_1 = __decorate([\n Pipe({ name: 'lowercase' })\n ], LowerCasePipe);\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-\\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0E8D\\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\\uA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\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 title case.\n * Capitalizes the first letter of each word, and transforms the\n * rest of the word to lower case.\n * Words are delimited by any whitespace character, such as a space, tab, or line-feed character.\n *\n * @see `LowerCasePipe`\n * @see `UpperCasePipe`\n *\n * @usageNotes\n * The following example shows the result of transforming various strings into title case.\n *\n * <code-example path=\"common/pipes/ts/titlecase_pipe.ts\" region='TitleCasePipe'></code-example>\n *\n * @ngModule CommonModule\n */\nvar TitleCasePipe = /** @class */ (function () {\n function TitleCasePipe() {\n }\n TitleCasePipe_1 = TitleCasePipe;\n /**\n * @param value The string to transform to title case.\n */\n TitleCasePipe.prototype.transform = function (value) {\n if (!value)\n return value;\n if (typeof value !== 'string') {\n throw invalidPipeArgumentError(TitleCasePipe_1, value);\n }\n return value.replace(unicodeWordMatch, (function (txt) { return txt[0].toUpperCase() + txt.substr(1).toLowerCase(); }));\n };\n var TitleCasePipe_1;\n TitleCasePipe = TitleCasePipe_1 = __decorate([\n Pipe({ name: 'titlecase' })\n ], TitleCasePipe);\n return TitleCasePipe;\n}());\n/**\n * Transforms text to all upper case.\n * @see `LowerCasePipe`\n * @see `TitleCasePipe`\n *\n * @ngModule CommonModule\n */\nvar UpperCasePipe = /** @class */ (function () {\n function UpperCasePipe() {\n }\n UpperCasePipe_1 = UpperCasePipe;\n /**\n * @param value The string to transform to upper case.\n */\n UpperCasePipe.prototype.transform = function (value) {\n if (!value)\n return value;\n if (typeof value !== 'string') {\n throw invalidPipeArgumentError(UpperCasePipe_1, value);\n }\n return value.toUpperCase();\n };\n var UpperCasePipe_1;\n UpperCasePipe = UpperCasePipe_1 = __decorate([\n Pipe({ name: 'uppercase' })\n ], UpperCasePipe);\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 * Formats a date value according to locale rules.\n *\n * Only the `en-US` locale data comes with Angular. To localize dates\n * in another language, you must import the corresponding locale data.\n * See the [I18n guide](guide/i18n#i18n-pipes) for more information.\n *\n * @see `formatDate()`\n *\n *\n * @usageNotes\n *\n * The result of this pipe is not reevaluated when the input is mutated. To avoid the need to\n * reformat the date on every change-detection cycle, treat the date as an immutable object\n * and change the reference when the pipe needs to run again.\n *\n * ### Pre-defined format options\n *\n * Examples are given in `en-US` locale.\n *\n * - `'short'`: equivalent to `'M/d/yy, h:mm a'` (`6/15/15, 9:03 AM`).\n * - `'medium'`: equivalent to `'MMM d, y, h:mm:ss a'` (`Jun 15, 2015, 9:03:01 AM`).\n * - `'long'`: equivalent to `'MMMM d, y, h:mm:ss a z'` (`June 15, 2015 at 9:03:01 AM\n * GMT+1`).\n * - `'full'`: equivalent to `'EEEE, MMMM d, y, h:mm:ss a zzzz'` (`Monday, June 15, 2015 at\n * 9:03:01 AM GMT+01:00`).\n * - `'shortDate'`: equivalent to `'M/d/yy'` (`6/15/15`).\n * - `'mediumDate'`: equivalent to `'MMM d, y'` (`Jun 15, 2015`).\n * - `'longDate'`: equivalent to `'MMMM d, y'` (`June 15, 2015`).\n * - `'fullDate'`: equivalent to `'EEEE, MMMM d, y'` (`Monday, June 15, 2015`).\n * - `'shortTime'`: equivalent to `'h:mm a'` (`9:03 AM`).\n * - `'mediumTime'`: equivalent to `'h:mm:ss a'` (`9:03:01 AM`).\n * - `'longTime'`: equivalent to `'h:mm:ss a z'` (`9:03:01 AM GMT+1`).\n * - `'fullTime'`: equivalent to `'h:mm:ss a zzzz'` (`9:03:01 AM GMT+01:00`).\n *\n * ### Custom format options\n *\n * You can construct a format string using symbols to specify the components\n * of a date-time value, as described in the following table.\n * Format details depend on the locale.\n * Fields marked with (*) are only available in the extra data set for the given locale.\n *\n * | Field type | Format | Description | Example Value |\n * |--------------------|-------------|---------------------------------------------------------------|------------------------------------------------------------|\n * | Era | G, GG & GGG | Abbreviated | AD |\n * | | GGGG | Wide | Anno Domini |\n * | | GGGGG | Narrow | A |\n * | Year | y | Numeric: minimum digits | 2, 20, 201, 2017, 20173 |\n * | | yy | Numeric: 2 digits + zero padded | 02, 20, 01, 17, 73 |\n * | | yyy | Numeric: 3 digits + zero padded | 002, 020, 201, 2017, 20173 |\n * | | yyyy | Numeric: 4 digits or more + zero padded | 0002, 0020, 0201, 2017, 20173 |\n * | Month | M | Numeric: 1 digit | 9, 12 |\n * | | MM | Numeric: 2 digits + zero padded | 09, 12 |\n * | | MMM | Abbreviated | Sep |\n * | | MMMM | Wide | September |\n * | | MMMMM | Narrow | S |\n * | Month standalone | L | Numeric: 1 digit | 9, 12 |\n * | | LL | Numeric: 2 digits + zero padded | 09, 12 |\n * | | LLL | Abbreviated | Sep |\n * | | LLLL | Wide | September |\n * | | LLLLL | Narrow | S |\n * | Week of year | w | Numeric: minimum digits | 1... 53 |\n * | | ww | Numeric: 2 digits + zero padded | 01... 53 |\n * | Week of month | W | Numeric: 1 digit | 1... 5 |\n * | Day of month | d | Numeric: minimum digits | 1 |\n * | | dd | Numeric: 2 digits + zero padded | 01 |\n * | Week day | E, EE & EEE | Abbreviated | Tue |\n * | | EEEE | Wide | Tuesday |\n * | | EEEEE | Narrow | T |\n * | | EEEEEE | Short | Tu |\n * | Period | a, aa & aaa | Abbreviated | am/pm or AM/PM |\n * | | aaaa | Wide (fallback to `a` when missing) | ante meridiem/post meridiem |\n * | | aaaaa | Narrow | a/p |\n * | Period* | B, BB & BBB | Abbreviated | mid. |\n * | | BBBB | Wide | am, pm, midnight, noon, morning, afternoon, evening, night |\n * | | BBBBB | Narrow | md |\n * | Period standalone* | b, bb & bbb | Abbreviated | mid. |\n * | | bbbb | Wide | am, pm, midnight, noon, morning, afternoon, evening, night |\n * | | bbbbb | Narrow | md |\n * | Hour 1-12 | h | Numeric: minimum digits | 1, 12 |\n * | | hh | Numeric: 2 digits + zero padded | 01, 12 |\n * | Hour 0-23 | H | Numeric: minimum digits | 0, 23 |\n * | | HH | Numeric: 2 digits + zero padded | 00, 23 |\n * | Minute | m | Numeric: minimum digits | 8, 59 |\n * | | mm | Numeric: 2 digits + zero padded | 08, 59 |\n * | Second | s | Numeric: minimum digits | 0... 59 |\n * | | ss | Numeric: 2 digits + zero padded | 00... 59 |\n * | Fractional seconds | S | Numeric: 1 digit | 0... 9 |\n * | | SS | Numeric: 2 digits + zero padded | 00... 99 |\n * | | SSS | Numeric: 3 digits + zero padded (= milliseconds) | 000... 999 |\n * | Zone | z, zz & zzz | Short specific non location format (fallback to O) | GMT-8 |\n * | | zzzz | Long specific non location format (fallback to OOOO) | GMT-08:00 |\n * | | Z, ZZ & ZZZ | ISO8601 basic format | -0800 |\n * | | ZZZZ | Long localized GMT format | GMT-8:00 |\n * | | ZZZZZ | ISO8601 extended format + Z indicator for offset 0 (= XXXXX) | -08:00 |\n * | | O, OO & OOO | Short localized GMT format | GMT-8 |\n * | | OOOO | Long localized GMT format | GMT-08:00 |\n *\n * Note that timezone correction is not applied to an ISO string that has no time component, such as \"2016-09-19\"\n *\n * ### Format examples\n *\n * These examples transform a date into various formats,\n * assuming that `dateObj` is a JavaScript `Date` object for\n * year: 2015, month: 6, day: 15, hour: 21, minute: 43, second: 11,\n * given in the local time for the `en-US` locale.\n *\n * ```\n * {{ dateObj | date }} // output is 'Jun 15, 2015'\n * {{ dateObj | date:'medium' }} // output is 'Jun 15, 2015, 9:43:11 PM'\n * {{ dateObj | date:'shortTime' }} // output is '9:43 PM'\n * {{ dateObj | date:'mmss' }} // output is '43:11'\n * ```\n *\n * ### Usage example\n *\n * The following component uses a date pipe to display the current date in different formats.\n *\n * ```\n * @Component({\n * selector: 'date-pipe',\n * template: `<div>\n * <p>Today is {{today | date}}</p>\n * <p>Or if you prefer, {{today | date:'fullDate'}}</p>\n * <p>The time is {{today | date:'h:mm a z'}}</p>\n * </div>`\n * })\n * // Get the current date and time as a date-time value.\n * export class DatePipeComponent {\n * today: number = Date.now();\n * }\n * ```\n *\n */\n// clang-format on\nvar DatePipe = /** @class */ (function () {\n function DatePipe(locale) {\n this.locale = locale;\n }\n DatePipe_1 = DatePipe;\n /**\n * @param value The date expression: a `Date` object, a number\n * (milliseconds since UTC epoch), or an ISO string (https://www.w3.org/TR/NOTE-datetime).\n * @param format The date/time components to include, using predefined options or a\n * custom format string.\n * @param timezone A timezone offset (such as `'+0430'`), or a standard\n * UTC/GMT or continental US timezone abbreviation. Default is\n * the local system timezone of the end-user's machine.\n * @param locale A locale code for the locale format rules to use.\n * When not supplied, uses the value of `LOCALE_ID`, which is `en-US` by default.\n * See [Setting your app locale](guide/i18n#setting-up-the-locale-of-your-app).\n * @returns A date string in the desired format.\n */\n DatePipe.prototype.transform = 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_1, error.message);\n }\n };\n var DatePipe_1;\n DatePipe = DatePipe_1 = __decorate([\n Pipe({ name: 'date', pure: true }),\n __param(0, Inject(LOCALE_ID)),\n __metadata(\"design:paramtypes\", [String])\n ], DatePipe);\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 * @usageNotes\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 I18nPluralPipe_1 = I18nPluralPipe;\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 = function (value, pluralMap, locale) {\n if (value == null)\n return '';\n if (typeof pluralMap !== 'object' || pluralMap === null) {\n throw invalidPipeArgumentError(I18nPluralPipe_1, pluralMap);\n }\n var key = getPluralCategory(value, Object.keys(pluralMap), this._localization, locale);\n return pluralMap[key].replace(_INTERPOLATION_REGEXP, value.toString());\n };\n var I18nPluralPipe_1;\n I18nPluralPipe = I18nPluralPipe_1 = __decorate([\n Pipe({ name: 'i18nPlural', pure: true }),\n __metadata(\"design:paramtypes\", [NgLocalization])\n ], I18nPluralPipe);\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 * @usageNotes\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 I18nSelectPipe_1 = I18nSelectPipe;\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 = function (value, mapping) {\n if (value == null)\n return '';\n if (typeof mapping !== 'object' || typeof value !== 'string') {\n throw invalidPipeArgumentError(I18nSelectPipe_1, 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 var I18nSelectPipe_1;\n I18nSelectPipe = I18nSelectPipe_1 = __decorate([\n Pipe({ name: 'i18nSelect', pure: true })\n ], I18nSelectPipe);\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 a value into its JSON-format representation. Useful for debugging.\n *\n * @usageNotes\n *\n * The following component uses a JSON pipe to convert an object\n * to JSON format, and displays the string in both formats for comparison.\n *\n * {@example common/pipes/ts/json_pipe.ts region='JsonPipe'}\n *\n */\nvar JsonPipe = /** @class */ (function () {\n function JsonPipe() {\n }\n /**\n * @param value A value of any type to convert into a JSON-format string.\n */\n JsonPipe.prototype.transform = function (value) { return JSON.stringify(value, null, 2); };\n JsonPipe = __decorate([\n Pipe({ name: 'json', pure: false })\n ], JsonPipe);\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 */\nfunction makeKeyValuePair(key, value) {\n return { key: key, value: value };\n}\n/**\n * @ngModule CommonModule\n * @description\n *\n * Transforms Object or Map into an array of key value pairs.\n *\n * The output array will be ordered by keys.\n * By default the comparator will be by Unicode point value.\n * You can optionally pass a compareFn if your keys are complex types.\n *\n * @usageNotes\n * ### Examples\n *\n * This examples show how an Object or a Map and be iterated by ngFor with the use of this keyvalue\n * pipe.\n *\n * {@example common/pipes/ts/keyvalue_pipe.ts region='KeyValuePipe'}\n */\nvar KeyValuePipe = /** @class */ (function () {\n function KeyValuePipe(differs) {\n this.differs = differs;\n }\n KeyValuePipe.prototype.transform = function (input, compareFn) {\n var _this = this;\n if (compareFn === void 0) { compareFn = defaultComparator; }\n if (!input || (!(input instanceof Map) && typeof input !== 'object')) {\n return null;\n }\n if (!this.differ) {\n // make a differ for whatever type we've been passed in\n this.differ = this.differs.find(input).create();\n }\n var differChanges = this.differ.diff(input);\n if (differChanges) {\n this.keyValues = [];\n differChanges.forEachItem(function (r) {\n _this.keyValues.push(makeKeyValuePair(r.key, r.currentValue));\n });\n this.keyValues.sort(compareFn);\n }\n return this.keyValues;\n };\n KeyValuePipe = __decorate([\n Pipe({ name: 'keyvalue', pure: false }),\n __metadata(\"design:paramtypes\", [KeyValueDiffers])\n ], KeyValuePipe);\n return KeyValuePipe;\n}());\nfunction defaultComparator(keyValueA, keyValueB) {\n var a = keyValueA.key;\n var b = keyValueB.key;\n // if same exit with 0;\n if (a === b)\n return 0;\n // make sure that undefined are at the end of the sort.\n if (a === undefined)\n return 1;\n if (b === undefined)\n return -1;\n // make sure that nulls are at the end of the sort.\n if (a === null)\n return 1;\n if (b === null)\n return -1;\n if (typeof a == 'string' && typeof b == 'string') {\n return a < b ? -1 : 1;\n }\n if (typeof a == 'number' && typeof b == 'number') {\n return a - b;\n }\n if (typeof a == 'boolean' && typeof b == 'boolean') {\n return a < b ? -1 : 1;\n }\n // `a` and `b` are of different types. Compare their string values.\n var aString = String(a);\n var bString = String(b);\n return aString == bString ? 0 : aString < bString ? -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 */\n/**\n * @ngModule CommonModule\n * @description\n *\n * Transforms a number into a string,\n * formatted according to locale rules that determine group sizing and\n * separator, decimal-point character, and other locale-specific\n * configurations.\n *\n * If no parameters are specified, the function rounds off to the nearest value using this\n * [rounding method](https://en.wikibooks.org/wiki/Arithmetic/Rounding).\n * The behavior differs from that of the JavaScript ```Math.round()``` function.\n * In the following case for example, the pipe rounds down where\n * ```Math.round()``` rounds up:\n *\n * ```html\n * -2.5 | number:'1.0-0'\n * > -3\n * Math.round(-2.5)\n * > -2\n * ```\n *\n * @see `formatNumber()`\n *\n * @usageNotes\n * The following code shows how the pipe transforms numbers\n * into text strings, according to various format specifications,\n * where the caller's default locale is `en-US`.\n *\n * ### Example\n *\n * <code-example path=\"common/pipes/ts/number_pipe.ts\" region='NumberPipe'></code-example>\n *\n */\nvar DecimalPipe = /** @class */ (function () {\n function DecimalPipe(_locale) {\n this._locale = _locale;\n }\n DecimalPipe_1 = DecimalPipe;\n /**\n * @param value The number to be formatted.\n * @param digitsInfo Decimal representation options, specified by a string\n * in the following format:<br>\n * <code>{minIntegerDigits}.{minFractionDigits}-{maxFractionDigits}</code>.\n * - `minIntegerDigits`: The minimum number of integer digits before the decimal point.\n * Default is `1`.\n * - `minFractionDigits`: The minimum number of digits after the decimal point.\n * Default is `0`.\n * - `maxFractionDigits`: The maximum number of digits after the decimal point.\n * Default is `3`.\n * @param locale A locale code for the locale format rules to use.\n * When not supplied, uses the value of `LOCALE_ID`, which is `en-US` by default.\n * See [Setting your app locale](guide/i18n#setting-up-the-locale-of-your-app).\n */\n DecimalPipe.prototype.transform = 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_1, error.message);\n }\n };\n var DecimalPipe_1;\n DecimalPipe = DecimalPipe_1 = __decorate([\n Pipe({ name: 'number' }),\n __param(0, Inject(LOCALE_ID)),\n __metadata(\"design:paramtypes\", [String])\n ], DecimalPipe);\n return DecimalPipe;\n}());\n/**\n * @ngModule CommonModule\n * @description\n *\n * Transforms a number to a percentage\n * string, formatted according to locale rules that determine group sizing and\n * separator, decimal-point character, and other locale-specific\n * configurations.\n *\n * @see `formatPercent()`\n *\n * @usageNotes\n * The following code shows how the pipe transforms numbers\n * into text strings, according to various format specifications,\n * where the caller's default locale is `en-US`.\n *\n * <code-example path=\"common/pipes/ts/percent_pipe.ts\" region='PercentPipe'></code-example>\n *\n *\n */\nvar PercentPipe = /** @class */ (function () {\n function PercentPipe(_locale) {\n this._locale = _locale;\n }\n PercentPipe_1 = PercentPipe;\n /**\n *\n * @param value The number to be formatted as a percentage.\n * @param digitsInfo Decimal representation options, specified by a string\n * in the following format:<br>\n * <code>{minIntegerDigits}.{minFractionDigits}-{maxFractionDigits}</code>.\n * - `minIntegerDigits`: The minimum number of integer digits before the decimal point.\n * Default is `1`.\n * - `minFractionDigits`: The minimum number of digits after the decimal point.\n * Default is `0`.\n * - `maxFractionDigits`: The maximum number of digits after the decimal point.\n * Default is `3`.\n * @param locale A locale code for the locale format rules to use.\n * When not supplied, uses the value of `LOCALE_ID`, which is `en-US` by default.\n * See [Setting your app locale](guide/i18n#setting-up-the-locale-of-your-app).\n */\n PercentPipe.prototype.transform = 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_1, error.message);\n }\n };\n var PercentPipe_1;\n PercentPipe = PercentPipe_1 = __decorate([\n Pipe({ name: 'percent' }),\n __param(0, Inject(LOCALE_ID)),\n __metadata(\"design:paramtypes\", [String])\n ], PercentPipe);\n return PercentPipe;\n}());\n/**\n * @ngModule CommonModule\n * @description\n *\n * Transforms a number to a currency string, formatted according to locale rules\n * that determine group sizing and separator, decimal-point character,\n * and other locale-specific configurations.\n *\n * @see `getCurrencySymbol()`\n * @see `formatCurrency()`\n *\n * @usageNotes\n * The following code shows how the pipe transforms numbers\n * into text strings, according to various format specifications,\n * where the caller's default locale is `en-US`.\n *\n * <code-example path=\"common/pipes/ts/currency_pipe.ts\" region='CurrencyPipe'></code-example>\n *\n *\n */\nvar CurrencyPipe = /** @class */ (function () {\n function CurrencyPipe(_locale) {\n this._locale = _locale;\n }\n CurrencyPipe_1 = CurrencyPipe;\n /**\n *\n * @param value The number to be formatted as currency.\n * @param currencyCode The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) currency code,\n * such as `USD` for the US dollar and `EUR` for the euro.\n * @param display The format for the currency indicator. One of the following:\n * - `code`: Show the code (such as `USD`).\n * - `symbol`(default): Show the symbol (such as `$`).\n * - `symbol-narrow`: Use the narrow symbol for locales that have two symbols for their\n * currency.\n * For example, the Canadian dollar CAD has the symbol `CA$` and the symbol-narrow `$`. If the\n * locale has no narrow symbol, uses the standard symbol for the locale.\n * - String: Use the given string value instead of a code or a symbol.\n * For example, an empty string will suppress the currency & symbol.\n * - Boolean (marked deprecated in v5): `true` for symbol and false for `code`.\n *\n * @param digitsInfo Decimal representation options, specified by a string\n * in the following format:<br>\n * <code>{minIntegerDigits}.{minFractionDigits}-{maxFractionDigits}</code>.\n * - `minIntegerDigits`: The minimum number of integer digits before the decimal point.\n * Default is `1`.\n * - `minFractionDigits`: The minimum number of digits after the decimal point.\n * Default is `0`.\n * - `maxFractionDigits`: The maximum number of digits after the decimal point.\n * Default is `3`.\n * If not provided, the number will be formatted with the proper amount of digits,\n * depending on what the [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) specifies.\n * For example, the Canadian dollar has 2 digits, whereas the Chilean peso has none.\n * @param locale A locale code for the locale format rules to use.\n * When not supplied, uses the value of `LOCALE_ID`, which is `en-US` by default.\n * See [Setting your app locale](guide/i18n#setting-up-the-locale-of-your-app).\n */\n CurrencyPipe.prototype.transform = 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_1, error.message);\n }\n };\n var CurrencyPipe_1;\n CurrencyPipe = CurrencyPipe_1 = __decorate([\n Pipe({ name: 'currency' }),\n __param(0, Inject(LOCALE_ID)),\n __metadata(\"design:paramtypes\", [String])\n ], CurrencyPipe);\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 * @usageNotes\n *\n * All behavior is based on the expected behavior of the JavaScript API `Array.prototype.slice()`\n * and `String.prototype.slice()`.\n *\n * When operating on an `Array`, the returned `Array` is always a copy even when all\n * the elements are being returned.\n *\n * When operating on a blank value, the pipe returns the blank value.\n *\n * ### List Example\n *\n * This `ngFor` example:\n *\n * {@example common/pipes/ts/slice_pipe.ts region='SlicePipe_list'}\n *\n * produces the following:\n *\n * ```html\n * <li>b</li>\n * <li>c</li>\n * ```\n *\n * ### String Examples\n *\n * {@example common/pipes/ts/slice_pipe.ts region='SlicePipe_string'}\n *\n */\nvar SlicePipe = /** @class */ (function () {\n function SlicePipe() {\n }\n SlicePipe_1 = SlicePipe;\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 = function (value, start, end) {\n if (value == null)\n return value;\n if (!this.supports(value)) {\n throw invalidPipeArgumentError(SlicePipe_1, value);\n }\n return value.slice(start, end);\n };\n SlicePipe.prototype.supports = function (obj) { return typeof obj === 'string' || Array.isArray(obj); };\n var SlicePipe_1;\n SlicePipe = SlicePipe_1 = __decorate([\n Pipe({ name: 'slice', pure: false })\n ], SlicePipe);\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 KeyValuePipe,\n];\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source 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 * Exports all the basic Angular directives and pipes,\n * such as `NgIf`, `NgForOf`, `DecimalPipe`, and so on.\n * Re-exported by `BrowserModule`, which is included automatically in the root\n * `AppModule` when you create a new app with the CLI `new` command.\n *\n * * The `providers` options configure the NgModule's injector to provide\n * localization dependencies to members.\n * * The `exports` options make the declared directives and pipes available for import\n * by other NgModules.\n *\n */\nvar CommonModule = /** @class */ (function () {\n function CommonModule() {\n }\n CommonModule = __decorate([\n NgModule({\n declarations: [COMMON_DIRECTIVES, COMMON_PIPES],\n exports: [COMMON_DIRECTIVES, COMMON_PIPES],\n providers: [\n { provide: NgLocalization, useClass: NgLocaleLocalization },\n ],\n })\n ], CommonModule);\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 = __decorate([\n NgModule({\n declarations: [COMMON_DEPRECATED_I18N_PIPES],\n exports: [COMMON_DEPRECATED_I18N_PIPES],\n providers: [{ provide: DEPRECATED_PLURAL_FN, useValue: ɵ0 }],\n })\n ], DeprecatedI18NPipesModule);\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 */\nvar VERSION = new Version('6.1.10');\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * Manages the scroll position.\n */\nvar ViewportScroller = /** @class */ (function () {\n function ViewportScroller() {\n }\n // De-sugared tree-shakable injection\n // See #23917\n /** @nocollapse */\n ViewportScroller.ngInjectableDef = defineInjectable({ providedIn: 'root', factory: function () { return new BrowserViewportScroller(inject(DOCUMENT), window); } });\n return ViewportScroller;\n}());\n/**\n * Manages the scroll position.\n */\nvar BrowserViewportScroller = /** @class */ (function () {\n function BrowserViewportScroller(document, window) {\n this.document = document;\n this.window = window;\n this.offset = function () { return [0, 0]; };\n }\n /**\n * Configures the top offset used when scrolling to an anchor.\n *\n * * When given a number, the service will always use the number.\n * * When given a function, the service will invoke the function every time it restores scroll\n * position.\n */\n BrowserViewportScroller.prototype.setOffset = function (offset) {\n if (Array.isArray(offset)) {\n this.offset = function () { return offset; };\n }\n else {\n this.offset = offset;\n }\n };\n /**\n * Returns the current scroll position.\n */\n BrowserViewportScroller.prototype.getScrollPosition = function () {\n if (this.supportScrollRestoration()) {\n return [this.window.scrollX, this.window.scrollY];\n }\n else {\n return [0, 0];\n }\n };\n /**\n * Sets the scroll position.\n */\n BrowserViewportScroller.prototype.scrollToPosition = function (position) {\n if (this.supportScrollRestoration()) {\n this.window.scrollTo(position[0], position[1]);\n }\n };\n /**\n * Scrolls to the provided anchor.\n */\n BrowserViewportScroller.prototype.scrollToAnchor = function (anchor) {\n if (this.supportScrollRestoration()) {\n var elSelectedById = this.document.querySelector(\"#\" + anchor);\n if (elSelectedById) {\n this.scrollToElement(elSelectedById);\n return;\n }\n var elSelectedByName = this.document.querySelector(\"[name='\" + anchor + \"']\");\n if (elSelectedByName) {\n this.scrollToElement(elSelectedByName);\n return;\n }\n }\n };\n /**\n * Disables automatic scroll restoration provided by the browser.\n */\n BrowserViewportScroller.prototype.setHistoryScrollRestoration = function (scrollRestoration) {\n if (this.supportScrollRestoration()) {\n var history_1 = this.window.history;\n if (history_1 && history_1.scrollRestoration) {\n history_1.scrollRestoration = scrollRestoration;\n }\n }\n };\n BrowserViewportScroller.prototype.scrollToElement = function (el) {\n var rect = el.getBoundingClientRect();\n var left = rect.left + this.window.pageXOffset;\n var top = rect.top + this.window.pageYOffset;\n var offset = this.offset();\n this.window.scrollTo(left - offset[0], top - offset[1]);\n };\n /**\n * We only support scroll restoration when we can get a hold of window.\n * This means that we do not support this behavior when running in a web worker.\n *\n * Lifting this restriction right now would require more changes in the dom adapter.\n * Since webworkers aren't widely used, we will lift it once RouterScroller is\n * battle-tested.\n */\n BrowserViewportScroller.prototype.supportScrollRestoration = function () {\n try {\n return !!this.window && !!this.window.scrollTo;\n }\n catch (e) {\n return false;\n }\n };\n return BrowserViewportScroller;\n}());\n/**\n * Provides an empty implementation of the viewport scroller. This will\n * live in @angular/common as it will be used by both platform-server and platform-webworker.\n */\nvar NullViewportScroller = /** @class */ (function () {\n function NullViewportScroller() {\n }\n /**\n * Empty implementation\n */\n NullViewportScroller.prototype.setOffset = function (offset) { };\n /**\n * Empty implementation\n */\n NullViewportScroller.prototype.getScrollPosition = function () { return [0, 0]; };\n /**\n * Empty implementation\n */\n NullViewportScroller.prototype.scrollToPosition = function (position) { };\n /**\n * Empty implementation\n */\n NullViewportScroller.prototype.scrollToAnchor = function (anchor) { };\n /**\n * Empty implementation\n */\n NullViewportScroller.prototype.setHistoryScrollRestoration = function (scrollRestoration) { };\n return NullViewportScroller;\n}());\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code 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 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, KeyValuePipe, 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, ViewportScroller, NullViewportScroller as ɵNullViewportScroller, PlatformLocation, LOCATION_INITIALIZED, LocationStrategy, APP_BASE_HREF, HashLocationStrategy, PathLocationStrategy, Location };\n//# sourceMappingURL=common.js.map\n","/**\n * @license Angular v6.1.10\n * (c) 2010-2018 Google, Inc. https://angular.io/\n * License: MIT\n */\n\nimport { __decorate, __param, __metadata, __extends, __spread, __read } from 'tslib';\nimport { Injectable, InjectionToken, Inject, PLATFORM_ID, Injector, NgModule } from '@angular/core';\nimport { of, Observable } from 'rxjs';\nimport { concatMap, filter, map } from 'rxjs/operators';\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 HttpHeaders.prototype.has = function (name) {\n this.init();\n return this.headers.has(name.toLowerCase());\n };\n /**\n * Returns first header that matches given name.\n */\n HttpHeaders.prototype.get = 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 HttpHeaders.prototype.keys = 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 HttpHeaders.prototype.getAll = 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 HttpHeaders.prototype.forEach = 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 (key) { return standardEncoding(key); };\n HttpUrlEncodingCodec.prototype.encodeValue = function (value) { return standardEncoding(value); };\n HttpUrlEncodingCodec.prototype.decodeKey = function (key) { return decodeURIComponent(key); };\n HttpUrlEncodingCodec.prototype.decodeValue = function (value) { return decodeURIComponent(value); };\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 HttpParams.prototype.has = 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 HttpParams.prototype.get = 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 HttpParams.prototype.getAll = 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 HttpParams.prototype.keys = 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 HttpParams.prototype.append = 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 HttpParams.prototype.set = 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 HttpParams.prototype.delete = 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 HttpParams.prototype.toString = 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 HttpRequest.prototype.serializeBody = 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 HttpRequest.prototype.detectContentTypeHeader = 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 */\nvar HttpEventType;\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 HttpHeaderResponse.prototype.clone = 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 HttpClient.prototype.request = 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 HttpClient.prototype.delete = 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 HttpClient.prototype.get = 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 HttpClient.prototype.head = 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 HttpClient.prototype.jsonp = 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 HttpClient.prototype.options = 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 HttpClient.prototype.patch = 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 HttpClient.prototype.post = 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 * PUT request to be executed on the server. See the individual overloads for\n * details of `put()`'s return type based on the provided options.\n */\n HttpClient.prototype.put = function (url, body, options) {\n if (options === void 0) { options = {}; }\n return this.request('PUT', url, addBody(options, body));\n };\n HttpClient = __decorate([\n Injectable(),\n __metadata(\"design:paramtypes\", [HttpHandler])\n ], HttpClient);\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 = __decorate([\n Injectable()\n ], NoopInterceptor);\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 JsonpClientBackend.prototype.nextCallback = function () { return \"ng_jsonp_callback_\" + nextRequestId++; };\n /**\n * Process a JSONP request and return an event stream of the results.\n */\n JsonpClientBackend.prototype.handle = 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 _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 = __decorate([\n Injectable(),\n __param(1, Inject(DOCUMENT)),\n __metadata(\"design:paramtypes\", [JsonpCallbackContext, Object])\n ], JsonpClientBackend);\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 = __decorate([\n Injectable(),\n __metadata(\"design:paramtypes\", [JsonpClientBackend])\n ], JsonpInterceptor);\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 = __decorate([\n Injectable(),\n __metadata(\"design:paramtypes\", [])\n ], BrowserXhr);\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 HttpXhrBackend.prototype.handle = 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 = __decorate([\n Injectable(),\n __metadata(\"design:paramtypes\", [XhrFactory])\n ], HttpXhrBackend);\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 = __decorate([\n Injectable(),\n __param(0, Inject(DOCUMENT)), __param(1, Inject(PLATFORM_ID)),\n __param(2, Inject(XSRF_COOKIE_NAME)),\n __metadata(\"design:paramtypes\", [Object, String, String])\n ], HttpXsrfCookieExtractor);\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 = __decorate([\n Injectable(),\n __param(1, Inject(XSRF_HEADER_NAME)),\n __metadata(\"design:paramtypes\", [HttpXsrfTokenExtractor, String])\n ], HttpXsrfInterceptor);\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 injectable `HttpHandler` that applies multiple interceptors\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 * @see `HttpInterceptor`\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 = __decorate([\n Injectable(),\n __metadata(\"design:paramtypes\", [HttpBackend, Injector])\n ], HttpInterceptingHandler);\n return HttpInterceptingHandler;\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 * Configures XSRF protection support for outgoing requests.\n *\n * For a server that supports a cookie-based XSRF protection system,\n * use directly to configure XSRF protection with the correct\n * cookie and header names.\n *\n * If no names are supplied, the default cookie name is `XSRF-TOKEN`\n * and the default header name is `X-XSRF-TOKEN`.\n *\n *\n */\nvar HttpClientXsrfModule = /** @class */ (function () {\n function HttpClientXsrfModule() {\n }\n HttpClientXsrfModule_1 = HttpClientXsrfModule;\n /**\n * Disable the default XSRF protection.\n */\n HttpClientXsrfModule.disable = function () {\n return {\n ngModule: HttpClientXsrfModule_1,\n providers: [\n { provide: HttpXsrfInterceptor, useClass: NoopInterceptor },\n ],\n };\n };\n /**\n * Configure XSRF protection.\n * @param options An object that can specify either or both\n * cookie name or header name.\n * - Cookie name default is `XSRF-TOKEN`.\n * - Header name default is `X-XSRF-TOKEN`.\n *\n */\n HttpClientXsrfModule.withOptions = function (options) {\n if (options === void 0) { options = {}; }\n return {\n ngModule: HttpClientXsrfModule_1,\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 var HttpClientXsrfModule_1;\n HttpClientXsrfModule = HttpClientXsrfModule_1 = __decorate([\n NgModule({\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 ], HttpClientXsrfModule);\n return HttpClientXsrfModule;\n}());\n/**\n * Configures the [dependency injector](guide/glossary#injector) for `HttpClient`\n * with supporting services for XSRF. Automatically imported by `HttpClientModule`.\n *\n * You can add interceptors to the chain behind `HttpClient` by binding them to the\n * multiprovider for built-in [DI token](guide/glossary#di-token) `HTTP_INTERCEPTORS`.\n *\n *\n */\nvar HttpClientModule = /** @class */ (function () {\n function HttpClientModule() {\n }\n HttpClientModule = __decorate([\n NgModule({\n /**\n * Optional configuration for XSRF protection.\n */\n imports: [\n HttpClientXsrfModule.withOptions({\n cookieName: 'XSRF-TOKEN',\n headerName: 'X-XSRF-TOKEN',\n }),\n ],\n /**\n * Configures the [dependency injector](guide/glossary#injector) where it is imported\n * with supporting services for HTTP communications.\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 ], HttpClientModule);\n return HttpClientModule;\n}());\n/**\n * Configures the [dependency injector](guide/glossary#injector) for `HttpClient`\n * with supporting services for JSONP.\n * Without this module, Jsonp requests reach the backend\n * with method JSONP, where they are rejected.\n *\n * You can add interceptors to the chain behind `HttpClient` by binding them to the\n * multiprovider for built-in [DI token](guide/glossary#di-token) `HTTP_INTERCEPTORS`.\n *\n *\n */\nvar HttpClientJsonpModule = /** @class */ (function () {\n function HttpClientJsonpModule() {\n }\n HttpClientJsonpModule = __decorate([\n NgModule({\n providers: [\n JsonpClientBackend,\n { provide: JsonpCallbackContext, useFactory: jsonpCallbackContext },\n { provide: HTTP_INTERCEPTORS, useClass: JsonpInterceptor, multi: true },\n ],\n })\n ], HttpClientJsonpModule);\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, jsonpCallbackContext as ɵangular_packages_common_http_http_c, BrowserXhr as ɵangular_packages_common_http_http_d, HttpXsrfCookieExtractor as ɵangular_packages_common_http_http_g, HttpXsrfInterceptor as ɵangular_packages_common_http_http_h, XSRF_COOKIE_NAME as ɵangular_packages_common_http_http_e, XSRF_HEADER_NAME as ɵangular_packages_common_http_http_f, HttpBackend, HttpHandler, HttpClient, HttpHeaders, HTTP_INTERCEPTORS, JsonpClientBackend, JsonpInterceptor, HttpClientJsonpModule, HttpClientModule, HttpClientXsrfModule, HttpInterceptingHandler as ɵHttpInterceptingHandler, HttpParams, HttpUrlEncodingCodec, HttpRequest, HttpErrorResponse, HttpEventType, HttpHeaderResponse, HttpResponse, HttpResponseBase, HttpXhrBackend, XhrFactory, HttpXsrfTokenExtractor };\n//# sourceMappingURL=http.js.map\n","/**\n * @license Angular v6.1.10\n * (c) 2010-2018 Google, Inc. https://angular.io/\n * License: MIT\n */\n\nimport { __extends, __spread, __assign, __values, __read } 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 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 `{` / `ƫ` 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 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}());\nvar _DEFAULT_TAG_DEFINITION;\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;\nfunction getHtmlTagDefinition(tagName) {\n if (!TAG_DEFINITIONS) {\n _DEFAULT_TAG_DEFINITION = new HtmlTagDefinition();\n 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',\n 'footer', 'form', 'h1', 'h2', 'h3', 'h4', 'h5',\n 'h6', 'header', 'hgroup', 'hr', 'main', 'nav', 'ol',\n '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 };\n }\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 _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 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[\"ShadowDom\"] = 3] = \"ShadowDom\";\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}\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}\n\nvar core = /*#__PURE__*/Object.freeze({\n createInject: createInject,\n createInjectionToken: createInjectionToken,\n createAttribute: createAttribute,\n createContentChildren: createContentChildren,\n createContentChild: createContentChild,\n createViewChildren: createViewChildren,\n createViewChild: createViewChild,\n createDirective: createDirective,\n get ViewEncapsulation () { return ViewEncapsulation; },\n get ChangeDetectionStrategy () { return ChangeDetectionStrategy; },\n createComponent: createComponent,\n createPipe: createPipe,\n createInput: createInput,\n createOutput: createOutput,\n createHostBinding: createHostBinding,\n createHostListener: createHostListener,\n createNgModule: createNgModule,\n createInjectable: createInjectable,\n CUSTOM_ELEMENTS_SCHEMA: CUSTOM_ELEMENTS_SCHEMA,\n NO_ERRORS_SCHEMA: NO_ERRORS_SCHEMA,\n createOptional: createOptional,\n createSelf: createSelf,\n createSkipSelf: createSkipSelf,\n createHost: createHost,\n Type: Type,\n get SecurityContext () { return SecurityContext; },\n get MissingTranslationStrategy () { return MissingTranslationStrategy; },\n parseSelectorToR3Selector: parseSelectorToR3Selector\n});\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this 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 */\nvar VERSION = new Version('6.1.10');\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this 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 _a;\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}());\nvar BoundPropertyMapping = (_a = {},\n _a[4 /* Animation */] = 4 /* Animation */,\n _a[1 /* Attribute */] = 1 /* Attribute */,\n _a[2 /* Class */] = 2 /* Class */,\n _a[0 /* Property */] = 0 /* Property */,\n _a[3 /* Style */] = 3 /* Style */,\n _a);\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 === 4 /* Animation */;\n }\n BoundElementPropertyAst.fromBoundProperty = function (prop) {\n var type = BoundPropertyMapping[prop.type];\n return new BoundElementPropertyAst(prop.name, type, prop.securityContext, prop.value, prop.unit, prop.sourceSpan);\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 if (phase) {\n return \"@\" + name + \".\" + phase;\n }\n return name;\n };\n BoundEventAst.fromParsedEvent = function (event) {\n var target = event.type === 0 /* Regular */ ? event.targetOrPhase : null;\n var phase = event.type === 1 /* Animation */ ? event.targetOrPhase : null;\n return new BoundEventAst(event.name, target, phase, event.handler, event.sourceSpan);\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.fromParsedVariable = function (v) {\n return new VariableAst(v.name, v.value, v.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 * 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 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 = '';\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;\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 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// Bindings\nvar ParsedProperty = /** @class */ (function () {\n function ParsedProperty(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 === ParsedPropertyType.LITERAL_ATTR;\n this.isAnimation = this.type === ParsedPropertyType.ANIMATION;\n }\n return ParsedProperty;\n}());\nvar ParsedPropertyType;\n(function (ParsedPropertyType) {\n ParsedPropertyType[ParsedPropertyType[\"DEFAULT\"] = 0] = \"DEFAULT\";\n ParsedPropertyType[ParsedPropertyType[\"LITERAL_ATTR\"] = 1] = \"LITERAL_ATTR\";\n ParsedPropertyType[ParsedPropertyType[\"ANIMATION\"] = 2] = \"ANIMATION\";\n})(ParsedPropertyType || (ParsedPropertyType = {}));\nvar ParsedEvent = /** @class */ (function () {\n // Regular events have a target\n // Animation events have a phase\n function ParsedEvent(name, targetOrPhase, type, handler, sourceSpan) {\n this.name = name;\n this.targetOrPhase = targetOrPhase;\n this.type = type;\n this.handler = handler;\n this.sourceSpan = sourceSpan;\n }\n return ParsedEvent;\n}());\nvar ParsedVariable = /** @class */ (function () {\n function ParsedVariable(name, value, sourceSpan) {\n this.name = name;\n this.value = value;\n this.sourceSpan = sourceSpan;\n }\n return ParsedVariable;\n}());\nvar BoundElementProperty = /** @class */ (function () {\n function BoundElementProperty(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 }\n return BoundElementProperty;\n}());\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this 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 (tplKey, tplValue, location) {\n var tokens = this._lexer.tokenize(tplValue);\n return new _ParseAST(tplValue, location, tokens, tplValue.length, false, this.errors, 0)\n .parseTemplateBindings(tplKey);\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 // Parses the AST for `<some-tag *tplKey=AST>`\n _ParseAST.prototype.parseTemplateBindings = function (tplKey) {\n var firstBinding = true;\n var bindings = [];\n var warnings = [];\n do {\n var start = this.inputIndex;\n var rawKey = void 0;\n var key = void 0;\n var isVar = false;\n if (firstBinding) {\n rawKey = key = tplKey;\n firstBinding = false;\n }\n else {\n isVar = this.peekKeywordLet();\n if (isVar)\n this.advance();\n rawKey = this.expectTemplateBindingKey();\n key = isVar ? rawKey : tplKey + rawKey[0].toUpperCase() + rawKey.substring(1);\n this.optionalCharacter($COLON);\n }\n var name_2 = null;\n var expression = null;\n if (isVar) {\n if (this.optionalOperator('=')) {\n name_2 = this.expectTemplateBindingKey();\n }\n else {\n name_2 = '\\$implicit';\n }\n }\n else if (this.peekKeywordAs()) {\n this.advance(); // consume `as`\n name_2 = rawKey;\n key = this.expectTemplateBindingKey(); // read local var name\n isVar = 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, isVar, name_2, expression));\n if (this.peekKeywordAs() && !isVar) {\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 } while (this.index < this.tokens.length);\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 _a, _b;\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 _c = __read([0x67452301, 0xefcdab89, 0x98badcfe, 0x10325476, 0xc3d2e1f0], 5), a = _c[0], b = _c[1], c = _c[2], d = _c[3], e = _c[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 _d = __read([a, b, c, d, e], 5), h0 = _d[0], h1 = _d[1], h2 = _d[2], h3 = _d[3], h4 = _d[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 _e = __read(fk(j, b, c, d), 2), f = _e[0], k = _e[1];\n var temp = [rol32(a, 5), f, e, k, w[j]].reduce(add32);\n _a = __read([d, c, rol32(b, 30), a, temp], 5), e = _a[0], d = _a[1], c = _a[2], b = _a[3], a = _a[4];\n }\n _b = __read([add32(a, h0), add32(b, h1), add32(c, h2), add32(d, h3), add32(e, h4)], 5), a = _b[0], b = _b[1], c = _b[2], d = _b[3], e = _b[4];\n }\n return byteStringToHexString(words32ToByteString([a, b, c, 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;\n var _b = __read(fingerprint(msg), 2), hi = _b[0], lo = _b[1];\n if (meaning) {\n var _c = __read(fingerprint(meaning), 2), him = _c[0], lom = _c[1];\n _a = __read(add64(rol64([hi, lo], 1), [him, lom]), 2), hi = _a[0], lo = _a[1];\n }\n return byteStringToDecString(words32ToByteString([hi & 0x7fffffff, lo]));\n}\nfunction hash32(str, c) {\n var _a;\n var _b = __read([0x9e3779b9, 0x9e3779b9], 2), a = _b[0], b = _b[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 _a = __read(mix([a, b, c]), 3), a = _a[0], b = _a[1], c = _a[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}\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 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, '&'],\n [/\"/g, '"'],\n [/'/g, '''],\n [/</g, '<'],\n [/>/g, '>'],\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 _a;\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 });\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.InjectableDef = { name: 'ɵInjectableDef', 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[\"None\"] = 7] = \"None\";\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, typeParams) {\n if (modifiers === void 0) { modifiers = null; }\n if (typeParams === void 0) { typeParams = null; }\n var _this = _super.call(this, modifiers) || this;\n _this.value = value;\n _this.typeParams = typeParams;\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);\nvar NONE_TYPE = new BuiltinType(BuiltinTypeName.None);\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 TypeofExpr = /** @class */ (function (_super) {\n __extends(TypeofExpr, _super);\n function TypeofExpr(expr, type, sourceSpan) {\n var _this = _super.call(this, type, sourceSpan) || this;\n _this.expr = expr;\n return _this;\n }\n TypeofExpr.prototype.visitExpression = function (visitor, context) {\n return visitor.visitTypeofExpr(this, context);\n };\n TypeofExpr.prototype.isEquivalent = function (e) {\n return e instanceof TypeofExpr && e.expr.isEquivalent(this.expr);\n };\n TypeofExpr.prototype.isConstant = function () { return this.expr.isConstant(); };\n return TypeofExpr;\n}(Expression));\nvar WrappedNodeExpr = /** @class */ (function (_super) {\n __extends(WrappedNodeExpr, _super);\n function WrappedNodeExpr(node, type, sourceSpan) {\n var _this = _super.call(this, type, sourceSpan) || this;\n _this.node = node;\n return _this;\n }\n WrappedNodeExpr.prototype.isEquivalent = function (e) {\n return e instanceof WrappedNodeExpr && this.node === e.node;\n };\n WrappedNodeExpr.prototype.isConstant = function () { return false; };\n WrappedNodeExpr.prototype.visitExpression = function (visitor, context) {\n return visitor.visitWrappedNodeExpr(this, context);\n };\n return WrappedNodeExpr;\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.visitWrappedNodeExpr = function (ast, context) {\n return this.transformExpr(ast, context);\n };\n AstTransformer.prototype.visitTypeofExpr = function (expr, context) {\n return this.transformExpr(new TypeofExpr(expr.expr.visitExpression(this, context), expr.type, expr.sourceSpan), context);\n };\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 var _this = this;\n type.value.visitExpression(this, context);\n if (type.typeParams !== null) {\n type.typeParams.forEach(function (param) { return _this.visitType(param, context); });\n }\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.visitWrappedNodeExpr = function (ast, context) { return ast; };\n RecursiveAstVisitor.prototype.visitTypeofExpr = function (ast, context) { return this.visitExpression(ast, 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, typeParams) {\n if (typeModifiers === void 0) { typeModifiers = null; }\n if (typeParams === void 0) { typeParams = null; }\n return new ExpressionType(expr, typeModifiers, typeParams);\n}\nfunction typeofExpr(expr) {\n return new TypeofExpr(expr);\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 var e_1, _a;\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}\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this 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 /* Default */;\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 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 var _a;\n if (!(factory instanceof StaticSymbol)) {\n (_a = factory.ngContentSelectors).push.apply(_a, __spread(ngContentSelectors));\n }\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. This 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 else if (this._getOrCreateLocalProvider(dep.token, eager) != null) ;\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 /* None */;\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 /* None */;\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 /* None */;\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.visitWrappedNodeExpr = function (ast, ctx) {\n throw new Error('Abstract emitter cannot visit WrappedNodeExpr.');\n };\n AbstractEmitterVisitor.prototype.visitTypeofExpr = function (expr, ctx) {\n ctx.print(expr, 'typeof ');\n expr.expr.visitExpression(this, ctx);\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.visitWrappedNodeExpr = function (ast, ctx) {\n throw new Error('Cannot visit a WrappedNodeExpr when outputting Typescript.');\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 case BuiltinTypeName.None:\n typeStr = 'never';\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 var _this = this;\n ast.value.visitExpression(this, ctx);\n if (ast.typeParams !== null) {\n ctx.print(null, '<');\n this.visitAllObjects(function (type) { return _this.visitType(type, ctx); }, ast.typeParams, ctx, ',');\n ctx.print(null, '>');\n }\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 SECURITY_SCHEMA() {\n if (!_SECURITY_SCHEMA) {\n _SECURITY_SCHEMA = {};\n // Case is insignificant below, all element and attribute names are lower-cased for lookup.\n registerContext(SecurityContext.HTML, [\n 'iframe|srcdoc',\n '*|innerHTML',\n '*|outerHTML',\n ]);\n registerContext(SecurityContext.STYLE, ['*|style']);\n // NB: no SCRIPT contexts here, they are never allowed due to the parser stripping them.\n registerContext(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 ]);\n registerContext(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 return _SECURITY_SCHEMA;\n}\nfunction registerContext(ctx, specs) {\n var e_1, _a;\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}\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this 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-';\n/**\n * Parses bindings in templates and in the directive host area.\n */\nvar BindingParser = /** @class */ (function () {\n function BindingParser(_exprParser, _interpolationConfig, _schemaRegistry, pipes, errors) {\n this._exprParser = _exprParser;\n this._interpolationConfig = _interpolationConfig;\n this._schemaRegistry = _schemaRegistry;\n this.errors = errors;\n this.pipesByName = null;\n this._usedPipes = new Map();\n // When the `pipes` parameter is `null`, do not check for used pipes\n // This is used in IVY when we might not know the available pipes at compile time\n if (pipes) {\n var pipesByName_1 = new Map();\n pipes.forEach(function (pipe) { return pipesByName_1.set(pipe.name, pipe); });\n this.pipesByName = pipesByName_1;\n }\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.createBoundElementProperty(elementSelector, prop); });\n };\n BindingParser.prototype.createDirectiveHostEventAsts = function (dirMeta, sourceSpan) {\n var _this = this;\n if (dirMeta.hostListeners) {\n var targetEvents_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, [], targetEvents_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 targetEvents_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 // Parse an inline template binding. ie `<tag *tplKey=\"<tplValue>\">`\n BindingParser.prototype.parseInlineTemplateBinding = function (tplKey, tplValue, sourceSpan, targetMatchableAttrs, targetProps, targetVars) {\n var bindings = this._parseTemplateBindings(tplKey, tplValue, sourceSpan);\n for (var i = 0; i < bindings.length; i++) {\n var binding = bindings[i];\n if (binding.keyIsVar) {\n targetVars.push(new ParsedVariable(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 (tplKey, tplValue, sourceSpan) {\n var _this = this;\n var sourceInfo = sourceSpan.start.toString();\n try {\n var bindingsResult = this._exprParser.parseTemplateBindings(tplKey, tplValue, 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 ParsedProperty(name, this._exprParser.wrapLiteralPrimitive(value, ''), ParsedPropertyType.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 ParsedProperty(name, ast, ParsedPropertyType.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 ParsedProperty(name, ast, ParsedPropertyType.ANIMATION, sourceSpan));\n };\n BindingParser.prototype._parseBinding = function (value, isHostBinding, sourceSpan) {\n var sourceInfo = (sourceSpan && sourceSpan.start || '(unknown)').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.createBoundElementProperty = function (elementSelector, boundProp) {\n if (boundProp.isAnimation) {\n return new BoundElementProperty(boundProp.name, 4 /* 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 = 1 /* Attribute */;\n }\n else if (parts[0] == CLASS_PREFIX) {\n boundPropertyName = parts[1];\n bindingType = 2 /* 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 = 3 /* 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 = 0 /* Property */;\n this._validatePropertyOrAttributeName(boundPropertyName, boundProp.sourceSpan, false);\n }\n return new BoundElementProperty(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._parseRegularEvent(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 ParsedEvent(eventName, phase, 1 /* Animation */, 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._parseRegularEvent = 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 ParsedEvent(eventName, target, 0 /* Regular */, 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 && sourceSpan.start || '(unknown').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.errors.push(new ParseError(sourceSpan, message, level));\n };\n BindingParser.prototype._reportExpressionParserErrors = function (errors, sourceSpan) {\n var e_1, _a;\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 };\n // Make sure all the used pipes are known in `this.pipesByName`\n BindingParser.prototype._checkPipes = function (ast, sourceSpan) {\n var _this = this;\n if (ast && this.pipesByName) {\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;\nfunction TEXT_CSS_SELECTOR() {\n if (!_TEXT_CSS_SELECTOR) {\n _TEXT_CSS_SELECTOR = CssSelector.parse('*')[0];\n }\n return _TEXT_CSS_SELECTOR;\n}\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 elName = 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 parsedVariables = [];\n var hasBinding = _this._parseAttr(isTemplateElement, attr, matchableAttrs, elementOrDirectiveProps, events, elementOrDirectiveRefs, elementVars);\n elementVars.push.apply(elementVars, __spread(parsedVariables.map(function (v) { return VariableAst.fromParsedVariable(v); })));\n var templateValue;\n var templateKey;\n var normalizedName = _this._normalizeAttributeName(attr.name);\n if (normalizedName.startsWith(TEMPLATE_ATTR_PREFIX)) {\n templateValue = attr.value;\n templateKey = normalizedName.substring(TEMPLATE_ATTR_PREFIX.length);\n }\n var hasTemplateBinding = templateValue != 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 var parsedVariables_1 = [];\n _this._bindingParser.parseInlineTemplateBinding(templateKey, templateValue, attr.sourceSpan, templateMatchableAttrs, templateElementOrDirectiveProps, parsedVariables_1);\n templateElementVars.push.apply(templateElementVars, __spread(parsedVariables_1.map(function (v) { return VariableAst.fromParsedVariable(v); })));\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(elName, 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 != '' ?\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 // `<ng-content>` element\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 // `<ng-template>` element\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 // element other than `<ng-content>` and `<ng-template>`\n this._assertElementExists(matchElement, element);\n this._assertOnlyOneComponent(directiveAsts, element.sourceSpan);\n var ngContentIndex_1 = hasInlineTemplates ? null : parent.findNgContentIndex(projectionSelector);\n parsedElement = new ElementAst(elName, 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 // The element as a *-attribute\n var templateQueryStartIndex = this.contentQueryStartId;\n var templateSelector = createElementCssSelector('ng-template', templateMatchableAttrs);\n var directives = this._parseDirectives(this.selectorMatcher, templateSelector).directives;\n var templateBoundDirectivePropNames = new Set();\n var templateDirectiveAsts = this._createDirectiveAsts(true, elName, directives, templateElementOrDirectiveProps, [], element.sourceSpan, [], templateBoundDirectivePropNames);\n var templateElementProps = this._createElementPropertyAsts(elName, 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 boundEvents = [];\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, boundEvents);\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, boundEvents);\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, boundEvents);\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, boundEvents);\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 targetEvents.push.apply(targetEvents, __spread(boundEvents.map(function (e) { return BoundEventAst.fromParsedEvent(e); })));\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 boundProperties = _this._bindingParser.createDirectiveHostPropertyAsts(directive, elementName, sourceSpan);\n var hostProperties = boundProperties.map(function (prop) { return BoundElementPropertyAst.fromBoundProperty(prop); });\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 parsedEvents = _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 hostEvents = parsedEvents.map(function (e) { return BoundEventAst.fromParsedEvent(e); });\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 var boundProp = _this._bindingParser.createBoundElementProperty(elementName, prop);\n boundElementProps.push(BoundElementPropertyAst.fromBoundProperty(boundProp));\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 === 0 /* 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 e_1, _a, e_2, _b;\n var result = __spread(this.guards);\n try {\n for (var _c = __values(ast.directives), _d = _c.next(); !_d.done; _d = _c.next()) {\n var directive = _d.value;\n try {\n for (var _e = __values(directive.inputs), _f = _e.next(); !_f.done; _f = _e.next()) {\n var input = _f.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_2_1) { e_2 = { error: e_2_1 }; }\n finally {\n try {\n if (_f && !_f.done && (_b = _e.return)) _b.call(_e);\n }\n finally { if (e_2) throw e_2.error; }\n }\n }\n }\n catch (e_1_1) { e_1 = { error: e_1_1 }; }\n finally {\n try {\n if (_d && !_d.done && (_a = _c.return)) _a.call(_c);\n }\n finally { if (e_1) throw e_1.error; }\n }\n return result;\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 var e_3, _a;\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 _b = __values(this.guards), _c = _b.next(); !_c.done; _c = _b.next()) {\n var guard = _c.value;\n var _d = this.preprocessUpdateExpression(guard.expression), context = _d.context, value = _d.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 _e = convertPropertyBinding(nameResolver, variable(this.getOutputVar(context)), value, bindingId, BindingForm.TrySimple), stmts = _e.stmts, currValExpr = _e.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 (_c && !_c.done && (_a = _b.return)) _a.call(_b);\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 };\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 _a;\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 };\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 /* All */;\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 /* None */;\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 /* None */;\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 /* All */;\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 /* None */;\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,\n 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 /* None */;\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 1 /* Attribute */:\n return literalArr([\n literal(1 /* TypeElementAttribute */), literal(inputAst.name),\n literal(inputAst.securityContext)\n ]);\n case 0 /* Property */:\n return literalArr([\n literal(8 /* TypeProperty */), literal(inputAst.name),\n literal(inputAst.securityContext)\n ]);\n case 4 /* 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 2 /* Class */:\n return literalArr([literal(2 /* TypeElementClass */), literal(inputAst.name), NULL_EXPR]);\n case 3 /* 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 /* None */;\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.visitWrappedNodeExpr = 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 KeyVisitor.prototype.visitReadVarExpr = function (node) { return \"VAR:\" + node.name; };\n KeyVisitor.prototype.visitTypeofExpr = function (node, context) {\n return \"TYPEOF:\" + node.expr.visitExpression(this, context);\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 _a;\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 };\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 _a;\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 });\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 */\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.namespaceHTML = { name: 'ɵNH', moduleName: CORE$1 };\n Identifiers.namespaceMathML = { name: 'ɵNM', moduleName: CORE$1 };\n Identifiers.namespaceSVG = { name: 'ɵNS', moduleName: CORE$1 };\n Identifiers.element = { name: 'ɵEe', moduleName: CORE$1 };\n Identifiers.elementStart = { 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.elementClassProp = { name: 'ɵcp', moduleName: CORE$1 };\n Identifiers.elementStyling = { name: 'ɵs', moduleName: CORE$1 };\n Identifiers.elementStylingMap = { name: 'ɵsm', moduleName: CORE$1 };\n Identifiers.elementStyleProp = { name: 'ɵsp', moduleName: CORE$1 };\n Identifiers.elementStylingApply = { name: 'ɵsa', moduleName: CORE$1 };\n Identifiers.containerCreate = { name: 'ɵC', moduleName: CORE$1 };\n Identifiers.text = { name: 'ɵT', moduleName: CORE$1 };\n Identifiers.textBinding = { 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.loadDirective = { name: 'ɵd', moduleName: CORE$1 };\n Identifiers.loadQueryList = { name: 'ɵql', 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.inject = { name: 'inject', 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.injectChangeDetectorRef = { name: 'ɵinjectChangeDetectorRef', moduleName: CORE$1 };\n Identifiers.directiveInject = { name: 'ɵdirectiveInject', moduleName: CORE$1 };\n Identifiers.defineComponent = { name: 'ɵdefineComponent', moduleName: CORE$1 };\n Identifiers.ComponentDef = {\n name: 'ɵComponentDef',\n moduleName: CORE$1,\n };\n Identifiers.defineDirective = {\n name: 'ɵdefineDirective',\n moduleName: CORE$1,\n };\n Identifiers.DirectiveDef = {\n name: 'ɵDirectiveDef',\n moduleName: CORE$1,\n };\n Identifiers.InjectorDef = {\n name: 'ɵInjectorDef',\n moduleName: CORE$1,\n };\n Identifiers.defineInjector = {\n name: 'defineInjector',\n moduleName: CORE$1,\n };\n Identifiers.NgModuleDef = {\n name: 'ɵNgModuleDef',\n moduleName: CORE$1,\n };\n Identifiers.defineNgModule = { name: 'ɵdefineNgModule', moduleName: CORE$1 };\n Identifiers.PipeDef = { name: 'ɵPipeDef', moduleName: CORE$1 };\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.registerContentQuery = { name: 'ɵQr', moduleName: CORE$1 };\n Identifiers.NgOnChangesFeature = { name: 'ɵNgOnChangesFeature', moduleName: CORE$1 };\n Identifiers.InheritDefinitionFeature = { name: 'ɵInheritDefinitionFeature', moduleName: CORE$1 };\n Identifiers.listener = { name: 'ɵL', moduleName: CORE$1 };\n // Reserve slots for pure functions\n Identifiers.reserveSlots = { name: 'ɵrS', moduleName: CORE$1 };\n // sanitization-related functions\n Identifiers.sanitizeHtml = { name: 'ɵzh', moduleName: CORE$1 };\n Identifiers.sanitizeStyle = { name: 'ɵzs', moduleName: CORE$1 };\n Identifiers.defaultStyleSanitizer = { name: 'ɵzss', moduleName: CORE$1 };\n Identifiers.sanitizeResourceUrl = { name: 'ɵzr', moduleName: CORE$1 };\n Identifiers.sanitizeScript = { name: 'ɵzc', moduleName: CORE$1 };\n Identifiers.sanitizeUrl = { name: 'ɵzu', 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 */\n/** Name of the temporary to use during data binding */\nvar TEMPORARY_NAME = '_t';\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/** 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 = '@@';\n/**\n * Creates an allocator for a temporary variable.\n *\n * A variable declaration is added to the statements the first time the allocator is invoked.\n */\nfunction temporaryAllocator(statements, name) {\n var temp = null;\n return function () {\n if (!temp) {\n statements.push(new DeclareVarStmt(TEMPORARY_NAME, undefined, DYNAMIC_TYPE));\n temp = variable(name);\n }\n return temp;\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}\nfunction invalid$1(arg) {\n throw new Error(\"Invalid state: Visitor \" + this.constructor.name + \" doesn't handle \" + undefined);\n}\nfunction asLiteral(value) {\n if (Array.isArray(value)) {\n return literalArr(value.map(asLiteral));\n }\n return literal(value, INFERRED_TYPE);\n}\nfunction conditionallyCreateMapObjectLiteral(keys) {\n if (Object.getOwnPropertyNames(keys).length > 0) {\n return mapToExpression(keys);\n }\n return null;\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/**\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}\nfunction getQueryPredicate(query, constantPool) {\n if (Array.isArray(query.predicate)) {\n return constantPool.getConstLiteral(literalArr(query.predicate.map(function (selector) { return literal(selector); })));\n }\n else {\n return query.predicate;\n }\n}\nfunction noop() { }\nvar DefinitionMap = /** @class */ (function () {\n function DefinitionMap() {\n this.values = [];\n }\n DefinitionMap.prototype.set = function (key, value) {\n if (value) {\n this.values.push({ key: key, value: value, quoted: false });\n }\n };\n DefinitionMap.prototype.toLiteralMap = function () { return literalMap(this.values); };\n return DefinitionMap;\n}());\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * Resolved type of a dependency.\n *\n * Occasionally, dependencies will have special significance which is known statically. In that\n * case the `R3ResolvedDependencyType` informs the factory generator that a particular dependency\n * should be generated specially (usually by calling a special injection function instead of the\n * standard one).\n */\nvar R3ResolvedDependencyType;\n(function (R3ResolvedDependencyType) {\n /**\n * A normal token dependency.\n */\n R3ResolvedDependencyType[R3ResolvedDependencyType[\"Token\"] = 0] = \"Token\";\n /**\n * The dependency is for an attribute.\n *\n * The token expression is a string representing the attribute name.\n */\n R3ResolvedDependencyType[R3ResolvedDependencyType[\"Attribute\"] = 1] = \"Attribute\";\n /**\n * The dependency is for the `Injector` type itself.\n */\n R3ResolvedDependencyType[R3ResolvedDependencyType[\"Injector\"] = 2] = \"Injector\";\n /**\n * The dependency is for `ElementRef`.\n */\n R3ResolvedDependencyType[R3ResolvedDependencyType[\"ElementRef\"] = 3] = \"ElementRef\";\n /**\n * The dependency is for `TemplateRef`.\n */\n R3ResolvedDependencyType[R3ResolvedDependencyType[\"TemplateRef\"] = 4] = \"TemplateRef\";\n /**\n * The dependency is for `ViewContainerRef`.\n */\n R3ResolvedDependencyType[R3ResolvedDependencyType[\"ViewContainerRef\"] = 5] = \"ViewContainerRef\";\n /**\n * The dependency is for `ChangeDetectorRef`.\n */\n R3ResolvedDependencyType[R3ResolvedDependencyType[\"ChangeDetectorRef\"] = 6] = \"ChangeDetectorRef\";\n})(R3ResolvedDependencyType || (R3ResolvedDependencyType = {}));\n/**\n * Construct a factory function expression for the given `R3FactoryMetadata`.\n */\nfunction compileFactoryFunction(meta) {\n // Each dependency becomes an invocation of an inject*() function.\n var args = meta.deps.map(function (dep) { return compileInjectDependency(dep, meta.injectFn); });\n // The overall result depends on whether this is construction or function invocation.\n var expr = meta.useNew ? new InstantiateExpr(meta.fnOrClass, args) :\n new InvokeFunctionExpr(meta.fnOrClass, args);\n return fn([], [new ReturnStatement(expr)], INFERRED_TYPE, undefined, meta.name + \"_Factory\");\n}\nfunction compileInjectDependency(dep, injectFn) {\n // Interpret the dependency according to its resolved type.\n switch (dep.resolved) {\n case R3ResolvedDependencyType.Token:\n case R3ResolvedDependencyType.Injector: {\n // Build up the injection flags according to the metadata.\n var flags = 0 /* Default */ | (dep.self ? 2 /* Self */ : 0) |\n (dep.skipSelf ? 4 /* SkipSelf */ : 0) | (dep.host ? 1 /* Host */ : 0) |\n (dep.optional ? 8 /* Optional */ : 0);\n // Determine the token used for injection. In almost all cases this is the given token, but\n // if the dependency is resolved to the `Injector` then the special `INJECTOR` token is used\n // instead.\n var token = dep.token;\n if (dep.resolved === R3ResolvedDependencyType.Injector) {\n token = importExpr(Identifiers.INJECTOR);\n }\n // Build up the arguments to the injectFn call.\n var injectArgs = [token];\n // If this dependency is optional or otherwise has non-default flags, then additional\n // parameters describing how to inject the dependency must be passed to the inject function\n // that's being used.\n if (flags !== 0 /* Default */ || dep.optional) {\n injectArgs.push(literal(flags));\n }\n return importExpr(injectFn).callFn(injectArgs);\n }\n case R3ResolvedDependencyType.Attribute:\n // In the case of attributes, the attribute name in question is given as the token.\n return importExpr(Identifiers$1.injectAttribute).callFn([dep.token]);\n case R3ResolvedDependencyType.ElementRef:\n return importExpr(Identifiers$1.injectElementRef).callFn([]);\n case R3ResolvedDependencyType.TemplateRef:\n return importExpr(Identifiers$1.injectTemplateRef).callFn([]);\n case R3ResolvedDependencyType.ViewContainerRef:\n return importExpr(Identifiers$1.injectViewContainerRef).callFn([]);\n case R3ResolvedDependencyType.ChangeDetectorRef:\n return importExpr(Identifiers$1.injectChangeDetectorRef).callFn([]);\n default:\n return unsupported(\"Unknown R3ResolvedDependencyType: \" + R3ResolvedDependencyType[dep.resolved]);\n }\n}\n/**\n * A helper function useful for extracting `R3DependencyMetadata` from a Render2\n * `CompileTypeMetadata` instance.\n */\nfunction dependenciesFromGlobalMetadata(type, outputCtx, reflector) {\n var e_1, _a;\n // Use the `CompileReflector` to look up references to some well-known Angular types. These will\n // be compared with the token to statically determine whether the token has significance to\n // Angular, and set the correct `R3ResolvedDependencyType` as a result.\n var elementRef = reflector.resolveExternalReference(Identifiers.ElementRef);\n var templateRef = reflector.resolveExternalReference(Identifiers.TemplateRef);\n var viewContainerRef = reflector.resolveExternalReference(Identifiers.ViewContainerRef);\n var injectorRef = reflector.resolveExternalReference(Identifiers.Injector);\n // Iterate through the type's DI dependencies and produce `R3DependencyMetadata` for each of them.\n var deps = [];\n try {\n for (var _b = __values(type.diDeps), _c = _b.next(); !_c.done; _c = _b.next()) {\n var dependency = _c.value;\n if (dependency.token) {\n var tokenRef = tokenReference(dependency.token);\n var resolved = R3ResolvedDependencyType.Token;\n if (tokenRef === elementRef) {\n resolved = R3ResolvedDependencyType.ElementRef;\n }\n else if (tokenRef === templateRef) {\n resolved = R3ResolvedDependencyType.TemplateRef;\n }\n else if (tokenRef === viewContainerRef) {\n resolved = R3ResolvedDependencyType.ViewContainerRef;\n }\n else if (tokenRef === injectorRef) {\n resolved = R3ResolvedDependencyType.Injector;\n }\n else if (dependency.isAttribute) {\n resolved = R3ResolvedDependencyType.Attribute;\n }\n // In the case of most dependencies, the token will be a reference to a type. Sometimes,\n // however, it can be a string, in the case of older Angular code or @Attribute injection.\n var token = tokenRef instanceof StaticSymbol ? outputCtx.importExpr(tokenRef) : literal(tokenRef);\n // Construct the dependency.\n deps.push({\n token: token,\n resolved: resolved,\n host: !!dependency.isHost,\n optional: !!dependency.isOptional,\n self: !!dependency.isSelf,\n skipSelf: !!dependency.isSkipSelf,\n });\n }\n else {\n unsupported('dependency without a token');\n }\n }\n }\n catch (e_1_1) { e_1 = { error: e_1_1 }; }\n finally {\n try {\n if (_c && !_c.done && (_a = _b.return)) _a.call(_b);\n }\n finally { if (e_1) throw e_1.error; }\n }\n return deps;\n}\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * Convert an object map with `Expression` values into a `LiteralMapExpr`.\n */\nfunction mapToMapExpression(map) {\n var result = Object.keys(map).map(function (key) { return ({ key: key, value: map[key], quoted: false }); });\n return literalMap(result);\n}\n/**\n * Convert metadata into an `Expression` in the given `OutputContext`.\n *\n * This operation will handle arrays, references to symbols, or literal `null` or `undefined`.\n */\nfunction convertMetaToOutput(meta, ctx) {\n if (Array.isArray(meta)) {\n return literalArr(meta.map(function (entry) { return convertMetaToOutput(entry, ctx); }));\n }\n if (meta instanceof StaticSymbol) {\n return ctx.importExpr(meta);\n }\n if (meta == null) {\n return literal(meta);\n }\n throw new Error(\"Internal error: Unsupported or unknown metadata: \" + meta);\n}\nfunction typeWithParameters(type, numParams) {\n var params = null;\n if (numParams > 0) {\n params = [];\n for (var i = 0; i < numParams; i++) {\n params.push(DYNAMIC_TYPE);\n }\n }\n return expressionType(type, null, params);\n}\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code 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 `R3NgModuleDef` for the given `R3NgModuleMetadata`.\n */\nfunction compileNgModule(meta) {\n var moduleType = meta.type, bootstrap = meta.bootstrap, declarations = meta.declarations, imports = meta.imports, exports = meta.exports;\n var expression = importExpr(Identifiers$1.defineNgModule).callFn([mapToMapExpression({\n type: moduleType,\n bootstrap: literalArr(bootstrap),\n declarations: literalArr(declarations),\n imports: literalArr(imports),\n exports: literalArr(exports),\n })]);\n var type = new ExpressionType(importExpr(Identifiers$1.NgModuleDef, [\n new ExpressionType(moduleType), tupleTypeOf(declarations), tupleTypeOf(imports),\n tupleTypeOf(exports)\n ]));\n var additionalStatements = [];\n return { expression: expression, type: type, additionalStatements: additionalStatements };\n}\nfunction compileInjector(meta) {\n var expression = importExpr(Identifiers$1.defineInjector).callFn([mapToMapExpression({\n factory: compileFactoryFunction({\n name: meta.name,\n fnOrClass: meta.type,\n deps: meta.deps,\n useNew: true,\n injectFn: Identifiers$1.inject,\n }),\n providers: meta.providers,\n imports: meta.imports,\n })]);\n var type = new ExpressionType(importExpr(Identifiers$1.InjectorDef, [new ExpressionType(meta.type)]));\n return { expression: expression, type: type };\n}\n// TODO(alxhub): integrate this with `compileNgModule`. Currently the two are separate operations.\nfunction compileNgModuleFromRender2(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}\nfunction tupleTypeOf(exp) {\n var types = exp.map(function (type) { return typeofExpr(type); });\n return exp.length > 0 ? expressionType(literalArr(types)) : NONE_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 */\nfunction compilePipeFromMetadata(metadata) {\n var definitionMapValues = [];\n // e.g. `name: 'myPipe'`\n definitionMapValues.push({ key: 'name', value: literal(metadata.pipeName), quoted: false });\n // e.g. `type: MyPipe`\n definitionMapValues.push({ key: 'type', value: metadata.type, quoted: false });\n var templateFactory = compileFactoryFunction({\n name: metadata.name,\n fnOrClass: metadata.type,\n deps: metadata.deps,\n useNew: true,\n injectFn: Identifiers$1.directiveInject,\n });\n definitionMapValues.push({ key: 'factory', value: templateFactory, quoted: false });\n // e.g. `pure: true`\n definitionMapValues.push({ key: 'pure', value: literal(metadata.pure), quoted: false });\n var expression = importExpr(Identifiers$1.definePipe).callFn([literalMap(definitionMapValues)]);\n var type = new ExpressionType(importExpr(Identifiers$1.PipeDef, [\n new ExpressionType(metadata.type),\n new ExpressionType(new LiteralExpr(metadata.pipeName)),\n ]));\n return { expression: expression, type: type };\n}\n/**\n * Write a pipe definition to the output context.\n */\nfunction compilePipeFromRender2(outputCtx, pipe, reflector) {\n var name = identifierName(pipe.type);\n if (!name) {\n return error(\"Cannot resolve the name of \" + pipe.type);\n }\n var metadata = {\n name: name,\n pipeName: pipe.name,\n type: outputCtx.importExpr(pipe.type.reference),\n deps: dependenciesFromGlobalMetadata(pipe.type, outputCtx, reflector),\n pure: pipe.pure,\n };\n var res = compilePipeFromMetadata(metadata);\n var definitionField = outputCtx.constantPool.propertyNameOf(3 /* Pipe */);\n outputCtx.statements.push(new ClassStmt(\n /* name */ name, \n /* parent */ null, \n /* fields */ [new ClassField(\n /* name */ definitionField, \n /* type */ INFERRED_TYPE, \n /* modifiers */ [StmtModifier.Static], \n /* initializer */ res.expression)], \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 */\nvar Text$3 = /** @class */ (function () {\n function Text(value, sourceSpan) {\n this.value = value;\n this.sourceSpan = sourceSpan;\n }\n Text.prototype.visit = function (visitor) { return visitor.visitText(this); };\n return Text;\n}());\nvar BoundText = /** @class */ (function () {\n function BoundText(value, sourceSpan) {\n this.value = value;\n this.sourceSpan = sourceSpan;\n }\n BoundText.prototype.visit = function (visitor) { return visitor.visitBoundText(this); };\n return BoundText;\n}());\nvar TextAttribute = /** @class */ (function () {\n function TextAttribute(name, value, sourceSpan, valueSpan) {\n this.name = name;\n this.value = value;\n this.sourceSpan = sourceSpan;\n this.valueSpan = valueSpan;\n }\n TextAttribute.prototype.visit = function (visitor) { return visitor.visitTextAttribute(this); };\n return TextAttribute;\n}());\nvar BoundAttribute = /** @class */ (function () {\n function BoundAttribute(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 }\n BoundAttribute.fromBoundElementProperty = function (prop) {\n return new BoundAttribute(prop.name, prop.type, prop.securityContext, prop.value, prop.unit, prop.sourceSpan);\n };\n BoundAttribute.prototype.visit = function (visitor) { return visitor.visitBoundAttribute(this); };\n return BoundAttribute;\n}());\nvar BoundEvent = /** @class */ (function () {\n function BoundEvent(name, handler, target, phase, sourceSpan) {\n this.name = name;\n this.handler = handler;\n this.target = target;\n this.phase = phase;\n this.sourceSpan = sourceSpan;\n }\n BoundEvent.fromParsedEvent = function (event) {\n var target = event.type === 0 /* Regular */ ? event.targetOrPhase : null;\n var phase = event.type === 1 /* Animation */ ? event.targetOrPhase : null;\n return new BoundEvent(event.name, event.handler, target, phase, event.sourceSpan);\n };\n BoundEvent.prototype.visit = function (visitor) { return visitor.visitBoundEvent(this); };\n return BoundEvent;\n}());\nvar Element$1 = /** @class */ (function () {\n function Element(name, attributes, inputs, outputs, children, references, sourceSpan, startSourceSpan, endSourceSpan) {\n this.name = name;\n this.attributes = attributes;\n this.inputs = inputs;\n this.outputs = outputs;\n this.children = children;\n this.references = references;\n this.sourceSpan = sourceSpan;\n this.startSourceSpan = startSourceSpan;\n this.endSourceSpan = endSourceSpan;\n }\n Element.prototype.visit = function (visitor) { return visitor.visitElement(this); };\n return Element;\n}());\nvar Template = /** @class */ (function () {\n function Template(attributes, inputs, children, references, variables, sourceSpan, startSourceSpan, endSourceSpan) {\n this.attributes = attributes;\n this.inputs = inputs;\n this.children = children;\n this.references = references;\n this.variables = variables;\n this.sourceSpan = sourceSpan;\n this.startSourceSpan = startSourceSpan;\n this.endSourceSpan = endSourceSpan;\n }\n Template.prototype.visit = function (visitor) { return visitor.visitTemplate(this); };\n return Template;\n}());\nvar Content = /** @class */ (function () {\n function Content(selectorIndex, attributes, sourceSpan) {\n this.selectorIndex = selectorIndex;\n this.attributes = attributes;\n this.sourceSpan = sourceSpan;\n }\n Content.prototype.visit = function (visitor) { return visitor.visitContent(this); };\n return Content;\n}());\nvar Variable = /** @class */ (function () {\n function Variable(name, value, sourceSpan) {\n this.name = name;\n this.value = value;\n this.sourceSpan = sourceSpan;\n }\n Variable.prototype.visit = function (visitor) { return visitor.visitVariable(this); };\n return Variable;\n}());\nvar Reference = /** @class */ (function () {\n function Reference(name, value, sourceSpan) {\n this.name = name;\n this.value = value;\n this.sourceSpan = sourceSpan;\n }\n Reference.prototype.visit = function (visitor) { return visitor.visitReference(this); };\n return Reference;\n}());\nfunction visitAll$1(visitor, nodes) {\n var e_1, _a, e_2, _b;\n var result = [];\n if (visitor.visit) {\n try {\n for (var nodes_1 = __values(nodes), nodes_1_1 = nodes_1.next(); !nodes_1_1.done; nodes_1_1 = nodes_1.next()) {\n var node = nodes_1_1.value;\n var newNode = visitor.visit(node) || node.visit(visitor);\n }\n }\n catch (e_1_1) { e_1 = { error: e_1_1 }; }\n finally {\n try {\n if (nodes_1_1 && !nodes_1_1.done && (_a = nodes_1.return)) _a.call(nodes_1);\n }\n finally { if (e_1) throw e_1.error; }\n }\n }\n else {\n try {\n for (var nodes_2 = __values(nodes), nodes_2_1 = nodes_2.next(); !nodes_2_1.done; nodes_2_1 = nodes_2.next()) {\n var node = nodes_2_1.value;\n var newNode = node.visit(visitor);\n if (newNode) {\n result.push(newNode);\n }\n }\n }\n catch (e_2_1) { e_2 = { error: e_2_1 }; }\n finally {\n try {\n if (nodes_2_1 && !nodes_2_1.done && (_b = nodes_2.return)) _b.call(nodes_2);\n }\n finally { if (e_2) throw e_2.error; }\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 BIND_NAME_REGEXP$1 = /^(?:(?:(?:(bind-)|(let-)|(ref-|#)|(on-)|(bindon-)|(@))(.+))|\\[\\(([^\\)]+)\\)\\]|\\[([^\\]]+)\\]|\\(([^\\)]+)\\))$/;\n// Group 1 = \"bind-\"\nvar KW_BIND_IDX$1 = 1;\n// Group 2 = \"let-\"\nvar KW_LET_IDX$1 = 2;\n// Group 3 = \"ref-/#\"\nvar KW_REF_IDX$1 = 3;\n// Group 4 = \"on-\"\nvar KW_ON_IDX$1 = 4;\n// Group 5 = \"bindon-\"\nvar KW_BINDON_IDX$1 = 5;\n// Group 6 = \"@\"\nvar KW_AT_IDX$1 = 6;\n// Group 7 = the identifier after \"bind-\", \"let-\", \"ref-/#\", \"on-\", \"bindon-\" or \"@\"\nvar IDENT_KW_IDX$1 = 7;\n// Group 8 = identifier inside [()]\nvar IDENT_BANANA_BOX_IDX$1 = 8;\n// Group 9 = identifier inside []\nvar IDENT_PROPERTY_IDX$1 = 9;\n// Group 10 = identifier inside ()\nvar IDENT_EVENT_IDX$1 = 10;\nvar TEMPLATE_ATTR_PREFIX$1 = '*';\n// Default selector used by `<ng-content>` if none specified\nvar DEFAULT_CONTENT_SELECTOR = '*';\nfunction htmlAstToRender3Ast(htmlNodes, bindingParser) {\n var transformer = new HtmlAstToIvyAst(bindingParser);\n var ivyNodes = visitAll(transformer, htmlNodes);\n // Errors might originate in either the binding parser or the html to ivy transformer\n var allErrors = bindingParser.errors.concat(transformer.errors);\n var errors = allErrors.filter(function (e) { return e.level === ParseErrorLevel.ERROR; });\n if (errors.length > 0) {\n var errorString = errors.join('\\n');\n throw syntaxError(\"Template parse errors:\\n\" + errorString, errors);\n }\n return {\n nodes: ivyNodes,\n errors: allErrors,\n ngContentSelectors: transformer.ngContentSelectors,\n hasNgContent: transformer.hasNgContent,\n };\n}\nvar HtmlAstToIvyAst = /** @class */ (function () {\n function HtmlAstToIvyAst(bindingParser) {\n this.bindingParser = bindingParser;\n this.errors = [];\n // Selectors for the `ng-content` tags. Only non `*` selectors are recorded here\n this.ngContentSelectors = [];\n // Any `<ng-content>` in the template ?\n this.hasNgContent = false;\n }\n // HTML visitor\n HtmlAstToIvyAst.prototype.visitElement = function (element) {\n var e_1, _a;\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 // Whether the element is a `<ng-template>`\n var isTemplateElement = isNgTemplate(element.name);\n var matchableAttributes = [];\n var parsedProperties = [];\n var boundEvents = [];\n var variables = [];\n var references = [];\n var attributes = [];\n var templateMatchableAttributes = [];\n var inlineTemplateSourceSpan;\n var templateParsedProperties = [];\n var templateVariables = [];\n // Whether the element has any *-attribute\n var elementHasInlineTemplate = false;\n try {\n for (var _b = __values(element.attrs), _c = _b.next(); !_c.done; _c = _b.next()) {\n var attribute = _c.value;\n var hasBinding = false;\n var normalizedName = normalizeAttributeName(attribute.name);\n // `*attr` defines template bindings\n var isTemplateBinding = false;\n if (normalizedName.startsWith(TEMPLATE_ATTR_PREFIX$1)) {\n if (elementHasInlineTemplate) {\n this.reportError(\"Can't have multiple template bindings on one element. Use only one attribute prefixed with *\", attribute.sourceSpan);\n }\n isTemplateBinding = true;\n elementHasInlineTemplate = true;\n var templateValue = attribute.value;\n var templateKey = normalizedName.substring(TEMPLATE_ATTR_PREFIX$1.length);\n inlineTemplateSourceSpan = attribute.valueSpan || attribute.sourceSpan;\n var parsedVariables = [];\n this.bindingParser.parseInlineTemplateBinding(templateKey, templateValue, attribute.sourceSpan, templateMatchableAttributes, templateParsedProperties, parsedVariables);\n templateVariables.push.apply(templateVariables, __spread(parsedVariables.map(function (v) { return new Variable(v.name, v.value, v.sourceSpan); })));\n }\n else {\n // Check for variables, events, property bindings, interpolation\n hasBinding = this.parseAttribute(isTemplateElement, attribute, matchableAttributes, parsedProperties, boundEvents, variables, references);\n }\n if (!hasBinding && !isTemplateBinding) {\n // don't include the bindings as attributes as well in the AST\n attributes.push(this.visitAttribute(attribute));\n matchableAttributes.push([attribute.name, attribute.value]);\n }\n }\n }\n catch (e_1_1) { e_1 = { error: e_1_1 }; }\n finally {\n try {\n if (_c && !_c.done && (_a = _b.return)) _a.call(_b);\n }\n finally { if (e_1) throw e_1.error; }\n }\n var children = visitAll(preparsedElement.nonBindable ? NON_BINDABLE_VISITOR$1 : this, element.children);\n var parsedElement;\n if (preparsedElement.type === PreparsedElementType.NG_CONTENT) {\n // `<ng-content>`\n this.hasNgContent = true;\n if (element.children && !element.children.every(isEmptyTextNode)) {\n this.reportError(\"<ng-content> element cannot have content.\", element.sourceSpan);\n }\n var selector = preparsedElement.selectAttr;\n var attributes_1 = element.attrs.map(function (attribute) {\n return new TextAttribute(attribute.name, attribute.value, attribute.sourceSpan, attribute.valueSpan);\n });\n var selectorIndex = selector === DEFAULT_CONTENT_SELECTOR ? 0 : this.ngContentSelectors.push(selector);\n parsedElement = new Content(selectorIndex, attributes_1, element.sourceSpan);\n }\n else if (isTemplateElement) {\n // `<ng-template>`\n var boundAttributes = this.createBoundAttributes(element.name, parsedProperties);\n parsedElement = new Template(attributes, boundAttributes, children, references, variables, element.sourceSpan, element.startSourceSpan, element.endSourceSpan);\n }\n else {\n var boundAttributes = this.createBoundAttributes(element.name, parsedProperties);\n parsedElement = new Element$1(element.name, attributes, boundAttributes, boundEvents, children, references, element.sourceSpan, element.startSourceSpan, element.endSourceSpan);\n }\n if (elementHasInlineTemplate) {\n var attributes_2 = [];\n templateMatchableAttributes.forEach(function (_a) {\n var _b = __read(_a, 2), name = _b[0], value = _b[1];\n return attributes_2.push(new TextAttribute(name, value, inlineTemplateSourceSpan));\n });\n var boundAttributes = this.createBoundAttributes('ng-template', templateParsedProperties);\n parsedElement = new Template(attributes_2, boundAttributes, [parsedElement], [], templateVariables, element.sourceSpan, element.startSourceSpan, element.endSourceSpan);\n }\n return parsedElement;\n };\n HtmlAstToIvyAst.prototype.visitAttribute = function (attribute) {\n return new TextAttribute(attribute.name, attribute.value, attribute.sourceSpan, attribute.valueSpan);\n };\n HtmlAstToIvyAst.prototype.visitText = function (text) {\n var valueNoNgsp = replaceNgsp(text.value);\n var expr = this.bindingParser.parseInterpolation(valueNoNgsp, text.sourceSpan);\n return expr ? new BoundText(expr, text.sourceSpan) : new Text$3(valueNoNgsp, text.sourceSpan);\n };\n HtmlAstToIvyAst.prototype.visitComment = function (comment) { return null; };\n HtmlAstToIvyAst.prototype.visitExpansion = function (expansion) { return null; };\n HtmlAstToIvyAst.prototype.visitExpansionCase = function (expansionCase) { return null; };\n HtmlAstToIvyAst.prototype.createBoundAttributes = function (elementName, properties) {\n var _this = this;\n return properties.filter(function (prop) { return !prop.isLiteral; })\n .map(function (prop) { return _this.bindingParser.createBoundElementProperty(elementName, prop); })\n .map(function (prop) { return BoundAttribute.fromBoundElementProperty(prop); });\n };\n HtmlAstToIvyAst.prototype.parseAttribute = function (isTemplateElement, attribute, matchableAttributes, parsedProperties, boundEvents, variables, references) {\n var name = normalizeAttributeName(attribute.name);\n var value = attribute.value;\n var srcSpan = attribute.sourceSpan;\n var bindParts = name.match(BIND_NAME_REGEXP$1);\n var hasBinding = false;\n if (bindParts) {\n hasBinding = true;\n if (bindParts[KW_BIND_IDX$1] != null) {\n this.bindingParser.parsePropertyBinding(bindParts[IDENT_KW_IDX$1], value, false, srcSpan, matchableAttributes, parsedProperties);\n }\n else if (bindParts[KW_LET_IDX$1]) {\n if (isTemplateElement) {\n var identifier = bindParts[IDENT_KW_IDX$1];\n this.parseVariable(identifier, value, srcSpan, variables);\n }\n else {\n this.reportError(\"\\\"let-\\\" is only supported on ng-template elements.\", srcSpan);\n }\n }\n else if (bindParts[KW_REF_IDX$1]) {\n var identifier = bindParts[IDENT_KW_IDX$1];\n this.parseReference(identifier, value, srcSpan, references);\n }\n else if (bindParts[KW_ON_IDX$1]) {\n var events = [];\n this.bindingParser.parseEvent(bindParts[IDENT_KW_IDX$1], value, srcSpan, matchableAttributes, events);\n addEvents(events, boundEvents);\n }\n else if (bindParts[KW_BINDON_IDX$1]) {\n this.bindingParser.parsePropertyBinding(bindParts[IDENT_KW_IDX$1], value, false, srcSpan, matchableAttributes, parsedProperties);\n this.parseAssignmentEvent(bindParts[IDENT_KW_IDX$1], value, srcSpan, matchableAttributes, boundEvents);\n }\n else if (bindParts[KW_AT_IDX$1]) {\n this.bindingParser.parseLiteralAttr(name, value, srcSpan, matchableAttributes, parsedProperties);\n }\n else if (bindParts[IDENT_BANANA_BOX_IDX$1]) {\n this.bindingParser.parsePropertyBinding(bindParts[IDENT_BANANA_BOX_IDX$1], value, false, srcSpan, matchableAttributes, parsedProperties);\n this.parseAssignmentEvent(bindParts[IDENT_BANANA_BOX_IDX$1], value, srcSpan, matchableAttributes, boundEvents);\n }\n else if (bindParts[IDENT_PROPERTY_IDX$1]) {\n this.bindingParser.parsePropertyBinding(bindParts[IDENT_PROPERTY_IDX$1], value, false, srcSpan, matchableAttributes, parsedProperties);\n }\n else if (bindParts[IDENT_EVENT_IDX$1]) {\n var events = [];\n this.bindingParser.parseEvent(bindParts[IDENT_EVENT_IDX$1], value, srcSpan, matchableAttributes, events);\n addEvents(events, boundEvents);\n }\n }\n else {\n hasBinding = this.bindingParser.parsePropertyInterpolation(name, value, srcSpan, matchableAttributes, parsedProperties);\n }\n return hasBinding;\n };\n HtmlAstToIvyAst.prototype.parseVariable = function (identifier, value, sourceSpan, variables) {\n if (identifier.indexOf('-') > -1) {\n this.reportError(\"\\\"-\\\" is not allowed in variable names\", sourceSpan);\n }\n variables.push(new Variable(identifier, value, sourceSpan));\n };\n HtmlAstToIvyAst.prototype.parseReference = function (identifier, value, sourceSpan, references) {\n if (identifier.indexOf('-') > -1) {\n this.reportError(\"\\\"-\\\" is not allowed in reference names\", sourceSpan);\n }\n references.push(new Reference(identifier, value, sourceSpan));\n };\n HtmlAstToIvyAst.prototype.parseAssignmentEvent = function (name, expression, sourceSpan, targetMatchableAttrs, boundEvents) {\n var events = [];\n this.bindingParser.parseEvent(name + \"Change\", expression + \"=$event\", sourceSpan, targetMatchableAttrs, events);\n addEvents(events, boundEvents);\n };\n HtmlAstToIvyAst.prototype.reportError = function (message, sourceSpan, level) {\n if (level === void 0) { level = ParseErrorLevel.ERROR; }\n this.errors.push(new ParseError(sourceSpan, message, level));\n };\n return HtmlAstToIvyAst;\n}());\nvar NonBindableVisitor$1 = /** @class */ (function () {\n function NonBindableVisitor() {\n }\n NonBindableVisitor.prototype.visitElement = function (ast) {\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 children = visitAll(this, ast.children, null);\n return new Element$1(ast.name, visitAll(this, ast.attrs), \n /* inputs */ [], /* outputs */ [], children, /* references */ [], ast.sourceSpan, ast.startSourceSpan, ast.endSourceSpan);\n };\n NonBindableVisitor.prototype.visitComment = function (comment) { return null; };\n NonBindableVisitor.prototype.visitAttribute = function (attribute) {\n return new TextAttribute(attribute.name, attribute.value, attribute.sourceSpan);\n };\n NonBindableVisitor.prototype.visitText = function (text) { return new Text$3(text.value, text.sourceSpan); };\n NonBindableVisitor.prototype.visitExpansion = function (expansion) { return null; };\n NonBindableVisitor.prototype.visitExpansionCase = function (expansionCase) { return null; };\n return NonBindableVisitor;\n}());\nvar NON_BINDABLE_VISITOR$1 = new NonBindableVisitor$1();\nfunction normalizeAttributeName(attrName) {\n return /^data-/i.test(attrName) ? attrName.substring(5) : attrName;\n}\nfunction addEvents(events, boundEvents) {\n boundEvents.push.apply(boundEvents, __spread(events.map(function (e) { return BoundEvent.fromParsedEvent(e); })));\n}\nfunction isEmptyTextNode(node) {\n return node instanceof Text && node.value.trim().length == 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 * Parses string representation of a style and converts it into object literal.\n *\n * @param value string representation of style as used in the `style` attribute in HTML.\n * Example: `color: red; height: auto`.\n * @returns an object literal. `{ color: 'red', height: 'auto'}`.\n */\nfunction parseStyle(value) {\n var styles = {};\n var i = 0;\n var parenDepth = 0;\n var quote = 0 /* QuoteNone */;\n var valueStart = 0;\n var propStart = 0;\n var currentProp = null;\n var valueHasQuotes = false;\n while (i < value.length) {\n var token = value.charCodeAt(i++);\n switch (token) {\n case 40 /* OpenParen */:\n parenDepth++;\n break;\n case 41 /* CloseParen */:\n parenDepth--;\n break;\n case 39 /* QuoteSingle */:\n // valueStart needs to be there since prop values don't\n // have quotes in CSS\n valueHasQuotes = valueHasQuotes || valueStart > 0;\n if (quote === 0 /* QuoteNone */) {\n quote = 39 /* QuoteSingle */;\n }\n else if (quote === 39 /* QuoteSingle */ && value.charCodeAt(i - 1) !== 92 /* BackSlash */) {\n quote = 0 /* QuoteNone */;\n }\n break;\n case 34 /* QuoteDouble */:\n // same logic as above\n valueHasQuotes = valueHasQuotes || valueStart > 0;\n if (quote === 0 /* QuoteNone */) {\n quote = 34 /* QuoteDouble */;\n }\n else if (quote === 34 /* QuoteDouble */ && value.charCodeAt(i - 1) !== 92 /* BackSlash */) {\n quote = 0 /* QuoteNone */;\n }\n break;\n case 58 /* Colon */:\n if (!currentProp && parenDepth === 0 && quote === 0 /* QuoteNone */) {\n currentProp = hyphenate(value.substring(propStart, i - 1).trim());\n valueStart = i;\n }\n break;\n case 59 /* Semicolon */:\n if (currentProp && valueStart > 0 && parenDepth === 0 && quote === 0 /* QuoteNone */) {\n var styleVal = value.substring(valueStart, i - 1).trim();\n styles[currentProp] = valueHasQuotes ? stripUnnecessaryQuotes(styleVal) : styleVal;\n propStart = i;\n valueStart = 0;\n currentProp = null;\n valueHasQuotes = false;\n }\n break;\n }\n }\n if (currentProp && valueStart) {\n var styleVal = value.substr(valueStart).trim();\n styles[currentProp] = valueHasQuotes ? stripUnnecessaryQuotes(styleVal) : styleVal;\n }\n return styles;\n}\nfunction stripUnnecessaryQuotes(value) {\n var qS = value.charCodeAt(0);\n var qE = value.charCodeAt(value.length - 1);\n if (qS == qE && (qS == 39 /* QuoteSingle */ || qS == 34 /* QuoteDouble */)) {\n var tempValue = value.substring(1, value.length - 1);\n // special case to avoid using a multi-quoted string that was just chomped\n // (e.g. `font-family: \"Verdana\", \"sans-serif\"`)\n if (tempValue.indexOf('\\'') == -1 && tempValue.indexOf('\"') == -1) {\n value = tempValue;\n }\n }\n return value;\n}\nfunction hyphenate(value) {\n return value.replace(/[a-z][A-Z]/g, function (v) {\n return v.charAt(0) + '-' + v.charAt(1);\n }).toLowerCase();\n}\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this 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 mapBindingToInstruction(type) {\n switch (type) {\n case 0 /* Property */:\n return Identifiers$1.elementProperty;\n case 1 /* Attribute */:\n return Identifiers$1.elementAttribute;\n case 2 /* Class */:\n return Identifiers$1.elementClassProp;\n default:\n return undefined;\n }\n}\n// if (rf & flags) { .. }\nfunction renderFlagCheckIfStmt(flags, statements) {\n return ifStmt(variable(RENDER_FLAGS).bitwiseAnd(literal(flags), null, false), statements);\n}\nvar TemplateDefinitionBuilder = /** @class */ (function () {\n function TemplateDefinitionBuilder(constantPool, contextParameter, parentBindingScope, level, contextName, templateName, viewQueries, directiveMatcher, directives, pipeTypeByName, pipes, _namespace) {\n if (level === void 0) { level = 0; }\n var _this = this;\n this.constantPool = constantPool;\n this.contextParameter = contextParameter;\n this.level = level;\n this.contextName = contextName;\n this.templateName = templateName;\n this.viewQueries = viewQueries;\n this.directiveMatcher = directiveMatcher;\n this.directives = directives;\n this.pipeTypeByName = pipeTypeByName;\n this.pipes = pipes;\n this._namespace = _namespace;\n this._dataIndex = 0;\n this._bindingContext = 0;\n this._prefixCode = [];\n this._creationCode = [];\n this._variableCode = [];\n this._bindingCode = [];\n this._postfixCode = [];\n this._unsupported = unsupported;\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 // Number of slots to reserve for pureFunctions\n this._pureFunctionSlots = 0;\n // These should be handled in the template or element directly.\n this.visitReference = invalid$1;\n this.visitVariable = invalid$1;\n this.visitTextAttribute = invalid$1;\n this.visitBoundAttribute = invalid$1;\n this.visitBoundEvent = invalid$1;\n // view queries can take up space in data and allocation happens earlier (in the \"viewQuery\"\n // function)\n this._dataIndex = viewQueries.length;\n this._bindingScope =\n parentBindingScope.nestedScope(function (lhsVar, expression) {\n _this._bindingCode.push(lhsVar.set(expression).toDeclStmt(INFERRED_TYPE, [StmtModifier.Final]));\n });\n this._valueConverter = new ValueConverter(constantPool, function () { return _this.allocateDataSlot(); }, function (numSlots) { return _this._pureFunctionSlots += numSlots; }, function (name, localName, slot, value) {\n var pipeType = pipeTypeByName.get(name);\n if (pipeType) {\n _this.pipes.add(pipeType);\n }\n _this._bindingScope.set(localName, value);\n _this._creationCode.push(importExpr(Identifiers$1.pipe).callFn([literal(slot), literal(name)]).toStmt());\n });\n }\n TemplateDefinitionBuilder.prototype.buildTemplateFunction = function (nodes, variables, hasNgContent, ngContentSelectors) {\n if (hasNgContent === void 0) { hasNgContent = false; }\n if (ngContentSelectors === void 0) { ngContentSelectors = []; }\n var e_1, _a, e_2, _b;\n if (this._namespace !== Identifiers$1.namespaceHTML) {\n this.instruction(this._creationCode, null, this._namespace);\n }\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 // Output a `ProjectionDef` instruction when some `<ng-content>` are present\n if (hasNgContent) {\n var parameters = [];\n // Only selectors with a non-default value are generated\n if (ngContentSelectors.length > 1) {\n var r3Selectors = ngContentSelectors.map(function (s) { return parseSelectorToR3Selector(s); });\n // `projectionDef` needs both the parsed and raw value of the selectors\n var parsed = this.constantPool.getConstLiteral(asLiteral(r3Selectors), true);\n var unParsed = this.constantPool.getConstLiteral(asLiteral(ngContentSelectors), true);\n parameters.push(parsed, unParsed);\n }\n this.instruction.apply(this, __spread([this._creationCode, null, Identifiers$1.projectionDef], parameters));\n }\n visitAll$1(this, nodes);\n if (this._pureFunctionSlots > 0) {\n this.instruction(this._creationCode, null, Identifiers$1.reserveSlots, literal(this._pureFunctionSlots));\n }\n var creationCode = this._creationCode.length > 0 ?\n [renderFlagCheckIfStmt(1 /* Create */, this._creationCode)] :\n [];\n var updateCode = this._bindingCode.length > 0 ?\n [renderFlagCheckIfStmt(2 /* Update */, this._bindingCode)] :\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 _c = __values(this._phToNodeIdxes), _d = _c.next(); !_d.done; _d = _c.next()) {\n var phToNodeIdx = _d.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._prefixCode.push(phMap);\n }\n }\n }\n catch (e_2_1) { e_2 = { error: e_2_1 }; }\n finally {\n try {\n if (_d && !_d.done && (_b = _c.return)) _b.call(_c);\n }\n finally { if (e_2) throw e_2.error; }\n }\n return fn([new FnParam(RENDER_FLAGS, NUMBER_TYPE), new FnParam(this.contextParameter, null)], __spread(this._prefixCode, creationCode, this._variableCode, updateCode, this._postfixCode), INFERRED_TYPE, null, this.templateName);\n };\n // LocalResolver\n TemplateDefinitionBuilder.prototype.getLocal = function (name) { return this._bindingScope.get(name); };\n TemplateDefinitionBuilder.prototype.visitContent = function (ngContent) {\n var slot = this.allocateDataSlot();\n var selectorIndex = ngContent.selectorIndex;\n var parameters = [literal(slot)];\n var attributeAsList = [];\n ngContent.attributes.forEach(function (attribute) {\n var name = attribute.name;\n if (name !== 'select') {\n attributeAsList.push(name, attribute.value);\n }\n });\n if (attributeAsList.length > 0) {\n parameters.push(literal(selectorIndex), asLiteral(attributeAsList));\n }\n else if (selectorIndex !== 0) {\n parameters.push(literal(selectorIndex));\n }\n this.instruction.apply(this, __spread([this._creationCode, ngContent.sourceSpan, Identifiers$1.projection], parameters));\n };\n TemplateDefinitionBuilder.prototype.getNamespaceInstruction = function (namespaceKey) {\n switch (namespaceKey) {\n case 'math':\n return Identifiers$1.namespaceMathML;\n case 'svg':\n return Identifiers$1.namespaceSVG;\n default:\n return Identifiers$1.namespaceHTML;\n }\n };\n TemplateDefinitionBuilder.prototype.addNamespaceInstruction = function (nsInstruction, element) {\n this._namespace = nsInstruction;\n this.instruction(this._creationCode, element.sourceSpan, nsInstruction);\n };\n TemplateDefinitionBuilder.prototype.visitElement = function (element) {\n var _this = this;\n var e_3, _a, _b, _c;\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 var _d = __read(splitNsName(element.name), 2), namespaceKey = _d[0], elementName = _d[1];\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 _e = __values(element.attributes), _f = _e.next(); !_f.done; _f = _e.next()) {\n var attr = _f.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_3_1) { e_3 = { error: e_3_1 }; }\n finally {\n try {\n if (_f && !_f.done && (_a = _e.return)) _a.call(_e);\n }\n finally { if (e_3) throw e_3.error; }\n }\n // Match directives on non i18n attributes\n if (this.directiveMatcher) {\n var selector = createCssSelector(element.name, outputAttrs);\n this.directiveMatcher.match(selector, function (sel, staticType) { _this.directives.add(staticType); });\n }\n // Element creation mode\n var parameters = [\n literal(elementIndex),\n literal(elementName),\n ];\n // Add the attributes\n var i18nMessages = [];\n var attributes = [];\n var initialStyleDeclarations = [];\n var initialClassDeclarations = [];\n var styleInputs = [];\n var classInputs = [];\n var allOtherInputs = [];\n element.inputs.forEach(function (input) {\n switch (input.type) {\n // [attr.style] or [attr.class] should not be treated as styling-based\n // bindings since they are intended to be written directly to the attr\n // and therefore will skip all style/class resolution that is present\n // with style=\"\", [style]=\"\" and [style.prop]=\"\", class=\"\",\n // [class.prop]=\"\". [class]=\"\" assignments\n case 0 /* Property */:\n if (input.name == 'style') {\n // this should always go first in the compilation (for [style])\n styleInputs.splice(0, 0, input);\n }\n else if (isClassBinding(input)) {\n // this should always go first in the compilation (for [class])\n classInputs.splice(0, 0, input);\n }\n else {\n allOtherInputs.push(input);\n }\n break;\n case 3 /* Style */:\n styleInputs.push(input);\n break;\n case 2 /* Class */:\n classInputs.push(input);\n break;\n default:\n allOtherInputs.push(input);\n break;\n }\n });\n var currStyleIndex = 0;\n var currClassIndex = 0;\n var staticStylesMap = null;\n var staticClassesMap = null;\n var stylesIndexMap = {};\n var classesIndexMap = {};\n Object.getOwnPropertyNames(outputAttrs).forEach(function (name) {\n var value = outputAttrs[name];\n if (name == 'style') {\n staticStylesMap = parseStyle(value);\n Object.keys(staticStylesMap).forEach(function (prop) { stylesIndexMap[prop] = currStyleIndex++; });\n }\n else if (name == 'class') {\n staticClassesMap = {};\n value.split(/\\s+/g).forEach(function (className) {\n classesIndexMap[className] = currClassIndex++;\n staticClassesMap[className] = true;\n });\n }\n else {\n attributes.push(literal(name));\n if (attrI18nMetas.hasOwnProperty(name)) {\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 });\n var hasMapBasedStyling = false;\n for (var i = 0; i < styleInputs.length; i++) {\n var input = styleInputs[i];\n var isMapBasedStyleBinding = i === 0 && input.name === 'style';\n if (isMapBasedStyleBinding) {\n hasMapBasedStyling = true;\n }\n else if (!stylesIndexMap.hasOwnProperty(input.name)) {\n stylesIndexMap[input.name] = currStyleIndex++;\n }\n }\n for (var i = 0; i < classInputs.length; i++) {\n var input = classInputs[i];\n var isMapBasedClassBinding = i === 0 && isClassBinding(input);\n if (!isMapBasedClassBinding && !stylesIndexMap.hasOwnProperty(input.name)) {\n classesIndexMap[input.name] = currClassIndex++;\n }\n }\n // in the event that a [style] binding is used then sanitization will\n // always be imported because it is not possible to know ahead of time\n // whether style bindings will use or not use any sanitizable properties\n // that isStyleSanitizable() will detect\n var useDefaultStyleSanitizer = hasMapBasedStyling;\n // this will build the instructions so that they fall into the following syntax\n // => [prop1, prop2, prop3, 0, prop1, value1, prop2, value2]\n Object.keys(stylesIndexMap).forEach(function (prop) {\n useDefaultStyleSanitizer = useDefaultStyleSanitizer || isStyleSanitizable(prop);\n initialStyleDeclarations.push(literal(prop));\n });\n if (staticStylesMap) {\n initialStyleDeclarations.push(literal(1 /* VALUES_MODE */));\n Object.keys(staticStylesMap).forEach(function (prop) {\n initialStyleDeclarations.push(literal(prop));\n var value = staticStylesMap[prop];\n initialStyleDeclarations.push(literal(value));\n });\n }\n Object.keys(classesIndexMap).forEach(function (prop) {\n initialClassDeclarations.push(literal(prop));\n });\n if (staticClassesMap) {\n initialClassDeclarations.push(literal(1 /* VALUES_MODE */));\n Object.keys(staticClassesMap).forEach(function (className) {\n initialClassDeclarations.push(literal(className));\n initialClassDeclarations.push(literal(true));\n });\n }\n var hasStylingInstructions = initialStyleDeclarations.length || styleInputs.length ||\n initialClassDeclarations.length || classInputs.length;\n var attrArg = attributes.length > 0 ?\n this.constantPool.getConstLiteral(literalArr(attributes), true) :\n TYPED_NULL_EXPR;\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._variableCode.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.value];\n }));\n parameters.push(this.constantPool.getConstLiteral(asLiteral(references), true));\n }\n else {\n parameters.push(TYPED_NULL_EXPR);\n }\n // Generate the instruction create element instruction\n if (i18nMessages.length > 0) {\n (_b = this._creationCode).push.apply(_b, __spread(i18nMessages));\n }\n var wasInNamespace = this._namespace;\n var currentNamespace = this.getNamespaceInstruction(namespaceKey);\n // If the namespace is changing now, include an instruction to change it\n // during element creation.\n if (currentNamespace !== wasInNamespace) {\n this.addNamespaceInstruction(currentNamespace, element);\n }\n var implicit = variable(CONTEXT_NAME);\n var createSelfClosingInstruction = !hasStylingInstructions && element.children.length === 0 && element.outputs.length === 0;\n if (createSelfClosingInstruction) {\n this.instruction.apply(this, __spread([this._creationCode, element.sourceSpan, Identifiers$1.element], trimTrailingNulls(parameters)));\n }\n else {\n // Generate the instruction create element instruction\n if (i18nMessages.length > 0) {\n (_c = this._creationCode).push.apply(_c, __spread(i18nMessages));\n }\n this.instruction.apply(this, __spread([this._creationCode, element.sourceSpan, Identifiers$1.elementStart], trimTrailingNulls(parameters)));\n // initial styling for static style=\"...\" attributes\n if (hasStylingInstructions) {\n var paramsList = [];\n if (initialClassDeclarations.length) {\n // the template compiler handles initial class styling (e.g. class=\"foo\") values\n // in a special command called `elementClass` so that the initial class\n // can be processed during runtime. These initial class values are bound to\n // a constant because the inital class values do not change (since they're static).\n paramsList.push(this.constantPool.getConstLiteral(literalArr(initialClassDeclarations), true));\n }\n else if (initialStyleDeclarations.length || useDefaultStyleSanitizer) {\n // no point in having an extra `null` value unless there are follow-up params\n paramsList.push(NULL_EXPR);\n }\n if (initialStyleDeclarations.length) {\n // the template compiler handles initial style (e.g. style=\"foo\") values\n // in a special command called `elementStyle` so that the initial styles\n // can be processed during runtime. These initial styles values are bound to\n // a constant because the inital style values do not change (since they're static).\n paramsList.push(this.constantPool.getConstLiteral(literalArr(initialStyleDeclarations), true));\n }\n else if (useDefaultStyleSanitizer) {\n // no point in having an extra `null` value unless there are follow-up params\n paramsList.push(NULL_EXPR);\n }\n if (useDefaultStyleSanitizer) {\n paramsList.push(importExpr(Identifiers$1.defaultStyleSanitizer));\n }\n this._creationCode.push(importExpr(Identifiers$1.elementStyling).callFn(paramsList).toStmt());\n }\n // Generate Listeners (outputs)\n element.outputs.forEach(function (outputAst) {\n var elName = sanitizeIdentifier(element.name);\n var evName = sanitizeIdentifier(outputAst.name);\n var functionName = _this.templateName + \"_\" + elName + \"_\" + evName + \"_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, implicit, 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._creationCode, outputAst.sourceSpan, Identifiers$1.listener, literal(outputAst.name), handler);\n });\n }\n if ((styleInputs.length || classInputs.length) && hasStylingInstructions) {\n var indexLiteral = literal(elementIndex);\n var firstStyle = styleInputs[0];\n var mapBasedStyleInput = firstStyle && firstStyle.name == 'style' ? firstStyle : null;\n var firstClass = classInputs[0];\n var mapBasedClassInput = firstClass && isClassBinding(firstClass) ? firstClass : null;\n var stylingInput = mapBasedStyleInput || mapBasedClassInput;\n if (stylingInput) {\n var params = [];\n if (mapBasedClassInput) {\n params.push(this.convertPropertyBinding(implicit, mapBasedClassInput.value, true));\n }\n else if (mapBasedStyleInput) {\n params.push(NULL_EXPR);\n }\n if (mapBasedStyleInput) {\n params.push(this.convertPropertyBinding(implicit, mapBasedStyleInput.value, true));\n }\n this.instruction.apply(this, __spread([this._bindingCode, stylingInput.sourceSpan, Identifiers$1.elementStylingMap, indexLiteral], params));\n }\n var lastInputCommand = null;\n if (styleInputs.length) {\n var i = mapBasedStyleInput ? 1 : 0;\n for (i; i < styleInputs.length; i++) {\n var input = styleInputs[i];\n var convertedBinding = this.convertPropertyBinding(implicit, input.value, true);\n var params = [convertedBinding];\n var sanitizationRef = resolveSanitizationFn(input, input.securityContext);\n if (sanitizationRef) {\n params.push(sanitizationRef);\n }\n var key = input.name;\n var styleIndex = stylesIndexMap[key];\n this.instruction.apply(this, __spread([this._bindingCode, input.sourceSpan, Identifiers$1.elementStyleProp, indexLiteral,\n literal(styleIndex)], params));\n }\n lastInputCommand = styleInputs[styleInputs.length - 1];\n }\n if (classInputs.length) {\n var i = mapBasedClassInput ? 1 : 0;\n for (i; i < classInputs.length; i++) {\n var input = classInputs[i];\n var convertedBinding = this.convertPropertyBinding(implicit, input.value, true);\n var params = [convertedBinding];\n var sanitizationRef = resolveSanitizationFn(input, input.securityContext);\n if (sanitizationRef) {\n params.push(sanitizationRef);\n }\n var key = input.name;\n var classIndex = classesIndexMap[key];\n this.instruction.apply(this, __spread([this._bindingCode, input.sourceSpan, Identifiers$1.elementClassProp, indexLiteral,\n literal(classIndex)], params));\n }\n lastInputCommand = classInputs[classInputs.length - 1];\n }\n this.instruction(this._bindingCode, lastInputCommand.sourceSpan, Identifiers$1.elementStylingApply, indexLiteral);\n }\n // Generate element input bindings\n allOtherInputs.forEach(function (input) {\n if (input.type === 4 /* Animation */) {\n console.error('warning: animation bindings not yet supported');\n return;\n }\n var convertedBinding = _this.convertPropertyBinding(implicit, input.value);\n var instruction = mapBindingToInstruction(input.type);\n if (instruction) {\n var params = [convertedBinding];\n var sanitizationRef = resolveSanitizationFn(input, input.securityContext);\n if (sanitizationRef) {\n params.push(sanitizationRef);\n }\n // TODO(chuckj): runtime: security context?\n _this.instruction.apply(_this, __spread([_this._bindingCode, input.sourceSpan, instruction, literal(elementIndex),\n literal(input.name)], params));\n }\n else {\n _this._unsupported(\"binding type \" + input.type);\n }\n });\n // Traverse element child nodes\n if (this._inI18nSection && element.children.length == 1 &&\n element.children[0] instanceof Text$3) {\n var text = element.children[0];\n this.visitSingleI18nTextChild(text, i18nMeta);\n }\n else {\n visitAll$1(this, element.children);\n }\n if (!createSelfClosingInstruction) {\n // Finish element construction mode.\n this.instruction(this._creationCode, element.endSourceSpan || element.sourceSpan, Identifiers$1.elementEnd);\n }\n // Restore the state before exiting this node\n this._inI18nSection = wasInI18nSection;\n };\n TemplateDefinitionBuilder.prototype.visitTemplate = function (template) {\n var _this = this;\n var templateIndex = this.allocateDataSlot();\n var elName = '';\n if (template.children.length === 1 && template.children[0] instanceof Element$1) {\n // When the template as a single child, derive the context name from the tag\n elName = sanitizeIdentifier(template.children[0].name);\n }\n var contextName = elName ? this.contextName + \"_\" + elName : '';\n var templateName = contextName ? contextName + \"_Template_\" + templateIndex : \"Template_\" + templateIndex;\n var templateContext = \"ctx\" + this.level;\n var parameters = [\n literal(templateIndex),\n variable(templateName),\n TYPED_NULL_EXPR,\n ];\n var attributeNames = [];\n var attributeMap = {};\n template.attributes.forEach(function (a) {\n attributeNames.push(asLiteral(a.name), asLiteral(''));\n attributeMap[a.name] = a.value;\n });\n // Match directives on template attributes\n if (this.directiveMatcher) {\n var selector = createCssSelector('ng-template', attributeMap);\n this.directiveMatcher.match(selector, function (cssSelector, staticType) { _this.directives.add(staticType); });\n }\n if (attributeNames.length) {\n parameters.push(this.constantPool.getConstLiteral(literalArr(attributeNames), true));\n }\n // e.g. C(1, C1Template)\n this.instruction.apply(this, __spread([this._creationCode, template.sourceSpan, Identifiers$1.containerCreate], trimTrailingNulls(parameters)));\n // e.g. p(1, 'forOf', ɵb(ctx.items));\n var context = variable(CONTEXT_NAME);\n template.inputs.forEach(function (input) {\n var convertedBinding = _this.convertPropertyBinding(context, input.value);\n _this.instruction(_this._bindingCode, template.sourceSpan, Identifiers$1.elementProperty, literal(templateIndex), literal(input.name), convertedBinding);\n });\n // Create the template function\n var templateVisitor = new TemplateDefinitionBuilder(this.constantPool, templateContext, this._bindingScope, this.level + 1, contextName, templateName, [], this.directiveMatcher, this.directives, this.pipeTypeByName, this.pipes, this._namespace);\n var templateFunctionExpr = templateVisitor.buildTemplateFunction(template.children, template.variables);\n this._postfixCode.push(templateFunctionExpr.toDeclStmt(templateName, null));\n };\n TemplateDefinitionBuilder.prototype.visitBoundText = function (text) {\n var nodeIndex = this.allocateDataSlot();\n this.instruction(this._creationCode, text.sourceSpan, Identifiers$1.text, literal(nodeIndex));\n this.instruction(this._bindingCode, text.sourceSpan, Identifiers$1.textBinding, literal(nodeIndex), this.convertPropertyBinding(variable(CONTEXT_NAME), text.value));\n };\n TemplateDefinitionBuilder.prototype.visitText = function (text) {\n this.instruction(this._creationCode, 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._creationCode, 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.convertPropertyBinding = function (implicit, value, skipBindFn) {\n var _a, _b;\n var pipesConvertedValue = value.visit(this._valueConverter);\n if (pipesConvertedValue instanceof Interpolation) {\n var convertedPropertyBinding = convertPropertyBinding(this, implicit, pipesConvertedValue, this.bindingContext(), BindingForm.TrySimple, interpolate);\n (_a = this._bindingCode).push.apply(_a, __spread(convertedPropertyBinding.stmts));\n return convertedPropertyBinding.currValExpr;\n }\n else {\n var convertedPropertyBinding = convertPropertyBinding(this, implicit, pipesConvertedValue, this.bindingContext(), BindingForm.TrySimple, function () { return error('Unexpected interpolation'); });\n (_b = this._bindingCode).push.apply(_b, __spread(convertedPropertyBinding.stmts));\n var valExpr = convertedPropertyBinding.currValExpr;\n return skipBindFn ? valExpr : importExpr(Identifiers$1.bind).callFn([valExpr]);\n }\n };\n return TemplateDefinitionBuilder;\n}());\nvar ValueConverter = /** @class */ (function (_super) {\n __extends(ValueConverter, _super);\n function ValueConverter(constantPool, allocateSlot, allocatePureFunctionSlots, definePipe) {\n var _this = _super.call(this) || this;\n _this.constantPool = constantPool;\n _this.allocateSlot = allocateSlot;\n _this.allocatePureFunctionSlots = allocatePureFunctionSlots;\n _this.definePipe = definePipe;\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 // Allocate one slot for the result plus one slot per pipe argument\n var pureFunctionSlot = this.allocatePureFunctionSlots(2 + pipe.args.length);\n var target = new PropertyRead(pipe.span, new ImplicitReceiver(pipe.span), slotPseudoLocal);\n var _a = pipeBindingCallInfo(pipe.args), identifier = _a.identifier, isVarLength = _a.isVarLength;\n this.definePipe(pipe.name, slotPseudoLocal, slot, importExpr(identifier));\n var args = __spread([pipe.exp], pipe.args);\n var convertedArgs = isVarLength ? this.visitAll([new LiteralArray(pipe.span, args)]) : this.visitAll(args);\n return new FunctionCall(pipe.span, target, __spread([\n new LiteralPrimitive(pipe.span, slot),\n new LiteralPrimitive(pipe.span, pureFunctionSlot)\n ], convertedArgs));\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.constantPool.getConstLiteral(literal$$1, true) :\n getLiteralFactory(_this.constantPool, literal$$1, _this.allocatePureFunctionSlots);\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.constantPool.getConstLiteral(literal$$1, true) :\n getLiteralFactory(_this.constantPool, literal$$1, _this.allocatePureFunctionSlots);\n });\n };\n return ValueConverter;\n}(AstMemoryEfficientTransformer));\n// Pipes always have at least one parameter, the value they operate on\nvar pipeBindingIdentifiers = [Identifiers$1.pipeBind1, Identifiers$1.pipeBind2, Identifiers$1.pipeBind3, Identifiers$1.pipeBind4];\nfunction pipeBindingCallInfo(args) {\n var identifier = pipeBindingIdentifiers[args.length];\n return {\n identifier: identifier || Identifiers$1.pipeBindV,\n isVarLength: !identifier,\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 pureFunctionCallInfo(args) {\n var identifier = pureFunctionIdentifiers[args.length];\n return {\n identifier: identifier || Identifiers$1.pureFunctionV,\n isVarLength: !identifier,\n };\n}\nfunction getLiteralFactory(constantPool, literal$$1, allocateSlots) {\n var _a = constantPool.getLiteralFactory(literal$$1), literalFactory = _a.literalFactory, literalFactoryArguments = _a.literalFactoryArguments;\n // Allocate 1 slot for the result plus 1 per argument\n var startSlot = allocateSlots(1 + literalFactoryArguments.length);\n literalFactoryArguments.length > 0 || error(\"Expected arguments to a literal factory function\");\n var _b = pureFunctionCallInfo(literalFactoryArguments), identifier = _b.identifier, isVarLength = _b.isVarLength;\n // Literal factories are pure functions that only need to be re-invoked when the parameters\n // change.\n var args = [\n literal(startSlot),\n literalFactory,\n ];\n if (isVarLength) {\n args.push(literalArr(literalFactoryArguments));\n }\n else {\n args.push.apply(args, __spread(literalFactoryArguments));\n }\n return importExpr(identifier).callFn(args);\n}\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 Object.defineProperty(BindingScope, \"ROOT_SCOPE\", {\n get: function () {\n if (!BindingScope._ROOT_SCOPE) {\n BindingScope._ROOT_SCOPE = new BindingScope().set('$event', variable('$event'));\n }\n return BindingScope._ROOT_SCOPE;\n },\n enumerable: true,\n configurable: true\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 return BindingScope;\n}());\n/**\n * Creates a `CssSelector` given a tag name and a map of attributes\n */\nfunction createCssSelector(tag, attributes) {\n var cssSelector = new CssSelector();\n cssSelector.setElement(tag);\n Object.getOwnPropertyNames(attributes).forEach(function (name) {\n var value = attributes[name];\n cssSelector.addAttribute(name, value);\n if (name.toLowerCase() === 'class') {\n var classes = value.trim().split(/\\s+/g);\n classes.forEach(function (className) { return cssSelector.addClassName(className); });\n }\n });\n return cssSelector;\n}\n// Parse i18n metas like:\n// - \"@@id\",\n// - \"description[@@id]\",\n// - \"meaning|description[@@id]\"\nfunction parseI18nMeta(i18n) {\n var _a, _b;\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}\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}\n/**\n * Parse a template into render3 `Node`s and additional metadata, with no other dependencies.\n *\n * @param template text of the template to parse\n * @param templateUrl URL to use for source mapping of the parsed template\n */\nfunction parseTemplate(template, templateUrl, options) {\n if (options === void 0) { options = {}; }\n var bindingParser = makeBindingParser();\n var htmlParser = new HtmlParser();\n var parseResult = htmlParser.parse(template, templateUrl);\n if (parseResult.errors && parseResult.errors.length > 0) {\n return { errors: parseResult.errors, nodes: [], hasNgContent: false, ngContentSelectors: [] };\n }\n var rootNodes = parseResult.rootNodes;\n if (!options.preserveWhitespaces) {\n rootNodes = visitAll(new WhitespaceVisitor(), rootNodes);\n }\n var _a = htmlAstToRender3Ast(rootNodes, bindingParser), nodes = _a.nodes, hasNgContent = _a.hasNgContent, ngContentSelectors = _a.ngContentSelectors, errors = _a.errors;\n if (errors && errors.length > 0) {\n return { errors: errors, nodes: [], hasNgContent: false, ngContentSelectors: [] };\n }\n return { nodes: nodes, hasNgContent: hasNgContent, ngContentSelectors: ngContentSelectors };\n}\n/**\n * Construct a `BindingParser` with a default configuration.\n */\nfunction makeBindingParser() {\n return new BindingParser(new Parser(new Lexer()), DEFAULT_INTERPOLATION_CONFIG, new DomElementSchemaRegistry(), null, []);\n}\nfunction isClassBinding(input) {\n return input.name == 'className' || input.name == 'class';\n}\nfunction resolveSanitizationFn(input, context) {\n switch (context) {\n case SecurityContext.HTML:\n return importExpr(Identifiers$1.sanitizeHtml);\n case SecurityContext.SCRIPT:\n return importExpr(Identifiers$1.sanitizeScript);\n case SecurityContext.STYLE:\n // the compiler does not fill in an instruction for [style.prop?] binding\n // values because the style algorithm knows internally what props are subject\n // to sanitization (only [attr.style] values are explicitly sanitized)\n return input.type === 1 /* Attribute */ ? importExpr(Identifiers$1.sanitizeStyle) : null;\n case SecurityContext.URL:\n return importExpr(Identifiers$1.sanitizeUrl);\n case SecurityContext.RESOURCE_URL:\n return importExpr(Identifiers$1.sanitizeResourceUrl);\n default:\n return null;\n }\n}\nfunction isStyleSanitizable(prop) {\n switch (prop) {\n case 'background-image':\n case 'background':\n case 'border-image':\n case 'filter':\n case 'list-style':\n case 'list-style-image':\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 */\nfunction baseDirectiveFields(meta, constantPool, bindingParser) {\n var definitionMap = new DefinitionMap();\n // e.g. `type: MyDirective`\n definitionMap.set('type', meta.type);\n // e.g. `selectors: [['', 'someDir', '']]`\n definitionMap.set('selectors', createDirectiveSelector(meta.selector));\n // e.g. `factory: () => new MyApp(injectElementRef())`\n definitionMap.set('factory', compileFactoryFunction({\n name: meta.name,\n fnOrClass: meta.type,\n deps: meta.deps,\n useNew: true,\n injectFn: Identifiers$1.directiveInject,\n }));\n definitionMap.set('contentQueries', createContentQueriesFunction(meta, constantPool));\n definitionMap.set('contentQueriesRefresh', createContentQueriesRefreshFunction(meta));\n // e.g. `hostBindings: (dirIndex, elIndex) => { ... }\n definitionMap.set('hostBindings', createHostBindingsFunction(meta, bindingParser));\n // e.g. `attributes: ['role', 'listbox']`\n definitionMap.set('attributes', createHostAttributesArray(meta));\n // e.g 'inputs: {a: 'a'}`\n definitionMap.set('inputs', conditionallyCreateMapObjectLiteral(meta.inputs));\n // e.g 'outputs: {a: 'a'}`\n definitionMap.set('outputs', conditionallyCreateMapObjectLiteral(meta.outputs));\n // e.g. `features: [NgOnChangesFeature]`\n var features = [];\n if (meta.usesInheritance) {\n features.push(importExpr(Identifiers$1.InheritDefinitionFeature));\n }\n if (meta.lifecycle.usesOnChanges) {\n features.push(importExpr(Identifiers$1.NgOnChangesFeature));\n }\n if (features.length) {\n definitionMap.set('features', literalArr(features));\n }\n return definitionMap;\n}\n/**\n * Compile a directive for the render3 runtime as defined by the `R3DirectiveMetadata`.\n */\nfunction compileDirectiveFromMetadata(meta, constantPool, bindingParser) {\n var definitionMap = baseDirectiveFields(meta, constantPool, bindingParser);\n var expression = importExpr(Identifiers$1.defineDirective).callFn([definitionMap.toLiteralMap()]);\n // On the type side, remove newlines from the selector as it will need to fit into a TypeScript\n // string literal, which must be on one line.\n var selectorForType = (meta.selector || '').replace(/\\n/g, '');\n var type = new ExpressionType(importExpr(Identifiers$1.DirectiveDef, [\n typeWithParameters(meta.type, meta.typeArgumentCount),\n new ExpressionType(literal(selectorForType))\n ]));\n return { expression: expression, type: type };\n}\n/**\n * Compile a component for the render3 runtime as defined by the `R3ComponentMetadata`.\n */\nfunction compileComponentFromMetadata(meta, constantPool, bindingParser) {\n var definitionMap = baseDirectiveFields(meta, constantPool, bindingParser);\n var selector = meta.selector && CssSelector.parse(meta.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 definitionMap.set('attrs', constantPool.getConstLiteral(literalArr(selectorAttributes.map(function (value) { return value != null ? literal(value) : literal(undefined); })), \n /* forceShared */ true));\n }\n }\n // Generate the CSS matcher that recognize directive\n var directiveMatcher = null;\n if (meta.directives.size) {\n var matcher_1 = new SelectorMatcher();\n meta.directives.forEach(function (expression, selector) {\n matcher_1.addSelectables(CssSelector.parse(selector), expression);\n });\n directiveMatcher = matcher_1;\n }\n if (meta.viewQueries.length) {\n definitionMap.set('viewQuery', createViewQueriesFunction(meta, constantPool));\n }\n // e.g. `template: function MyComponent_Template(_ctx, _cm) {...}`\n var templateTypeName = meta.name;\n var templateName = templateTypeName ? templateTypeName + \"_Template\" : null;\n var directivesUsed = new Set();\n var pipesUsed = new Set();\n var template = meta.template;\n var templateFunctionExpression = new TemplateDefinitionBuilder(constantPool, CONTEXT_NAME, BindingScope.ROOT_SCOPE, 0, templateTypeName, templateName, meta.viewQueries, directiveMatcher, directivesUsed, meta.pipes, pipesUsed, Identifiers$1.namespaceHTML)\n .buildTemplateFunction(template.nodes, [], template.hasNgContent, template.ngContentSelectors);\n definitionMap.set('template', templateFunctionExpression);\n // e.g. `directives: [MyDirective]`\n if (directivesUsed.size) {\n definitionMap.set('directives', literalArr(Array.from(directivesUsed)));\n }\n // e.g. `pipes: [MyPipe]`\n if (pipesUsed.size) {\n definitionMap.set('pipes', literalArr(Array.from(pipesUsed)));\n }\n // On the type side, remove newlines from the selector as it will need to fit into a TypeScript\n // string literal, which must be on one line.\n var selectorForType = (meta.selector || '').replace(/\\n/g, '');\n var expression = importExpr(Identifiers$1.defineComponent).callFn([definitionMap.toLiteralMap()]);\n var type = new ExpressionType(importExpr(Identifiers$1.ComponentDef, [\n typeWithParameters(meta.type, meta.typeArgumentCount),\n new ExpressionType(literal(selectorForType))\n ]));\n return { expression: expression, type: type };\n}\n/**\n * A wrapper around `compileDirective` which depends on render2 global analysis data as its input\n * instead of the `R3DirectiveMetadata`.\n *\n * `R3DirectiveMetadata` is computed from `CompileDirectiveMetadata` and other statically reflected\n * information.\n */\nfunction compileDirectiveFromRender2(outputCtx, directive, reflector, bindingParser) {\n var name = identifierName(directive.type);\n name || error(\"Cannot resolver the name of \" + directive.type);\n var definitionField = outputCtx.constantPool.propertyNameOf(1 /* Directive */);\n var meta = directiveMetadataFromGlobalMetadata(directive, outputCtx, reflector);\n var res = compileDirectiveFromMetadata(meta, outputCtx.constantPool, bindingParser);\n // Create the partial class to be merged with the actual class.\n outputCtx.statements.push(new ClassStmt(name, null, [new ClassField(definitionField, INFERRED_TYPE, [StmtModifier.Static], res.expression)], [], new ClassMethod(null, [], []), []));\n}\n/**\n * A wrapper around `compileComponent` which depends on render2 global analysis data as its input\n * instead of the `R3DirectiveMetadata`.\n *\n * `R3ComponentMetadata` is computed from `CompileDirectiveMetadata` and other statically reflected\n * information.\n */\nfunction compileComponentFromRender2(outputCtx, component, render3Ast, reflector, bindingParser, directiveTypeBySel, pipeTypeByName) {\n var name = identifierName(component.type);\n name || error(\"Cannot resolver the name of \" + component.type);\n var definitionField = outputCtx.constantPool.propertyNameOf(2 /* Component */);\n var summary = component.toSummary();\n // Compute the R3ComponentMetadata from the CompileDirectiveMetadata\n var meta = __assign({}, directiveMetadataFromGlobalMetadata(component, outputCtx, reflector), { selector: component.selector, template: {\n nodes: render3Ast.nodes,\n hasNgContent: render3Ast.hasNgContent,\n ngContentSelectors: render3Ast.ngContentSelectors,\n }, directives: typeMapToExpressionMap(directiveTypeBySel, outputCtx), pipes: typeMapToExpressionMap(pipeTypeByName, outputCtx), viewQueries: queriesFromGlobalMetadata(component.viewQueries, outputCtx) });\n var res = compileComponentFromMetadata(meta, outputCtx.constantPool, bindingParser);\n // Create the partial class to be merged with the actual class.\n outputCtx.statements.push(new ClassStmt(name, null, [new ClassField(definitionField, INFERRED_TYPE, [StmtModifier.Static], res.expression)], [], new ClassMethod(null, [], []), []));\n}\n/**\n * Compute `R3DirectiveMetadata` given `CompileDirectiveMetadata` and a `CompileReflector`.\n */\nfunction directiveMetadataFromGlobalMetadata(directive, outputCtx, reflector) {\n var summary = directive.toSummary();\n var name = identifierName(directive.type);\n name || error(\"Cannot resolver the name of \" + directive.type);\n return {\n name: name,\n type: outputCtx.importExpr(directive.type.reference),\n typeArgumentCount: 0,\n typeSourceSpan: typeSourceSpan(directive.isComponent ? 'Component' : 'Directive', directive.type),\n selector: directive.selector,\n deps: dependenciesFromGlobalMetadata(directive.type, outputCtx, reflector),\n queries: queriesFromGlobalMetadata(directive.queries, outputCtx),\n lifecycle: {\n usesOnChanges: directive.type.lifecycleHooks.some(function (lifecycle) { return lifecycle == LifecycleHooks.OnChanges; }),\n },\n host: {\n attributes: directive.hostAttributes,\n listeners: summary.hostListeners,\n properties: summary.hostProperties,\n },\n inputs: directive.inputs,\n outputs: directive.outputs,\n usesInheritance: false,\n };\n}\n/**\n * Convert `CompileQueryMetadata` into `R3QueryMetadata`.\n */\nfunction queriesFromGlobalMetadata(queries, outputCtx) {\n return queries.map(function (query) {\n var read = null;\n if (query.read && query.read.identifier) {\n read = outputCtx.importExpr(query.read.identifier.reference);\n }\n return {\n propertyName: query.propertyName,\n first: query.first,\n predicate: selectorsFromGlobalMetadata(query.selectors, outputCtx),\n descendants: query.descendants, read: read,\n };\n });\n}\n/**\n * Convert `CompileTokenMetadata` for query selectors into either an expression for a predicate\n * type, or a list of string predicates.\n */\nfunction selectorsFromGlobalMetadata(selectors, outputCtx) {\n if (selectors.length > 1 || (selectors.length == 1 && selectors[0].value)) {\n var selectorStrings = selectors.map(function (value) { return value.value; });\n selectorStrings.some(function (value) { return !value; }) &&\n error('Found a type among the string selectors expected');\n return outputCtx.constantPool.getConstLiteral(literalArr(selectorStrings.map(function (value) { return literal(value); })));\n }\n if (selectors.length == 1) {\n var first = 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 createQueryDefinition(query, constantPool, idx) {\n var predicate = getQueryPredicate(query, constantPool);\n // e.g. r3.Q(null, somePredicate, false) or r3.Q(0, ['div'], false)\n var parameters = [\n literal(idx, INFERRED_TYPE),\n predicate,\n literal(query.descendants),\n ];\n if (query.read) {\n parameters.push(query.read);\n }\n return importExpr(Identifiers$1.query).callFn(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(meta) {\n var e_1, _a;\n var values = [];\n var attributes = meta.host.attributes;\n try {\n for (var _b = __values(Object.getOwnPropertyNames(attributes)), _c = _b.next(); !_c.done; _c = _b.next()) {\n var key = _c.value;\n var value = attributes[key];\n values.push(literal(key), literal(value));\n }\n }\n catch (e_1_1) { e_1 = { error: e_1_1 }; }\n finally {\n try {\n if (_c && !_c.done && (_a = _b.return)) _a.call(_b);\n }\n finally { if (e_1) throw e_1.error; }\n }\n if (values.length > 0) {\n return literalArr(values);\n }\n return null;\n}\n// Return a contentQueries function or null if one is not necessary.\nfunction createContentQueriesFunction(meta, constantPool) {\n if (meta.queries.length) {\n var statements = meta.queries.map(function (query) {\n var queryDefinition = createQueryDefinition(query, constantPool, null);\n return importExpr(Identifiers$1.registerContentQuery).callFn([queryDefinition]).toStmt();\n });\n var typeName = meta.name;\n return fn([], statements, INFERRED_TYPE, null, typeName ? typeName + \"_ContentQueries\" : null);\n }\n return null;\n}\n// Return a contentQueriesRefresh function or null if one is not necessary.\nfunction createContentQueriesRefreshFunction(meta) {\n if (meta.queries.length > 0) {\n var statements_1 = [];\n var typeName = meta.name;\n var parameters = [\n new FnParam('dirIndex', NUMBER_TYPE),\n new FnParam('queryStartIndex', NUMBER_TYPE),\n ];\n var directiveInstanceVar_1 = variable('instance');\n // var $tmp$: any;\n var temporary_1 = temporaryAllocator(statements_1, TEMPORARY_NAME);\n // const $instance$ = $r3$.ɵd(dirIndex);\n statements_1.push(directiveInstanceVar_1.set(importExpr(Identifiers$1.loadDirective).callFn([variable('dirIndex')]))\n .toDeclStmt(INFERRED_TYPE, [StmtModifier.Final]));\n meta.queries.forEach(function (query, idx) {\n var loadQLArg = variable('queryStartIndex');\n var getQueryList = importExpr(Identifiers$1.loadQueryList).callFn([\n idx > 0 ? loadQLArg.plus(literal(idx)) : loadQLArg\n ]);\n var assignToTemporary = temporary_1().set(getQueryList);\n var callQueryRefresh = importExpr(Identifiers$1.queryRefresh).callFn([assignToTemporary]);\n var updateDirective = directiveInstanceVar_1.prop(query.propertyName)\n .set(query.first ? temporary_1().prop('first') : temporary_1());\n var refreshQueryAndUpdateDirective = callQueryRefresh.and(updateDirective);\n statements_1.push(refreshQueryAndUpdateDirective.toStmt());\n });\n return fn(parameters, statements_1, INFERRED_TYPE, null, typeName ? typeName + \"_ContentQueriesRefresh\" : null);\n }\n return null;\n}\n// Define and update any view queries\nfunction createViewQueriesFunction(meta, constantPool) {\n var createStatements = [];\n var updateStatements = [];\n var tempAllocator = temporaryAllocator(updateStatements, TEMPORARY_NAME);\n for (var i = 0; i < meta.viewQueries.length; i++) {\n var query = meta.viewQueries[i];\n // creation, e.g. r3.Q(0, somePredicate, true);\n var queryDefinition = createQueryDefinition(query, constantPool, i);\n createStatements.push(queryDefinition.toStmt());\n // update, e.g. (r3.qR(tmp = r3.ɵld(0)) && (ctx.someDir = tmp));\n var temporary = tempAllocator();\n var getQueryList = importExpr(Identifiers$1.load).callFn([literal(i)]);\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 updateStatements.push(refresh.and(updateDirective).toStmt());\n }\n var viewQueryFnName = meta.name ? meta.name + \"_Query\" : null;\n return fn([new FnParam(RENDER_FLAGS, NUMBER_TYPE), new FnParam(CONTEXT_NAME, null)], [\n renderFlagCheckIfStmt(1 /* Create */, createStatements),\n renderFlagCheckIfStmt(2 /* Update */, updateStatements)\n ], INFERRED_TYPE, null, viewQueryFnName);\n}\n// Return a host binding function or null if one is not necessary.\nfunction createHostBindingsFunction(meta, bindingParser) {\n var e_2, _a, e_3, _b;\n var statements = [];\n var hostBindingSourceSpan = meta.typeSourceSpan;\n var directiveSummary = metadataAsSummary(meta);\n // Calculate the host property bindings\n var bindings = bindingParser.createBoundHostProperties(directiveSummary, hostBindingSourceSpan);\n var bindingContext = importExpr(Identifiers$1.loadDirective).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'),\n literal(binding.name),\n importExpr(Identifiers$1.bind).callFn([bindingExpr.currValExpr]),\n ])\n .toStmt());\n }\n }\n catch (e_2_1) { e_2 = { error: e_2_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_2) throw e_2.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 = meta.name;\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_3_1) { e_3 = { error: e_3_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_3) throw e_3.error; }\n }\n }\n if (statements.length > 0) {\n var typeName = meta.name;\n return fn([\n new FnParam('dirIndex', NUMBER_TYPE),\n new FnParam('elIndex', NUMBER_TYPE),\n ], statements, INFERRED_TYPE, null, typeName ? typeName + \"_HostBindings\" : null);\n }\n return null;\n}\nfunction metadataAsSummary(meta) {\n // clang-format off\n return {\n hostAttributes: meta.host.attributes,\n hostListeners: meta.host.listeners,\n hostProperties: meta.host.properties,\n };\n // clang-format on\n}\nfunction typeMapToExpressionMap(map, outputCtx) {\n // Convert each map entry into another entry where the value is an expression importing the type.\n var entries = Array.from(map).map(function (_a) {\n var _b = __read(_a, 2), key = _b[0], type = _b[1];\n return [key, outputCtx.importExpr(type)];\n });\n return new Map(entries);\n}\nvar HOST_REG_EXP$1 = /^(?:(?:\\[([^\\]]+)\\])|(?:\\(([^\\)]+)\\)))|(\\@[-\\w]+)$/;\nfunction parseHostBindings(host) {\n var attributes = {};\n var listeners = {};\n var properties = {};\n var animations = {};\n Object.keys(host).forEach(function (key) {\n var value = host[key];\n var matches = key.match(HOST_REG_EXP$1);\n if (matches === null) {\n attributes[key] = value;\n }\n else if (matches[1 /* Property */] != null) {\n properties[matches[1 /* Property */]] = value;\n }\n else if (matches[2 /* Event */] != null) {\n listeners[matches[2 /* Event */]] = value;\n }\n else if (matches[3 /* Animation */] != null) {\n animations[matches[3 /* Animation */]] = value;\n }\n });\n return { attributes: attributes, listeners: listeners, properties: properties, animations: animations };\n}\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this 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 e_1, _a, e_2, _b;\n var allLazyRoutes = [];\n try {\n for (var _c = __values(moduleMeta.transitiveModule.providers), _d = _c.next(); !_d.done; _d = _c.next()) {\n var _e = _d.value, provider = _e.provider, module = _e.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_2_1) { e_2 = { error: e_2_1 }; }\n finally {\n try {\n if (loadChildren_1_1 && !loadChildren_1_1.done && (_b = loadChildren_1.return)) _b.call(loadChildren_1);\n }\n finally { if (e_2) throw e_2.error; }\n }\n }\n }\n }\n catch (e_1_1) { e_1 = { error: e_1_1 }; }\n finally {\n try {\n if (_d && !_d.done && (_a = _c.return)) _a.call(_c);\n }\n finally { if (e_1) throw e_1.error; }\n }\n return allLazyRoutes;\n}\nfunction _collectLoadChildren(routes, target) {\n if (target === void 0) { target = []; }\n var e_3, _a;\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}\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 var e_1, _a;\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 };\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 var e_2, _a;\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 _b = __values(metadata['exports']), _c = _b.next(); !_c.done; _c = _b.next()) {\n var moduleExport = _c.value;\n _loop_1(moduleExport);\n }\n }\n catch (e_2_1) { e_2 = { error: e_2_1 }; }\n finally {\n try {\n if (_c && !_c.done && (_a = _b.return)) _a.call(_b);\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 might 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 };\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 the 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 }\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\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 e_1, _a, e_2, _b, e_3, _c;\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 _d = exportAsArr_1_1.value, symbol = _d.symbol, exportAs = _d.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 && (_a = exportAsArr_1.return)) _a.call(exportAsArr_1);\n }\n finally { if (e_1) throw e_1.error; }\n }\n var ngModuleSymbols = new Set();\n try {\n for (var _e = __values(this.data), _f = _e.next(); !_f.done; _f = _e.next()) {\n var _g = _f.value, summary = _g.summary, metadata = _g.metadata, isLibrary = _g.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 _h = __values(modSummary.modules), _j = _h.next(); !_j.done; _j = _h.next()) {\n var mod = _j.value;\n ngModuleSymbols.add(mod.reference);\n }\n }\n catch (e_3_1) { e_3 = { error: e_3_1 }; }\n finally {\n try {\n if (_j && !_j.done && (_c = _h.return)) _c.call(_h);\n }\n finally { if (e_3) throw e_3.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_2_1) { e_2 = { error: e_2_1 }; }\n finally {\n try {\n if (_f && !_f.done && (_b = _e.return)) _b.call(_e);\n }\n finally { if (e_2) throw e_2.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 };\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 // For modules,\n // we also add the summaries for modules\n // from libraries.\n // This is ok as we produce reexports for all transitive modules.\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 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, 1 /* 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, 2 /* 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 & 2 /* 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 e_1, _a;\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 };\n AotCompiler.prototype._createTypeCheckBlock = function (ctx, componentId, moduleMeta, compMeta, directives, externalReferenceVars) {\n var _a;\n var _b = this._parseTemplate(compMeta, moduleMeta, directives), parsedTemplate = _b.template, usedPipes = _b.pipes;\n (_a = ctx.statements).push.apply(_a, __spread(this._typeCheckCompiler.compileComponent(componentId, compMeta, parsedTemplate, usedPipes, externalReferenceVars, ctx)));\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 // Template URL points to either an HTML or TS file depending on whether\n // the file is used with `templateUrl:` or `template:`, respectively.\n var templateUrl = compMeta.template.templateUrl;\n var interpolationConfig = InterpolationConfig.fromArray(compMeta.template.interpolation);\n errors.push.apply(errors, __spread(messageBundle.updateFromTemplate(html, templateUrl, 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 compileNgModuleFromRender2(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 schemaRegistry = new DomElementSchemaRegistry();\n var hostBindingParser = new BindingParser(this._templateParser.expressionParser, DEFAULT_INTERPOLATION_CONFIG, schemaRegistry, [], 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 htmlAst = directiveMetadata.template.htmlAst;\n var preserveWhitespaces = directiveMetadata.template.preserveWhitespaces;\n if (!preserveWhitespaces) {\n htmlAst = removeWhitespaces(htmlAst);\n }\n var render3Ast = htmlAstToRender3Ast(htmlAst.rootNodes, hostBindingParser);\n // Map of StaticType by directive selectors\n var directiveTypeBySel_1 = new Map();\n var directives_1 = module.transitiveModule.directives.map(function (dir) { return _this._metadataResolver.getDirectiveSummary(dir.reference); });\n directives_1.forEach(function (directive) {\n if (directive.selector) {\n directiveTypeBySel_1.set(directive.selector, directive.type.reference);\n }\n });\n // Map of StaticType by pipe names\n var pipeTypeByName_1 = new Map();\n var pipes_1 = module.transitiveModule.pipes.map(function (pipe) { return _this._metadataResolver.getPipeSummary(pipe.reference); });\n pipes_1.forEach(function (pipe) { pipeTypeByName_1.set(pipe.name, pipe.type.reference); });\n compileComponentFromRender2(context, directiveMetadata, render3Ast, _this.reflector, hostBindingParser, directiveTypeBySel_1, pipeTypeByName_1);\n }\n else {\n compileDirectiveFromRender2(context, directiveMetadata, _this.reflector, hostBindingParser);\n }\n });\n pipes.forEach(function (pipeType) {\n var pipeMetadata = _this._metadataResolver.getPipeMetadata(pipeType);\n if (pipeMetadata) {\n compilePipeFromRender2(context, pipeMetadata, _this.reflector);\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 e_2, _a, e_3, _b;\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 _c = __values(analyzedModules.ngModules), _d = _c.next(); !_d.done; _d = _c.next()) {\n var ngModule = _d.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_3_1) { e_3 = { error: e_3_1 }; }\n finally {\n try {\n if (lazyRoutes_1_1 && !lazyRoutes_1_1.done && (_b = lazyRoutes_1.return)) _b.call(lazyRoutes_1);\n }\n finally { if (e_3) throw e_3.error; }\n }\n }\n }\n catch (e_2_1) { e_2 = { error: e_2_1 }; }\n finally {\n try {\n if (_d && !_d.done && (_a = _c.return)) _a.call(_c);\n }\n finally { if (e_2) throw e_2.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 var e_4, _a;\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 }\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 var e_1, _a;\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 };\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 var e_2, _a, e_3, _b;\n if (isPrimitive(expression)) {\n return expression;\n }\n if (expression instanceof Array) {\n var result_2 = [];\n try {\n for (var _c = __values(expression), _d = _c.next(); !_d.done; _d = _c.next()) {\n var item = _d.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_3_1) { e_3 = { error: e_3_1 }; }\n finally {\n try {\n if (spreadArray_1_1 && !spreadArray_1_1.done && (_b = spreadArray_1.return)) _b.call(spreadArray_1);\n }\n finally { if (e_3) throw e_3.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_2_1) { e_2 = { error: e_2_1 }; }\n finally {\n try {\n if (_d && !_d.done && (_a = _c.return)) _a.call(_c);\n }\n finally { if (e_2) throw e_2.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 }\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.visitWrappedNodeExpr = function (ast, ctx) {\n throw new Error('Cannot interpret a WrappedNodeExpr.');\n };\n StatementInterpreter.prototype.visitTypeofExpr = function (ast, ctx) {\n throw new Error('Cannot interpret a TypeofExpr');\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.visitWrappedNodeExpr = function (ast, ctx) {\n throw new Error('Cannot emit a WrappedNodeExpr in Javascript.');\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 this._emitReferenceToExternal(ast, this.reflector.resolveExternalReference(ast.value), ctx);\n return null;\n };\n JitEmitterVisitor.prototype.visitWrappedNodeExpr = function (ast, ctx) {\n this._emitReferenceToExternal(ast, ast.node, ctx);\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 JitEmitterVisitor.prototype._emitReferenceToExternal = function (ast, value, ctx) {\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 };\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)) {\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 */\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 // Template URL points to either an HTML or TS file depending on\n // whether the file is used with `templateUrl:` or `template:`,\n // respectively.\n var templateUrl = compMeta.template.templateUrl;\n var interpolationConfig = InterpolationConfig.fromArray(compMeta.template.interpolation);\n errors.push.apply(errors, __spread(_this.messageBundle.updateFromTemplate(html, templateUrl, 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 */\nfunction compileInjectable(meta) {\n var factory = NULL_EXPR;\n function makeFn(ret) {\n return fn([], [new ReturnStatement(ret)], undefined, undefined, meta.name + \"_Factory\");\n }\n if (meta.useClass !== undefined || meta.useFactory !== undefined) {\n // First, handle useClass and useFactory together, since both involve a similar call to\n // `compileFactoryFunction`. Either dependencies are explicitly specified, in which case\n // a factory function call is generated, or they're not specified and the calls are special-\n // cased.\n if (meta.deps !== undefined) {\n // Either call `new meta.useClass(...)` or `meta.useFactory(...)`.\n var fnOrClass = meta.useClass || meta.useFactory;\n // useNew: true if meta.useClass, false for meta.useFactory.\n var useNew = meta.useClass !== undefined;\n factory = compileFactoryFunction({\n name: meta.name,\n fnOrClass: fnOrClass,\n useNew: useNew,\n injectFn: Identifiers.inject,\n deps: meta.deps,\n });\n }\n else if (meta.useClass !== undefined) {\n // Special case for useClass where the factory from the class's ngInjectableDef is used.\n if (meta.useClass.isEquivalent(meta.type)) {\n // For the injectable compiler, useClass represents a foreign type that should be\n // instantiated to satisfy construction of the given type. It's not valid to specify\n // useClass === type, since the useClass type is expected to already be compiled.\n throw new Error(\"useClass is the same as the type, but no deps specified, which is invalid.\");\n }\n factory =\n makeFn(new ReadPropExpr(new ReadPropExpr(meta.useClass, 'ngInjectableDef'), 'factory')\n .callFn([]));\n }\n else if (meta.useFactory !== undefined) {\n // Special case for useFactory where no arguments are passed.\n factory = meta.useFactory.callFn([]);\n }\n else {\n // Can't happen - outer conditional guards against both useClass and useFactory being\n // undefined.\n throw new Error('Reached unreachable block in injectable compiler.');\n }\n }\n else if (meta.useValue !== undefined) {\n // Note: it's safe to use `meta.useValue` instead of the `USE_VALUE in meta` check used for\n // client code because meta.useValue is an Expression which will be defined even if the actual\n // value is undefined.\n factory = makeFn(meta.useValue);\n }\n else if (meta.useExisting !== undefined) {\n // useExisting is an `inject` call on the existing token.\n factory = makeFn(importExpr(Identifiers.inject).callFn([meta.useExisting]));\n }\n else {\n // A strict type is compiled according to useClass semantics, except the dependencies are\n // required.\n if (meta.deps === undefined) {\n throw new Error(\"Type compilation of an injectable requires dependencies.\");\n }\n factory = compileFactoryFunction({\n name: meta.name,\n fnOrClass: meta.type,\n useNew: true,\n injectFn: Identifiers.inject,\n deps: meta.deps,\n });\n }\n var token = meta.type;\n var providedIn = meta.providedIn;\n var expression = importExpr(Identifiers.defineInjectable).callFn([mapToMapExpression({ token: token, factory: factory, providedIn: providedIn })]);\n var type = new ExpressionType(importExpr(Identifiers.InjectableDef, [new ExpressionType(meta.type)]));\n return {\n expression: expression, type: 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 * Implementation of `CompileReflector` which resolves references to @angular/core\n * symbols at runtime, according to a consumer-provided mapping.\n *\n * Only supports `resolveExternalReference`, all other methods throw.\n */\nvar R3JitReflector = /** @class */ (function () {\n function R3JitReflector(context) {\n this.context = context;\n }\n R3JitReflector.prototype.resolveExternalReference = function (ref) {\n // This reflector only handles @angular/core imports.\n if (ref.moduleName !== '@angular/core') {\n throw new Error(\"Cannot resolve external reference to \" + ref.moduleName + \", only references to @angular/core are supported.\");\n }\n if (!this.context.hasOwnProperty(ref.name)) {\n throw new Error(\"No value provided for @angular/core symbol '\" + ref.name + \"'.\");\n }\n return this.context[ref.name];\n };\n R3JitReflector.prototype.parameters = function (typeOrFunc) { throw new Error('Not implemented.'); };\n R3JitReflector.prototype.annotations = function (typeOrFunc) { throw new Error('Not implemented.'); };\n R3JitReflector.prototype.shallowAnnotations = function (typeOrFunc) { throw new Error('Not implemented.'); };\n R3JitReflector.prototype.tryAnnotations = function (typeOrFunc) { throw new Error('Not implemented.'); };\n R3JitReflector.prototype.propMetadata = function (typeOrFunc) { throw new Error('Not implemented.'); };\n R3JitReflector.prototype.hasLifecycleHook = function (type, lcProperty) { throw new Error('Not implemented.'); };\n R3JitReflector.prototype.guards = function (typeOrFunc) { throw new Error('Not implemented.'); };\n R3JitReflector.prototype.componentModuleUrl = function (type, cmpMetadata) { throw new Error('Not implemented.'); };\n return R3JitReflector;\n}());\n/**\n * JIT compiles an expression and returns the result of executing that expression.\n *\n * @param def the definition which will be compiled and executed to get the value to patch\n * @param context an object map of @angular/core symbol names to symbols which will be available in\n * the context of the compiled expression\n * @param sourceUrl a URL to use for the source map of the compiled expression\n * @param constantPool an optional `ConstantPool` which contains constants used in the expression\n */\nfunction jitExpression(def, context, sourceUrl, constantPool) {\n // The ConstantPool may contain Statements which declare variables used in the final expression.\n // Therefore, its statements need to precede the actual JIT operation. The final statement is a\n // declaration of $def which is set to the expression being compiled.\n var statements = __spread((constantPool !== undefined ? constantPool.statements : []), [\n new DeclareVarStmt('$def', def, undefined, [StmtModifier.Exported]),\n ]);\n var res = jitStatements(sourceUrl, statements, new R3JitReflector(context), false);\n return res['$def'];\n}\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n// This file only reexports content of the `src` folder. Keep it that way.\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n// This file only reexports content of the `src` folder. Keep it that way.\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code 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\nexport { core, CompilerConfig, preserveWhitespacesDefault, isLoweredSymbol, createLoweredSymbol, Identifiers, JitCompiler, ConstantPool, DirectiveResolver, PipeResolver, NgModuleResolver, DEFAULT_INTERPOLATION_CONFIG, InterpolationConfig, NgModuleCompiler, ArrayType, AssertNotNull, BinaryOperator, BinaryOperatorExpr, BuiltinMethod, BuiltinType, BuiltinTypeName, BuiltinVar, CastExpr, ClassField, ClassMethod, ClassStmt, CommaExpr, CommentStmt, ConditionalExpr, DeclareFunctionStmt, DeclareVarStmt, Expression, ExpressionStatement, ExpressionType, ExternalExpr, ExternalReference, FunctionExpr, IfStmt, InstantiateExpr, InvokeFunctionExpr, InvokeMethodExpr, JSDocCommentStmt, LiteralArrayExpr, LiteralExpr, LiteralMapExpr, MapType, NotExpr, ReadKeyExpr, ReadPropExpr, ReadVarExpr, ReturnStatement, ThrowStmt, TryCatchStmt, Type$1 as Type, WrappedNodeExpr, WriteKeyExpr, WritePropExpr, WriteVarExpr, StmtModifier, Statement, TypeofExpr, collectExternalReferences, EmitterVisitorContext, ViewCompiler, getParseErrors, isSyntaxError, syntaxError, Version, jitExpression, R3ResolvedDependencyType, compileInjector, compileNgModule, compilePipeFromMetadata, makeBindingParser, parseTemplate, compileComponentFromMetadata, compileDirectiveFromMetadata, parseHostBindings, VERSION, TextAst, BoundTextAst, AttrAst, BoundElementPropertyAst, BoundEventAst, ReferenceAst, VariableAst, ElementAst, EmbeddedTemplateAst, BoundDirectivePropertyAst, DirectiveAst, ProviderAst, ProviderAstType, NgContentAst, 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, ParsedProperty, ParsedPropertyType, ParsedEvent, ParsedVariable, BoundElementProperty, 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, compileInjectable };\n//# sourceMappingURL=compiler.js.map\n","/**\n * @license Angular v6.1.10\n * (c) 2010-2018 Google, Inc. https://angular.io/\n * License: MIT\n */\n\nimport { __decorate, __metadata, __spread, __param, __read, __extends, __assign, __values } from 'tslib';\nimport { Subject, Subscription, Observable, 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 * @usageNotes\n * ### Basic Example\n *\n * ### Plain InjectionToken\n *\n * {@example core/di/ts/injector_spec.ts region='InjectionToken'}\n *\n * ### Tree-shakable InjectionToken\n *\n * {@example core/di/ts/injector_spec.ts region='ShakableInjectionToken'}\n *\n */\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 var _a;\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 }\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 var _a;\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 }\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 var _a;\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 }\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 * @usageNotes\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 * @Annotation\n */\nvar Attribute = makeParamDecorator('Attribute', function (attributeName) { return ({ attributeName: attributeName }); });\n/**\n * Base class for query metadata.\n *\n * @see `ContentChildren`.\n * @see `ContentChild`.\n * @see `ViewChildren`.\n * @see `ViewChild`.\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 * @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 * @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 * The strategy that the default change detector uses to detect changes.\n * When set, takes effect the next time change detection is triggered.\n *\n */\nvar ChangeDetectionStrategy;\n(function (ChangeDetectionStrategy) {\n /**\n * Use the `CheckOnce` strategy, meaning that automatic change detection is deactivated\n * until reactivated by setting the strategy to `Default` (`CheckAlways`).\n * Change detection can still be explictly invoked.\n */\n ChangeDetectionStrategy[ChangeDetectionStrategy[\"OnPush\"] = 0] = \"OnPush\";\n /**\n * Use the default `CheckAlways` strategy, in which change detection is automatic until\n * explicitly deactivated.\n */\n ChangeDetectionStrategy[ChangeDetectionStrategy[\"Default\"] = 1] = \"Default\";\n})(ChangeDetectionStrategy || (ChangeDetectionStrategy = {}));\n/**\n * Defines the possible states of the default change detector.\n * @see `ChangeDetectorRef`\n */\nvar ChangeDetectorStatus;\n(function (ChangeDetectorStatus) {\n /**\n * A state in which, after calling `detectChanges()`, the change detector\n * state becomes `Checked`, and must be explicitly invoked or reactivated.\n */\n ChangeDetectorStatus[ChangeDetectorStatus[\"CheckOnce\"] = 0] = \"CheckOnce\";\n /**\n * A state in which change detection is skipped until the change detector mode\n * becomes `CheckOnce`.\n */\n ChangeDetectorStatus[ChangeDetectorStatus[\"Checked\"] = 1] = \"Checked\";\n /**\n * A state in which change detection continues automatically until explictly\n * deactivated.\n */\n ChangeDetectorStatus[ChangeDetectorStatus[\"CheckAlways\"] = 2] = \"CheckAlways\";\n /**\n * A state in which a change detector sub tree is not a part of the main tree and\n * should be skipped.\n */\n ChangeDetectorStatus[ChangeDetectorStatus[\"Detached\"] = 3] = \"Detached\";\n /**\n * Indicates that the change detector encountered an error checking a binding\n * or calling a directive lifecycle method and is now in an inconsistent state. Change\n * detectors in this state do not detect changes.\n */\n ChangeDetectorStatus[ChangeDetectorStatus[\"Errored\"] = 4] = \"Errored\";\n /**\n * Indicates that the change detector has been destroyed.\n */\n ChangeDetectorStatus[ChangeDetectorStatus[\"Destroyed\"] = 5] = \"Destroyed\";\n})(ChangeDetectorStatus || (ChangeDetectorStatus = {}));\n/**\n * Reports whether a given strategy is currently the default for change detection.\n * @param changeDetectionStrategy The strategy to check.\n * @returns True if the given strategy is the current default, false otherwise.\n * @see `ChangeDetectorStatus`\n * @see `ChangeDetectorRef`\n */\nfunction isDefaultChangeDetectionStrategy(changeDetectionStrategy) {\n return changeDetectionStrategy == null ||\n changeDetectionStrategy === ChangeDetectionStrategy.Default;\n}\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this 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 ivyEnabled = false;\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code 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 of the Directive metadata.\n */\nvar Directive = makeDecorator('Directive', function (dir) {\n if (dir === void 0) { dir = {}; }\n return dir;\n}, undefined, undefined, function (type, meta) { return (function () { })(type, meta); });\n/**\n * Component decorator and metadata.\n *\n * @usageNotes\n *\n * ### Using animations\n *\n * The following snippet shows an animation trigger in a component's\n * metadata. The trigger is attached to an element in the component's\n * template, using \"@_trigger_name_\", and a state expression that is evaluated\n * at run time to determine whether the animation should start.\n *\n * ```typescript\n * @Component({\n * selector: 'animation-cmp',\n * templateUrl: 'animation-cmp.html',\n * animations: [\n * trigger('myTriggerName', [\n * state('on', style({ opacity: 1 }),\n * state('off', style({ opacity: 0 }),\n * transition('on => off', [\n * animate(\"1s\")\n * ])\n * ])\n * ]\n * })\n * ```\n *\n * ```html\n * <!-- animation-cmp.html -->\n * <div @myTriggerName=\"expression\">...</div>\n * ```\n *\n * ### Preserving whitespace\n *\n * Removing whitespace can greatly reduce AOT-generated code size, and speed up view creation.\n * As of Angular 6, default for `preserveWhitespaces` is false (whitespace is removed).\n * To change the default setting for all components in your application, set\n * the `preserveWhitespaces` option of the AOT compiler.\n *\n * Current implementation removes whitespace characters as follows:\n * - Trims all whitespaces at the beginning and the end of a template.\n * - Removes whitespace-only text nodes. For example,\n * `<button>Action 1</button> <button>Action 2</button>` becomes\n * `<button>Action 1</button><button>Action 2</button>`.\n * - Replaces a series of whitespace characters in text nodes with a single space.\n * For example, `<span>\\n some text\\n</span>` becomes `<span> some text </span>`.\n * - Does NOT alter text nodes inside HTML tags such as `<pre>` or `<textarea>`,\n * where whitespace characters are significant.\n *\n * Note that these transformations can influence DOM nodes layout, although impact\n * should be minimal.\n *\n * You can override the default behavior to preserve whitespace characters\n * in certain fragments of a template. For example, you can exclude an entire\n * DOM sub-tree by using the `ngPreserveWhitespaces` attribute:\n *\n * ```html\n * <div ngPreserveWhitespaces>\n * whitespaces are preserved here\n * <span> and here </span>\n * </div>\n * ```\n *\n * You can force a single space to be preserved in a text node by using `&ngsp;`,\n * which is replaced with a space character by Angular's template\n * compiler:\n *\n * ```html\n * <a>Spaces</a>&ngsp;<a>between</a>&ngsp;<a>links.</a>\n * <!-->compiled to be equivalent to:</>\n * <a>Spaces</a> <a>between</a> <a>links.</a>\n * ```\n *\n * Note that sequences of `&ngsp;` are still collapsed to just one space character when\n * the `preserveWhitespaces` option is set to `false`.\n *\n * ```html\n * <a>before</a>&ngsp;&ngsp;&ngsp;<a>after</a>\n * <!-->compiled to be equivalent to:</>\n * <a>Spaces</a> <a>between</a> <a>links.</a>\n * ```\n *\n * To preserve sequences of whitespace characters, use the\n * `ngPreserveWhitespaces` attribute.\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, undefined, function (type, meta) { return (function () { })(type, meta); });\n/**\n *\n *\n * @Annotation\n */\nvar Pipe = makeDecorator('Pipe', function (p) { return (__assign({ pure: true }, p)); }, undefined, undefined, function (type, meta) { return (function () { })(type, meta); });\n/**\n *\n * @Annotation\n */\nvar Input = makePropDecorator('Input', function (bindingPropertyName) { return ({ bindingPropertyName: bindingPropertyName }); });\n/**\n *\n * @Annotation\n */\nvar Output = makePropDecorator('Output', function (bindingPropertyName) { return ({ bindingPropertyName: bindingPropertyName }); });\n/**\n *\n * @Annotation\n */\nvar HostBinding = makePropDecorator('HostBinding', function (hostPropertyName) { return ({ hostPropertyName: hostPropertyName }); });\n/**\n * Binds a CSS event to a host listener and supplies configuration metadata.\n * Angular invokes the supplied handler method when the host element emits the specified event,\n * and updates the bound element with the result.\n * If the handler method returns false, applies `preventDefault` on the bound element.\n *\n * @usageNotes\n *\n * The following example declares a directive\n * that attaches a click listener to a button and counts clicks.\n *\n * ```\n * @Directive({selector: 'button[counting]'})\n * class CountClicks {\n * numberOfClicks = 0;\n *\n * @HostListener('click', ['$event.target'])\n * onClick(btn) {\n * console.log('button', btn, 'number of clicks:', this.numberOfClicks++);\n * }\n * }\n *\n * @Component({\n * selector: 'app',\n * template: '<button counting>Increment</button>',\n * })\n * class App {}\n * ```\n *\n * @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;\n// Check __global first, because in Node tests both __global and __window may be defined and _global\n// should be __global in that case.\nvar _global = __global || __window || __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 ReflectionCapabilities.prototype._zipTypesAndAnnotations = 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 ReflectionCapabilities.prototype.importUri = 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, but not yet defined. It is also used when the `token` which we use when creating\n * a query is not yet defined.\n *\n * @usageNotes\n * ### Example\n * {@example core/di/ts/forward_ref/forward_ref_spec.ts region='forward_ref'}\n * @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 * @usageNotes\n * ### Example\n *\n * {@example core/di/ts/forward_ref/forward_ref_spec.ts region='resolve_forward_ref'}\n *\n * @see `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 * @Annotation\n */\nvar Inject = makeParamDecorator('Inject', function (token) { return ({ token: token }); });\n/**\n * Optional decorator and metadata.\n *\n * @Annotation\n */\nvar Optional = makeParamDecorator('Optional');\n/**\n * Self decorator and metadata.\n *\n * @Annotation\n */\nvar Self = makeParamDecorator('Self');\n/**\n * SkipSelf decorator and metadata.\n *\n * @Annotation\n */\nvar SkipSelf = makeParamDecorator('SkipSelf');\n/**\n * Host decorator and metadata.\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 // Intentionally left behind: With dev tools open the debugger will stop here. There is no\n // reason why correctly written application should cause this exception.\n // TODO(misko): uncomment the next line once `ngDevMode` works with closure.\n // if(ngDevMode) debugger;\n throw new Error(\"NullInjectorError: No provider for \" + stringify(token) + \"!\");\n }\n return notFoundValue;\n };\n return NullInjector;\n}());\n/**\n * Concrete injectors implement this interface.\n *\n * For more details, see the [\"Dependency Injection Guide\"](guide/dependency-injection).\n *\n * @usageNotes\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 *\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 * @usageNotes\n * ### Example\n *\n * {@example core/di/ts/provider_spec.ts region='ConstructorProvider'}\n */\n Injector.create = 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 = {};\nvar USE_VALUE = getClosureSafeProperty$1({ provide: String, useValue: GET_PROPERTY_NAME });\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 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 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 _a;\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, \n // A record which describes how to resolve the token.\n // If undefined, this means we don't have such a record\n childRecord, \n // Other records we know about.\n records, \n // If we don't know how to resolve dependency and we should not check parent for it,\n // than pass in Null injector.\n !childRecord && !(options & 4 /* CheckParent */) ? 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}\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 /* Default */;\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 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) {\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 if (flags & 8 /* Optional */)\n return null;\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 /* Default */;\n for (var j = 0; j < arg.length; j++) {\n var meta = arg[j];\n if (meta instanceof Optional || meta.ngMetadataName === 'Optional') {\n flags |= 8 /* Optional */;\n }\n else if (meta instanceof SkipSelf || meta.ngMetadataName === 'SkipSelf') {\n flags |= 4 /* SkipSelf */;\n }\n else if (meta instanceof Self || meta.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$1 = {};\nvar ɵ0$1 = GET_PROPERTY_NAME$1;\nvar USE_VALUE$1 = getClosureSafeProperty({ provide: String, useValue: ɵ0$1 }, GET_PROPERTY_NAME$1);\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$1 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 var _a;\n return new ((_a = classProvider_1.useClass).bind.apply(_a, __spread([void 0], injectArgs(deps_2))))();\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 * Supports @Injectable() in JIT mode for Render2.\n */\nfunction preR3InjectableCompile(injectableType, options) {\n if (options && options.providedIn !== undefined && injectableType.ngInjectableDef === undefined) {\n injectableType.ngInjectableDef = defineInjectable({\n providedIn: options.providedIn,\n factory: convertInjectableProviderToFactory(injectableType, options),\n });\n }\n}\n/**\n* Injectable decorator and metadata.\n*\n* @Annotation\n*/\nvar Injectable = makeDecorator('Injectable', undefined, undefined, undefined, function (type, meta) {\n return (preR3InjectableCompile)(type, 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 * Defines a schema that allows an NgModule to contain the following:\n * - Non-Angular elements named with dash case (`-`).\n * - Element properties named with dash case (`-`).\n * Dash case is the naming convention for custom elements.\n *\n *\n */\nvar CUSTOM_ELEMENTS_SCHEMA = {\n name: 'custom-elements'\n};\n/**\n * Defines a schema that allows any property on any element.\n *\n * @experimental\n */\nvar NO_ERRORS_SCHEMA = {\n name: 'no-errors-schema'\n};\nfunction preR3NgModuleCompile(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 * @Annotation\n */\nvar NgModule = makeDecorator('NgModule', function (ngModule) { return ngModule; }, undefined, undefined, \n/**\n * Decorator that marks the following class as an NgModule, and supplies\n * configuration metadata for it.\n *\n * * The `declarations` and `entryComponents` options configure the compiler\n * with information about what belongs to the NgModule.\n * * The `providers` options configures the NgModule's injector to provide\n * dependencies the NgModule members.\n * * The `imports` and `exports` options bring in members from other modules, and make\n * this module's members available to others.\n */\nfunction (type, meta) { return (preR3NgModuleCompile)(type, meta); });\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * Defines template and style encapsulation options available for Component's {@link Component}.\n *\n * See {@link Component#encapsulation encapsulation}.\n *\n * @usageNotes\n * ### Example\n * {@example core/ts/metadata/encapsulation.ts region='longform'}\n */\nvar ViewEncapsulation;\n(function (ViewEncapsulation) {\n /**\n * Emulate `Native` scoping of styles by adding an attribute containing surrogate id to the Host\n * Element and pre-processing the style rules provided via {@link Component#styles styles} or\n * {@link Component#styleUrls styleUrls}, and adding the new Host Element attribute to all\n * selectors.\n *\n * This is the default option.\n */\n ViewEncapsulation[ViewEncapsulation[\"Emulated\"] = 0] = \"Emulated\";\n /**\n * @deprecated v6.1.0 - use {ViewEncapsulation.ShadowDom} instead.\n * Use the native encapsulation mechanism of the renderer.\n *\n * For the DOM this means using the deprecated [Shadow DOM\n * v0](https://w3c.github.io/webcomponents/spec/shadow/) and\n * creating a ShadowRoot for Component's Host Element.\n */\n ViewEncapsulation[ViewEncapsulation[\"Native\"] = 1] = \"Native\";\n /**\n * Don't provide any template or style encapsulation.\n */\n ViewEncapsulation[ViewEncapsulation[\"None\"] = 2] = \"None\";\n /**\n * Use Shadow DOM to encapsulate styles.\n *\n * For the DOM this means using modern [Shadow\n * DOM](https://w3c.github.io/webcomponents/spec/shadow/) and\n * creating a ShadowRoot for Component's Host Element.\n */\n ViewEncapsulation[ViewEncapsulation[\"ShadowDom\"] = 3] = \"ShadowDom\";\n})(ViewEncapsulation || (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}());\nvar VERSION = new Version('6.1.10');\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this 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_DEBUG_CONTEXT = 'ngDebugContext';\nvar ERROR_ORIGINAL_ERROR = 'ngOriginalError';\nvar ERROR_LOGGER = 'ngErrorLogger';\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 * Provides a hook for centralized exception handling.\n *\n * The default implementation of `ErrorHandler` prints error messages to the `console`. To\n * intercept error handling, write a custom exception handler that replaces this default as\n * appropriate for your app.\n *\n * @usageNotes\n * ### Example\n *\n * ```\n * class MyErrorHandler implements ErrorHandler {\n * handleError(error) {\n * // do something with the exception\n * }\n * }\n *\n * @NgModule({\n * providers: [{provide: ErrorHandler, useClass: MyErrorHandler}]\n * })\n * class MyModule {}\n * ```\n */\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 ErrorHandler.prototype._findContext = function (error) {\n if (error) {\n return getDebugContext(error) ? getDebugContext(error) :\n this._findContext(getOriginalError(error));\n }\n return null;\n };\n /** @internal */\n ErrorHandler.prototype._findOriginalError = 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 * @usageNotes\n * ### Example\n *\n * ```typescript\n * class A {\n * constructor(b:B) {}\n * }\n *\n * expect(() => Injector.resolveAndCreate([A])).toThrowError();\n * ```\n */\nfunction noProviderError(injector, key) {\n return injectionError(injector, key, function (keys) {\n 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 * @usageNotes\n * ### Example\n *\n * ```typescript\n * var injector = Injector.resolveAndCreate([\n * {provide: \"one\", useFactory: (two) => \"two\", deps: [[new Inject(\"two\")]]},\n * {provide: \"two\", useFactory: (one) => \"one\", deps: [[new Inject(\"one\")]]}\n * ]);\n *\n * expect(() => injector.get(\"one\")).toThrowError();\n * ```\n *\n * Retrieving `A` or `B` throws a `CyclicDependencyError` as the graph above cannot be constructed.\n */\nfunction cyclicDependencyError(injector, key) {\n return injectionError(injector, key, function (keys) {\n return \"Cannot instantiate cyclic dependency!\" + constructResolvingPath(keys);\n });\n}\n/**\n * Thrown when a constructing type returns with an Error.\n *\n * The `InstantiationError` class contains the original error plus the dependency graph which caused\n * this object to be instantiated.\n *\n * @usageNotes\n * ### Example\n *\n * ```typescript\n * class A {\n * constructor() {\n * throw new Error('message');\n * }\n * }\n *\n * var injector = Injector.resolveAndCreate([A]);\n\n * try {\n * injector.get(A);\n * } catch (e) {\n * expect(e instanceof InstantiationError).toBe(true);\n * expect(e.originalException.message).toEqual(\"message\");\n * expect(e.originalStack).toBeDefined();\n * }\n * ```\n */\nfunction instantiationError(injector, originalException, originalStack, key) {\n return injectionError(injector, key, function (keys) {\n 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 * @usageNotes\n * ### Example\n *\n * ```typescript\n * expect(() => Injector.resolveAndCreate([\"not a type\"])).toThrowError();\n * ```\n */\nfunction invalidProviderError(provider) {\n return Error(\"Invalid provider - only instances of Provider and Type are allowed, got: \" + provider);\n}\n/**\n * Thrown when the class has no annotation information.\n *\n * Lack of annotation information prevents the {@link Injector} from determining which dependencies\n * need to be injected into the constructor.\n *\n * @usageNotes\n * ### Example\n *\n * ```typescript\n * class A {\n * constructor(b) {}\n * }\n *\n * expect(() => Injector.resolveAndCreate([A])).toThrowError();\n * ```\n *\n * This error is also thrown when the class not marked with {@link Injectable} has parameter types.\n *\n * ```typescript\n * class B {}\n *\n * class A {\n * constructor(b:B) {} // no information about the parameter types of A is available at runtime.\n * }\n *\n * expect(() => Injector.resolveAndCreate([A,B])).toThrowError();\n * ```\n *\n */\nfunction noAnnotationError(typeOrFunc, params) {\n 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 * @usageNotes\n * ### Example\n *\n * ```typescript\n * class A {}\n *\n * var injector = Injector.resolveAndCreate([A]);\n *\n * expect(() => injector.getAt(100)).toThrowError();\n * ```\n *\n */\nfunction outOfBoundsError(index) {\n return Error(\"Index \" + index + \" is out-of-bounds.\");\n}\n// TODO: add a working example after alpha38 is released\n/**\n * Thrown when a multi provider and a regular provider are bound to the same token.\n *\n * @usageNotes\n * ### Example\n *\n * ```typescript\n * expect(() => Injector.resolveAndCreate([\n * { provide: \"Strings\", useValue: \"string1\", multi: true},\n * { provide: \"Strings\", useValue: \"string2\", multi: false}\n * ])).toThrowError();\n * ```\n */\nfunction mixingMultiProvidersWithRegularProvidersError(provider1, provider2) {\n return Error(\"Cannot mix multi providers and regular providers, got: \" + provider1 + \" \" + provider2);\n}\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code 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 ReflectiveKey.get = 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: 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 `Provider`.\n * @experimental\n */\nvar ResolvedReflectiveFactory = /** @class */ (function () {\n function ResolvedReflectiveFactory(\n /**\n * Factory function which can return an instance of an object represented by a key.\n */\n factory, \n /**\n * Arguments (dependencies) to the `factory` function.\n */\n dependencies) {\n this.factory = factory;\n this.dependencies = dependencies;\n }\n 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 `Provider` into `ResolvedProvider`.\n *\n * `Injector` internally only uses `ResolvedProvider`, `Provider` contains convenience provider\n * syntax.\n */\nfunction resolveReflectiveProvider(provider) {\n return new ResolvedReflectiveProvider_(ReflectiveKey.get(provider.provide), [resolveReflectiveFactory(provider)], provider.multi || false);\n}\n/**\n * Resolve a list of Providers.\n */\nfunction resolveReflectiveProviders(providers) {\n 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 each key is contained exactly once and\n * multi providers 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 * @usageNotes\n * ### Example\n *\n * The following example creates an `Injector` configured to create `Engine` and `Car`.\n *\n * ```typescript\n * @Injectable()\n * class Engine {\n * }\n *\n * @Injectable()\n * class Car {\n * constructor(public engine:Engine) {}\n * }\n *\n * var injector = ReflectiveInjector.resolveAndCreate([Car, Engine]);\n * var car = injector.get(Car);\n * expect(car instanceof Car).toBe(true);\n * expect(car.engine instanceof Engine).toBe(true);\n * ```\n *\n * Notice, we don't use the `new` operator because we explicitly want to have the `Injector`\n * resolve all of the object's dependencies automatically.\n *\n * @deprecated from v5 - slow and brings in a lot of code, Use `Injector.create` instead.\n */\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 `ResolvedReflectiveProvider`s.\n *\n * @usageNotes\n * ### Example\n *\n * ```typescript\n * @Injectable()\n * class Engine {\n * }\n *\n * @Injectable()\n * class Car {\n * constructor(public engine:Engine) {}\n * }\n *\n * var providers = ReflectiveInjector.resolve([Car, [[Engine]]]);\n *\n * expect(providers.length).toEqual(2);\n *\n * expect(providers[0] instanceof ResolvedReflectiveProvider).toBe(true);\n * expect(providers[0].key.displayName).toBe(\"Car\");\n * expect(providers[0].dependencies.length).toEqual(1);\n * expect(providers[0].factory).toBeDefined();\n *\n * expect(providers[1].key.displayName).toBe(\"Engine\");\n * });\n * ```\n *\n */\n ReflectiveInjector.resolve = 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`, `Provider`,\n * or a recursive array of more providers.\n *\n * @usageNotes\n * ### Example\n *\n * ```typescript\n * @Injectable()\n * class Engine {\n * }\n *\n * @Injectable()\n * class Car {\n * constructor(public engine:Engine) {}\n * }\n *\n * var injector = ReflectiveInjector.resolveAndCreate([Car, Engine]);\n * expect(injector.get(Car) instanceof Car).toBe(true);\n * ```\n */\n ReflectiveInjector.resolveAndCreate = 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 * @usageNotes\n * ### Example\n *\n * ```typescript\n * @Injectable()\n * class Engine {\n * }\n *\n * @Injectable()\n * class Car {\n * constructor(public engine:Engine) {}\n * }\n *\n * var providers = ReflectiveInjector.resolve([Car, Engine]);\n * var injector = ReflectiveInjector.fromResolvedProviders(providers);\n * expect(injector.get(Car) instanceof Car).toBe(true);\n * ```\n * @experimental\n */\n ReflectiveInjector.fromResolvedProviders = 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 ReflectiveInjector_.prototype._new = 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 ReflectiveInjector_.prototype._throwOrNull = 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 ReflectiveInjector_.prototype._getByKeySelf = function (key, notFoundValue) {\n var obj = this._getObjByKeyId(key.id);\n return (obj !== UNDEFINED) ? obj : this._throwOrNull(key, notFoundValue);\n };\n /** @internal */\n ReflectiveInjector_.prototype._getByKeyDefault = 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 a `defType` of `InjectorType<any>`s.\n *\n * @experimental\n */\nfunction createInjector(defType, parent, additionalProviders) {\n if (parent === void 0) { parent = null; }\n if (additionalProviders === void 0) { additionalProviders = null; }\n parent = parent || getNullInjector();\n return new R3Injector(defType, additionalProviders, parent);\n}\nvar R3Injector = /** @class */ (function () {\n function R3Injector(def, additionalProviders, 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 additionalProviders &&\n deepForEach(additionalProviders, function (provider) { return _this.processProvider(provider); });\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 R3Injector.prototype.destroy = 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 R3Injector.prototype.processInjectorType = 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, it might be from exports. Remove it.\n if (def == null) {\n return;\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 R3Injector.prototype.processProvider = 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 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 else {\n var existing = this.records.get(token);\n if (existing && existing.multi !== undefined) {\n throw new Error(\"Mixed multi-provider for \" + stringify(token));\n }\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 if (token instanceof InjectionToken) {\n throw new Error(\"Token \" + stringify(token) + \" is missing an ngInjectableDef definition.\");\n }\n // TODO(alxhub): there should probably be a strict mode which throws here instead of assuming a\n // no-args constructor.\n return makeRecord(function () { return new token(); });\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 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 */\nvar APP_INITIALIZER = new InjectionToken('Application Initializer');\n/**\n * A class that reflects the state of running {@link APP_INITIALIZER}s.\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 ApplicationInitStatus.prototype.runInitializers = 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 = __decorate([\n Injectable(),\n __param(0, Inject(APP_INITIALIZER)), __param(0, Optional()),\n __metadata(\"design:paramtypes\", [Array])\n ], ApplicationInitStatus);\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 Console.prototype.warn = function (message) {\n // tslint:disable-next-line:no-console\n console.warn(message);\n };\n Console = __decorate([\n Injectable()\n ], Console);\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 Compiler.prototype.compileModuleSync = function (moduleType) { throw _throwError(); };\n /**\n * Compiles the given NgModule and all of its components\n */\n Compiler.prototype.compileModuleAsync = function (moduleType) { throw _throwError(); };\n /**\n * Same as {@link #compileModuleSync} but also creates ComponentFactories for all components.\n */\n Compiler.prototype.compileModuleAndAllComponentsSync = function (moduleType) {\n throw _throwError();\n };\n /**\n * Same as {@link #compileModuleAsync} but also creates ComponentFactories for all components.\n */\n Compiler.prototype.compileModuleAndAllComponentsAsync = function (moduleType) {\n throw _throwError();\n };\n /**\n * Clears all caches.\n */\n Compiler.prototype.clearCache = function () { };\n /**\n * Clears the cache for the given component/ngModule.\n */\n Compiler.prototype.clearCacheFor = function (type) { };\n /**\n * Returns the id for a given NgModule, if one is defined and known to the compiler.\n */\n Compiler.prototype.getModuleId = function (moduleType) { return undefined; };\n Compiler = __decorate([\n Injectable()\n ], Compiler);\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 a component created by a `ComponentFactory`.\n * Provides access to the component instance and related objects,\n * and provides the means of destroying the instance.\n *\n */\nvar ComponentRef = /** @class */ (function () {\n function ComponentRef() {\n }\n return ComponentRef;\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';\nvar _NullComponentFactoryResolver = /** @class */ (function () {\n function _NullComponentFactoryResolver() {\n }\n _NullComponentFactoryResolver.prototype.resolveComponentFactory = function (component) {\n throw noComponentFactoryError(component);\n };\n return _NullComponentFactoryResolver;\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 in directives and components to emit custom events synchronously\n * or asynchronously, and register handlers for those events by subscribing\n * to an instance.\n *\n * @usageNotes\n *\n * In the following example, a component defines two output properties\n * that create event emitters. When the title is clicked, the emitter\n * emits an open or close event to toggle the current visibility state.\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 * Access the event object with the `$event` argument passed to the output event\n * handler:\n *\n * ```\n * <zippy (open)=\"onOpen($event)\" (close)=\"onClose($event)\"></zippy>\n * ```\n *\n * ### Notes\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 this class that can\n * deliver events synchronously or asynchronously.\n *\n * @param isAsync When true, deliver events asynchronously.\n *\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 /**\n * Emits an event containing a given value.\n * @param value The value to emit.\n */\n EventEmitter.prototype.emit = function (value) { _super.prototype.next.call(this, value); };\n /**\n * Registers handlers for events emitted by this instance.\n * @param generatorOrNext When supplied, a custom handler for emitted events.\n * @param error When supplied, a custom handler for an error notification\n * from this emitter.\n * @param complete When supplied, a custom handler for a completion\n * notification from this emitter.\n */\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 * @usageNotes\n * ### Example\n *\n * ```\n * import {Component, NgZone} from '@angular/core';\n * import {NgIf} from '@angular/common';\n *\n * @Component({\n * selector: 'ng-zone-demo',\n * template: `\n * <h2>Demo: NgZone</h2>\n *\n * <p>Progress: {{progress}}%</p>\n * <p *ngIf=\"progress >= 100\">Done processing {{label}} of Angular zone!</p>\n *\n * <button (click)=\"processWithinAngularZone()\">Process within Angular zone</button>\n * <button (click)=\"processOutsideOfAngularZone()\">Process outside of Angular zone</button>\n * `,\n * })\n * export class NgZoneDemo {\n * progress: number = 0;\n * label: string;\n *\n * constructor(private _ngZone: NgZone) {}\n *\n * // Loop inside the Angular zone\n * // so the UI DOES refresh after each setTimeout cycle\n * processWithinAngularZone() {\n * this.label = 'inside';\n * this.progress = 0;\n * this._increaseProgress(() => console.log('Inside Done!'));\n * }\n *\n * // Loop outside of the Angular zone\n * // so the UI DOES NOT refresh after each setTimeout cycle\n * processOutsideOfAngularZone() {\n * this.label = 'outside';\n * this.progress = 0;\n * this._ngZone.runOutsideAngular(() => {\n * this._increaseProgress(() => {\n * // reenter the Angular zone and display done\n * this._ngZone.run(() => { console.log('Outside Done!'); });\n * });\n * });\n * }\n *\n * _increaseProgress(doneCallback: () => void) {\n * this.progress += 1;\n * console.log(`Current progress: ${this.progress}%`);\n *\n * if (this.progress < 100) {\n * window.setTimeout(() => this._increaseProgress(doneCallback), 10);\n * } else {\n * doneCallback();\n * }\n * }\n * }\n * ```\n *\n * @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 NgZone.prototype.run = 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 NgZone.prototype.runTask = 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 NgZone.prototype.runGuarded = 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 NgZone.prototype.runOutsideAngular = 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 Testability.prototype.increasePendingRequestCount = 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 Testability.prototype.decreasePendingRequestCount = 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 Testability.prototype.isStable = 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 Testability.prototype.whenStable = 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 Testability.prototype.getPendingRequestCount = 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 Testability.prototype.findProviders = function (using, provider, exactMatch) {\n // TODO(juliemr): implement.\n return [];\n };\n Testability = __decorate([\n Injectable(),\n __metadata(\"design:paramtypes\", [NgZone])\n ], Testability);\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 TestabilityRegistry.prototype.registerApplication = 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 TestabilityRegistry.prototype.unregisterApplication = function (token) { this._applications.delete(token); };\n /**\n * Unregisters all applications\n */\n TestabilityRegistry.prototype.unregisterAllApplications = function () { this._applications.clear(); };\n /**\n * Get a testability hook associated with the application\n * @param elem root element\n */\n TestabilityRegistry.prototype.getTestability = function (elem) { return this._applications.get(elem) || null; };\n /**\n * Get all registered testabilities\n */\n TestabilityRegistry.prototype.getAllTestabilities = function () { return Array.from(this._applications.values()); };\n /**\n * Get all registered applications(root elements)\n */\n TestabilityRegistry.prototype.getAllRootElements = 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 TestabilityRegistry.prototype.findTestabilityInTree = function (elem, findInAncestors) {\n if (findInAncestors === void 0) { findInAncestors = true; }\n return _testabilityGetter.findTestabilityInTree(this, elem, findInAncestors);\n };\n TestabilityRegistry = __decorate([\n Injectable(),\n __metadata(\"design:paramtypes\", [])\n ], TestabilityRegistry);\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 */\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 * @usageNotes\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 = 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 () { return ngZone.onError.subscribe({ next: function (error) { exceptionHandler.handleError(error); } }); });\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 * @usageNotes\n * ### Simple Example\n *\n * ```typescript\n * @NgModule({\n * imports: [BrowserModule]\n * })\n * class MyModule {}\n *\n * let moduleRef = platformBrowser().bootstrapModule(MyModule);\n * ```\n *\n */\n PlatformRef.prototype.bootstrapModule = 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 PlatformRef.prototype.onDestroy = 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: 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 PlatformRef.prototype.destroy = 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 = __decorate([\n Injectable(),\n __metadata(\"design:paramtypes\", [Injector])\n ], PlatformRef);\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 */\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 ApplicationRef_1 = ApplicationRef;\n /**\n * Bootstrap a new component at the root level of the application.\n *\n * @usageNotes\n * ### Bootstrap process\n *\n * When bootstrapping a new root component into an application, Angular mounts the\n * specified application component onto DOM elements identified by the componentType's\n * selector and kicks off automatic change detection to finish initializing the component.\n *\n * Optionally, a component can be mounted onto a DOM element that does not match the\n * componentType's selector.\n *\n * ### Example\n * {@example core/ts/platform/platform.ts region='longform'}\n */\n ApplicationRef.prototype.bootstrap = 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 ApplicationRef.prototype.tick = function () {\n var _this = this;\n if (this._runningTick) {\n throw new Error('ApplicationRef.tick is called recursively');\n }\n var scope = ApplicationRef_1._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 ApplicationRef.prototype.attachView = 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 ApplicationRef.prototype.detachView = 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 ApplicationRef.prototype.ngOnDestroy = 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: function () { return this._views.length; },\n enumerable: true,\n configurable: true\n });\n var ApplicationRef_1;\n /** @internal */\n ApplicationRef._tickScope = wtfCreateScope('ApplicationRef#tick()');\n ApplicationRef = ApplicationRef_1 = __decorate([\n Injectable(),\n __metadata(\"design:paramtypes\", [NgZone, Console, Injector,\n ErrorHandler,\n ComponentFactoryResolver,\n ApplicationInitStatus])\n ], ApplicationRef);\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 * Creates and initializes a custom renderer that implements the `Renderer2` base class.\n *\n * @experimental\n */\nvar RendererFactory2 = /** @class */ (function () {\n function RendererFactory2() {\n }\n return RendererFactory2;\n}());\n/**\n * Flags for renderer-specific style modifiers.\n * @experimental\n */\nvar RendererStyleFlags2;\n(function (RendererStyleFlags2) {\n /**\n * Marks a style as important.\n */\n RendererStyleFlags2[RendererStyleFlags2[\"Important\"] = 1] = \"Important\";\n /**\n * Marks a style as using dash case naming (this-is-dash-case).\n */\n RendererStyleFlags2[RendererStyleFlags2[\"DashCase\"] = 2] = \"DashCase\";\n})(RendererStyleFlags2 || (RendererStyleFlags2 = {}));\n/**\n * Extend this base class to implement custom rendering. By default, Angular\n * renders a template into DOM. You can use custom rendering to intercept\n * rendering calls, or to render to something other than DOM.\n *\n * Create your custom renderer using `RendererFactory2`.\n *\n * Use a custom renderer to bypass Angular's templating and\n * make custom UI changes that can't be expressed declaratively.\n * For example if you need to set a property or an attribute whose name is\n * not statically known, use the `setProperty()` or\n * `setAttribute()` method.\n *\n * @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 * 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 * @usageNotes\n * ### Example\n * ```typescript\n * @Component({...})\n * class Container {\n * @ViewChildren(Item) items:QueryList<Item>;\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 QueryList.prototype.map = 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 QueryList.prototype.filter = 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 QueryList.prototype.find = 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 QueryList.prototype.reduce = 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 QueryList.prototype.forEach = 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 QueryList.prototype.some = 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 QueryList.prototype.setDirty = function () { this.dirty = true; };\n /** internal */\n QueryList.prototype.destroy = 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 = __decorate([\n Injectable(),\n __param(1, Optional()),\n __metadata(\"design:paramtypes\", [Compiler, SystemJsNgModuleLoaderConfig])\n ], SystemJsNgModuleLoader);\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 * To instantiate embedded views based on a template, use the `ViewContainerRef`\n * method `createEmbeddedView()`.\n *\n * Access a `TemplateRef` instance by placing a directive on an `<ng-template>`\n * element (or directive prefixed with `*`). The `TemplateRef` for the embedded view\n * is injected into the constructor of the directive,\n * using the `TemplateRef` token.\n *\n * You can also use a `Query` to find a `TemplateRef` associated with\n * a component or a directive.\n *\n * @see `ViewContainerRef`\n * @see [Navigate the Component Tree with DI](guide/dependency-injection-navtree)\n *\n */\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 to a component.\n *\n * Can contain *host views* (created by instantiating a\n * component with the `createComponent()` method), and *embedded views*\n * (created by instantiating a `TemplateRef` with the `createEmbeddedView()` method).\n *\n * A view container instance can contain other view containers,\n * creating a [view hierarchy](guide/glossary#view-tree).\n *\n * @see `ComponentRef`\n * @see `EmbeddedViewRef`\n *\n */\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 * Base class for Angular Views, provides change detection functionality.\n * A change-detection tree collects all views that are to be checked for changes.\n * Use the methods to add and remove views from the tree, initiate change-detection,\n * and explicitly mark views as _dirty_, meaning that they have changed and need to be rerendered.\n *\n * @usageNotes\n *\n * The following examples demonstrate how to modify default change-detection behavior\n * to perform explicit detection when needed.\n *\n * ### Use `markForCheck()` with `CheckOnce` strategy\n *\n * The following example sets the `OnPush` change-detection strategy for a component\n * (`CheckOnce`, rather than the default `CheckAlways`), then forces a second check\n * after an interval. See [live demo](http://plnkr.co/edit/GC512b?p=preview).\n *\n * <code-example path=\"core/ts/change_detect/change-detection.ts\"\n * region=\"mark-for-check\"></code-example>\n *\n * ### Detach change detector to limit how often check occurs\n *\n * The following example defines a component with a large list of read-only data\n * that is expected to change constantly, many times per second.\n * To improve performance, we want to check and update the list\n * less often than the changes actually occur. To do that, we detach\n * the component's change detector and perform an explicit local check every five seconds.\n *\n * <code-example path=\"core/ts/change_detect/change-detection.ts\" region=\"detach\"></code-example>\n *\n *\n * ### Reattaching a detached component\n *\n * The following example creates a component displaying live data.\n * The component detaches its change detector from the main change detector tree\n * when the `live` property is set to false, and reattaches it when the property\n * becomes true.\n *\n * <code-example path=\"core/ts/change_detect/change-detection.ts\" region=\"reattach\"></code-example>\n *\n */\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 * Represents an Angular [view](guide/glossary#view),\n * specifically the [host view](guide/glossary#view-tree) that is defined by a component.\n * Also serves as the base class\n * that adds destroy methods for [embedded views](guide/glossary#view-tree).\n *\n * @see `EmbeddedViewRef`\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](guide/glossary#view) in a view container.\n * An [embedded view](guide/glossary#view-tree) can be referenced from a component\n * other than the hosting component whose template defines it, or it can be defined\n * independently by a `TemplateRef`.\n *\n * Properties of elements in a view can change, but the structure (number and order) of elements in\n * a view cannot. Change the structure of elements by inserting, moving, or\n * removing nested views in a view container.\n *\n * @see `ViewContainerRef`\n *\n * @usageNotes\n *\n * The following template breaks down into two separate `TemplateRef` instances,\n * an outer one and an inner one.\n *\n * ```\n * Count: {{items.length}}\n * <ul>\n * <li *ngFor=\"let item of items\">{{item}}</li>\n * </ul>\n * ```\n *\n * This is the outer `TemplateRef`:\n *\n * ```\n * Count: {{items.length}}\n * <ul>\n * <ng-template ngFor let-item [ngForOf]=\"items\"></ng-template>\n * </ul>\n * ```\n *\n * This is the inner `TemplateRef`:\n *\n * ```\n * <li>{{item}}</li>\n * ```\n *\n * The outer and inner `TemplateRef` instances are assembled into views as follows:\n *\n * ```\n * <!-- ViewRef: outer-0 -->\n * Count: 2\n * <ul>\n * <ng-template view-container-ref></ng-template>\n * <!-- ViewRef: inner-1 --><li>first</li><!-- /ViewRef: inner-1 -->\n * <!-- ViewRef: inner-2 --><li>second</li><!-- /ViewRef: inner-2 -->\n * </ul>\n * <!-- /ViewRef: outer-0 -->\n * ```\n * @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 _a;\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 };\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}\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 WrappedValue.wrap = 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 WrappedValue.unwrap = function (value) { return WrappedValue.isWrapped(value) ? value.wrapped : value; };\n /** Returns true if `value` is a wrapped value. */\n WrappedValue.isWrapped = 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 SimpleChange.prototype.isFirstChange = 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 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: 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 DefaultIterableDiffer.prototype._reset = 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 DefaultIterableDiffer.prototype._mismatch = 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 DefaultIterableDiffer.prototype._verifyReinsertion = 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 DefaultIterableDiffer.prototype._truncate = 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 DefaultIterableDiffer.prototype._reinsertAfter = 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 DefaultIterableDiffer.prototype._moveAfter = 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 DefaultIterableDiffer.prototype._addAfter = 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 DefaultIterableDiffer.prototype._insertAfter = 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 DefaultIterableDiffer.prototype._remove = function (record) {\n return this._addToRemovals(this._unlink(record));\n };\n /** @internal */\n DefaultIterableDiffer.prototype._unlink = 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 DefaultIterableDiffer.prototype._addToMoves = 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 DefaultIterableDiffer.prototype._addIdentityChange = 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}());\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 _DuplicateItemRecordList.prototype.add = 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 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 _DuplicateItemRecordList.prototype.get = 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 _DuplicateItemRecordList.prototype.remove = 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 _DuplicateMap.prototype.get = 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 _DuplicateMap.prototype.remove = 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 DefaultKeyValueDiffer.prototype.check = 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 DefaultKeyValueDiffer.prototype._insertBeforeOrAppend = 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 DefaultKeyValueDiffer.prototype._reset = 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 DefaultKeyValueDiffer.prototype._maybeAddToChanges = 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 DefaultKeyValueDiffer.prototype._forEach = 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}());\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 * @usageNotes\n * ### Example\n *\n * The following example shows how to extend an existing list of factories,\n * which will only be applied to the injector for this component and its children.\n * This step is all that's required to make a new {@link IterableDiffer} available.\n *\n * ```\n * @Component({\n * viewProviders: [\n * IterableDiffers.extend([new ImmutableListDiffer()])\n * ]\n * })\n * ```\n */\n IterableDiffers.extend = 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 * @usageNotes\n * ### Example\n *\n * The following example shows how to extend an existing list of factories,\n * which will only be applied to the injector for this component and its children.\n * This step is all that's required to make a new {@link KeyValueDiffer} available.\n *\n * ```\n * @Component({\n * viewProviders: [\n * KeyValueDiffers.extend([new ImmutableMapDiffer()])\n * ]\n * })\n * ```\n */\n KeyValueDiffers.extend = 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 [i18n guide](guide/i18n#setting-up-locale) for more information.\n *\n * @usageNotes\n * ### Example\n *\n * ```typescript\n * import { LOCALE_ID } from '@angular/core';\n * import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';\n * import { AppModule } from './app/app.module';\n *\n * platformBrowserDynamic().bootstrapModule(AppModule, {\n * providers: [{provide: LOCALE_ID, useValue: 'en-US' }]\n * });\n * ```\n *\n * @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 [i18n guide](guide/i18n#merge) for more information.\n *\n * @usageNotes\n * ### Example\n *\n * ```typescript\n * import { TRANSLATIONS } from '@angular/core';\n * import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';\n * import { AppModule } from './app/app.module';\n *\n * // content of your translation file\n * const translations = '....';\n *\n * platformBrowserDynamic().bootstrapModule(AppModule, {\n * providers: [{provide: TRANSLATIONS, useValue: translations }]\n * });\n * ```\n *\n * @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 [i18n guide](guide/i18n#merge) for more information.\n *\n * @usageNotes\n * ### Example\n *\n * ```typescript\n * import { TRANSLATIONS_FORMAT } from '@angular/core';\n * import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';\n * import { AppModule } from './app/app.module';\n *\n * platformBrowserDynamic().bootstrapModule(AppModule, {\n * providers: [{provide: TRANSLATIONS_FORMAT, useValue: 'xlf' }]\n * });\n * ```\n *\n * @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 [i18n guide](guide/i18n#missing-translation) for more information.\n *\n * @usageNotes\n * ### Example\n * ```typescript\n * import { MissingTranslationStrategy } from '@angular/core';\n * import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';\n * import { AppModule } from './app/app.module';\n *\n * platformBrowserDynamic().bootstrapModule(AppModule, {\n * missingTranslation: MissingTranslationStrategy.Error\n * });\n * ```\n *\n * @experimental i18n support is experimental.\n */\nvar MissingTranslationStrategy;\n(function (MissingTranslationStrategy) {\n MissingTranslationStrategy[MissingTranslationStrategy[\"Error\"] = 0] = \"Error\";\n MissingTranslationStrategy[MissingTranslationStrategy[\"Warning\"] = 1] = \"Warning\";\n MissingTranslationStrategy[MissingTranslationStrategy[\"Ignore\"] = 2] = \"Ignore\";\n})(MissingTranslationStrategy || (MissingTranslationStrategy = {}));\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this 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 * A built-in [dependency injection token](guide/glossary#di-token)\n * that is used to configure the root injector for bootstrapping.\n */\nvar APPLICATION_MODULE_PROVIDERS = [\n {\n provide: ApplicationRef,\n useClass: ApplicationRef,\n deps: [NgZone, Console, Injector, ErrorHandler, ComponentFactoryResolver, ApplicationInitStatus]\n },\n {\n provide: ApplicationInitStatus,\n useClass: ApplicationInitStatus,\n deps: [[new Optional(), APP_INITIALIZER]]\n },\n { provide: Compiler, useClass: Compiler, deps: [] },\n APP_ID_RANDOM_PROVIDER,\n { provide: IterableDiffers, useFactory: _iterableDiffersFactory, deps: [] },\n { provide: KeyValueDiffers, useFactory: _keyValueDiffersFactory, deps: [] },\n {\n provide: LOCALE_ID,\n useFactory: _localeFactory,\n deps: [[new Inject(LOCALE_ID), new Optional(), new SkipSelf()]]\n },\n];\n/**\n * Configures the root injector for an app with\n * providers of `@angular/core` dependencies that `ApplicationRef` needs\n * to bootstrap components.\n *\n * Re-exported by `BrowserModule`, which is included automatically in the root\n * `AppModule` when you create a new app with the CLI `new` command.\n *\n * @experimental\n */\nvar ApplicationModule = /** @class */ (function () {\n // Inject ApplicationRef to make it eager...\n function ApplicationModule(appRef) {\n }\n ApplicationModule = __decorate([\n NgModule({ providers: APPLICATION_MODULE_PROVIDERS }),\n __metadata(\"design:paramtypes\", [ApplicationRef])\n ], ApplicationModule);\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 * Used to resolve resource URLs on `@Component` when used with JIT compilation.\n *\n * Example:\n * ```\n * @Component({\n * selector: 'my-comp',\n * templateUrl: 'my-comp.html', // This requires asynchronous resolution\n * })\n * class MyComponnent{\n * }\n *\n * // Calling `renderComponent` will fail because `MyComponent`'s `@Compenent.templateUrl`\n * // needs to be resolved because `renderComponent` is synchronous process.\n * // renderComponent(MyComponent);\n *\n * // Calling `resolveComponentResources` will resolve `@Compenent.templateUrl` into\n * // `@Compenent.template`, which would allow `renderComponent` to proceed in synchronous manner.\n * // Use browser's `fetch` function as the default resource resolution strategy.\n * resolveComponentResources(fetch).then(() => {\n * // After resolution all URLs have been converted into strings.\n * renderComponent(MyComponent);\n * });\n *\n * ```\n *\n * NOTE: In AOT the resolution happens during compilation, and so there should be no need\n * to call this method outside JIT mode.\n *\n * @param resourceResolver a function which is responsible to returning a `Promise` of the resolved\n * URL. Browser's `fetch` method is a good default implementation.\n */\nfunction resolveComponentResources(resourceResolver) {\n // Store all promises which are fetching the resources.\n var urlFetches = [];\n // Cache so that we don't fetch the same resource more than once.\n var urlMap = new Map();\n function cachedResourceResolve(url) {\n var promise = urlMap.get(url);\n if (!promise) {\n var resp = resourceResolver(url);\n urlMap.set(url, promise = resp.then(unwrapResponse));\n urlFetches.push(promise);\n }\n return promise;\n }\n componentResourceResolutionQueue.forEach(function (component) {\n if (component.templateUrl) {\n cachedResourceResolve(component.templateUrl).then(function (template) {\n component.template = template;\n component.templateUrl = undefined;\n });\n }\n var styleUrls = component.styleUrls;\n var styles = component.styles || (component.styles = []);\n var styleOffset = component.styles.length;\n styleUrls && styleUrls.forEach(function (styleUrl, index) {\n styles.push(''); // pre-allocate array.\n cachedResourceResolve(styleUrl).then(function (style) {\n styles[styleOffset + index] = style;\n styleUrls.splice(styleUrls.indexOf(styleUrl), 1);\n if (styleUrls.length == 0) {\n component.styleUrls = undefined;\n }\n });\n });\n });\n componentResourceResolutionQueue.clear();\n return Promise.all(urlFetches).then(function () { return null; });\n}\nvar componentResourceResolutionQueue = new Set();\nfunction unwrapResponse(response) {\n return typeof response == 'string' ? response : response.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 */\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 InertBodyHelper.prototype.getInertBodyElement_XHR = 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 InertBodyHelper.prototype.getInertBodyElement_DOMParser = 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 InertBodyHelper.prototype.getInertBodyElement_InertDocument = 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 InertBodyHelper.prototype.stripCustomNsAttrs = 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. \"http\" for \"http\".\n * It also disallows HTML entities in the first path part of a relative path,\n * e.g. \"foo<bar/baz\". Our existing escaping functions should not produce\n * that. More importantly, it disallows masking of a colon,\n * e.g. \"javascript:...\".\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 e_1, _a;\n var res = {};\n try {\n for (var _b = __values(tags.split(',')), _c = _b.next(); !_c.done; _c = _b.next()) {\n var t = _c.value;\n res[t] = true;\n }\n }\n catch (e_1_1) { e_1 = { error: e_1_1 }; }\n finally {\n try {\n if (_c && !_c.done && (_a = _b.return)) _a.call(_b);\n }\n finally { if (e_1) throw e_1.error; }\n }\n return res;\n}\nfunction merge$1() {\n var sets = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n sets[_i] = arguments[_i];\n }\n var e_2, _a;\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}\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, '&')\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, '<')\n .replace(/>/g, '>');\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 * 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(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 /* InitState_Mask */;\n if (initState === priorInitState) {\n view.state = (state & ~1792 /* InitState_Mask */) | newInitState;\n view.initIndex = -1;\n return true;\n }\n return initState === newInitState;\n}\n// Returns true if the lifecycle init method should be called for the node with\n// the given init index.\nfunction shouldCallLifecycleInitHook(view, initState, index) {\n if ((view.state & 1792 /* InitState_Mask */) === initState && view.initIndex <= index) {\n view.initIndex = index + 1;\n return true;\n }\n return false;\n}\n/**\n * 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 _a;\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 });\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 var _a;\n if (!handleEvent) {\n handleEvent = NOOP;\n }\n var _b = splitMatchedQueriesDsl(matchedQueriesDsl), matchedQueries = _b.matchedQueries, references = _b.references, matchedQueryIds = _b.matchedQueryIds;\n var ns = null;\n var name = null;\n if (namespaceAndName) {\n _a = __read(splitNamespace(namespaceAndName), 2), ns = _a[0], name = _a[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}\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 = tokenKey(Injector);\nvar INJECTORRefTokenKey = 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 && provider.value === true) {\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 // Make sure the provider has not been already initialized outside this loop.\n if (providers[i] === undefined) {\n providers[i] = _createProviderInstance(data, provDef);\n }\n }\n }\n}\nfunction resolveNgModuleDep(data, depDef, notFoundValue) {\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:\n case INJECTORRefTokenKey:\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(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(data, data._def.providersByKey[depDef.tokenKey]));\n }\n else if (depDef.flags & 4 /* Self */) {\n return notFoundValue;\n }\n return data._parent.get(depDef.token, notFoundValue);\n }\n finally {\n setCurrentInjector(former);\n }\n}\nfunction moduleTransitivelyPresent(ngModule, scope) {\n return ngModule._def.modules.indexOf(scope) > -1;\n}\nfunction targetsModule(ngModule, def) {\n return def.providedIn != null && (moduleTransitivelyPresent(ngModule, def.providedIn) ||\n def.providedIn === 'root' && ngModule._def.isRoot);\n}\nfunction _createProviderInstance(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 // The read of `ngOnDestroy` here is slightly expensive as it's megamorphic, so it should be\n // avoided if possible. The sequence of checks here determines whether ngOnDestroy needs to be\n // checked. It might not if the `injectable` isn't an object or if NodeFlags.OnDestroy is already\n // set (ngOnDestroy was detected statically).\n if (injectable !== UNDEFINED_VALUE && injectable != null && typeof injectable === 'object' &&\n !(providerDef.flags & 131072 /* OnDestroy */) && typeof injectable.ngOnDestroy === 'function') {\n providerDef.flags |= 131072 /* OnDestroy */;\n }\n return injectable === undefined ? UNDEFINED_VALUE : injectable;\n}\nfunction _createClass(ngModule, ctor, deps) {\n 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 var destroyed = new Set();\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 var onDestroy = instance.ngOnDestroy;\n if (typeof onDestroy === 'function' && !destroyed.has(instance)) {\n onDestroy.apply(instance);\n destroyed.add(instance);\n }\n }\n }\n }\n}\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this 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 ComponentFactory_.prototype.create = 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 /* None */;\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$1 = tokenKey(Injector);\nvar INJECTORRefTokenKey$1 = 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$1(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$1(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$1:\n case INJECTORRefTokenKey$1:\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$1(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 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 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) { return view.def.updateDirectives(checkType === 0 /* CheckAndUpdate */ ? prodCheckAndUpdateNode :\n prodCheckNoChangesNode, view); },\n updateRenderer: function (view, checkType) { return view.def.updateRenderer(checkType === 0 /* CheckAndUpdate */ ? prodCheckAndUpdateNode :\n prodCheckNoChangesNode, view); },\n };\n}\nfunction createDebugServices() {\n return {\n setCurrentNode: debugSetCurrentNode,\n createRootView: debugCreateRootView,\n createEmbeddedView: debugCreateEmbeddedView,\n createComponentView: debugCreateComponentView,\n createNgModuleRef: debugCreateNgModuleRef,\n overrideProvider: debugOverrideProvider,\n overrideComponentView: debugOverrideComponentView,\n clearOverrides: debugClearOverrides,\n checkAndUpdateView: debugCheckAndUpdateView,\n checkNoChangesView: debugCheckNoChangesView,\n destroyView: debugDestroyView,\n createDebugContext: 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 var _a;\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 };\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}\nfunction cloneNgModuleDefinition(def) {\n var providers = Array.from(def.providers);\n var modules = Array.from(def.modules);\n var providersByKey = {};\n for (var key in def.providersByKey) {\n providersByKey[key] = def.providersByKey[key];\n }\n return {\n factory: def.factory,\n isRoot: def.isRoot, providers: providers, modules: modules, providersByKey: providersByKey,\n };\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 // Clone the NgModuleDefinition so that any tree shakeable provider definition\n // added to this instance of the NgModuleRef doesn't affect the cached copy.\n // See https://github.com/angular/angular/issues/25018.\n var def = cloneNgModuleDefinition(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 */\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 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 assertNotDefined(actual, msg) {\n if (actual != null) {\n throwError(msg);\n }\n}\nfunction assertDefined(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 debugger;\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/** Size of LViewData's header. Necessary to adjust for it when setting slots. */\nvar HEADER_OFFSET = 16;\n// Below are constants for LViewData indices to help us look up LViewData members\n// without having to remember the specific indices.\n// Uglify will inline these when minifying so there shouldn't be a cost.\nvar TVIEW = 0;\nvar PARENT = 1;\nvar NEXT = 2;\nvar QUERIES = 3;\nvar FLAGS = 4;\nvar HOST_NODE = 5;\nvar BINDING_INDEX = 6;\nvar DIRECTIVES = 7;\nvar CLEANUP = 8;\nvar CONTEXT = 9;\nvar INJECTOR$1 = 10;\nvar RENDERER = 11;\nvar SANITIZER = 12;\nvar TAIL = 13;\nvar CONTAINER_INDEX = 14;\nvar CONTENT_QUERIES = 15;\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code 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 LViewData[DIRECTIVES]\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, tView) {\n if (tView.firstTemplatePass) {\n var start = flags >> 14 /* DirectiveStartingIndexShift */;\n var count = flags & 4095 /* DirectiveCountMask */;\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[FLAGS] & 16 /* RunInit */) {\n executeHooks(currentView[DIRECTIVES], tView.initHooks, tView.checkHooks, creationMode);\n currentView[FLAGS] &= ~16 /* RunInit */;\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 */\nfunction ngDevModeResetPerfCounters() {\n var newCounters = {\n firstTemplatePass: 0,\n tNode: 0,\n tView: 0,\n rendererCreateTextNode: 0,\n rendererSetText: 0,\n rendererCreateElement: 0,\n rendererAddEventListener: 0,\n rendererSetAttribute: 0,\n rendererRemoveAttribute: 0,\n rendererSetProperty: 0,\n rendererSetClassName: 0,\n rendererAddClass: 0,\n rendererRemoveClass: 0,\n rendererSetStyle: 0,\n rendererRemoveStyle: 0,\n rendererDestroy: 0,\n rendererDestroyNode: 0,\n rendererMoveNode: 0,\n rendererRemoveNode: 0,\n };\n // NOTE: Under Ivy we may have both window & global defined in the Node\n // environment since ensureDocument() in render3.ts sets global.window.\n if (typeof window != 'undefined') {\n // Make sure to refer to ngDevMode as ['ngDevMode'] for closure.\n window['ngDevMode'] = newCounters;\n }\n if (typeof global != 'undefined') {\n // Make sure to refer to ngDevMode as ['ngDevMode'] for closure.\n global['ngDevMode'] = newCounters;\n }\n if (typeof self != 'undefined') {\n // Make sure to refer to ngDevMode as ['ngDevMode'] for closure.\n self['ngDevMode'] = newCounters;\n }\n return newCounters;\n}\n/**\n * This checks to see if the `ngDevMode` has been set. If yes,\n * than we honor it, otherwise we default to dev mode with additional checks.\n *\n * The idea is that unless we are doing production build where we explicitly\n * set `ngDevMode == false` we should be helping the developer by providing\n * as much early warning and errors as possible.\n */\nif (typeof ngDevMode === 'undefined' || ngDevMode) {\n ngDevModeResetPerfCounters();\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 * Below are constants for LContainer indices to help us look up LContainer members\n * without having to remember the specific indices.\n * Uglify will inline these when minifying so there shouldn't be a cost.\n */\nvar ACTIVE_INDEX = 0;\n// PARENT, NEXT, and QUERIES are indices 1, 2, and 3.\n// As we already have these constants in LViewData, we don't need to re-create them.\nvar VIEWS = 4;\nvar RENDER_PARENT = 5;\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this 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\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n// TODO: cleanup once the code is merged in angular/angular\nvar RendererStyleFlags3;\n(function (RendererStyleFlags3) {\n RendererStyleFlags3[RendererStyleFlags3[\"Important\"] = 1] = \"Important\";\n RendererStyleFlags3[RendererStyleFlags3[\"DashCase\"] = 2] = \"DashCase\";\n})(RendererStyleFlags3 || (RendererStyleFlags3 = {}));\n/** Returns whether the `renderer` is a `ProceduralRenderer3` */\nfunction isProceduralRenderer(renderer) {\n return !!(renderer.listen);\n}\nvar domRendererFactory3 = {\n createRenderer: function (hostElement, rendererType) { return document; }\n};\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this 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 assertDefined(node, 'should be called with a node');\n assertEqual(node.tNode.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 assertDefined(node, 'should be called with a node');\n var found = types.some(function (type) { return node.tNode.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\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code 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 * 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/** Retrieves a value from any `LViewData`. */\nfunction loadInternal(index, arr) {\n ngDevMode && assertDataInRangeInternal(index + HEADER_OFFSET, arr);\n return arr[index + HEADER_OFFSET];\n}\nfunction assertDataInRangeInternal(index, arr) {\n assertLessThan(index, arr ? arr.length : 0, 'index expected to be a valid data index');\n}\n/** Retrieves an element value from the provided `viewData`.\n *\n * Elements that are read may be wrapped in a style context,\n * therefore reading the value may involve unwrapping that.\n */\nfunction loadElementInternal(index, arr) {\n var value = loadInternal(index, arr);\n return readElementValue(value);\n}\nfunction readElementValue(value) {\n return (Array.isArray(value) ? value[0] : 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/** Retrieves the sibling node for the given node. */\nfunction getNextLNode(node) {\n // View nodes don't have TNodes, so their next must be retrieved through their LView.\n if (node.tNode.type === 2 /* View */) {\n var viewData = node.data;\n return viewData[NEXT] ? viewData[NEXT][HOST_NODE] : null;\n }\n return node.tNode.next ? node.view[node.tNode.next.index] : null;\n}\n/** Retrieves the first child of a given node */\nfunction getChildLNode(node) {\n if (node.tNode.child) {\n var viewData = node.tNode.type === 2 /* View */ ? node.data : node.view;\n return readElementValue(viewData[node.tNode.child.index]);\n }\n return null;\n}\nfunction getParentLNode(node) {\n if (node.tNode.index === -1 && node.tNode.type === 2 /* View */) {\n // This is a dynamically created view inside a dynamic container.\n // If the host index is -1, the view has not yet been inserted, so it has no parent.\n var containerHostIndex = node.data[CONTAINER_INDEX];\n return containerHostIndex === -1 ? null : node.view[containerHostIndex].dynamicLContainerNode;\n }\n var parent = node.tNode.parent;\n return readElementValue(parent ? node.view[parent.index] : node.view[HOST_NODE]);\n}\n/**\n * Stack used to keep track of projection nodes in walkLNodeTree.\n *\n * This is deliberately created outside of walkLNodeTree to avoid allocating\n * a new array each time the function is called. Instead the array will be\n * re-used by each invocation. This works because the function is not reentrant.\n */\nvar projectionNodeStack = [];\n/**\n * Walks a tree of LNodes, applying a transformation on the LElement nodes, either only on the first\n * one found, or on all of them.\n *\n * @param startingNode the node from which the walk is started.\n * @param rootNode the root node considered. This prevents walking past that node.\n * @param action identifies the action to be performed on the LElement nodes.\n * @param renderer the current renderer.\n * @param renderParentNode Optional the render parent node to be set in all LContainerNodes found,\n * required for action modes Insert and Destroy.\n * @param beforeNode Optional the node before which elements should be added, required for action\n * Insert.\n */\nfunction walkLNodeTree(startingNode, rootNode, action, renderer, renderParentNode, beforeNode) {\n var node = startingNode;\n var projectionNodeIndex = -1;\n while (node) {\n var nextNode = null;\n var parent_1 = renderParentNode ? renderParentNode.native : null;\n var nodeType = node.tNode.type;\n if (nodeType === 3 /* Element */) {\n // Execute the action\n executeNodeAction(action, renderer, parent_1, node.native, beforeNode);\n if (node.dynamicLContainerNode) {\n executeNodeAction(action, renderer, parent_1, node.dynamicLContainerNode.native, beforeNode);\n }\n }\n else if (nodeType === 0 /* Container */) {\n executeNodeAction(action, renderer, parent_1, node.native, beforeNode);\n var lContainerNode = node;\n var childContainerData = lContainerNode.dynamicLContainerNode ?\n lContainerNode.dynamicLContainerNode.data :\n lContainerNode.data;\n if (renderParentNode) {\n childContainerData[RENDER_PARENT] = renderParentNode;\n }\n nextNode =\n childContainerData[VIEWS].length ? getChildLNode(childContainerData[VIEWS][0]) : null;\n if (nextNode) {\n // When the walker enters a container, then the beforeNode has to become the local native\n // comment node.\n beforeNode = lContainerNode.dynamicLContainerNode ?\n lContainerNode.dynamicLContainerNode.native :\n lContainerNode.native;\n }\n }\n else if (nodeType === 1 /* Projection */) {\n var componentHost = findComponentHost(node.view);\n var head = componentHost.tNode.projection[node.tNode.projection];\n projectionNodeStack[++projectionNodeIndex] = node;\n nextNode = head ? componentHost.data[PARENT][head.index] : null;\n }\n else {\n // Otherwise look at the first child\n nextNode = getChildLNode(node);\n }\n if (nextNode === null) {\n nextNode = getNextLNode(node);\n // this last node was projected, we need to get back down to its projection node\n if (nextNode === null && (node.tNode.flags & 8192 /* isProjected */)) {\n nextNode = getNextLNode(projectionNodeStack[projectionNodeIndex--]);\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, then it goes to the next sibling of the parent node...\n * until it reaches rootNode (at which point null is returned).\n */\n while (node && !nextNode) {\n node = getParentLNode(node);\n if (node === null || node === rootNode)\n return null;\n // When exiting a container, the beforeNode must be restored to the previous value\n if (!node.tNode.next && nodeType === 0 /* Container */) {\n beforeNode = node.native;\n }\n nextNode = getNextLNode(node);\n }\n }\n node = nextNode;\n }\n}\n/**\n * Given a current view, finds the nearest component's host (LElement).\n *\n * @param lViewData LViewData for which we want a host element node\n * @returns The host node\n */\nfunction findComponentHost(lViewData) {\n var viewRootLNode = lViewData[HOST_NODE];\n while (viewRootLNode.tNode.type === 2 /* View */) {\n ngDevMode && assertDefined(lViewData[PARENT], 'lViewData.parent');\n lViewData = lViewData[PARENT];\n viewRootLNode = lViewData[HOST_NODE];\n }\n ngDevMode && assertNodeType(viewRootLNode, 3 /* Element */);\n ngDevMode && assertDefined(viewRootLNode.data, 'node.data');\n return viewRootLNode;\n}\n/**\n * NOTE: for performance reasons, the possible actions are inlined within the function instead of\n * being passed as an argument.\n */\nfunction executeNodeAction(action, renderer, parent, node, beforeNode) {\n if (action === 0 /* Insert */) {\n isProceduralRenderer(renderer) ?\n renderer.insertBefore(parent, node, beforeNode) :\n parent.insertBefore(node, beforeNode, true);\n }\n else if (action === 1 /* Detach */) {\n isProceduralRenderer(renderer) ?\n renderer.removeChild(parent, node) :\n parent.removeChild(node);\n }\n else if (action === 2 /* Destroy */) {\n ngDevMode && ngDevMode.rendererDestroyNode++;\n renderer.destroyNode(node);\n }\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[RENDER_PARENT];\n var parent = parentNode ? parentNode.native : null;\n if (parent) {\n var node = getChildLNode(rootNode);\n var renderer = container.view[RENDERER];\n walkLNodeTree(node, rootNode, insertMode ? 0 /* Insert */ : 1 /* Detach */, renderer, parentNode, beforeNode);\n }\n}\n/**\n * Traverses down and up the tree of views and containers to remove listeners and\n * call onDestroy callbacks.\n *\n * Notes:\n * - Because it's used for onDestroy calls, it needs to be bottom-up.\n * - Must process containers instead of their views to avoid splicing\n * when views are destroyed and re-added.\n * - Using a while loop because it's faster than recursion\n * - Destroy only called on movement to sibling or movement to parent (laterally or up)\n *\n * @param rootView The view to destroy\n */\nfunction destroyViewTree(rootView) {\n // If the view has no children, we can clean it up and return early.\n if (rootView[TVIEW].childIndex === -1) {\n return cleanUpView(rootView);\n }\n var viewOrContainer = getLViewChild(rootView);\n while (viewOrContainer) {\n var next = null;\n if (viewOrContainer.length >= HEADER_OFFSET) {\n // If LViewData, traverse down to child.\n var view = viewOrContainer;\n if (view[TVIEW].childIndex > -1)\n next = getLViewChild(view);\n }\n else {\n // If container, traverse down to its first LViewData.\n var container = viewOrContainer;\n if (container[VIEWS].length)\n next = container[VIEWS][0].data;\n }\n if (next == null) {\n // Only clean up view when moving to the side or up, as destroy hooks\n // should be called in order from the bottom up.\n while (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 viewNode The view to insert\n * @param index The index at which to insert the view\n * @returns The inserted view\n */\nfunction insertView(container, viewNode, index) {\n var state = container.data;\n var views = state[VIEWS];\n var lView = viewNode.data;\n if (index > 0) {\n // This is a new view, we need to add it to the children.\n views[index - 1].data[NEXT] = lView;\n }\n if (index < views.length) {\n lView[NEXT] = views[index].data;\n views.splice(index, 0, viewNode);\n }\n else {\n views.push(viewNode);\n lView[NEXT] = null;\n }\n // Dynamically inserted views need a reference to their parent container'S host so it's\n // possible to jump from a view to its container's next when walking the node tree.\n if (viewNode.tNode.index === -1) {\n lView[CONTAINER_INDEX] = container.tNode.parent.index;\n viewNode.view = container.view;\n }\n // Notify query that a new view has been added\n if (lView[QUERIES]) {\n lView[QUERIES].insertView(index);\n }\n // Sets the attached flag\n lView[FLAGS] |= 8 /* Attached */;\n return viewNode;\n}\n/**\n * Detaches 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.\n *\n * @param container The container from which to detach a view\n * @param removeIndex The index of the view to detach\n * @returns The detached view\n */\nfunction detachView(container, removeIndex) {\n var views = container.data[VIEWS];\n var viewNode = views[removeIndex];\n if (removeIndex > 0) {\n views[removeIndex - 1].data[NEXT] = viewNode.data[NEXT];\n }\n views.splice(removeIndex, 1);\n if (!container.tNode.detached) {\n addRemoveViewFromContainer(container, viewNode, false);\n }\n // Notify query that view has been removed\n var removedLView = viewNode.data;\n if (removedLView[QUERIES]) {\n removedLView[QUERIES].removeView();\n }\n removedLView[CONTAINER_INDEX] = -1;\n viewNode.view = null;\n // Unsets the attached flag\n viewNode.data[FLAGS] &= ~8 /* Attached */;\n return viewNode;\n}\n/**\n * Removes a view from a container, i.e. detaches it and then destroys the underlying LView.\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 viewNode = container.data[VIEWS][removeIndex];\n detachView(container, removeIndex);\n destroyLView(viewNode.data);\n return viewNode;\n}\n/** Gets the child of the given LViewData */\nfunction getLViewChild(viewData) {\n if (viewData[TVIEW].childIndex === -1)\n return null;\n var hostNode = viewData[viewData[TVIEW].childIndex];\n return hostNode.data ? hostNode.data : hostNode.dynamicLContainerNode.data;\n}\n/**\n * A standalone function which destroys an LView,\n * conducting cleanup (e.g. removing listeners, calling onDestroys).\n *\n * @param view The view to be destroyed.\n */\nfunction destroyLView(view) {\n var renderer = view[RENDERER];\n if (isProceduralRenderer(renderer) && renderer.destroyNode) {\n walkLNodeTree(view[HOST_NODE], view[HOST_NODE], 2 /* Destroy */, renderer);\n }\n destroyViewTree(view);\n // Sets the destroyed flag\n view[FLAGS] |= 32 /* Destroyed */;\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[HOST_NODE]) && node.tNode.type === 2 /* View */) {\n // if it's an embedded view, the state needs to go up to the container, in case the\n // container has a next\n return getParentLNode(node).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 LViewData to clean up\n */\nfunction cleanUpView(viewOrContainer) {\n if (viewOrContainer[TVIEW]) {\n var view = viewOrContainer;\n removeListeners(view);\n executeOnDestroys(view);\n executePipeOnDestroys(view);\n // For component views only, the local renderer is destroyed as clean up time.\n if (view[TVIEW].id === -1 && isProceduralRenderer(view[RENDERER])) {\n ngDevMode && ngDevMode.rendererDestroy++;\n view[RENDERER].destroy();\n }\n }\n}\n/** Removes listeners and unsubscribes from output subscriptions */\nfunction removeListeners(viewData) {\n var cleanup = viewData[TVIEW].cleanup;\n if (cleanup != null) {\n for (var i = 0; i < cleanup.length - 1; i += 2) {\n if (typeof cleanup[i] === 'string') {\n // This is a listener with the native renderer\n var native = readElementValue(viewData[cleanup[i + 1]]).native;\n var listener = viewData[CLEANUP][cleanup[i + 2]];\n native.removeEventListener(cleanup[i], listener, cleanup[i + 3]);\n i += 2;\n }\n else if (typeof cleanup[i] === 'number') {\n // This is a listener with renderer2 (cleanup fn can be found by index)\n var cleanupFn = viewData[CLEANUP][cleanup[i]];\n cleanupFn();\n }\n else {\n // This is a cleanup function that is grouped with the index of its context\n var context = viewData[CLEANUP][cleanup[i + 1]];\n cleanup[i].call(context);\n }\n }\n viewData[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(viewData) {\n var pipeDestroyHooks = viewData[TVIEW] && viewData[TVIEW].pipeDestroyHooks;\n if (pipeDestroyHooks) {\n callHooks(viewData, pipeDestroyHooks);\n }\n}\n/**\n * Returns whether a native element can be inserted into the given parent.\n *\n * There are two reasons why we may not be able to insert a element immediately.\n * - Projection: When creating a child content element of a component, we have to skip the\n * insertion because the content of a component will be projected.\n * `<component><content>delayed due to projection</content></component>`\n * - Parent container is disconnected: This can happen when we are inserting a view into\n * parent container, which itself is disconnected. For example the parent container is part\n * of a View which has not be inserted or is mare for projection but has not been inserted\n * into destination.\n *\n\n *\n * @param parent The parent where the child will be inserted into.\n * @param currentView Current LView being processed.\n * @return boolean Whether the child should be inserted now (or delayed until later).\n */\nfunction canInsertNativeNode(parent, currentView) {\n // We can only insert into a Component or View. Any other type should be an Error.\n ngDevMode && assertNodeOfPossibleTypes(parent, 3 /* Element */, 2 /* View */);\n if (parent.tNode.type === 3 /* Element */) {\n // Parent is an element.\n if (parent.view !== currentView) {\n // If the Parent view is not the same as current view than we are inserting across\n // Views. This happens when we insert a root element of the component view into\n // the component host element and it should always be eager.\n return true;\n }\n // Parent elements can be a component which may have projection.\n if (parent.data === null) {\n // Parent is a regular non-component element. We should eagerly insert into it\n // since we know that this relationship will never be broken.\n return true;\n }\n else {\n // Parent is a Component. Component's content nodes are not inserted immediately\n // because they will be projected, and so doing insert at this point would be wasteful.\n // Since the projection would than move it to its final destination.\n return false;\n }\n }\n else {\n // Parent is a View.\n ngDevMode && assertNodeType(parent, 2 /* View */);\n // Because we are inserting into a `View` the `View` may be disconnected.\n var grandParentContainer = getParentLNode(parent);\n if (grandParentContainer == null) {\n // The `View` is not inserted into a `Container` we have to delay insertion.\n return false;\n }\n ngDevMode && assertNodeType(grandParentContainer, 0 /* Container */);\n if (grandParentContainer.data[RENDER_PARENT] == null) {\n // The parent `Container` itself is disconnected. So we have to delay.\n return false;\n }\n else {\n // The parent `Container` is in inserted state, so we can eagerly insert into\n // this location.\n return true;\n }\n }\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 var renderer = currentView[RENDERER];\n if (parent.tNode.type === 2 /* View */) {\n var container = getParentLNode(parent);\n var renderParent = container.data[RENDER_PARENT];\n var views = container.data[VIEWS];\n var index = views.indexOf(parent);\n var beforeNode = index + 1 < views.length ? (getChildLNode(views[index + 1])).native : container.native;\n isProceduralRenderer(renderer) ?\n renderer.insertBefore(renderParent.native, child, beforeNode) :\n renderParent.native.insertBefore(child, beforeNode, true);\n }\n else {\n isProceduralRenderer(renderer) ? renderer.appendChild(parent.native, child) :\n parent.native.appendChild(child);\n }\n return true;\n }\n return false;\n}\n/**\n * Removes the `child` element of the `parent` from the DOM.\n *\n * @param parent The parent from which to remove the child\n * @param child The child that should be removed\n * @param currentView The current LView\n * @returns Whether or not the child was removed\n */\nfunction removeChild(parent, child, currentView) {\n if (child !== null && canInsertNativeNode(parent, currentView)) {\n // We only remove the element if not in View or not projected.\n var renderer = currentView[RENDERER];\n isProceduralRenderer(renderer) ? renderer.removeChild(parent.native, child) :\n parent.native.removeChild(child);\n return true;\n }\n return false;\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, renderParent) {\n appendChild(currentParent, node.native, currentView);\n if (node.tNode.type === 0 /* Container */) {\n // The node we are adding is a container and we are adding it to an 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 // Assign the final projection location in those cases.\n var lContainer = node.data;\n lContainer[RENDER_PARENT] = renderParent;\n var views = lContainer[VIEWS];\n for (var i = 0; i < views.length; i++) {\n addRemoveViewFromContainer(node, views[i], true, node.native);\n }\n }\n if (node.dynamicLContainerNode) {\n node.dynamicLContainerNode.data[RENDER_PARENT] = renderParent;\n appendChild(currentParent, node.dynamicLContainerNode.native, currentView);\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] !== ' ')) // no space after\n {\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 && assertDefined(selector[0], 'Selector should have a tag name');\n var mode = 4 /* ELEMENT */;\n var nodeAttrs = tNode.attrs;\n var selectOnlyMarkerIdx = nodeAttrs ? nodeAttrs.indexOf(1 /* SelectOnly */) : -1;\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 = void 0;\n var maybeAttrName = nodeAttrs[attrIndexInNode];\n if (selectOnlyMarkerIdx > -1 && attrIndexInNode > selectOnlyMarkerIdx) {\n nodeAttrValue = '';\n }\n else {\n ngDevMode && assertNotEqual(maybeAttrName, 0 /* NamespaceURI */, 'We do not match directives on namespaced attributes');\n nodeAttrValue = nodeAttrs[attrIndexInNode + 1];\n }\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}\n/**\n * Examines an attributes definition array from a node to find the index of the\n * attribute with the specified name.\n *\n * NOTE: Will not find namespaced attributes.\n *\n * @param name the name of the attribute to find\n * @param attrs the attribute array to examine\n */\nfunction findAttrIndexInNode(name, attrs) {\n if (attrs === null)\n return -1;\n var selectOnlyMode = false;\n var i = 0;\n while (i < attrs.length) {\n var maybeAttrName = attrs[i];\n if (maybeAttrName === name) {\n return i;\n }\n else if (maybeAttrName === 0 /* NamespaceURI */) {\n // NOTE(benlesh): will not find namespaced attributes. This is by design.\n i += 4;\n }\n else {\n if (maybeAttrName === 1 /* SelectOnly */) {\n selectOnlyMode = true;\n }\n i += selectOnlyMode ? 1 : 2;\n }\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/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code 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 clone a copy of a pre-computed template of a styling context.\n *\n * A pre-computed template is designed to be computed once for a given element\n * (instructions.ts has logic for caching this).\n */\nfunction allocStylingContext(lElement, templateStyleContext) {\n // each instance gets a copy\n var context = templateStyleContext.slice();\n context[0 /* ElementPosition */] = lElement;\n return context;\n}\n/**\n * Creates a styling context template where styling information is stored.\n * Any styles that are later referenced using `updateStyleProp` must be\n * passed in within this function. Initial values for those styles are to\n * be declared after all initial style properties are declared (this change in\n * mode between declarations and initial styles is made possible using a special\n * enum value found in `definition.ts`).\n *\n * @param initialStyleDeclarations a list of style declarations and initial style values\n * that are used later within the styling context.\n *\n * -> ['width', 'height', SPECIAL_ENUM_VAL, 'width', '100px']\n * This implies that `width` and `height` will be later styled and that the `width`\n * property has an initial value of `100px`.\n *\n * @param initialClassDeclarations a list of class declarations and initial class values\n * that are used later within the styling context.\n *\n * -> ['foo', 'bar', SPECIAL_ENUM_VAL, 'foo', true]\n * This implies that `foo` and `bar` will be later styled and that the `foo`\n * class will be applied to the element as an initial class since it's true\n */\nfunction createStylingContextTemplate(initialClassDeclarations, initialStyleDeclarations, styleSanitizer) {\n var initialStylingValues = [null];\n var context = [null, styleSanitizer || null, initialStylingValues, 0, 0, null];\n // we use two maps since a class name might collide with a CSS style prop\n var stylesLookup = {};\n var classesLookup = {};\n var totalStyleDeclarations = 0;\n if (initialStyleDeclarations) {\n var hasPassedDeclarations = false;\n for (var i = 0; i < initialStyleDeclarations.length; i++) {\n var v = initialStyleDeclarations[i];\n // this flag value marks where the declarations end the initial values begin\n if (v === 1 /* VALUES_MODE */) {\n hasPassedDeclarations = true;\n }\n else {\n var prop = v;\n if (hasPassedDeclarations) {\n var value = initialStyleDeclarations[++i];\n initialStylingValues.push(value);\n stylesLookup[prop] = initialStylingValues.length - 1;\n }\n else {\n totalStyleDeclarations++;\n stylesLookup[prop] = 0;\n }\n }\n }\n }\n // make where the class offsets begin\n context[4 /* ClassOffsetPosition */] = totalStyleDeclarations;\n if (initialClassDeclarations) {\n var hasPassedDeclarations = false;\n for (var i = 0; i < initialClassDeclarations.length; i++) {\n var v = initialClassDeclarations[i];\n // this flag value marks where the declarations end the initial values begin\n if (v === 1 /* VALUES_MODE */) {\n hasPassedDeclarations = true;\n }\n else {\n var className = v;\n if (hasPassedDeclarations) {\n var value = initialClassDeclarations[++i];\n initialStylingValues.push(value);\n classesLookup[className] = initialStylingValues.length - 1;\n }\n else {\n classesLookup[className] = 0;\n }\n }\n }\n }\n var styleProps = Object.keys(stylesLookup);\n var classNames = Object.keys(classesLookup);\n var classNamesIndexStart = styleProps.length;\n var totalProps = styleProps.length + classNames.length;\n // *2 because we are filling for both single and multi style spaces\n var maxLength = totalProps * 3 /* Size */ * 2 + 6 /* SingleStylesStartPosition */;\n // we need to fill the array from the start so that we can access\n // both the multi and the single array positions in the same loop block\n for (var i = 6 /* SingleStylesStartPosition */; i < maxLength; i++) {\n context.push(null);\n }\n var singleStart = 6 /* SingleStylesStartPosition */;\n var multiStart = totalProps * 3 /* Size */ + 6 /* SingleStylesStartPosition */;\n // fill single and multi-level styles\n for (var i = 0; i < totalProps; i++) {\n var isClassBased_1 = i >= classNamesIndexStart;\n var prop = isClassBased_1 ? classNames[i - classNamesIndexStart] : styleProps[i];\n var indexForInitial = isClassBased_1 ? classesLookup[prop] : stylesLookup[prop];\n var initialValue = initialStylingValues[indexForInitial];\n var indexForMulti = i * 3 /* Size */ + multiStart;\n var indexForSingle = i * 3 /* Size */ + singleStart;\n var initialFlag = prepareInitialFlag(prop, isClassBased_1, styleSanitizer || null);\n setFlag(context, indexForSingle, pointers(initialFlag, indexForInitial, indexForMulti));\n setProp(context, indexForSingle, prop);\n setValue(context, indexForSingle, null);\n var flagForMulti = initialFlag | (initialValue !== null ? 1 /* Dirty */ : 0 /* None */);\n setFlag(context, indexForMulti, pointers(flagForMulti, indexForInitial, indexForSingle));\n setProp(context, indexForMulti, prop);\n setValue(context, indexForMulti, null);\n }\n // there is no initial value flag for the master index since it doesn't\n // reference an initial style value\n setFlag(context, 3 /* MasterFlagPosition */, pointers(0, 0, multiStart));\n setContextDirty(context, initialStylingValues.length > 1);\n return context;\n}\nvar EMPTY_ARR = [];\nvar EMPTY_OBJ = {};\n/**\n * Sets and resolves all `multi` styling on an `StylingContext` so that they can be\n * applied to the element once `renderStyling` is called.\n *\n * All missing styles/class (any values that are not provided in the new `styles`\n * or `classes` params) will resolve to `null` within their respective positions\n * in the context.\n *\n * @param context The styling context that will be updated with the\n * newly provided style values.\n * @param classes The key/value map of CSS class names that will be used for the update.\n * @param styles The key/value map of CSS styles that will be used for the update.\n */\nfunction updateStylingMap(context, classes, styles) {\n var classNames = EMPTY_ARR;\n var applyAllClasses = false;\n var ignoreAllClassUpdates = false;\n // each time a string-based value pops up then it shouldn't require a deep\n // check of what's changed.\n if (typeof classes == 'string') {\n var cachedClassString = context[5 /* CachedCssClassString */];\n if (cachedClassString && cachedClassString === classes) {\n ignoreAllClassUpdates = true;\n }\n else {\n context[5 /* CachedCssClassString */] = classes;\n classNames = classes.split(/\\s+/);\n // this boolean is used to avoid having to create a key/value map of `true` values\n // since a classname string implies that all those classes are added\n applyAllClasses = true;\n }\n }\n else {\n classNames = classes ? Object.keys(classes) : EMPTY_ARR;\n context[5 /* CachedCssClassString */] = null;\n }\n classes = (classes || EMPTY_OBJ);\n var styleProps = styles ? Object.keys(styles) : EMPTY_ARR;\n styles = styles || EMPTY_OBJ;\n var classesStartIndex = styleProps.length;\n var multiStartIndex = getMultiStartIndex(context);\n var dirty = false;\n var ctxIndex = multiStartIndex;\n var propIndex = 0;\n var propLimit = styleProps.length + classNames.length;\n // the main loop here will try and figure out how the shape of the provided\n // styles differ with respect to the context. Later if the context/styles/classes\n // are off-balance then they will be dealt in another loop after this one\n while (ctxIndex < context.length && propIndex < propLimit) {\n var isClassBased_2 = propIndex >= classesStartIndex;\n // when there is a cache-hit for a string-based class then we should\n // avoid doing any work diffing any of the changes\n if (!ignoreAllClassUpdates || !isClassBased_2) {\n var adjustedPropIndex = isClassBased_2 ? propIndex - classesStartIndex : propIndex;\n var newProp = isClassBased_2 ? classNames[adjustedPropIndex] : styleProps[adjustedPropIndex];\n var newValue = isClassBased_2 ? (applyAllClasses ? true : classes[newProp]) : styles[newProp];\n var prop = getProp(context, ctxIndex);\n if (prop === newProp) {\n var value = getValue(context, ctxIndex);\n var flag = getPointers(context, ctxIndex);\n if (hasValueChanged(flag, value, newValue)) {\n setValue(context, ctxIndex, newValue);\n var initialValue = getInitialValue(context, flag);\n // there is no point in setting this to dirty if the previously\n // rendered value was being referenced by the initial style (or null)\n if (initialValue !== newValue) {\n setDirty(context, ctxIndex, true);\n dirty = true;\n }\n }\n }\n else {\n var indexOfEntry = findEntryPositionByProp(context, newProp, ctxIndex);\n if (indexOfEntry > 0) {\n // it was found at a later point ... just swap the values\n var valueToCompare = getValue(context, indexOfEntry);\n var flagToCompare = getPointers(context, indexOfEntry);\n swapMultiContextEntries(context, ctxIndex, indexOfEntry);\n if (valueToCompare !== newValue) {\n var initialValue = getInitialValue(context, flagToCompare);\n setValue(context, ctxIndex, newValue);\n if (initialValue !== newValue) {\n setDirty(context, ctxIndex, true);\n dirty = true;\n }\n }\n }\n else {\n // we only care to do this if the insertion is in the middle\n var newFlag = prepareInitialFlag(newProp, isClassBased_2, getStyleSanitizer(context));\n insertNewMultiProperty(context, ctxIndex, isClassBased_2, newProp, newFlag, newValue);\n dirty = true;\n }\n }\n }\n ctxIndex += 3 /* Size */;\n propIndex++;\n }\n // this means that there are left-over values in the context that\n // were not included in the provided styles/classes and in this\n // case the goal is to \"remove\" them from the context (by nullifying)\n while (ctxIndex < context.length) {\n var flag = getPointers(context, ctxIndex);\n var isClassBased_3 = (flag & 2 /* Class */) === 2 /* Class */;\n if (ignoreAllClassUpdates && isClassBased_3)\n break;\n var value = getValue(context, ctxIndex);\n var doRemoveValue = valueExists(value, isClassBased_3);\n if (doRemoveValue) {\n setDirty(context, ctxIndex, true);\n setValue(context, ctxIndex, null);\n dirty = true;\n }\n ctxIndex += 3 /* Size */;\n }\n // this means that there are left-over properties in the context that\n // were not detected in the context during the loop above. In that\n // case we want to add the new entries into the list\n var sanitizer = getStyleSanitizer(context);\n while (propIndex < propLimit) {\n var isClassBased_4 = propIndex >= classesStartIndex;\n if (ignoreAllClassUpdates && isClassBased_4)\n break;\n var adjustedPropIndex = isClassBased_4 ? propIndex - classesStartIndex : propIndex;\n var prop = isClassBased_4 ? classNames[adjustedPropIndex] : styleProps[adjustedPropIndex];\n var value = isClassBased_4 ? (applyAllClasses ? true : classes[prop]) : styles[prop];\n var flag = prepareInitialFlag(prop, isClassBased_4, sanitizer) | 1 /* Dirty */;\n context.push(flag, prop, value);\n propIndex++;\n dirty = true;\n }\n if (dirty) {\n setContextDirty(context, true);\n }\n}\n/**\n * Sets and resolves a single styling property/value on the provided `StylingContext` so\n * that they can be applied to the element once `renderStyling` is called.\n *\n * Note that prop-level styling values are considered higher priority than any styling that\n * has been applied using `updateStylingMap`, therefore, when styling values are rendered\n * then any styles/classes that have been applied using this function will be considered first\n * (then multi values second and then initial values as a backup).\n *\n * @param context The styling context that will be updated with the\n * newly provided style value.\n * @param index The index of the property which is being updated.\n * @param value The CSS style value that will be assigned\n */\nfunction updateStyleProp(context, index, value) {\n var singleIndex = 6 /* SingleStylesStartPosition */ + index * 3 /* Size */;\n var currValue = getValue(context, singleIndex);\n var currFlag = getPointers(context, singleIndex);\n // didn't change ... nothing to make a note of\n if (hasValueChanged(currFlag, currValue, value)) {\n // the value will always get updated (even if the dirty flag is skipped)\n setValue(context, singleIndex, value);\n var indexForMulti = getMultiOrSingleIndex(currFlag);\n // if the value is the same in the multi-area then there's no point in re-assembling\n var valueForMulti = getValue(context, indexForMulti);\n if (!valueForMulti || valueForMulti !== value) {\n var multiDirty = false;\n var singleDirty = true;\n var isClassBased_5 = (currFlag & 2 /* Class */) === 2 /* Class */;\n // only when the value is set to `null` should the multi-value get flagged\n if (!valueExists(value, isClassBased_5) && valueExists(valueForMulti, isClassBased_5)) {\n multiDirty = true;\n singleDirty = false;\n }\n setDirty(context, indexForMulti, multiDirty);\n setDirty(context, singleIndex, singleDirty);\n setContextDirty(context, true);\n }\n }\n}\n/**\n * This method will toggle the referenced CSS class (by the provided index)\n * within the given context.\n *\n * @param context The styling context that will be updated with the\n * newly provided class value.\n * @param index The index of the CSS class which is being updated.\n * @param addOrRemove Whether or not to add or remove the CSS class\n */\nfunction updateClassProp(context, index, addOrRemove) {\n var adjustedIndex = index + context[4 /* ClassOffsetPosition */];\n updateStyleProp(context, adjustedIndex, addOrRemove);\n}\n/**\n * Renders all queued styling using a renderer onto the given element.\n *\n * This function works by rendering any styles (that have been applied\n * using `updateStylingMap`) and any classes (that have been applied using\n * `updateStyleProp`) onto the provided element using the provided renderer.\n * Just before the styles/classes are rendered a final key/value style map\n * will be assembled (if `styleStore` or `classStore` are provided).\n *\n * @param lElement the element that the styles will be rendered on\n * @param context The styling context that will be used to determine\n * what styles will be rendered\n * @param renderer the renderer that will be used to apply the styling\n * @param styleStore if provided, the updated style values will be applied\n * to this key/value map instead of being renderered via the renderer.\n * @param classStore if provided, the updated class values will be applied\n * to this key/value map instead of being renderered via the renderer.\n */\nfunction renderStyling(context, renderer, styleStore, classStore) {\n if (isContextDirty(context)) {\n var native = context[0 /* ElementPosition */].native;\n var multiStartIndex = getMultiStartIndex(context);\n var styleSanitizer = getStyleSanitizer(context);\n for (var i = 6 /* SingleStylesStartPosition */; i < context.length; i += 3 /* Size */) {\n // there is no point in rendering styles that have not changed on screen\n if (isDirty(context, i)) {\n var prop = getProp(context, i);\n var value = getValue(context, i);\n var flag = getPointers(context, i);\n var isClassBased_6 = flag & 2 /* Class */ ? true : false;\n var isInSingleRegion = i < multiStartIndex;\n var valueToApply = value;\n // VALUE DEFER CASE 1: Use a multi value instead of a null single value\n // this check implies that a single value was removed and we\n // should now defer to a multi value and use that (if set).\n if (isInSingleRegion && !valueExists(valueToApply, isClassBased_6)) {\n // single values ALWAYS have a reference to a multi index\n var multiIndex = getMultiOrSingleIndex(flag);\n valueToApply = getValue(context, multiIndex);\n }\n // VALUE DEFER CASE 2: Use the initial value if all else fails (is falsy)\n // the initial value will always be a string or null,\n // therefore we can safely adopt it incase there's nothing else\n // note that this should always be a falsy check since `false` is used\n // for both class and style comparisons (styles can't be false and false\n // classes are turned off and should therefore defer to their initial values)\n if (!valueExists(valueToApply, isClassBased_6)) {\n valueToApply = getInitialValue(context, flag);\n }\n if (isClassBased_6) {\n setClass(native, prop, valueToApply ? true : false, renderer, classStore);\n }\n else {\n var sanitizer = (flag & 4 /* Sanitize */) ? styleSanitizer : null;\n setStyle(native, prop, valueToApply, renderer, sanitizer, styleStore);\n }\n setDirty(context, i, false);\n }\n }\n setContextDirty(context, false);\n }\n}\n/**\n * This function renders a given CSS prop/value entry using the\n * provided renderer. If a `store` value is provided then\n * that will be used a render context instead of the provided\n * renderer.\n *\n * @param native the DOM Element\n * @param prop the CSS style property that will be rendered\n * @param value the CSS style value that will be rendered\n * @param renderer\n * @param store an optional key/value map that will be used as a context to render styles on\n */\nfunction setStyle(native, prop, value, renderer, sanitizer, store) {\n value = sanitizer && value ? sanitizer(prop, value) : value;\n if (store) {\n store[prop] = value;\n }\n else if (value) {\n ngDevMode && ngDevMode.rendererSetStyle++;\n isProceduralRenderer(renderer) ?\n renderer.setStyle(native, prop, value, RendererStyleFlags3.DashCase) :\n native['style'].setProperty(prop, value);\n }\n else {\n ngDevMode && ngDevMode.rendererRemoveStyle++;\n isProceduralRenderer(renderer) ?\n renderer.removeStyle(native, prop, RendererStyleFlags3.DashCase) :\n native['style'].removeProperty(prop);\n }\n}\n/**\n * This function renders a given CSS class value using the provided\n * renderer (by adding or removing it from the provided element).\n * If a `store` value is provided then that will be used a render\n * context instead of the provided renderer.\n *\n * @param native the DOM Element\n * @param prop the CSS style property that will be rendered\n * @param value the CSS style value that will be rendered\n * @param renderer\n * @param store an optional key/value map that will be used as a context to render styles on\n */\nfunction setClass(native, className, add, renderer, store) {\n if (store) {\n store[className] = add;\n }\n else if (add) {\n ngDevMode && ngDevMode.rendererAddClass++;\n isProceduralRenderer(renderer) ? renderer.addClass(native, className) :\n native['classList'].add(className);\n }\n else {\n ngDevMode && ngDevMode.rendererRemoveClass++;\n isProceduralRenderer(renderer) ? renderer.removeClass(native, className) :\n native['classList'].remove(className);\n }\n}\nfunction setDirty(context, index, isDirtyYes) {\n var adjustedIndex = index >= 6 /* SingleStylesStartPosition */ ? (index + 0 /* FlagsOffset */) : index;\n if (isDirtyYes) {\n context[adjustedIndex] |= 1 /* Dirty */;\n }\n else {\n context[adjustedIndex] &= ~1 /* Dirty */;\n }\n}\nfunction isDirty(context, index) {\n var adjustedIndex = index >= 6 /* SingleStylesStartPosition */ ? (index + 0 /* FlagsOffset */) : index;\n return (context[adjustedIndex] & 1 /* Dirty */) == 1 /* Dirty */;\n}\nfunction isClassBased(context, index) {\n var adjustedIndex = index >= 6 /* SingleStylesStartPosition */ ? (index + 0 /* FlagsOffset */) : index;\n return (context[adjustedIndex] & 2 /* Class */) == 2 /* Class */;\n}\nfunction isSanitizable(context, index) {\n var adjustedIndex = index >= 6 /* SingleStylesStartPosition */ ? (index + 0 /* FlagsOffset */) : index;\n return (context[adjustedIndex] & 4 /* Sanitize */) == 4 /* Sanitize */;\n}\nfunction pointers(configFlag, staticIndex, dynamicIndex) {\n return (configFlag & 7 /* BitMask */) | (staticIndex << 3 /* BitCountSize */) |\n (dynamicIndex << (14 /* BitCountSize */ + 3 /* BitCountSize */));\n}\nfunction getInitialValue(context, flag) {\n var index = getInitialIndex(flag);\n return context[2 /* InitialStylesPosition */][index];\n}\nfunction getInitialIndex(flag) {\n return (flag >> 3 /* BitCountSize */) & 16383 /* BitMask */;\n}\nfunction getMultiOrSingleIndex(flag) {\n var index = (flag >> (14 /* BitCountSize */ + 3 /* BitCountSize */)) & 16383 /* BitMask */;\n return index >= 6 /* SingleStylesStartPosition */ ? index : -1;\n}\nfunction getMultiStartIndex(context) {\n return getMultiOrSingleIndex(context[3 /* MasterFlagPosition */]);\n}\nfunction getStyleSanitizer(context) {\n return context[1 /* StyleSanitizerPosition */];\n}\nfunction setProp(context, index, prop) {\n context[index + 1 /* PropertyOffset */] = prop;\n}\nfunction setValue(context, index, value) {\n context[index + 2 /* ValueOffset */] = value;\n}\nfunction setFlag(context, index, flag) {\n var adjustedIndex = index === 3 /* MasterFlagPosition */ ? index : (index + 0 /* FlagsOffset */);\n context[adjustedIndex] = flag;\n}\nfunction getPointers(context, index) {\n var adjustedIndex = index === 3 /* MasterFlagPosition */ ? index : (index + 0 /* FlagsOffset */);\n return context[adjustedIndex];\n}\nfunction getValue(context, index) {\n return context[index + 2 /* ValueOffset */];\n}\nfunction getProp(context, index) {\n return context[index + 1 /* PropertyOffset */];\n}\nfunction isContextDirty(context) {\n return isDirty(context, 3 /* MasterFlagPosition */);\n}\nfunction setContextDirty(context, isDirtyYes) {\n setDirty(context, 3 /* MasterFlagPosition */, isDirtyYes);\n}\nfunction findEntryPositionByProp(context, prop, startIndex) {\n for (var i = (startIndex || 0) + 1 /* PropertyOffset */; i < context.length; i += 3 /* Size */) {\n var thisProp = context[i];\n if (thisProp == prop) {\n return i - 1 /* PropertyOffset */;\n }\n }\n return -1;\n}\nfunction swapMultiContextEntries(context, indexA, indexB) {\n var tmpValue = getValue(context, indexA);\n var tmpProp = getProp(context, indexA);\n var tmpFlag = getPointers(context, indexA);\n var flagA = tmpFlag;\n var flagB = getPointers(context, indexB);\n var singleIndexA = getMultiOrSingleIndex(flagA);\n if (singleIndexA >= 0) {\n var _flag = getPointers(context, singleIndexA);\n var _initial = getInitialIndex(_flag);\n setFlag(context, singleIndexA, pointers(_flag, _initial, indexB));\n }\n var singleIndexB = getMultiOrSingleIndex(flagB);\n if (singleIndexB >= 0) {\n var _flag = getPointers(context, singleIndexB);\n var _initial = getInitialIndex(_flag);\n setFlag(context, singleIndexB, pointers(_flag, _initial, indexA));\n }\n setValue(context, indexA, getValue(context, indexB));\n setProp(context, indexA, getProp(context, indexB));\n setFlag(context, indexA, getPointers(context, indexB));\n setValue(context, indexB, tmpValue);\n setProp(context, indexB, tmpProp);\n setFlag(context, indexB, tmpFlag);\n}\nfunction updateSinglePointerValues(context, indexStartPosition) {\n for (var i = indexStartPosition; i < context.length; i += 3 /* Size */) {\n var multiFlag = getPointers(context, i);\n var singleIndex = getMultiOrSingleIndex(multiFlag);\n if (singleIndex > 0) {\n var singleFlag = getPointers(context, singleIndex);\n var initialIndexForSingle = getInitialIndex(singleFlag);\n var flagValue = (isDirty(context, singleIndex) ? 1 /* Dirty */ : 0 /* None */) |\n (isClassBased(context, singleIndex) ? 2 /* Class */ : 0 /* None */) |\n (isSanitizable(context, singleIndex) ? 4 /* Sanitize */ : 0 /* None */);\n var updatedFlag = pointers(flagValue, initialIndexForSingle, i);\n setFlag(context, singleIndex, updatedFlag);\n }\n }\n}\nfunction insertNewMultiProperty(context, index, classBased, name, flag, value) {\n var doShift = index < context.length;\n // prop does not exist in the list, add it in\n context.splice(index, 0, flag | 1 /* Dirty */ | (classBased ? 2 /* Class */ : 0 /* None */), name, value);\n if (doShift) {\n // because the value was inserted midway into the array then we\n // need to update all the shifted multi values' single value\n // pointers to point to the newly shifted location\n updateSinglePointerValues(context, index + 3 /* Size */);\n }\n}\nfunction valueExists(value, isClassBased) {\n if (isClassBased) {\n return value ? true : false;\n }\n return value !== null;\n}\nfunction prepareInitialFlag(name, isClassBased, sanitizer) {\n if (isClassBased) {\n return 2 /* Class */;\n }\n else if (sanitizer && sanitizer(name)) {\n return 4 /* Sanitize */;\n }\n return 0 /* None */;\n}\nfunction hasValueChanged(flag, a, b) {\n var isClassBased = flag & 2 /* Class */;\n var hasValues = a && b;\n var usesSanitizer = flag & 4 /* Sanitize */;\n // the toString() comparison ensures that a value is checked\n // ... otherwise (during sanitization bypassing) the === comparsion\n // would fail since a new String() instance is created\n if (!isClassBased && hasValues && usesSanitizer) {\n // we know for sure we're dealing with strings at this point\n return a.toString() !== b.toString();\n }\n // everything else is safe to check with a normal equality check\n return a !== b;\n}\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code 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 *\n * Note: Element is not actually stored at index 0 because of the LViewData\n * header, but the host bindings function expects an index that is NOT adjusted\n * because it will ultimately be fed to instructions like elementProperty.\n */\nvar _ROOT_DIRECTIVE_INDICES = [0, 0];\n/**\n * TView.data needs to fill the same number of slots as the LViewData header\n * so the indices of nodes are consistent between LViewData and TView.data.\n *\n * It's much faster to keep a blueprint of the pre-filled array and slice it\n * than it is to create a new array and fill it each time a TView is created.\n */\nvar HEADER_FILLER = new Array(HEADER_OFFSET).fill(null);\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;\nvar currentElementNode = null;\nfunction getRenderer() {\n // top level variables should not be exported for performance reasons (PERF_NOTES.md)\n return renderer;\n}\nfunction getCurrentSanitizer() {\n return viewData && viewData[SANITIZER];\n}\nfunction getViewData() {\n // top level variables should not be exported for performance reasons (PERF_NOTES.md)\n return viewData;\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 reasons (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;\nvar tView;\nvar currentQueries;\n/**\n * Query instructions can ask for \"current queries\" in 2 different cases:\n * - when creating view queries (at the root of a component view, before any node is created - in\n * this case currentQueries points to view queries)\n * - when creating content queries (inb this previousOrParentNode points to a node on which we\n * create content queries).\n */\nfunction getCurrentQueries(QueryType) {\n // top level variables should not be exported for performance reasons (PERF_NOTES.md)\n return currentQueries ||\n (currentQueries =\n (previousOrParentNode.queries && previousOrParentNode.queries.clone() ||\n 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 reasons (PERF_NOTES.md)\n return creationMode;\n}\n/**\n * State of the current view being processed.\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 viewData;\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;\nfunction getCleanup(view) {\n // top level variables should not be exported for performance reasons (PERF_NOTES.md)\n return view[CLEANUP] || (view[CLEANUP] = []);\n}\nfunction getTViewCleanup(view) {\n return view[TVIEW].cleanup || (view[TVIEW].cleanup = []);\n}\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 = viewData;\n directives = newView && newView[DIRECTIVES];\n tView = newView && newView[TVIEW];\n creationMode = newView && (newView[FLAGS] & 1 /* CreationMode */) === 1 /* CreationMode */;\n firstTemplatePass = newView && tView.firstTemplatePass;\n renderer = newView && newView[RENDERER];\n if (host != null) {\n previousOrParentNode = host;\n isParent = true;\n }\n viewData = 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 *\n * @param newView New state to become active\n * @param creationOnly An optional boolean to indicate that the view was processed in creation mode\n * only, i.e. the first update will be done later. Only possible for dynamically created views.\n */\nfunction leaveView(newView, creationOnly) {\n if (!creationOnly) {\n if (!checkNoChangesMode) {\n executeHooks(directives, tView.viewHooks, tView.viewCheckHooks, creationMode);\n }\n // Views are clean and in update mode after being checked, so these bits are cleared\n viewData[FLAGS] &= ~(1 /* CreationMode */ | 4 /* Dirty */);\n }\n viewData[FLAGS] |= 16 /* RunInit */;\n viewData[BINDING_INDEX] = -1;\n enterView(newView, null);\n}\n/**\n * Refreshes the view, executing the following steps in that order:\n * triggers init hooks, refreshes dynamic embedded views, triggers content hooks, sets host\n * bindings,\n * refreshes child components.\n * Note: view hooks are triggered later when leaving the view.\n */\nfunction refreshView() {\n if (!checkNoChangesMode) {\n executeInitHooks(viewData, tView, creationMode);\n }\n refreshDynamicEmbeddedViews(viewData);\n if (!checkNoChangesMode) {\n executeHooks(directives, tView.contentHooks, tView.contentCheckHooks, creationMode);\n }\n // This needs to be set before children are processed to support recursive components\n tView.firstTemplatePass = firstTemplatePass = false;\n setHostBindings(tView.hostBindings);\n refreshContentQueries(tView);\n refreshChildComponents(tView.components);\n}\n/** Sets the host bindings for the current view. */\nfunction setHostBindings(bindings) {\n if (bindings != null) {\n var defs = 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 content queries for all directives in the given view. */\nfunction refreshContentQueries(tView) {\n if (tView.contentQueries != null) {\n for (var i = 0; i < tView.contentQueries.length; i += 2) {\n var directiveDefIdx = tView.contentQueries[i];\n var directiveDef = tView.directives[directiveDefIdx];\n directiveDef.contentQueriesRefresh(directiveDefIdx, tView.contentQueries[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 executeInitHooks(viewData, tView, creationMode);\n executeHooks(directives, tView.contentHooks, tView.contentCheckHooks, creationMode);\n }\n}\nfunction createLViewData(renderer, tView, context, flags, sanitizer) {\n return [\n tView,\n viewData,\n null,\n null,\n flags | 1 /* CreationMode */ | 8 /* Attached */ | 16 /* RunInit */,\n null,\n -1,\n null,\n null,\n context,\n viewData && viewData[INJECTOR$1],\n renderer,\n sanitizer || null,\n null,\n -1,\n null,\n ];\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 native: native,\n view: currentView,\n nodeInjector: parent ? parent.nodeInjector : null,\n data: state,\n queries: queries,\n tNode: null,\n dynamicLContainerNode: null\n };\n}\nfunction createLNode(index, type, native, name, attrs, state) {\n var parent = isParent ? previousOrParentNode :\n previousOrParentNode && getParentLNode(previousOrParentNode);\n // Parents cannot cross component boundaries because components will be used in multiple places,\n // so it's only set if the view is the same.\n var tParent = parent && parent.view === viewData ? parent.tNode : null;\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, viewData, parent, native, isState ? state : null, queries);\n if (index === -1 || type === 2 /* View */) {\n // View nodes are not stored in data because they can be added / removed at runtime (which\n // would cause indices to change). Their TNodes are instead stored in TView.node.\n node.tNode = (state ? state[TVIEW].node : null) ||\n createTNode(type, index, null, null, tParent, null);\n }\n else {\n var adjustedIndex = index + HEADER_OFFSET;\n // This is an element or container or projection node\n ngDevMode && assertDataNext(adjustedIndex);\n var tData = tView.data;\n viewData[adjustedIndex] = node;\n // Every node adds a value to the static data array to avoid a sparse array\n if (adjustedIndex >= tData.length) {\n var tNode = tData[adjustedIndex] =\n createTNode(type, adjustedIndex, name, attrs, tParent, null);\n if (!isParent && previousOrParentNode) {\n var previousTNode = previousOrParentNode.tNode;\n previousTNode.next = tNode;\n if (previousTNode.dynamicContainerNode)\n previousTNode.dynamicContainerNode.next = tNode;\n }\n }\n node.tNode = tData[adjustedIndex];\n // Now link ourselves into the tree.\n if (isParent) {\n currentQueries = null;\n if (previousOrParentNode.tNode.child == null && previousOrParentNode.view === viewData ||\n previousOrParentNode.tNode.type === 2 /* View */) {\n // We are in the same view, which means we are adding content node to the parent View.\n previousOrParentNode.tNode.child = node.tNode;\n }\n }\n }\n // View nodes and host elements need to set their host node (components set host nodes later)\n if ((type & 2 /* ViewOrElement */) === 2 /* ViewOrElement */ && isState) {\n var lViewData = state;\n ngDevMode && assertNotDefined(lViewData[HOST_NODE], 'lViewData[HOST_NODE] should not have been initialized');\n lViewData[HOST_NODE] = node;\n if (firstTemplatePass)\n lViewData[TVIEW].node = node.tNode;\n }\n previousOrParentNode = node;\n isParent = true;\n return node;\n}\n//////////////////////////\n//// Render\n//////////////////////////\n/**\n * Resets the application state.\n */\nfunction resetApplicationState() {\n isParent = false;\n previousOrParentNode = null;\n}\n/**\n * Used for creating the LViewNode of a dynamic embedded view,\n * either through ViewContainerRef.createEmbeddedView() or TemplateRef.createEmbeddedView().\n * Such lViewNode will then be renderer with renderEmbeddedTemplate() (see below).\n */\nfunction createEmbeddedViewNode(tView, context, renderer, queries) {\n var _isParent = isParent;\n var _previousOrParentNode = previousOrParentNode;\n isParent = true;\n previousOrParentNode = null;\n var lView = createLViewData(renderer, tView, context, 2 /* CheckAlways */, getCurrentSanitizer());\n if (queries) {\n lView[QUERIES] = queries.createView();\n }\n var viewNode = createLNode(-1, 2 /* View */, null, null, null, lView);\n isParent = _isParent;\n previousOrParentNode = _previousOrParentNode;\n return viewNode;\n}\n/**\n * Used for rendering embedded views (e.g. dynamically created views)\n *\n * Dynamically created views must store/retrieve their TViews differently from component views\n * because their template functions are nested in the template functions of their hosts, creating\n * closures. If their host template happens to be an embedded template in a loop (e.g. ngFor inside\n * an ngFor), the nesting would mean we'd have multiple instances of the template function, so we\n * can't store TViews in the template function itself (as we do for comps). Instead, we store the\n * TView for dynamically created views on their host TNode, which only has one instance.\n */\nfunction renderEmbeddedTemplate(viewNode, tView, context, rf) {\n var _isParent = isParent;\n var _previousOrParentNode = previousOrParentNode;\n var oldView;\n if (viewNode.data[PARENT] == null && viewNode.data[CONTEXT] && !tView.template) {\n // This is a root view inside the view tree\n tickRootContext(viewNode.data[CONTEXT]);\n }\n else {\n try {\n isParent = true;\n previousOrParentNode = null;\n oldView = enterView(viewNode.data, viewNode);\n namespaceHTML();\n tView.template(rf, context);\n if (rf & 2 /* Update */) {\n refreshView();\n }\n else {\n viewNode.data[TVIEW].firstTemplatePass = firstTemplatePass = false;\n }\n }\n finally {\n // renderEmbeddedTemplate() is called twice in fact, once for creation only and then once for\n // update. When for creation only, leaveView() must not trigger view hooks, nor clean flags.\n var isCreationOnly = (rf & 1 /* Create */) === 1 /* Create */;\n leaveView(oldView, isCreationOnly);\n isParent = _isParent;\n previousOrParentNode = _previousOrParentNode;\n }\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 namespaceHTML();\n template(getRenderFlags(hostView), componentOrContext);\n refreshView();\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, HEADER_OFFSET);\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//// Namespace\n//////////////////////////\nvar _currentNamespace = null;\nfunction namespaceSVG() {\n _currentNamespace = 'http://www.w3.org/2000/svg/';\n}\nfunction namespaceMathML() {\n _currentNamespace = 'http://www.w3.org/1998/MathML/';\n}\nfunction namespaceHTML() {\n _currentNamespace = null;\n}\n//////////////////////////\n//// Element\n//////////////////////////\n/**\n * Creates an empty element using {@link elementStart} and {@link elementEnd}\n *\n * @param index Index of the element in the data array\n * @param name Name of the DOM Node\n * @param 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 */\nfunction element(index, name, attrs, localRefs) {\n elementStart(index, name, attrs, localRefs);\n elementEnd();\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 LViewData 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(viewData[BINDING_INDEX], -1, 'elements should be created before any bindings');\n ngDevMode && ngDevMode.rendererCreateElement++;\n var native = elementCreate(name);\n ngDevMode && assertDataInRange(index - 1);\n var node = createLNode(index, 3 /* Element */, native, name, attrs || null, null);\n currentElementNode = node;\n if (attrs) {\n setUpAttributes(native, attrs);\n }\n appendChild(getParentLNode(node), native, viewData);\n createDirectivesAndLocals(localRefs);\n return native;\n}\n/**\n * Creates a native element from a tag name, using a renderer.\n * @param name the tag name\n * @param overriddenRenderer Optional A renderer to override the default one\n * @returns the element created\n */\nfunction elementCreate(name, overriddenRenderer) {\n var native;\n var rendererToUse = overriddenRenderer || renderer;\n if (isProceduralRenderer(rendererToUse)) {\n native = rendererToUse.createElement(name, _currentNamespace);\n }\n else {\n if (_currentNamespace === null) {\n native = rendererToUse.createElement(name);\n }\n else {\n native = rendererToUse.createElementNS(_currentNamespace, name);\n }\n }\n return native;\n}\n/**\n * Creates directive instances and populates local refs.\n *\n * @param localRefs Local refs of the current node\n */\nfunction createDirectivesAndLocals(localRefs) {\n var node = previousOrParentNode;\n if (firstTemplatePass) {\n ngDevMode && ngDevMode.firstTemplatePass++;\n cacheMatchingDirectivesForNode(node.tNode, 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 = 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 (tView.components || (tView.components = [])).push(dirIndex, viewData.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 // Must subtract the header offset because hostBindings functions are generated with\n // instructions that expect element indices that are NOT adjusted (e.g. elementProperty).\n ngDevMode &&\n assertEqual(firstTemplatePass, true, 'Should only be called in first template pass.');\n (tView.hostBindings || (tView.hostBindings = [])).push(dirIndex, viewData.length - 1 - HEADER_OFFSET);\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 /* DirectiveCountMask */;\n if (count > 0) {\n var start = tNode.flags >> 14 /* DirectiveStartingIndexShift */;\n var end = start + count;\n var tDirectives = 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 LViewData 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 viewData.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, viewQuery) {\n // TODO(misko): reading `ngPrivateData` here is problematic for two reasons\n // 1. It is a megamorphic call on each invocation.\n // 2. For nested embedded views (ngFor inside ngFor) the template instance is per\n // outer template invocation, which means that no such property will exist\n // Correct solution is to only put `ngPrivateData` on the Component template\n // and not on embedded templates.\n return template.ngPrivateData ||\n (template.ngPrivateData = createTView(-1, template, directives, pipes, viewQuery));\n}\n/**\n * Creates a TView instance\n *\n * @param viewIndex The viewBlockId for inline views, or -1 if it's a component/dynamic\n * @param directives Registry of directives for this view\n * @param pipes Registry of pipes for this view\n */\nfunction createTView(viewIndex, template, directives, pipes, viewQuery) {\n ngDevMode && ngDevMode.tView++;\n return {\n id: viewIndex,\n template: template,\n viewQuery: viewQuery,\n node: null,\n data: HEADER_FILLER.slice(),\n childIndex: -1,\n bindingStartIndex: -1,\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 cleanup: null,\n hostBindings: null,\n contentQueries: null,\n components: null,\n directiveRegistry: typeof directives === 'function' ? directives() : directives,\n pipeRegistry: typeof pipes === 'function' ? pipes() : pipes,\n currentMatches: null\n };\n}\nfunction setUpAttributes(native, attrs) {\n var isProc = isProceduralRenderer(renderer);\n var i = 0;\n while (i < attrs.length) {\n var attrName = attrs[i];\n if (attrName === 1 /* SelectOnly */)\n break;\n if (attrName === NG_PROJECT_AS_ATTR_NAME) {\n i += 2;\n }\n else {\n ngDevMode && ngDevMode.rendererSetAttribute++;\n if (attrName === 0 /* NamespaceURI */) {\n // Namespaced attributes\n var namespaceURI = attrs[i + 1];\n var attrName_1 = attrs[i + 2];\n var attrVal = attrs[i + 3];\n isProc ?\n renderer\n .setAttribute(native, attrName_1, attrVal, namespaceURI) :\n native.setAttributeNS(namespaceURI, attrName_1, attrVal);\n i += 4;\n }\n else {\n // Standard attributes\n var attrVal = attrs[i + 1];\n isProc ?\n renderer\n .setAttribute(native, attrName, attrVal) :\n native.setAttribute(attrName, attrVal);\n i += 2;\n }\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, sanitizer) {\n resetApplicationState();\n var node = createLNode(0, 3 /* Element */, rNode, null, null, createLViewData(renderer, getOrCreateTView(def.template, def.directiveDefs, def.pipeDefs, def.viewQuery), null, def.onPush ? 4 /* Dirty */ : 2 /* CheckAlways */, sanitizer));\n if (firstTemplatePass) {\n node.tNode.flags = 4096 /* isComponent */;\n if (def.diPublic)\n def.diPublic(def);\n 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 ngDevMode && ngDevMode.rendererAddEventListener++;\n // In order to match current behavior, native DOM event listeners must be added for all\n // events (including outputs).\n if (isProceduralRenderer(renderer)) {\n var wrappedListener = wrapListenerWithDirtyLogic(viewData, listenerFn);\n var cleanupFn = renderer.listen(native, eventName, wrappedListener);\n storeCleanupFn(viewData, cleanupFn);\n }\n else {\n var wrappedListener = wrapListenerWithDirtyAndDefault(viewData, listenerFn);\n native.addEventListener(eventName, wrappedListener, useCapture);\n var cleanupInstances = getCleanup(viewData);\n cleanupInstances.push(wrappedListener);\n if (firstTemplatePass) {\n getTViewCleanup(viewData).push(eventName, node.tNode.index, cleanupInstances.length - 1, useCapture);\n }\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 storeCleanupWithContext(viewData, subscription, subscription.unsubscribe);\n }\n}\n/**\n * Saves context for this cleanup function in LView.cleanupInstances.\n *\n * On the first template pass, saves in TView:\n * - Cleanup function\n * - Index of context we just saved in LView.cleanupInstances\n */\nfunction storeCleanupWithContext(view, context, cleanupFn) {\n if (!view)\n view = viewData;\n getCleanup(view).push(context);\n if (view[TVIEW].firstTemplatePass) {\n getTViewCleanup(view).push(cleanupFn, view[CLEANUP].length - 1);\n }\n}\n/**\n * Saves the cleanup function itself in LView.cleanupInstances.\n *\n * This is necessary for functions that are wrapped with their contexts, like in renderer2\n * listeners.\n *\n * On the first template pass, the index of the cleanup function is saved in TView.\n */\nfunction storeCleanupFn(view, cleanupFn) {\n getCleanup(view).push(cleanupFn);\n if (view[TVIEW].firstTemplatePass) {\n getTViewCleanup(view).push(view[CLEANUP].length - 1, null);\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 = getParentLNode(previousOrParentNode);\n }\n ngDevMode && assertNodeType(previousOrParentNode, 3 /* Element */);\n var queries = previousOrParentNode.queries;\n queries && queries.addNode(previousOrParentNode);\n queueLifecycleHooks(previousOrParentNode.tNode.flags, tView);\n currentElementNode = null;\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_1 = loadElement(index);\n if (value == null) {\n ngDevMode && ngDevMode.rendererRemoveAttribute++;\n isProceduralRenderer(renderer) ? renderer.removeAttribute(element_1.native, name) :\n element_1.native.removeAttribute(name);\n }\n else {\n ngDevMode && ngDevMode.rendererSetAttribute++;\n var strValue = sanitizer == null ? stringify$1(value) : sanitizer(value);\n isProceduralRenderer(renderer) ? renderer.setAttribute(element_1.native, name, strValue) :\n element_1.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 = loadElement(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 ngDevMode && ngDevMode.rendererSetProperty++;\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 type The type of the node\n * @param adjustedIndex The index of the TNode in TView.data, adjusted for HEADER_OFFSET\n * @param tagName The tag name of the node\n * @param attrs The attributes defined on this node\n * @param parent The parent of this node\n * @param tViews Any TViews attached to this node\n * @returns the TNode object\n */\nfunction createTNode(type, adjustedIndex, tagName, attrs, parent, tViews) {\n ngDevMode && ngDevMode.tNode++;\n return {\n type: type,\n index: adjustedIndex,\n flags: 0,\n tagName: tagName,\n attrs: attrs,\n localNames: null,\n initialInputs: undefined,\n inputs: undefined,\n outputs: undefined,\n tViews: tViews,\n next: null,\n child: null,\n parent: parent,\n dynamicContainerNode: null,\n detached: null,\n stylingTemplate: null,\n projection: null\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 /* DirectiveCountMask */;\n var propStore = null;\n if (count > 0) {\n var start = tNodeFlags >> 14 /* DirectiveStartingIndexShift */;\n var end = start + count;\n var isInput = direction === 0 /* Input */;\n var defs = 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 elementClassProp(index, stylingIndex, value) {\n updateClassProp(getStylingContext(index), stylingIndex, value ? true : false);\n}\n/**\n * Assign any inline style values to the element during creation mode.\n *\n * This instruction is meant to be called during creation mode to apply all styling\n * (e.g. `style=\"...\"`) values to the element. This is also where the provided index\n * value is allocated for the styling details for its corresponding element (the element\n * index is the previous index value from this one).\n *\n * (Note this function calls `elementStylingApply` immediately when called.)\n *\n *\n * @param index Index value which will be allocated to store styling data for the element.\n * (Note that this is not the element index, but rather an index value allocated\n * specifically for element styling--the index must be the next index after the element\n * index.)\n * @param classDeclarations A key/value array of CSS classes that will be registered on the element.\n * Each individual style will be used on the element as long as it is not overridden\n * by any classes placed on the element by multiple (`[class]`) or singular (`[class.named]`)\n * bindings. If a class binding changes its value to a falsy value then the matching initial\n * class value that are passed in here will be applied to the element (if matched).\n * @param styleDeclarations A key/value array of CSS styles that will be registered on the element.\n * Each individual style will be used on the element as long as it is not overridden\n * by any styles placed on the element by multiple (`[style]`) or singular (`[style.prop]`)\n * bindings. If a style binding changes its value to null then the initial styling\n * values that are passed in here will be applied to the element (if matched).\n * @param styleSanitizer An optional sanitizer function that will be used (if provided)\n * to sanitize the any CSS property values that are applied to the element (during rendering).\n */\nfunction elementStyling(classDeclarations, styleDeclarations, styleSanitizer) {\n var lElement = currentElementNode;\n var tNode = lElement.tNode;\n if (!tNode.stylingTemplate) {\n // initialize the styling template.\n tNode.stylingTemplate =\n createStylingContextTemplate(classDeclarations, styleDeclarations, styleSanitizer);\n }\n if (styleDeclarations && styleDeclarations.length ||\n classDeclarations && classDeclarations.length) {\n elementStylingApply(tNode.index - HEADER_OFFSET);\n }\n}\n/**\n * Retrieve the `StylingContext` at a given index.\n *\n * This method lazily creates the `StylingContext`. This is because in most cases\n * we have styling without any bindings. Creating `StylingContext` eagerly would mean that\n * every style declaration such as `<div style=\"color: red\">` would result `StyleContext`\n * which would create unnecessary memory pressure.\n *\n * @param index Index of the style allocation. See: `elementStyling`.\n */\nfunction getStylingContext(index) {\n var stylingContext = load(index);\n if (!Array.isArray(stylingContext)) {\n var lElement = stylingContext;\n var tNode = lElement.tNode;\n ngDevMode &&\n assertDefined(tNode.stylingTemplate, 'getStylingContext() called before elementStyling()');\n stylingContext = viewData[index + HEADER_OFFSET] =\n allocStylingContext(lElement, tNode.stylingTemplate);\n }\n return stylingContext;\n}\n/**\n * Apply all styling values to the element which have been queued by any styling instructions.\n *\n * This instruction is meant to be run once one or more `elementStyle` and/or `elementStyleProp`\n * have been issued against the element. This function will also determine if any styles have\n * changed and will then skip the operation if there is nothing new to render.\n *\n * Once called then all queued styles will be flushed.\n *\n * @param index Index of the element's styling storage that will be rendered.\n * (Note that this is not the element index, but rather an index value allocated\n * specifically for element styling--the index must be the next index after the element\n * index.)\n */\nfunction elementStylingApply(index) {\n renderStyling(getStylingContext(index), renderer);\n}\n/**\n * Queue a given style to be rendered on an Element.\n *\n * If the style value is `null` then it will be removed from the element\n * (or assigned a different value depending if there are any styles placed\n * on the element with `elementStyle` or any styles that are present\n * from when the element was created (with `elementStyling`).\n *\n * (Note that the styling instruction will not be applied until `elementStylingApply` is called.)\n *\n * @param index Index of the element's styling storage to change in the data array.\n * (Note that this is not the element index, but rather an index value allocated\n * specifically for element styling--the index must be the next index after the element\n * index.)\n * @param styleIndex Index of the style property on this element. (Monotonically increasing.)\n * @param styleName 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 (null to remove).\n * @param suffix Optional suffix. Used with scalar values to add unit such as `px`.\n * Note that when a suffix is provided then the underlying sanitizer will\n * be ignored.\n */\nfunction elementStyleProp(index, styleIndex, value, suffix) {\n var valueToAdd = null;\n if (value) {\n if (suffix) {\n // when a suffix is applied then it will bypass\n // sanitization entirely (b/c a new string is created)\n valueToAdd = stringify$1(value) + suffix;\n }\n else {\n // sanitization happens by dealing with a String value\n // this means that the string value will be passed through\n // into the style rendering later (which is where the value\n // will be sanitized before it is applied)\n valueToAdd = value;\n }\n }\n updateStyleProp(getStylingContext(index), styleIndex, valueToAdd);\n}\n/**\n * Queue a key/value map of styles to be rendered on an Element.\n *\n * This instruction is meant to handle the `[style]=\"exp\"` usage. When styles are applied to\n * the Element they will then be placed with respect to any styles set with `elementStyleProp`.\n * If any styles are set to `null` then they will be removed from the element (unless the same\n * style properties have been assigned to the element during creation using `elementStyling`).\n *\n * (Note that the styling instruction will not be applied until `elementStylingApply` is called.)\n *\n * @param index Index of the element's styling storage to change in the data array.\n * (Note that this is not the element index, but rather an index value allocated\n * specifically for element styling--the index must be the next index after the element\n * index.)\n * @param classes A key/value style map of CSS classes that will be added to the given element.\n * Any missing classes (that have already been applied to the element beforehand) will be\n * removed (unset) from the element's list of CSS classes.\n * @param styles A key/value style map of the styles that will be applied to the given element.\n * Any missing styles (that have already been applied to the element beforehand) will be\n * removed (unset) from the element's styling.\n */\nfunction elementStylingMap(index, classes, styles) {\n updateStylingMap(getStylingContext(index), classes, styles);\n}\n//////////////////////////\n//// Text\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 */\nfunction text(index, value) {\n ngDevMode &&\n assertEqual(viewData[BINDING_INDEX], -1, 'text nodes should be created before bindings');\n ngDevMode && ngDevMode.rendererCreateTextNode++;\n var textNode = createTextNode(value, renderer);\n var node = createLNode(index, 3 /* Element */, textNode, null, null);\n // Text nodes are self closing.\n isParent = false;\n appendChild(getParentLNode(node), textNode, viewData);\n}\n/**\n * Create text node with binding\n * Bindings should be handled externally with the proper interpolation(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 if (value !== NO_CHANGE) {\n ngDevMode && assertDataInRange(index + HEADER_OFFSET);\n var existingNode = loadElement(index);\n ngDevMode && assertDefined(existingNode, 'LNode should exist');\n ngDevMode && assertDefined(existingNode.native, 'native element should exist');\n ngDevMode && ngDevMode.rendererSetText++;\n isProceduralRenderer(renderer) ? renderer.setValue(existingNode.native, stringify$1(value)) :\n existingNode.native.textContent = stringify$1(value);\n }\n}\n//////////////////////////\n//// Directive\n//////////////////////////\n/**\n * Create a directive and their associated content queries.\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(directiveDefIdx, directive, directiveDef) {\n var instance = baseDirectiveCreate(directiveDefIdx, directive, directiveDef);\n ngDevMode && assertDefined(previousOrParentNode.tNode, 'previousOrParentNode.tNode');\n var tNode = previousOrParentNode.tNode;\n var isComponent = directiveDef.template;\n if (isComponent) {\n addComponentLogic(directiveDefIdx, 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(directiveDefIdx, directiveDef.onInit, directiveDef.doCheck, tView);\n if (directiveDef.hostBindings)\n queueHostBindingForCheck(directiveDefIdx);\n }\n if (tNode && tNode.attrs) {\n setInputsFromAttrs(directiveDefIdx, instance, directiveDef.inputs, tNode);\n }\n if (directiveDef.contentQueries) {\n directiveDef.contentQueries();\n }\n return instance;\n}\nfunction addComponentLogic(directiveIndex, instance, def) {\n var tView = getOrCreateTView(def.template, def.directiveDefs, def.pipeDefs, def.viewQuery);\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 componentView = addToViewTree(viewData, previousOrParentNode.tNode.index, createLViewData(rendererFactory.createRenderer(previousOrParentNode.native, def.rendererType), tView, null, def.onPush ? 4 /* Dirty */ : 2 /* CheckAlways */, getCurrentSanitizer()));\n // We need to set the host node/data here because when the component LNode was created,\n // we didn't yet know it was a component (just an element).\n previousOrParentNode.data = componentView;\n componentView[HOST_NODE] = previousOrParentNode;\n initChangeDetectorIfExisting(previousOrParentNode.nodeInjector, instance, componentView);\n if (firstTemplatePass)\n queueComponentIndexForCheck(directiveIndex);\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(viewData[BINDING_INDEX], -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 viewData[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 previousOrParentNode.tNode.flags =\n index << 14 /* 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.tNode.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 var i = 0;\n while (i < attrs.length) {\n var attrName = attrs[i];\n if (attrName === 1 /* SelectOnly */)\n break;\n if (attrName === 0 /* NamespaceURI */) {\n // We do not allow inputs on namespaced attributes.\n i += 4;\n continue;\n }\n var minifiedInputName = inputs[attrName];\n var attrValue = attrs[i + 1];\n if (minifiedInputName !== undefined) {\n var inputsToStore = initialInputData[directiveIndex] || (initialInputData[directiveIndex] = []);\n inputsToStore.push(minifiedInputName, attrValue);\n }\n i += 2;\n }\n return initialInputData;\n}\n//////////////////////////\n//// ViewContainer & View\n//////////////////////////\n/**\n * Creates a LContainer, either from a container instruction, or for a ViewContainerRef.\n *\n * @param parentLNode the LNode in which the container's content will be rendered\n * @param currentView The parent view of the LContainer\n * @param isForViewContainerRef Optional a flag indicating the ViewContainerRef case\n * @returns LContainer\n */\nfunction createLContainer(parentLNode, currentView, isForViewContainerRef) {\n ngDevMode && assertDefined(parentLNode, 'containers should have a parent');\n var renderParent = canInsertNativeNode(parentLNode, currentView) ?\n parentLNode :\n null;\n if (renderParent && renderParent.tNode.type === 2 /* View */) {\n renderParent = getParentLNode(renderParent).data[RENDER_PARENT];\n }\n return [\n isForViewContainerRef ? null : 0,\n currentView,\n null,\n null,\n [],\n renderParent\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 &&\n assertEqual(viewData[BINDING_INDEX], -1, 'container nodes should be created before any bindings');\n var currentParent = isParent ? previousOrParentNode : getParentLNode(previousOrParentNode);\n var lContainer = createLContainer(currentParent, viewData);\n var comment = renderer.createComment(ngDevMode ? 'container' : '');\n var node = createLNode(index, 0 /* Container */, comment, tagName || null, attrs || null, lContainer);\n appendChild(getParentLNode(node), comment, viewData);\n if (firstTemplatePass) {\n node.tNode.tViews = template ?\n createTView(-1, template, tView.directiveRegistry, tView.pipeRegistry, null) :\n [];\n }\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(viewData, index + HEADER_OFFSET, node.data);\n var queries = node.queries;\n if (queries) {\n // prepare place for matching nodes from views inserted into a given container\n lContainer[QUERIES] = queries.container();\n }\n createDirectivesAndLocals(localRefs);\n isParent = false;\n ngDevMode && assertNodeType(previousOrParentNode, 0 /* Container */);\n queries && queries.addNode(node); // check if a given container node matches\n queueLifecycleHooks(node.tNode.flags, tView);\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 previousOrParentNode = loadElement(index);\n ngDevMode && assertNodeType(previousOrParentNode, 0 /* Container */);\n isParent = true;\n previousOrParentNode.data[ACTIVE_INDEX] = 0;\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(viewData, 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 = getParentLNode(previousOrParentNode);\n }\n ngDevMode && assertNodeType(previousOrParentNode, 0 /* Container */);\n var container = previousOrParentNode;\n ngDevMode && assertNodeType(container, 0 /* Container */);\n var nextIndex = container.data[ACTIVE_INDEX];\n // remove extra views at the end of the container\n while (nextIndex < container.data[VIEWS].length) {\n removeView(container, nextIndex);\n }\n}\n/**\n * Goes over dynamic embedded views (ones created through ViewContainerRef APIs) and refreshes them\n * by executing an associated template function.\n */\nfunction refreshDynamicEmbeddedViews(lViewData) {\n for (var current = getLViewChild(lViewData); current !== null; current = current[NEXT]) {\n // Note: current can be an LViewData or an LContainer instance, but here we are only interested\n // in LContainer. We can tell it's an LContainer because its length is less than the LViewData\n // header.\n if (current.length < HEADER_OFFSET && current[ACTIVE_INDEX] === null) {\n var container_1 = current;\n for (var i = 0; i < container_1[VIEWS].length; i++) {\n var lViewNode = container_1[VIEWS][i];\n // The directives and pipes are not needed here as an existing view is only being refreshed.\n var dynamicViewData = lViewNode.data;\n ngDevMode && assertDefined(dynamicViewData[TVIEW], 'TView must be allocated');\n renderEmbeddedTemplate(lViewNode, dynamicViewData[TVIEW], dynamicViewData[CONTEXT], 2 /* Update */);\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[TVIEW].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 greater 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 : getParentLNode(previousOrParentNode));\n ngDevMode && assertNodeType(container, 0 /* Container */);\n var lContainer = container.data;\n var viewNode = scanForView(container, lContainer[ACTIVE_INDEX], 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 = createLViewData(renderer, getOrCreateEmbeddedTView(viewBlockId, container), null, 2 /* CheckAlways */, getCurrentSanitizer());\n if (lContainer[QUERIES]) {\n newView[QUERIES] = lContainer[QUERIES].createView();\n }\n enterView(newView, viewNode = createLNode(viewBlockId, 2 /* View */, null, null, null, newView));\n }\n if (container) {\n if (creationMode) {\n // it is a new view, insert it into collection of views for a given container\n insertView(container, viewNode, lContainer[ACTIVE_INDEX]);\n }\n lContainer[ACTIVE_INDEX]++;\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 block must create or retrieve its own TView. Otherwise, the embedded view's\n * static data for a particular node would overwrite the static data for a node in the view above\n * it with the same index (since it's in the same template).\n *\n * @param viewIndex The index of the TView in TNode.tViews\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 containerTViews = parent.tNode.tViews;\n ngDevMode && assertDefined(containerTViews, 'TView expected');\n ngDevMode && assertEqual(Array.isArray(containerTViews), true, 'TViews should be in an array');\n if (viewIndex >= containerTViews.length || containerTViews[viewIndex] == null) {\n containerTViews[viewIndex] =\n createTView(viewIndex, null, tView.directiveRegistry, tView.pipeRegistry, null);\n }\n return containerTViews[viewIndex];\n}\n/** Marks the end of an embedded view. */\nfunction embeddedViewEnd() {\n refreshView();\n isParent = false;\n previousOrParentNode = viewData[HOST_NODE];\n leaveView(viewData[PARENT]);\n ngDevMode && assertEqual(isParent, false, 'isParent');\n ngDevMode && assertNodeType(previousOrParentNode, 2 /* View */);\n}\n/////////////\n/**\n * Refreshes components by entering the component view and processing its bindings, queries, etc.\n *\n * @param directiveIndex Directive index in LViewData[DIRECTIVES]\n * @param adjustedElementIndex Element index in LViewData[] (adjusted for HEADER_OFFSET)\n */\nfunction componentRefresh(directiveIndex, adjustedElementIndex) {\n ngDevMode && assertDataInRange(adjustedElementIndex);\n var element = viewData[adjustedElementIndex];\n ngDevMode && assertNodeType(element, 3 /* Element */);\n ngDevMode &&\n assertDefined(element.data, \"Component's host node should have an LViewData 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 detectChangesInternal(hostView, element, 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(selectors, textSelectors) {\n var componentNode = findComponentHost(viewData);\n if (!componentNode.tNode.projection) {\n var noOfNodeBuckets = selectors ? selectors.length + 1 : 1;\n var pData = componentNode.tNode.projection =\n new Array(noOfNodeBuckets).fill(null);\n var tails = pData.slice();\n var componentChild = componentNode.tNode.child;\n while (componentChild !== null) {\n var bucketIndex = selectors ? matchingSelectorIndex(componentChild, selectors, textSelectors) : 0;\n var nextNode = componentChild.next;\n if (tails[bucketIndex]) {\n tails[bucketIndex].next = componentChild;\n }\n else {\n pData[bucketIndex] = componentChild;\n componentChild.next = null;\n }\n tails[bucketIndex] = componentChild;\n componentChild = nextNode;\n }\n }\n}\n/**\n * Stack used to keep track of projection nodes in projection() instruction.\n *\n * This is deliberately created outside of projection() to avoid allocating\n * a new array each time the function is called. Instead the array will be\n * re-used by each invocation. This works because the function is not reentrant.\n */\nvar projectionNodeStack$1 = [];\n/**\n * Inserts previously re-distributed projected nodes. This instruction must be preceded by a call\n * to the projectionDef instruction.\n *\n * @param nodeIndex\n * @param selectorIndex:\n * - 0 when the selector is `*` (or unspecified as this is the default value),\n * - 1 based index of the selector from the {@link projectionDef}\n */\nfunction projection(nodeIndex, selectorIndex, attrs) {\n if (selectorIndex === void 0) { selectorIndex = 0; }\n var node = createLNode(nodeIndex, 1 /* Projection */, null, null, attrs || null, null);\n // We can't use viewData[HOST_NODE] because projection nodes can be nested in embedded views.\n if (node.tNode.projection === null)\n node.tNode.projection = selectorIndex;\n // `<ng-content>` has no content\n isParent = false;\n // re-distribution of projectable nodes is stored on a component's view level\n var parent = getParentLNode(node);\n if (canInsertNativeNode(parent, viewData)) {\n var componentNode = findComponentHost(viewData);\n var nodeToProject = componentNode.tNode.projection[selectorIndex];\n var projectedView = componentNode.view;\n var projectionNodeIndex = -1;\n var grandparent = void 0;\n var renderParent = parent.tNode.type === 2 /* View */ ?\n (grandparent = getParentLNode(parent)) &&\n grandparent.data[RENDER_PARENT] :\n parent;\n while (nodeToProject) {\n if (nodeToProject.type === 1 /* Projection */) {\n // This node is re-projected, so we must go up the tree to get its projected nodes.\n var currentComponentHost = findComponentHost(projectedView);\n var firstProjectedNode = currentComponentHost.tNode.projection[nodeToProject.projection];\n if (firstProjectedNode) {\n projectionNodeStack$1[++projectionNodeIndex] = projectedView[nodeToProject.index];\n nodeToProject = firstProjectedNode;\n projectedView = currentComponentHost.view;\n continue;\n }\n }\n else {\n var lNode = projectedView[nodeToProject.index];\n lNode.tNode.flags |= 8192 /* isProjected */;\n appendProjectedNode(lNode, parent, viewData, renderParent);\n }\n // If we are finished with a list of re-projected nodes, we need to get\n // back to the root projection node that was re-projected.\n if (nodeToProject.next === null && projectedView !== componentNode.view) {\n // move down into the view of the component we're projecting right now\n var lNode = projectionNodeStack$1[projectionNodeIndex--];\n nodeToProject = lNode.tNode;\n projectedView = lNode.view;\n }\n nodeToProject = nodeToProject.next;\n }\n }\n}\n/**\n * Adds LViewData or LContainer to the end of the current view tree.\n *\n * This structure will be used to traverse through nested views to remove listeners\n * and call onDestroy callbacks.\n *\n * @param currentView The view where LViewData or LContainer should be added\n * @param adjustedHostIndex Index of the view's host node in LViewData[], adjusted for header\n * @param state The LViewData or LContainer to add to the view tree\n * @returns The state passed in\n */\nfunction addToViewTree(currentView, adjustedHostIndex, state) {\n if (currentView[TAIL]) {\n currentView[TAIL][NEXT] = state;\n }\n else if (firstTemplatePass) {\n tView.childIndex = adjustedHostIndex;\n }\n currentView[TAIL] = state;\n return state;\n}\n///////////////////////////////\n//// Change detection\n///////////////////////////////\n/** If node is an OnPush component, marks its LViewData 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 && assertDefined(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 tickRootContext(rootContext);\n res_1(null);\n rootContext.clean = _CLEAN_PROMISE;\n });\n }\n}\nfunction tickRootContext(rootContext) {\n for (var i = 0; i < rootContext.components.length; i++) {\n var rootComponent = rootContext.components[i];\n var hostNode = _getComponentHostLElementNode(rootComponent);\n ngDevMode && assertDefined(hostNode.data, 'Component host node should be attached to an LView');\n renderComponentOrTemplate(hostNode, getRootView(rootComponent), rootComponent);\n }\n}\n/**\n * Retrieve the root view from any component by walking the parent `LViewData` until\n * reaching the root `LViewData`.\n *\n * @param component any component\n */\nfunction getRootView(component) {\n ngDevMode && assertDefined(component, 'component');\n var lElementNode = _getComponentHostLElementNode(component);\n var lViewData = lElementNode.view;\n while (lViewData[PARENT]) {\n lViewData = lViewData[PARENT];\n }\n return lViewData;\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 &&\n assertDefined(hostNode.data, 'Component host node should be attached to an LViewData instance.');\n detectChangesInternal(hostNode.data, hostNode, 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, component) {\n var oldView = enterView(hostView, hostNode);\n var hostTView = hostView[TVIEW];\n var template = hostTView.template;\n var viewQuery = hostTView.viewQuery;\n try {\n namespaceHTML();\n createViewQuery(viewQuery, hostView[FLAGS], component);\n template(getRenderFlags(hostView), component);\n refreshView();\n updateViewQuery(viewQuery, component);\n }\n finally {\n leaveView(oldView);\n }\n}\nfunction createViewQuery(viewQuery, flags, component) {\n if (viewQuery && (flags & 1 /* CreationMode */)) {\n viewQuery(1 /* Create */, component);\n }\n}\nfunction updateViewQuery(viewQuery, component) {\n if (viewQuery) {\n viewQuery(2 /* Update */, component);\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 && assertDefined(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(viewData[BINDING_INDEX], -1, 'Binding index should not yet be set ' + viewData[BINDING_INDEX]);\n if (tView.bindingStartIndex === -1) {\n tView.bindingStartIndex = viewData.length;\n }\n viewData[BINDING_INDEX] = tView.bindingStartIndex;\n}\n/**\n * Creates a single value binding.\n *\n * @param value Value to diff\n */\nfunction bind(value) {\n return bindingUpdated(value) ? value : NO_CHANGE;\n}\n/**\n * Reserves slots for pure functions (`pureFunctionX` instructions)\n *\n * Bindings for pure functions are stored after the LNodes in the data array but before the binding.\n *\n * ----------------------------------------------------------------------------\n * | LNodes ... | pure function bindings | regular bindings / interpolations |\n * ----------------------------------------------------------------------------\n * ^\n * TView.bindingStartIndex\n *\n * Pure function instructions are given an offset from TView.bindingStartIndex.\n * Subtracting the offset from TView.bindingStartIndex gives the first index where the bindings\n * are stored.\n *\n * NOTE: reserveSlots instructions are only ever allowed at the very end of the creation block\n */\nfunction reserveSlots(numSlots) {\n // Init the slots with a unique `NO_CHANGE` value so that the first change is always detected\n // whether it happens or not during the first change detection pass - pure functions checks\n // might be skipped when short-circuited.\n viewData.length += numSlots;\n viewData.fill(NO_CHANGE, -numSlots);\n // We need to initialize the binding in case a `pureFunctionX` kind of binding instruction is\n // called first in the update section.\n initBindings();\n}\n/**\n * Sets up the binding index before executing any `pureFunctionX` instructions.\n *\n * The index must be restored after the pure function is executed\n *\n * {@link reserveSlots}\n */\nfunction moveBindingIndexToReservedSlot(offset) {\n var currentSlot = viewData[BINDING_INDEX];\n viewData[BINDING_INDEX] = tView.bindingStartIndex - offset;\n return currentSlot;\n}\n/**\n * Restores the binding index to the given value.\n *\n * This function is typically used to restore the index after a `pureFunctionX` has\n * been executed.\n */\nfunction restoreBindingIndex(index) {\n viewData[BINDING_INDEX] = index;\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 binding 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 var adjustedIndex = index + HEADER_OFFSET;\n if (adjustedIndex >= tView.data.length) {\n tView.data[adjustedIndex] = null;\n }\n viewData[adjustedIndex] = value;\n}\n/** Retrieves a value from the `directives` array. */\nfunction loadDirective(index) {\n ngDevMode && assertDefined(directives, 'Directives array should be defined if reading a dir.');\n ngDevMode && assertDataInRange(index, directives);\n return directives[index];\n}\nfunction loadQueryList(queryListIdx) {\n ngDevMode && assertDefined(viewData[CONTENT_QUERIES], 'Content QueryList array should be defined if reading a query.');\n ngDevMode && assertDataInRange(queryListIdx, viewData[CONTENT_QUERIES]);\n return viewData[CONTENT_QUERIES][queryListIdx];\n}\n/** Retrieves a value from current `viewData`. */\nfunction load(index) {\n return loadInternal(index, viewData);\n}\nfunction loadElement(index) {\n return loadElementInternal(index, viewData);\n}\n/** Gets the current binding value and increments the binding index. */\nfunction consumeBinding() {\n ngDevMode && assertDataInRange(viewData[BINDING_INDEX]);\n ngDevMode &&\n assertNotEqual(viewData[viewData[BINDING_INDEX]], NO_CHANGE, 'Stored value should never be NO_CHANGE.');\n return viewData[viewData[BINDING_INDEX]++];\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 (viewData[BINDING_INDEX] === -1)\n initBindings();\n var bindingIndex = viewData[BINDING_INDEX];\n if (bindingIndex >= viewData.length) {\n viewData[viewData[BINDING_INDEX]++] = value;\n }\n else if (isDifferent(viewData[bindingIndex], value)) {\n throwErrorIfNoChangesMode(creationMode, checkNoChangesMode, viewData[bindingIndex], value);\n viewData[viewData[BINDING_INDEX]++] = value;\n }\n else {\n viewData[BINDING_INDEX]++;\n return false;\n }\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 tView;\n}\n/**\n * Registers a QueryList, associated with a content query, for later refresh (part of a view\n * refresh).\n */\nfunction registerContentQuery(queryList) {\n var savedContentQueriesLength = (viewData[CONTENT_QUERIES] || (viewData[CONTENT_QUERIES] = [])).push(queryList);\n if (firstTemplatePass) {\n var currentDirectiveIndex = directives.length - 1;\n var tViewContentQueries = tView.contentQueries || (tView.contentQueries = []);\n var lastSavedDirectiveIndex = tView.contentQueries.length ? tView.contentQueries[tView.contentQueries.length - 2] : -1;\n if (currentDirectiveIndex !== lastSavedDirectiveIndex) {\n tViewContentQueries.push(currentDirectiveIndex, savedContentQueriesLength - 1);\n }\n }\n}\nfunction assertPreviousIsParent() {\n assertEqual(isParent, true, 'previousOrParentNode should be a parent');\n}\nfunction assertHasParent() {\n assertDefined(getParentLNode(previousOrParentNode), 'previousOrParentNode should have a parent');\n}\nfunction assertDataInRange(index, arr) {\n if (arr == null)\n arr = viewData;\n assertDataInRangeInternal(index, arr || viewData);\n}\nfunction assertDataNext(index, arr) {\n if (arr == null)\n arr = viewData;\n assertEqual(arr.length, index, \"index \" + index + \" expected to be at the end of arr (length \" + arr.length + \")\");\n}\n/**\n * On the first template pass, the reserved slots should be set `NO_CHANGE`.\n *\n * If not, they might not have been actually reserved.\n */\nfunction assertReservedSlotInitialized(slotOffset, numSlots) {\n if (firstTemplatePass) {\n var startIndex = tView.bindingStartIndex - slotOffset;\n for (var i = 0; i < numSlots; i++) {\n assertEqual(viewData[startIndex + i], NO_CHANGE, 'The reserved slots should be set to `NO_CHANGE` on first template pass');\n }\n }\n}\nfunction _getComponentHostLElementNode(component) {\n ngDevMode && assertDefined(component, 'expecting component got null');\n var lElementNode = component[NG_HOST_SYMBOL];\n ngDevMode && assertDefined(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 */\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 sanitizer = opts.sanitizer || null;\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 = createRootContext(opts.scheduler || requestAnimationFrame.bind(window));\n var rootView = createLViewData(rendererFactory.createRenderer(hostNode, componentDef.rendererType), createTView(-1, null, null, null, null), rootContext, componentDef.onPush ? 4 /* Dirty */ : 2 /* CheckAlways */);\n rootView[INJECTOR$1] = 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, sanitizer);\n // Create directive instance with factory() and store at index 0 in directives array\n rootContext.components.push(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, component);\n }\n finally {\n leaveView(oldView);\n if (rendererFactory.end)\n rendererFactory.end();\n }\n return component;\n}\nfunction createRootContext(scheduler) {\n return {\n components: [],\n scheduler: scheduler,\n clean: CLEAN_PROMISE,\n };\n}\n/**\n * Used to enable lifecycle hooks on the root component.\n *\n * Include this feature when calling `renderComponent` if the root component\n * you are rendering has lifecycle hooks defined. Otherwise, the hooks won't\n * be called properly.\n *\n * Example:\n *\n * ```\n * renderComponent(AppComponent, {features: [RootLifecycleHooks]});\n * ```\n */\nfunction LifecycleHooksFeature(component, def) {\n var elementNode = _getComponentHostLElementNode(component);\n // Root component is always created at dir index 0\n var tView = elementNode.view[TVIEW];\n queueInitHooks(0, def.onInit, def.doCheck, tView);\n queueLifecycleHooks(elementNode.tNode.flags, tView);\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 && assertDefined(rootContext, 'rootContext');\n return rootContext;\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 * 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 declaredInputs = {};\n var def = {\n type: type,\n diPublic: null,\n factory: componentDefinition.factory,\n template: componentDefinition.template || null,\n hostBindings: componentDefinition.hostBindings || null,\n contentQueries: componentDefinition.contentQueries || null,\n contentQueriesRefresh: componentDefinition.contentQueriesRefresh || null,\n attributes: componentDefinition.attributes || null,\n inputs: invertObject(componentDefinition.inputs, declaredInputs),\n declaredInputs: declaredInputs,\n outputs: invertObject(componentDefinition.outputs),\n rendererType: resolveRendererType2(componentDefinition.rendererType) || null,\n exportAs: componentDefinition.exportAs || null,\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 () { return (typeof directiveTypes === 'function' ? directiveTypes() : directiveTypes)\n .map(extractDirectiveDef); } :\n null,\n pipeDefs: pipeTypes ?\n function () { return (typeof pipeTypes === 'function' ? pipeTypes() : pipeTypes).map(extractPipeDef); } :\n null,\n selectors: componentDefinition.selectors,\n viewQuery: componentDefinition.viewQuery || null,\n features: componentDefinition.features || null,\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}\nfunction defineNgModule(def) {\n var res = {\n type: def.type,\n bootstrap: def.bootstrap || [],\n declarations: def.declarations || [],\n imports: def.imports || [],\n exports: def.exports || [],\n transitiveCompileScopes: null,\n };\n return res;\n}\nvar EMPTY$1 = {};\n/**\n * Inverts an inputs or outputs lookup such that the keys, which were the\n * minified keys, are part of the values, and the values are parsed so that\n * the publicName of the property is the new key\n *\n * e.g. for\n *\n * ```\n * class Comp {\n * @Input()\n * propName1: string;\n *\n * @Input('publicName')\n * propName2: number;\n * }\n * ```\n *\n * will be serialized as\n *\n * ```\n * {\n * a0: 'propName1',\n * b1: ['publicName', 'propName2'],\n * }\n * ```\n *\n * becomes\n *\n * ```\n * {\n * 'propName1': 'a0',\n * 'publicName': 'b1'\n * }\n * ```\n *\n * Optionally the function can take `secondary` which will result in:\n *\n * ```\n * {\n * 'propName1': 'a0',\n * 'propName2': 'b1'\n * }\n * ```\n *\n\n */\nfunction invertObject(obj, secondary) {\n if (obj == null)\n return EMPTY$1;\n var newLookup = {};\n for (var minifiedKey in obj) {\n if (obj.hasOwnProperty(minifiedKey)) {\n var publicName = obj[minifiedKey];\n var declaredName = publicName;\n if (Array.isArray(publicName)) {\n declaredName = publicName[1];\n publicName = publicName[0];\n }\n newLookup[publicName] = minifiedKey;\n if (secondary) {\n (secondary[declaredName] = minifiedKey);\n }\n }\n }\n return newLookup;\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 factory: 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 * Sets properties on a target object from a source object, but only if\n * the property doesn't already exist on the target object.\n * @param target The target to set properties on\n * @param source The source of the property keys and values to set\n */\nfunction fillProperties(target, source) {\n for (var key in source) {\n if (source.hasOwnProperty(key) && !target.hasOwnProperty(key)) {\n target[key] = source[key];\n }\n }\n}\n/**\n * Determines if a definition is a {@link ComponentDefInternal} or a {@link DirectiveDefInternal}\n * @param definition The definition to examine\n */\nfunction isComponentDef(definition) {\n var def = definition;\n return typeof def.template === 'function';\n}\nfunction getSuperType(type) {\n return Object.getPrototypeOf(type.prototype).constructor;\n}\n/**\n * Merges the definition from a super class to a sub class.\n * @param definition The definition that is a SubClass of another directive of component\n */\nfunction InheritDefinitionFeature(definition) {\n var superType = getSuperType(definition.type);\n var superDef = undefined;\n var _loop_1 = function () {\n var e_1, _a;\n if (isComponentDef(definition)) {\n superDef = superType.ngComponentDef || superType.ngDirectiveDef;\n }\n else {\n if (superType.ngComponentDef) {\n throw new Error('Directives cannot inherit Components');\n }\n superDef = superType.ngDirectiveDef;\n }\n if (superDef) {\n // Merge inputs and outputs\n fillProperties(definition.inputs, superDef.inputs);\n fillProperties(definition.declaredInputs, superDef.declaredInputs);\n fillProperties(definition.outputs, superDef.outputs);\n // Merge hostBindings\n var prevHostBindings_1 = definition.hostBindings;\n var superHostBindings_1 = superDef.hostBindings;\n if (superHostBindings_1) {\n if (prevHostBindings_1) {\n definition.hostBindings = function (directiveIndex, elementIndex) {\n superHostBindings_1(directiveIndex, elementIndex);\n prevHostBindings_1(directiveIndex, elementIndex);\n };\n }\n else {\n definition.hostBindings = superHostBindings_1;\n }\n }\n // Inherit hooks\n // Assume super class inheritance feature has already run.\n definition.afterContentChecked =\n definition.afterContentChecked || superDef.afterContentChecked;\n definition.afterContentInit = definition.afterContentInit || superDef.afterContentInit;\n definition.afterViewChecked = definition.afterViewChecked || superDef.afterViewChecked;\n definition.afterViewInit = definition.afterViewInit || superDef.afterViewInit;\n definition.doCheck = definition.doCheck || superDef.doCheck;\n definition.onDestroy = definition.onDestroy || superDef.onDestroy;\n definition.onInit = definition.onInit || superDef.onInit;\n // Run parent features\n var features = superDef.features;\n if (features) {\n try {\n for (var features_1 = __values(features), features_1_1 = features_1.next(); !features_1_1.done; features_1_1 = features_1.next()) {\n var feature = features_1_1.value;\n if (feature && feature !== InheritDefinitionFeature) {\n feature(definition);\n }\n }\n }\n catch (e_1_1) { e_1 = { error: e_1_1 }; }\n finally {\n try {\n if (features_1_1 && !features_1_1.done && (_a = features_1.return)) _a.call(features_1);\n }\n finally { if (e_1) throw e_1.error; }\n }\n }\n }\n else {\n // Even if we don't have a definition, check the type for the hooks and use those if need be\n var superPrototype = superType.prototype;\n if (superPrototype) {\n definition.afterContentChecked =\n definition.afterContentChecked || superPrototype.afterContentChecked;\n definition.afterContentInit =\n definition.afterContentInit || superPrototype.afterContentInit;\n definition.afterViewChecked =\n definition.afterViewChecked || superPrototype.afterViewChecked;\n definition.afterViewInit = definition.afterViewInit || superPrototype.afterViewInit;\n definition.doCheck = definition.doCheck || superPrototype.doCheck;\n definition.onDestroy = definition.onDestroy || superPrototype.onDestroy;\n definition.onInit = definition.onInit || superPrototype.onInit;\n }\n }\n superType = Object.getPrototypeOf(superType);\n };\n while (superType && !superDef) {\n _loop_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 PRIVATE_PREFIX = '__ngOnChanges_';\n/**\n * The NgOnChangesFeature decorates a component with support for the ngOnChanges\n * lifecycle hook, so it should be included in any component that implements\n * that hook.\n *\n * If the component or directive uses inheritance, the NgOnChangesFeature MUST\n * be included as a feature AFTER {@link InheritDefinitionFeature}, otherwise\n * inherited properties will not be propagated to the ngOnChanges lifecycle\n * hook.\n *\n * Example usage:\n *\n * ```\n * static ngComponentDef = defineComponent({\n * ...\n * inputs: {name: 'publicName'},\n * features: [NgOnChangesFeature]\n * });\n * ```\n */\nfunction NgOnChangesFeature(definition) {\n var declaredToMinifiedInputs = definition.declaredInputs;\n var proto = definition.type.prototype;\n var _loop_1 = function (declaredName) {\n if (declaredToMinifiedInputs.hasOwnProperty(declaredName)) {\n var minifiedKey = declaredToMinifiedInputs[declaredName];\n var privateMinKey_1 = PRIVATE_PREFIX + minifiedKey;\n // Walk the prototype chain to see if we find a property descriptor\n // That way we can honor setters and getters that were inherited.\n var originalProperty = undefined;\n var checkProto = proto;\n while (!originalProperty && checkProto &&\n Object.getPrototypeOf(checkProto) !== Object.getPrototypeOf(Object.prototype)) {\n originalProperty = Object.getOwnPropertyDescriptor(checkProto, minifiedKey);\n checkProto = Object.getPrototypeOf(checkProto);\n }\n var getter = originalProperty && originalProperty.get;\n var setter_1 = originalProperty && originalProperty.set;\n // create a getter and setter for property\n Object.defineProperty(proto, minifiedKey, {\n get: getter ||\n (setter_1 ? undefined : function () { return this[privateMinKey_1]; }),\n set: function (value) {\n var simpleChanges = this[PRIVATE_PREFIX];\n if (!simpleChanges) {\n simpleChanges = {};\n // Place where we will store SimpleChanges if there is a change\n Object.defineProperty(this, PRIVATE_PREFIX, { value: simpleChanges, writable: true });\n }\n var isFirstChange = !this.hasOwnProperty(privateMinKey_1);\n var currentChange = simpleChanges[declaredName];\n if (currentChange) {\n currentChange.currentValue = value;\n }\n else {\n simpleChanges[declaredName] =\n new SimpleChange(this[privateMinKey_1], value, isFirstChange);\n }\n if (isFirstChange) {\n // Create a place where the actual value will be stored and make it non-enumerable\n Object.defineProperty(this, privateMinKey_1, { value: value, writable: true });\n }\n else {\n this[privateMinKey_1] = value;\n }\n if (setter_1)\n setter_1.call(this, value);\n }\n });\n }\n };\n for (var declaredName in declaredToMinifiedInputs) {\n _loop_1(declaredName);\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}\nfunction 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 if (delegateHook)\n delegateHook.apply(this);\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 ViewRef$1 = /** @class */ (function () {\n function ViewRef(_view, context) {\n this._view = _view;\n this._appRef = null;\n this._viewContainerRef = null;\n /**\n * @internal\n */\n this._lViewNode = null;\n this.context = context;\n }\n /** @internal */\n ViewRef.prototype._setComponentContext = function (view, context) {\n this._view = view;\n this.context = context;\n };\n Object.defineProperty(ViewRef.prototype, \"destroyed\", {\n get: function () {\n return (this._view[FLAGS] & 32 /* Destroyed */) === 32 /* Destroyed */;\n },\n enumerable: true,\n configurable: true\n });\n ViewRef.prototype.destroy = function () {\n if (this._viewContainerRef && viewAttached(this._view)) {\n this._viewContainerRef.detach(this._viewContainerRef.indexOf(this));\n this._viewContainerRef = null;\n }\n destroyLView(this._view);\n };\n ViewRef.prototype.onDestroy = function (callback) { storeCleanupFn(this._view, 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 * @usageNotes\n * ### Example\n *\n * ```typescript\n * @Component({\n * selector: 'my-app',\n * template: `Number of ticks: {{numberOfTicks}}`\n * changeDetection: ChangeDetectionStrategy.OnPush,\n * })\n * class AppComponent {\n * numberOfTicks = 0;\n *\n * constructor(private ref: ChangeDetectorRef) {\n * setInterval(() => {\n * this.numberOfTicks++;\n * // the following is required, otherwise the view will not be updated\n * this.ref.markForCheck();\n * }, 1000);\n * }\n * }\n * ```\n */\n ViewRef.prototype.markForCheck = 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 * @usageNotes\n * ### Example\n *\n * The following example defines a component with a large list of readonly data.\n * Imagine the data changes constantly, many times per second. For performance reasons,\n * we want to check and update the list every five seconds. We can do that by detaching\n * the component's change detector and doing a local check every five seconds.\n *\n * ```typescript\n * class DataProvider {\n * // in a real application the returned data will be different every time\n * get data() {\n * return [1,2,3,4,5];\n * }\n * }\n *\n * @Component({\n * selector: 'giant-list',\n * template: `\n * <li *ngFor=\"let d of dataProvider.data\">Data {{d}}</li>\n * `,\n * })\n * class GiantList {\n * constructor(private ref: ChangeDetectorRef, private dataProvider: DataProvider) {\n * ref.detach();\n * setInterval(() => {\n * this.ref.detectChanges();\n * }, 5000);\n * }\n * }\n *\n * @Component({\n * selector: 'app',\n * providers: [DataProvider],\n * template: `\n * <giant-list><giant-list>\n * `,\n * })\n * class App {\n * }\n * ```\n */\n ViewRef.prototype.detach = 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 * @usageNotes\n * ### Example\n *\n * The following example creates a component displaying `live` data. The component will detach\n * its change detector from the main change detector tree when the component's live property\n * is set to false.\n *\n * ```typescript\n * class DataProvider {\n * data = 1;\n *\n * constructor() {\n * setInterval(() => {\n * this.data = this.data * 2;\n * }, 500);\n * }\n * }\n *\n * @Component({\n * selector: 'live-data',\n * inputs: ['live'],\n * template: 'Data: {{dataProvider.data}}'\n * })\n * class LiveData {\n * constructor(private ref: ChangeDetectorRef, private dataProvider: DataProvider) {}\n *\n * set live(value) {\n * if (value) {\n * this.ref.reattach();\n * } else {\n * this.ref.detach();\n * }\n * }\n * }\n *\n * @Component({\n * selector: 'my-app',\n * providers: [DataProvider],\n * template: `\n * Live Update: <input type=\"checkbox\" [(ngModel)]=\"live\">\n * <live-data [live]=\"live\"><live-data>\n * `,\n * })\n * class AppComponent {\n * live = true;\n * }\n * ```\n */\n ViewRef.prototype.reattach = 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 * @usageNotes\n * ### Example\n *\n * The following example defines a component with a large list of readonly data.\n * Imagine, the data changes constantly, many times per second. For performance reasons,\n * we want to check and update the list every five seconds.\n *\n * We can do that by detaching the component's change detector and doing a local change detection\n * check every five seconds.\n *\n * See {@link ChangeDetectorRef#detach detach} for more information.\n */\n ViewRef.prototype.detectChanges = 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 ViewRef.prototype.checkNoChanges = function () { checkNoChanges(this.context); };\n ViewRef.prototype.attachToViewContainerRef = function (vcRef) { this._viewContainerRef = vcRef; };\n ViewRef.prototype.detachFromAppRef = function () { this._appRef = null; };\n ViewRef.prototype.attachToAppRef = function (appRef) { this._appRef = appRef; };\n return ViewRef;\n}());\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this 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 ComponentFactoryResolver$1 = /** @class */ (function (_super) {\n __extends(ComponentFactoryResolver$$1, _super);\n function ComponentFactoryResolver$$1() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n ComponentFactoryResolver$$1.prototype.resolveComponentFactory = function (component) {\n ngDevMode && assertComponentType(component);\n var componentDef = component.ngComponentDef;\n return new ComponentFactory$1(componentDef);\n };\n return ComponentFactoryResolver$$1;\n}(ComponentFactoryResolver));\nfunction toRefArray(map) {\n var array = [];\n for (var nonMinified in map) {\n if (map.hasOwnProperty(nonMinified)) {\n var minified = map[nonMinified];\n array.push({ propName: minified, templateName: nonMinified });\n }\n }\n return array;\n}\n/**\n * Default {@link RootContext} for all components rendered with {@link renderComponent}.\n */\nvar ROOT_CONTEXT = new InjectionToken('ROOT_CONTEXT_TOKEN', { providedIn: 'root', factory: function () { return createRootContext(inject(SCHEDULER)); } });\n/**\n * A change detection scheduler token for {@link RootContext}. This token is the default value used\n * for the default `RootContext` found in the {@link ROOT_CONTEXT} token.\n */\nvar SCHEDULER = new InjectionToken('SCHEDULER_TOKEN', { providedIn: 'root', factory: function () { return requestAnimationFrame.bind(window); } });\n/**\n * Render3 implementation of {@link viewEngine_ComponentFactory}.\n */\nvar ComponentFactory$1 = /** @class */ (function (_super) {\n __extends(ComponentFactory$$1, _super);\n function ComponentFactory$$1(componentDef) {\n var _this = _super.call(this) || this;\n _this.componentDef = componentDef;\n _this.componentType = componentDef.type;\n _this.selector = componentDef.selectors[0][0];\n _this.ngContentSelectors = [];\n return _this;\n }\n Object.defineProperty(ComponentFactory$$1.prototype, \"inputs\", {\n get: function () {\n return toRefArray(this.componentDef.inputs);\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(ComponentFactory$$1.prototype, \"outputs\", {\n get: function () {\n return toRefArray(this.componentDef.outputs);\n },\n enumerable: true,\n configurable: true\n });\n ComponentFactory$$1.prototype.create = function (injector, projectableNodes, rootSelectorOrNode, ngModule) {\n var isInternalRootView = rootSelectorOrNode === undefined;\n var rendererFactory = ngModule ? ngModule.injector.get(RendererFactory2) : domRendererFactory3;\n var hostNode = isInternalRootView ?\n elementCreate(this.selector, rendererFactory.createRenderer(null, this.componentDef.rendererType)) :\n locateHostElement(rendererFactory, rootSelectorOrNode);\n // The first index of the first selector is the tag name.\n var componentTag = this.componentDef.selectors[0][0];\n var rootContext = ngModule && !isInternalRootView ?\n ngModule.injector.get(ROOT_CONTEXT) :\n createRootContext(requestAnimationFrame.bind(window));\n // Create the root view. Uses empty TView and ContentTemplate.\n var rootView = createLViewData(rendererFactory.createRenderer(hostNode, this.componentDef.rendererType), createTView(-1, null, null, null, null), rootContext, this.componentDef.onPush ? 4 /* Dirty */ : 2 /* CheckAlways */);\n rootView[INJECTOR$1] = ngModule && ngModule.injector || null;\n // rootView is the parent when bootstrapping\n var oldView = enterView(rootView, null);\n var component;\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, this.componentDef);\n // Create directive instance with factory() and store at index 0 in directives array\n rootContext.components.push(component = baseDirectiveCreate(0, this.componentDef.factory(), this.componentDef));\n initChangeDetectorIfExisting(elementNode.nodeInjector, component, elementNode.data);\n // TODO: should LifecycleHooksFeature and other host features be generated by the compiler and\n // executed here?\n // Angular 5 reference: https://stackblitz.com/edit/lifecycle-hooks-vcref\n LifecycleHooksFeature(component, this.componentDef);\n // Transform the arrays of native nodes into a LNode structure that can be consumed by the\n // projection instruction. This is needed to support the reprojection of these nodes.\n if (projectableNodes) {\n var index = 0;\n var projection$$1 = elementNode.tNode.projection = [];\n for (var i = 0; i < projectableNodes.length; i++) {\n var nodeList = projectableNodes[i];\n var firstTNode = null;\n var previousTNode = null;\n for (var j = 0; j < nodeList.length; j++) {\n var lNode = createLNode(++index, 3 /* Element */, nodeList[j], null, null);\n if (previousTNode) {\n previousTNode.next = lNode.tNode;\n }\n else {\n firstTNode = lNode.tNode;\n }\n previousTNode = lNode.tNode;\n }\n projection$$1.push(firstTNode);\n }\n }\n // Execute the template in creation mode only, and then turn off the CreationMode flag\n renderEmbeddedTemplate(elementNode, elementNode.data[TVIEW], component, 1 /* Create */);\n elementNode.data[FLAGS] &= ~1 /* CreationMode */;\n }\n finally {\n enterView(oldView, null);\n if (rendererFactory.end)\n rendererFactory.end();\n }\n var componentRef = new ComponentRef$1(this.componentType, component, rootView, injector, hostNode);\n if (isInternalRootView) {\n // The host element of the internal root view is attached to the component's host view node\n componentRef.hostView._lViewNode.tNode.child = elementNode.tNode;\n }\n return componentRef;\n };\n return ComponentFactory$$1;\n}(ComponentFactory));\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$1 = /** @class */ (function (_super) {\n __extends(ComponentRef$$1, _super);\n function ComponentRef$$1(componentType, instance, rootView, injector, hostNode) {\n var _this = _super.call(this) || this;\n _this.destroyCbs = [];\n _this.instance = instance;\n /* TODO(jasonaden): This is incomplete, to be adjusted in follow-up PR. Notes from Kara:When\n * ViewRef.detectChanges is called from ApplicationRef.tick, it will call detectChanges at the\n * component instance level. I suspect this means that lifecycle hooks and host bindings on the\n * given component won't work (as these are always called at the level above a component).\n *\n * In render2, ViewRef.detectChanges uses the root view instance for view checks, not the\n * component instance. So passing in the root view (1 level above the component) is sufficient.\n * We might want to think about creating a fake component for the top level? Or overwrite\n * detectChanges with a function that calls tickRootContext? */\n _this.hostView = _this.changeDetectorRef = new ViewRef$1(rootView, instance);\n _this.hostView._lViewNode = createLNode(-1, 2 /* View */, null, null, null, rootView);\n _this.injector = injector;\n _this.location = new ElementRef(hostNode);\n _this.componentType = componentType;\n return _this;\n }\n ComponentRef$$1.prototype.destroy = function () {\n ngDevMode && assertDefined(this.destroyCbs, 'NgModule already destroyed');\n this.destroyCbs.forEach(function (fn) { return fn(); });\n this.destroyCbs = null;\n };\n ComponentRef$$1.prototype.onDestroy = function (callback) {\n ngDevMode && assertDefined(this.destroyCbs, 'NgModule already destroyed');\n this.destroyCbs.push(callback);\n };\n return ComponentRef$$1;\n}(ComponentRef));\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code 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 parent = getParentLNode(node);\n var parentInjector = parent && 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 */\nfunction injectElementRef() {\n return getOrCreateElementRef(getOrCreateNodeInjector());\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}\nvar componentFactoryResolver = new ComponentFactoryResolver$1();\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(attrNameToInject) {\n ngDevMode && assertPreviousIsParent();\n var lElement = getPreviousOrParentNode();\n ngDevMode && assertNodeType(lElement, 3 /* Element */);\n var tElement = lElement.tNode;\n ngDevMode && assertDefined(tElement, 'expecting tNode');\n var attrs = tElement.attrs;\n if (attrs) {\n for (var i = 0; i < attrs.length; i = i + 2) {\n var attrName = attrs[i];\n if (attrName === 1 /* SelectOnly */)\n break;\n if (attrName == attrNameToInject) {\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 = new ViewRef$1(currentNode.data, context);\n }\n else if (currentNode.tNode.type === 3 /* Element */) {\n return di.changeDetectorRef = getOrCreateHostChangeDetector(currentNode.view[HOST_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 new ViewRef$1(hostNode.data, hostNode\n .view[DIRECTIVES][hostNode.tNode.flags >> 14 /* 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.tNode.type === 2 /* View */) {\n node = node.view[HOST_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 if (flags === void 0) { flags = 0 /* Default */; }\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$1];\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, flags);\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 nodeFlags = node.tNode.flags;\n var count = nodeFlags & 4095 /* DirectiveCountMask */;\n if (count !== 0) {\n var start = nodeFlags >> 14 /* DirectiveStartingIndexShift */;\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 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 was a false positive.\n // If flags permit, traverse up the tree and continue searching.\n if (flags & 2 /* Self */ || flags & 1 /* Host */ && !sameHostView(injector)) {\n injector = null;\n }\n else {\n injector = injector.parent;\n }\n }\n }\n // No directive was found for the given token.\n if (flags & 8 /* Optional */)\n return null;\n throw new Error(\"Injector: NOT_FOUND [\" + stringify$1(token) + \"]\");\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 * @param flags The injection flags for this injection site (e.g. Optional or SkipSelf)\n * @returns An injector that might have the directive\n */\nfunction bloomFindPossibleInjector(startInjector, bloomBit, flags) {\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 = flags & 4 /* SkipSelf */ ? startInjector.parent : 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 else if (flags & 2 /* Self */ || flags & 1 /* Host */ && !sameHostView(injector)) {\n return null;\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}\n/**\n * Checks whether the current injector and its parent are in the same host view.\n *\n * This is necessary to support @Host() decorators. If @Host() is set, we should stop searching once\n * the injector and its parent view don't match because it means we'd cross the view boundary.\n */\nfunction sameHostView(injector) {\n return !!injector.parent && injector.parent.node.view === injector.node.view;\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.native));\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 hostParent = getParentLNode(vcRefHost);\n var lContainer = createLContainer(hostParent, vcRefHost.view, true);\n var comment = vcRefHost.view[RENDERER].createComment(ngDevMode ? 'container' : '');\n var lContainerNode = createLNodeObject(0 /* Container */, vcRefHost.view, hostParent, comment, lContainer, null);\n appendChild(hostParent, comment, vcRefHost.view);\n if (vcRefHost.queries) {\n lContainerNode.queries = vcRefHost.queries.container();\n }\n var hostTNode = vcRefHost.tNode;\n if (!hostTNode.dynamicContainerNode) {\n hostTNode.dynamicContainerNode =\n createTNode(0 /* Container */, -1, null, null, hostTNode, null);\n }\n lContainerNode.tNode = hostTNode.dynamicContainerNode;\n vcRefHost.dynamicLContainerNode = lContainerNode;\n addToViewTree(vcRefHost.view, hostTNode.index, 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 adjustedIdx = this._adjustIndex(index);\n var viewRef = templateRef\n .createEmbeddedView(context || {}, this._lContainerNode, adjustedIdx);\n viewRef.attachToViewContainerRef(this);\n this._viewRefs.splice(adjustedIdx, 0, viewRef);\n return viewRef;\n };\n ViewContainerRef.prototype.createComponent = function (componentFactory, index, injector, projectableNodes, ngModuleRef) {\n var contextInjector = injector || this.parentInjector;\n if (!ngModuleRef && contextInjector) {\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 lViewNode = viewRef._lViewNode;\n var adjustedIdx = this._adjustIndex(index);\n insertView(this._lContainerNode, lViewNode, adjustedIdx);\n var views = this._lContainerNode.data[VIEWS];\n var beforeNode = adjustedIdx + 1 < views.length ?\n (getChildLNode(views[adjustedIdx + 1])).native :\n this._lContainerNode.native;\n addRemoveViewFromContainer(this._lContainerNode, lViewNode, true, beforeNode);\n viewRef.attachToViewContainerRef(this);\n this._viewRefs.splice(adjustedIdx, 0, viewRef);\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 var adjustedIdx = this._adjustIndex(index, -1);\n removeView(this._lContainerNode, adjustedIdx);\n this._viewRefs.splice(adjustedIdx, 1);\n };\n ViewContainerRef.prototype.detach = function (index) {\n var adjustedIdx = this._adjustIndex(index, -1);\n var lViewNode = detachView(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 if (!di.templateRef) {\n ngDevMode && assertNodeType(di.node, 0 /* Container */);\n var hostNode = di.node;\n var hostTNode = hostNode.tNode;\n ngDevMode && assertDefined(hostTNode.tViews, 'TView must be allocated');\n di.templateRef = new TemplateRef$1(getOrCreateElementRef(di), hostTNode.tViews, getRenderer(), hostNode.data[QUERIES]);\n }\n return di.templateRef;\n}\nvar TemplateRef$1 = /** @class */ (function () {\n function TemplateRef(elementRef, _tView, _renderer, _queries) {\n this._tView = _tView;\n this._renderer = _renderer;\n this._queries = _queries;\n this.elementRef = elementRef;\n }\n TemplateRef.prototype.createEmbeddedView = function (context, containerNode, index) {\n var viewNode = createEmbeddedViewNode(this._tView, context, this._renderer, this._queries);\n if (containerNode) {\n insertView(containerNode, viewNode, index);\n }\n renderEmbeddedTemplate(viewNode, this._tView, context, 1 /* Create */);\n var viewRef = new ViewRef$1(viewNode.data, context);\n viewRef._lViewNode = viewNode;\n return viewRef;\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 * This feature publishes the directive (or component) into the DI system, making it visible to\n * others for injection.\n *\n * @param definition\n */\nfunction PublicFeature(definition) {\n definition.diPublic = diPublic;\n}\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this 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 i18nTagRegex = /{\\$([^}]+)}/g;\n/**\n * Takes a translation string, the initial list of placeholders (elements and expressions) and the\n * indexes of their corresponding expression nodes to return a list of instructions for each\n * template function.\n *\n * Because embedded templates have different indexes for each placeholder, each parameter (except\n * the translation) is an array, where each value corresponds to a different template, by order of\n * appearance.\n *\n * @param translation A translation string where placeholders are represented by `{$name}`\n * @param elements An array containing, for each template, the maps of element placeholders and\n * their indexes.\n * @param expressions An array containing, for each template, the maps of expression placeholders\n * and their indexes.\n * @param templateRoots An array of template roots whose content should be ignored when\n * generating the instructions for their parent template.\n * @param lastChildIndex The index of the last child of the i18n node. Used when the i18n block is\n * an ng-container.\n *\n * @returns A list of instructions used to translate each template.\n */\nfunction i18nMapping(translation, elements, expressions, templateRoots, lastChildIndex) {\n var translationParts = translation.split(i18nTagRegex);\n var nbTemplates = templateRoots ? templateRoots.length + 1 : 1;\n var instructions = (new Array(nbTemplates)).fill(undefined);\n generateMappingInstructions(0, 0, translationParts, instructions, elements, expressions, templateRoots, lastChildIndex);\n return instructions;\n}\n/**\n * Internal function that reads the translation parts and generates a set of instructions for each\n * template.\n *\n * See `i18nMapping()` for more details.\n *\n * @param tmplIndex The order of appearance of the template.\n * 0 for the root template, following indexes match the order in `templateRoots`.\n * @param partIndex The current index in `translationParts`.\n * @param translationParts The translation string split into an array of placeholders and text\n * elements.\n * @param instructions The current list of instructions to update.\n * @param elements An array containing, for each template, the maps of element placeholders and\n * their indexes.\n * @param expressions An array containing, for each template, the maps of expression placeholders\n * and their indexes.\n * @param templateRoots An array of template roots whose content should be ignored when\n * generating the instructions for their parent template.\n * @param lastChildIndex The index of the last child of the i18n node. Used when the i18n block is\n * an ng-container.\n *\n * @returns the current index in `translationParts`\n */\nfunction generateMappingInstructions(tmplIndex, partIndex, translationParts, instructions, elements, expressions, templateRoots, lastChildIndex) {\n var tmplInstructions = [];\n var phVisited = [];\n var openedTagCount = 0;\n var maxIndex = 0;\n var currentElements = elements && elements[tmplIndex] ? elements[tmplIndex] : null;\n var currentExpressions = expressions && expressions[tmplIndex] ? expressions[tmplIndex] : null;\n instructions[tmplIndex] = tmplInstructions;\n for (; partIndex < translationParts.length; partIndex++) {\n // The value can either be text or the name of a placeholder (element/template root/expression)\n var value = translationParts[partIndex];\n // Odd indexes are placeholders\n if (partIndex & 1) {\n var phIndex = void 0;\n if (currentElements && currentElements[value] !== undefined) {\n phIndex = currentElements[value];\n // The placeholder represents a DOM element, add an instruction to move it\n var templateRootIndex = templateRoots ? templateRoots.indexOf(value) : -1;\n if (templateRootIndex !== -1 && (templateRootIndex + 1) !== tmplIndex) {\n // This is a template root, it has no closing tag, not treating it as an element\n tmplInstructions.push(phIndex | -2147483648 /* TemplateRoot */);\n }\n else {\n tmplInstructions.push(phIndex | 1073741824 /* Element */);\n openedTagCount++;\n }\n phVisited.push(value);\n }\n else if (currentExpressions && currentExpressions[value] !== undefined) {\n phIndex = currentExpressions[value];\n // The placeholder represents an expression, add an instruction to move it\n tmplInstructions.push(phIndex | 1610612736 /* Expression */);\n phVisited.push(value);\n }\n else {\n // It is a closing tag\n tmplInstructions.push(-1073741824 /* CloseNode */);\n if (tmplIndex > 0) {\n openedTagCount--;\n // If we have reached the closing tag for this template, exit the loop\n if (openedTagCount === 0) {\n break;\n }\n }\n }\n if (phIndex !== undefined && phIndex > maxIndex) {\n maxIndex = phIndex;\n }\n if (templateRoots) {\n var newTmplIndex = templateRoots.indexOf(value) + 1;\n if (newTmplIndex !== 0 && newTmplIndex !== tmplIndex) {\n partIndex = generateMappingInstructions(newTmplIndex, partIndex, translationParts, instructions, elements, expressions, templateRoots, lastChildIndex);\n }\n }\n }\n else if (value) {\n // It's a non-empty string, create a text node\n tmplInstructions.push(536870912 /* Text */, value);\n }\n }\n // Add instructions to remove elements that are not used in the translation\n if (elements) {\n var tmplElements = elements[tmplIndex];\n if (tmplElements) {\n var phKeys = Object.keys(tmplElements);\n for (var i = 0; i < phKeys.length; i++) {\n var ph = phKeys[i];\n if (phVisited.indexOf(ph) === -1) {\n var index = tmplElements[ph];\n // Add an instruction to remove the element\n tmplInstructions.push(index | -536870912 /* RemoveNode */);\n if (index > maxIndex) {\n maxIndex = index;\n }\n }\n }\n }\n }\n // Add instructions to remove expressions that are not used in the translation\n if (expressions) {\n var tmplExpressions = expressions[tmplIndex];\n if (tmplExpressions) {\n var phKeys = Object.keys(tmplExpressions);\n for (var i = 0; i < phKeys.length; i++) {\n var ph = phKeys[i];\n if (phVisited.indexOf(ph) === -1) {\n var index = tmplExpressions[ph];\n if (ngDevMode) {\n assertLessThan(index.toString(2).length, 28, \"Index \" + index + \" is too big and will overflow\");\n }\n // Add an instruction to remove the expression\n tmplInstructions.push(index | -536870912 /* RemoveNode */);\n if (index > maxIndex) {\n maxIndex = index;\n }\n }\n }\n }\n }\n if (tmplIndex === 0 && typeof lastChildIndex === 'number') {\n // The current parent is an ng-container and it has more children after the translation that we\n // need to append to keep the order of the DOM nodes correct\n for (var i = maxIndex + 1; i <= lastChildIndex; i++) {\n if (ngDevMode) {\n assertLessThan(i.toString(2).length, 28, \"Index \" + i + \" is too big and will overflow\");\n }\n tmplInstructions.push(i | -1610612736 /* Any */);\n }\n }\n return partIndex;\n}\nfunction appendI18nNode(node, parentNode, previousNode) {\n if (ngDevMode) {\n ngDevMode.rendererMoveNode++;\n }\n var viewData = getViewData();\n appendChild(parentNode, node.native || null, viewData);\n // On first pass, re-organize node tree to put this node in the correct position.\n var firstTemplatePass = node.view[TVIEW].firstTemplatePass;\n if (firstTemplatePass) {\n if (previousNode === parentNode && node.tNode !== parentNode.tNode.child) {\n node.tNode.next = parentNode.tNode.child;\n parentNode.tNode.child = node.tNode;\n }\n else if (previousNode !== parentNode && node.tNode !== previousNode.tNode.next) {\n node.tNode.next = previousNode.tNode.next;\n previousNode.tNode.next = node.tNode;\n }\n else {\n node.tNode.next = null;\n }\n if (parentNode.view === node.view)\n node.tNode.parent = parentNode.tNode;\n }\n // Template containers also have a comment node for the `ViewContainerRef` that should be moved\n if (node.tNode.type === 0 /* Container */ && node.dynamicLContainerNode) {\n appendChild(parentNode, node.dynamicLContainerNode.native || null, viewData);\n if (firstTemplatePass) {\n node.tNode.dynamicContainerNode = node.dynamicLContainerNode.tNode;\n node.dynamicLContainerNode.tNode.parent = node.tNode;\n }\n return node.dynamicLContainerNode;\n }\n return node;\n}\n/**\n * Takes a list of instructions generated by `i18nMapping()` to transform the template accordingly.\n *\n * @param startIndex Index of the first element to translate (for instance the first child of the\n * element with the i18n attribute).\n * @param instructions The list of instructions to apply on the current view.\n */\nfunction i18nApply(startIndex, instructions) {\n var viewData = getViewData();\n if (ngDevMode) {\n assertEqual(viewData[BINDING_INDEX], -1, 'i18nApply should be called before any binding');\n }\n if (!instructions) {\n return;\n }\n var renderer = getRenderer();\n var localParentNode = getParentLNode(load(startIndex)) || getPreviousOrParentNode();\n var localPreviousNode = localParentNode;\n resetApplicationState(); // We don't want to add to the tree with the wrong previous node\n for (var i = 0; i < instructions.length; i++) {\n var instruction = instructions[i];\n switch (instruction & -536870912 /* InstructionMask */) {\n case 1073741824 /* Element */:\n var element$$1 = load(instruction & 536870911 /* IndexMask */);\n localPreviousNode = appendI18nNode(element$$1, localParentNode, localPreviousNode);\n localParentNode = element$$1;\n break;\n case 1610612736 /* Expression */:\n case -2147483648 /* TemplateRoot */:\n case -1610612736 /* Any */:\n var node = load(instruction & 536870911 /* IndexMask */);\n localPreviousNode = appendI18nNode(node, localParentNode, localPreviousNode);\n break;\n case 536870912 /* Text */:\n if (ngDevMode) {\n ngDevMode.rendererCreateTextNode++;\n }\n var value = instructions[++i];\n var textRNode = createTextNode(value, renderer);\n // If we were to only create a `RNode` then projections won't move the text.\n // Create text node at the current end of viewData. Must subtract header offset because\n // createLNode takes a raw index (not adjusted by header offset).\n var textLNode = createLNode(viewData.length - HEADER_OFFSET, 3 /* Element */, textRNode, null, null);\n localPreviousNode = appendI18nNode(textLNode, localParentNode, localPreviousNode);\n resetApplicationState();\n break;\n case -1073741824 /* CloseNode */:\n localPreviousNode = localParentNode;\n localParentNode = getParentLNode(localParentNode);\n break;\n case -536870912 /* RemoveNode */:\n if (ngDevMode) {\n ngDevMode.rendererRemoveNode++;\n }\n var index = instruction & 536870911 /* IndexMask */;\n var removedNode = load(index);\n var parentNode = getParentLNode(removedNode);\n removeChild(parentNode, removedNode.native || null, viewData);\n // For template containers we also need to remove their `ViewContainerRef` from the DOM\n if (removedNode.tNode.type === 0 /* Container */ && removedNode.dynamicLContainerNode) {\n removeChild(parentNode, removedNode.dynamicLContainerNode.native || null, viewData);\n removedNode.dynamicLContainerNode.tNode.detached = true;\n removedNode.dynamicLContainerNode.data[RENDER_PARENT] = null;\n }\n break;\n }\n }\n}\n/**\n * Takes a translation string and the initial list of expressions and returns a list of instructions\n * that will be used to translate an attribute.\n * Even indexes contain static strings, while odd indexes contain the index of the expression whose\n * value will be concatenated into the final translation.\n */\nfunction i18nExpMapping(translation, placeholders) {\n var staticText = translation.split(i18nTagRegex);\n // odd indexes are placeholders\n for (var i = 1; i < staticText.length; i += 2) {\n staticText[i] = placeholders[staticText[i]];\n }\n return staticText;\n}\n/**\n * Checks if the value of an expression has changed and replaces it by its value in a translation,\n * or returns NO_CHANGE.\n *\n * @param instructions A list of instructions that will be used to translate an attribute.\n * @param v0 value checked for change.\n *\n * @returns The concatenated string when any of the arguments changes, `NO_CHANGE` otherwise.\n */\nfunction i18nInterpolation1(instructions, v0) {\n var different = bindingUpdated(v0);\n if (!different) {\n return NO_CHANGE;\n }\n var res = '';\n for (var i = 0; i < instructions.length; i++) {\n // Odd indexes are bindings\n if (i & 1) {\n res += stringify$1(v0);\n }\n else {\n res += instructions[i];\n }\n }\n return res;\n}\n/**\n * Checks if the values of up to 2 expressions have changed and replaces them by their values in a\n * translation, or returns NO_CHANGE.\n *\n * @param instructions A list of instructions that will be used to translate an attribute.\n * @param v0 value checked for change.\n * @param v1 value checked for change.\n *\n * @returns The concatenated string when any of the arguments changes, `NO_CHANGE` otherwise.\n */\nfunction i18nInterpolation2(instructions, v0, v1) {\n var different = bindingUpdated2(v0, v1);\n if (!different) {\n return NO_CHANGE;\n }\n var res = '';\n for (var i = 0; i < instructions.length; i++) {\n // Odd indexes are bindings\n if (i & 1) {\n // Extract bits\n var idx = instructions[i];\n var b1 = idx & 1;\n // Get the value from the argument vx where x = idx\n var value = b1 ? v1 : v0;\n res += stringify$1(value);\n }\n else {\n res += instructions[i];\n }\n }\n return res;\n}\n/**\n * Checks if the values of up to 3 expressions have changed and replaces them by their values in a\n * translation, or returns NO_CHANGE.\n *\n * @param instructions A list of instructions that will be used to translate an attribute.\n * @param v0 value checked for change.\n * @param v1 value checked for change.\n * @param v2 value checked for change.\n *\n * @returns The concatenated string when any of the arguments changes, `NO_CHANGE` otherwise.\n */\nfunction i18nInterpolation3(instructions, v0, v1, v2) {\n var different = bindingUpdated2(v0, v1);\n different = bindingUpdated(v2) || different;\n if (!different) {\n return NO_CHANGE;\n }\n var res = '';\n for (var i = 0; i < instructions.length; i++) {\n // Odd indexes are bindings\n if (i & 1) {\n // Extract bits\n var idx = instructions[i];\n var b2 = idx & 2;\n var b1 = idx & 1;\n // Get the value from the argument vx where x = idx\n var value = b2 ? v2 : (b1 ? v1 : v0);\n res += stringify$1(value);\n }\n else {\n res += instructions[i];\n }\n }\n return res;\n}\n/**\n * Checks if the values of up to 4 expressions have changed and replaces them by their values in a\n * translation, or returns NO_CHANGE.\n *\n * @param instructions A list of instructions that will be used to translate an attribute.\n * @param v0 value checked for change.\n * @param v1 value checked for change.\n * @param v2 value checked for change.\n * @param v3 value checked for change.\n *\n * @returns The concatenated string when any of the arguments changes, `NO_CHANGE` otherwise.\n */\nfunction i18nInterpolation4(instructions, v0, v1, v2, v3) {\n var different = bindingUpdated4(v0, v1, v2, v3);\n if (!different) {\n return NO_CHANGE;\n }\n var res = '';\n for (var i = 0; i < instructions.length; i++) {\n // Odd indexes are bindings\n if (i & 1) {\n // Extract bits\n var idx = instructions[i];\n var b2 = idx & 2;\n var b1 = idx & 1;\n // Get the value from the argument vx where x = idx\n var value = b2 ? (b1 ? v3 : v2) : (b1 ? v1 : v0);\n res += stringify$1(value);\n }\n else {\n res += instructions[i];\n }\n }\n return res;\n}\n/**\n * Checks if the values of up to 5 expressions have changed and replaces them by their values in a\n * translation, or returns NO_CHANGE.\n *\n * @param instructions A list of instructions that will be used to translate an attribute.\n * @param v0 value checked for change.\n * @param v1 value checked for change.\n * @param v2 value checked for change.\n * @param v3 value checked for change.\n * @param v4 value checked for change.\n *\n * @returns The concatenated string when any of the arguments changes, `NO_CHANGE` otherwise.\n */\nfunction i18nInterpolation5(instructions, v0, v1, v2, v3, v4) {\n var different = bindingUpdated4(v0, v1, v2, v3);\n different = bindingUpdated(v4) || different;\n if (!different) {\n return NO_CHANGE;\n }\n var res = '';\n for (var i = 0; i < instructions.length; i++) {\n // Odd indexes are bindings\n if (i & 1) {\n // Extract bits\n var idx = instructions[i];\n var b4 = idx & 4;\n var b2 = idx & 2;\n var b1 = idx & 1;\n // Get the value from the argument vx where x = idx\n var value = b4 ? v4 : (b2 ? (b1 ? v3 : v2) : (b1 ? v1 : v0));\n res += stringify$1(value);\n }\n else {\n res += instructions[i];\n }\n }\n return res;\n}\n/**\n * Checks if the values of up to 6 expressions have changed and replaces them by their values in a\n * translation, or returns NO_CHANGE.\n *\n * @param instructions A list of instructions that will be used to translate an attribute.\n * @param v0 value checked for change.\n * @param v1 value checked for change.\n * @param v2 value checked for change.\n * @param v3 value checked for change.\n * @param v4 value checked for change.\n * @param v5 value checked for change.\n *\n * @returns The concatenated string when any of the arguments changes, `NO_CHANGE` otherwise.\n */ function i18nInterpolation6(instructions, v0, v1, v2, v3, v4, v5) {\n var different = bindingUpdated4(v0, v1, v2, v3);\n different = bindingUpdated2(v4, v5) || different;\n if (!different) {\n return NO_CHANGE;\n }\n var res = '';\n for (var i = 0; i < instructions.length; i++) {\n // Odd indexes are bindings\n if (i & 1) {\n // Extract bits\n var idx = instructions[i];\n var b4 = idx & 4;\n var b2 = idx & 2;\n var b1 = idx & 1;\n // Get the value from the argument vx where x = idx\n var value = b4 ? (b1 ? v5 : v4) : (b2 ? (b1 ? v3 : v2) : (b1 ? v1 : v0));\n res += stringify$1(value);\n }\n else {\n res += instructions[i];\n }\n }\n return res;\n}\n/**\n * Checks if the values of up to 7 expressions have changed and replaces them by their values in a\n * translation, or returns NO_CHANGE.\n *\n * @param instructions A list of instructions that will be used to translate an attribute.\n * @param v0 value checked for change.\n * @param v1 value checked for change.\n * @param v2 value checked for change.\n * @param v3 value checked for change.\n * @param v4 value checked for change.\n * @param v5 value checked for change.\n * @param v6 value checked for change.\n *\n * @returns The concatenated string when any of the arguments changes, `NO_CHANGE` otherwise.\n */\nfunction i18nInterpolation7(instructions, v0, v1, v2, v3, v4, v5, v6) {\n var different = bindingUpdated4(v0, v1, v2, v3);\n different = bindingUpdated2(v4, v5) || different;\n different = bindingUpdated(v6) || different;\n if (!different) {\n return NO_CHANGE;\n }\n var res = '';\n for (var i = 0; i < instructions.length; i++) {\n // Odd indexes are bindings\n if (i & 1) {\n // Extract bits\n var idx = instructions[i];\n var b4 = idx & 4;\n var b2 = idx & 2;\n var b1 = idx & 1;\n // Get the value from the argument vx where x = idx\n var value = b4 ? (b2 ? v6 : (b1 ? v5 : v4)) : (b2 ? (b1 ? v3 : v2) : (b1 ? v1 : v0));\n res += stringify$1(value);\n }\n else {\n res += instructions[i];\n }\n }\n return res;\n}\n/**\n * Checks if the values of up to 8 expressions have changed and replaces them by their values in a\n * translation, or returns NO_CHANGE.\n *\n * @param instructions A list of instructions that will be used to translate an attribute.\n * @param v0 value checked for change.\n * @param v1 value checked for change.\n * @param v2 value checked for change.\n * @param v3 value checked for change.\n * @param v4 value checked for change.\n * @param v5 value checked for change.\n * @param v6 value checked for change.\n * @param v7 value checked for change.\n *\n * @returns The concatenated string when any of the arguments changes, `NO_CHANGE` otherwise.\n */\nfunction i18nInterpolation8(instructions, v0, v1, v2, v3, v4, v5, v6, v7) {\n var different = bindingUpdated4(v0, v1, v2, v3);\n different = bindingUpdated4(v4, v5, v6, v7) || different;\n if (!different) {\n return NO_CHANGE;\n }\n var res = '';\n for (var i = 0; i < instructions.length; i++) {\n // Odd indexes are bindings\n if (i & 1) {\n // Extract bits\n var idx = instructions[i];\n var b4 = idx & 4;\n var b2 = idx & 2;\n var b1 = idx & 1;\n // Get the value from the argument vx where x = idx\n var value = b4 ? (b2 ? (b1 ? v7 : v6) : (b1 ? v5 : v4)) : (b2 ? (b1 ? v3 : v2) : (b1 ? v1 : v0));\n res += stringify$1(value);\n }\n else {\n res += instructions[i];\n }\n }\n return res;\n}\n/**\n * Create a translated interpolation binding with a variable number of expressions.\n *\n * If there are 1 to 8 expressions then `i18nInterpolation()` should be used instead. It is faster\n * because there is no need to create an array of expressions and iterate over it.\n *\n * @returns The concatenated string when any of the arguments changes, `NO_CHANGE` otherwise.\n */\nfunction i18nInterpolationV(instructions, values) {\n var different = false;\n for (var i = 0; i < values.length; i++) {\n // Check if bindings have changed\n bindingUpdated(values[i]) && (different = true);\n }\n if (!different) {\n return NO_CHANGE;\n }\n var res = '';\n for (var i = 0; i < instructions.length; i++) {\n // Odd indexes are placeholders\n if (i & 1) {\n res += stringify$1(values[instructions[i]]);\n }\n else {\n res += instructions[i];\n }\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 */\nvar COMPONENT_FACTORY_RESOLVER = {\n provide: ComponentFactoryResolver,\n useFactory: function () { return new ComponentFactoryResolver$1(); },\n deps: [],\n};\nvar NgModuleRef$1 = /** @class */ (function (_super) {\n __extends(NgModuleRef$$1, _super);\n function NgModuleRef$$1(ngModuleType, parentInjector) {\n var _this = _super.call(this) || this;\n // tslint:disable-next-line:require-internal-with-underscore\n _this._bootstrapComponents = [];\n _this.destroyCbs = [];\n var ngModuleDef = ngModuleType.ngModuleDef;\n ngDevMode && assertDefined(ngModuleDef, \"NgModule '\" + stringify(ngModuleType) + \"' is not a subtype of 'NgModuleType'.\");\n _this._bootstrapComponents = ngModuleDef.bootstrap;\n var additionalProviders = [\n COMPONENT_FACTORY_RESOLVER, {\n provide: NgModuleRef,\n useValue: _this,\n }\n ];\n _this.injector = createInjector(ngModuleType, parentInjector, additionalProviders);\n _this.instance = _this.injector.get(ngModuleType);\n _this.componentFactoryResolver = new ComponentFactoryResolver$1();\n return _this;\n }\n NgModuleRef$$1.prototype.destroy = function () {\n ngDevMode && assertDefined(this.destroyCbs, 'NgModule already destroyed');\n this.destroyCbs.forEach(function (fn) { return fn(); });\n this.destroyCbs = null;\n };\n NgModuleRef$$1.prototype.onDestroy = function (callback) {\n ngDevMode && assertDefined(this.destroyCbs, 'NgModule already destroyed');\n this.destroyCbs.push(callback);\n };\n return NgModuleRef$$1;\n}(NgModuleRef));\nvar NgModuleFactory$1 = /** @class */ (function (_super) {\n __extends(NgModuleFactory$$1, _super);\n function NgModuleFactory$$1(moduleType) {\n var _this = _super.call(this) || this;\n _this.moduleType = moduleType;\n return _this;\n }\n NgModuleFactory$$1.prototype.create = function (parentInjector) {\n return new NgModuleRef$1(this.moduleType, parentInjector);\n };\n return NgModuleFactory$$1;\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 * 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 * @param slotOffset the offset in the reserved slot space {@link reserveSlots}\n * @param thisArg Optional calling context of pureFn\n * @returns value\n */\nfunction pureFunction0(slotOffset, pureFn, thisArg) {\n ngDevMode && assertReservedSlotInitialized(slotOffset, 1);\n var index = moveBindingIndexToReservedSlot(slotOffset);\n var value = getCreationMode() ?\n checkAndUpdateBinding$1(thisArg ? pureFn.call(thisArg) : pureFn()) :\n consumeBinding();\n restoreBindingIndex(index);\n return value;\n}\n/**\n * If the value of the provided exp has changed, calls the pure function to return\n * an updated value. Or if the value has not changed, returns cached value.\n *\n * @param slotOffset the offset in the reserved slot space {@link reserveSlots}\n * @param pureFn Function that returns an updated value\n * @param exp Updated expression value\n * @param thisArg Optional calling context of pureFn\n * @returns Updated or cached value\n */\nfunction pureFunction1(slotOffset, pureFn, exp, thisArg) {\n ngDevMode && assertReservedSlotInitialized(slotOffset, 2);\n var index = moveBindingIndexToReservedSlot(slotOffset);\n var value = bindingUpdated(exp) ?\n checkAndUpdateBinding$1(thisArg ? pureFn.call(thisArg, exp) : pureFn(exp)) :\n consumeBinding();\n restoreBindingIndex(index);\n return value;\n}\n/**\n * If the value of any provided exp has changed, calls the pure function to return\n * an updated value. Or if no values have changed, returns cached value.\n *\n * @param slotOffset the offset in the reserved slot space {@link reserveSlots}\n * @param pureFn\n * @param exp1\n * @param exp2\n * @param thisArg Optional calling context of pureFn\n * @returns Updated or cached value\n */\nfunction pureFunction2(slotOffset, pureFn, exp1, exp2, thisArg) {\n ngDevMode && assertReservedSlotInitialized(slotOffset, 3);\n var index = moveBindingIndexToReservedSlot(slotOffset);\n var value = bindingUpdated2(exp1, exp2) ?\n checkAndUpdateBinding$1(thisArg ? pureFn.call(thisArg, exp1, exp2) : pureFn(exp1, exp2)) :\n consumeBinding();\n restoreBindingIndex(index);\n return value;\n}\n/**\n * If the value of any provided exp has changed, calls the pure function to return\n * an updated value. Or if no values have changed, returns cached value.\n *\n * @param slotOffset the offset in the reserved slot space {@link reserveSlots}\n * @param pureFn\n * @param exp1\n * @param exp2\n * @param exp3\n * @param thisArg Optional calling context of pureFn\n * @returns Updated or cached value\n */\nfunction pureFunction3(slotOffset, pureFn, exp1, exp2, exp3, thisArg) {\n ngDevMode && assertReservedSlotInitialized(slotOffset, 4);\n var index = moveBindingIndexToReservedSlot(slotOffset);\n var different = bindingUpdated2(exp1, exp2);\n var value = bindingUpdated(exp3) || different ?\n checkAndUpdateBinding$1(thisArg ? pureFn.call(thisArg, exp1, exp2, exp3) : pureFn(exp1, exp2, exp3)) :\n consumeBinding();\n restoreBindingIndex(index);\n return value;\n}\n/**\n * If the value of any provided exp has changed, calls the pure function to return\n * an updated value. Or if no values have changed, returns cached value.\n *\n * @param slotOffset the offset in the reserved slot space {@link reserveSlots}\n * @param pureFn\n * @param exp1\n * @param exp2\n * @param exp3\n * @param exp4\n * @param thisArg Optional calling context of pureFn\n * @returns Updated or cached value\n */\nfunction pureFunction4(slotOffset, pureFn, exp1, exp2, exp3, exp4, thisArg) {\n ngDevMode && assertReservedSlotInitialized(slotOffset, 5);\n var index = moveBindingIndexToReservedSlot(slotOffset);\n var value = bindingUpdated4(exp1, exp2, exp3, exp4) ?\n checkAndUpdateBinding$1(thisArg ? pureFn.call(thisArg, exp1, exp2, exp3, exp4) : pureFn(exp1, exp2, exp3, exp4)) :\n consumeBinding();\n restoreBindingIndex(index);\n return value;\n}\n/**\n * If the value of any provided exp has changed, calls the pure function to return\n * an updated value. Or if no values have changed, returns cached value.\n *\n * @param slotOffset the offset in the reserved slot space {@link reserveSlots}\n * @param pureFn\n * @param exp1\n * @param exp2\n * @param exp3\n * @param exp4\n * @param exp5\n * @param thisArg Optional calling context of pureFn\n * @returns Updated or cached value\n */\nfunction pureFunction5(slotOffset, pureFn, exp1, exp2, exp3, exp4, exp5, thisArg) {\n ngDevMode && assertReservedSlotInitialized(slotOffset, 6);\n var index = moveBindingIndexToReservedSlot(slotOffset);\n var different = bindingUpdated4(exp1, exp2, exp3, exp4);\n var value = 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 restoreBindingIndex(index);\n return value;\n}\n/**\n * If the value of any provided exp has changed, calls the pure function to return\n * an updated value. Or if no values have changed, returns cached value.\n *\n * @param slotOffset the offset in the reserved slot space {@link reserveSlots}\n * @param pureFn\n * @param exp1\n * @param exp2\n * @param exp3\n * @param exp4\n * @param exp5\n * @param exp6\n * @param thisArg Optional calling context of pureFn\n * @returns Updated or cached value\n */\nfunction pureFunction6(slotOffset, pureFn, exp1, exp2, exp3, exp4, exp5, exp6, thisArg) {\n ngDevMode && assertReservedSlotInitialized(slotOffset, 7);\n var index = moveBindingIndexToReservedSlot(slotOffset);\n var different = bindingUpdated4(exp1, exp2, exp3, exp4);\n var value = 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 restoreBindingIndex(index);\n return value;\n}\n/**\n * If the value of any provided exp has changed, calls the pure function to return\n * an updated value. Or if no values have changed, returns cached value.\n *\n * @param slotOffset the offset in the reserved slot space {@link reserveSlots}\n * @param pureFn\n * @param exp1\n * @param exp2\n * @param exp3\n * @param exp4\n * @param exp5\n * @param exp6\n * @param exp7\n * @param thisArg Optional calling context of pureFn\n * @returns Updated or cached value\n */\nfunction pureFunction7(slotOffset, pureFn, exp1, exp2, exp3, exp4, exp5, exp6, exp7, thisArg) {\n ngDevMode && assertReservedSlotInitialized(slotOffset, 8);\n var index = moveBindingIndexToReservedSlot(slotOffset);\n var different = bindingUpdated4(exp1, exp2, exp3, exp4);\n different = bindingUpdated2(exp5, exp6) || different;\n var value = 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 restoreBindingIndex(index);\n return value;\n}\n/**\n * If the value of any provided exp has changed, calls the pure function to return\n * an updated value. Or if no values have changed, returns cached value.\n *\n * @param slotOffset the offset in the reserved slot space {@link reserveSlots}\n * @param pureFn\n * @param exp1\n * @param exp2\n * @param exp3\n * @param exp4\n * @param exp5\n * @param exp6\n * @param exp7\n * @param exp8\n * @param thisArg Optional calling context of pureFn\n * @returns Updated or cached value\n */\nfunction pureFunction8(slotOffset, pureFn, exp1, exp2, exp3, exp4, exp5, exp6, exp7, exp8, thisArg) {\n ngDevMode && assertReservedSlotInitialized(slotOffset, 9);\n var index = moveBindingIndexToReservedSlot(slotOffset);\n var different = bindingUpdated4(exp1, exp2, exp3, exp4);\n var value = 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 restoreBindingIndex(index);\n return value;\n}\n/**\n * pureFunction instruction that can support any number of bindings.\n *\n * If the value of any provided exp has changed, calls the pure function to return\n * an updated value. Or if no values have changed, returns cached value.\n *\n * @param slotOffset the offset in the reserved slot space {@link reserveSlots}\n * @param pureFn A pure function that takes binding values and builds an object or array\n * containing those values.\n * @param exps An array of binding values\n * @param thisArg Optional calling context of pureFn\n * @returns Updated or cached value\n */\nfunction pureFunctionV(slotOffset, pureFn, exps, thisArg) {\n ngDevMode && assertReservedSlotInitialized(slotOffset, exps.length + 1);\n var index = moveBindingIndexToReservedSlot(slotOffset);\n var different = false;\n for (var i = 0; i < exps.length; i++) {\n bindingUpdated(exps[i]) && (different = true);\n }\n var value = different ? checkAndUpdateBinding$1(pureFn.apply(thisArg, exps)) : consumeBinding();\n restoreBindingIndex(index);\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 * 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 var adjustedIndex = index + HEADER_OFFSET;\n if (tView.firstTemplatePass) {\n pipeDef = getPipeDef(pipeName, tView.pipeRegistry);\n tView.data[adjustedIndex] = pipeDef;\n if (pipeDef.onDestroy) {\n (tView.pipeDestroyHooks || (tView.pipeDestroyHooks = [])).push(adjustedIndex, pipeDef.onDestroy);\n }\n }\n else {\n pipeDef = tView.data[adjustedIndex];\n }\n var pipeInstance = pipeDef.factory();\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 slotOffset the offset in the reserved slot space {@link reserveSlots}\n * @param v1 1st argument to {@link PipeTransform#transform}.\n */\nfunction pipeBind1(index, slotOffset, v1) {\n var pipeInstance = load(index);\n return isPure(index) ? pureFunction1(slotOffset, pipeInstance.transform, v1, pipeInstance) :\n pipeInstance.transform(v1);\n}\n/**\n * Invokes a pipe with 2 arguments.\n *\n * This instruction acts as a guard to {@link PipeTransform#transform} invoking\n * the pipe only when an input to the pipe changes.\n *\n * @param index Pipe index where the pipe was stored on creation.\n * @param slotOffset the offset in the reserved slot space {@link reserveSlots}\n * @param v1 1st argument to {@link PipeTransform#transform}.\n * @param v2 2nd argument to {@link PipeTransform#transform}.\n */\nfunction pipeBind2(index, slotOffset, v1, v2) {\n var pipeInstance = load(index);\n return isPure(index) ? pureFunction2(slotOffset, pipeInstance.transform, v1, v2, pipeInstance) :\n pipeInstance.transform(v1, v2);\n}\n/**\n * Invokes a pipe with 3 arguments.\n *\n * This instruction acts as a guard to {@link PipeTransform#transform} invoking\n * the pipe only when an input to the pipe changes.\n *\n * @param index Pipe index where the pipe was stored on creation.\n * @param slotOffset the offset in the reserved slot space {@link reserveSlots}\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, slotOffset, v1, v2, v3) {\n var pipeInstance = load(index);\n return isPure(index) ?\n pureFunction3(slotOffset, pipeInstance.transform, v1, v2, v3, pipeInstance) :\n pipeInstance.transform(v1, v2, v3);\n}\n/**\n * Invokes a pipe with 4 arguments.\n *\n * This instruction acts as a guard to {@link PipeTransform#transform} invoking\n * the pipe only when an input to the pipe changes.\n *\n * @param index Pipe index where the pipe was stored on creation.\n * @param slotOffset the offset in the reserved slot space {@link reserveSlots}\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, slotOffset, v1, v2, v3, v4) {\n var pipeInstance = load(index);\n return isPure(index) ?\n pureFunction4(slotOffset, pipeInstance.transform, v1, v2, v3, v4, pipeInstance) :\n pipeInstance.transform(v1, v2, v3, v4);\n}\n/**\n * Invokes a pipe with variable number of arguments.\n *\n * This instruction acts as a guard to {@link PipeTransform#transform} invoking\n * the pipe only when an input to the pipe changes.\n *\n * @param index Pipe index where the pipe was stored on creation.\n * @param slotOffset the offset in the reserved slot space {@link reserveSlots}\n * @param values Array of arguments to pass to {@link PipeTransform#transform} method.\n */\nfunction pipeBindV(index, slotOffset, values) {\n var pipeInstance = load(index);\n return isPure(index) ? pureFunctionV(slotOffset, pipeInstance.transform, values, pipeInstance) :\n pipeInstance.transform.apply(pipeInstance, values);\n}\nfunction isPure(index) {\n return getTView().data[index + HEADER_OFFSET].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\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code 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 */\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 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.clone = function () { return this.deep ? new LQueries_(this.deep) : null; };\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 = {\n next: null,\n list: query.list,\n predicate: query.predicate,\n values: containerValues,\n containerValues: null\n };\n clonedQuery.next = result;\n result = clonedQuery;\n query = query.next;\n }\n return result ? new LQueries_(result) : null;\n };\n LQueries_.prototype.createView = function () {\n var result = null;\n var query = this.deep;\n while (query) {\n var clonedQuery = {\n next: null,\n list: query.list,\n predicate: query.predicate,\n values: [],\n containerValues: query.values\n };\n clonedQuery.next = result;\n result = clonedQuery;\n query = query.next;\n }\n return result ? new LQueries_(result) : null;\n };\n LQueries_.prototype.insertView = function (index) {\n var query = this.deep;\n while (query) {\n ngDevMode &&\n assertDefined(query.containerValues, 'View queries need to have a pointer to container values.');\n query.containerValues.splice(index, 0, query.values);\n query = query.next;\n }\n };\n LQueries_.prototype.addNode = function (node) {\n add(this.shallow, node);\n add(this.deep, node);\n };\n LQueries_.prototype.removeView = function () {\n var query = this.deep;\n while (query) {\n ngDevMode &&\n assertDefined(query.containerValues, 'View queries need to have a pointer to container values.');\n var containerValues = query.containerValues;\n var viewValuesIdx = containerValues.indexOf(query.values);\n var removed = containerValues.splice(viewValuesIdx, 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 /* DirectiveCountMask */;\n var start = flags >> 14 /* DirectiveStartingIndexShift */;\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 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 && assertDefined(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 containerValues: null\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 QueryList_.prototype.map = 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 QueryList_.prototype.filter = 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 QueryList_.prototype.find = 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 QueryList_.prototype.reduce = 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 QueryList_.prototype.forEach = 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 QueryList_.prototype.some = 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 storeCleanupWithContext(null, queryList, queryList.destroy);\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__';\nfunction allowSanitizationBypass(value, type) {\n return (value instanceof String && value[BRAND] === type) ? true : false;\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\" /* 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\" /* 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\" /* 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\" /* 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\" /* 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 * 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 var s = getCurrentSanitizer();\n if (s) {\n return s.sanitize(SecurityContext.HTML, unsafeHtml) || '';\n }\n if (allowSanitizationBypass(unsafeHtml, \"Html\" /* 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 var s = getCurrentSanitizer();\n if (s) {\n return s.sanitize(SecurityContext.STYLE, unsafeStyle) || '';\n }\n if (allowSanitizationBypass(unsafeStyle, \"Style\" /* 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 var s = getCurrentSanitizer();\n if (s) {\n return s.sanitize(SecurityContext.URL, unsafeUrl) || '';\n }\n if (allowSanitizationBypass(unsafeUrl, \"Url\" /* 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 var s = getCurrentSanitizer();\n if (s) {\n return s.sanitize(SecurityContext.RESOURCE_URL, unsafeResourceUrl) || '';\n }\n if (allowSanitizationBypass(unsafeResourceUrl, \"ResourceUrl\" /* 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/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n// clang-format on\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code 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// 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 { APPLICATION_MODULE_PROVIDERS as ɵangular_packages_core_core_l, _iterableDiffersFactory as ɵangular_packages_core_core_i, _keyValueDiffersFactory as ɵangular_packages_core_core_j, _localeFactory as ɵangular_packages_core_core_k, _appIdRandomProviderFactory as ɵangular_packages_core_core_f, DefaultIterableDifferFactory as ɵangular_packages_core_core_g, DefaultKeyValueDifferFactory as ɵangular_packages_core_core_h, 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_y, getOrCreateElementRef 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_z, bindingUpdated as ɵangular_packages_core_core_ba, loadInternal as ɵangular_packages_core_core_bb, 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, NoopNgZone as ɵNoopNgZone, 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, defaultKeyValueDiffers as ɵdefaultKeyValueDiffers, 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, ivyEnabled as ɵivyEnabled, ComponentFactory as ɵComponentFactory, CodegenComponentFactoryResolver as ɵCodegenComponentFactoryResolver, resolveComponentResources as ɵresolveComponentResources, 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, initServicesIfNeeded as ɵinitServicesIfNeeded, 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, defineNgModule as ɵdefineNgModule, detectChanges as ɵdetectChanges, renderComponent as ɵrenderComponent, directiveInject as ɵdirectiveInject, injectElementRef as ɵinjectElementRef, injectTemplateRef as ɵinjectTemplateRef, injectViewContainerRef as ɵinjectViewContainerRef, injectChangeDetectorRef as ɵinjectChangeDetectorRef, injectAttribute as ɵinjectAttribute, PublicFeature as ɵPublicFeature, InheritDefinitionFeature as ɵInheritDefinitionFeature, NgOnChangesFeature as ɵNgOnChangesFeature, markDirty as ɵmarkDirty, NgModuleFactory$1 as ɵNgModuleFactory, NO_CHANGE as ɵNC, container as ɵC, elementStart as ɵE, namespaceHTML as ɵNH, namespaceMathML as ɵNM, namespaceSVG as ɵNS, element as ɵEe, listener as ɵL, text as ɵT, embeddedViewStart as ɵV, query as ɵQ, registerContentQuery as ɵQr, 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, loadQueryList as ɵql, elementEnd as ɵe, elementProperty as ɵp, projectionDef as ɵpD, reserveSlots as ɵrS, elementAttribute as ɵa, elementStyling as ɵs, elementStylingMap as ɵsm, elementStyleProp as ɵsp, elementStylingApply as ɵsa, elementClassProp as ɵcp, textBinding as ɵt, embeddedViewEnd as ɵv, store as ɵst, load as ɵld, pipe as ɵPp, whenRendered as ɵwhenRendered, i18nApply as ɵiA, i18nExpMapping as ɵiEM, i18nInterpolation1 as ɵiI1, i18nInterpolation2 as ɵiI2, i18nInterpolation3 as ɵiI3, i18nInterpolation4 as ɵiI4, i18nInterpolation5 as ɵiI5, i18nInterpolation6 as ɵiI6, i18nInterpolation7 as ɵiI7, i18nInterpolation8 as ɵiI8, i18nInterpolationV as ɵIV, i18nMapping as ɵiM, sanitizeHtml as ɵsanitizeHtml, sanitizeStyle as ɵsanitizeStyle, sanitizeUrl as ɵsanitizeUrl, sanitizeResourceUrl as ɵsanitizeResourceUrl, bypassSanitizationTrustHtml as ɵbypassSanitizationTrustHtml, bypassSanitizationTrustStyle as ɵbypassSanitizationTrustStyle, bypassSanitizationTrustScript as ɵbypassSanitizationTrustScript, bypassSanitizationTrustUrl as ɵbypassSanitizationTrustUrl, bypassSanitizationTrustResourceUrl as ɵbypassSanitizationTrustResourceUrl, 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","/**\n * @license Angular v6.1.10\n * (c) 2010-2018 Google, Inc. https://angular.io/\n * License: MIT\n */\n\nimport { __decorate, __metadata, __param, __extends, __values, __assign, __spread } from 'tslib';\nimport { InjectionToken, ɵisObservable, ɵisPromise, Directive, ElementRef, Renderer2, forwardRef, Inject, Optional, Injectable, Injector, Input, Host, ɵlooseIdentical, isDevMode, Self, EventEmitter, SkipSelf, Output, Version, NgModule } 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 * @description\n * Base class for control directives.\n *\n * This class is only used internally in the `ReactiveFormsModule` and the `FormsModule`.\n *\n */\nvar AbstractControlDirective = /** @class */ (function () {\n function AbstractControlDirective() {\n }\n Object.defineProperty(AbstractControlDirective.prototype, \"value\", {\n /**\n * @description\n * Reports the value of the control if it is present, otherwise null.\n */\n get: function () { return this.control ? this.control.value : null; },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(AbstractControlDirective.prototype, \"valid\", {\n /**\n * @description\n * Reports whether the control is valid. A control is considered valid if no\n * validation errors exist with the current value.\n * If the control is not present, null is returned.\n */\n get: function () { return this.control ? this.control.valid : null; },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(AbstractControlDirective.prototype, \"invalid\", {\n /**\n * @description\n * Reports whether the control is invalid, meaning that an error exists in the input value.\n * If the control is not present, null is returned.\n */\n get: function () { return this.control ? this.control.invalid : null; },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(AbstractControlDirective.prototype, \"pending\", {\n /**\n * @description\n * Reports whether a control is pending, meaning that that async validation is occurring and\n * errors are not yet available for the input value. If the control is not present, null is\n * returned.\n */\n get: function () { return this.control ? this.control.pending : null; },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(AbstractControlDirective.prototype, \"disabled\", {\n /**\n * @description\n * Reports whether the control is disabled, meaning that the control is disabled\n * in the UI and is exempt from validation checks and excluded from aggregate\n * values of ancestor controls. If the control is not present, null is returned.\n */\n get: function () { return this.control ? this.control.disabled : null; },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(AbstractControlDirective.prototype, \"enabled\", {\n /**\n * @description\n * Reports whether the control is enabled, meaning that the control is included in ancestor\n * calculations of validity or value. If the control is not present, null is returned.\n */\n get: function () { return this.control ? this.control.enabled : null; },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(AbstractControlDirective.prototype, \"errors\", {\n /**\n * @description\n * Reports the control's validation errors. If the control is not present, null is returned.\n */\n get: function () { return this.control ? this.control.errors : null; },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(AbstractControlDirective.prototype, \"pristine\", {\n /**\n * @description\n * Reports whether the control is pristine, meaning that the user has not yet changed\n * the value in the UI. If the control is not present, null is returned.\n */\n get: function () { return this.control ? this.control.pristine : null; },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(AbstractControlDirective.prototype, \"dirty\", {\n /**\n * @description\n * Reports whether the control is dirty, meaning that the user has changed\n * the value in the UI. If the control is not present, null is returned.\n */\n get: function () { return this.control ? this.control.dirty : null; },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(AbstractControlDirective.prototype, \"touched\", {\n /**\n * @description\n * Reports whether the control is touched, meaning that the user has triggered\n * a `blur` event on it. If the control is not present, null is returned.\n */\n get: function () { return this.control ? this.control.touched : null; },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(AbstractControlDirective.prototype, \"status\", {\n /**\n * @description\n * Reports the validation status of the control. Possible values include:\n * 'VALID', 'INVALID', 'DISABLED', and 'PENDING'.\n * If the control is not present, null is returned.\n */\n get: function () { return this.control ? this.control.status : null; },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(AbstractControlDirective.prototype, \"untouched\", {\n /**\n * @description\n * Reports whether the control is untouched, meaning that the user has not yet triggered\n * a `blur` event on it. If the control is not present, null is returned.\n */\n get: function () { return this.control ? this.control.untouched : null; },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(AbstractControlDirective.prototype, \"statusChanges\", {\n /**\n * @description\n * Returns a multicasting observable that emits a validation status whenever it is\n * calculated for the control. If the control is not present, null is returned.\n */\n get: 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 * @description\n * Returns a multicasting observable of value changes for the control that emits every time the\n * value of the control changes in the UI or programmatically.\n * If the control is not present, null is returned.\n */\n get: 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 * @description\n * Returns an array that represents the path from the top-level form to this control.\n * Each index is the string name of the control on that level.\n */\n get: function () { return null; },\n enumerable: true,\n configurable: true\n });\n /**\n * @description\n * Resets the control with the provided value if the control is present.\n */\n AbstractControlDirective.prototype.reset = function (value) {\n if (value === void 0) { value = undefined; }\n if (this.control)\n this.control.reset(value);\n };\n /**\n * @description\n * Reports whether the control with the given path has the error specified.\n * If no path is given, it checks for the error on the present control.\n * If the control is not present, false is returned.\n */\n AbstractControlDirective.prototype.hasError = function (errorCode, path) {\n return this.control ? this.control.hasError(errorCode, path) : false;\n };\n /**\n * @description\n * Reports error data for the control with the given path.\n * If the control is not present, null is returned.\n */\n AbstractControlDirective.prototype.getError = 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 * @description\n * A base class for directives that contain multiple registered instances of `NgControl`.\n * Only used by the forms module.\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 * @description\n * The top-level form directive for the control.\n */\n get: function () { return null; },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(ControlContainer.prototype, \"path\", {\n /**\n * @description\n * The path to this group.\n */\n get: 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 * @description\n * An `InjectionToken` for registering additional synchronous validators used with `AbstractControl`s.\n *\n * @see `NG_ASYNC_VALIDATORS`\n *\n * @usageNotes\n *\n * ### Providing a custom validator\n *\n * The following example registers a custom validator directive. Adding the validator to the\n * existing collection of validators requires the `multi: true` option.\n *\n * ```typescript\n * @Directive({\n * selector: '[customValidator]',\n * providers: [{provide: NG_VALIDATORS, useExisting: CustomValidatorDirective, multi: true}]\n * })\n * class CustomValidatorDirective implements Validator {\n * validate(control: AbstractControl): ValidationErrors | null {\n * return { 'custom': true };\n * }\n * }\n * ```\n *\n */\nvar NG_VALIDATORS = new InjectionToken('NgValidators');\n/**\n * @description\n * An `InjectionToken` for registering additional asynchronous validators used with `AbstractControl`s.\n *\n * @see `NG_VALIDATORS`\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 * @description\n * Provides a set of built-in validators that can be used by form controls.\n *\n * A validator is a function that processes a `FormControl` or collection of\n * controls and returns an error map or null. A null map means that validation has passed.\n *\n * @see [Form Validation](/guide/form-validation)\n *\n */\nvar Validators = /** @class */ (function () {\n function Validators() {\n }\n /**\n * @description\n * Validator that requires the control's value to be greater than or equal to the provided number.\n * The validator exists only as a function and not as a directive.\n *\n * @usageNotes\n *\n * ### Validate against a minimum of 3\n *\n * ```typescript\n * const control = new FormControl(2, Validators.min(3));\n *\n * console.log(control.errors); // {min: {min: 3, actual: 2}}\n * ```\n *\n * @returns A validator function that returns an error map with the\n * `min` property if the validation check fails, otherwise `null`.\n *\n */\n Validators.min = 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 * @description\n * Validator that requires the control's value to be less than or equal to the provided number.\n * The validator exists only as a function and not as a directive.\n *\n * @usageNotes\n *\n * ### Validate against a maximum of 15\n *\n * ```typescript\n * const control = new FormControl(16, Validators.max(15));\n *\n * console.log(control.errors); // {max: {max: 15, actual: 16}}\n * ```\n *\n * @returns A validator function that returns an error map with the\n * `max` property if the validation check fails, otherwise `null`.\n *\n */\n Validators.max = 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 * @description\n * Validator that requires the control have a non-empty value.\n *\n * @usageNotes\n *\n * ### Validate that the field is non-empty\n *\n * ```typescript\n * const control = new FormControl('', Validators.required);\n *\n * console.log(control.errors); // {required: true}\n * ```\n *\n * @returns An error map with the `required` property\n * if the validation check fails, otherwise `null`.\n *\n */\n Validators.required = function (control) {\n return isEmptyInputValue(control.value) ? { 'required': true } : null;\n };\n /**\n * @description\n * Validator that requires the control's value be true. This validator is commonly\n * used for required checkboxes.\n *\n * @usageNotes\n *\n * ### Validate that the field value is true\n *\n * ```typescript\n * const control = new FormControl('', Validators.requiredTrue);\n *\n * console.log(control.errors); // {required: true}\n * ```\n *\n * @returns An error map that contains the `required` property\n * set to `true` if the validation check fails, otherwise `null`.\n */\n Validators.requiredTrue = function (control) {\n return control.value === true ? null : { 'required': true };\n };\n /**\n * @description\n * Validator that requires the control's value pass an email validation test.\n *\n * @usageNotes\n *\n * ### Validate that the field matches a valid email pattern\n *\n * ```typescript\n * const control = new FormControl('bad@', Validators.email);\n *\n * console.log(control.errors); // {email: true}\n * ```\n *\n * @returns An error map with the `email` property\n * if the validation check fails, otherwise `null`.\n *\n */\n Validators.email = 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 * @description\n * Validator that requires the length of the control's value to be greater than or equal\n * to the provided minimum length. This validator is also provided by default if you use the\n * the HTML5 `minlength` attribute.\n *\n * @usageNotes\n *\n * ### Validate that the field has a minimum of 3 characters\n *\n * ```typescript\n * const control = new FormControl('ng', Validators.minLength(3));\n *\n * console.log(control.errors); // {minlength: {requiredLength: 3, actualLength: 2}}\n * ```\n *\n * ```html\n * <input minlength=\"5\">\n * ```\n *\n * @returns A validator function that returns an error map with the\n * `minlength` if the validation check fails, otherwise `null`.\n */\n Validators.minLength = 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 * @description\n * Validator that requires the length of the control's value to be less than or equal\n * to the provided maximum length. This validator is also provided by default if you use the\n * the HTML5 `maxlength` attribute.\n *\n * @usageNotes\n *\n * ### Validate that the field has maximum of 5 characters\n *\n * ```typescript\n * const control = new FormControl('Angular', Validators.maxLength(5));\n *\n * console.log(control.errors); // {maxlength: {requiredLength: 5, actualLength: 7}}\n * ```\n *\n * ```html\n * <input maxlength=\"5\">\n * ```\n *\n * @returns A validator function that returns an error map with the\n * `maxlength` property if the validation check fails, otherwise `null`.\n */\n Validators.maxLength = 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 * @description\n * Validator that requires the control's value to match a regex pattern. This validator is also\n * provided\n * by default if you use the HTML5 `pattern` attribute.\n *\n * @usageNotes\n *\n * ### Validate that the field only contains letters or spaces\n *\n * ```typescript\n * const control = new FormControl('1', Validators.pattern('[a-zA-Z ]*'));\n *\n * console.log(control.errors); // {pattern: {requiredPattern: '^[a-zA-Z ]*$', actualValue: '1'}}\n * ```\n *\n * ```html\n * <input pattern=\"[a-zA-Z ]*\">\n * ```\n *\n * @returns A validator function that returns an error map with the\n * `pattern` property if the validation check fails, otherwise `null`.\n */\n Validators.pattern = 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 * @description\n * Validator that performs no operation.\n */\n Validators.nullValidator = function (control) { 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 /**\n * @description\n * Compose multiple async validators into a single function that returns the union\n * of the individual error objects for the provided control.\n *\n * @returns A validator function that returns an error map with the\n * merged error objects of the async validators if the validation check fails, otherwise `null`.\n */\n 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 * @usageNotes\n * ### Example\n *\n * ```\n * <input type=\"checkbox\" name=\"rememberLogin\" ngModel>\n * ```\n *\n * @ngModule FormsModule\n * @ngModule ReactiveFormsModule\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 = __decorate([\n Directive({\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 __metadata(\"design:paramtypes\", [Renderer2, ElementRef])\n ], CheckboxControlValueAccessor);\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 * @usageNotes\n * ### Example\n *\n * ```\n * <input type=\"text\" name=\"searchQuery\" ngModel>\n * ```\n *\n * @ngModule FormsModule\n * @ngModule ReactiveFormsModule\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 DefaultValueAccessor.prototype._handleInput = function (value) {\n if (!this._compositionMode || (this._compositionMode && !this._composing)) {\n this.onChange(value);\n }\n };\n /** @internal */\n DefaultValueAccessor.prototype._compositionStart = function () { this._composing = true; };\n /** @internal */\n DefaultValueAccessor.prototype._compositionEnd = function (value) {\n this._composing = false;\n this._compositionMode && this.onChange(value);\n };\n DefaultValueAccessor = __decorate([\n Directive({\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 __param(2, Optional()), __param(2, Inject(COMPOSITION_BUFFER_MODE)),\n __metadata(\"design:paramtypes\", [Renderer2, ElementRef, Boolean])\n ], DefaultValueAccessor);\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 * @usageNotes\n * ### Example\n *\n * ```\n * <input type=\"number\" [(ngModel)]=\"age\">\n * ```\n *\n * @ngModule FormsModule\n * @ngModule ReactiveFormsModule\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 = __decorate([\n Directive({\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 __metadata(\"design:paramtypes\", [Renderer2, ElementRef])\n ], NumberValueAccessor);\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 * @description\n * A base class that all control `FormControl`-based directives extend. It binds a `FormControl`\n * object to a DOM element.\n */\nvar NgControl = /** @class */ (function (_super) {\n __extends(NgControl, _super);\n function NgControl() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n /**\n * @description\n * The parent form for the control.\n *\n * @internal\n */\n _this._parent = null;\n /**\n * @description\n * The name for the control\n */\n _this.name = null;\n /**\n * @description\n * The value accessor for the control\n */\n _this.valueAccessor = null;\n /**\n * @description\n * The uncomposed array of synchronous validators for the control\n *\n * @internal\n */\n _this._rawValidators = [];\n /**\n * @description\n * The uncomposed array of async validators for the control\n *\n * @internal\n */\n _this._rawAsyncValidators = [];\n return _this;\n }\n Object.defineProperty(NgControl.prototype, \"validator\", {\n /**\n * @description\n * The registered synchronous validator function for the control\n *\n * @throws An exception that this method is not implemented\n */\n get: function () { return unimplemented(); },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(NgControl.prototype, \"asyncValidator\", {\n /**\n * @description\n * The registered async validator function for the control\n *\n * @throws An exception that this method is not implemented\n */\n get: 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 = __decorate([\n Injectable()\n ], RadioControlRegistry);\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 * @usageNotes\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 * @ngModule FormsModule\n * @ngModule ReactiveFormsModule\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 __decorate([\n Input(),\n __metadata(\"design:type\", String)\n ], RadioControlValueAccessor.prototype, \"name\", void 0);\n __decorate([\n Input(),\n __metadata(\"design:type\", String)\n ], RadioControlValueAccessor.prototype, \"formControlName\", void 0);\n __decorate([\n Input(),\n __metadata(\"design:type\", Object)\n ], RadioControlValueAccessor.prototype, \"value\", void 0);\n RadioControlValueAccessor = __decorate([\n Directive({\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 __metadata(\"design:paramtypes\", [Renderer2, ElementRef,\n RadioControlRegistry, Injector])\n ], RadioControlValueAccessor);\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 * @usageNotes\n * ### Example\n *\n * ```\n * <input type=\"range\" [(ngModel)]=\"age\" >\n * ```\n *\n * @ngModule FormsModule\n * @ngModule ReactiveFormsModule\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 = __decorate([\n Directive({\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 __metadata(\"design:paramtypes\", [Renderer2, ElementRef])\n ], RangeValueAccessor);\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 * @usageNotes\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 * @ngModule FormsModule\n * @ngModule ReactiveFormsModule\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 SelectControlValueAccessor.prototype._registerOption = function () { return (this._idCounter++).toString(); };\n /** @internal */\n SelectControlValueAccessor.prototype._getOptionId = function (value) {\n var e_1, _a;\n try {\n for (var _b = __values(Array.from(this._optionMap.keys())), _c = _b.next(); !_c.done; _c = _b.next()) {\n var id = _c.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 (_c && !_c.done && (_a = _b.return)) _a.call(_b);\n }\n finally { if (e_1) throw e_1.error; }\n }\n return null;\n };\n /** @internal */\n SelectControlValueAccessor.prototype._getOptionValue = function (valueString) {\n var id = _extractId(valueString);\n return this._optionMap.has(id) ? this._optionMap.get(id) : valueString;\n };\n __decorate([\n Input(),\n __metadata(\"design:type\", Function),\n __metadata(\"design:paramtypes\", [Function])\n ], SelectControlValueAccessor.prototype, \"compareWith\", null);\n SelectControlValueAccessor = __decorate([\n Directive({\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 __metadata(\"design:paramtypes\", [Renderer2, ElementRef])\n ], SelectControlValueAccessor);\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 * @ngModule FormsModule\n * @ngModule ReactiveFormsModule\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 NgSelectOption.prototype._setElementValue = 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 __decorate([\n Input('ngValue'),\n __metadata(\"design:type\", Object),\n __metadata(\"design:paramtypes\", [Object])\n ], NgSelectOption.prototype, \"ngValue\", null);\n __decorate([\n Input('value'),\n __metadata(\"design:type\", Object),\n __metadata(\"design:paramtypes\", [Object])\n ], NgSelectOption.prototype, \"value\", null);\n NgSelectOption = __decorate([\n Directive({ selector: 'option' }),\n __param(2, Optional()), __param(2, Host()),\n __metadata(\"design:paramtypes\", [ElementRef, Renderer2,\n SelectControlValueAccessor])\n ], NgSelectOption);\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 * @usageNotes\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 * @ngModule ReactiveFormsModule\n * @ngModule FormsModule\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 // Degrade on IE\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 SelectMultipleControlValueAccessor.prototype._registerOption = function (value) {\n var id = (this._idCounter++).toString();\n this._optionMap.set(id, value);\n return id;\n };\n /** @internal */\n SelectMultipleControlValueAccessor.prototype._getOptionId = function (value) {\n var e_1, _a;\n try {\n for (var _b = __values(Array.from(this._optionMap.keys())), _c = _b.next(); !_c.done; _c = _b.next()) {\n var id = _c.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 (_c && !_c.done && (_a = _b.return)) _a.call(_b);\n }\n finally { if (e_1) throw e_1.error; }\n }\n return null;\n };\n /** @internal */\n SelectMultipleControlValueAccessor.prototype._getOptionValue = function (valueString) {\n var id = _extractId$1(valueString);\n return this._optionMap.has(id) ? this._optionMap.get(id)._value : valueString;\n };\n __decorate([\n Input(),\n __metadata(\"design:type\", Function),\n __metadata(\"design:paramtypes\", [Function])\n ], SelectMultipleControlValueAccessor.prototype, \"compareWith\", null);\n SelectMultipleControlValueAccessor = __decorate([\n Directive({\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 __metadata(\"design:paramtypes\", [Renderer2, ElementRef])\n ], SelectMultipleControlValueAccessor);\n return SelectMultipleControlValueAccessor;\n}());\n/**\n * Marks `<option>` as dynamic, so Angular can be notified when options change.\n *\n * @usageNotes\n * ### Example\n *\n * ```\n * <select multiple name=\"city\" ngModel>\n * <option *ngFor=\"let c of cities\" [value]=\"c\"></option>\n * </select>\n * ```\n * @ngModule FormsModule\n * @ngModule ReactiveFormsModule\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 NgSelectMultipleOption.prototype._setElementValue = function (value) {\n this._renderer.setProperty(this._element.nativeElement, 'value', value);\n };\n /** @internal */\n NgSelectMultipleOption.prototype._setSelected = 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 __decorate([\n Input('ngValue'),\n __metadata(\"design:type\", Object),\n __metadata(\"design:paramtypes\", [Object])\n ], NgSelectMultipleOption.prototype, \"ngValue\", null);\n __decorate([\n Input('value'),\n __metadata(\"design:type\", Object),\n __metadata(\"design:paramtypes\", [Object])\n ], NgSelectMultipleOption.prototype, \"value\", null);\n NgSelectMultipleOption = __decorate([\n Directive({ selector: 'option' }),\n __param(2, Optional()), __param(2, Host()),\n __metadata(\"design:paramtypes\", [ElementRef, Renderer2,\n SelectMultipleControlValueAccessor])\n ], NgSelectMultipleOption);\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 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 * @description\n * A base class for code shared between the `NgModelGroup` and `FormGroupName` directives.\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 /**\n * @description\n * An internal callback method triggered on the instance after the inputs are set.\n * Registers the group with its parent group.\n */\n AbstractFormGroupDirective.prototype.ngOnInit = function () {\n this._checkParentType();\n this.formDirective.addFormGroup(this);\n };\n /**\n * @description\n * An internal callback method triggered before the instance is destroyed.\n * Removes the group from its parent group.\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 * @description\n * The `FormGroup` bound to this directive.\n */\n get: function () { return this.formDirective.getFormGroup(this); },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(AbstractFormGroupDirective.prototype, \"path\", {\n /**\n * @description\n * The path to this group from the top-level directive.\n */\n get: function () { return controlPath(this.name, this._parent); },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(AbstractFormGroupDirective.prototype, \"formDirective\", {\n /**\n * @description\n * The top-level directive for this group if present, otherwise null.\n */\n get: function () { return this._parent ? this._parent.formDirective : null; },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(AbstractFormGroupDirective.prototype, \"validator\", {\n /**\n * @description\n * The synchronous validators registered with this group.\n */\n get: function () { return composeValidators(this._validators); },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(AbstractFormGroupDirective.prototype, \"asyncValidator\", {\n /**\n * @description\n * The async validators registered with this group.\n */\n get: function () {\n return composeAsyncValidators(this._asyncValidators);\n },\n enumerable: true,\n configurable: true\n });\n /** @internal */\n AbstractFormGroupDirective.prototype._checkParentType = 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 * @ngModule FormsModule\n * @ngModule ReactiveFormsModule\n */\nvar NgControlStatus = /** @class */ (function (_super) {\n __extends(NgControlStatus, _super);\n function NgControlStatus(cd) {\n return _super.call(this, cd) || this;\n }\n NgControlStatus = __decorate([\n Directive({ selector: '[formControlName],[ngModel],[formControl]', host: ngControlStatusHost }),\n __param(0, Self()),\n __metadata(\"design:paramtypes\", [NgControl])\n ], NgControlStatus);\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 * @ngModule FormsModule\n * @ngModule ReactiveFormsModule\n */\nvar NgControlStatusGroup = /** @class */ (function (_super) {\n __extends(NgControlStatusGroup, _super);\n function NgControlStatusGroup(cd) {\n return _super.call(this, cd) || this;\n }\n NgControlStatusGroup = __decorate([\n Directive({\n selector: '[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]',\n host: ngControlStatusHost\n }),\n __param(0, Self()),\n __metadata(\"design:paramtypes\", [ControlContainer])\n ], NgControlStatusGroup);\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 * Reports that a FormControl is valid, meaning that no errors exist in the input value.\n *\n * @see `status`\n */\nvar VALID = 'VALID';\n/**\n * Reports that a FormControl is invalid, meaning that an error exists in the input value.\n *\n * @see `status`\n */\nvar INVALID = 'INVALID';\n/**\n * Reports that a FormControl is pending, meaning that that async validation is occurring and\n * errors are not yet available for the input value.\n *\n * @see `markAsPending`\n * @see `status`\n */\nvar PENDING = 'PENDING';\n/**\n * Reports that a FormControl is disabled, meaning that the control is exempt from ancestor\n * calculations of validity or value.\n *\n * @see `markAsDisabled`\n * @see `status`\n */\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.hasOwnProperty(name) ? 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 * 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 *\n * @param validator The function that determines the synchronous validity of this control.\n * @param asyncValidator The function that determines 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 * @returns True if the user has not yet changed the value in the UI; compare `dirty`.\n * Programmatic changes to a control's value do not mark it dirty.\n */\n this.pristine = true;\n /**\n * True if the control is marked as `touched`.\n *\n * A control is marked `touched` once the user has triggered\n * a `blur` event on it.\n */\n this.touched = false;\n /** @internal */\n this._onDisabledChange = [];\n }\n Object.defineProperty(AbstractControl.prototype, \"parent\", {\n /**\n * The parent control.\n */\n get: 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` is `VALID`.\n *\n * @see `status`\n *\n * @returns True if the control has passed all of its validation tests,\n * false otherwise.\n */\n get: 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` is `INVALID`.\n *\n * @see `status`\n *\n * @returns True if this control has failed one or more of its validation checks,\n * false otherwise.\n */\n get: 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` is `PENDING`.\n *\n * @see `status`\n *\n * @returns True if this control is in the process of conducting a validation check,\n * false otherwise.\n */\n get: 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` is `DISABLED`.\n *\n * @see `status`\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 * @returns True if the control is disabled, false otherwise.\n */\n get: 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` is not `DISABLED`.\n *\n * @see `status`\n *\n * @returns True if the control has any status other than 'DISABLED',\n * false if the status is 'DISABLED'.\n *\n */\n get: 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 * @returns True if the user has changed the value of this control in the UI; compare `pristine`.\n * Programmatic changes to a control's value do not mark it dirty.\n */\n get: function () { return !this.pristine; },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(AbstractControl.prototype, \"untouched\", {\n /**\n * True if the control has not been marked as touched\n *\n * A control is `untouched` if the user has not yet triggered\n * a `blur` event on it.\n */\n get: function () { return !this.touched; },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(AbstractControl.prototype, \"updateOn\", {\n /**\n * Reports the update strategy of the `AbstractControl` (meaning\n * the event on which the control updates itself).\n * Possible values: `'change'` | `'blur'` | `'submit'`\n * Default value: `'change'`\n */\n get: 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 overwrites any existing sync validators.\n */\n AbstractControl.prototype.setValidators = function (newValidator) {\n this.validator = coerceToValidator(newValidator);\n };\n /**\n * Sets the async validators that are active on this control. Calling this\n * overwrites any existing async validators.\n */\n AbstractControl.prototype.setAsyncValidators = function (newValidator) {\n this.asyncValidator = coerceToAsyncValidator(newValidator);\n };\n /**\n * Empties out the sync validator list.\n */\n AbstractControl.prototype.clearValidators = function () { this.validator = null; };\n /**\n * Empties out the async validator list.\n */\n AbstractControl.prototype.clearAsyncValidators = function () { this.asyncValidator = null; };\n /**\n * Marks the control as `touched`. A control is touched by focus and\n * blur events that do not change the value; compare `markAsDirty`;\n *\n * @param opts Configuration options that determine how the control propagates changes\n * and emits events events after marking is applied.\n * * `onlySelf`: When true, mark only this control. When false or not supplied,\n * marks all direct ancestors. Default is false.\n */\n AbstractControl.prototype.markAsTouched = 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, also marks all children as `untouched`\n * and recalculates the `touched` status of all parent controls.\n *\n * @param opts Configuration options that determine how the control propagates changes\n * and emits events after the marking is applied.\n * * `onlySelf`: When true, mark only this control. When false or not supplied,\n * marks all direct ancestors. Default is false.\n */\n AbstractControl.prototype.markAsUntouched = 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`. A control becomes dirty when\n * the control's is changed through the UI; compare `markAsTouched`.\n *\n * @param opts Configuration options that determine how the control propagates changes\n * and emits events after marking is applied.\n * * `onlySelf`: When true, mark only this control. When false or not supplied,\n * marks all direct ancestors. Default is false.\n */\n AbstractControl.prototype.markAsDirty = 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, marks all children as `pristine`,\n * and recalculates the `pristine` status of all parent\n * controls.\n *\n * @param opts Configuration options that determine how the control emits events after\n * marking is applied.\n * * `onlySelf`: When true, mark only this control. When false or not supplied,\n * marks all direct ancestors. Default is false..\n */\n AbstractControl.prototype.markAsPristine = 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 * A control is pending while the control performs async validation.\n *\n * @param opts Configuration options that determine how the control propagates changes and\n * emits events after marking is applied.\n * * `onlySelf`: When true, mark only this control. When false or not supplied,\n * marks all direct ancestors. Default is false..\n * * `emitEvent`: When true or not supplied (the default), the `statusChanges`\n * observable emits an event with the latest status the control is marked pending.\n * When false, no events are emitted.\n *\n */\n AbstractControl.prototype.markAsPending = 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 is exempt from validation checks and\n * excluded from the aggregate value of any parent. Its status is `DISABLED`.\n *\n * If the control has children, all children are also disabled.\n *\n * @param opts Configuration options that determine how the control propagates\n * changes and emits events after the control is disabled.\n * * `onlySelf`: When true, mark only this control. When false or not supplied,\n * marks all direct ancestors. Default is false..\n * * `emitEvent`: When true or not supplied (the default), both the `statusChanges` and\n * `valueChanges`\n * observables emit events with the latest status and value when the control is disabled.\n * When false, no events are emitted.\n */\n AbstractControl.prototype.disable = 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 is included in validation checks and\n * the aggregate value of its parent. Its status recalculates based on its value and\n * its validators.\n *\n * By default, if the control has children, all children are enabled.\n *\n * @param opts Configure options that control how the control propagates changes and\n * emits events when marked as untouched\n * * `onlySelf`: When true, mark only this control. When false or not supplied,\n * marks all direct ancestors. Default is false..\n * * `emitEvent`: When true or not supplied (the default), both the `statusChanges` and\n * `valueChanges`\n * observables emit events with the latest status and value when the control is enabled.\n * When false, no events are emitted.\n */\n AbstractControl.prototype.enable = 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 /**\n * @param parent Sets the parent of the control\n */\n AbstractControl.prototype.setParent = function (parent) { this._parent = parent; };\n /**\n * Recalculates the value and validation status of the control.\n *\n * By default, it also updates the value and validity of its ancestors.\n *\n * @param opts Configuration options determine how the control propagates changes and emits events\n * after updates and validity checks are applied.\n * * `onlySelf`: When true, only update this control. When false or not supplied,\n * update all direct ancestors. Default is false..\n * * `emitEvent`: When true or not supplied (the default), both the `statusChanges` and\n * `valueChanges`\n * observables emit events with the latest status and value when the control is updated.\n * When false, no events are emitted.\n */\n AbstractControl.prototype.updateValueAndValidity = 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 AbstractControl.prototype._updateTreeValidity = 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 when running validations manually, rather than automatically.\n *\n * Calling `setErrors` also updates the validity of the parent control.\n *\n * @usageNotes\n * ### Manually set the errors for a control\n *\n * ```\n * const login = new FormControl('someLogin');\n * login.setErrors({\n * notUnique: true\n * });\n *\n * expect(login.valid).toEqual(false);\n * expect(login.errors).toEqual({ notUnique: true });\n *\n * login.setValue('someOtherLogin');\n *\n * expect(login.valid).toEqual(true);\n * ```\n */\n AbstractControl.prototype.setErrors = 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 * @param path A dot-delimited string or array of string/number values that define the path to the\n * control.\n *\n * @usageNotes\n * ### Retrieve a nested control\n *\n * For example, to get a `name` control nested within a `person` sub-group:\n *\n * * `this.form.get('person.name');`\n *\n * -OR-\n *\n * * `this.form.get(['person', 'name']);`\n */\n AbstractControl.prototype.get = function (path) { return _find(this, path, '.'); };\n /**\n * Reports error data for a specific error occurring in this control or in another control.\n *\n * @param errorCode The error code for which to retrieve data\n * @param path The path to a control to check. If not supplied, checks for the error in this\n * control.\n *\n * @returns The error data if the control with the given path has the given error, otherwise null\n * or undefined.\n */\n AbstractControl.prototype.getError = function (errorCode, path) {\n var control = path ? this.get(path) : this;\n return control && control.errors ? control.errors[errorCode] : null;\n };\n /**\n * Reports whether the control with the given path has the error specified.\n *\n * @param errorCode The error code for which to retrieve data\n * @param path The path to a control to check. If not supplied, checks for the error in this\n * control.\n * @returns True when the control with the given path has the error, otherwise false.\n */\n AbstractControl.prototype.hasError = 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: 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 AbstractControl.prototype._updateControlsErrors = 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 AbstractControl.prototype._initObservables = 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 AbstractControl.prototype._anyControlsHaveStatus = function (status) {\n return this._anyControls(function (control) { return control.status === status; });\n };\n /** @internal */\n AbstractControl.prototype._anyControlsDirty = function () {\n return this._anyControls(function (control) { return control.dirty; });\n };\n /** @internal */\n AbstractControl.prototype._anyControlsTouched = function () {\n return this._anyControls(function (control) { return control.touched; });\n };\n /** @internal */\n AbstractControl.prototype._updatePristine = 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 AbstractControl.prototype._updateTouched = 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 AbstractControl.prototype._isBoxedValue = 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 AbstractControl.prototype._registerOnCollectionChange = function (fn) { this._onCollectionChange = fn; };\n /** @internal */\n AbstractControl.prototype._setUpdateStrategy = function (opts) {\n if (isOptionsObj(opts) && opts.updateOn != null) {\n this._updateOn = opts.updateOn;\n }\n };\n return AbstractControl;\n}());\n/**\n * Tracks the value and validation status of an individual form control.\n *\n * This is one of the three fundamental building blocks of Angular forms, along with\n * `FormGroup` and `FormArray`. It extends the `AbstractControl` class that\n * implements most of the base functionality for accessing the value, validation status,\n * user interactions and events.\n *\n * @see `AbstractControl`\n * @see [Reactive Forms Guide](guide/reactive-forms)\n * @see [Usage Notes](#usage-notes)\n *\n * @usageNotes\n *\n * ### Initializing Form Controls\n *\n * Instantiate a `FormControl`, with an initial value.\n *\n * ```ts\n * const control = new FormControl('some value');\n * console.log(control.value); // 'some value'\n *```\n *\n * The following example initializes the control with a form state object. The `value`\n * and `disabled` keys are required in this case.\n *\n * ```ts\n * const control = new FormControl({ value: 'n/a', disabled: true });\n * console.log(control.value); // 'n/a'\n * console.log(control.status); // 'DISABLED'\n * ```\n *\n * The following example initializes the control with a sync validator.\n *\n * ```ts\n * const control = new FormControl('', Validators.required);\n * console.log(control.value); // ''\n * console.log(control.status); // 'INVALID'\n * ```\n *\n * The following example initializes the control using an options object.\n *\n * ```ts\n * const control = new FormControl('', {\n * validators: Validators.required,\n * asyncValidators: myAsyncValidator\n * });\n * ```\n *\n * ### Configure the control to update on a blur event\n *\n * Set the `updateOn` option to `'blur'` to update on the blur `event`.\n *\n * ```ts\n * const control = new FormControl('', { updateOn: 'blur' });\n * ```\n *\n * ### Configure the control to update on a submit event\n *\n * Set the `updateOn` option to `'submit'` to update on a submit `event`.\n *\n * ```ts\n * const control = new FormControl('', { updateOn: 'submit' });\n * ```\n *\n * ### Reset the control back to an initial value\n *\n * You reset to a specific form state by passing through a standalone\n * value or a form state object that contains both a value and a disabled state\n * (these are the only two properties that cannot be calculated).\n *\n * ```ts\n * const control = new FormControl('Nancy');\n *\n * console.log(control.value); // 'Nancy'\n *\n * control.reset('Drew');\n *\n * console.log(control.value); // 'Drew'\n * ```\n *\n * ### Reset the control back to an initial value and disabled\n *\n * ```\n * const control = new FormControl('Nancy');\n *\n * console.log(control.value); // 'Nancy'\n * console.log(control.status); // 'VALID'\n *\n * control.reset({ value: 'Drew', disabled: true });\n *\n * console.log(control.value); // 'Drew'\n * console.log(control.status); // 'DISABLED'\n *\n*/\nvar FormControl = /** @class */ (function (_super) {\n __extends(FormControl, _super);\n /**\n * Creates a new `FormControl` instance.\n *\n * @param formState Initializes the control with an initial value,\n * or an object that defines the initial value and disabled state.\n *\n * @param validatorOrOpts A synchronous validator function, or an array of\n * such functions, or an `AbstractControlOptions` object that contains validation functions\n * and a validation trigger.\n *\n * @param asyncValidator A single async validator or array of async validator functions\n *\n */\n 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 * Sets a new value for the form control.\n *\n * @param value The new value for the control.\n * @param options Configuration options that determine how the control proopagates changes\n * and emits events when the value changes.\n * The configuration options are passed to the {@link AbstractControl#updateValueAndValidity\n * updateValueAndValidity} method.\n *\n * * `onlySelf`: When true, each change only affects this control, and not its parent. Default is\n * false.\n * * `emitEvent`: When true or not supplied (the default), both the `statusChanges` and\n * `valueChanges`\n * observables emit events with the latest status and value when the control value is updated.\n * When false, no events are emitted.\n * * `emitModelToViewChange`: When true or not supplied (the default), each change triggers an\n * `onChange` event to\n * update the view.\n * * `emitViewToModelChange`: When true or not supplied (the default), each change triggers an\n * `ngModelChange`\n * event to update the model.\n *\n */\n FormControl.prototype.setValue = 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 * @see `setValue` for options\n */\n FormControl.prototype.patchValue = function (value, options) {\n if (options === void 0) { options = {}; }\n this.setValue(value, options);\n };\n /**\n * Resets the form control, marking it `pristine` and `untouched`, and setting\n * the value to null.\n *\n * @param formState Resets the control with an initial value,\n * or an object that defines the initial value and disabled state.\n *\n * @param options Configuration options that determine how the control propagates changes\n * and emits events after the value changes.\n *\n * * `onlySelf`: When true, each change only affects this control, and not its parent. Default is\n * false.\n * * `emitEvent`: When true or not supplied (the default), both the `statusChanges` and\n * `valueChanges`\n * observables emit events with the latest status and value when the control is reset.\n * When false, no events are emitted.\n *\n */\n FormControl.prototype.reset = 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 FormControl.prototype._updateValue = function () { };\n /**\n * @internal\n */\n FormControl.prototype._anyControls = function (condition) { return false; };\n /**\n * @internal\n */\n FormControl.prototype._allControlsDisabled = function () { return this.disabled; };\n /**\n * Register a listener for change events.\n *\n * @param fn The method that is called when the value changes\n */\n FormControl.prototype.registerOnChange = function (fn) { this._onChange.push(fn); };\n /**\n * @internal\n */\n FormControl.prototype._clearChangeFns = function () {\n this._onChange = [];\n this._onDisabledChange = [];\n this._onCollectionChange = function () { };\n };\n /**\n * Register a listener for disabled events.\n *\n * @param fn The method that is called when the disabled status changes.\n */\n FormControl.prototype.registerOnDisabledChange = function (fn) {\n this._onDisabledChange.push(fn);\n };\n /**\n * @internal\n */\n FormControl.prototype._forEachChild = function (cb) { };\n /** @internal */\n FormControl.prototype._syncPendingControls = 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 * Tracks the value and validity state of a group of `FormControl` instances.\n *\n * A `FormGroup` aggregates the values of each child `FormControl` into one object,\n * with each control name as the key. It calculates its status by reducing the status values\n * of its children. For example, if one of the controls in a group is invalid, the entire\n * group becomes invalid.\n *\n * `FormGroup` is one of the three fundamental building blocks used to define forms in Angular,\n * along with `FormControl` and `FormArray`.\n *\n * When instantiating a `FormGroup`, pass in a collection of child controls as the first\n * argument. The key for each child registers the name for the control.\n *\n * @usageNotes\n *\n * ### Create a form group with 2 controls\n *\n * ```\n * const form = new FormGroup({\n * first: new FormControl('Nancy', Validators.minLength(2)),\n * last: new FormControl('Drew'),\n * });\n *\n * console.log(form.value); // {first: 'Nancy', last; 'Drew'}\n * console.log(form.status); // 'VALID'\n * ```\n *\n * ### Create a form group with a group-level validator\n *\n * You include group-level validators as the second arg, or group-level async\n * validators as the third arg. These come in handy when you want to perform validation\n * that considers the value of more than one child control.\n *\n * ```\n * const form = new FormGroup({\n * password: new FormControl('', Validators.minLength(2)),\n * passwordConfirm: new FormControl('', Validators.minLength(2)),\n * }, passwordMatchValidator);\n *\n *\n * function passwordMatchValidator(g: FormGroup) {\n * return g.get('password').value === g.get('passwordConfirm').value\n * ? null : {'mismatch': true};\n * }\n * ```\n *\n * Like `FormControl` instances, you choose to pass in\n * validators and async validators as part of an options object.\n *\n * ```\n * const form = new FormGroup({\n * password: new FormControl('')\n * passwordConfirm: new FormControl('')\n * }, { validators: passwordMatchValidator, asyncValidators: otherValidator });\n * ```\n *\n * ### Set the updateOn property for all controls in a form group\n *\n * The options object is used to set a default value for each child\n * control's `updateOn` property. If you set `updateOn` to `'blur'` at the\n * group level, all child controls default to 'blur', unless the child\n * has explicitly specified a different `updateOn` value.\n *\n * ```ts\n * const c = new FormGroup({\n * one: new FormControl()\n * }, { updateOn: 'blur' });\n * ```\n */\nvar FormGroup = /** @class */ (function (_super) {\n __extends(FormGroup, _super);\n /**\n * Creates a new `FormGroup` instance.\n *\n * @param controls A collection of child controls. The key for each child is the name\n * under which it is registered.\n *\n * @param validatorOrOpts A synchronous validator function, or an array of\n * such functions, or an `AbstractControlOptions` object that contains validation functions\n * and a validation trigger.\n *\n * @param asyncValidator A single async validator or array of async validator functions\n *\n */\n 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.\n * Use {@link FormGroup#addControl addControl} instead.\n *\n * @param name The control name to register in the collection\n * @param control Provides the control for the given name\n */\n FormGroup.prototype.registerControl = 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 * This method also updates the value and validity of the control.\n *\n * @param name The control name to add to the collection\n * @param control Provides the control for the given name\n */\n FormGroup.prototype.addControl = 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 * @param name The control name to remove from the collection\n */\n FormGroup.prototype.removeControl = 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 * @param name The control name to replace in the collection\n * @param control Provides the control for the given name\n */\n FormGroup.prototype.setControl = 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 * Reports false for disabled controls. If you'd like to check for existence in the group\n * only, use {@link AbstractControl#get get} instead.\n *\n * @param name The control name to check for existence in the collection\n *\n * @returns false for disabled controls, true otherwise.\n */\n FormGroup.prototype.contains = 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 * @usageNotes\n * ### Set the complete value for the form group\n *\n * ```\n * const form = new FormGroup({\n * first: new FormControl(),\n * last: new FormControl()\n * });\n *\n * console.log(form.value); // {first: null, last: null}\n *\n * form.setValue({first: 'Nancy', last: 'Drew'});\n * console.log(form.value); // {first: 'Nancy', last: 'Drew'}\n * ```\n *\n * @throws When strict checks fail, such as setting the value of a control\n * that doesn't exist or if you excluding the value of a control.\n *\n * @param value The new value for the control that matches the structure of the group.\n * @param options Configuration options that determine how the control propagates changes\n * and emits events after the value changes.\n * The configuration options are passed to the {@link AbstractControl#updateValueAndValidity\n * updateValueAndValidity} method.\n *\n * * `onlySelf`: When true, each change only affects this control, and not its parent. Default is\n * false.\n * * `emitEvent`: When true or not supplied (the default), both the `statusChanges` and\n * `valueChanges`\n * observables emit events with the latest status and value when the control value is updated.\n * When false, no events are emitted.\n */\n FormGroup.prototype.setValue = 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 does its best to match the values to the correct controls\n * in the group.\n *\n * It accepts both super-sets and sub-sets of the group without throwing an error.\n *\n * @usageNotes\n * ### Patch the value for a form group\n *\n * ```\n * const form = new FormGroup({\n * first: new FormControl(),\n * last: new FormControl()\n * });\n * console.log(form.value); // {first: null, last: null}\n *\n * form.patchValue({first: 'Nancy'});\n * console.log(form.value); // {first: 'Nancy', last: null}\n * ```\n *\n * @param value The object that matches the structure of the group.\n * @param options Configuration options that determine how the control propagates changes and\n * emits events after the value is patched.\n * * `onlySelf`: When true, each change only affects this control and not its parent. Default is\n * true.\n * * `emitEvent`: When true or not supplied (the default), both the `statusChanges` and\n * `valueChanges`\n * observables emit events with the latest status and value when the control value is updated.\n * When false, no events are emitted.\n * The configuration options are passed to the {@link AbstractControl#updateValueAndValidity\n * updateValueAndValidity} method.\n */\n FormGroup.prototype.patchValue = 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`, marks all descendants are marked `pristine` and `untouched`, and\n * the value of all descendants to null.\n *\n * You reset to a specific form state by passing in a map of states\n * that matches the structure of your form, with control names as keys. The state\n * is a standalone value or a form state object with both a value and a disabled\n * status.\n *\n * @param formState Resets the control with an initial value,\n * or an object that defines the initial value and disabled state.\n *\n * @param options Configuration options that determine how the control propagates changes\n * and emits events when the group is reset.\n * * `onlySelf`: When true, each change only affects this control, and not its parent. Default is\n * false.\n * * `emitEvent`: When true or not supplied (the default), both the `statusChanges` and\n * `valueChanges`\n * observables emit events with the latest status and value when the control is reset.\n * When false, no events are emitted.\n * The configuration options are passed to the {@link AbstractControl#updateValueAndValidity\n * updateValueAndValidity} method.\n *\n * @usageNotes\n *\n * ### Reset the form group values\n *\n * ```ts\n * const form = new FormGroup({\n * first: new FormControl('first name'),\n * last: new FormControl('last name')\n * });\n *\n * console.log(form.value); // {first: 'first name', last: 'last name'}\n *\n * form.reset({ first: 'name', last: 'last name' });\n *\n * console.log(form.value); // {first: 'name', last: 'last name'}\n * ```\n *\n * ### Reset the form group values and disabled status\n *\n * ```\n * const form = new FormGroup({\n * first: new FormControl('first name'),\n * last: new FormControl('last name')\n * });\n *\n * form.reset({\n * first: {value: 'name', disabled: true},\n * last: 'last'\n * });\n *\n * console.log(this.form.value); // {first: 'name', last: 'last name'}\n * console.log(this.form.get('first').status); // 'DISABLED'\n * ```\n */\n FormGroup.prototype.reset = 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 * Retrieves all values regardless of disabled status.\n * The `value` property is the best way to get the value of the group, because\n * it excludes disabled controls in the `FormGroup`.\n */\n FormGroup.prototype.getRawValue = 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 FormGroup.prototype._syncPendingControls = 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 FormGroup.prototype._throwIfControlMissing = 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 FormGroup.prototype._forEachChild = function (cb) {\n var _this = this;\n Object.keys(this.controls).forEach(function (k) { return cb(_this.controls[k], k); });\n };\n /** @internal */\n FormGroup.prototype._setUpControls = function () {\n var _this = this;\n this._forEachChild(function (control) {\n control.setParent(_this);\n control._registerOnCollectionChange(_this._onCollectionChange);\n });\n };\n /** @internal */\n FormGroup.prototype._updateValue = function () { this.value = this._reduceValue(); };\n /** @internal */\n FormGroup.prototype._anyControls = 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 FormGroup.prototype._reduceValue = 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 FormGroup.prototype._reduceChildren = 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 FormGroup.prototype._allControlsDisabled = function () {\n var e_1, _a;\n try {\n for (var _b = __values(Object.keys(this.controls)), _c = _b.next(); !_c.done; _c = _b.next()) {\n var controlName = _c.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 (_c && !_c.done && (_a = _b.return)) _a.call(_b);\n }\n finally { if (e_1) throw e_1.error; }\n }\n return Object.keys(this.controls).length > 0 || this.disabled;\n };\n /** @internal */\n FormGroup.prototype._checkAllValuesPresent = 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 * Tracks the value and validity state of an array of `FormControl`,\n * `FormGroup` or `FormArray` instances.\n *\n * A `FormArray` aggregates the values of each child `FormControl` into an array.\n * It calculates its status by reducing the status values of its children. For example, if one of\n * the controls in a `FormArray` is invalid, the entire array becomes invalid.\n *\n * `FormArray` is one of the three fundamental building blocks used to define forms in Angular,\n * along with `FormControl` and `FormGroup`.\n *\n * @usageNotes\n *\n * ### Create an array of form controls\n *\n * ```\n * const arr = new FormArray([\n * new FormControl('Nancy', Validators.minLength(2)),\n * new FormControl('Drew'),\n * ]);\n *\n * console.log(arr.value); // ['Nancy', 'Drew']\n * console.log(arr.status); // 'VALID'\n * ```\n *\n * ### Create a form array with array-level validators\n *\n * You include array-level validators and async validators. These come in handy\n * when you want to perform validation that considers the value of more than one child\n * control.\n *\n * The two types of validators are passed in separately as the second and third arg\n * respectively, or together as part of an options object.\n *\n * ```\n * const arr = new FormArray([\n * new FormControl('Nancy'),\n * new FormControl('Drew')\n * ], {validators: myValidator, asyncValidators: myAsyncValidator});\n * ```\n *\n * ### Set the updateOn property for all controls in a form array\n *\n * The options object is used to set a default value for each child\n * control's `updateOn` property. If you set `updateOn` to `'blur'` at the\n * array level, all child controls default to 'blur', unless the child\n * has explicitly specified a different `updateOn` value.\n *\n * ```ts\n * const arr = new FormArray([\n * new FormControl()\n * ], {updateOn: 'blur'});\n * ```\n *\n * ### Adding or removing controls from a form array\n *\n * To change the controls in the array, use the `push`, `insert`, 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 result in strange and unexpected behavior such\n * as broken change detection.\n *\n *\n */\nvar FormArray = /** @class */ (function (_super) {\n __extends(FormArray, _super);\n /**\n * Creates a new `FormArray` instance.\n *\n * @param controls An array of child controls. Each child control is given an index\n * where it is registered.\n *\n * @param validatorOrOpts A synchronous validator function, or an array of\n * such functions, or an `AbstractControlOptions` object that contains validation functions\n * and a validation trigger.\n *\n * @param asyncValidator A single async validator or array of async validator functions\n *\n */\n 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 * @param index Index in the array to retrieve the control\n */\n FormArray.prototype.at = function (index) { return this.controls[index]; };\n /**\n * Insert a new `AbstractControl` at the end of the array.\n *\n * @param control Form control to be inserted\n */\n FormArray.prototype.push = function (control) {\n this.controls.push(control);\n this._registerControl(control);\n this.updateValueAndValidity();\n this._onCollectionChange();\n };\n /**\n * Insert a new `AbstractControl` at the given `index` in the array.\n *\n * @param index Index in the array to insert the control\n * @param control Form control to be inserted\n */\n FormArray.prototype.insert = function (index, control) {\n this.controls.splice(index, 0, control);\n this._registerControl(control);\n this.updateValueAndValidity();\n };\n /**\n * Remove the control at the given `index` in the array.\n *\n * @param index Index in the array to remove the control\n */\n FormArray.prototype.removeAt = 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 * @param index Index in the array to replace the control\n * @param control The `AbstractControl` control to replace the existing control\n */\n FormArray.prototype.setControl = 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: 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, and throws an error if you try\n * to set the value of a control that doesn't exist or if you exclude the\n * value of a control.\n *\n * @usageNotes\n * ### Set the values for the controls in the form array\n *\n * ```\n * const arr = new FormArray([\n * new FormControl(),\n * new FormControl()\n * ]);\n * console.log(arr.value); // [null, null]\n *\n * arr.setValue(['Nancy', 'Drew']);\n * console.log(arr.value); // ['Nancy', 'Drew']\n * ```\n *\n * @param value Array of values for the controls\n * @param options Configure options that determine how the control propagates changes and\n * emits events after the value changes\n *\n * * `onlySelf`: When true, each change only affects this control, and not its parent. Default\n * is false.\n * * `emitEvent`: When true or not supplied (the default), both the `statusChanges` and\n * `valueChanges`\n * observables emit events with the latest status and value when the control value is updated.\n * When false, no events are emitted.\n * The configuration options are passed to the {@link AbstractControl#updateValueAndValidity\n * updateValueAndValidity} method.\n */\n FormArray.prototype.setValue = 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 does its best to match the values to the correct\n * controls in the group.\n *\n * It accepts both super-sets and sub-sets of the array without throwing an error.\n *\n * @usageNotes\n * ### Patch the values for controls in a form array\n *\n * ```\n * const arr = new FormArray([\n * new FormControl(),\n * new FormControl()\n * ]);\n * console.log(arr.value); // [null, null]\n *\n * arr.patchValue(['Nancy']);\n * console.log(arr.value); // ['Nancy', null]\n * ```\n *\n * @param value Array of latest values for the controls\n * @param options Configure options that determine how the control propagates changes and\n * emits events after the value changes\n *\n * * `onlySelf`: When true, each change only affects this control, and not its parent. Default\n * is false.\n * * `emitEvent`: When true or not supplied (the default), both the `statusChanges` and\n * `valueChanges`\n * observables emit events with the latest status and value when the control value is updated.\n * When false, no events are emitted.\n * The configuration options are passed to the {@link AbstractControl#updateValueAndValidity\n * updateValueAndValidity} method.\n */\n FormArray.prototype.patchValue = 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` and all descendants are marked `pristine` and `untouched`, and the\n * value of all descendants to null or null maps.\n *\n * You reset to a specific form state by passing in an array of states\n * that matches the structure of the control. The state is a standalone value\n * or a form state object with both a value and a disabled status.\n *\n * @usageNotes\n * ### Reset the values in a form array\n *\n * ```ts\n * const arr = new FormArray([\n * new FormControl(),\n * new FormControl()\n * ]);\n * arr.reset(['name', 'last name']);\n *\n * console.log(this.arr.value); // ['name', 'last name']\n * ```\n *\n * ### Reset the values in a form array and the disabled status for the first control\n *\n * ```\n * this.arr.reset([\n * {value: 'name', disabled: true},\n * 'last'\n * ]);\n *\n * console.log(this.arr.value); // ['name', 'last name']\n * console.log(this.arr.get(0).status); // 'DISABLED'\n * ```\n *\n * @param value Array of values for the controls\n * @param options Configure options that determine how the control propagates changes and\n * emits events after the value changes\n *\n * * `onlySelf`: When true, each change only affects this control, and not its parent. Default\n * is false.\n * * `emitEvent`: When true or not supplied (the default), both the `statusChanges` and\n * `valueChanges`\n * observables emit events with the latest status and value when the control is reset.\n * When false, no events are emitted.\n * The configuration options are passed to the {@link AbstractControl#updateValueAndValidity\n * updateValueAndValidity} method.\n */\n FormArray.prototype.reset = 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 * Reports all values regardless of disabled status.\n * For enabled controls only, the `value` property is the best way to get the value of the array.\n */\n FormArray.prototype.getRawValue = function () {\n return this.controls.map(function (control) {\n return control instanceof FormControl ? control.value : control.getRawValue();\n });\n };\n /** @internal */\n FormArray.prototype._syncPendingControls = 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 FormArray.prototype._throwIfControlMissing = 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 FormArray.prototype._forEachChild = function (cb) {\n this.controls.forEach(function (control, index) { cb(control, index); });\n };\n /** @internal */\n FormArray.prototype._updateValue = 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 FormArray.prototype._anyControls = function (condition) {\n return this.controls.some(function (control) { return control.enabled && condition(control); });\n };\n /** @internal */\n FormArray.prototype._setUpControls = function () {\n var _this = this;\n this._forEachChild(function (control) { return _this._registerControl(control); });\n };\n /** @internal */\n FormArray.prototype._checkAllValuesPresent = 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 FormArray.prototype._allControlsDisabled = function () {\n var e_2, _a;\n try {\n for (var _b = __values(this.controls), _c = _b.next(); !_c.done; _c = _b.next()) {\n var control = _c.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 (_c && !_c.done && (_a = _b.return)) _a.call(_b);\n }\n finally { if (e_2) throw e_2.error; }\n }\n return this.controls.length > 0 || this.disabled;\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 */\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 =\n 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 NgForm.prototype._findContainer = function (path) {\n path.pop();\n return path.length ? this.form.get(path) : this.form;\n };\n __decorate([\n Input('ngFormOptions'),\n __metadata(\"design:type\", Object)\n ], NgForm.prototype, \"options\", void 0);\n NgForm = __decorate([\n Directive({\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 __param(0, Optional()), __param(0, Self()), __param(0, Inject(NG_VALIDATORS)),\n __param(1, Optional()), __param(1, Self()), __param(1, Inject(NG_ASYNC_VALIDATORS)),\n __metadata(\"design:paramtypes\", [Array, Array])\n ], NgForm);\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 * @ngModule FormsModule\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 NgModelGroup_1 = NgModelGroup;\n /** @internal */\n NgModelGroup.prototype._checkParentType = function () {\n if (!(this._parent instanceof NgModelGroup_1) && !(this._parent instanceof NgForm)) {\n TemplateDrivenErrors.modelGroupParentException();\n }\n };\n var NgModelGroup_1;\n __decorate([\n Input('ngModelGroup'),\n __metadata(\"design:type\", String)\n ], NgModelGroup.prototype, \"name\", void 0);\n NgModelGroup = NgModelGroup_1 = __decorate([\n Directive({ selector: '[ngModelGroup]', providers: [modelGroupProvider], exportAs: 'ngModelGroup' }),\n __param(0, Host()), __param(0, SkipSelf()),\n __param(1, Optional()), __param(1, Self()), __param(1, Inject(NG_VALIDATORS)),\n __param(2, Optional()), __param(2, Self()), __param(2, Inject(NG_ASYNC_VALIDATORS)),\n __metadata(\"design:paramtypes\", [ControlContainer, Array, Array])\n ], NgModelGroup);\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 * @ngModule FormsModule\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 __decorate([\n Input(),\n __metadata(\"design:type\", String)\n ], NgModel.prototype, \"name\", void 0);\n __decorate([\n Input('disabled'),\n __metadata(\"design:type\", Boolean)\n ], NgModel.prototype, \"isDisabled\", void 0);\n __decorate([\n Input('ngModel'),\n __metadata(\"design:type\", Object)\n ], NgModel.prototype, \"model\", void 0);\n __decorate([\n Input('ngModelOptions'),\n __metadata(\"design:type\", Object)\n ], NgModel.prototype, \"options\", void 0);\n __decorate([\n Output('ngModelChange'),\n __metadata(\"design:type\", Object)\n ], NgModel.prototype, \"update\", void 0);\n NgModel = __decorate([\n Directive({\n selector: '[ngModel]:not([formControlName]):not([formControl])',\n providers: [formControlBinding],\n exportAs: 'ngModel'\n }),\n __param(0, Optional()), __param(0, Host()),\n __param(1, Optional()), __param(1, Self()), __param(1, Inject(NG_VALIDATORS)),\n __param(2, Optional()), __param(2, Self()), __param(2, Inject(NG_ASYNC_VALIDATORS)),\n __param(3, Optional()), __param(3, Self()), __param(3, Inject(NG_VALUE_ACCESSOR)),\n __metadata(\"design:paramtypes\", [ControlContainer,\n Array,\n Array, Array])\n ], NgModel);\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 * @usageNotes\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 * ### 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 *\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 * @ngModule ReactiveFormsModule\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 FormControlDirective_1 = FormControlDirective;\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_1, 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 var FormControlDirective_1;\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 __decorate([\n Input('formControl'),\n __metadata(\"design:type\", FormControl)\n ], FormControlDirective.prototype, \"form\", void 0);\n __decorate([\n Input('disabled'),\n __metadata(\"design:type\", Boolean),\n __metadata(\"design:paramtypes\", [Boolean])\n ], FormControlDirective.prototype, \"isDisabled\", null);\n __decorate([\n Input('ngModel'),\n __metadata(\"design:type\", Object)\n ], FormControlDirective.prototype, \"model\", void 0);\n __decorate([\n Output('ngModelChange'),\n __metadata(\"design:type\", Object)\n ], FormControlDirective.prototype, \"update\", void 0);\n FormControlDirective = FormControlDirective_1 = __decorate([\n Directive({ selector: '[formControl]', providers: [formControlBinding$1], exportAs: 'ngForm' }),\n __param(0, Optional()), __param(0, Self()), __param(0, Inject(NG_VALIDATORS)),\n __param(1, Optional()), __param(1, Self()), __param(1, Inject(NG_ASYNC_VALIDATORS)),\n __param(2, Optional()), __param(2, Self()), __param(2, Inject(NG_VALUE_ACCESSOR)),\n __param(3, Optional()), __param(3, Inject(NG_MODEL_WITH_FORM_CONTROL_WARNING)),\n __metadata(\"design:paramtypes\", [Array,\n Array, Array, Object])\n ], FormControlDirective);\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 * @usageNotes\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 * @ngModule ReactiveFormsModule\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 FormGroupDirective.prototype._updateDomValue = 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 __decorate([\n Input('formGroup'),\n __metadata(\"design:type\", FormGroup)\n ], FormGroupDirective.prototype, \"form\", void 0);\n __decorate([\n Output(),\n __metadata(\"design:type\", Object)\n ], FormGroupDirective.prototype, \"ngSubmit\", void 0);\n FormGroupDirective = __decorate([\n Directive({\n selector: '[formGroup]',\n providers: [formDirectiveProvider$1],\n host: { '(submit)': 'onSubmit($event)', '(reset)': 'onReset()' },\n exportAs: 'ngForm'\n }),\n __param(0, Optional()), __param(0, Self()), __param(0, Inject(NG_VALIDATORS)),\n __param(1, Optional()), __param(1, Self()), __param(1, Inject(NG_ASYNC_VALIDATORS)),\n __metadata(\"design:paramtypes\", [Array, Array])\n ], FormGroupDirective);\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 * @usageNotes\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 * @ngModule ReactiveFormsModule\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 FormGroupName.prototype._checkParentType = function () {\n if (_hasInvalidParent(this._parent)) {\n ReactiveErrors.groupParentException();\n }\n };\n __decorate([\n Input('formGroupName'),\n __metadata(\"design:type\", String)\n ], FormGroupName.prototype, \"name\", void 0);\n FormGroupName = __decorate([\n Directive({ selector: '[formGroupName]', providers: [formGroupNameProvider] }),\n __param(0, Optional()), __param(0, Host()), __param(0, SkipSelf()),\n __param(1, Optional()), __param(1, Self()), __param(1, Inject(NG_VALIDATORS)),\n __param(2, Optional()), __param(2, Self()), __param(2, Inject(NG_ASYNC_VALIDATORS)),\n __metadata(\"design:paramtypes\", [ControlContainer, Array, Array])\n ], FormGroupName);\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 * @usageNotes\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 * @ngModule ReactiveFormsModule\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 __decorate([\n Input('formArrayName'),\n __metadata(\"design:type\", String)\n ], FormArrayName.prototype, \"name\", void 0);\n FormArrayName = __decorate([\n Directive({ selector: '[formArrayName]', providers: [formArrayNameProvider] }),\n __param(0, Optional()), __param(0, Host()), __param(0, SkipSelf()),\n __param(1, Optional()), __param(1, Self()), __param(1, Inject(NG_VALIDATORS)),\n __param(2, Optional()), __param(2, Self()), __param(2, Inject(NG_ASYNC_VALIDATORS)),\n __metadata(\"design:paramtypes\", [ControlContainer, Array, Array])\n ], FormArrayName);\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 * @usageNotes\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 * ### 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 *\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 * @ngModule ReactiveFormsModule\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 FormControlName_1 = FormControlName;\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_1, 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 var FormControlName_1;\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 __decorate([\n Input('formControlName'),\n __metadata(\"design:type\", String)\n ], FormControlName.prototype, \"name\", void 0);\n __decorate([\n Input('disabled'),\n __metadata(\"design:type\", Boolean),\n __metadata(\"design:paramtypes\", [Boolean])\n ], FormControlName.prototype, \"isDisabled\", null);\n __decorate([\n Input('ngModel'),\n __metadata(\"design:type\", Object)\n ], FormControlName.prototype, \"model\", void 0);\n __decorate([\n Output('ngModelChange'),\n __metadata(\"design:type\", Object)\n ], FormControlName.prototype, \"update\", void 0);\n FormControlName = FormControlName_1 = __decorate([\n Directive({ selector: '[formControlName]', providers: [controlNameBinding] }),\n __param(0, Optional()), __param(0, Host()), __param(0, SkipSelf()),\n __param(1, Optional()), __param(1, Self()), __param(1, Inject(NG_VALIDATORS)),\n __param(2, Optional()), __param(2, Self()), __param(2, Inject(NG_ASYNC_VALIDATORS)),\n __param(3, Optional()), __param(3, Self()), __param(3, Inject(NG_VALUE_ACCESSOR)),\n __param(4, Optional()), __param(4, Inject(NG_MODEL_WITH_FORM_CONTROL_WARNING)),\n __metadata(\"design:paramtypes\", [ControlContainer,\n Array,\n Array, Array, Object])\n ], FormControlName);\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 * @usageNotes\n * ### Example\n *\n * ```\n * <input name=\"fullName\" ngModel required>\n * ```\n *\n * @ngModule FormsModule\n * @ngModule ReactiveFormsModule\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 (control) {\n return this.required ? Validators.required(control) : null;\n };\n RequiredValidator.prototype.registerOnValidatorChange = function (fn) { this._onChange = fn; };\n __decorate([\n Input(),\n __metadata(\"design:type\", Object),\n __metadata(\"design:paramtypes\", [Object])\n ], RequiredValidator.prototype, \"required\", null);\n RequiredValidator = __decorate([\n Directive({\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 ], RequiredValidator);\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 * @usageNotes\n * ### Example\n *\n * ```\n * <input type=\"checkbox\" name=\"active\" ngModel required>\n * ```\n *\n * @experimental\n * @ngModule FormsModule\n * @ngModule ReactiveFormsModule\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 (control) {\n return this.required ? Validators.requiredTrue(control) : null;\n };\n CheckboxRequiredValidator = __decorate([\n Directive({\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 ], CheckboxRequiredValidator);\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 * @usageNotes\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 * @ngModule FormsModule\n * @ngModule ReactiveFormsModule\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 (control) {\n return this._enabled ? Validators.email(control) : null;\n };\n EmailValidator.prototype.registerOnValidatorChange = function (fn) { this._onChange = fn; };\n __decorate([\n Input(),\n __metadata(\"design:type\", Object),\n __metadata(\"design:paramtypes\", [Object])\n ], EmailValidator.prototype, \"email\", null);\n EmailValidator = __decorate([\n Directive({\n selector: '[email][formControlName],[email][formControl],[email][ngModel]',\n providers: [EMAIL_VALIDATOR]\n })\n ], EmailValidator);\n return EmailValidator;\n}());\n/**\n * Provider which adds `MinLengthValidator` to `NG_VALIDATORS`.\n *\n * @usageNotes\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 * @ngModule FormsModule\n * @ngModule ReactiveFormsModule\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 (control) {\n return this.minlength == null ? null : this._validator(control);\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 __decorate([\n Input(),\n __metadata(\"design:type\", String)\n ], MinLengthValidator.prototype, \"minlength\", void 0);\n MinLengthValidator = __decorate([\n Directive({\n selector: '[minlength][formControlName],[minlength][formControl],[minlength][ngModel]',\n providers: [MIN_LENGTH_VALIDATOR],\n host: { '[attr.minlength]': 'minlength ? minlength : null' }\n })\n ], MinLengthValidator);\n return MinLengthValidator;\n}());\n/**\n * Provider which adds `MaxLengthValidator` to `NG_VALIDATORS`.\n *\n * @usageNotes\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`, or control with `ngModel` that also has a `maxlength` attribute.\n *\n * @ngModule FormsModule\n * @ngModule ReactiveFormsModule\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 (control) {\n return this.maxlength != null ? this._validator(control) : 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 __decorate([\n Input(),\n __metadata(\"design:type\", String)\n ], MaxLengthValidator.prototype, \"maxlength\", void 0);\n MaxLengthValidator = __decorate([\n Directive({\n selector: '[maxlength][formControlName],[maxlength][formControl],[maxlength][ngModel]',\n providers: [MAX_LENGTH_VALIDATOR],\n host: { '[attr.maxlength]': 'maxlength ? maxlength : null' }\n })\n ], MaxLengthValidator);\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 * @usageNotes\n * ### Example\n *\n * ```\n * <input [name]=\"fullName\" pattern=\"[a-zA-Z ]*\" ngModel>\n * ```\n *\n * @ngModule FormsModule\n * @ngModule ReactiveFormsModule\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 (control) { return this._validator(control); };\n PatternValidator.prototype.registerOnValidatorChange = function (fn) { this._onChange = fn; };\n PatternValidator.prototype._createValidator = function () { this._validator = Validators.pattern(this.pattern); };\n __decorate([\n Input(),\n __metadata(\"design:type\", Object)\n ], PatternValidator.prototype, \"pattern\", void 0);\n PatternValidator = __decorate([\n Directive({\n selector: '[pattern][formControlName],[pattern][formControl],[pattern][ngModel]',\n providers: [PATTERN_VALIDATOR],\n host: { '[attr.pattern]': 'pattern ? pattern : null' }\n })\n ], PatternValidator);\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 * Creates an `AbstractControl` from a user-specified configuration.\n *\n * The `FormBuilder` provides syntactic sugar that shortens creating instances of a `FormControl`,\n * `FormGroup`, or `FormArray`. It reduces the amount of boilerplate needed to build complex\n * forms.\n *\n * @see [Reactive Forms Guide](/guide/reactive-forms)\n *\n */\nvar FormBuilder = /** @class */ (function () {\n function FormBuilder() {\n }\n /**\n * @description\n * Construct a new `FormGroup` instance.\n *\n * @param controlsConfig A collection of child controls. The key for each child is the name\n * under which it is registered.\n *\n * @param extra An object of configuration options for the `FormGroup`.\n * * `validator`: A synchronous validator function, or an array of validator functions\n * * `asyncValidator`: A single async validator or array of async validator functions\n *\n */\n FormBuilder.prototype.group = 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 * @description\n * Construct a new `FormControl` instance.\n *\n * @param formState Initializes the control with an initial value,\n * or an object that defines the initial value and disabled state.\n *\n * @param validator A synchronous validator function, or an array of synchronous validator\n * functions.\n *\n * @param asyncValidator A single async validator or array of async validator functions\n *\n * @usageNotes\n *\n * ### Initialize a control as disabled\n *\n * The following example returns a control with an initial value in a disabled state.\n *\n * <code-example path=\"forms/ts/formBuilder/form_builder_example.ts\"\n * linenums=\"false\" region=\"disabled-control\">\n * </code-example>\n *\n */\n FormBuilder.prototype.control = function (formState, validator, asyncValidator) {\n return new FormControl(formState, validator, asyncValidator);\n };\n /**\n * @description\n * Construct a new `FormArray` instance.\n *\n * @param controlsConfig An array of child controls. The key for each child control is its index\n * in the array.\n *\n * @param validator A synchronous validator function, or an array of synchronous validator\n * functions.\n *\n * @param asyncValidator A single async validator or array of async validator functions\n */\n FormBuilder.prototype.array = 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 FormBuilder.prototype._reduceControls = 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 FormBuilder.prototype._createControl = 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 = __decorate([\n Injectable()\n ], FormBuilder);\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 */\nvar VERSION = new Version('6.1.10');\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code 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 * @ngModule ReactiveFormsModule\n * @ngModule FormsModule\n */\nvar NgNoValidate = /** @class */ (function () {\n function NgNoValidate() {\n }\n NgNoValidate = __decorate([\n Directive({\n selector: 'form:not([ngNoForm]):not([ngNativeValidate])',\n host: { 'novalidate': '' },\n })\n ], NgNoValidate);\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 = __decorate([\n NgModule({\n declarations: SHARED_FORM_DIRECTIVES,\n exports: SHARED_FORM_DIRECTIVES,\n })\n ], InternalFormsSharedModule);\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 * Exports the required providers and directives for template-driven forms,\n * making them available for import by NgModules that import this module.\n * @see [Forms](guide/forms)\n *\n * @see [Forms Guide](/guide/forms)\n */\nvar FormsModule = /** @class */ (function () {\n function FormsModule() {\n }\n FormsModule = __decorate([\n NgModule({\n declarations: TEMPLATE_DRIVEN_DIRECTIVES,\n providers: [RadioControlRegistry],\n exports: [InternalFormsSharedModule, TEMPLATE_DRIVEN_DIRECTIVES]\n })\n ], FormsModule);\n return FormsModule;\n}());\n/**\n * Exports the required infrastructure and directives for reactive forms,\n * making them available for import by NgModules that import this module.\n * @see [Forms](guide/reactive-forms)\n *\n * @see [Reactive Forms Guide](/guide/reactive-forms)\n *\n */\nvar ReactiveFormsModule = /** @class */ (function () {\n function ReactiveFormsModule() {\n }\n ReactiveFormsModule_1 = ReactiveFormsModule;\n /**\n * @description\n * Provides options for configuring the reactive forms module.\n *\n * @param opts An object of configuration options `warnOnNgModelWithFormControl` Configures when\n * to emit a warning when an `ngModel binding is used with reactive form directives.\n */\n ReactiveFormsModule.withConfig = function (opts) {\n return {\n ngModule: ReactiveFormsModule_1,\n providers: [{\n provide: NG_MODEL_WITH_FORM_CONTROL_WARNING,\n useValue: opts.warnOnNgModelWithFormControl\n }]\n };\n };\n var ReactiveFormsModule_1;\n ReactiveFormsModule = ReactiveFormsModule_1 = __decorate([\n NgModule({\n declarations: [REACTIVE_DRIVEN_DIRECTIVES],\n providers: [FormBuilder, RadioControlRegistry],\n exports: [InternalFormsSharedModule, REACTIVE_DRIVEN_DIRECTIVES]\n })\n ], ReactiveFormsModule);\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// 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","/**\n * @license Angular v6.1.10\n * (c) 2010-2018 Google, Inc. https://angular.io/\n * License: MIT\n */\n\nimport { Identifiers, getUrlScheme, syntaxError, StaticSymbolCache, JitCompiler, ProviderMeta, I18NHtmlParser, ViewCompiler, CompileMetadataResolver, UrlResolver, TemplateParser, NgModuleCompiler, JitSummaryResolver, SummaryResolver, StyleCompiler, PipeResolver, ElementSchemaRegistry, DomElementSchemaRegistry, ResourceLoader, NgModuleResolver, HtmlParser, CompileReflector, CompilerConfig, DirectiveNormalizer, DirectiveResolver, Lexer, Parser } from '@angular/compiler';\nimport { ANALYZE_FOR_ENTRY_COMPONENTS, ChangeDetectionStrategy, ChangeDetectorRef, ComponentFactory, ComponentFactoryResolver, ComponentRef, ElementRef, Injector, LOCALE_ID, NgModuleFactory, NgModuleRef, QueryList, Renderer, SecurityContext, TRANSLATIONS_FORMAT, TemplateRef, ViewContainerRef, ViewEncapsulation, ɵCodegenComponentFactoryResolver, ɵEMPTY_ARRAY, ɵEMPTY_MAP, ɵReflectionCapabilities, ɵand, ɵccf, ɵcmf, ɵcrt, ɵdid, ɵeld, ɵinlineInterpolate, ɵinterpolate, ɵmod, ɵmpd, ɵncd, ɵnov, ɵpad, ɵpid, ɵpod, ɵppd, ɵprd, ɵqud, ɵregisterModuleFactory, ɵstringify, ɵted, ɵunv, ɵvid, Compiler, Inject, InjectionToken, Optional, PACKAGE_ROOT_URL, TRANSLATIONS, isDevMode, ɵConsole, MissingTranslationStrategy, COMPILER_OPTIONS, CompilerFactory, createPlatformFactory, platformCore, Injectable, PLATFORM_ID, ɵglobal, Version } from '@angular/core';\nimport { __extends, __spread, __decorate } 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) { return ({\n ngModuleFactory: result.ngModuleFactory,\n componentFactories: result.componentFactories,\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 CompilerImpl.prototype.getModuleId = function (moduleType) {\n var meta = this._metadataResolver.getNgModuleMetadata(moduleType);\n return meta && meta.id || undefined;\n };\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 = __decorate([\n Injectable()\n ], ResourceLoaderImpl);\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 */\nvar VERSION = new Version('6.1.10');\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code 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: [] }];\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// 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","/**\n * @license Angular v6.1.10\n * (c) 2010-2018 Google, Inc. https://angular.io/\n * License: MIT\n */\n\nimport { __decorate, __param, __metadata, __assign, __extends, __spread } from 'tslib';\nimport { ɵparseCookieValue, DOCUMENT, PlatformLocation, isPlatformServer, CommonModule, ɵPLATFORM_BROWSER_ID } from '@angular/common';\nimport { ɵglobal, Inject, Injectable, APP_INITIALIZER, ApplicationInitStatus, InjectionToken, Injector, setTestabilityGetter, Version, ApplicationRef, inject, defineInjectable, NgZone, getDebugNode, NgProbeToken, Optional, NgModule, APP_ID, PLATFORM_ID, PLATFORM_INITIALIZER, Sanitizer, createPlatformFactory, platformCore, ErrorHandler, ɵAPP_ROOT, ɵConsole, RendererFactory2, Testability, ApplicationModule, SkipSelf, SecurityContext, ɵ_sanitizeHtml, ɵ_sanitizeStyle, ɵ_sanitizeUrl, ViewEncapsulation, RendererStyleFlags2 } from '@angular/core';\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this 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}\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: 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 var _a;\n (_a = el)[methodName].apply(_a, __spread(args));\n };\n // TODO(tbosch): move this into a separate environment class once we have it\n BrowserDomAdapter.prototype.logError = 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 BrowserDomAdapter.prototype.supportsWebAnimation = 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 BrowserPlatformLocation.prototype._init = 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 = __decorate([\n Injectable(),\n __param(0, Inject(DOCUMENT$1)),\n __metadata(\"design:paramtypes\", [Object])\n ], BrowserPlatformLocation);\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 * 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 * 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 * The injection token for the event-manager plug-in service.\n */\nvar EVENT_MANAGER_PLUGINS = new InjectionToken('EventManagerPlugins');\n/**\n * An injectable service that provides event management for Angular\n * through a browser plug-in.\n */\nvar EventManager = /** @class */ (function () {\n /**\n * Initializes an instance of the event-manager service.\n */\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 /**\n * Registers a handler for a specific element and event.\n *\n * @param element The HTML element to receive event notifications.\n * @param eventName The name of the event to listen for.\n * @param handler A function to call when the notification occurs. Receives the\n * event object as an argument.\n * @returns A callback function that can be used to remove the handler.\n */\n EventManager.prototype.addEventListener = function (element, eventName, handler) {\n var plugin = this._findPluginFor(eventName);\n return plugin.addEventListener(element, eventName, handler);\n };\n /**\n * Registers a global handler for an event in a target view.\n *\n * @param target A target for global event notifications. One of \"window\", \"document\", or \"body\".\n * @param eventName The name of the event to listen for.\n * @param handler A function to call when the notification occurs. Receives the\n * event object as an argument.\n * @returns A callback function that can be used to remove the handler.\n */\n EventManager.prototype.addGlobalEventListener = function (target, eventName, handler) {\n var plugin = this._findPluginFor(eventName);\n return plugin.addGlobalEventListener(target, eventName, handler);\n };\n /**\n * Retrieves the compilation zone in which event listeners are registered.\n */\n EventManager.prototype.getZone = function () { return this._zone; };\n /** @internal */\n EventManager.prototype._findPluginFor = 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 = __decorate([\n Injectable(),\n __param(0, Inject(EVENT_MANAGER_PLUGINS)),\n __metadata(\"design:paramtypes\", [Array, NgZone])\n ], EventManager);\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 = __decorate([\n Injectable()\n ], SharedStylesHost);\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 = __decorate([\n Injectable(),\n __param(0, Inject(DOCUMENT$1)),\n __metadata(\"design:paramtypes\", [Object])\n ], DomSharedStylesHost);\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 case ViewEncapsulation.ShadowDom:\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 = __decorate([\n Injectable(),\n __metadata(\"design:paramtypes\", [EventManager, DomSharedStylesHost])\n ], DomRendererFactory2);\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 if (component.encapsulation === ViewEncapsulation.ShadowDom) {\n _this.shadowRoot = hostEl.attachShadow({ mode: 'open' });\n }\n else {\n _this.shadowRoot = hostEl.createShadowRoot();\n }\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, platformId) {\n var _this = _super.call(this, doc) || this;\n _this.ngZone = ngZone;\n if (!platformId || !isPlatformServer(platformId)) {\n _this.patchEvent();\n }\n return _this;\n }\n DomEventsPlugin.prototype.patchEvent = function () {\n if (typeof Event === 'undefined' || !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 DomEventsPlugin.prototype.supports = function (eventName) { return true; };\n DomEventsPlugin.prototype.addEventListener = function (element, eventName, handler) {\n var _this = this;\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 = __decorate([\n Injectable(),\n __param(0, Inject(DOCUMENT$1)),\n __param(2, Optional()), __param(2, Inject(PLATFORM_ID)),\n __metadata(\"design:paramtypes\", [Object, NgZone, Object])\n ], DomEventsPlugin);\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 */\n/**\n * Supported HammerJS recognizer event names.\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 * DI token for providing [HammerJS](http://hammerjs.github.io/) support to Angular.\n * @see `HammerGestureConfig`\n *\n * @experimental\n */\nvar HAMMER_GESTURE_CONFIG = new InjectionToken('HammerGestureConfig');\n/** Injection token used to provide a {@link HammerLoader} to Angular. */\nvar HAMMER_LOADER = new InjectionToken('HammerLoader');\n/**\n * An injectable [HammerJS Manager](http://hammerjs.github.io/api/#hammer.manager)\n * for gesture recognition. Configures specific event recognition.\n * @experimental\n */\nvar HammerGestureConfig = /** @class */ (function () {\n function HammerGestureConfig() {\n /**\n * A set of supported event names for gestures to be used in Angular.\n * Angular supports all built-in recognizers, as listed in\n * [HammerJS documentation](http://hammerjs.github.io/).\n */\n this.events = [];\n /**\n * Maps gesture event names to a set of configuration options\n * that specify overrides to the default values for specific properties.\n *\n * The key is a supported event name to be configured,\n * and the options object contains a set of properties, with override values\n * to be applied to the named recognizer event.\n * For example, to disable recognition of the rotate event, specify\n * `{\"rotate\": {\"enable\": false}}`.\n *\n * Properties that are not present take the HammerJS default values.\n * For information about which properties are supported for which events,\n * and their allowed and default values, see\n * [HammerJS documentation](http://hammerjs.github.io/).\n *\n */\n this.overrides = {};\n }\n /**\n * Creates a [HammerJS Manager](http://hammerjs.github.io/api/#hammer.manager)\n * and attaches it to a given HTML element.\n * @param element The element that will recognize gestures.\n * @returns A HammerJS event-manager object.\n */\n 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 = __decorate([\n Injectable()\n ], HammerGestureConfig);\n return HammerGestureConfig;\n}());\nvar HammerGesturesPlugin = /** @class */ (function (_super) {\n __extends(HammerGesturesPlugin, _super);\n function HammerGesturesPlugin(doc, _config, console, loader) {\n var _this = _super.call(this, doc) || this;\n _this._config = _config;\n _this.console = console;\n _this.loader = loader;\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 && !this.loader) {\n this.console.warn(\"The \\\"\" + eventName + \"\\\" event cannot be bound because Hammer.JS is not \" +\n \"loaded and no custom loader has been specified.\");\n return false;\n }\n 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 // If Hammer is not present but a loader is specified, we defer adding the event listener\n // until Hammer is loaded.\n if (!window.Hammer && this.loader) {\n // This `addEventListener` method returns a function to remove the added listener.\n // Until Hammer is loaded, the returned function needs to *cancel* the registration rather\n // than remove anything.\n var cancelRegistration_1 = false;\n var deregister_1 = function () { cancelRegistration_1 = true; };\n this.loader()\n .then(function () {\n // If Hammer isn't actually loaded when the custom loader resolves, give up.\n if (!window.Hammer) {\n _this.console.warn(\"The custom HAMMER_LOADER completed, but Hammer.JS is not present.\");\n deregister_1 = function () { };\n return;\n }\n if (!cancelRegistration_1) {\n // Now that Hammer is loaded and the listener is being loaded for real,\n // the deregistration function changes from canceling registration to removal.\n deregister_1 = _this.addEventListener(element, eventName, handler);\n }\n })\n .catch(function () {\n _this.console.warn(\"The \\\"\" + eventName + \"\\\" event cannot be bound because the custom \" +\n \"Hammer.JS loader failed.\");\n deregister_1 = function () { };\n });\n // Return a function that *executes* `deregister` (and not `deregister` itself) so that we\n // can change the behavior of `deregister` once the listener is added. Using a closure in\n // this way allows us to avoid any additional data structures to track listener removal.\n return function () { deregister_1(); };\n }\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 () {\n mc.off(eventName, callback);\n // destroy mc to prevent memory leak\n if (typeof mc.destroy === 'function') {\n mc.destroy();\n }\n };\n });\n };\n HammerGesturesPlugin.prototype.isCustomEvent = function (eventName) { return this._config.events.indexOf(eventName) > -1; };\n HammerGesturesPlugin = __decorate([\n Injectable(),\n __param(0, Inject(DOCUMENT$1)),\n __param(1, Inject(HAMMER_GESTURE_CONFIG)),\n __param(3, Optional()), __param(3, Inject(HAMMER_LOADER)),\n __metadata(\"design:paramtypes\", [Object, HammerGestureConfig, ɵConsole, Object])\n ], HammerGesturesPlugin);\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 */\n/**\n * Defines supported modifiers for key events.\n */\nvar MODIFIER_KEYS = ['alt', 'control', 'meta', 'shift'];\nvar ɵ0$1 = function (event) { return event.altKey; }, ɵ1$1 = function (event) { return event.ctrlKey; }, ɵ2$1 = function (event) { return event.metaKey; }, ɵ3 = function (event) { return event.shiftKey; };\n/**\n * Retrieves modifiers from key-event objects.\n */\nvar MODIFIER_KEY_GETTERS = {\n 'alt': ɵ0$1,\n 'control': ɵ1$1,\n 'meta': ɵ2$1,\n 'shift': ɵ3\n};\n/**\n * @experimental\n * A browser plug-in that provides support for handling of key events in Angular.\n */\nvar KeyEventsPlugin = /** @class */ (function (_super) {\n __extends(KeyEventsPlugin, _super);\n /**\n * Initializes an instance of the browser plug-in.\n * @param doc The document in which key events will be detected.\n */\n function KeyEventsPlugin(doc) {\n return _super.call(this, doc) || this;\n }\n KeyEventsPlugin_1 = KeyEventsPlugin;\n /**\n * Reports whether a named key event is supported.\n * @param eventName The event name to query.\n * @return True if the named key event is supported.\n */\n KeyEventsPlugin.prototype.supports = function (eventName) { return KeyEventsPlugin_1.parseEventName(eventName) != null; };\n /**\n * Registers a handler for a specific element and key event.\n * @param element The HTML element to receive event notifications.\n * @param eventName The name of the key event to listen for.\n * @param handler A function to call when the notification occurs. Receives the\n * event object as an argument.\n * @returns The key event that was registered.\n */\n KeyEventsPlugin.prototype.addEventListener = function (element, eventName, handler) {\n var parsedEvent = KeyEventsPlugin_1.parseEventName(eventName);\n var outsideHandler = KeyEventsPlugin_1.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_1._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 /**\n * Configures a handler callback for a key event.\n * @param fullKey The event name that combines all simultaneous keystrokes.\n * @param handler The function that responds to the key event.\n * @param zone The zone in which the event occurred.\n * @returns A callback function.\n */\n KeyEventsPlugin.eventCallback = function (fullKey, handler, zone) {\n return function (event /** TODO #9100 */) {\n if (KeyEventsPlugin_1.getEventFullKey(event) === fullKey) {\n zone.runGuarded(function () { return handler(event); });\n }\n };\n };\n /** @internal */\n KeyEventsPlugin._normalizeKey = 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 var KeyEventsPlugin_1;\n KeyEventsPlugin = KeyEventsPlugin_1 = __decorate([\n Injectable(),\n __param(0, Inject(DOCUMENT$1)),\n __metadata(\"design:paramtypes\", [Object])\n ], KeyEventsPlugin);\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 = __decorate([\n Injectable(),\n __param(0, Inject(DOCUMENT$1)),\n __metadata(\"design:paramtypes\", [Object])\n ], DomSanitizerImpl);\n return DomSanitizerImpl;\n}(DomSanitizer));\nvar SafeValueImpl = /** @class */ (function () {\n function SafeValueImpl(changingThisBreaksApplicationSecurity) {\n this.changingThisBreaksApplicationSecurity = changingThisBreaksApplicationSecurity;\n // empty\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];\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}\nvar BROWSER_MODULE_PROVIDERS = [\n BROWSER_SANITIZATION_PROVIDERS,\n { provide: ɵAPP_ROOT, useValue: true },\n { provide: ErrorHandler, useFactory: errorHandler, deps: [] },\n {\n provide: EVENT_MANAGER_PLUGINS,\n useClass: DomEventsPlugin,\n multi: true,\n deps: [DOCUMENT$1, NgZone, PLATFORM_ID]\n },\n { provide: EVENT_MANAGER_PLUGINS, useClass: KeyEventsPlugin, multi: true, deps: [DOCUMENT$1] },\n {\n provide: EVENT_MANAGER_PLUGINS,\n useClass: HammerGesturesPlugin,\n multi: true,\n deps: [DOCUMENT$1, HAMMER_GESTURE_CONFIG, ɵConsole, [new Optional(), HAMMER_LOADER]]\n },\n { provide: HAMMER_GESTURE_CONFIG, useClass: HammerGestureConfig, deps: [] },\n {\n provide: DomRendererFactory2,\n useClass: DomRendererFactory2,\n deps: [EventManager, DomSharedStylesHost]\n },\n { provide: RendererFactory2, useExisting: DomRendererFactory2 },\n { provide: SharedStylesHost, useExisting: DomSharedStylesHost },\n { provide: DomSharedStylesHost, useClass: DomSharedStylesHost, deps: [DOCUMENT$1] },\n { provide: Testability, useClass: Testability, deps: [NgZone] },\n { provide: EventManager, useClass: EventManager, deps: [EVENT_MANAGER_PLUGINS, NgZone] },\n ELEMENT_PROBE_PROVIDERS,\n];\n/**\n * Exports required infrastructure for all Angular apps.\n * Included by defaults in all Angular apps created with the CLI\n * `new` command.\n * Re-exports `CommonModule` and `ApplicationModule`, making their\n * exports and providers available to all apps.\n *\n *\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 BrowserModule_1 = BrowserModule;\n /**\n * Configures a browser-based app to transition from a server-rendered app, if\n * one is present on the page.\n *\n * @param params An object containing an identifier for the app to transition.\n * The ID must match between the client and server versions of the app.\n * @returns The reconfigured `BrowserModule` to import into the app's root `AppModule`.\n *\n * @experimental\n */\n BrowserModule.withServerTransition = function (params) {\n return {\n ngModule: BrowserModule_1,\n providers: [\n { provide: APP_ID, useValue: params.appId },\n { provide: TRANSITION_ID, useExisting: APP_ID },\n SERVER_TRANSITION_PROVIDERS,\n ],\n };\n };\n var BrowserModule_1;\n BrowserModule = BrowserModule_1 = __decorate([\n NgModule({ providers: BROWSER_MODULE_PROVIDERS, exports: [CommonModule, ApplicationModule] }),\n __param(0, Optional()), __param(0, SkipSelf()), __param(0, Inject(BrowserModule_1)),\n __metadata(\"design:paramtypes\", [Object])\n ], BrowserModule);\n return BrowserModule;\n}());\n\n/**\n * Factory to create Meta service.\n */\nfunction createMeta() {\n return new Meta(inject(DOCUMENT$1));\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 /*NodeList*/ = 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.ngInjectableDef = defineInjectable({ factory: createMeta, token: Meta, providedIn: \"root\" });\n Meta = __decorate([\n Injectable({ providedIn: 'root', useFactory: createMeta, deps: [] }),\n __param(0, Inject(DOCUMENT$1)),\n __metadata(\"design:paramtypes\", [Object])\n ], Meta);\n return Meta;\n}());\n\n/**\n * Factory to create Title service.\n */\nfunction createTitle() {\n return new Title(inject(DOCUMENT$1));\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 Title.prototype.getTitle = function () { return getDOM().getTitle(this._doc); };\n /**\n * Set the title of the current HTML document.\n * @param newTitle\n */\n Title.prototype.setTitle = function (newTitle) { getDOM().setTitle(this._doc, newTitle); };\n Title.ngInjectableDef = defineInjectable({ factory: createTitle, token: Title, providedIn: \"root\" });\n Title = __decorate([\n Injectable({ providedIn: 'root', useFactory: createTitle, deps: [] }),\n __param(0, Inject(DOCUMENT$1)),\n __metadata(\"design:paramtypes\", [Object])\n ], Title);\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 */\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 AngularProfiler.prototype.timeChangeDetection = 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 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 TransferState_1 = TransferState;\n /** @internal */\n TransferState.init = function (initState) {\n var transferState = new TransferState_1();\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 TransferState.prototype.get = 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 TransferState.prototype.set = function (key, value) { this.store[key] = value; };\n /**\n * Remove a key from the store.\n */\n TransferState.prototype.remove = function (key) { delete this.store[key]; };\n /**\n * Test whether a key exists in the store.\n */\n TransferState.prototype.hasKey = 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 TransferState.prototype.onSerialize = function (key, callback) {\n this.onSerializeCallbacks[key] = callback;\n };\n /**\n * Serialize the current state of the store to JSON.\n */\n TransferState.prototype.toJson = 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 var TransferState_1;\n TransferState = TransferState_1 = __decorate([\n Injectable()\n ], TransferState);\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 = __decorate([\n NgModule({\n providers: [{ provide: TransferState, useFactory: initTransferState, deps: [DOCUMENT$1, APP_ID] }],\n })\n ], BrowserTransferStateModule);\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 * @usageNotes\n * ### Example\n *\n * {@example platform-browser/dom/debug/ts/by/by.ts region='by_all'}\n */\n By.all = function () { return function (debugElement) { return true; }; };\n /**\n * Match elements by the given CSS selector.\n *\n * @usageNotes\n * ### Example\n *\n * {@example platform-browser/dom/debug/ts/by/by.ts region='by_css'}\n */\n By.css = 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 * @usageNotes\n * ### Example\n *\n * {@example platform-browser/dom/debug/ts/by/by.ts region='by_directive'}\n */\n By.directive = 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 */\nvar VERSION = new Version('6.1.10');\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code 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 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 { BROWSER_MODULE_PROVIDERS as ɵangular_packages_platform_browser_platform_browser_c, _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_k, createMeta as ɵangular_packages_platform_browser_platform_browser_d, SERVER_TRANSITION_PROVIDERS as ɵangular_packages_platform_browser_platform_browser_i, appInitializerFactory as ɵangular_packages_platform_browser_platform_browser_h, createTitle as ɵangular_packages_platform_browser_platform_browser_e, initTransferState as ɵangular_packages_platform_browser_platform_browser_f, _createNgProbe as ɵangular_packages_platform_browser_platform_browser_j, EventManagerPlugin as ɵangular_packages_platform_browser_platform_browser_g, BrowserModule, platformBrowser, Meta, Title, disableDebugTools, enableDebugTools, BrowserTransferStateModule, TransferState, makeStateKey, By, DOCUMENT$1 as DOCUMENT, EVENT_MANAGER_PLUGINS, EventManager, HAMMER_GESTURE_CONFIG, HAMMER_LOADER, 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, DomSanitizerImpl as ɵDomSanitizerImpl };\n//# sourceMappingURL=platform-browser.js.map\n","/**\n * @license Angular v6.1.10\n * (c) 2010-2018 Google, Inc. https://angular.io/\n * License: MIT\n */\n\nimport { __values, __decorate, __param, __metadata, __extends, __assign, __spread } from 'tslib';\nimport { Component, ɵisObservable, ɵisPromise, NgModuleRef, InjectionToken, NgModuleFactory, NgZone, isDevMode, ɵConsole, Attribute, Directive, ElementRef, HostBinding, HostListener, Input, Renderer2, ChangeDetectorRef, ContentChildren, QueryList, ComponentFactoryResolver, EventEmitter, Output, ViewContainerRef, Compiler, Injectable, Injector, NgModuleFactoryLoader, ANALYZE_FOR_ENTRY_COMPONENTS, APP_BOOTSTRAP_LISTENER, APP_INITIALIZER, ApplicationRef, Inject, NgModule, NgProbeToken, Optional, SkipSelf, SystemJsNgModuleLoader, Version } from '@angular/core';\nimport { from, of, EmptyError, Observable, BehaviorSubject, Subject } from 'rxjs';\nimport { concatAll, every, last, map, mergeAll, catchError, first, mergeMap, concatMap, reduce, filter } from 'rxjs/operators';\nimport { LocationStrategy, APP_BASE_HREF, HashLocationStrategy, LOCATION_INITIALIZED, Location, PathLocationStrategy, PlatformLocation, ViewportScroller } from '@angular/common';\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(\n /** @docsNotRequired */\n id, \n /** @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(\n /** @docsNotRequired */\n id, \n /** @docsNotRequired */\n url, \n /** @docsNotRequired */\n navigationTrigger, \n /** @docsNotRequired */\n restoredState) {\n if (navigationTrigger === void 0) { \n /** @docsNotRequired */\n navigationTrigger = 'imperative'; }\n if (restoredState === void 0) { \n /** @docsNotRequired */\n 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 NavigationStart.prototype.toString = 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(\n /** @docsNotRequired */\n id, \n /** @docsNotRequired */\n url, \n /** @docsNotRequired */\n urlAfterRedirects) {\n var _this = _super.call(this, id, url) || this;\n _this.urlAfterRedirects = urlAfterRedirects;\n return _this;\n }\n /** @docsNotRequired */\n NavigationEnd.prototype.toString = 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(\n /** @docsNotRequired */\n id, \n /** @docsNotRequired */\n url, \n /** @docsNotRequired */\n reason) {\n var _this = _super.call(this, id, url) || this;\n _this.reason = reason;\n return _this;\n }\n /** @docsNotRequired */\n NavigationCancel.prototype.toString = 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(\n /** @docsNotRequired */\n id, \n /** @docsNotRequired */\n url, \n /** @docsNotRequired */\n error) {\n var _this = _super.call(this, id, url) || this;\n _this.error = error;\n return _this;\n }\n /** @docsNotRequired */\n NavigationError.prototype.toString = 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(\n /** @docsNotRequired */\n id, \n /** @docsNotRequired */\n url, \n /** @docsNotRequired */\n urlAfterRedirects, \n /** @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 RoutesRecognized.prototype.toString = 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(\n /** @docsNotRequired */\n id, \n /** @docsNotRequired */\n url, \n /** @docsNotRequired */\n urlAfterRedirects, \n /** @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(\n /** @docsNotRequired */\n id, \n /** @docsNotRequired */\n url, \n /** @docsNotRequired */\n urlAfterRedirects, \n /** @docsNotRequired */\n state, \n /** @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(\n /** @docsNotRequired */\n id, \n /** @docsNotRequired */\n url, \n /** @docsNotRequired */\n urlAfterRedirects, \n /** @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(\n /** @docsNotRequired */\n id, \n /** @docsNotRequired */\n url, \n /** @docsNotRequired */\n urlAfterRedirects, \n /** @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(\n /** @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(\n /** @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(\n /** @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(\n /** @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(\n /** @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(\n /** @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 * @description\n *\n * Represents a scrolling event.\n */\nvar Scroll = /** @class */ (function () {\n function Scroll(\n /** @docsNotRequired */\n routerEvent, \n /** @docsNotRequired */\n position, \n /** @docsNotRequired */\n anchor) {\n this.routerEvent = routerEvent;\n this.position = position;\n this.anchor = anchor;\n }\n Scroll.prototype.toString = function () {\n var pos = this.position ? this.position[0] + \", \" + this.position[1] : null;\n return \"Scroll(anchor: '\" + this.anchor + \"', position: '\" + pos + \"')\";\n };\n return Scroll;\n}());\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code 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 component is used internally within the router to be a placeholder when an empty\n * router-outlet is needed. For example, with a config such as:\n *\n * `{path: 'parent', outlet: 'nav', children: [...]}`\n *\n * In order to render, there needs to be a component on this config, which will default\n * to this `EmptyOutletComponent`.\n */\nvar EmptyOutletComponent = /** @class */ (function () {\n function EmptyOutletComponent() {\n }\n EmptyOutletComponent = __decorate([\n Component({ template: \"<router-outlet></router-outlet>\" })\n ], EmptyOutletComponent);\n return EmptyOutletComponent;\n}());\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code 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.children && !route.loadChildren &&\n (route.outlet && route.outlet !== PRIMARY_OUTLET)) {\n throw new Error(\"Invalid configuration of route '\" + fullPath + \"': a componentless route without children or loadChildren cannot have a named outlet set\");\n }\n if (route.redirectTo && route.children) {\n throw new Error(\"Invalid configuration of route '\" + 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}\n/**\n * Makes a copy of the config and adds any default required properties.\n */\nfunction standardizeConfig(r) {\n var children = r.children && r.children.map(standardizeConfig);\n var c = children ? __assign({}, r, { children: children }) : __assign({}, r);\n if (!c.component && (children || c.loadChildren) && (c.outlet && c.outlet !== PRIMARY_OUTLET)) {\n c.component = EmptyOutletComponent;\n }\n return c;\n}\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this 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}\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 // TODO: This does not handle array params correctly.\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 // TODO: This does not handle array params correctly.\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 * @usageNotes\n * ### Example\n *\n * ```\n * @Component({templateUrl:'template.html'})\n * class MyComponent {\n * constructor(router: Router) {\n * const tree: UrlTree =\n * router.parseUrl('/team/33/(user/victor//support:help)?debug=true#fragment');\n * const f = tree.fragment; // return 'fragment'\n * const q = tree.queryParams; // returns {debug: 'true'}\n * const g: UrlSegmentGroup = tree.root.children[PRIMARY_OUTLET];\n * const s: UrlSegment[] = g.segments; // returns 2 segments 'team' and '33'\n * g.children[PRIMARY_OUTLET].segments; // returns 2 segments 'user' and 'victor'\n * g.children['support'].segments; // return 1 segment 'help'\n * }\n * }\n * ```\n *\n *\n */\nvar UrlTree = /** @class */ (function () {\n /** @internal */\n function UrlTree(\n /** The root segment group of the URL tree */\n root, \n /** The query params of the URL */\n queryParams, \n /** 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 UrlTree.prototype.toString = 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(\n /** The URL segments of this group. See `UrlSegment` for more information */\n segments, \n /** 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 UrlSegmentGroup.prototype.hasChildren = function () { return this.numberOfChildren > 0; };\n Object.defineProperty(UrlSegmentGroup.prototype, \"numberOfChildren\", {\n /** Number of child segments */\n get: function () { return Object.keys(this.children).length; },\n enumerable: true,\n configurable: true\n });\n /** @docsNotRequired */\n UrlSegmentGroup.prototype.toString = 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 * @usageNotes\n * ### Example\n *\n * ```\n * @Component({templateUrl:'template.html'})\n * class MyComponent {\n * constructor(router: Router) {\n * const tree: UrlTree = router.parseUrl('/team;id=33');\n * const g: UrlSegmentGroup = tree.root.children[PRIMARY_OUTLET];\n * const s: UrlSegment[] = g.segments;\n * s[0].path; // returns 'team'\n * s[0].parameters; // returns {id: 33}\n * }\n * }\n * ```\n *\n *\n */\nvar UrlSegment = /** @class */ (function () {\n function UrlSegment(\n /** The path part of a URL segment */\n path, \n /** 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 UrlSegment.prototype.toString = 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 DefaultUrlSerializer.prototype.parse = 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 DefaultUrlSerializer.prototype.serialize = 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 UrlParser.prototype.parseSegment = 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 UrlParser.prototype.parseQueryParam = 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 UrlParser.prototype.parseParens = 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 UrlParser.prototype.consumeOptional = 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) { return obs.error(new Error(\"Only absolute redirects can have named outlets. redirectTo: '\" + redirectTo + \"'\")); });\n}\nfunction canLoadFails(route) {\n return new Observable(function (obs) { return obs.error(navigationCancelingError(\"Cannot load children because the guard of the route \\\"path: '\" + route.path + \"'\\\" returned false\")); });\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) { return _this.createUrlTree(rootSegmentGroup, _this.urlTree.queryParams, _this.urlTree.fragment); }));\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 _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 _a;\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 };\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 ApplyRedirects.prototype.expandChildren = 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) { return s.path.startsWith(':') ? _this.findPosParam(redirectTo, s, posParams) :\n _this.findOrReturn(s, actualSegments); });\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 e_1, _a;\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 };\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 e_2, _a;\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}\nfunction createChildrenForEmptySegments(routes, primarySegmentGroup) {\n var e_3, _a;\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}\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 Tree.prototype.parent = function (t) {\n var p = this.pathFromRoot(t);\n return p.length > 1 ? p[p.length - 2] : null;\n };\n /**\n * @internal\n */\n Tree.prototype.children = 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 Tree.prototype.firstChild = 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 Tree.prototype.siblings = 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 Tree.prototype.pathFromRoot = 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 var e_1, _a;\n if (value === node.value)\n return node;\n try {\n for (var _b = __values(node.children), _c = _b.next(); !_c.done; _c = _b.next()) {\n var child = _c.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 (_c && !_c.done && (_a = _b.return)) _a.call(_b);\n }\n finally { if (e_1) throw e_1.error; }\n }\n return null;\n}\n// Return the path to the node with the given value using DFS\nfunction findPath(value, node) {\n var e_2, _a;\n if (value === node.value)\n return [node];\n try {\n for (var _b = __values(node.children), _c = _b.next(); !_c.done; _c = _b.next()) {\n var child = _c.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 (_c && !_c.done && (_a = _b.return)) _a.call(_b);\n }\n finally { if (e_2) throw e_2.error; }\n }\n return [];\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 * @usageNotes\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, \n /** 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(\n /** An observable of the URL segments matched by this route */\n url, \n /** An observable of the matrix parameters scoped to this route */\n params, \n /** An observable of the query parameters shared by all the routes */\n queryParams, \n /** An observable of the URL fragment shared by all the routes */\n fragment, \n /** An observable of the static and resolved data of this route. */\n data, \n /** The outlet name of the route. It's a constant */\n outlet, \n /** 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: 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: 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: 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: 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: 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: 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(\n /** The URL segments matched by this route */\n url, \n /** The matrix parameters scoped to this route */\n params, \n /** The query parameters shared by all the routes */\n queryParams, \n /** The URL fragment shared by all the routes */\n fragment, \n /** The static and resolved data of this route */\n data, \n /** The outlet name of the route */\n outlet, \n /** 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: 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: 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: 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: 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: 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 * @usageNotes\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(\n /** 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 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 var e_1, _a;\n try {\n for (var _b = __values(prevState.children), _c = _b.next(); !_c.done; _c = _b.next()) {\n var p = _c.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 (_c && !_c.done && (_a = _b.return)) _a.call(_b);\n }\n finally { if (e_1) throw e_1.error; }\n }\n return createNode(routeReuseStrategy, child);\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 else if (partIndex == 0 && urlPart === '') { // '/a'\n isAbsolute = true;\n }\n else if (urlPart === '..') { // '../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 var _a, _b;\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}\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 PreActivation.prototype.setupChildRouteGuards = 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 PreActivation.prototype.setupRouteGuards = 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) { return andObservables(from([\n _this.fireChildActivationStart(check.route.parent),\n _this.fireActivationStart(check.route), _this.runCanActivateChild(check.path),\n _this.runCanActivate(check.route)\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 PreActivation.prototype.fireActivationStart = 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 PreActivation.prototype.fireChildActivationStart = 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 var _a;\n return _a = {}, _a[key_1] = value, _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, relativeLinkResolution) {\n if (paramsInheritanceStrategy === void 0) { paramsInheritanceStrategy = 'emptyOnly'; }\n if (relativeLinkResolution === void 0) { relativeLinkResolution = 'legacy'; }\n return new Recognizer(rootComponentType, config, urlTree, url, paramsInheritanceStrategy, relativeLinkResolution)\n .recognize();\n}\nvar Recognizer = /** @class */ (function () {\n function Recognizer(rootComponentType, config, urlTree, url, paramsInheritanceStrategy, relativeLinkResolution) {\n this.rootComponentType = rootComponentType;\n this.config = config;\n this.urlTree = urlTree;\n this.url = url;\n this.paramsInheritanceStrategy = paramsInheritanceStrategy;\n this.relativeLinkResolution = relativeLinkResolution;\n }\n Recognizer.prototype.recognize = function () {\n try {\n var rootSegmentGroup = split$1(this.urlTree.root, [], [], this.config, this.relativeLinkResolution).segmentGroup;\n var children = this.processSegmentGroup(this.config, rootSegmentGroup, PRIMARY_OUTLET);\n var root = new ActivatedRouteSnapshot([], Object.freeze({}), Object.freeze(__assign({}, 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 var e_1, _a;\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 };\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(__assign({}, 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(__assign({}, 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, this.relativeLinkResolution), 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, relativeLinkResolution) {\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, consumedSegments, slicedSegments, config, segmentGroup.children, relativeLinkResolution));\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, consumedSegments, slicedSegments, routes, children, relativeLinkResolution) {\n var e_2, _a;\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 if (relativeLinkResolution === 'legacy') {\n s._segmentIndexShift = segmentGroup.segments.length;\n }\n else {\n s._segmentIndexShift = consumedSegments.length;\n }\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}\nfunction createChildrenForEmptyPaths(segmentGroup, consumedSegments, routes, primarySegment) {\n var e_3, _a;\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}\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(standardizeConfig), 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}\nfunction defaultMalformedUriErrorHandler(error, urlSerializer, url) {\n return urlSerializer.parse('/');\n}\n/**\n * @internal\n */\nfunction defaultRouterHook(snapshot, runExtras) {\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.isNgZoneEnabled = false;\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 * Malformed uri error handler is invoked when `Router.parseUrl(url)` throws an\n * error due to containing an invalid character. The most common case would be a `%` sign\n * that's not encoded and is not part of a percent encoded sequence.\n */\n this.malformedUriErrorHandler = defaultMalformedUriErrorHandler;\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 /**\n * Defines when the router updates the browser URL. The default behavior is to update after\n * successful navigation. However, some applications may prefer a mode where the URL gets\n * updated at the beginning of navigation. The most common use case would be updating the\n * URL early so if navigation fails, you can show an error message with the URL that failed.\n * Available options are:\n *\n * - `'deferred'`, the default, updates the browser URL after navigation has finished.\n * - `'eager'`, updates browser URL at the beginning of navigation.\n */\n this.urlUpdateStrategy = 'deferred';\n /**\n * See {@link RouterModule} for more information.\n */\n this.relativeLinkResolution = 'legacy';\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.console = injector.get(ɵConsole);\n var ngZone = injector.get(NgZone);\n this.isNgZoneEnabled = ngZone instanceof NgZone;\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 Router.prototype.resetRootComponentType = 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 Router.prototype.initialNavigation = 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 Router.prototype.setUpLocationChangeListener = 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.parseUrl(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: function () { return this.serializeUrl(this.currentUrlTree); },\n enumerable: true,\n configurable: true\n });\n /** @internal */\n Router.prototype.triggerEvent = function (event) { this.events.next(event); };\n /**\n * Resets the configuration used for navigation and generating links.\n *\n * @usageNotes\n *\n * ### Example\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 = function (config) {\n validateConfig(config);\n this.config = config.map(standardizeConfig);\n this.navigated = false;\n this.lastSuccessfulId = -1;\n };\n /** @docsNotRequired */\n Router.prototype.ngOnDestroy = function () { this.dispose(); };\n /** Disposes of the router */\n Router.prototype.dispose = 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 * @usageNotes\n *\n * ### Example\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 = 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 * @usageNotes\n *\n * ### Example\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 * Since `navigateByUrl()` takes an absolute URL as the first parameter,\n * it will not apply any delta to the current URL and ignores any properties\n * in the second parameter (the `NavigationExtras`) that would change the\n * provided URL.\n */\n Router.prototype.navigateByUrl = function (url, extras) {\n if (extras === void 0) { extras = { skipLocationChange: false }; }\n if (isDevMode() && this.isNgZoneEnabled && !NgZone.isInAngularZone()) {\n this.console.warn(\"Navigation triggered outside Angular zone, did you forget to call 'ngZone.run()'?\");\n }\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 * @usageNotes\n *\n * ### Example\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 * The first parameter of `navigate()` is a delta to be applied to the current URL\n * or the one provided in the `relativeTo` property of the second parameter (the\n * `NavigationExtras`).\n */\n Router.prototype.navigate = 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 Router.prototype.serializeUrl = function (url) { return this.urlSerializer.serialize(url); };\n /** Parses a string into a `UrlTree` */\n Router.prototype.parseUrl = function (url) {\n var urlTree;\n try {\n urlTree = this.urlSerializer.parse(url);\n }\n catch (e) {\n urlTree = this.malformedUriErrorHandler(e, this.urlSerializer, url);\n }\n return urlTree;\n };\n /** Returns whether the url is activated */\n Router.prototype.isActive = function (url, exact) {\n if (url instanceof UrlTree) {\n return containsTree(this.currentUrlTree, url, exact);\n }\n var urlTree = this.parseUrl(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 if (this.urlUpdateStrategy === 'eager' && !extras.skipLocationChange) {\n this.setBrowserUrl(rawUrl, !!extras.replaceUrl, id);\n }\n this.events\n .next(new NavigationStart(id, this.serializeUrl(url), source, state));\n Promise.resolve()\n .then(function (_) { return _this.runNavigate(url, rawUrl, !!extras.skipLocationChange, !!extras.replaceUrl, id, null); })\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 (_) { return _this.runNavigate(url, rawUrl, false, false, id, createEmptyState(url, _this.rootComponentType).snapshot); })\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, _this.relativeLinkResolution)\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\n .beforePreactivation(p.snapshot, {\n navigationId: id,\n appliedUrlTree: url,\n rawUrlTree: rawUrl, skipLocationChange: skipLocationChange, replaceUrl: replaceUrl,\n })\n .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\n .afterPreactivation(p.snapshot, {\n navigationId: id,\n appliedUrlTree: url,\n rawUrlTree: rawUrl, skipLocationChange: skipLocationChange, replaceUrl: replaceUrl,\n })\n .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 Router.prototype.activateRoutes = 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 (_this.urlUpdateStrategy === 'deferred' && !skipLocationChange) {\n _this.setBrowserUrl(_this.rawUrlTree, replaceUrl, id);\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.setBrowserUrl = function (url, replaceUrl, id) {\n var path = this.urlSerializer.serialize(url);\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 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 ActivateRoutes.prototype.deactivateChildRoutes = 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.attachRef = null;\n context.route = future;\n context.resolver = cmpFactoryResolver;\n if (context.outlet) {\n // Activate the outlet when it has already been instantiated\n // Otherwise it will get activated from its `ngOnInit` when instantiated\n context.outlet.activateWith(future, cmpFactoryResolver);\n }\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 /**\n * @deprecated 4.0.0 use `queryParamsHandling` instead.\n */\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 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 __decorate([\n Input(),\n __metadata(\"design:type\", Object)\n ], RouterLink.prototype, \"queryParams\", void 0);\n __decorate([\n Input(),\n __metadata(\"design:type\", String)\n ], RouterLink.prototype, \"fragment\", void 0);\n __decorate([\n Input(),\n __metadata(\"design:type\", String)\n ], RouterLink.prototype, \"queryParamsHandling\", void 0);\n __decorate([\n Input(),\n __metadata(\"design:type\", Boolean)\n ], RouterLink.prototype, \"preserveFragment\", void 0);\n __decorate([\n Input(),\n __metadata(\"design:type\", Boolean)\n ], RouterLink.prototype, \"skipLocationChange\", void 0);\n __decorate([\n Input(),\n __metadata(\"design:type\", Boolean)\n ], RouterLink.prototype, \"replaceUrl\", void 0);\n __decorate([\n Input(),\n __metadata(\"design:type\", Object),\n __metadata(\"design:paramtypes\", [Object])\n ], RouterLink.prototype, \"routerLink\", null);\n __decorate([\n Input(),\n __metadata(\"design:type\", Boolean),\n __metadata(\"design:paramtypes\", [Boolean])\n ], RouterLink.prototype, \"preserveQueryParams\", null);\n __decorate([\n HostListener('click'),\n __metadata(\"design:type\", Function),\n __metadata(\"design:paramtypes\", []),\n __metadata(\"design:returntype\", Boolean)\n ], RouterLink.prototype, \"onClick\", null);\n RouterLink = __decorate([\n Directive({ selector: ':not(a)[routerLink]' }),\n __param(2, Attribute('tabindex')),\n __metadata(\"design:paramtypes\", [Router, ActivatedRoute, String, Renderer2, ElementRef])\n ], RouterLink);\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 __decorate([\n HostBinding('attr.target'), Input(),\n __metadata(\"design:type\", String)\n ], RouterLinkWithHref.prototype, \"target\", void 0);\n __decorate([\n Input(),\n __metadata(\"design:type\", Object)\n ], RouterLinkWithHref.prototype, \"queryParams\", void 0);\n __decorate([\n Input(),\n __metadata(\"design:type\", String)\n ], RouterLinkWithHref.prototype, \"fragment\", void 0);\n __decorate([\n Input(),\n __metadata(\"design:type\", String)\n ], RouterLinkWithHref.prototype, \"queryParamsHandling\", void 0);\n __decorate([\n Input(),\n __metadata(\"design:type\", Boolean)\n ], RouterLinkWithHref.prototype, \"preserveFragment\", void 0);\n __decorate([\n Input(),\n __metadata(\"design:type\", Boolean)\n ], RouterLinkWithHref.prototype, \"skipLocationChange\", void 0);\n __decorate([\n Input(),\n __metadata(\"design:type\", Boolean)\n ], RouterLinkWithHref.prototype, \"replaceUrl\", void 0);\n __decorate([\n HostBinding(),\n __metadata(\"design:type\", String)\n ], RouterLinkWithHref.prototype, \"href\", void 0);\n __decorate([\n Input(),\n __metadata(\"design:type\", Object),\n __metadata(\"design:paramtypes\", [Object])\n ], RouterLinkWithHref.prototype, \"routerLink\", null);\n __decorate([\n Input(),\n __metadata(\"design:type\", Boolean),\n __metadata(\"design:paramtypes\", [Boolean])\n ], RouterLinkWithHref.prototype, \"preserveQueryParams\", null);\n __decorate([\n HostListener('click', ['$event.button', '$event.ctrlKey', '$event.metaKey', '$event.shiftKey']),\n __metadata(\"design:type\", Function),\n __metadata(\"design:paramtypes\", [Number, Boolean, Boolean, Boolean]),\n __metadata(\"design:returntype\", Boolean)\n ], RouterLinkWithHref.prototype, \"onClick\", null);\n RouterLinkWithHref = __decorate([\n Directive({ selector: 'a[routerLink]' }),\n __metadata(\"design:paramtypes\", [Router, ActivatedRoute,\n LocationStrategy])\n ], RouterLinkWithHref);\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 __decorate([\n ContentChildren(RouterLink, { descendants: true }),\n __metadata(\"design:type\", QueryList)\n ], RouterLinkActive.prototype, \"links\", void 0);\n __decorate([\n ContentChildren(RouterLinkWithHref, { descendants: true }),\n __metadata(\"design:type\", QueryList)\n ], RouterLinkActive.prototype, \"linksWithHrefs\", void 0);\n __decorate([\n Input(),\n __metadata(\"design:type\", Object)\n ], RouterLinkActive.prototype, \"routerLinkActiveOptions\", void 0);\n __decorate([\n Input(),\n __metadata(\"design:type\", Object),\n __metadata(\"design:paramtypes\", [Object])\n ], RouterLinkActive.prototype, \"routerLinkActive\", null);\n RouterLinkActive = __decorate([\n Directive({\n selector: '[routerLinkActive]',\n exportAs: 'routerLinkActive',\n }),\n __metadata(\"design:paramtypes\", [Router, ElementRef, Renderer2,\n ChangeDetectorRef])\n ], RouterLinkActive);\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 ChildrenOutletContexts.prototype.onChildOutletCreated = 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 ChildrenOutletContexts.prototype.onChildOutletDestroyed = 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 ChildrenOutletContexts.prototype.onOutletDeactivated = 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 RouterOutlet.prototype.detach = 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 RouterOutlet.prototype.attach = 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 __decorate([\n Output('activate'),\n __metadata(\"design:type\", Object)\n ], RouterOutlet.prototype, \"activateEvents\", void 0);\n __decorate([\n Output('deactivate'),\n __metadata(\"design:type\", Object)\n ], RouterOutlet.prototype, \"deactivateEvents\", void 0);\n RouterOutlet = __decorate([\n Directive({ selector: 'router-outlet', exportAs: 'outlet' }),\n __param(3, Attribute('name')),\n __metadata(\"design:paramtypes\", [ChildrenOutletContexts, ViewContainerRef,\n ComponentFactoryResolver, String, ChangeDetectorRef])\n ], RouterOutlet);\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 RouterPreloader.prototype.ngOnDestroy = function () { this.subscription.unsubscribe(); };\n RouterPreloader.prototype.processRoutes = function (ngModule, routes) {\n var e_1, _a;\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 };\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 = __decorate([\n Injectable(),\n __metadata(\"design:paramtypes\", [Router, NgModuleFactoryLoader, Compiler,\n Injector, PreloadingStrategy])\n ], RouterPreloader);\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 */\nvar RouterScroller = /** @class */ (function () {\n function RouterScroller(router, \n /** @docsNotRequired */ viewportScroller, options) {\n if (options === void 0) { options = {}; }\n this.router = router;\n this.viewportScroller = viewportScroller;\n this.options = options;\n this.lastId = 0;\n this.lastSource = 'imperative';\n this.restoredId = 0;\n this.store = {};\n // Default both options to 'disabled'\n options.scrollPositionRestoration = options.scrollPositionRestoration || 'disabled';\n options.anchorScrolling = options.anchorScrolling || 'disabled';\n }\n RouterScroller.prototype.init = function () {\n // we want to disable the automatic scrolling because having two places\n // responsible for scrolling results race conditions, especially given\n // that browser don't implement this behavior consistently\n if (this.options.scrollPositionRestoration !== 'disabled') {\n this.viewportScroller.setHistoryScrollRestoration('manual');\n }\n this.routerEventsSubscription = this.createScrollEvents();\n this.scrollEventsSubscription = this.consumeScrollEvents();\n };\n RouterScroller.prototype.createScrollEvents = function () {\n var _this = this;\n return this.router.events.subscribe(function (e) {\n if (e instanceof NavigationStart) {\n // store the scroll position of the current stable navigations.\n _this.store[_this.lastId] = _this.viewportScroller.getScrollPosition();\n _this.lastSource = e.navigationTrigger;\n _this.restoredId = e.restoredState ? e.restoredState.navigationId : 0;\n }\n else if (e instanceof NavigationEnd) {\n _this.lastId = e.id;\n _this.scheduleScrollEvent(e, _this.router.parseUrl(e.urlAfterRedirects).fragment);\n }\n });\n };\n RouterScroller.prototype.consumeScrollEvents = function () {\n var _this = this;\n return this.router.events.subscribe(function (e) {\n if (!(e instanceof Scroll))\n return;\n // a popstate event. The pop state event will always ignore anchor scrolling.\n if (e.position) {\n if (_this.options.scrollPositionRestoration === 'top') {\n _this.viewportScroller.scrollToPosition([0, 0]);\n }\n else if (_this.options.scrollPositionRestoration === 'enabled') {\n _this.viewportScroller.scrollToPosition(e.position);\n }\n // imperative navigation \"forward\"\n }\n else {\n if (e.anchor && _this.options.anchorScrolling === 'enabled') {\n _this.viewportScroller.scrollToAnchor(e.anchor);\n }\n else if (_this.options.scrollPositionRestoration !== 'disabled') {\n _this.viewportScroller.scrollToPosition([0, 0]);\n }\n }\n });\n };\n RouterScroller.prototype.scheduleScrollEvent = function (routerEvent, anchor) {\n this.router.triggerEvent(new Scroll(routerEvent, this.lastSource === 'popstate' ? this.store[this.restoredId] : null, anchor));\n };\n RouterScroller.prototype.ngOnDestroy = function () {\n if (this.routerEventsSubscription) {\n this.routerEventsSubscription.unsubscribe();\n }\n if (this.scrollEventsSubscription) {\n this.scrollEventsSubscription.unsubscribe();\n }\n };\n return RouterScroller;\n}());\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code 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, EmptyOutletComponent];\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 RouterModule_1 = RouterModule;\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 * * `paramsInheritanceStrategy` defines how the router merges params, data and resolved data\n * from parent to child routes.\n */\n RouterModule.forRoot = function (routes, config) {\n return {\n ngModule: RouterModule_1,\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: RouterScroller,\n useFactory: createRouterScroller,\n deps: [Router, ViewportScroller, ROUTER_CONFIGURATION]\n },\n {\n provide: PreloadingStrategy,\n useExisting: config && config.preloadingStrategy ? config.preloadingStrategy :\n NoPreloading\n },\n { provide: NgProbeToken, multi: true, useFactory: routerNgProbeToken },\n provideRouterInitializer(),\n ],\n };\n };\n /**\n * Creates a module with all the router directives and a provider registering routes.\n */\n RouterModule.forChild = function (routes) {\n return { ngModule: RouterModule_1, providers: [provideRoutes(routes)] };\n };\n var RouterModule_1;\n RouterModule = RouterModule_1 = __decorate([\n NgModule({\n declarations: ROUTER_DIRECTIVES,\n exports: ROUTER_DIRECTIVES,\n entryComponents: [EmptyOutletComponent]\n }),\n __param(0, Optional()), __param(0, Inject(ROUTER_FORROOT_GUARD)), __param(1, Optional()),\n __metadata(\"design:paramtypes\", [Object, Router])\n ], RouterModule);\n return RouterModule;\n}());\nfunction createRouterScroller(router, viewportScroller, config) {\n if (config.scrollOffset) {\n viewportScroller.setOffset(config.scrollOffset);\n }\n return new RouterScroller(router, viewportScroller, config);\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 * @usageNotes\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.malformedUriErrorHandler) {\n router.malformedUriErrorHandler = opts.malformedUriErrorHandler;\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 if (opts.urlUpdateStrategy) {\n router.urlUpdateStrategy = opts.urlUpdateStrategy;\n }\n if (opts.relativeLinkResolution) {\n router.relativeLinkResolution = opts.relativeLinkResolution;\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 routerScroller = this.injector.get(RouterScroller);\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 routerScroller.init();\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 = __decorate([\n Injectable(),\n __metadata(\"design:paramtypes\", [Injector])\n ], RouterInitializer);\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 */\nvar VERSION = new Version('6.1.10');\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code 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// 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_h, createRouterScroller as ɵangular_packages_router_router_c, getAppInitializer as ɵangular_packages_router_router_i, getBootstrapListener as ɵangular_packages_router_router_j, provideForRootGuard as ɵangular_packages_router_router_e, provideLocationStrategy as ɵangular_packages_router_router_d, provideRouterInitializer as ɵangular_packages_router_router_k, rootRoute as ɵangular_packages_router_router_g, routerNgProbeToken as ɵangular_packages_router_router_b, setupRouter as ɵangular_packages_router_router_f, RouterScroller as ɵangular_packages_router_router_n, Tree as ɵangular_packages_router_router_l, TreeNode as ɵangular_packages_router_router_m, RouterLink, RouterLinkWithHref, RouterLinkActive, RouterOutlet, ActivationEnd, ActivationStart, ChildActivationEnd, ChildActivationStart, GuardsCheckEnd, GuardsCheckStart, NavigationCancel, NavigationEnd, NavigationError, NavigationStart, ResolveEnd, ResolveStart, RouteConfigLoadEnd, RouteConfigLoadStart, RouterEvent, RoutesRecognized, Scroll, 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, EmptyOutletComponent as ɵEmptyOutletComponent, ROUTER_PROVIDERS as ɵROUTER_PROVIDERS, flatten as ɵflatten };\n//# sourceMappingURL=router.js.map\n","import { NgModule } from '@angular/core';\nimport { QRCodeComponent } from './components';\nvar QRCodeModule = /** @class */ (function () {\n function QRCodeModule() {\n }\n QRCodeModule.decorators = [\n { type: NgModule, args: [{\n providers: [],\n declarations: [\n QRCodeComponent,\n ],\n exports: [\n QRCodeComponent,\n ]\n },] },\n ];\n return QRCodeModule;\n}());\nexport { QRCodeModule };\n//# sourceMappingURL=angularx-qrcode.module.js.map","import { ChangeDetectionStrategy, Component, ElementRef, Input } from '@angular/core';\nimport * as QRCode from 'qrcodejs2';\nvar QRCodeComponent = /** @class */ (function () {\n function QRCodeComponent(el) {\n var _this = this;\n this.el = el;\n /** @internal */\n this.allowEmptyString = false;\n this.colordark = '#000000';\n this.colorlight = '#ffffff';\n this.level = 'M';\n this.hidetitle = false;\n this.qrdata = '';\n this.size = 256;\n this.usesvg = false;\n this.isValidQrCodeText = function (data) {\n if (_this.allowEmptyString === false) {\n return !(typeof data === 'undefined' || data === '');\n }\n return !(typeof data === 'undefined');\n };\n }\n QRCodeComponent.prototype.ngOnInit = function () {\n try {\n if (!this.isValidQrCodeText(this.qrdata)) {\n throw new Error('Empty QR Code data');\n }\n this.qrcode = new QRCode(this.el.nativeElement, {\n colorDark: this.colordark,\n colorLight: this.colorlight,\n correctLevel: QRCode.CorrectLevel[this.level.toString()],\n height: this.size,\n text: this.qrdata || ' ',\n useSVG: this.usesvg,\n width: this.size,\n });\n }\n catch (e) {\n console.error('Error generating QR Code: ' + e.message);\n }\n };\n QRCodeComponent.prototype.ngOnChanges = function (changes) {\n if (!this.qrcode) {\n return;\n }\n var qrData = changes['qrdata'];\n if (qrData && this.isValidQrCodeText(qrData.currentValue)) {\n this.qrcode.clear();\n this.qrcode.makeCode(qrData.currentValue);\n }\n };\n QRCodeComponent.decorators = [\n { type: Component, args: [{\n selector: 'qrcode',\n changeDetection: ChangeDetectionStrategy.OnPush,\n template: ''\n },] },\n ];\n /** @nocollapse */\n QRCodeComponent.ctorParameters = function () { return [\n { type: ElementRef, },\n ]; };\n QRCodeComponent.propDecorators = {\n \"allowEmptyString\": [{ type: Input },],\n \"colordark\": [{ type: Input },],\n \"colorlight\": [{ type: Input },],\n \"level\": [{ type: Input },],\n \"hidetitle\": [{ type: Input },],\n \"qrdata\": [{ type: Input },],\n \"size\": [{ type: Input },],\n \"usesvg\": [{ type: Input },],\n };\n return QRCodeComponent;\n}());\nexport { QRCodeComponent };\n//# sourceMappingURL=angularx-qrcode.component.js.map","export * from './angularx-qrcode.component';\n//# sourceMappingURL=index.js.map","export * from './angularx-qrcode';\n//# sourceMappingURL=index.js.map","export { QRCodeComponent } from './components';\nexport { QRCodeModule } from './angularx-qrcode.module';\n//# sourceMappingURL=index.js.map","!function(t,e){\"object\"==typeof exports&&\"object\"==typeof module?module.exports=e(require(\"babylonjs\")):\"function\"==typeof define&&define.amd?define(\"babylonjs-gui\",[\"babylonjs\"],e):\"object\"==typeof exports?exports[\"babylonjs-gui\"]=e(require(\"babylonjs\")):(t.BABYLON=t.BABYLON||{},t.BABYLON.GUI=e(t.BABYLON))}(window,function(t){return function(t){var e={};function i(r){if(e[r])return e[r].exports;var o=e[r]={i:r,l:!1,exports:{}};return t[r].call(o.exports,o,o.exports,i),o.l=!0,o.exports}return i.m=t,i.c=e,i.d=function(t,e,r){i.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:r})},i.r=function(t){\"undefined\"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:\"Module\"}),Object.defineProperty(t,\"__esModule\",{value:!0})},i.t=function(t,e){if(1&e&&(t=i(t)),8&e)return t;if(4&e&&\"object\"==typeof t&&t&&t.__esModule)return t;var r=Object.create(null);if(i.r(r),Object.defineProperty(r,\"default\",{enumerable:!0,value:t}),2&e&&\"string\"!=typeof t)for(var o in t)i.d(r,o,function(e){return t[e]}.bind(null,o));return r},i.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return i.d(e,\"a\",e),e},i.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},i.p=\"\",i(i.s=27)}([function(e,i){e.exports=t},function(t,e,i){\"use strict\";Object.defineProperty(e,\"__esModule\",{value:!0});var r=i(2),o=i(0),n=i(7),s=i(17),a=function(){function t(e){this.name=e,this._alpha=1,this._alphaSet=!1,this._zIndex=0,this._currentMeasure=n.Measure.Empty(),this._fontFamily=\"Arial\",this._fontStyle=\"\",this._fontWeight=\"\",this._fontSize=new r.ValueAndUnit(18,r.ValueAndUnit.UNITMODE_PIXEL,!1),this._width=new r.ValueAndUnit(1,r.ValueAndUnit.UNITMODE_PERCENTAGE,!1),this._height=new r.ValueAndUnit(1,r.ValueAndUnit.UNITMODE_PERCENTAGE,!1),this._color=\"\",this._style=null,this._horizontalAlignment=t.HORIZONTAL_ALIGNMENT_CENTER,this._verticalAlignment=t.VERTICAL_ALIGNMENT_CENTER,this._isDirty=!0,this._tempParentMeasure=n.Measure.Empty(),this._cachedParentMeasure=n.Measure.Empty(),this._paddingLeft=new r.ValueAndUnit(0),this._paddingRight=new r.ValueAndUnit(0),this._paddingTop=new r.ValueAndUnit(0),this._paddingBottom=new r.ValueAndUnit(0),this._left=new r.ValueAndUnit(0),this._top=new r.ValueAndUnit(0),this._scaleX=1,this._scaleY=1,this._rotation=0,this._transformCenterX=.5,this._transformCenterY=.5,this._transformMatrix=s.Matrix2D.Identity(),this._invertTransformMatrix=s.Matrix2D.Identity(),this._transformedPosition=o.Vector2.Zero(),this._onlyMeasureMode=!1,this._isMatrixDirty=!0,this._isVisible=!0,this._fontSet=!1,this._dummyVector2=o.Vector2.Zero(),this._downCount=0,this._enterCount=-1,this._doNotRender=!1,this._downPointerIds={},this._isEnabled=!0,this._disabledColor=\"#9a9a9a\",this.isHitTestVisible=!0,this.isPointerBlocker=!1,this.isFocusInvisible=!1,this.shadowOffsetX=0,this.shadowOffsetY=0,this.shadowBlur=0,this.shadowColor=\"#000\",this.hoverCursor=\"\",this._linkOffsetX=new r.ValueAndUnit(0),this._linkOffsetY=new r.ValueAndUnit(0),this.onPointerMoveObservable=new o.Observable,this.onPointerOutObservable=new o.Observable,this.onPointerDownObservable=new o.Observable,this.onPointerUpObservable=new o.Observable,this.onPointerClickObservable=new o.Observable,this.onPointerEnterObservable=new o.Observable,this.onDirtyObservable=new o.Observable,this.onAfterDrawObservable=new o.Observable}return Object.defineProperty(t.prototype,\"typeName\",{get:function(){return this._getTypeName()},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,\"fontOffset\",{get:function(){return this._fontOffset},set:function(t){this._fontOffset=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,\"alpha\",{get:function(){return this._alpha},set:function(t){this._alpha!==t&&(this._alphaSet=!0,this._alpha=t,this._markAsDirty())},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,\"scaleX\",{get:function(){return this._scaleX},set:function(t){this._scaleX!==t&&(this._scaleX=t,this._markAsDirty(),this._markMatrixAsDirty())},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,\"scaleY\",{get:function(){return this._scaleY},set:function(t){this._scaleY!==t&&(this._scaleY=t,this._markAsDirty(),this._markMatrixAsDirty())},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,\"rotation\",{get:function(){return this._rotation},set:function(t){this._rotation!==t&&(this._rotation=t,this._markAsDirty(),this._markMatrixAsDirty())},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,\"transformCenterY\",{get:function(){return this._transformCenterY},set:function(t){this._transformCenterY!==t&&(this._transformCenterY=t,this._markAsDirty(),this._markMatrixAsDirty())},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,\"transformCenterX\",{get:function(){return this._transformCenterX},set:function(t){this._transformCenterX!==t&&(this._transformCenterX=t,this._markAsDirty(),this._markMatrixAsDirty())},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,\"horizontalAlignment\",{get:function(){return this._horizontalAlignment},set:function(t){this._horizontalAlignment!==t&&(this._horizontalAlignment=t,this._markAsDirty())},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,\"verticalAlignment\",{get:function(){return this._verticalAlignment},set:function(t){this._verticalAlignment!==t&&(this._verticalAlignment=t,this._markAsDirty())},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,\"width\",{get:function(){return this._width.toString(this._host)},set:function(t){this._width.toString(this._host)!==t&&this._width.fromString(t)&&this._markAsDirty()},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,\"widthInPixels\",{get:function(){return this._width.getValueInPixel(this._host,this._cachedParentMeasure.width)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,\"height\",{get:function(){return this._height.toString(this._host)},set:function(t){this._height.toString(this._host)!==t&&this._height.fromString(t)&&this._markAsDirty()},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,\"heightInPixels\",{get:function(){return this._height.getValueInPixel(this._host,this._cachedParentMeasure.height)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,\"fontFamily\",{get:function(){return this._fontFamily},set:function(t){this._fontFamily!==t&&(this._fontFamily=t,this._resetFontCache())},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,\"fontStyle\",{get:function(){return this._fontStyle},set:function(t){this._fontStyle!==t&&(this._fontStyle=t,this._resetFontCache())},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,\"fontWeight\",{get:function(){return this._fontWeight},set:function(t){this._fontWeight!==t&&(this._fontWeight=t,this._resetFontCache())},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,\"style\",{get:function(){return this._style},set:function(t){var e=this;this._style&&(this._style.onChangedObservable.remove(this._styleObserver),this._styleObserver=null),this._style=t,this._style&&(this._styleObserver=this._style.onChangedObservable.add(function(){e._markAsDirty(),e._resetFontCache()})),this._markAsDirty(),this._resetFontCache()},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,\"_isFontSizeInPercentage\",{get:function(){return this._fontSize.isPercentage},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,\"fontSizeInPixels\",{get:function(){var t=this._style?this._style._fontSize:this._fontSize;return t.isPixel?t.getValue(this._host):t.getValueInPixel(this._host,this._tempParentMeasure.height||this._cachedParentMeasure.height)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,\"fontSize\",{get:function(){return this._fontSize.toString(this._host)},set:function(t){this._fontSize.toString(this._host)!==t&&this._fontSize.fromString(t)&&(this._markAsDirty(),this._resetFontCache())},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,\"color\",{get:function(){return this._color},set:function(t){this._color!==t&&(this._color=t,this._markAsDirty())},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,\"zIndex\",{get:function(){return this._zIndex},set:function(t){this.zIndex!==t&&(this._zIndex=t,this._root&&this._root._reOrderControl(this))},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,\"notRenderable\",{get:function(){return this._doNotRender},set:function(t){this._doNotRender!==t&&(this._doNotRender=t,this._markAsDirty())},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,\"isVisible\",{get:function(){return this._isVisible},set:function(t){this._isVisible!==t&&(this._isVisible=t,this._markAsDirty(!0))},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,\"isDirty\",{get:function(){return this._isDirty},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,\"linkedMesh\",{get:function(){return this._linkedMesh},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,\"paddingLeft\",{get:function(){return this._paddingLeft.toString(this._host)},set:function(t){this._paddingLeft.fromString(t)&&this._markAsDirty()},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,\"paddingLeftInPixels\",{get:function(){return this._paddingLeft.getValueInPixel(this._host,this._cachedParentMeasure.width)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,\"paddingRight\",{get:function(){return this._paddingRight.toString(this._host)},set:function(t){this._paddingRight.fromString(t)&&this._markAsDirty()},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,\"paddingRightInPixels\",{get:function(){return this._paddingRight.getValueInPixel(this._host,this._cachedParentMeasure.width)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,\"paddingTop\",{get:function(){return this._paddingTop.toString(this._host)},set:function(t){this._paddingTop.fromString(t)&&this._markAsDirty()},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,\"paddingTopInPixels\",{get:function(){return this._paddingTop.getValueInPixel(this._host,this._cachedParentMeasure.height)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,\"paddingBottom\",{get:function(){return this._paddingBottom.toString(this._host)},set:function(t){this._paddingBottom.fromString(t)&&this._markAsDirty()},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,\"paddingBottomInPixels\",{get:function(){return this._paddingBottom.getValueInPixel(this._host,this._cachedParentMeasure.height)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,\"left\",{get:function(){return this._left.toString(this._host)},set:function(t){this._left.fromString(t)&&this._markAsDirty()},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,\"leftInPixels\",{get:function(){return this._left.getValueInPixel(this._host,this._cachedParentMeasure.width)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,\"top\",{get:function(){return this._top.toString(this._host)},set:function(t){this._top.fromString(t)&&this._markAsDirty()},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,\"topInPixels\",{get:function(){return this._top.getValueInPixel(this._host,this._cachedParentMeasure.height)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,\"linkOffsetX\",{get:function(){return this._linkOffsetX.toString(this._host)},set:function(t){this._linkOffsetX.fromString(t)&&this._markAsDirty()},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,\"linkOffsetXInPixels\",{get:function(){return this._linkOffsetX.getValueInPixel(this._host,this._cachedParentMeasure.width)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,\"linkOffsetY\",{get:function(){return this._linkOffsetY.toString(this._host)},set:function(t){this._linkOffsetY.fromString(t)&&this._markAsDirty()},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,\"linkOffsetYInPixels\",{get:function(){return this._linkOffsetY.getValueInPixel(this._host,this._cachedParentMeasure.height)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,\"centerX\",{get:function(){return this._currentMeasure.left+this._currentMeasure.width/2},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,\"centerY\",{get:function(){return this._currentMeasure.top+this._currentMeasure.height/2},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,\"isEnabled\",{get:function(){return this._isEnabled},set:function(t){this._isEnabled!==t&&(this._isEnabled=t,this._markAsDirty())},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,\"disabledColor\",{get:function(){return this._disabledColor},set:function(t){this._disabledColor!==t&&(this._disabledColor=t,this._markAsDirty())},enumerable:!0,configurable:!0}),t.prototype._getTypeName=function(){return\"Control\"},t.prototype._resetFontCache=function(){this._fontSet=!0,this._markAsDirty()},t.prototype.isAscendant=function(t){return!!this.parent&&(this.parent===t||this.parent.isAscendant(t))},t.prototype.getLocalCoordinates=function(t){var e=o.Vector2.Zero();return this.getLocalCoordinatesToRef(t,e),e},t.prototype.getLocalCoordinatesToRef=function(t,e){return e.x=t.x-this._currentMeasure.left,e.y=t.y-this._currentMeasure.top,this},t.prototype.getParentLocalCoordinates=function(t){var e=o.Vector2.Zero();return e.x=t.x-this._cachedParentMeasure.left,e.y=t.y-this._cachedParentMeasure.top,e},t.prototype.moveToVector3=function(e,i){if(this._host&&this._root===this._host._rootContainer){this.horizontalAlignment=t.HORIZONTAL_ALIGNMENT_LEFT,this.verticalAlignment=t.VERTICAL_ALIGNMENT_TOP;var r=this._host._getGlobalViewport(i),n=o.Vector3.Project(e,o.Matrix.Identity(),i.getTransformMatrix(),r);this._moveToProjectedPosition(n),n.z<0||n.z>1?this.notRenderable=!0:this.notRenderable=!1}else o.Tools.Error(\"Cannot move a control to a vector3 if the control is not at root level\")},t.prototype.linkWithMesh=function(e){if(!this._host||this._root&&this._root!==this._host._rootContainer)e&&o.Tools.Error(\"Cannot link a control to a mesh if the control is not at root level\");else{var i=this._host._linkedControls.indexOf(this);if(-1!==i)return this._linkedMesh=e,void(e||this._host._linkedControls.splice(i,1));e&&(this.horizontalAlignment=t.HORIZONTAL_ALIGNMENT_LEFT,this.verticalAlignment=t.VERTICAL_ALIGNMENT_TOP,this._linkedMesh=e,this._onlyMeasureMode=0===this._currentMeasure.width||0===this._currentMeasure.height,this._host._linkedControls.push(this))}},t.prototype._moveToProjectedPosition=function(t){var e=this._left.getValue(this._host),i=this._top.getValue(this._host),r=t.x+this._linkOffsetX.getValue(this._host)-this._currentMeasure.width/2,o=t.y+this._linkOffsetY.getValue(this._host)-this._currentMeasure.height/2;this._left.ignoreAdaptiveScaling&&this._top.ignoreAdaptiveScaling&&(Math.abs(r-e)<.5&&(r=e),Math.abs(o-i)<.5&&(o=i)),this.left=r+\"px\",this.top=o+\"px\",this._left.ignoreAdaptiveScaling=!0,this._top.ignoreAdaptiveScaling=!0},t.prototype._markMatrixAsDirty=function(){this._isMatrixDirty=!0,this._flagDescendantsAsMatrixDirty()},t.prototype._flagDescendantsAsMatrixDirty=function(){},t.prototype._markAsDirty=function(t){void 0===t&&(t=!1),(this._isVisible||t)&&(this._isDirty=!0,this._host&&this._host.markAsDirty())},t.prototype._markAllAsDirty=function(){this._markAsDirty(),this._font&&this._prepareFont()},t.prototype._link=function(t,e){this._root=t,this._host=e},t.prototype._transform=function(t){if(this._isMatrixDirty||1!==this._scaleX||1!==this._scaleY||0!==this._rotation){var e=this._currentMeasure.width*this._transformCenterX+this._currentMeasure.left,i=this._currentMeasure.height*this._transformCenterY+this._currentMeasure.top;t.translate(e,i),t.rotate(this._rotation),t.scale(this._scaleX,this._scaleY),t.translate(-e,-i),(this._isMatrixDirty||this._cachedOffsetX!==e||this._cachedOffsetY!==i)&&(this._cachedOffsetX=e,this._cachedOffsetY=i,this._isMatrixDirty=!1,this._flagDescendantsAsMatrixDirty(),s.Matrix2D.ComposeToRef(-e,-i,this._rotation,this._scaleX,this._scaleY,this._root?this._root._transformMatrix:null,this._transformMatrix),this._transformMatrix.invertToRef(this._invertTransformMatrix))}},t.prototype._applyStates=function(t){this._isFontSizeInPercentage&&(this._fontSet=!0),this._fontSet&&(this._prepareFont(),this._fontSet=!1),this._font&&(t.font=this._font),this._color&&(t.fillStyle=this._color),this._alphaSet&&(t.globalAlpha=this.parent?this.parent.alpha*this._alpha:this._alpha)},t.prototype._processMeasures=function(t,e){return!this._isDirty&&this._cachedParentMeasure.isEqualsTo(t)||(this._isDirty=!1,this._currentMeasure.copyFrom(t),this._preMeasure(t,e),this._measure(),this._computeAlignment(t,e),this._currentMeasure.left=0|this._currentMeasure.left,this._currentMeasure.top=0|this._currentMeasure.top,this._currentMeasure.width=0|this._currentMeasure.width,this._currentMeasure.height=0|this._currentMeasure.height,this._additionalProcessing(t,e),this._cachedParentMeasure.copyFrom(t),this.onDirtyObservable.hasObservers()&&this.onDirtyObservable.notifyObservers(this)),!(this._currentMeasure.left>t.left+t.width)&&(!(this._currentMeasure.left+this._currentMeasure.width<t.left)&&(!(this._currentMeasure.top>t.top+t.height)&&(!(this._currentMeasure.top+this._currentMeasure.height<t.top)&&(this._transform(e),this._onlyMeasureMode?(this._onlyMeasureMode=!1,!1):(this._clip(e),e.clip(),!0)))))},t.prototype._clip=function(t){if(t.beginPath(),this.shadowBlur||this.shadowOffsetX||this.shadowOffsetY){var e=this.shadowOffsetX,i=this.shadowOffsetY,r=this.shadowBlur,o=Math.min(Math.min(e,0)-2*r,0),n=Math.max(Math.max(e,0)+2*r,0),s=Math.min(Math.min(i,0)-2*r,0),a=Math.max(Math.max(i,0)+2*r,0);t.rect(this._currentMeasure.left+o,this._currentMeasure.top+s,this._currentMeasure.width+n-o,this._currentMeasure.height+a-s)}else t.rect(this._currentMeasure.left,this._currentMeasure.top,this._currentMeasure.width,this._currentMeasure.height)},t.prototype._measure=function(){this._width.isPixel?this._currentMeasure.width=this._width.getValue(this._host):this._currentMeasure.width*=this._width.getValue(this._host),this._height.isPixel?this._currentMeasure.height=this._height.getValue(this._host):this._currentMeasure.height*=this._height.getValue(this._host)},t.prototype._computeAlignment=function(e,i){var r=this._currentMeasure.width,o=this._currentMeasure.height,n=e.width,s=e.height,a=0,h=0;switch(this.horizontalAlignment){case t.HORIZONTAL_ALIGNMENT_LEFT:a=0;break;case t.HORIZONTAL_ALIGNMENT_RIGHT:a=n-r;break;case t.HORIZONTAL_ALIGNMENT_CENTER:a=(n-r)/2}switch(this.verticalAlignment){case t.VERTICAL_ALIGNMENT_TOP:h=0;break;case t.VERTICAL_ALIGNMENT_BOTTOM:h=s-o;break;case t.VERTICAL_ALIGNMENT_CENTER:h=(s-o)/2}this._paddingLeft.isPixel?(this._currentMeasure.left+=this._paddingLeft.getValue(this._host),this._currentMeasure.width-=this._paddingLeft.getValue(this._host)):(this._currentMeasure.left+=n*this._paddingLeft.getValue(this._host),this._currentMeasure.width-=n*this._paddingLeft.getValue(this._host)),this._paddingRight.isPixel?this._currentMeasure.width-=this._paddingRight.getValue(this._host):this._currentMeasure.width-=n*this._paddingRight.getValue(this._host),this._paddingTop.isPixel?(this._currentMeasure.top+=this._paddingTop.getValue(this._host),this._currentMeasure.height-=this._paddingTop.getValue(this._host)):(this._currentMeasure.top+=s*this._paddingTop.getValue(this._host),this._currentMeasure.height-=s*this._paddingTop.getValue(this._host)),this._paddingBottom.isPixel?this._currentMeasure.height-=this._paddingBottom.getValue(this._host):this._currentMeasure.height-=s*this._paddingBottom.getValue(this._host),this._left.isPixel?this._currentMeasure.left+=this._left.getValue(this._host):this._currentMeasure.left+=n*this._left.getValue(this._host),this._top.isPixel?this._currentMeasure.top+=this._top.getValue(this._host):this._currentMeasure.top+=s*this._top.getValue(this._host),this._currentMeasure.left+=a,this._currentMeasure.top+=h},t.prototype._preMeasure=function(t,e){},t.prototype._additionalProcessing=function(t,e){},t.prototype._draw=function(t,e){},t.prototype.contains=function(t,e){return this._invertTransformMatrix.transformCoordinates(t,e,this._transformedPosition),t=this._transformedPosition.x,e=this._transformedPosition.y,!(t<this._currentMeasure.left)&&(!(t>this._currentMeasure.left+this._currentMeasure.width)&&(!(e<this._currentMeasure.top)&&(!(e>this._currentMeasure.top+this._currentMeasure.height)&&(this.isPointerBlocker&&(this._host._shouldBlockPointer=!0),!0))))},t.prototype._processPicking=function(t,e,i,r,o){return!!this._isEnabled&&(!(!this.isHitTestVisible||!this.isVisible||this._doNotRender)&&(!!this.contains(t,e)&&(this._processObservables(i,t,e,r,o),!0)))},t.prototype._onPointerMove=function(t,e){this.onPointerMoveObservable.notifyObservers(e,-1,t,this)&&null!=this.parent&&this.parent._onPointerMove(t,e)},t.prototype._onPointerEnter=function(t){return!!this._isEnabled&&(!(this._enterCount>0)&&(-1===this._enterCount&&(this._enterCount=0),this._enterCount++,this.onPointerEnterObservable.notifyObservers(this,-1,t,this)&&null!=this.parent&&this.parent._onPointerEnter(t),!0))},t.prototype._onPointerOut=function(t){this._isEnabled&&(this._enterCount=0,this.onPointerOutObservable.notifyObservers(this,-1,t,this)&&null!=this.parent&&this.parent._onPointerOut(t))},t.prototype._onPointerDown=function(t,e,i,r){return this._onPointerEnter(this),0===this._downCount&&(this._downCount++,this._downPointerIds[i]=!0,this.onPointerDownObservable.notifyObservers(new s.Vector2WithInfo(e,r),-1,t,this)&&null!=this.parent&&this.parent._onPointerDown(t,e,i,r),!0)},t.prototype._onPointerUp=function(t,e,i,r,o){if(this._isEnabled){this._downCount=0,delete this._downPointerIds[i];var n=o;o&&(this._enterCount>0||-1===this._enterCount)&&(n=this.onPointerClickObservable.notifyObservers(new s.Vector2WithInfo(e,r),-1,t,this)),this.onPointerUpObservable.notifyObservers(new s.Vector2WithInfo(e,r),-1,t,this)&&null!=this.parent&&this.parent._onPointerUp(t,e,i,r,n)}},t.prototype._forcePointerUp=function(t){if(void 0===t&&(t=null),null!==t)this._onPointerUp(this,o.Vector2.Zero(),t,0,!0);else for(var e in this._downPointerIds)this._onPointerUp(this,o.Vector2.Zero(),+e,0,!0)},t.prototype._processObservables=function(t,e,i,r,n){if(!this._isEnabled)return!1;if(this._dummyVector2.copyFromFloats(e,i),t===o.PointerEventTypes.POINTERMOVE){this._onPointerMove(this,this._dummyVector2);var s=this._host._lastControlOver[r];return s&&s!==this&&s._onPointerOut(this),s!==this&&this._onPointerEnter(this),this._host._lastControlOver[r]=this,!0}return t===o.PointerEventTypes.POINTERDOWN?(this._onPointerDown(this,this._dummyVector2,r,n),this._host._lastControlDown[r]=this,this._host._lastPickedControl=this,!0):t===o.PointerEventTypes.POINTERUP&&(this._host._lastControlDown[r]&&this._host._lastControlDown[r]._onPointerUp(this,this._dummyVector2,r,n,!0),delete this._host._lastControlDown[r],!0)},t.prototype._prepareFont=function(){(this._font||this._fontSet)&&(this._style?this._font=this._style.fontStyle+\" \"+this._style.fontWeight+\" \"+this.fontSizeInPixels+\"px \"+this._style.fontFamily:this._font=this._fontStyle+\" \"+this._fontWeight+\" \"+this.fontSizeInPixels+\"px \"+this._fontFamily,this._fontOffset=t._GetFontOffset(this._font))},t.prototype.dispose=function(){(this.onDirtyObservable.clear(),this.onAfterDrawObservable.clear(),this.onPointerDownObservable.clear(),this.onPointerEnterObservable.clear(),this.onPointerMoveObservable.clear(),this.onPointerOutObservable.clear(),this.onPointerUpObservable.clear(),this.onPointerClickObservable.clear(),this._styleObserver&&this._style&&(this._style.onChangedObservable.remove(this._styleObserver),this._styleObserver=null),this._root&&(this._root.removeControl(this),this._root=null),this._host)&&(this._host._linkedControls.indexOf(this)>-1&&this.linkWithMesh(null))},Object.defineProperty(t,\"HORIZONTAL_ALIGNMENT_LEFT\",{get:function(){return t._HORIZONTAL_ALIGNMENT_LEFT},enumerable:!0,configurable:!0}),Object.defineProperty(t,\"HORIZONTAL_ALIGNMENT_RIGHT\",{get:function(){return t._HORIZONTAL_ALIGNMENT_RIGHT},enumerable:!0,configurable:!0}),Object.defineProperty(t,\"HORIZONTAL_ALIGNMENT_CENTER\",{get:function(){return t._HORIZONTAL_ALIGNMENT_CENTER},enumerable:!0,configurable:!0}),Object.defineProperty(t,\"VERTICAL_ALIGNMENT_TOP\",{get:function(){return t._VERTICAL_ALIGNMENT_TOP},enumerable:!0,configurable:!0}),Object.defineProperty(t,\"VERTICAL_ALIGNMENT_BOTTOM\",{get:function(){return t._VERTICAL_ALIGNMENT_BOTTOM},enumerable:!0,configurable:!0}),Object.defineProperty(t,\"VERTICAL_ALIGNMENT_CENTER\",{get:function(){return t._VERTICAL_ALIGNMENT_CENTER},enumerable:!0,configurable:!0}),t._GetFontOffset=function(e){if(t._FontHeightSizes[e])return t._FontHeightSizes[e];var i=document.createElement(\"span\");i.innerHTML=\"Hg\",i.style.font=e;var r=document.createElement(\"div\");r.style.display=\"inline-block\",r.style.width=\"1px\",r.style.height=\"0px\",r.style.verticalAlign=\"bottom\";var o=document.createElement(\"div\");o.appendChild(i),o.appendChild(r),document.body.appendChild(o);var n=0,s=0;try{s=r.getBoundingClientRect().top-i.getBoundingClientRect().top,r.style.verticalAlign=\"baseline\",n=r.getBoundingClientRect().top-i.getBoundingClientRect().top}finally{document.body.removeChild(o)}var a={ascent:n,height:s,descent:s-n};return t._FontHeightSizes[e]=a,a},t.drawEllipse=function(t,e,i,r,o){o.translate(t,e),o.scale(i,r),o.beginPath(),o.arc(0,0,1,0,2*Math.PI),o.closePath(),o.scale(1/i,1/r),o.translate(-t,-e)},t._HORIZONTAL_ALIGNMENT_LEFT=0,t._HORIZONTAL_ALIGNMENT_RIGHT=1,t._HORIZONTAL_ALIGNMENT_CENTER=2,t._VERTICAL_ALIGNMENT_TOP=0,t._VERTICAL_ALIGNMENT_BOTTOM=1,t._VERTICAL_ALIGNMENT_CENTER=2,t._FontHeightSizes={},t.AddHeader=function(){},t}();e.Control=a},function(t,e,i){\"use strict\";Object.defineProperty(e,\"__esModule\",{value:!0});var r=function(){function t(e,i,r){void 0===i&&(i=t.UNITMODE_PIXEL),void 0===r&&(r=!0),this.unit=i,this.negativeValueAllowed=r,this._value=1,this.ignoreAdaptiveScaling=!1,this._value=e}return Object.defineProperty(t.prototype,\"isPercentage\",{get:function(){return this.unit===t.UNITMODE_PERCENTAGE},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,\"isPixel\",{get:function(){return this.unit===t.UNITMODE_PIXEL},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,\"internalValue\",{get:function(){return this._value},enumerable:!0,configurable:!0}),t.prototype.getValueInPixel=function(t,e){return this.isPixel?this.getValue(t):this.getValue(t)*e},t.prototype.getValue=function(e){if(e&&!this.ignoreAdaptiveScaling&&this.unit!==t.UNITMODE_PERCENTAGE){var i=0,r=0;if(e.idealWidth&&(i=this._value*e.getSize().width/e.idealWidth),e.idealHeight&&(r=this._value*e.getSize().height/e.idealHeight),e.useSmallestIdeal&&e.idealWidth&&e.idealHeight)return window.innerWidth<window.innerHeight?i:r;if(e.idealWidth)return i;if(e.idealHeight)return r}return this._value},t.prototype.toString=function(e){switch(this.unit){case t.UNITMODE_PERCENTAGE:return 100*this.getValue(e)+\"%\";case t.UNITMODE_PIXEL:return this.getValue(e)+\"px\"}return this.unit.toString()},t.prototype.fromString=function(e){var i=t._Regex.exec(e.toString());if(!i||0===i.length)return!1;var r=parseFloat(i[1]),o=this.unit;if(this.negativeValueAllowed||r<0&&(r=0),4===i.length)switch(i[3]){case\"px\":o=t.UNITMODE_PIXEL;break;case\"%\":o=t.UNITMODE_PERCENTAGE,r/=100}return(r!==this._value||o!==this.unit)&&(this._value=r,this.unit=o,!0)},Object.defineProperty(t,\"UNITMODE_PERCENTAGE\",{get:function(){return t._UNITMODE_PERCENTAGE},enumerable:!0,configurable:!0}),Object.defineProperty(t,\"UNITMODE_PIXEL\",{get:function(){return t._UNITMODE_PIXEL},enumerable:!0,configurable:!0}),t._Regex=/(^-?\\d*(\\.\\d+)?)(%|px)?/,t._UNITMODE_PERCENTAGE=0,t._UNITMODE_PIXEL=1,t}();e.ValueAndUnit=r},function(t,e,i){\"use strict\";var r=this&&this.__extends||function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])})(e,i)};return function(e,i){function r(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}();Object.defineProperty(e,\"__esModule\",{value:!0});var o=i(13),n=i(0),s=function(t){function e(e){var i=t.call(this,e)||this;return i._blockLayout=!1,i._children=new Array,i}return r(e,t),Object.defineProperty(e.prototype,\"children\",{get:function(){return this._children},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,\"blockLayout\",{get:function(){return this._blockLayout},set:function(t){this._blockLayout!==t&&(this._blockLayout=t,this._blockLayout||this._arrangeChildren())},enumerable:!0,configurable:!0}),e.prototype.updateLayout=function(){return this._arrangeChildren(),this},e.prototype.containsControl=function(t){return-1!==this._children.indexOf(t)},e.prototype.addControl=function(t){return-1!==this._children.indexOf(t)?this:(t.parent=this,t._host=this._host,this._children.push(t),this._host.utilityLayer&&(t._prepareNode(this._host.utilityLayer.utilityLayerScene),t.node&&(t.node.parent=this.node),this.blockLayout||this._arrangeChildren()),this)},e.prototype._arrangeChildren=function(){},e.prototype._createNode=function(t){return new n.TransformNode(\"ContainerNode\",t)},e.prototype.removeControl=function(t){var e=this._children.indexOf(t);return-1!==e&&(this._children.splice(e,1),t.parent=null,t._disposeNode()),this},e.prototype._getTypeName=function(){return\"Container3D\"},e.prototype.dispose=function(){for(var e=0,i=this._children;e<i.length;e++){i[e].dispose()}this._children=[],t.prototype.dispose.call(this)},e.UNSET_ORIENTATION=0,e.FACEORIGIN_ORIENTATION=1,e.FACEORIGINREVERSED_ORIENTATION=2,e.FACEFORWARD_ORIENTATION=3,e.FACEFORWARDREVERSED_ORIENTATION=4,e}(o.Control3D);e.Container3D=s},function(t,e,i){\"use strict\";var r=this&&this.__extends||function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])})(e,i)};return function(e,i){function r(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}();Object.defineProperty(e,\"__esModule\",{value:!0});var o=i(1),n=i(7),s=function(t){function e(e){var i=t.call(this,e)||this;return i.name=e,i._children=new Array,i._measureForChildren=n.Measure.Empty(),i._adaptWidthToChildren=!1,i._adaptHeightToChildren=!1,i}return r(e,t),Object.defineProperty(e.prototype,\"adaptHeightToChildren\",{get:function(){return this._adaptHeightToChildren},set:function(t){this._adaptHeightToChildren!==t&&(this._adaptHeightToChildren=t,t&&(this.height=\"100%\"),this._markAsDirty())},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,\"adaptWidthToChildren\",{get:function(){return this._adaptWidthToChildren},set:function(t){this._adaptWidthToChildren!==t&&(this._adaptWidthToChildren=t,t&&(this.width=\"100%\"),this._markAsDirty())},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,\"background\",{get:function(){return this._background},set:function(t){this._background!==t&&(this._background=t,this._markAsDirty())},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,\"children\",{get:function(){return this._children},enumerable:!0,configurable:!0}),e.prototype._getTypeName=function(){return\"Container\"},e.prototype._flagDescendantsAsMatrixDirty=function(){for(var t=0,e=this.children;t<e.length;t++){e[t]._markMatrixAsDirty()}},e.prototype.getChildByName=function(t){for(var e=0,i=this.children;e<i.length;e++){var r=i[e];if(r.name===t)return r}return null},e.prototype.getChildByType=function(t,e){for(var i=0,r=this.children;i<r.length;i++){var o=r[i];if(o.typeName===e)return o}return null},e.prototype.containsControl=function(t){return-1!==this.children.indexOf(t)},e.prototype.addControl=function(t){return t?-1!==this._children.indexOf(t)?this:(t._link(this,this._host),t._markAllAsDirty(),this._reOrderControl(t),this._markAsDirty(),this):this},e.prototype.clearControls=function(){for(var t=0,e=this._children.slice();t<e.length;t++){var i=e[t];this.removeControl(i)}return this},e.prototype.removeControl=function(t){var e=this._children.indexOf(t);return-1!==e&&(this._children.splice(e,1),t.parent=null),t.linkWithMesh(null),this._host&&this._host._cleanControlAfterRemoval(t),this._markAsDirty(),this},e.prototype._reOrderControl=function(t){this.removeControl(t);for(var e=0;e<this._children.length;e++)if(this._children[e].zIndex>t.zIndex)return void this._children.splice(e,0,t);this._children.push(t),t.parent=this,this._markAsDirty()},e.prototype._markAllAsDirty=function(){t.prototype._markAllAsDirty.call(this);for(var e=0;e<this._children.length;e++)this._children[e]._markAllAsDirty()},e.prototype._localDraw=function(t){this._background&&((this.shadowBlur||this.shadowOffsetX||this.shadowOffsetY)&&(t.shadowColor=this.shadowColor,t.shadowBlur=this.shadowBlur,t.shadowOffsetX=this.shadowOffsetX,t.shadowOffsetY=this.shadowOffsetY),t.fillStyle=this._background,t.fillRect(this._currentMeasure.left,this._currentMeasure.top,this._currentMeasure.width,this._currentMeasure.height),(this.shadowBlur||this.shadowOffsetX||this.shadowOffsetY)&&(t.shadowBlur=0,t.shadowOffsetX=0,t.shadowOffsetY=0))},e.prototype._link=function(e,i){t.prototype._link.call(this,e,i);for(var r=0,o=this._children;r<o.length;r++){o[r]._link(this,i)}},e.prototype._draw=function(t,e){if(this.isVisible&&!this.notRenderable){if(e.save(),this._applyStates(e),this._processMeasures(t,e)){this._localDraw(e),this._clipForChildren(e);for(var i=-1,r=-1,o=0,n=this._children;o<n.length;o++){var s=n[o];s.isVisible&&!s.notRenderable&&(s._tempParentMeasure.copyFrom(this._measureForChildren),s._draw(this._measureForChildren,e),s.onAfterDrawObservable.hasObservers()&&s.onAfterDrawObservable.notifyObservers(s),this.adaptWidthToChildren&&s._width.isPixel&&(i=Math.max(i,s._currentMeasure.width)),this.adaptHeightToChildren&&s._height.isPixel&&(r=Math.max(r,s._currentMeasure.height)))}this.adaptWidthToChildren&&i>=0&&(this.width=i+\"px\"),this.adaptHeightToChildren&&r>=0&&(this.height=r+\"px\")}e.restore(),this.onAfterDrawObservable.hasObservers()&&this.onAfterDrawObservable.notifyObservers(this)}},e.prototype._processPicking=function(e,i,r,o,n){if(!this.isVisible||this.notRenderable)return!1;if(!t.prototype.contains.call(this,e,i))return!1;for(var s=this._children.length-1;s>=0;s--){var a=this._children[s];if(a._processPicking(e,i,r,o,n))return a.hoverCursor&&this._host._changeCursor(a.hoverCursor),!0}return!!this.isHitTestVisible&&this._processObservables(r,e,i,o,n)},e.prototype._clipForChildren=function(t){},e.prototype._additionalProcessing=function(e,i){t.prototype._additionalProcessing.call(this,e,i),this._measureForChildren.copyFrom(this._currentMeasure)},e.prototype.dispose=function(){t.prototype.dispose.call(this);for(var e=0,i=this._children;e<i.length;e++){i[e].dispose()}},e}(o.Control);e.Container=s},function(t,e,i){\"use strict\";var r=this&&this.__extends||function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])})(e,i)};return function(e,i){function r(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}();Object.defineProperty(e,\"__esModule\",{value:!0});var o,n=i(0),s=i(2),a=i(1);!function(t){t[t.Clip=0]=\"Clip\",t[t.WordWrap=1]=\"WordWrap\",t[t.Ellipsis=2]=\"Ellipsis\"}(o=e.TextWrapping||(e.TextWrapping={}));var h=function(t){function e(e,i){void 0===i&&(i=\"\");var r=t.call(this,e)||this;return r.name=e,r._text=\"\",r._textWrapping=o.Clip,r._textHorizontalAlignment=a.Control.HORIZONTAL_ALIGNMENT_CENTER,r._textVerticalAlignment=a.Control.VERTICAL_ALIGNMENT_CENTER,r._resizeToFit=!1,r._lineSpacing=new s.ValueAndUnit(0),r._outlineWidth=0,r._outlineColor=\"white\",r.onTextChangedObservable=new n.Observable,r.onLinesReadyObservable=new n.Observable,r.text=i,r}return r(e,t),Object.defineProperty(e.prototype,\"lines\",{get:function(){return this._lines},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,\"resizeToFit\",{get:function(){return this._resizeToFit},set:function(t){this._resizeToFit=t,this._resizeToFit&&(this._width.ignoreAdaptiveScaling=!0,this._height.ignoreAdaptiveScaling=!0)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,\"textWrapping\",{get:function(){return this._textWrapping},set:function(t){this._textWrapping!==t&&(this._textWrapping=+t,this._markAsDirty())},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,\"text\",{get:function(){return this._text},set:function(t){this._text!==t&&(this._text=t,this._markAsDirty(),this.onTextChangedObservable.notifyObservers(this))},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,\"textHorizontalAlignment\",{get:function(){return this._textHorizontalAlignment},set:function(t){this._textHorizontalAlignment!==t&&(this._textHorizontalAlignment=t,this._markAsDirty())},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,\"textVerticalAlignment\",{get:function(){return this._textVerticalAlignment},set:function(t){this._textVerticalAlignment!==t&&(this._textVerticalAlignment=t,this._markAsDirty())},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,\"lineSpacing\",{get:function(){return this._lineSpacing.toString(this._host)},set:function(t){this._lineSpacing.fromString(t)&&this._markAsDirty()},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,\"outlineWidth\",{get:function(){return this._outlineWidth},set:function(t){this._outlineWidth!==t&&(this._outlineWidth=t,this._markAsDirty())},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,\"outlineColor\",{get:function(){return this._outlineColor},set:function(t){this._outlineColor!==t&&(this._outlineColor=t,this._markAsDirty())},enumerable:!0,configurable:!0}),e.prototype._getTypeName=function(){return\"TextBlock\"},e.prototype._drawText=function(t,e,i,r){var o=this._currentMeasure.width,n=0;switch(this._textHorizontalAlignment){case a.Control.HORIZONTAL_ALIGNMENT_LEFT:n=0;break;case a.Control.HORIZONTAL_ALIGNMENT_RIGHT:n=o-e;break;case a.Control.HORIZONTAL_ALIGNMENT_CENTER:n=(o-e)/2}(this.shadowBlur||this.shadowOffsetX||this.shadowOffsetY)&&(r.shadowColor=this.shadowColor,r.shadowBlur=this.shadowBlur,r.shadowOffsetX=this.shadowOffsetX,r.shadowOffsetY=this.shadowOffsetY),this.outlineWidth&&r.strokeText(t,this._currentMeasure.left+n,i),r.fillText(t,this._currentMeasure.left+n,i)},e.prototype._draw=function(t,e){e.save(),this._applyStates(e),this._processMeasures(t,e)&&this._renderLines(e),e.restore()},e.prototype._applyStates=function(e){t.prototype._applyStates.call(this,e),this.outlineWidth&&(e.lineWidth=this.outlineWidth,e.strokeStyle=this.outlineColor)},e.prototype._additionalProcessing=function(t,e){this._lines=this._breakLines(this._currentMeasure.width,e),this.onLinesReadyObservable.notifyObservers(this)},e.prototype._breakLines=function(t,e){var i=[],r=this.text.split(\"\\n\");if(this._textWrapping!==o.Ellipsis||this._resizeToFit)if(this._textWrapping!==o.WordWrap||this._resizeToFit)for(var n=0,s=r;n<s.length;n++){l=s[n];i.push(this._parseLine(l,e))}else for(var a=0,h=r;a<h.length;a++){var l=h[a];i.push.apply(i,this._parseLineWordWrap(l,t,e))}else for(var u=0,c=r;u<c.length;u++){var l=c[u];i.push(this._parseLineEllipsis(l,t,e))}return i},e.prototype._parseLine=function(t,e){return void 0===t&&(t=\"\"),{text:t,width:e.measureText(t).width}},e.prototype._parseLineEllipsis=function(t,e,i){void 0===t&&(t=\"\");var r=i.measureText(t).width;for(r>e&&(t+=\"…\");t.length>2&&r>e;)t=t.slice(0,-2)+\"…\",r=i.measureText(t).width;return{text:t,width:r}},e.prototype._parseLineWordWrap=function(t,e,i){void 0===t&&(t=\"\");for(var r=[],o=t.split(\" \"),n=0,s=0;s<o.length;s++){var a=s>0?t+\" \"+o[s]:o[0],h=i.measureText(a).width;h>e&&s>0?(r.push({text:t,width:n}),t=o[s],n=i.measureText(t).width):(n=h,t=a)}return r.push({text:t,width:n}),r},e.prototype._renderLines=function(t){var e=this._currentMeasure.height;this._fontOffset||(this._fontOffset=a.Control._GetFontOffset(t.font));var i=0;switch(this._textVerticalAlignment){case a.Control.VERTICAL_ALIGNMENT_TOP:i=this._fontOffset.ascent;break;case a.Control.VERTICAL_ALIGNMENT_BOTTOM:i=e-this._fontOffset.height*(this._lines.length-1)-this._fontOffset.descent;break;case a.Control.VERTICAL_ALIGNMENT_CENTER:i=this._fontOffset.ascent+(e-this._fontOffset.height*this._lines.length)/2}i+=this._currentMeasure.top;for(var r=0,o=0;o<this._lines.length;o++){var n=this._lines[o];0!==o&&0!==this._lineSpacing.internalValue&&(this._lineSpacing.isPixel?i+=this._lineSpacing.getValue(this._host):i+=this._lineSpacing.getValue(this._host)*this._height.getValueInPixel(this._host,this._cachedParentMeasure.height)),this._drawText(n.text,n.width,i,t),i+=this._fontOffset.height,n.width>r&&(r=n.width)}this._resizeToFit&&(this.width=this.paddingLeftInPixels+this.paddingRightInPixels+r+\"px\",this.height=this.paddingTopInPixels+this.paddingBottomInPixels+this._fontOffset.height*this._lines.length+\"px\")},e.prototype.computeExpectedHeight=function(){if(this.text&&this.widthInPixels){var t=document.createElement(\"canvas\").getContext(\"2d\");if(t){this._applyStates(t),this._fontOffset||(this._fontOffset=a.Control._GetFontOffset(t.font));var e=this._lines?this._lines:this._breakLines(this.widthInPixels-this.paddingLeftInPixels-this.paddingRightInPixels,t);return this.paddingTopInPixels+this.paddingBottomInPixels+this._fontOffset.height*e.length}}return 0},e.prototype.dispose=function(){t.prototype.dispose.call(this),this.onTextChangedObservable.clear()},e}(a.Control);e.TextBlock=h},function(t,e,i){\"use strict\";var r=this&&this.__extends||function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])})(e,i)};return function(e,i){function r(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}();Object.defineProperty(e,\"__esModule\",{value:!0});var o=i(4),n=i(7),s=i(1),a=function(t){function e(e){var i=t.call(this,e)||this;return i.name=e,i._isVertical=!0,i._manualWidth=!1,i._manualHeight=!1,i._doNotTrackManualChanges=!1,i._tempMeasureStore=n.Measure.Empty(),i}return r(e,t),Object.defineProperty(e.prototype,\"isVertical\",{get:function(){return this._isVertical},set:function(t){this._isVertical!==t&&(this._isVertical=t,this._markAsDirty())},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,\"width\",{get:function(){return this._width.toString(this._host)},set:function(t){this._doNotTrackManualChanges||(this._manualWidth=!0),this._width.toString(this._host)!==t&&this._width.fromString(t)&&this._markAsDirty()},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,\"height\",{get:function(){return this._height.toString(this._host)},set:function(t){this._doNotTrackManualChanges||(this._manualHeight=!0),this._height.toString(this._host)!==t&&this._height.fromString(t)&&this._markAsDirty()},enumerable:!0,configurable:!0}),e.prototype._getTypeName=function(){return\"StackPanel\"},e.prototype._preMeasure=function(e,i){for(var r=0,o=0,n=0,a=this._children;n<a.length;n++){var h=a[n];this._tempMeasureStore.copyFrom(h._currentMeasure),h._currentMeasure.copyFrom(e),h._measure(),this._isVertical?(h.top=o+\"px\",h._top.ignoreAdaptiveScaling||h._markAsDirty(),h._top.ignoreAdaptiveScaling=!0,o+=h._currentMeasure.height,h._currentMeasure.width>r&&(r=h._currentMeasure.width),h.verticalAlignment=s.Control.VERTICAL_ALIGNMENT_TOP):(h.left=r+\"px\",h._left.ignoreAdaptiveScaling||h._markAsDirty(),h._left.ignoreAdaptiveScaling=!0,r+=h._currentMeasure.width,h._currentMeasure.height>o&&(o=h._currentMeasure.height),h.horizontalAlignment=s.Control.HORIZONTAL_ALIGNMENT_LEFT),h._currentMeasure.copyFrom(this._tempMeasureStore)}this._doNotTrackManualChanges=!0;var l,u,c=this.height,_=this.width;this._manualHeight||(this.height=o+\"px\"),this._manualWidth||(this.width=r+\"px\"),l=_!==this.width||!this._width.ignoreAdaptiveScaling,(u=c!==this.height||!this._height.ignoreAdaptiveScaling)&&(this._height.ignoreAdaptiveScaling=!0),l&&(this._width.ignoreAdaptiveScaling=!0),this._doNotTrackManualChanges=!1,(l||u)&&this._markAllAsDirty(),t.prototype._preMeasure.call(this,e,i)},e}(o.Container);e.StackPanel=a},function(t,e,i){\"use strict\";Object.defineProperty(e,\"__esModule\",{value:!0});var r=function(){function t(t,e,i,r){this.left=t,this.top=e,this.width=i,this.height=r}return t.prototype.copyFrom=function(t){this.left=t.left,this.top=t.top,this.width=t.width,this.height=t.height},t.prototype.isEqualsTo=function(t){return this.left===t.left&&(this.top===t.top&&(this.width===t.width&&this.height===t.height))},t.Empty=function(){return new t(0,0,0,0)},t}();e.Measure=r},function(t,e,i){\"use strict\";var r=this&&this.__extends||function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])})(e,i)};return function(e,i){function r(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}();Object.defineProperty(e,\"__esModule\",{value:!0});var o=i(3),n=i(0),s=function(t){function e(){var e=t.call(this)||this;return e._columns=10,e._rows=0,e._rowThenColum=!0,e._orientation=o.Container3D.FACEORIGIN_ORIENTATION,e.margin=0,e}return r(e,t),Object.defineProperty(e.prototype,\"orientation\",{get:function(){return this._orientation},set:function(t){var e=this;this._orientation!==t&&(this._orientation=t,n.Tools.SetImmediate(function(){e._arrangeChildren()}))},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,\"columns\",{get:function(){return this._columns},set:function(t){var e=this;this._columns!==t&&(this._columns=t,this._rowThenColum=!0,n.Tools.SetImmediate(function(){e._arrangeChildren()}))},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,\"rows\",{get:function(){return this._rows},set:function(t){var e=this;this._rows!==t&&(this._rows=t,this._rowThenColum=!1,n.Tools.SetImmediate(function(){e._arrangeChildren()}))},enumerable:!0,configurable:!0}),e.prototype._arrangeChildren=function(){this._cellWidth=0,this._cellHeight=0;for(var t=0,e=0,i=0,r=n.Matrix.Invert(this.node.computeWorldMatrix(!0)),o=0,s=this._children;o<s.length;o++){if((b=s[o]).mesh){i++,b.mesh.computeWorldMatrix(!0);var a=b.mesh.getHierarchyBoundingVectors(),h=n.Tmp.Vector3[0],l=n.Tmp.Vector3[1];a.max.subtractToRef(a.min,l),l.scaleInPlace(.5),n.Vector3.TransformNormalToRef(l,r,h),this._cellWidth=Math.max(this._cellWidth,2*h.x),this._cellHeight=Math.max(this._cellHeight,2*h.y)}}this._cellWidth+=2*this.margin,this._cellHeight+=2*this.margin,this._rowThenColum?(e=this._columns,t=Math.ceil(i/this._columns)):(t=this._rows,e=Math.ceil(i/this._rows));var u=.5*e*this._cellWidth,c=.5*t*this._cellHeight,_=[],f=0;if(this._rowThenColum)for(var p=0;p<t;p++)for(var d=0;d<e&&(_.push(new n.Vector3(d*this._cellWidth-u+this._cellWidth/2,p*this._cellHeight-c+this._cellHeight/2,0)),!(++f>i));d++);else for(d=0;d<e;d++)for(p=0;p<t&&(_.push(new n.Vector3(d*this._cellWidth-u+this._cellWidth/2,p*this._cellHeight-c+this._cellHeight/2,0)),!(++f>i));p++);f=0;for(var y=0,g=this._children;y<g.length;y++){var b;(b=g[y]).mesh&&(this._mapGridNode(b,_[f]),f++)}this._finalProcessing()},e.prototype._finalProcessing=function(){},e}(o.Container3D);e.VolumeBasedPanel=s},function(t,e,i){\"use strict\";function r(t){for(var i in t)e.hasOwnProperty(i)||(e[i]=t[i])}Object.defineProperty(e,\"__esModule\",{value:!0}),r(i(16)),r(i(18)),r(i(30)),r(i(4)),r(i(1)),r(i(31)),r(i(32)),r(i(11)),r(i(19)),r(i(33)),r(i(34)),r(i(35)),r(i(21)),r(i(6)),r(i(36)),r(i(5)),r(i(37)),r(i(22)),r(i(10)),r(i(38)),r(i(39))},function(t,e,i){\"use strict\";var r=this&&this.__extends||function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])})(e,i)};return function(e,i){function r(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}();Object.defineProperty(e,\"__esModule\",{value:!0});var o=function(t){function e(e){var i=t.call(this,e)||this;return i.name=e,i._thickness=1,i._cornerRadius=0,i}return r(e,t),Object.defineProperty(e.prototype,\"thickness\",{get:function(){return this._thickness},set:function(t){this._thickness!==t&&(this._thickness=t,this._markAsDirty())},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,\"cornerRadius\",{get:function(){return this._cornerRadius},set:function(t){t<0&&(t=0),this._cornerRadius!==t&&(this._cornerRadius=t,this._markAsDirty())},enumerable:!0,configurable:!0}),e.prototype._getTypeName=function(){return\"Rectangle\"},e.prototype._localDraw=function(t){t.save(),(this.shadowBlur||this.shadowOffsetX||this.shadowOffsetY)&&(t.shadowColor=this.shadowColor,t.shadowBlur=this.shadowBlur,t.shadowOffsetX=this.shadowOffsetX,t.shadowOffsetY=this.shadowOffsetY),this._background&&(t.fillStyle=this._background,this._cornerRadius?(this._drawRoundedRect(t,this._thickness/2),t.fill()):t.fillRect(this._currentMeasure.left,this._currentMeasure.top,this._currentMeasure.width,this._currentMeasure.height)),this._thickness&&((this.shadowBlur||this.shadowOffsetX||this.shadowOffsetY)&&(t.shadowBlur=0,t.shadowOffsetX=0,t.shadowOffsetY=0),this.color&&(t.strokeStyle=this.color),t.lineWidth=this._thickness,this._cornerRadius?(this._drawRoundedRect(t,this._thickness/2),t.stroke()):t.strokeRect(this._currentMeasure.left+this._thickness/2,this._currentMeasure.top+this._thickness/2,this._currentMeasure.width-this._thickness,this._currentMeasure.height-this._thickness)),t.restore()},e.prototype._additionalProcessing=function(e,i){t.prototype._additionalProcessing.call(this,e,i),this._measureForChildren.width-=2*this._thickness,this._measureForChildren.height-=2*this._thickness,this._measureForChildren.left+=this._thickness,this._measureForChildren.top+=this._thickness},e.prototype._drawRoundedRect=function(t,e){void 0===e&&(e=0);var i=this._currentMeasure.left+e,r=this._currentMeasure.top+e,o=this._currentMeasure.width-2*e,n=this._currentMeasure.height-2*e,s=Math.min(n/2-2,Math.min(o/2-2,this._cornerRadius));t.beginPath(),t.moveTo(i+s,r),t.lineTo(i+o-s,r),t.quadraticCurveTo(i+o,r,i+o,r+s),t.lineTo(i+o,r+n-s),t.quadraticCurveTo(i+o,r+n,i+o-s,r+n),t.lineTo(i+s,r+n),t.quadraticCurveTo(i,r+n,i,r+n-s),t.lineTo(i,r+s),t.quadraticCurveTo(i,r,i+s,r),t.closePath()},e.prototype._clipForChildren=function(t){this._cornerRadius&&(this._drawRoundedRect(t,this._thickness),t.clip())},e}(i(4).Container);e.Rectangle=o},function(t,e,i){\"use strict\";var r=this&&this.__extends||function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])})(e,i)};return function(e,i){function r(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}();Object.defineProperty(e,\"__esModule\",{value:!0});var o=i(1),n=i(0),s=function(t){function e(i,r){void 0===r&&(r=null);var o=t.call(this,i)||this;return o.name=i,o._loaded=!1,o._stretch=e.STRETCH_FILL,o._autoScale=!1,o._sourceLeft=0,o._sourceTop=0,o._sourceWidth=0,o._sourceHeight=0,o._cellWidth=0,o._cellHeight=0,o._cellId=-1,o.source=r,o}return r(e,t),Object.defineProperty(e.prototype,\"sourceLeft\",{get:function(){return this._sourceLeft},set:function(t){this._sourceLeft!==t&&(this._sourceLeft=t,this._markAsDirty())},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,\"sourceTop\",{get:function(){return this._sourceTop},set:function(t){this._sourceTop!==t&&(this._sourceTop=t,this._markAsDirty())},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,\"sourceWidth\",{get:function(){return this._sourceWidth},set:function(t){this._sourceWidth!==t&&(this._sourceWidth=t,this._markAsDirty())},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,\"sourceHeight\",{get:function(){return this._sourceHeight},set:function(t){this._sourceHeight!==t&&(this._sourceHeight=t,this._markAsDirty())},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,\"autoScale\",{get:function(){return this._autoScale},set:function(t){this._autoScale!==t&&(this._autoScale=t,t&&this._loaded&&this.synchronizeSizeWithContent())},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,\"stretch\",{get:function(){return this._stretch},set:function(t){this._stretch!==t&&(this._stretch=t,this._markAsDirty())},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,\"domImage\",{get:function(){return this._domImage},set:function(t){var e=this;this._domImage=t,this._loaded=!1,this._domImage.width?this._onImageLoaded():this._domImage.onload=function(){e._onImageLoaded()}},enumerable:!0,configurable:!0}),e.prototype._onImageLoaded=function(){this._imageWidth=this._domImage.width,this._imageHeight=this._domImage.height,this._loaded=!0,this._autoScale&&this.synchronizeSizeWithContent(),this._markAsDirty()},Object.defineProperty(e.prototype,\"source\",{set:function(t){var e=this;this._source!==t&&(this._loaded=!1,this._source=t,this._domImage=document.createElement(\"img\"),this._domImage.onload=function(){e._onImageLoaded()},t&&(n.Tools.SetCorsBehavior(t,this._domImage),this._domImage.src=t))},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,\"cellWidth\",{get:function(){return this._cellWidth},set:function(t){this._cellWidth!==t&&(this._cellWidth=t,this._markAsDirty())},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,\"cellHeight\",{get:function(){return this._cellHeight},set:function(t){this._cellHeight!==t&&(this._cellHeight=t,this._markAsDirty())},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,\"cellId\",{get:function(){return this._cellId},set:function(t){this._cellId!==t&&(this._cellId=t,this._markAsDirty())},enumerable:!0,configurable:!0}),e.prototype._getTypeName=function(){return\"Image\"},e.prototype.synchronizeSizeWithContent=function(){this._loaded&&(this.width=this._domImage.width+\"px\",this.height=this._domImage.height+\"px\")},e.prototype._draw=function(t,i){var r,o,n,s;if(i.save(),(this.shadowBlur||this.shadowOffsetX||this.shadowOffsetY)&&(i.shadowColor=this.shadowColor,i.shadowBlur=this.shadowBlur,i.shadowOffsetX=this.shadowOffsetX,i.shadowOffsetY=this.shadowOffsetY),-1==this.cellId)r=this._sourceLeft,o=this._sourceTop,n=this._sourceWidth?this._sourceWidth:this._imageWidth,s=this._sourceHeight?this._sourceHeight:this._imageHeight;else{var a=this._domImage.naturalWidth/this.cellWidth,h=this.cellId/a>>0,l=this.cellId%a;r=this.cellWidth*l,o=this.cellHeight*h,n=this.cellWidth,s=this.cellHeight}if(this._applyStates(i),this._processMeasures(t,i)&&this._loaded)switch(this._stretch){case e.STRETCH_NONE:case e.STRETCH_FILL:i.drawImage(this._domImage,r,o,n,s,this._currentMeasure.left,this._currentMeasure.top,this._currentMeasure.width,this._currentMeasure.height);break;case e.STRETCH_UNIFORM:var u=this._currentMeasure.width/n,c=this._currentMeasure.height/s,_=Math.min(u,c),f=(this._currentMeasure.width-n*_)/2,p=(this._currentMeasure.height-s*_)/2;i.drawImage(this._domImage,r,o,n,s,this._currentMeasure.left+f,this._currentMeasure.top+p,n*_,s*_);break;case e.STRETCH_EXTEND:i.drawImage(this._domImage,r,o,n,s,this._currentMeasure.left,this._currentMeasure.top,this._currentMeasure.width,this._currentMeasure.height),this._autoScale&&this.synchronizeSizeWithContent(),this._root&&this._root.parent&&(this._root.width=this.width,this._root.height=this.height)}i.restore()},e.STRETCH_NONE=0,e.STRETCH_FILL=1,e.STRETCH_UNIFORM=2,e.STRETCH_EXTEND=3,e}(o.Control);e.Image=s},function(t,e,i){\"use strict\";var r=this&&this.__extends||function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])})(e,i)};return function(e,i){function r(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}();Object.defineProperty(e,\"__esModule\",{value:!0});var o=i(0),n=i(4),s=i(23),a=i(7),h=function(t){function e(e,i,r,s,a,h){void 0===i&&(i=0),void 0===r&&(r=0),void 0===a&&(a=!1),void 0===h&&(h=o.Texture.NEAREST_SAMPLINGMODE);var l=t.call(this,e,{width:i,height:r},s,a,h,o.Engine.TEXTUREFORMAT_RGBA)||this;return l._isDirty=!1,l._rootContainer=new n.Container(\"root\"),l._lastControlOver={},l._lastControlDown={},l._capturingControl={},l._linkedControls=new Array,l._isFullscreen=!1,l._fullscreenViewport=new o.Viewport(0,0,1,1),l._idealWidth=0,l._idealHeight=0,l._useSmallestIdeal=!1,l._renderAtIdealSize=!1,l._blockNextFocusCheck=!1,l._renderScale=1,l.premulAlpha=!1,(s=l.getScene())&&l._texture?(l._rootCanvas=s.getEngine().getRenderingCanvas(),l._renderObserver=s.onBeforeCameraRenderObservable.add(function(t){return l._checkUpdate(t)}),l._preKeyboardObserver=s.onPreKeyboardObservable.add(function(t){l._focusedControl&&(t.type===o.KeyboardEventTypes.KEYDOWN&&l._focusedControl.processKeyboard(t.event),t.skipOnPointerObservable=!0)}),l._rootContainer._link(null,l),l.hasAlpha=!0,i&&r||(l._resizeObserver=s.getEngine().onResizeObservable.add(function(){return l._onResize()}),l._onResize()),l._texture.isReady=!0,l):l}return r(e,t),Object.defineProperty(e.prototype,\"renderScale\",{get:function(){return this._renderScale},set:function(t){t!==this._renderScale&&(this._renderScale=t,this._onResize())},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,\"background\",{get:function(){return this._background},set:function(t){this._background!==t&&(this._background=t,this.markAsDirty())},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,\"idealWidth\",{get:function(){return this._idealWidth},set:function(t){this._idealWidth!==t&&(this._idealWidth=t,this.markAsDirty(),this._rootContainer._markAllAsDirty())},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,\"idealHeight\",{get:function(){return this._idealHeight},set:function(t){this._idealHeight!==t&&(this._idealHeight=t,this.markAsDirty(),this._rootContainer._markAllAsDirty())},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,\"useSmallestIdeal\",{get:function(){return this._useSmallestIdeal},set:function(t){this._useSmallestIdeal!==t&&(this._useSmallestIdeal=t,this.markAsDirty(),this._rootContainer._markAllAsDirty())},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,\"renderAtIdealSize\",{get:function(){return this._renderAtIdealSize},set:function(t){this._renderAtIdealSize!==t&&(this._renderAtIdealSize=t,this._onResize())},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,\"layer\",{get:function(){return this._layerToDispose},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,\"rootContainer\",{get:function(){return this._rootContainer},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,\"focusedControl\",{get:function(){return this._focusedControl},set:function(t){this._focusedControl!=t&&(this._focusedControl&&this._focusedControl.onBlur(),t&&t.onFocus(),this._focusedControl=t)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,\"isForeground\",{get:function(){return!this.layer||!this.layer.isBackground},set:function(t){this.layer&&this.layer.isBackground!==!t&&(this.layer.isBackground=!t)},enumerable:!0,configurable:!0}),e.prototype.executeOnAllControls=function(t,e){e||(e=this._rootContainer),t(e);for(var i=0,r=e.children;i<r.length;i++){var o=r[i];o.children?this.executeOnAllControls(t,o):t(o)}},e.prototype.markAsDirty=function(){this._isDirty=!0},e.prototype.createStyle=function(){return new s.Style(this)},e.prototype.addControl=function(t){return this._rootContainer.addControl(t),this},e.prototype.removeControl=function(t){return this._rootContainer.removeControl(t),this},e.prototype.dispose=function(){var e=this.getScene();e&&(this._rootCanvas=null,e.onBeforeCameraRenderObservable.remove(this._renderObserver),this._resizeObserver&&e.getEngine().onResizeObservable.remove(this._resizeObserver),this._pointerMoveObserver&&e.onPrePointerObservable.remove(this._pointerMoveObserver),this._pointerObserver&&e.onPointerObservable.remove(this._pointerObserver),this._preKeyboardObserver&&e.onPreKeyboardObservable.remove(this._preKeyboardObserver),this._canvasPointerOutObserver&&e.getEngine().onCanvasPointerOutObservable.remove(this._canvasPointerOutObserver),this._layerToDispose&&(this._layerToDispose.texture=null,this._layerToDispose.dispose(),this._layerToDispose=null),this._rootContainer.dispose(),t.prototype.dispose.call(this))},e.prototype._onResize=function(){var t=this.getScene();if(t){var e=t.getEngine(),i=this.getSize(),r=e.getRenderWidth()*this._renderScale,o=e.getRenderHeight()*this._renderScale;this._renderAtIdealSize&&(this._idealWidth?(o=o*this._idealWidth/r,r=this._idealWidth):this._idealHeight&&(r=r*this._idealHeight/o,o=this._idealHeight)),i.width===r&&i.height===o||(this.scaleTo(r,o),this.markAsDirty(),(this._idealWidth||this._idealHeight)&&this._rootContainer._markAllAsDirty())}},e.prototype._getGlobalViewport=function(t){var e=t.getEngine();return this._fullscreenViewport.toGlobal(e.getRenderWidth(),e.getRenderHeight())},e.prototype.getProjectedPosition=function(t,e){var i=this.getScene();if(!i)return o.Vector2.Zero();var r=this._getGlobalViewport(i),n=o.Vector3.Project(t,e,i.getTransformMatrix(),r);return n.scaleInPlace(this.renderScale),new o.Vector2(n.x,n.y)},e.prototype._checkUpdate=function(t){if(!this._layerToDispose||0!=(t.layerMask&this._layerToDispose.layerMask)){if(this._isFullscreen&&this._linkedControls.length){var e=this.getScene();if(!e)return;for(var i=this._getGlobalViewport(e),r=0,n=this._linkedControls;r<n.length;r++){var s=n[r];if(s.isVisible){var a=s._linkedMesh;if(a&&!a.isDisposed()){var h=a.getBoundingInfo().boundingSphere.center,l=o.Vector3.Project(h,a.getWorldMatrix(),e.getTransformMatrix(),i);l.z<0||l.z>1?s.notRenderable=!0:(s.notRenderable=!1,l.scaleInPlace(this.renderScale),s._moveToProjectedPosition(l))}else o.Tools.SetImmediate(function(){s.linkWithMesh(null)})}}}(this._isDirty||this._rootContainer.isDirty)&&(this._isDirty=!1,this._render(),this.update(!0,this.premulAlpha))}},e.prototype._render=function(){var t=this.getSize(),e=t.width,i=t.height,r=this.getContext();r.clearRect(0,0,e,i),this._background&&(r.save(),r.fillStyle=this._background,r.fillRect(0,0,e,i),r.restore()),r.font=\"18px Arial\",r.strokeStyle=\"white\";var o=new a.Measure(0,0,e,i);this._rootContainer._draw(o,r)},e.prototype._changeCursor=function(t){this._rootCanvas&&(this._rootCanvas.style.cursor=t)},e.prototype._doPicking=function(t,e,i,r,n){var s=this.getScene();if(s){var a=s.getEngine(),h=this.getSize();this._isFullscreen&&(t*=h.width/a.getRenderWidth(),e*=h.height/a.getRenderHeight()),this._capturingControl[r]?this._capturingControl[r]._processObservables(i,t,e,r,n):(this._rootContainer._processPicking(t,e,i,r,n)||(this._changeCursor(\"\"),i===o.PointerEventTypes.POINTERMOVE&&(this._lastControlOver[r]&&this._lastControlOver[r]._onPointerOut(this._lastControlOver[r]),delete this._lastControlOver[r])),this._manageFocus())}},e.prototype._cleanControlAfterRemovalFromList=function(t,e){for(var i in t){if(t.hasOwnProperty(i))t[i]===e&&delete t[i]}},e.prototype._cleanControlAfterRemoval=function(t){this._cleanControlAfterRemovalFromList(this._lastControlDown,t),this._cleanControlAfterRemovalFromList(this._lastControlOver,t)},e.prototype.attach=function(){var t=this,e=this.getScene();e&&(this._pointerMoveObserver=e.onPrePointerObservable.add(function(i,r){if(!e.isPointerCaptured(i.event.pointerId)&&(i.type===o.PointerEventTypes.POINTERMOVE||i.type===o.PointerEventTypes.POINTERUP||i.type===o.PointerEventTypes.POINTERDOWN)&&e){var n=e.cameraToUseForPointers||e.activeCamera;if(n){var s=e.getEngine(),a=n.viewport,h=(e.pointerX/s.getHardwareScalingLevel()-a.x*s.getRenderWidth())/a.width,l=(e.pointerY/s.getHardwareScalingLevel()-a.y*s.getRenderHeight())/a.height;t._shouldBlockPointer=!1,t._doPicking(h,l,i.type,i.event.pointerId||0,i.event.button),t._shouldBlockPointer&&(i.skipOnPointerObservable=t._shouldBlockPointer)}}}),this._attachToOnPointerOut(e))},e.prototype.attachToMesh=function(t,e){var i=this;void 0===e&&(e=!0);var r=this.getScene();r&&(this._pointerObserver=r.onPointerObservable.add(function(e,r){if(e.type===o.PointerEventTypes.POINTERMOVE||e.type===o.PointerEventTypes.POINTERUP||e.type===o.PointerEventTypes.POINTERDOWN){var n=e.event.pointerId||0;if(e.pickInfo&&e.pickInfo.hit&&e.pickInfo.pickedMesh===t){var s=e.pickInfo.getTextureCoordinates();if(s){var a=i.getSize();i._doPicking(s.x*a.width,(1-s.y)*a.height,e.type,n,e.event.button)}}else if(e.type===o.PointerEventTypes.POINTERUP){if(i._lastControlDown[n]&&i._lastControlDown[n]._forcePointerUp(n),delete i._lastControlDown[n],i.focusedControl){var h=i.focusedControl.keepsFocusWith(),l=!0;if(h)for(var u=0,c=h;u<c.length;u++){var _=c[u];if(i!==_._host){var f=_._host;if(f._lastControlOver[n]&&f._lastControlOver[n].isAscendant(_)){l=!1;break}}}l&&(i.focusedControl=null)}}else e.type===o.PointerEventTypes.POINTERMOVE&&(i._lastControlOver[n]&&i._lastControlOver[n]._onPointerOut(i._lastControlOver[n]),delete i._lastControlOver[n])}}),t.enablePointerMoveEvents=e,this._attachToOnPointerOut(r))},e.prototype.moveFocusToControl=function(t){this.focusedControl=t,this._lastPickedControl=t,this._blockNextFocusCheck=!0},e.prototype._manageFocus=function(){if(this._blockNextFocusCheck)return this._blockNextFocusCheck=!1,void(this._lastPickedControl=this._focusedControl);if(this._focusedControl&&this._focusedControl!==this._lastPickedControl){if(this._lastPickedControl.isFocusInvisible)return;this.focusedControl=null}},e.prototype._attachToOnPointerOut=function(t){var e=this;this._canvasPointerOutObserver=t.getEngine().onCanvasPointerOutObservable.add(function(t){e._lastControlOver[t.pointerId]&&e._lastControlOver[t.pointerId]._onPointerOut(e._lastControlOver[t.pointerId]),delete e._lastControlOver[t.pointerId],e._lastControlDown[t.pointerId]&&e._lastControlDown[t.pointerId]._forcePointerUp(),delete e._lastControlDown[t.pointerId]})},e.CreateForMesh=function(t,i,r,n,s){void 0===i&&(i=1024),void 0===r&&(r=1024),void 0===n&&(n=!0),void 0===s&&(s=!1);var a=new e(t.name+\" AdvancedDynamicTexture\",i,r,t.getScene(),!0,o.Texture.TRILINEAR_SAMPLINGMODE),h=new o.StandardMaterial(\"AdvancedDynamicTextureMaterial\",t.getScene());return h.backFaceCulling=!1,h.diffuseColor=o.Color3.Black(),h.specularColor=o.Color3.Black(),s?(h.diffuseTexture=a,h.emissiveTexture=a,a.hasAlpha=!0):(h.emissiveTexture=a,h.opacityTexture=a),t.material=h,a.attachToMesh(t,n),a},e.CreateFullscreenUI=function(t,i,r,n){void 0===i&&(i=!0),void 0===r&&(r=null),void 0===n&&(n=o.Texture.BILINEAR_SAMPLINGMODE);var s=new e(t,0,0,r,!1,n),a=new o.Layer(t+\"_layer\",null,r,!i);return a.texture=s,s._layerToDispose=a,s._isFullscreen=!0,s.attach(),s},e}(o.DynamicTexture);e.AdvancedDynamicTexture=h},function(t,e,i){\"use strict\";Object.defineProperty(e,\"__esModule\",{value:!0});var r=i(0),o=i(25),n=function(){function t(t){this.name=t,this._downCount=0,this._enterCount=-1,this._downPointerIds={},this._isVisible=!0,this.onPointerMoveObservable=new r.Observable,this.onPointerOutObservable=new r.Observable,this.onPointerDownObservable=new r.Observable,this.onPointerUpObservable=new r.Observable,this.onPointerClickObservable=new r.Observable,this.onPointerEnterObservable=new r.Observable,this._behaviors=new Array}return Object.defineProperty(t.prototype,\"position\",{get:function(){return this._node?this._node.position:r.Vector3.Zero()},set:function(t){this._node&&(this._node.position=t)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,\"scaling\",{get:function(){return this._node?this._node.scaling:new r.Vector3(1,1,1)},set:function(t){this._node&&(this._node.scaling=t)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,\"behaviors\",{get:function(){return this._behaviors},enumerable:!0,configurable:!0}),t.prototype.addBehavior=function(t){var e=this;if(-1!==this._behaviors.indexOf(t))return this;t.init();var i=this._host.scene;return i.isLoading?i.onDataLoadedObservable.addOnce(function(){t.attach(e)}):t.attach(this),this._behaviors.push(t),this},t.prototype.removeBehavior=function(t){var e=this._behaviors.indexOf(t);return-1===e?this:(this._behaviors[e].detach(),this._behaviors.splice(e,1),this)},t.prototype.getBehaviorByName=function(t){for(var e=0,i=this._behaviors;e<i.length;e++){var r=i[e];if(r.name===t)return r}return null},Object.defineProperty(t.prototype,\"isVisible\",{get:function(){return this._isVisible},set:function(t){if(this._isVisible!==t){this._isVisible=t;var e=this.mesh;e&&e.setEnabled(t)}},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,\"typeName\",{get:function(){return this._getTypeName()},enumerable:!0,configurable:!0}),t.prototype._getTypeName=function(){return\"Control3D\"},Object.defineProperty(t.prototype,\"node\",{get:function(){return this._node},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,\"mesh\",{get:function(){return this._node instanceof r.AbstractMesh?this._node:null},enumerable:!0,configurable:!0}),t.prototype.linkToTransformNode=function(t){return this._node&&(this._node.parent=t),this},t.prototype._prepareNode=function(t){if(!this._node){if(this._node=this._createNode(t),!this.node)return;this._node.metadata=this,this._node.position=this.position,this._node.scaling=this.scaling;var e=this.mesh;e&&(e.isPickable=!0,this._affectMaterial(e))}},t.prototype._createNode=function(t){return null},t.prototype._affectMaterial=function(t){t.material=null},t.prototype._onPointerMove=function(t,e){this.onPointerMoveObservable.notifyObservers(e,-1,t,this)},t.prototype._onPointerEnter=function(t){return!(this._enterCount>0)&&(-1===this._enterCount&&(this._enterCount=0),this._enterCount++,this.onPointerEnterObservable.notifyObservers(this,-1,t,this),this.pointerEnterAnimation&&this.pointerEnterAnimation(),!0)},t.prototype._onPointerOut=function(t){this._enterCount=0,this.onPointerOutObservable.notifyObservers(this,-1,t,this),this.pointerOutAnimation&&this.pointerOutAnimation()},t.prototype._onPointerDown=function(t,e,i,r){return 0===this._downCount&&(this._downCount++,this._downPointerIds[i]=!0,this.onPointerDownObservable.notifyObservers(new o.Vector3WithInfo(e,r),-1,t,this),this.pointerDownAnimation&&this.pointerDownAnimation(),!0)},t.prototype._onPointerUp=function(t,e,i,r,n){this._downCount=0,delete this._downPointerIds[i],n&&(this._enterCount>0||-1===this._enterCount)&&this.onPointerClickObservable.notifyObservers(new o.Vector3WithInfo(e,r),-1,t,this),this.onPointerUpObservable.notifyObservers(new o.Vector3WithInfo(e,r),-1,t,this),this.pointerUpAnimation&&this.pointerUpAnimation()},t.prototype.forcePointerUp=function(t){if(void 0===t&&(t=null),null!==t)this._onPointerUp(this,r.Vector3.Zero(),t,0,!0);else for(var e in this._downPointerIds)this._onPointerUp(this,r.Vector3.Zero(),+e,0,!0)},t.prototype._processObservables=function(t,e,i,o){if(t===r.PointerEventTypes.POINTERMOVE){this._onPointerMove(this,e);var n=this._host._lastControlOver[i];return n&&n!==this&&n._onPointerOut(this),n!==this&&this._onPointerEnter(this),this._host._lastControlOver[i]=this,!0}return t===r.PointerEventTypes.POINTERDOWN?(this._onPointerDown(this,e,i,o),this._host._lastControlDown[i]=this,this._host._lastPickedControl=this,!0):t===r.PointerEventTypes.POINTERUP&&(this._host._lastControlDown[i]&&this._host._lastControlDown[i]._onPointerUp(this,e,i,o,!0),delete this._host._lastControlDown[i],!0)},t.prototype._disposeNode=function(){this._node&&(this._node.dispose(),this._node=null)},t.prototype.dispose=function(){this.onPointerDownObservable.clear(),this.onPointerEnterObservable.clear(),this.onPointerMoveObservable.clear(),this.onPointerOutObservable.clear(),this.onPointerUpObservable.clear(),this.onPointerClickObservable.clear(),this._disposeNode();for(var t=0,e=this._behaviors;t<e.length;t++){e[t].detach()}},t}();e.Control3D=n},function(t,e,i){\"use strict\";var r=this&&this.__extends||function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])})(e,i)};return function(e,i){function r(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}();Object.defineProperty(e,\"__esModule\",{value:!0});var o=i(24),n=i(0),s=i(12),a=function(t){function e(e){var i=t.call(this,e)||this;return i._contentResolution=512,i._contentScaleRatio=2,i.pointerEnterAnimation=function(){i.mesh&&(i._currentMaterial.emissiveColor=n.Color3.Red())},i.pointerOutAnimation=function(){i._currentMaterial.emissiveColor=n.Color3.Black()},i.pointerDownAnimation=function(){i.mesh&&i.mesh.scaling.scaleInPlace(.95)},i.pointerUpAnimation=function(){i.mesh&&i.mesh.scaling.scaleInPlace(1/.95)},i}return r(e,t),Object.defineProperty(e.prototype,\"contentResolution\",{get:function(){return this._contentResolution},set:function(t){this._contentResolution!==t&&(this._contentResolution=t,this._resetContent())},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,\"contentScaleRatio\",{get:function(){return this._contentScaleRatio},set:function(t){this._contentScaleRatio!==t&&(this._contentScaleRatio=t,this._resetContent())},enumerable:!0,configurable:!0}),e.prototype._disposeFacadeTexture=function(){this._facadeTexture&&(this._facadeTexture.dispose(),this._facadeTexture=null)},e.prototype._resetContent=function(){this._disposeFacadeTexture(),this.content=this._content},Object.defineProperty(e.prototype,\"content\",{get:function(){return this._content},set:function(t){this._content=t,this._host&&this._host.utilityLayer&&(this._facadeTexture||(this._facadeTexture=new s.AdvancedDynamicTexture(\"Facade\",this._contentResolution,this._contentResolution,this._host.utilityLayer.utilityLayerScene,!0,n.Texture.TRILINEAR_SAMPLINGMODE),this._facadeTexture.rootContainer.scaleX=this._contentScaleRatio,this._facadeTexture.rootContainer.scaleY=this._contentScaleRatio,this._facadeTexture.premulAlpha=!0),this._facadeTexture.addControl(t),this._applyFacade(this._facadeTexture))},enumerable:!0,configurable:!0}),e.prototype._applyFacade=function(t){this._currentMaterial.emissiveTexture=t},e.prototype._getTypeName=function(){return\"Button3D\"},e.prototype._createNode=function(t){for(var e=new Array(6),i=0;i<6;i++)e[i]=new n.Vector4(0,0,0,0);return e[1]=new n.Vector4(0,0,1,1),n.MeshBuilder.CreateBox(this.name+\"_rootMesh\",{width:1,height:1,depth:.08,faceUV:e},t)},e.prototype._affectMaterial=function(t){var e=new n.StandardMaterial(this.name+\"Material\",t.getScene());e.specularColor=n.Color3.Black(),t.material=e,this._currentMaterial=e,this._resetContent()},e.prototype.dispose=function(){t.prototype.dispose.call(this),this._disposeFacadeTexture(),this._currentMaterial&&this._currentMaterial.dispose()},e}(o.AbstractButton3D);e.Button3D=a},function(t,e,i){\"use strict\";function r(t){for(var i in t)e.hasOwnProperty(i)||(e[i]=t[i])}Object.defineProperty(e,\"__esModule\",{value:!0}),r(i(29)),r(i(40))},function(t,e,i){\"use strict\";var r=this&&this.__extends||function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])})(e,i)};return function(e,i){function r(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}();Object.defineProperty(e,\"__esModule\",{value:!0});var o=i(10),n=i(1),s=i(5),a=i(11),h=function(t){function e(e){var i=t.call(this,e)||this;return i.name=e,i.thickness=1,i.isPointerBlocker=!0,i.pointerEnterAnimation=function(){i.alpha-=.1},i.pointerOutAnimation=function(){i.alpha+=.1},i.pointerDownAnimation=function(){i.scaleX-=.05,i.scaleY-=.05},i.pointerUpAnimation=function(){i.scaleX+=.05,i.scaleY+=.05},i}return r(e,t),e.prototype._getTypeName=function(){return\"Button\"},e.prototype._processPicking=function(e,i,r,o,n){return!(!this.isHitTestVisible||!this.isVisible||this.notRenderable)&&(!!t.prototype.contains.call(this,e,i)&&(this._processObservables(r,e,i,o,n),!0))},e.prototype._onPointerEnter=function(e){return!!t.prototype._onPointerEnter.call(this,e)&&(this.pointerEnterAnimation&&this.pointerEnterAnimation(),!0)},e.prototype._onPointerOut=function(e){this.pointerOutAnimation&&this.pointerOutAnimation(),t.prototype._onPointerOut.call(this,e)},e.prototype._onPointerDown=function(e,i,r,o){return!!t.prototype._onPointerDown.call(this,e,i,r,o)&&(this.pointerDownAnimation&&this.pointerDownAnimation(),!0)},e.prototype._onPointerUp=function(e,i,r,o,n){this.pointerUpAnimation&&this.pointerUpAnimation(),t.prototype._onPointerUp.call(this,e,i,r,o,n)},e.CreateImageButton=function(t,i,r){var o=new e(t),h=new s.TextBlock(t+\"_button\",i);h.textWrapping=!0,h.textHorizontalAlignment=n.Control.HORIZONTAL_ALIGNMENT_CENTER,h.paddingLeft=\"20%\",o.addControl(h);var l=new a.Image(t+\"_icon\",r);return l.width=\"20%\",l.stretch=a.Image.STRETCH_UNIFORM,l.horizontalAlignment=n.Control.HORIZONTAL_ALIGNMENT_LEFT,o.addControl(l),o},e.CreateImageOnlyButton=function(t,i){var r=new e(t),o=new a.Image(t+\"_icon\",i);return o.stretch=a.Image.STRETCH_FILL,o.horizontalAlignment=n.Control.HORIZONTAL_ALIGNMENT_LEFT,r.addControl(o),r},e.CreateSimpleButton=function(t,i){var r=new e(t),o=new s.TextBlock(t+\"_button\",i);return o.textWrapping=!0,o.textHorizontalAlignment=n.Control.HORIZONTAL_ALIGNMENT_CENTER,r.addControl(o),r},e.CreateImageWithCenterTextButton=function(t,i,r){var o=new e(t),h=new a.Image(t+\"_icon\",r);h.stretch=a.Image.STRETCH_FILL,o.addControl(h);var l=new s.TextBlock(t+\"_button\",i);return l.textWrapping=!0,l.textHorizontalAlignment=n.Control.HORIZONTAL_ALIGNMENT_CENTER,o.addControl(l),o},e}(o.Rectangle);e.Button=h},function(t,e,i){\"use strict\";var r=this&&this.__extends||function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])})(e,i)};return function(e,i){function r(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}();Object.defineProperty(e,\"__esModule\",{value:!0});var o=i(0),n=function(t){function e(e,i){void 0===i&&(i=0);var r=t.call(this,e.x,e.y)||this;return r.buttonIndex=i,r}return r(e,t),e}(o.Vector2);e.Vector2WithInfo=n;var s=function(){function t(t,e,i,r,o,n){this.m=new Float32Array(6),this.fromValues(t,e,i,r,o,n)}return t.prototype.fromValues=function(t,e,i,r,o,n){return this.m[0]=t,this.m[1]=e,this.m[2]=i,this.m[3]=r,this.m[4]=o,this.m[5]=n,this},t.prototype.determinant=function(){return this.m[0]*this.m[3]-this.m[1]*this.m[2]},t.prototype.invertToRef=function(t){var e=this.m[0],i=this.m[1],r=this.m[2],n=this.m[3],s=this.m[4],a=this.m[5],h=this.determinant();if(h<o.Epsilon*o.Epsilon)return t.m[0]=0,t.m[1]=0,t.m[2]=0,t.m[3]=0,t.m[4]=0,t.m[5]=0,this;var l=1/h,u=r*a-n*s,c=i*s-e*a;return t.m[0]=n*l,t.m[1]=-i*l,t.m[2]=-r*l,t.m[3]=e*l,t.m[4]=u*l,t.m[5]=c*l,this},t.prototype.multiplyToRef=function(t,e){var i=this.m[0],r=this.m[1],o=this.m[2],n=this.m[3],s=this.m[4],a=this.m[5],h=t.m[0],l=t.m[1],u=t.m[2],c=t.m[3],_=t.m[4],f=t.m[5];return e.m[0]=i*h+r*u,e.m[1]=i*l+r*c,e.m[2]=o*h+n*u,e.m[3]=o*l+n*c,e.m[4]=s*h+a*u+_,e.m[5]=s*l+a*c+f,this},t.prototype.transformCoordinates=function(t,e,i){return i.x=t*this.m[0]+e*this.m[2]+this.m[4],i.y=t*this.m[1]+e*this.m[3]+this.m[5],this},t.Identity=function(){return new t(1,0,0,1,0,0)},t.TranslationToRef=function(t,e,i){i.fromValues(1,0,0,1,t,e)},t.ScalingToRef=function(t,e,i){i.fromValues(t,0,0,e,0,0)},t.RotationToRef=function(t,e){var i=Math.sin(t),r=Math.cos(t);e.fromValues(r,i,-i,r,0,0)},t.ComposeToRef=function(e,i,r,o,n,s,a){t.TranslationToRef(e,i,t._TempPreTranslationMatrix),t.ScalingToRef(o,n,t._TempScalingMatrix),t.RotationToRef(r,t._TempRotationMatrix),t.TranslationToRef(-e,-i,t._TempPostTranslationMatrix),t._TempPreTranslationMatrix.multiplyToRef(t._TempScalingMatrix,t._TempCompose0),t._TempCompose0.multiplyToRef(t._TempRotationMatrix,t._TempCompose1),s?(t._TempCompose1.multiplyToRef(t._TempPostTranslationMatrix,t._TempCompose2),t._TempCompose2.multiplyToRef(s,a)):t._TempCompose1.multiplyToRef(t._TempPostTranslationMatrix,a)},t._TempPreTranslationMatrix=t.Identity(),t._TempPostTranslationMatrix=t.Identity(),t._TempRotationMatrix=t.Identity(),t._TempScalingMatrix=t.Identity(),t._TempCompose0=t.Identity(),t._TempCompose1=t.Identity(),t._TempCompose2=t.Identity(),t}();e.Matrix2D=s},function(t,e,i){\"use strict\";var r=this&&this.__extends||function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])})(e,i)};return function(e,i){function r(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}();Object.defineProperty(e,\"__esModule\",{value:!0});var o=i(1),n=i(0),s=i(6),a=i(5),h=function(t){function e(e){var i=t.call(this,e)||this;return i.name=e,i._isChecked=!1,i._background=\"black\",i._checkSizeRatio=.8,i._thickness=1,i.onIsCheckedChangedObservable=new n.Observable,i.isPointerBlocker=!0,i}return r(e,t),Object.defineProperty(e.prototype,\"thickness\",{get:function(){return this._thickness},set:function(t){this._thickness!==t&&(this._thickness=t,this._markAsDirty())},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,\"checkSizeRatio\",{get:function(){return this._checkSizeRatio},set:function(t){t=Math.max(Math.min(1,t),0),this._checkSizeRatio!==t&&(this._checkSizeRatio=t,this._markAsDirty())},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,\"background\",{get:function(){return this._background},set:function(t){this._background!==t&&(this._background=t,this._markAsDirty())},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,\"isChecked\",{get:function(){return this._isChecked},set:function(t){this._isChecked!==t&&(this._isChecked=t,this._markAsDirty(),this.onIsCheckedChangedObservable.notifyObservers(t))},enumerable:!0,configurable:!0}),e.prototype._getTypeName=function(){return\"CheckBox\"},e.prototype._draw=function(t,e){if(e.save(),this._applyStates(e),this._processMeasures(t,e)){var i=this._currentMeasure.width-this._thickness,r=this._currentMeasure.height-this._thickness;if((this.shadowBlur||this.shadowOffsetX||this.shadowOffsetY)&&(e.shadowColor=this.shadowColor,e.shadowBlur=this.shadowBlur,e.shadowOffsetX=this.shadowOffsetX,e.shadowOffsetY=this.shadowOffsetY),e.fillStyle=this._isEnabled?this._background:this._disabledColor,e.fillRect(this._currentMeasure.left+this._thickness/2,this._currentMeasure.top+this._thickness/2,i,r),(this.shadowBlur||this.shadowOffsetX||this.shadowOffsetY)&&(e.shadowBlur=0,e.shadowOffsetX=0,e.shadowOffsetY=0),this._isChecked){e.fillStyle=this._isEnabled?this.color:this._disabledColor;var o=i*this._checkSizeRatio,n=r*this._checkSizeRatio;e.fillRect(this._currentMeasure.left+this._thickness/2+(i-o)/2,this._currentMeasure.top+this._thickness/2+(r-n)/2,o,n)}e.strokeStyle=this.color,e.lineWidth=this._thickness,e.strokeRect(this._currentMeasure.left+this._thickness/2,this._currentMeasure.top+this._thickness/2,i,r)}e.restore()},e.prototype._onPointerDown=function(e,i,r,o){return!!t.prototype._onPointerDown.call(this,e,i,r,o)&&(this.isChecked=!this.isChecked,!0)},e.AddCheckBoxWithHeader=function(t,i){var r=new s.StackPanel;r.isVertical=!1,r.height=\"30px\";var n=new e;n.width=\"20px\",n.height=\"20px\",n.isChecked=!0,n.color=\"green\",n.onIsCheckedChangedObservable.add(i),r.addControl(n);var h=new a.TextBlock;return h.text=t,h.width=\"180px\",h.paddingLeft=\"5px\",h.textHorizontalAlignment=o.Control.HORIZONTAL_ALIGNMENT_LEFT,h.color=\"white\",r.addControl(h),r},e}(o.Control);e.Checkbox=h},function(t,e,i){\"use strict\";var r=this&&this.__extends||function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])})(e,i)};return function(e,i){function r(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}();Object.defineProperty(e,\"__esModule\",{value:!0});var o=i(1),n=i(2),s=i(0),a=function(t){function e(e,i){void 0===i&&(i=\"\");var r=t.call(this,e)||this;return r.name=e,r._text=\"\",r._placeholderText=\"\",r._background=\"#222222\",r._focusedBackground=\"#000000\",r._placeholderColor=\"gray\",r._thickness=1,r._margin=new n.ValueAndUnit(10,n.ValueAndUnit.UNITMODE_PIXEL),r._autoStretchWidth=!0,r._maxWidth=new n.ValueAndUnit(1,n.ValueAndUnit.UNITMODE_PERCENTAGE,!1),r._isFocused=!1,r._blinkIsEven=!1,r._cursorOffset=0,r._deadKey=!1,r._addKey=!0,r._currentKey=\"\",r.promptMessage=\"Please enter text:\",r.onTextChangedObservable=new s.Observable,r.onBeforeKeyAddObservable=new s.Observable,r.onFocusObservable=new s.Observable,r.onBlurObservable=new s.Observable,r.text=i,r}return r(e,t),Object.defineProperty(e.prototype,\"maxWidth\",{get:function(){return this._maxWidth.toString(this._host)},set:function(t){this._maxWidth.toString(this._host)!==t&&this._maxWidth.fromString(t)&&this._markAsDirty()},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,\"maxWidthInPixels\",{get:function(){return this._maxWidth.getValueInPixel(this._host,this._cachedParentMeasure.width)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,\"margin\",{get:function(){return this._margin.toString(this._host)},set:function(t){this._margin.toString(this._host)!==t&&this._margin.fromString(t)&&this._markAsDirty()},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,\"marginInPixels\",{get:function(){return this._margin.getValueInPixel(this._host,this._cachedParentMeasure.width)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,\"autoStretchWidth\",{get:function(){return this._autoStretchWidth},set:function(t){this._autoStretchWidth!==t&&(this._autoStretchWidth=t,this._markAsDirty())},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,\"thickness\",{get:function(){return this._thickness},set:function(t){this._thickness!==t&&(this._thickness=t,this._markAsDirty())},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,\"focusedBackground\",{get:function(){return this._focusedBackground},set:function(t){this._focusedBackground!==t&&(this._focusedBackground=t,this._markAsDirty())},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,\"background\",{get:function(){return this._background},set:function(t){this._background!==t&&(this._background=t,this._markAsDirty())},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,\"placeholderColor\",{get:function(){return this._placeholderColor},set:function(t){this._placeholderColor!==t&&(this._placeholderColor=t,this._markAsDirty())},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,\"placeholderText\",{get:function(){return this._placeholderText},set:function(t){this._placeholderText!==t&&(this._placeholderText=t,this._markAsDirty())},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,\"deadKey\",{get:function(){return this._deadKey},set:function(t){this._deadKey=t},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,\"addKey\",{get:function(){return this._addKey},set:function(t){this._addKey=t},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,\"currentKey\",{get:function(){return this._currentKey},set:function(t){this._currentKey=t},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,\"text\",{get:function(){return this._text},set:function(t){this._text!==t&&(this._text=t,this._markAsDirty(),this.onTextChangedObservable.notifyObservers(this))},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,\"width\",{get:function(){return this._width.toString(this._host)},set:function(t){this._width.toString(this._host)!==t&&(this._width.fromString(t)&&this._markAsDirty(),this.autoStretchWidth=!1)},enumerable:!0,configurable:!0}),e.prototype.onBlur=function(){this._isFocused=!1,this._scrollLeft=null,this._cursorOffset=0,clearTimeout(this._blinkTimeout),this._markAsDirty(),this.onBlurObservable.notifyObservers(this)},e.prototype.onFocus=function(){if(this._isEnabled&&(this._scrollLeft=null,this._isFocused=!0,this._blinkIsEven=!1,this._cursorOffset=0,this._markAsDirty(),this.onFocusObservable.notifyObservers(this),-1!==navigator.userAgent.indexOf(\"Mobile\"))){var t=prompt(this.promptMessage);return null!==t&&(this.text=t),void(this._host.focusedControl=null)}},e.prototype._getTypeName=function(){return\"InputText\"},e.prototype.keepsFocusWith=function(){return this._connectedVirtualKeyboard?[this._connectedVirtualKeyboard]:null},e.prototype.processKey=function(t,e){switch(t){case 32:e=\" \";break;case 8:if(this._text&&this._text.length>0)if(0===this._cursorOffset)this.text=this._text.substr(0,this._text.length-1);else(i=this._text.length-this._cursorOffset)>0&&(this.text=this._text.slice(0,i-1)+this._text.slice(i));return;case 46:if(this._text&&this._text.length>0){var i=this._text.length-this._cursorOffset;this.text=this._text.slice(0,i)+this._text.slice(i+1),this._cursorOffset--}return;case 13:return void(this._host.focusedControl=null);case 35:return this._cursorOffset=0,this._blinkIsEven=!1,void this._markAsDirty();case 36:return this._cursorOffset=this._text.length,this._blinkIsEven=!1,void this._markAsDirty();case 37:return this._cursorOffset++,this._cursorOffset>this._text.length&&(this._cursorOffset=this._text.length),this._blinkIsEven=!1,void this._markAsDirty();case 39:return this._cursorOffset--,this._cursorOffset<0&&(this._cursorOffset=0),this._blinkIsEven=!1,void this._markAsDirty();case 222:return void(this.deadKey=!0)}if(e&&(-1===t||32===t||t>47&&t<58||t>64&&t<91||t>185&&t<193||t>218&&t<223||t>95&&t<112)&&(this._currentKey=e,this.onBeforeKeyAddObservable.notifyObservers(this),e=this._currentKey,this._addKey))if(0===this._cursorOffset)this.text+=e;else{var r=this._text.length-this._cursorOffset;this.text=this._text.slice(0,r)+e+this._text.slice(r)}},e.prototype.processKeyboard=function(t){this.processKey(t.keyCode,t.key)},e.prototype._draw=function(t,e){var i=this;if(e.save(),this._applyStates(e),this._processMeasures(t,e)){(this.shadowBlur||this.shadowOffsetX||this.shadowOffsetY)&&(e.shadowColor=this.shadowColor,e.shadowBlur=this.shadowBlur,e.shadowOffsetX=this.shadowOffsetX,e.shadowOffsetY=this.shadowOffsetY),this._isFocused?this._focusedBackground&&(e.fillStyle=this._isEnabled?this._focusedBackground:this._disabledColor,e.fillRect(this._currentMeasure.left,this._currentMeasure.top,this._currentMeasure.width,this._currentMeasure.height)):this._background&&(e.fillStyle=this._isEnabled?this._background:this._disabledColor,e.fillRect(this._currentMeasure.left,this._currentMeasure.top,this._currentMeasure.width,this._currentMeasure.height)),(this.shadowBlur||this.shadowOffsetX||this.shadowOffsetY)&&(e.shadowBlur=0,e.shadowOffsetX=0,e.shadowOffsetY=0),this._fontOffset||(this._fontOffset=o.Control._GetFontOffset(e.font));var r=this._currentMeasure.left+this._margin.getValueInPixel(this._host,t.width);this.color&&(e.fillStyle=this.color);var n=this._beforeRenderText(this._text);this._isFocused||this._text||!this._placeholderText||(n=this._placeholderText,this._placeholderColor&&(e.fillStyle=this._placeholderColor)),this._textWidth=e.measureText(n).width;var s=2*this._margin.getValueInPixel(this._host,t.width);this._autoStretchWidth&&(this.width=Math.min(this._maxWidth.getValueInPixel(this._host,t.width),this._textWidth+s)+\"px\");var a=this._fontOffset.ascent+(this._currentMeasure.height-this._fontOffset.height)/2,h=this._width.getValueInPixel(this._host,t.width)-s;if(e.save(),e.beginPath(),e.rect(r,this._currentMeasure.top+(this._currentMeasure.height-this._fontOffset.height)/2,h+2,this._currentMeasure.height),e.clip(),this._isFocused&&this._textWidth>h){var l=r-this._textWidth+h;this._scrollLeft||(this._scrollLeft=l)}else this._scrollLeft=r;if(e.fillText(n,this._scrollLeft,this._currentMeasure.top+a),this._isFocused){if(this._clickedCoordinate){var u=this._scrollLeft+this._textWidth-this._clickedCoordinate,c=0;this._cursorOffset=0;var _=0;do{this._cursorOffset&&(_=Math.abs(u-c)),this._cursorOffset++,c=e.measureText(n.substr(n.length-this._cursorOffset,this._cursorOffset)).width}while(c<u&&n.length>=this._cursorOffset);Math.abs(u-c)>_&&this._cursorOffset--,this._blinkIsEven=!1,this._clickedCoordinate=null}if(!this._blinkIsEven){var f=this.text.substr(this._text.length-this._cursorOffset),p=e.measureText(f).width,d=this._scrollLeft+this._textWidth-p;d<r?(this._scrollLeft+=r-d,d=r,this._markAsDirty()):d>r+h&&(this._scrollLeft+=r+h-d,d=r+h,this._markAsDirty()),e.fillRect(d,this._currentMeasure.top+(this._currentMeasure.height-this._fontOffset.height)/2,2,this._fontOffset.height)}clearTimeout(this._blinkTimeout),this._blinkTimeout=setTimeout(function(){i._blinkIsEven=!i._blinkIsEven,i._markAsDirty()},500)}e.restore(),this._thickness&&(this.color&&(e.strokeStyle=this.color),e.lineWidth=this._thickness,e.strokeRect(this._currentMeasure.left+this._thickness/2,this._currentMeasure.top+this._thickness/2,this._currentMeasure.width-this._thickness,this._currentMeasure.height-this._thickness))}e.restore()},e.prototype._onPointerDown=function(e,i,r,o){return!!t.prototype._onPointerDown.call(this,e,i,r,o)&&(this._clickedCoordinate=i.x,this._host.focusedControl===this?(clearTimeout(this._blinkTimeout),this._markAsDirty(),!0):!!this._isEnabled&&(this._host.focusedControl=this,!0))},e.prototype._onPointerUp=function(e,i,r,o,n){t.prototype._onPointerUp.call(this,e,i,r,o,n)},e.prototype._beforeRenderText=function(t){return t},e.prototype.dispose=function(){t.prototype.dispose.call(this),this.onBlurObservable.clear(),this.onFocusObservable.clear(),this.onTextChangedObservable.clear()},e}(o.Control);e.InputText=a},function(t,e,i){\"use strict\";Object.defineProperty(e,\"__esModule\",{value:!0});var r=i(2),o=i(0),n=function(){function t(t){this._multiLine=t,this._x=new r.ValueAndUnit(0),this._y=new r.ValueAndUnit(0),this._point=new o.Vector2(0,0)}return Object.defineProperty(t.prototype,\"x\",{get:function(){return this._x.toString(this._multiLine._host)},set:function(t){this._x.toString(this._multiLine._host)!==t&&this._x.fromString(t)&&this._multiLine._markAsDirty()},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,\"y\",{get:function(){return this._y.toString(this._multiLine._host)},set:function(t){this._y.toString(this._multiLine._host)!==t&&this._y.fromString(t)&&this._multiLine._markAsDirty()},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,\"control\",{get:function(){return this._control},set:function(t){this._control!==t&&(this._control&&this._controlObserver&&(this._control.onDirtyObservable.remove(this._controlObserver),this._controlObserver=null),this._control=t,this._control&&(this._controlObserver=this._control.onDirtyObservable.add(this._multiLine.onPointUpdate)),this._multiLine._markAsDirty())},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,\"mesh\",{get:function(){return this._mesh},set:function(t){this._mesh!==t&&(this._mesh&&this._meshObserver&&this._mesh.getScene().onAfterCameraRenderObservable.remove(this._meshObserver),this._mesh=t,this._mesh&&(this._meshObserver=this._mesh.getScene().onAfterCameraRenderObservable.add(this._multiLine.onPointUpdate)),this._multiLine._markAsDirty())},enumerable:!0,configurable:!0}),t.prototype.resetLinks=function(){this.control=null,this.mesh=null},t.prototype.translate=function(){return this._point=this._translatePoint(),this._point},t.prototype._translatePoint=function(){if(null!=this._mesh)return this._multiLine._host.getProjectedPosition(this._mesh.getBoundingInfo().boundingSphere.center,this._mesh.getWorldMatrix());if(null!=this._control)return new o.Vector2(this._control.centerX,this._control.centerY);var t=this._multiLine._host,e=this._x.getValueInPixel(t,Number(t._canvas.width)),i=this._y.getValueInPixel(t,Number(t._canvas.height));return new o.Vector2(e,i)},t.prototype.dispose=function(){this.resetLinks()},t}();e.MultiLinePoint=n},function(t,e,i){\"use strict\";var r=this&&this.__extends||function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])})(e,i)};return function(e,i){function r(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}();Object.defineProperty(e,\"__esModule\",{value:!0});var o=i(1),n=i(0),s=i(9),a=function(t){function e(e){var i=t.call(this,e)||this;return i.name=e,i._isChecked=!1,i._background=\"black\",i._checkSizeRatio=.8,i._thickness=1,i.group=\"\",i.onIsCheckedChangedObservable=new n.Observable,i.isPointerBlocker=!0,i}return r(e,t),Object.defineProperty(e.prototype,\"thickness\",{get:function(){return this._thickness},set:function(t){this._thickness!==t&&(this._thickness=t,this._markAsDirty())},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,\"checkSizeRatio\",{get:function(){return this._checkSizeRatio},set:function(t){t=Math.max(Math.min(1,t),0),this._checkSizeRatio!==t&&(this._checkSizeRatio=t,this._markAsDirty())},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,\"background\",{get:function(){return this._background},set:function(t){this._background!==t&&(this._background=t,this._markAsDirty())},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,\"isChecked\",{get:function(){return this._isChecked},set:function(t){var e=this;this._isChecked!==t&&(this._isChecked=t,this._markAsDirty(),this.onIsCheckedChangedObservable.notifyObservers(t),this._isChecked&&this._host&&this._host.executeOnAllControls(function(t){if(t!==e&&void 0!==t.group){var i=t;i.group===e.group&&(i.isChecked=!1)}}))},enumerable:!0,configurable:!0}),e.prototype._getTypeName=function(){return\"RadioButton\"},e.prototype._draw=function(t,e){if(e.save(),this._applyStates(e),this._processMeasures(t,e)){var i=this._currentMeasure.width-this._thickness,r=this._currentMeasure.height-this._thickness;if((this.shadowBlur||this.shadowOffsetX||this.shadowOffsetY)&&(e.shadowColor=this.shadowColor,e.shadowBlur=this.shadowBlur,e.shadowOffsetX=this.shadowOffsetX,e.shadowOffsetY=this.shadowOffsetY),o.Control.drawEllipse(this._currentMeasure.left+this._currentMeasure.width/2,this._currentMeasure.top+this._currentMeasure.height/2,this._currentMeasure.width/2-this._thickness/2,this._currentMeasure.height/2-this._thickness/2,e),e.fillStyle=this._isEnabled?this._background:this._disabledColor,e.fill(),(this.shadowBlur||this.shadowOffsetX||this.shadowOffsetY)&&(e.shadowBlur=0,e.shadowOffsetX=0,e.shadowOffsetY=0),e.strokeStyle=this.color,e.lineWidth=this._thickness,e.stroke(),this._isChecked){e.fillStyle=this._isEnabled?this.color:this._disabledColor;var n=i*this._checkSizeRatio,s=r*this._checkSizeRatio;o.Control.drawEllipse(this._currentMeasure.left+this._currentMeasure.width/2,this._currentMeasure.top+this._currentMeasure.height/2,n/2-this._thickness/2,s/2-this._thickness/2,e),e.fill()}}e.restore()},e.prototype._onPointerDown=function(e,i,r,o){return!!t.prototype._onPointerDown.call(this,e,i,r,o)&&(this.isChecked||(this.isChecked=!0),!0)},e.AddRadioButtonWithHeader=function(t,i,r,n){var a=new s.StackPanel;a.isVertical=!1,a.height=\"30px\";var h=new e;h.width=\"20px\",h.height=\"20px\",h.isChecked=r,h.color=\"green\",h.group=i,h.onIsCheckedChangedObservable.add(function(t){return n(h,t)}),a.addControl(h);var l=new s.TextBlock;return l.text=t,l.width=\"180px\",l.paddingLeft=\"5px\",l.textHorizontalAlignment=o.Control.HORIZONTAL_ALIGNMENT_LEFT,l.color=\"white\",a.addControl(l),a},e}(o.Control);e.RadioButton=a},function(t,e,i){\"use strict\";var r=this&&this.__extends||function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])})(e,i)};return function(e,i){function r(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}();Object.defineProperty(e,\"__esModule\",{value:!0});var o=i(1),n=i(2),s=i(0),a=function(t){function e(e){var i=t.call(this,e)||this;return i.name=e,i._thumbWidth=new n.ValueAndUnit(20,n.ValueAndUnit.UNITMODE_PIXEL,!1),i._minimum=0,i._maximum=100,i._value=50,i._isVertical=!1,i._background=\"black\",i._borderColor=\"white\",i._barOffset=new n.ValueAndUnit(5,n.ValueAndUnit.UNITMODE_PIXEL,!1),i._isThumbCircle=!1,i._isThumbClamped=!1,i.onValueChangedObservable=new s.Observable,i._pointerIsDown=!1,i.isPointerBlocker=!0,i}return r(e,t),Object.defineProperty(e.prototype,\"borderColor\",{get:function(){return this._borderColor},set:function(t){this._borderColor!==t&&(this._borderColor=t,this._markAsDirty())},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,\"background\",{get:function(){return this._background},set:function(t){this._background!==t&&(this._background=t,this._markAsDirty())},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,\"barOffset\",{get:function(){return this._barOffset.toString(this._host)},set:function(t){this._barOffset.toString(this._host)!==t&&this._barOffset.fromString(t)&&this._markAsDirty()},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,\"barOffsetInPixels\",{get:function(){return this._barOffset.getValueInPixel(this._host,this._cachedParentMeasure.width)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,\"thumbWidth\",{get:function(){return this._thumbWidth.toString(this._host)},set:function(t){this._thumbWidth.toString(this._host)!==t&&this._thumbWidth.fromString(t)&&this._markAsDirty()},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,\"thumbWidthInPixels\",{get:function(){return this._thumbWidth.getValueInPixel(this._host,this._cachedParentMeasure.width)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,\"minimum\",{get:function(){return this._minimum},set:function(t){this._minimum!==t&&(this._minimum=t,this._markAsDirty(),this.value=Math.max(Math.min(this.value,this._maximum),this._minimum))},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,\"maximum\",{get:function(){return this._maximum},set:function(t){this._maximum!==t&&(this._maximum=t,this._markAsDirty(),this.value=Math.max(Math.min(this.value,this._maximum),this._minimum))},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,\"value\",{get:function(){return this._value},set:function(t){t=Math.max(Math.min(t,this._maximum),this._minimum),this._value!==t&&(this._value=t,this._markAsDirty(),this.onValueChangedObservable.notifyObservers(this._value))},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,\"isVertical\",{get:function(){return this._isVertical},set:function(t){this._isVertical!==t&&(this._isVertical=t,this._markAsDirty())},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,\"isThumbCircle\",{get:function(){return this._isThumbCircle},set:function(t){this._isThumbCircle!==t&&(this._isThumbCircle=t,this._markAsDirty())},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,\"isThumbClamped\",{get:function(){return this._isThumbClamped},set:function(t){this._isThumbClamped!==t&&(this._isThumbClamped=t,this._markAsDirty())},enumerable:!0,configurable:!0}),e.prototype._getTypeName=function(){return\"Slider\"},e.prototype._getThumbThickness=function(t,e){var i=0;switch(t){case\"circle\":i=this._thumbWidth.isPixel?Math.max(this._thumbWidth.getValue(this._host),e):e*this._thumbWidth.getValue(this._host);break;case\"rectangle\":i=this._thumbWidth.isPixel?Math.min(this._thumbWidth.getValue(this._host),e):e*this._thumbWidth.getValue(this._host)}return i},e.prototype._draw=function(t,e){if(e.save(),this._applyStates(e),this._processMeasures(t,e)){var i=0,r=this.isThumbCircle?\"circle\":\"rectangle\",o=this._currentMeasure.left,n=this._currentMeasure.top,s=this._currentMeasure.width,a=this._currentMeasure.height,h=Math.max(this._currentMeasure.width,this._currentMeasure.height),l=Math.min(this._currentMeasure.width,this._currentMeasure.height),u=this._getThumbThickness(r,l);h-=u;var c=0;if(this._isVertical&&this._currentMeasure.height<this._currentMeasure.width)return void console.error(\"Height should be greater than width\");l-=2*(i=this._barOffset.isPixel?Math.min(this._barOffset.getValue(this._host),l):l*this._barOffset.getValue(this._host)),this._isVertical?(o+=i,this.isThumbClamped||(n+=u/2),a=h,s=l):(n+=i,this.isThumbClamped||(o+=u/2),a=l,s=h),this.isThumbClamped&&this.isThumbCircle?(this._isVertical?n+=u/2:o+=u/2,c=l/2):c=(u-i)/2,(this.shadowBlur||this.shadowOffsetX||this.shadowOffsetY)&&(e.shadowColor=this.shadowColor,e.shadowBlur=this.shadowBlur,e.shadowOffsetX=this.shadowOffsetX,e.shadowOffsetY=this.shadowOffsetY);var _=this._isVertical?(this._maximum-this._value)/(this._maximum-this._minimum)*h:(this._value-this._minimum)/(this._maximum-this._minimum)*h;e.fillStyle=this._background,this._isVertical?this.isThumbClamped?this.isThumbCircle?(e.beginPath(),e.arc(o+l/2,n,c,Math.PI,2*Math.PI),e.fill(),e.fillRect(o,n,s,a)):e.fillRect(o,n,s,a+u):e.fillRect(o,n,s,a):this.isThumbClamped?this.isThumbCircle?(e.beginPath(),e.arc(o+h,n+l/2,c,0,2*Math.PI),e.fill(),e.fillRect(o,n,s,a)):e.fillRect(o,n,s+u,a):e.fillRect(o,n,s,a),(this.shadowBlur||this.shadowOffsetX||this.shadowOffsetY)&&(e.shadowBlur=0,e.shadowOffsetX=0,e.shadowOffsetY=0),e.fillStyle=this.color,this._isVertical?this.isThumbClamped?this.isThumbCircle?(e.beginPath(),e.arc(o+l/2,n+h,c,0,2*Math.PI),e.fill(),e.fillRect(o,n+_,s,a-_)):e.fillRect(o,n+_,s,this._currentMeasure.height-_):e.fillRect(o,n+_,s,a-_):this.isThumbClamped&&this.isThumbCircle?(e.beginPath(),e.arc(o,n+l/2,c,0,2*Math.PI),e.fill(),e.fillRect(o,n,_,a)):e.fillRect(o,n,_,a),(this.shadowBlur||this.shadowOffsetX||this.shadowOffsetY)&&(e.shadowColor=this.shadowColor,e.shadowBlur=this.shadowBlur,e.shadowOffsetX=this.shadowOffsetX,e.shadowOffsetY=this.shadowOffsetY),this._isThumbCircle?(e.beginPath(),this._isVertical?e.arc(o+l/2,n+_,c,0,2*Math.PI):e.arc(o+_,n+l/2,c,0,2*Math.PI),e.fill(),(this.shadowBlur||this.shadowOffsetX||this.shadowOffsetY)&&(e.shadowBlur=0,e.shadowOffsetX=0,e.shadowOffsetY=0),e.strokeStyle=this._borderColor,e.stroke()):(this._isVertical?e.fillRect(o-i,this._currentMeasure.top+_,this._currentMeasure.width,u):e.fillRect(this._currentMeasure.left+_,this._currentMeasure.top,u,this._currentMeasure.height),(this.shadowBlur||this.shadowOffsetX||this.shadowOffsetY)&&(e.shadowBlur=0,e.shadowOffsetX=0,e.shadowOffsetY=0),e.strokeStyle=this._borderColor,this._isVertical?e.strokeRect(o-i,this._currentMeasure.top+_,this._currentMeasure.width,u):e.strokeRect(this._currentMeasure.left+_,this._currentMeasure.top,u,this._currentMeasure.height))}e.restore()},e.prototype._updateValueFromPointer=function(t,e){0!=this.rotation&&(this._invertTransformMatrix.transformCoordinates(t,e,this._transformedPosition),t=this._transformedPosition.x,e=this._transformedPosition.y),this._isVertical?this.value=this._minimum+(1-(e-this._currentMeasure.top)/this._currentMeasure.height)*(this._maximum-this._minimum):this.value=this._minimum+(t-this._currentMeasure.left)/this._currentMeasure.width*(this._maximum-this._minimum)},e.prototype._onPointerDown=function(e,i,r,o){return!!t.prototype._onPointerDown.call(this,e,i,r,o)&&(this._pointerIsDown=!0,this._updateValueFromPointer(i.x,i.y),this._host._capturingControl[r]=this,!0)},e.prototype._onPointerMove=function(e,i){this._pointerIsDown&&this._updateValueFromPointer(i.x,i.y),t.prototype._onPointerMove.call(this,e,i)},e.prototype._onPointerUp=function(e,i,r,o,n){this._pointerIsDown=!1,delete this._host._capturingControl[r],t.prototype._onPointerUp.call(this,e,i,r,o,n)},e}(o.Control);e.Slider=a},function(t,e,i){\"use strict\";Object.defineProperty(e,\"__esModule\",{value:!0});var r=i(0),o=i(2),n=function(){function t(t){this._fontFamily=\"Arial\",this._fontStyle=\"\",this._fontWeight=\"\",this._fontSize=new o.ValueAndUnit(18,o.ValueAndUnit.UNITMODE_PIXEL,!1),this.onChangedObservable=new r.Observable,this._host=t}return Object.defineProperty(t.prototype,\"fontSize\",{get:function(){return this._fontSize.toString(this._host)},set:function(t){this._fontSize.toString(this._host)!==t&&this._fontSize.fromString(t)&&this.onChangedObservable.notifyObservers(this)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,\"fontFamily\",{get:function(){return this._fontFamily},set:function(t){this._fontFamily!==t&&(this._fontFamily=t,this.onChangedObservable.notifyObservers(this))},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,\"fontStyle\",{get:function(){return this._fontStyle},set:function(t){this._fontStyle!==t&&(this._fontStyle=t,this.onChangedObservable.notifyObservers(this))},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,\"fontWeight\",{get:function(){return this._fontWeight},set:function(t){this._fontWeight!==t&&(this._fontWeight=t,this.onChangedObservable.notifyObservers(this))},enumerable:!0,configurable:!0}),t.prototype.dispose=function(){this.onChangedObservable.clear()},t}();e.Style=n},function(t,e,i){\"use strict\";var r=this&&this.__extends||function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])})(e,i)};return function(e,i){function r(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}();Object.defineProperty(e,\"__esModule\",{value:!0});var o=i(13),n=i(0),s=function(t){function e(e){return t.call(this,e)||this}return r(e,t),e.prototype._getTypeName=function(){return\"AbstractButton3D\"},e.prototype._createNode=function(t){return new n.TransformNode(\"button\"+this.name)},e}(o.Control3D);e.AbstractButton3D=s},function(t,e,i){\"use strict\";var r=this&&this.__extends||function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])})(e,i)};return function(e,i){function r(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}();Object.defineProperty(e,\"__esModule\",{value:!0});var o=function(t){function e(e,i){void 0===i&&(i=0);var r=t.call(this,e.x,e.y,e.z)||this;return r.buttonIndex=i,r}return r(e,t),e}(i(0).Vector3);e.Vector3WithInfo=o},function(t,e,i){\"use strict\";var r=this&&this.__extends||function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])})(e,i)};return function(e,i){function r(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),o=this&&this.__decorate||function(t,e,i,r){var o,n=arguments.length,s=n<3?e:null===r?r=Object.getOwnPropertyDescriptor(e,i):r;if(\"object\"==typeof Reflect&&\"function\"==typeof Reflect.decorate)s=Reflect.decorate(t,e,i,r);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(s=(n<3?o(s):n>3?o(e,i,s):o(e,i))||s);return n>3&&s&&Object.defineProperty(e,i,s),s};Object.defineProperty(e,\"__esModule\",{value:!0});var n=i(0);i(44).registerShader();var s=function(t){function e(){var e=t.call(this)||this;return e.INNERGLOW=!1,e.BORDER=!1,e.HOVERLIGHT=!1,e.TEXTURE=!1,e.rebuild(),e}return r(e,t),e}(n.MaterialDefines);e.FluentMaterialDefines=s;var a=function(t){function e(e,i){var r=t.call(this,e,i)||this;return r.innerGlowColorIntensity=.5,r.innerGlowColor=new n.Color3(1,1,1),r.alpha=1,r.albedoColor=new n.Color3(.3,.35,.4),r.renderBorders=!1,r.borderWidth=.5,r.edgeSmoothingValue=.02,r.borderMinValue=.1,r.renderHoverLight=!1,r.hoverRadius=1,r.hoverColor=new n.Color4(.3,.3,.3,1),r.hoverPosition=n.Vector3.Zero(),r}return r(e,t),e.prototype.needAlphaBlending=function(){return 1!==this.alpha},e.prototype.needAlphaTesting=function(){return!1},e.prototype.getAlphaTestTexture=function(){return null},e.prototype.isReadyForSubMesh=function(t,e,i){if(this.isFrozen&&this._wasPreviouslyReady&&e.effect)return!0;e._materialDefines||(e._materialDefines=new s);var r=this.getScene(),o=e._materialDefines;if(!this.checkReadyOnEveryCall&&e.effect&&o._renderId===r.getRenderId())return!0;if(o._areTexturesDirty)if(o.INNERGLOW=this.innerGlowColorIntensity>0,o.BORDER=this.renderBorders,o.HOVERLIGHT=this.renderHoverLight,this._albedoTexture){if(!this._albedoTexture.isReadyOrNotBlocking())return!1;o.TEXTURE=!0}else o.TEXTURE=!1;var a=r.getEngine();if(o.isDirty){o.markAsProcessed(),r.resetCachedMaterial();var h=[n.VertexBuffer.PositionKind];h.push(n.VertexBuffer.NormalKind),h.push(n.VertexBuffer.UVKind);var l=[\"world\",\"viewProjection\",\"innerGlowColor\",\"albedoColor\",\"borderWidth\",\"edgeSmoothingValue\",\"scaleFactor\",\"borderMinValue\",\"hoverColor\",\"hoverPosition\",\"hoverRadius\"],u=[\"albedoSampler\"],c=new Array;n.MaterialHelper.PrepareUniformsAndSamplersList({uniformsNames:l,uniformBuffersNames:c,samplers:u,defines:o,maxSimultaneousLights:4});var _=o.toString();e.setEffect(r.getEngine().createEffect(\"fluent\",{attributes:h,uniformsNames:l,uniformBuffersNames:c,samplers:u,defines:_,fallbacks:null,onCompiled:this.onCompiled,onError:this.onError,indexParameters:{maxSimultaneousLights:4}},a))}return!(!e.effect||!e.effect.isReady())&&(o._renderId=r.getRenderId(),this._wasPreviouslyReady=!0,!0)},e.prototype.bindForSubMesh=function(t,e,i){var r=this.getScene(),o=i._materialDefines;if(o){var s=i.effect;s&&(this._activeEffect=s,this.bindOnlyWorldMatrix(t),this._activeEffect.setMatrix(\"viewProjection\",r.getTransformMatrix()),this._mustRebind(r,s)&&(this._activeEffect.setColor4(\"albedoColor\",this.albedoColor,this.alpha),o.INNERGLOW&&this._activeEffect.setColor4(\"innerGlowColor\",this.innerGlowColor,this.innerGlowColorIntensity),o.BORDER&&(this._activeEffect.setFloat(\"borderWidth\",this.borderWidth),this._activeEffect.setFloat(\"edgeSmoothingValue\",this.edgeSmoothingValue),this._activeEffect.setFloat(\"borderMinValue\",this.borderMinValue),e.getBoundingInfo().boundingBox.extendSize.multiplyToRef(e.scaling,n.Tmp.Vector3[0]),this._activeEffect.setVector3(\"scaleFactor\",n.Tmp.Vector3[0])),o.HOVERLIGHT&&(this._activeEffect.setDirectColor4(\"hoverColor\",this.hoverColor),this._activeEffect.setFloat(\"hoverRadius\",this.hoverRadius),this._activeEffect.setVector3(\"hoverPosition\",this.hoverPosition)),o.TEXTURE&&this._activeEffect.setTexture(\"albedoSampler\",this._albedoTexture)),this._afterBind(e,this._activeEffect))}},e.prototype.getActiveTextures=function(){return t.prototype.getActiveTextures.call(this)},e.prototype.hasTexture=function(e){return!!t.prototype.hasTexture.call(this,e)},e.prototype.dispose=function(e){t.prototype.dispose.call(this,e)},e.prototype.clone=function(t){var i=this;return n.SerializationHelper.Clone(function(){return new e(t,i.getScene())},this)},e.prototype.serialize=function(){var t=n.SerializationHelper.Serialize(this);return t.customType=\"BABYLON.GUI.FluentMaterial\",t},e.prototype.getClassName=function(){return\"FluentMaterial\"},e.Parse=function(t,i,r){return n.SerializationHelper.Parse(function(){return new e(t.name,i)},t,i,r)},o([n.serialize(),n.expandToProperty(\"_markAllSubMeshesAsTexturesDirty\")],e.prototype,\"innerGlowColorIntensity\",void 0),o([n.serializeAsColor3()],e.prototype,\"innerGlowColor\",void 0),o([n.serialize()],e.prototype,\"alpha\",void 0),o([n.serializeAsColor3()],e.prototype,\"albedoColor\",void 0),o([n.serialize(),n.expandToProperty(\"_markAllSubMeshesAsTexturesDirty\")],e.prototype,\"renderBorders\",void 0),o([n.serialize()],e.prototype,\"borderWidth\",void 0),o([n.serialize()],e.prototype,\"edgeSmoothingValue\",void 0),o([n.serialize()],e.prototype,\"borderMinValue\",void 0),o([n.serialize(),n.expandToProperty(\"_markAllSubMeshesAsTexturesDirty\")],e.prototype,\"renderHoverLight\",void 0),o([n.serialize()],e.prototype,\"hoverRadius\",void 0),o([n.serializeAsColor4()],e.prototype,\"hoverColor\",void 0),o([n.serializeAsVector3()],e.prototype,\"hoverPosition\",void 0),o([n.serializeAsTexture(\"albedoTexture\")],e.prototype,\"_albedoTexture\",void 0),o([n.expandToProperty(\"_markAllSubMeshesAsTexturesAndMiscDirty\")],e.prototype,\"albedoTexture\",void 0),e}(n.PushMaterial);e.FluentMaterial=a},function(t,e,i){\"use strict\";(function(t){Object.defineProperty(e,\"__esModule\",{value:!0});var r=i(15),o=void 0!==t?t:\"undefined\"!=typeof window?window:void 0;void 0!==o&&(o.BABYLON=o.BABYLON||{},o.BABYLON.GUI=r),function(t){for(var i in t)e.hasOwnProperty(i)||(e[i]=t[i])}(i(15))}).call(this,i(28))},function(t,e){var i;i=function(){return this}();try{i=i||Function(\"return this\")()||(0,eval)(\"this\")}catch(t){\"object\"==typeof window&&(i=window)}t.exports=i},function(t,e,i){\"use strict\";function r(t){for(var i in t)e.hasOwnProperty(i)||(e[i]=t[i])}Object.defineProperty(e,\"__esModule\",{value:!0}),r(i(9)),r(i(12)),r(i(17)),r(i(7)),r(i(20)),r(i(23)),r(i(2))},function(t,e,i){\"use strict\";var r=this&&this.__extends||function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])})(e,i)};return function(e,i){function r(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}();Object.defineProperty(e,\"__esModule\",{value:!0});var o=i(1),n=i(0),s=function(t){function e(e){var i=t.call(this,e)||this;return i.name=e,i._value=n.Color3.Red(),i._tmpColor=new n.Color3,i._pointerStartedOnSquare=!1,i._pointerStartedOnWheel=!1,i._squareLeft=0,i._squareTop=0,i._squareSize=0,i._h=360,i._s=1,i._v=1,i.onValueChangedObservable=new n.Observable,i._pointerIsDown=!1,i.value=new n.Color3(.88,.1,.1),i.size=\"200px\",i.isPointerBlocker=!0,i}return r(e,t),Object.defineProperty(e.prototype,\"value\",{get:function(){return this._value},set:function(t){this._value.equals(t)||(this._value.copyFrom(t),this._RGBtoHSV(this._value,this._tmpColor),this._h=this._tmpColor.r,this._s=Math.max(this._tmpColor.g,1e-5),this._v=Math.max(this._tmpColor.b,1e-5),this._markAsDirty(),this.onValueChangedObservable.notifyObservers(this._value))},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,\"width\",{set:function(t){this._width.toString(this._host)!==t&&this._width.fromString(t)&&(this._height.fromString(t),this._markAsDirty())},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,\"height\",{set:function(t){this._height.toString(this._host)!==t&&this._height.fromString(t)&&(this._width.fromString(t),this._markAsDirty())},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,\"size\",{get:function(){return this.width},set:function(t){this.width=t},enumerable:!0,configurable:!0}),e.prototype._getTypeName=function(){return\"ColorPicker\"},e.prototype._updateSquareProps=function(){var t=.5*Math.min(this._currentMeasure.width,this._currentMeasure.height),e=2*(t-.2*t)/Math.sqrt(2),i=t-.5*e;this._squareLeft=this._currentMeasure.left+i,this._squareTop=this._currentMeasure.top+i,this._squareSize=e},e.prototype._drawGradientSquare=function(t,e,i,r,o,n){var s=n.createLinearGradient(e,i,r+e,i);s.addColorStop(0,\"#fff\"),s.addColorStop(1,\"hsl(\"+t+\", 100%, 50%)\"),n.fillStyle=s,n.fillRect(e,i,r,o);var a=n.createLinearGradient(e,i,e,o+i);a.addColorStop(0,\"rgba(0,0,0,0)\"),a.addColorStop(1,\"#000\"),n.fillStyle=a,n.fillRect(e,i,r,o)},e.prototype._drawCircle=function(t,e,i,r){r.beginPath(),r.arc(t,e,i+1,0,2*Math.PI,!1),r.lineWidth=3,r.strokeStyle=\"#333333\",r.stroke(),r.beginPath(),r.arc(t,e,i,0,2*Math.PI,!1),r.lineWidth=3,r.strokeStyle=\"#ffffff\",r.stroke()},e.prototype._createColorWheelCanvas=function(t,e){var i=document.createElement(\"canvas\");i.width=2*t,i.height=2*t;for(var r=i.getContext(\"2d\"),o=r.getImageData(0,0,2*t,2*t),n=o.data,s=this._tmpColor,a=t*t,h=t-e,l=h*h,u=-t;u<t;u++)for(var c=-t;c<t;c++){var _=u*u+c*c;if(!(_>a||_<l)){var f=Math.sqrt(_),p=Math.atan2(c,u);this._HSVtoRGB(180*p/Math.PI+180,f/t,1,s);var d=4*(u+t+2*(c+t)*t);n[d]=255*s.r,n[d+1]=255*s.g,n[d+2]=255*s.b;var y=.2;y=t<50?.2:t>150?.04:-.16*(t-50)/100+.2;var g=(f-h)/(t-h);n[d+3]=g<y?g/y*255:g>1-y?255*(1-(g-(1-y))/y):255}}return r.putImageData(o,0,0),i},e.prototype._RGBtoHSV=function(t,e){var i=t.r,r=t.g,o=t.b,n=Math.max(i,r,o),s=Math.min(i,r,o),a=0,h=0,l=n,u=n-s;0!==n&&(h=u/n),n!=s&&(n==i?(a=(r-o)/u,r<o&&(a+=6)):n==r?a=(o-i)/u+2:n==o&&(a=(i-r)/u+4),a*=60),e.r=a,e.g=h,e.b=l},e.prototype._HSVtoRGB=function(t,e,i,r){var o=i*e,n=t/60,s=o*(1-Math.abs(n%2-1)),a=0,h=0,l=0;n>=0&&n<=1?(a=o,h=s):n>=1&&n<=2?(a=s,h=o):n>=2&&n<=3?(h=o,l=s):n>=3&&n<=4?(h=s,l=o):n>=4&&n<=5?(a=s,l=o):n>=5&&n<=6&&(a=o,l=s);var u=i-o;r.set(a+u,h+u,l+u)},e.prototype._draw=function(t,e){if(e.save(),this._applyStates(e),this._processMeasures(t,e)){var i=.5*Math.min(this._currentMeasure.width,this._currentMeasure.height),r=.2*i,o=this._currentMeasure.left,n=this._currentMeasure.top;this._colorWheelCanvas&&this._colorWheelCanvas.width==2*i||(this._colorWheelCanvas=this._createColorWheelCanvas(i,r)),this._updateSquareProps(),(this.shadowBlur||this.shadowOffsetX||this.shadowOffsetY)&&(e.shadowColor=this.shadowColor,e.shadowBlur=this.shadowBlur,e.shadowOffsetX=this.shadowOffsetX,e.shadowOffsetY=this.shadowOffsetY,e.fillRect(this._squareLeft,this._squareTop,this._squareSize,this._squareSize)),e.drawImage(this._colorWheelCanvas,o,n),(this.shadowBlur||this.shadowOffsetX||this.shadowOffsetY)&&(e.shadowBlur=0,e.shadowOffsetX=0,e.shadowOffsetY=0),this._drawGradientSquare(this._h,this._squareLeft,this._squareTop,this._squareSize,this._squareSize,e);var s=this._squareLeft+this._squareSize*this._s,a=this._squareTop+this._squareSize*(1-this._v);this._drawCircle(s,a,.04*i,e);var h=i-.5*r;s=o+i+Math.cos((this._h-180)*Math.PI/180)*h,a=n+i+Math.sin((this._h-180)*Math.PI/180)*h,this._drawCircle(s,a,.35*r,e)}e.restore()},e.prototype._updateValueFromPointer=function(t,e){if(this._pointerStartedOnWheel){var i=.5*Math.min(this._currentMeasure.width,this._currentMeasure.height),r=i+this._currentMeasure.left,o=i+this._currentMeasure.top;this._h=180*Math.atan2(e-o,t-r)/Math.PI+180}else this._pointerStartedOnSquare&&(this._updateSquareProps(),this._s=(t-this._squareLeft)/this._squareSize,this._v=1-(e-this._squareTop)/this._squareSize,this._s=Math.min(this._s,1),this._s=Math.max(this._s,1e-5),this._v=Math.min(this._v,1),this._v=Math.max(this._v,1e-5));this._HSVtoRGB(this._h,this._s,this._v,this._tmpColor),this.value=this._tmpColor},e.prototype._isPointOnSquare=function(t){this._updateSquareProps();var e=this._squareLeft,i=this._squareTop,r=this._squareSize;return t.x>=e&&t.x<=e+r&&t.y>=i&&t.y<=i+r},e.prototype._isPointOnWheel=function(t){var e=.5*Math.min(this._currentMeasure.width,this._currentMeasure.height),i=e+this._currentMeasure.left,r=e+this._currentMeasure.top,o=e-.2*e,n=e*e,s=o*o,a=t.x-i,h=t.y-r,l=a*a+h*h;return l<=n&&l>=s},e.prototype._onPointerDown=function(e,i,r,o){return!!t.prototype._onPointerDown.call(this,e,i,r,o)&&(this._pointerIsDown=!0,this._pointerStartedOnSquare=!1,this._pointerStartedOnWheel=!1,this._isPointOnSquare(i)?this._pointerStartedOnSquare=!0:this._isPointOnWheel(i)&&(this._pointerStartedOnWheel=!0),this._updateValueFromPointer(i.x,i.y),this._host._capturingControl[r]=this,!0)},e.prototype._onPointerMove=function(e,i){this._pointerIsDown&&this._updateValueFromPointer(i.x,i.y),t.prototype._onPointerMove.call(this,e,i)},e.prototype._onPointerUp=function(e,i,r,o,n){this._pointerIsDown=!1,delete this._host._capturingControl[r],t.prototype._onPointerUp.call(this,e,i,r,o,n)},e}(o.Control);e.ColorPicker=s},function(t,e,i){\"use strict\";var r=this&&this.__extends||function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])})(e,i)};return function(e,i){function r(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}();Object.defineProperty(e,\"__esModule\",{value:!0});var o=i(4),n=i(1),s=function(t){function e(e){var i=t.call(this,e)||this;return i.name=e,i._thickness=1,i}return r(e,t),Object.defineProperty(e.prototype,\"thickness\",{get:function(){return this._thickness},set:function(t){this._thickness!==t&&(this._thickness=t,this._markAsDirty())},enumerable:!0,configurable:!0}),e.prototype._getTypeName=function(){return\"Ellipse\"},e.prototype._localDraw=function(t){t.save(),(this.shadowBlur||this.shadowOffsetX||this.shadowOffsetY)&&(t.shadowColor=this.shadowColor,t.shadowBlur=this.shadowBlur,t.shadowOffsetX=this.shadowOffsetX,t.shadowOffsetY=this.shadowOffsetY),n.Control.drawEllipse(this._currentMeasure.left+this._currentMeasure.width/2,this._currentMeasure.top+this._currentMeasure.height/2,this._currentMeasure.width/2-this._thickness/2,this._currentMeasure.height/2-this._thickness/2,t),this._background&&(t.fillStyle=this._background,t.fill()),(this.shadowBlur||this.shadowOffsetX||this.shadowOffsetY)&&(t.shadowBlur=0,t.shadowOffsetX=0,t.shadowOffsetY=0),this._thickness&&(this.color&&(t.strokeStyle=this.color),t.lineWidth=this._thickness,t.stroke()),t.restore()},e.prototype._additionalProcessing=function(e,i){t.prototype._additionalProcessing.call(this,e,i),this._measureForChildren.width-=2*this._thickness,this._measureForChildren.height-=2*this._thickness,this._measureForChildren.left+=this._thickness,this._measureForChildren.top+=this._thickness},e.prototype._clipForChildren=function(t){n.Control.drawEllipse(this._currentMeasure.left+this._currentMeasure.width/2,this._currentMeasure.top+this._currentMeasure.height/2,this._currentMeasure.width/2,this._currentMeasure.height/2,t),t.clip()},e}(o.Container);e.Ellipse=s},function(t,e,i){\"use strict\";var r=this&&this.__extends||function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])})(e,i)};return function(e,i){function r(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}();Object.defineProperty(e,\"__esModule\",{value:!0});var o=i(4),n=i(2),s=i(1),a=function(t){function e(e){var i=t.call(this,e)||this;return i.name=e,i._rowDefinitions=new Array,i._columnDefinitions=new Array,i._cells={},i._childControls=new Array,i}return r(e,t),Object.defineProperty(e.prototype,\"children\",{get:function(){return this._childControls},enumerable:!0,configurable:!0}),e.prototype.addRowDefinition=function(t,e){return void 0===e&&(e=!1),this._rowDefinitions.push(new n.ValueAndUnit(t,e?n.ValueAndUnit.UNITMODE_PIXEL:n.ValueAndUnit.UNITMODE_PERCENTAGE)),this._markAsDirty(),this},e.prototype.addColumnDefinition=function(t,e){return void 0===e&&(e=!1),this._columnDefinitions.push(new n.ValueAndUnit(t,e?n.ValueAndUnit.UNITMODE_PIXEL:n.ValueAndUnit.UNITMODE_PERCENTAGE)),this._markAsDirty(),this},e.prototype.setRowDefinition=function(t,e,i){return void 0===i&&(i=!1),t<0||t>=this._rowDefinitions.length?this:(this._rowDefinitions[t]=new n.ValueAndUnit(e,i?n.ValueAndUnit.UNITMODE_PIXEL:n.ValueAndUnit.UNITMODE_PERCENTAGE),this._markAsDirty(),this)},e.prototype.setColumnDefinition=function(t,e,i){return void 0===i&&(i=!1),t<0||t>=this._columnDefinitions.length?this:(this._columnDefinitions[t]=new n.ValueAndUnit(e,i?n.ValueAndUnit.UNITMODE_PIXEL:n.ValueAndUnit.UNITMODE_PERCENTAGE),this._markAsDirty(),this)},e.prototype._removeCell=function(e,i){if(e){t.prototype.removeControl.call(this,e);for(var r=0,o=e.children;r<o.length;r++){var n=o[r],s=this._childControls.indexOf(n);-1!==s&&this._childControls.splice(s,1)}delete this._cells[i]}},e.prototype._offsetCell=function(t,e){if(this._cells[e]){this._cells[t]=this._cells[e];for(var i=0,r=this._cells[t].children;i<r.length;i++){r[i]._tag=t}delete this._cells[e]}},e.prototype.removeColumnDefinition=function(t){if(t<0||t>=this._columnDefinitions.length)return this;for(var e=0;e<this._rowDefinitions.length;e++){var i=e+\":\"+t,r=this._cells[i];this._removeCell(r,i)}for(e=0;e<this._rowDefinitions.length;e++)for(var o=t+1;o<this._columnDefinitions.length;o++){var n=e+\":\"+(o-1);i=e+\":\"+o;this._offsetCell(n,i)}return this._columnDefinitions.splice(t,1),this._markAsDirty(),this},e.prototype.removeRowDefinition=function(t){if(t<0||t>=this._rowDefinitions.length)return this;for(var e=0;e<this._columnDefinitions.length;e++){var i=t+\":\"+e,r=this._cells[i];this._removeCell(r,i)}for(e=0;e<this._columnDefinitions.length;e++)for(var o=t+1;o<this._rowDefinitions.length;o++){var n=o-1+\":\"+e;i=o+\":\"+e;this._offsetCell(n,i)}return this._rowDefinitions.splice(t,1),this._markAsDirty(),this},e.prototype.addControl=function(e,i,r){void 0===i&&(i=0),void 0===r&&(r=0),0===this._rowDefinitions.length&&this.addRowDefinition(1,!1),0===this._columnDefinitions.length&&this.addColumnDefinition(1,!1);var n=Math.min(i,this._rowDefinitions.length-1)+\":\"+Math.min(r,this._columnDefinitions.length-1),a=this._cells[n];return a||(a=new o.Container(n),this._cells[n]=a,a.horizontalAlignment=s.Control.HORIZONTAL_ALIGNMENT_LEFT,a.verticalAlignment=s.Control.VERTICAL_ALIGNMENT_TOP,t.prototype.addControl.call(this,a)),a.addControl(e),this._childControls.push(e),e._tag=n,this._markAsDirty(),this},e.prototype.removeControl=function(t){var e=this._childControls.indexOf(t);-1!==e&&this._childControls.splice(e,1);var i=this._cells[t._tag];return i&&i.removeControl(t),this._markAsDirty(),this},e.prototype._getTypeName=function(){return\"Grid\"},e.prototype._additionalProcessing=function(e,i){for(var r=[],o=[],n=[],s=[],a=this._currentMeasure.width,h=0,l=this._currentMeasure.height,u=0,c=0,_=0,f=this._rowDefinitions;_<f.length;_++){if((b=f[_]).isPixel)l-=g=b.getValue(this._host),o[c]=g;else u+=b.internalValue;c++}var p=0;c=0;for(var d=0,y=this._rowDefinitions;d<y.length;d++){var g,b=y[d];if(s.push(p),b.isPixel)p+=b.getValue(this._host);else p+=g=b.internalValue/u*l,o[c]=g;c++}c=0;for(var m=0,v=this._columnDefinitions;m<v.length;m++){if((b=v[m]).isPixel)a-=w=b.getValue(this._host),r[c]=w;else h+=b.internalValue;c++}var O=0;c=0;for(var P=0,C=this._columnDefinitions;P<C.length;P++){var w;b=C[P];if(n.push(O),b.isPixel)O+=b.getValue(this._host);else O+=w=b.internalValue/h*a,r[c]=w;c++}for(var T in this._cells)if(this._cells.hasOwnProperty(T)){var M=T.split(\":\"),x=parseInt(M[0]),A=parseInt(M[1]),k=this._cells[T];k.left=n[A]+\"px\",k.top=s[x]+\"px\",k.width=r[A]+\"px\",k.height=o[x]+\"px\"}t.prototype._additionalProcessing.call(this,e,i)},e.prototype.dispose=function(){t.prototype.dispose.call(this);for(var e=0,i=this._childControls;e<i.length;e++){i[e].dispose()}},e}(o.Container);e.Grid=a},function(t,e,i){\"use strict\";var r=this&&this.__extends||function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])})(e,i)};return function(e,i){function r(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}();Object.defineProperty(e,\"__esModule\",{value:!0});var o=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return r(e,t),e.prototype._beforeRenderText=function(t){for(var e=\"\",i=0;i<t.length;i++)e+=\"•\";return e},e}(i(19).InputText);e.InputPassword=o},function(t,e,i){\"use strict\";var r=this&&this.__extends||function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])})(e,i)};return function(e,i){function r(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}();Object.defineProperty(e,\"__esModule\",{value:!0});var o=i(1),n=i(2),s=i(0),a=function(t){function e(e){var i=t.call(this,e)||this;return i.name=e,i._lineWidth=1,i._x1=new n.ValueAndUnit(0),i._y1=new n.ValueAndUnit(0),i._x2=new n.ValueAndUnit(0),i._y2=new n.ValueAndUnit(0),i._dash=new Array,i.isHitTestVisible=!1,i._horizontalAlignment=o.Control.HORIZONTAL_ALIGNMENT_LEFT,i._verticalAlignment=o.Control.VERTICAL_ALIGNMENT_TOP,i}return r(e,t),Object.defineProperty(e.prototype,\"dash\",{get:function(){return this._dash},set:function(t){this._dash!==t&&(this._dash=t,this._markAsDirty())},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,\"connectedControl\",{get:function(){return this._connectedControl},set:function(t){var e=this;this._connectedControl!==t&&(this._connectedControlDirtyObserver&&this._connectedControl&&(this._connectedControl.onDirtyObservable.remove(this._connectedControlDirtyObserver),this._connectedControlDirtyObserver=null),t&&(this._connectedControlDirtyObserver=t.onDirtyObservable.add(function(){return e._markAsDirty()})),this._connectedControl=t,this._markAsDirty())},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,\"x1\",{get:function(){return this._x1.toString(this._host)},set:function(t){this._x1.toString(this._host)!==t&&this._x1.fromString(t)&&this._markAsDirty()},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,\"y1\",{get:function(){return this._y1.toString(this._host)},set:function(t){this._y1.toString(this._host)!==t&&this._y1.fromString(t)&&this._markAsDirty()},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,\"x2\",{get:function(){return this._x2.toString(this._host)},set:function(t){this._x2.toString(this._host)!==t&&this._x2.fromString(t)&&this._markAsDirty()},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,\"y2\",{get:function(){return this._y2.toString(this._host)},set:function(t){this._y2.toString(this._host)!==t&&this._y2.fromString(t)&&this._markAsDirty()},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,\"lineWidth\",{get:function(){return this._lineWidth},set:function(t){this._lineWidth!==t&&(this._lineWidth=t,this._markAsDirty())},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,\"horizontalAlignment\",{set:function(t){},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,\"verticalAlignment\",{set:function(t){},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,\"_effectiveX2\",{get:function(){return(this._connectedControl?this._connectedControl.centerX:0)+this._x2.getValue(this._host)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,\"_effectiveY2\",{get:function(){return(this._connectedControl?this._connectedControl.centerY:0)+this._y2.getValue(this._host)},enumerable:!0,configurable:!0}),e.prototype._getTypeName=function(){return\"Line\"},e.prototype._draw=function(t,e){e.save(),(this.shadowBlur||this.shadowOffsetX||this.shadowOffsetY)&&(e.shadowColor=this.shadowColor,e.shadowBlur=this.shadowBlur,e.shadowOffsetX=this.shadowOffsetX,e.shadowOffsetY=this.shadowOffsetY),this._applyStates(e),this._processMeasures(t,e)&&(e.strokeStyle=this.color,e.lineWidth=this._lineWidth,e.setLineDash(this._dash),e.beginPath(),e.moveTo(this._x1.getValue(this._host),this._y1.getValue(this._host)),e.lineTo(this._effectiveX2,this._effectiveY2),e.stroke()),e.restore()},e.prototype._measure=function(){this._currentMeasure.width=Math.abs(this._x1.getValue(this._host)-this._effectiveX2)+this._lineWidth,this._currentMeasure.height=Math.abs(this._y1.getValue(this._host)-this._effectiveY2)+this._lineWidth},e.prototype._computeAlignment=function(t,e){this._currentMeasure.left=Math.min(this._x1.getValue(this._host),this._effectiveX2)-this._lineWidth/2,this._currentMeasure.top=Math.min(this._y1.getValue(this._host),this._effectiveY2)-this._lineWidth/2},e.prototype.moveToVector3=function(t,e,i){if(void 0===i&&(i=!1),this._host&&this._root===this._host._rootContainer){var r=this._host._getGlobalViewport(e),o=s.Vector3.Project(t,s.Matrix.Identity(),e.getTransformMatrix(),r);this._moveToProjectedPosition(o,i),o.z<0||o.z>1?this.notRenderable=!0:this.notRenderable=!1}else s.Tools.Error(\"Cannot move a control to a vector3 if the control is not at root level\")},e.prototype._moveToProjectedPosition=function(t,e){void 0===e&&(e=!1);var i=t.x+this._linkOffsetX.getValue(this._host)+\"px\",r=t.y+this._linkOffsetY.getValue(this._host)+\"px\";e?(this.x2=i,this.y2=r,this._x2.ignoreAdaptiveScaling=!0,this._y2.ignoreAdaptiveScaling=!0):(this.x1=i,this.y1=r,this._x1.ignoreAdaptiveScaling=!0,this._y1.ignoreAdaptiveScaling=!0)},e}(o.Control);e.Line=a},function(t,e,i){\"use strict\";var r=this&&this.__extends||function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])})(e,i)};return function(e,i){function r(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}();Object.defineProperty(e,\"__esModule\",{value:!0});var o=i(1),n=i(20),s=i(0),a=function(t){function e(e){var i=t.call(this,e)||this;return i.name=e,i._lineWidth=1,i.onPointUpdate=function(){i._markAsDirty()},i.isHitTestVisible=!1,i._horizontalAlignment=o.Control.HORIZONTAL_ALIGNMENT_LEFT,i._verticalAlignment=o.Control.VERTICAL_ALIGNMENT_TOP,i._dash=[],i._points=[],i}return r(e,t),Object.defineProperty(e.prototype,\"dash\",{get:function(){return this._dash},set:function(t){this._dash!==t&&(this._dash=t,this._markAsDirty())},enumerable:!0,configurable:!0}),e.prototype.getAt=function(t){return this._points[t]||(this._points[t]=new n.MultiLinePoint(this)),this._points[t]},e.prototype.add=function(){for(var t=this,e=[],i=0;i<arguments.length;i++)e[i]=arguments[i];return e.map(function(e){return t.push(e)})},e.prototype.push=function(t){var e=this.getAt(this._points.length);return null==t?e:(t instanceof s.AbstractMesh?e.mesh=t:t instanceof o.Control?e.control=t:null!=t.x&&null!=t.y&&(e.x=t.x,e.y=t.y),e)},e.prototype.remove=function(t){var e;if(t instanceof n.MultiLinePoint){if(-1===(e=this._points.indexOf(t)))return}else e=t;var i=this._points[e];i&&(i.dispose(),this._points.splice(e,1))},e.prototype.reset=function(){for(;this._points.length>0;)this.remove(this._points.length-1)},e.prototype.resetLinks=function(){this._points.forEach(function(t){null!=t&&t.resetLinks()})},Object.defineProperty(e.prototype,\"lineWidth\",{get:function(){return this._lineWidth},set:function(t){this._lineWidth!==t&&(this._lineWidth=t,this._markAsDirty())},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,\"horizontalAlignment\",{set:function(t){},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,\"verticalAlignment\",{set:function(t){},enumerable:!0,configurable:!0}),e.prototype._getTypeName=function(){return\"MultiLine\"},e.prototype._draw=function(t,e){if(e.save(),(this.shadowBlur||this.shadowOffsetX||this.shadowOffsetY)&&(e.shadowColor=this.shadowColor,e.shadowBlur=this.shadowBlur,e.shadowOffsetX=this.shadowOffsetX,e.shadowOffsetY=this.shadowOffsetY),this._applyStates(e),this._processMeasures(t,e)){e.strokeStyle=this.color,e.lineWidth=this._lineWidth,e.setLineDash(this._dash),e.beginPath();var i=!0;this._points.forEach(function(t){t&&(i?(e.moveTo(t._point.x,t._point.y),i=!1):e.lineTo(t._point.x,t._point.y))}),e.stroke()}e.restore()},e.prototype._additionalProcessing=function(t,e){var i=this;this._minX=null,this._minY=null,this._maxX=null,this._maxY=null,this._points.forEach(function(t,e){t&&(t.translate(),(null==i._minX||t._point.x<i._minX)&&(i._minX=t._point.x),(null==i._minY||t._point.y<i._minY)&&(i._minY=t._point.y),(null==i._maxX||t._point.x>i._maxX)&&(i._maxX=t._point.x),(null==i._maxY||t._point.y>i._maxY)&&(i._maxY=t._point.y))}),null==this._minX&&(this._minX=0),null==this._minY&&(this._minY=0),null==this._maxX&&(this._maxX=0),null==this._maxY&&(this._maxY=0)},e.prototype._measure=function(){null!=this._minX&&null!=this._maxX&&null!=this._minY&&null!=this._maxY&&(this._currentMeasure.width=Math.abs(this._maxX-this._minX)+this._lineWidth,this._currentMeasure.height=Math.abs(this._maxY-this._minY)+this._lineWidth)},e.prototype._computeAlignment=function(t,e){null!=this._minX&&null!=this._minY&&(this._currentMeasure.left=this._minX-this._lineWidth/2,this._currentMeasure.top=this._minY-this._lineWidth/2)},e.prototype.dispose=function(){this.reset(),t.prototype.dispose.call(this)},e}(o.Control);e.MultiLine=a},function(t,e,i){\"use strict\";var r=this&&this.__extends||function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])})(e,i)};return function(e,i){function r(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}();Object.defineProperty(e,\"__esModule\",{value:!0});var o=i(10),n=i(6),s=i(1),a=i(5),h=i(18),l=i(21),u=i(22),c=i(4),_=function(){function t(t){this.name=t,this._groupPanel=new n.StackPanel,this._selectors=new Array,this._groupPanel.verticalAlignment=s.Control.VERTICAL_ALIGNMENT_TOP,this._groupPanel.horizontalAlignment=s.Control.HORIZONTAL_ALIGNMENT_LEFT,this._groupHeader=this._addGroupHeader(t)}return Object.defineProperty(t.prototype,\"groupPanel\",{get:function(){return this._groupPanel},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,\"selectors\",{get:function(){return this._selectors},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,\"header\",{get:function(){return this._groupHeader.text},set:function(t){\"label\"!==this._groupHeader.text&&(this._groupHeader.text=t)},enumerable:!0,configurable:!0}),t.prototype._addGroupHeader=function(t){var e=new a.TextBlock(\"groupHead\",t);return e.width=.9,e.height=\"30px\",e.textWrapping=!0,e.color=\"black\",e.horizontalAlignment=s.Control.HORIZONTAL_ALIGNMENT_LEFT,e.textHorizontalAlignment=s.Control.HORIZONTAL_ALIGNMENT_LEFT,e.left=\"2px\",this._groupPanel.addControl(e),e},t.prototype._getSelector=function(t){if(!(t<0||t>=this._selectors.length))return this._selectors[t]},t.prototype.removeSelector=function(t){t<0||t>=this._selectors.length||(this._groupPanel.removeControl(this._selectors[t]),this._selectors.splice(t,1))},t}();e.SelectorGroup=_;var f=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return r(e,t),e.prototype.addCheckbox=function(t,e,i){void 0===e&&(e=function(t){}),void 0===i&&(i=!1);i=i||!1;var r=new h.Checkbox;r.width=\"20px\",r.height=\"20px\",r.color=\"#364249\",r.background=\"#CCCCCC\",r.horizontalAlignment=s.Control.HORIZONTAL_ALIGNMENT_LEFT,r.onIsCheckedChangedObservable.add(function(t){e(t)});var o=s.Control.AddHeader(r,t,\"200px\",{isHorizontal:!0,controlFirst:!0});o.height=\"30px\",o.horizontalAlignment=s.Control.HORIZONTAL_ALIGNMENT_LEFT,o.left=\"4px\",this.groupPanel.addControl(o),this.selectors.push(o),r.isChecked=i,this.groupPanel.parent&&this.groupPanel.parent.parent&&(r.color=this.groupPanel.parent.parent.buttonColor,r.background=this.groupPanel.parent.parent.buttonBackground)},e.prototype._setSelectorLabel=function(t,e){this.selectors[t].children[1].text=e},e.prototype._setSelectorLabelColor=function(t,e){this.selectors[t].children[1].color=e},e.prototype._setSelectorButtonColor=function(t,e){this.selectors[t].children[0].color=e},e.prototype._setSelectorButtonBackground=function(t,e){this.selectors[t].children[0].background=e},e}(_);e.CheckboxGroup=f;var p=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e._selectNb=0,e}return r(e,t),e.prototype.addRadio=function(t,e,i){void 0===e&&(e=function(t){}),void 0===i&&(i=!1);var r=this._selectNb++,o=new l.RadioButton;o.name=t,o.width=\"20px\",o.height=\"20px\",o.color=\"#364249\",o.background=\"#CCCCCC\",o.group=this.name,o.horizontalAlignment=s.Control.HORIZONTAL_ALIGNMENT_LEFT,o.onIsCheckedChangedObservable.add(function(t){t&&e(r)});var n=s.Control.AddHeader(o,t,\"200px\",{isHorizontal:!0,controlFirst:!0});n.height=\"30px\",n.horizontalAlignment=s.Control.HORIZONTAL_ALIGNMENT_LEFT,n.left=\"4px\",this.groupPanel.addControl(n),this.selectors.push(n),o.isChecked=i,this.groupPanel.parent&&this.groupPanel.parent.parent&&(o.color=this.groupPanel.parent.parent.buttonColor,o.background=this.groupPanel.parent.parent.buttonBackground)},e.prototype._setSelectorLabel=function(t,e){this.selectors[t].children[1].text=e},e.prototype._setSelectorLabelColor=function(t,e){this.selectors[t].children[1].color=e},e.prototype._setSelectorButtonColor=function(t,e){this.selectors[t].children[0].color=e},e.prototype._setSelectorButtonBackground=function(t,e){this.selectors[t].children[0].background=e},e}(_);e.RadioGroup=p;var d=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return r(e,t),e.prototype.addSlider=function(t,e,i,r,o,n,a){void 0===e&&(e=function(t){}),void 0===i&&(i=\"Units\"),void 0===r&&(r=0),void 0===o&&(o=0),void 0===n&&(n=0),void 0===a&&(a=function(t){return 0|t});var h=new u.Slider;h.name=i,h.value=n,h.minimum=r,h.maximum=o,h.width=.9,h.height=\"20px\",h.color=\"#364249\",h.background=\"#CCCCCC\",h.borderColor=\"black\",h.horizontalAlignment=s.Control.HORIZONTAL_ALIGNMENT_LEFT,h.left=\"4px\",h.paddingBottom=\"4px\",h.onValueChangedObservable.add(function(t){h.parent.children[0].text=h.parent.children[0].name+\": \"+a(t)+\" \"+h.name,e(t)});var l=s.Control.AddHeader(h,t+\": \"+a(n)+\" \"+i,\"30px\",{isHorizontal:!1,controlFirst:!1});l.height=\"60px\",l.horizontalAlignment=s.Control.HORIZONTAL_ALIGNMENT_LEFT,l.left=\"4px\",l.children[0].name=t,this.groupPanel.addControl(l),this.selectors.push(l),this.groupPanel.parent&&this.groupPanel.parent.parent&&(h.color=this.groupPanel.parent.parent.buttonColor,h.background=this.groupPanel.parent.parent.buttonBackground)},e.prototype._setSelectorLabel=function(t,e){this.selectors[t].children[0].name=e,this.selectors[t].children[0].text=e+\": \"+this.selectors[t].children[1].value+\" \"+this.selectors[t].children[1].name},e.prototype._setSelectorLabelColor=function(t,e){this.selectors[t].children[0].color=e},e.prototype._setSelectorButtonColor=function(t,e){this.selectors[t].children[1].color=e},e.prototype._setSelectorButtonBackground=function(t,e){this.selectors[t].children[1].background=e},e}(_);e.SliderGroup=d;var y=function(t){function e(e,i){void 0===i&&(i=[]);var r=t.call(this,e)||this;if(r.name=e,r.groups=i,r._buttonColor=\"#364249\",r._buttonBackground=\"#CCCCCC\",r._headerColor=\"black\",r._barColor=\"white\",r._barHeight=\"2px\",r._spacerHeight=\"20px\",r._bars=new Array,r._groups=i,r.thickness=2,r._panel=new n.StackPanel,r._panel.verticalAlignment=s.Control.VERTICAL_ALIGNMENT_TOP,r._panel.horizontalAlignment=s.Control.HORIZONTAL_ALIGNMENT_LEFT,r._panel.top=5,r._panel.left=5,r._panel.width=.95,i.length>0){for(var o=0;o<i.length-1;o++)r._panel.addControl(i[o].groupPanel),r._addSpacer();r._panel.addControl(i[i.length-1].groupPanel)}return r.addControl(r._panel),r}return r(e,t),e.prototype._getTypeName=function(){return\"SelectionPanel\"},Object.defineProperty(e.prototype,\"headerColor\",{get:function(){return this._headerColor},set:function(t){this._headerColor!==t&&(this._headerColor=t,this._setHeaderColor())},enumerable:!0,configurable:!0}),e.prototype._setHeaderColor=function(){for(var t=0;t<this._groups.length;t++)this._groups[t].groupPanel.children[0].color=this._headerColor},Object.defineProperty(e.prototype,\"buttonColor\",{get:function(){return this._buttonColor},set:function(t){this._buttonColor!==t&&(this._buttonColor=t,this._setbuttonColor())},enumerable:!0,configurable:!0}),e.prototype._setbuttonColor=function(){for(var t=0;t<this._groups.length;t++)for(var e=0;e<this._groups[t].selectors.length;e++)this._groups[t]._setSelectorButtonColor(e,this._buttonColor)},Object.defineProperty(e.prototype,\"labelColor\",{get:function(){return this._labelColor},set:function(t){this._labelColor!==t&&(this._labelColor=t,this._setLabelColor())},enumerable:!0,configurable:!0}),e.prototype._setLabelColor=function(){for(var t=0;t<this._groups.length;t++)for(var e=0;e<this._groups[t].selectors.length;e++)this._groups[t]._setSelectorLabelColor(e,this._labelColor)},Object.defineProperty(e.prototype,\"buttonBackground\",{get:function(){return this._buttonBackground},set:function(t){this._buttonBackground!==t&&(this._buttonBackground=t,this._setButtonBackground())},enumerable:!0,configurable:!0}),e.prototype._setButtonBackground=function(){for(var t=0;t<this._groups.length;t++)for(var e=0;e<this._groups[t].selectors.length;e++)this._groups[t]._setSelectorButtonBackground(e,this._buttonBackground)},Object.defineProperty(e.prototype,\"barColor\",{get:function(){return this._barColor},set:function(t){this._barColor!==t&&(this._barColor=t,this._setBarColor())},enumerable:!0,configurable:!0}),e.prototype._setBarColor=function(){for(var t=0;t<this._bars.length;t++)this._bars[t].children[0].background=this._barColor},Object.defineProperty(e.prototype,\"barHeight\",{get:function(){return this._barHeight},set:function(t){this._barHeight!==t&&(this._barHeight=t,this._setBarHeight())},enumerable:!0,configurable:!0}),e.prototype._setBarHeight=function(){for(var t=0;t<this._bars.length;t++)this._bars[t].children[0].height=this._barHeight},Object.defineProperty(e.prototype,\"spacerHeight\",{get:function(){return this._spacerHeight},set:function(t){this._spacerHeight!==t&&(this._spacerHeight=t,this._setSpacerHeight())},enumerable:!0,configurable:!0}),e.prototype._setSpacerHeight=function(){for(var t=0;t<this._bars.length;t++)this._bars[t].height=this._spacerHeight},e.prototype._addSpacer=function(){var t=new c.Container;t.width=1,t.height=this._spacerHeight,t.horizontalAlignment=s.Control.HORIZONTAL_ALIGNMENT_LEFT;var e=new o.Rectangle;e.width=1,e.height=this._barHeight,e.horizontalAlignment=s.Control.HORIZONTAL_ALIGNMENT_LEFT,e.verticalAlignment=s.Control.VERTICAL_ALIGNMENT_CENTER,e.background=this._barColor,e.color=\"transparent\",t.addControl(e),this._panel.addControl(t),this._bars.push(t)},e.prototype.addGroup=function(t){this._groups.length>0&&this._addSpacer(),this._panel.addControl(t.groupPanel),this._groups.push(t),t.groupPanel.children[0].color=this._headerColor;for(var e=0;e<t.selectors.length;e++)t._setSelectorButtonColor(e,this._buttonColor),t._setSelectorButtonBackground(e,this._buttonBackground)},e.prototype.removeGroup=function(t){if(!(t<0||t>=this._groups.length)){var e=this._groups[t];this._panel.removeControl(e.groupPanel),this._groups.splice(t,1),t<this._bars.length&&(this._panel.removeControl(this._bars[t]),this._bars.splice(t,1))}},e.prototype.setHeaderName=function(t,e){e<0||e>=this._groups.length||(this._groups[e].groupPanel.children[0].text=t)},e.prototype.relabel=function(t,e,i){if(!(e<0||e>=this._groups.length)){var r=this._groups[e];i<0||i>=r.selectors.length||r._setSelectorLabel(i,t)}},e.prototype.removeFromGroupSelector=function(t,e){if(!(t<0||t>=this._groups.length)){var i=this._groups[t];e<0||e>=i.selectors.length||i.removeSelector(e)}},e.prototype.addToGroupCheckbox=function(t,e,i,r){(void 0===i&&(i=function(){}),void 0===r&&(r=!1),t<0||t>=this._groups.length)||this._groups[t].addCheckbox(e,i,r)},e.prototype.addToGroupRadio=function(t,e,i,r){(void 0===i&&(i=function(){}),void 0===r&&(r=!1),t<0||t>=this._groups.length)||this._groups[t].addRadio(e,i,r)},e.prototype.addToGroupSlider=function(t,e,i,r,o,n,s,a){(void 0===i&&(i=function(){}),void 0===r&&(r=\"Units\"),void 0===o&&(o=0),void 0===n&&(n=0),void 0===s&&(s=0),void 0===a&&(a=function(t){return 0|t}),t<0||t>=this._groups.length)||this._groups[t].addSlider(e,i,r,o,n,s,a)},e}(o.Rectangle);e.SelectionPanel=y},function(t,e,i){\"use strict\";var r=this&&this.__extends||function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])})(e,i)};return function(e,i){function r(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}();Object.defineProperty(e,\"__esModule\",{value:!0});var o=i(6),n=i(0),s=i(16),a=function(){return function(){}}();e.KeyPropertySet=a;var h=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.onKeyPressObservable=new n.Observable,e.defaultButtonWidth=\"40px\",e.defaultButtonHeight=\"40px\",e.defaultButtonPaddingLeft=\"2px\",e.defaultButtonPaddingRight=\"2px\",e.defaultButtonPaddingTop=\"2px\",e.defaultButtonPaddingBottom=\"2px\",e.defaultButtonColor=\"#DDD\",e.defaultButtonBackground=\"#070707\",e.shiftButtonColor=\"#7799FF\",e.selectedShiftThickness=1,e.shiftState=0,e._currentlyConnectedInputText=null,e._connectedInputTexts=[],e._onKeyPressObserver=null,e}return r(e,t),e.prototype._getTypeName=function(){return\"VirtualKeyboard\"},e.prototype._createKey=function(t,e){var i=this,r=s.Button.CreateSimpleButton(t,t);return r.width=e&&e.width?e.width:this.defaultButtonWidth,r.height=e&&e.height?e.height:this.defaultButtonHeight,r.color=e&&e.color?e.color:this.defaultButtonColor,r.background=e&&e.background?e.background:this.defaultButtonBackground,r.paddingLeft=e&&e.paddingLeft?e.paddingLeft:this.defaultButtonPaddingLeft,r.paddingRight=e&&e.paddingRight?e.paddingRight:this.defaultButtonPaddingRight,r.paddingTop=e&&e.paddingTop?e.paddingTop:this.defaultButtonPaddingTop,r.paddingBottom=e&&e.paddingBottom?e.paddingBottom:this.defaultButtonPaddingBottom,r.thickness=0,r.isFocusInvisible=!0,r.shadowColor=this.shadowColor,r.shadowBlur=this.shadowBlur,r.shadowOffsetX=this.shadowOffsetX,r.shadowOffsetY=this.shadowOffsetY,r.onPointerUpObservable.add(function(){i.onKeyPressObservable.notifyObservers(t)}),r},e.prototype.addKeysRow=function(t,e){var i=new o.StackPanel;i.isVertical=!1,i.isFocusInvisible=!0;for(var r=0;r<t.length;r++){var n=null;e&&e.length===t.length&&(n=e[r]),i.addControl(this._createKey(t[r],n))}this.addControl(i)},e.prototype.applyShiftState=function(t){if(this.children)for(var e=0;e<this.children.length;e++){var i=this.children[e];if(i&&i.children)for(var r=i,o=0;o<r.children.length;o++){var n=r.children[o];if(n&&n.children[0]){var s=n.children[0];\"⇧\"===s.text&&(n.color=t?this.shiftButtonColor:this.defaultButtonColor,n.thickness=t>1?this.selectedShiftThickness:0),s.text=t>0?s.text.toUpperCase():s.text.toLowerCase()}}}},Object.defineProperty(e.prototype,\"connectedInputText\",{get:function(){return this._currentlyConnectedInputText},enumerable:!0,configurable:!0}),e.prototype.connect=function(t){var e=this;if(!this._connectedInputTexts.some(function(e){return e.input===t})){null===this._onKeyPressObserver&&(this._onKeyPressObserver=this.onKeyPressObservable.add(function(t){if(e._currentlyConnectedInputText){switch(e._currentlyConnectedInputText._host.focusedControl=e._currentlyConnectedInputText,t){case\"⇧\":return e.shiftState++,e.shiftState>2&&(e.shiftState=0),void e.applyShiftState(e.shiftState);case\"←\":return void e._currentlyConnectedInputText.processKey(8);case\"↵\":return void e._currentlyConnectedInputText.processKey(13)}e._currentlyConnectedInputText.processKey(-1,e.shiftState?t.toUpperCase():t),1===e.shiftState&&(e.shiftState=0,e.applyShiftState(e.shiftState))}})),this.isVisible=!1,this._currentlyConnectedInputText=t,t._connectedVirtualKeyboard=this;var i=t.onFocusObservable.add(function(){e._currentlyConnectedInputText=t,t._connectedVirtualKeyboard=e,e.isVisible=!0}),r=t.onBlurObservable.add(function(){t._connectedVirtualKeyboard=null,e._currentlyConnectedInputText=null,e.isVisible=!1});this._connectedInputTexts.push({input:t,onBlurObserver:r,onFocusObserver:i})}},e.prototype.disconnect=function(t){var e=this;if(t){var i=this._connectedInputTexts.filter(function(e){return e.input===t});1===i.length&&(this._removeConnectedInputObservables(i[0]),this._connectedInputTexts=this._connectedInputTexts.filter(function(e){return e.input!==t}),this._currentlyConnectedInputText===t&&(this._currentlyConnectedInputText=null))}else this._connectedInputTexts.forEach(function(t){e._removeConnectedInputObservables(t)}),this._connectedInputTexts=[];0===this._connectedInputTexts.length&&(this._currentlyConnectedInputText=null,this.onKeyPressObservable.remove(this._onKeyPressObserver),this._onKeyPressObserver=null)},e.prototype._removeConnectedInputObservables=function(t){t.input._connectedVirtualKeyboard=null,t.input.onFocusObservable.remove(t.onFocusObserver),t.input.onBlurObservable.remove(t.onBlurObserver)},e.prototype.dispose=function(){t.prototype.dispose.call(this),this.disconnect()},e.CreateDefaultLayout=function(t){var i=new e(t);return i.addKeysRow([\"1\",\"2\",\"3\",\"4\",\"5\",\"6\",\"7\",\"8\",\"9\",\"0\",\"←\"]),i.addKeysRow([\"q\",\"w\",\"e\",\"r\",\"t\",\"y\",\"u\",\"i\",\"o\",\"p\"]),i.addKeysRow([\"a\",\"s\",\"d\",\"f\",\"g\",\"h\",\"j\",\"k\",\"l\",\";\",\"'\",\"↵\"]),i.addKeysRow([\"⇧\",\"z\",\"x\",\"c\",\"v\",\"b\",\"n\",\"m\",\",\",\".\",\"/\"]),i.addKeysRow([\" \"],[{width:\"200px\"}]),i},e}(o.StackPanel);e.VirtualKeyboard=h},function(t,e,i){\"use strict\";var r=this&&this.__extends||function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])})(e,i)};return function(e,i){function r(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}();Object.defineProperty(e,\"__esModule\",{value:!0});var o=function(t){function e(e){var i=t.call(this,e)||this;return i.name=e,i._cellWidth=20,i._cellHeight=20,i._minorLineTickness=1,i._minorLineColor=\"DarkGray\",i._majorLineTickness=2,i._majorLineColor=\"White\",i._majorLineFrequency=5,i._background=\"Black\",i._displayMajorLines=!0,i._displayMinorLines=!0,i}return r(e,t),Object.defineProperty(e.prototype,\"displayMinorLines\",{get:function(){return this._displayMinorLines},set:function(t){this._displayMinorLines!==t&&(this._displayMinorLines=t,this._markAsDirty())},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,\"displayMajorLines\",{get:function(){return this._displayMajorLines},set:function(t){this._displayMajorLines!==t&&(this._displayMajorLines=t,this._markAsDirty())},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,\"background\",{get:function(){return this._background},set:function(t){this._background!==t&&(this._background=t,this._markAsDirty())},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,\"cellWidth\",{get:function(){return this._cellWidth},set:function(t){this._cellWidth=t,this._markAsDirty()},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,\"cellHeight\",{get:function(){return this._cellHeight},set:function(t){this._cellHeight=t,this._markAsDirty()},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,\"minorLineTickness\",{get:function(){return this._minorLineTickness},set:function(t){this._minorLineTickness=t,this._markAsDirty()},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,\"minorLineColor\",{get:function(){return this._minorLineColor},set:function(t){this._minorLineColor=t,this._markAsDirty()},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,\"majorLineTickness\",{get:function(){return this._majorLineTickness},set:function(t){this._majorLineTickness=t,this._markAsDirty()},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,\"majorLineColor\",{get:function(){return this._majorLineColor},set:function(t){this._majorLineColor=t,this._markAsDirty()},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,\"majorLineFrequency\",{get:function(){return this._majorLineFrequency},set:function(t){this._majorLineFrequency=t,this._markAsDirty()},enumerable:!0,configurable:!0}),e.prototype._draw=function(t,e){if(e.save(),this._applyStates(e),this._isEnabled&&this._processMeasures(t,e)){this._background&&(e.fillStyle=this._background,e.fillRect(this._currentMeasure.left,this._currentMeasure.top,this._currentMeasure.width,this._currentMeasure.height));var i=this._currentMeasure.width/this._cellWidth,r=this._currentMeasure.height/this._cellHeight,o=this._currentMeasure.left+this._currentMeasure.width/2,n=this._currentMeasure.top+this._currentMeasure.height/2;if(this._displayMinorLines){e.strokeStyle=this._minorLineColor,e.lineWidth=this._minorLineTickness;for(var s=-i/2;s<i/2;s++){var a=o+s*this.cellWidth;e.beginPath(),e.moveTo(a,this._currentMeasure.top),e.lineTo(a,this._currentMeasure.top+this._currentMeasure.height),e.stroke()}for(var h=-r/2;h<r/2;h++){var l=n+h*this.cellHeight;e.beginPath(),e.moveTo(this._currentMeasure.left,l),e.lineTo(this._currentMeasure.left+this._currentMeasure.width,l),e.stroke()}}if(this._displayMajorLines){e.strokeStyle=this._majorLineColor,e.lineWidth=this._majorLineTickness;for(s=-i/2+this._majorLineFrequency;s<i/2;s+=this._majorLineFrequency){a=o+s*this.cellWidth;e.beginPath(),e.moveTo(a,this._currentMeasure.top),e.lineTo(a,this._currentMeasure.top+this._currentMeasure.height),e.stroke()}for(h=-r/2+this._majorLineFrequency;h<r/2;h+=this._majorLineFrequency){l=n+h*this.cellHeight;e.moveTo(this._currentMeasure.left,l),e.lineTo(this._currentMeasure.left+this._currentMeasure.width,l),e.closePath(),e.stroke()}}}e.restore()},e.prototype._getTypeName=function(){return\"DisplayGrid\"},e}(i(9).Control);e.DisplayGrid=o},function(t,e,i){\"use strict\";Object.defineProperty(e,\"__esModule\",{value:!0});var r=i(1),o=i(6),n=i(5);e.name=\"Statics\",r.Control.AddHeader=function(t,e,i,s){var a=new o.StackPanel(\"panel\"),h=!s||s.isHorizontal,l=!s||s.controlFirst;a.isVertical=!h;var u=new n.TextBlock(\"header\");return u.text=e,u.textHorizontalAlignment=r.Control.HORIZONTAL_ALIGNMENT_LEFT,h?u.width=i:u.height=i,l?(a.addControl(t),a.addControl(u),u.paddingLeft=\"5px\"):(a.addControl(u),a.addControl(t),u.paddingRight=\"5px\"),u.shadowBlur=t.shadowBlur,u.shadowColor=t.shadowColor,u.shadowOffsetX=t.shadowOffsetX,u.shadowOffsetY=t.shadowOffsetY,a}},function(t,e,i){\"use strict\";function r(t){for(var i in t)e.hasOwnProperty(i)||(e[i]=t[i])}Object.defineProperty(e,\"__esModule\",{value:!0}),r(i(41)),r(i(52)),r(i(53)),r(i(25))},function(t,e,i){\"use strict\";function r(t){for(var i in t)e.hasOwnProperty(i)||(e[i]=t[i])}Object.defineProperty(e,\"__esModule\",{value:!0}),r(i(24)),r(i(14)),r(i(3)),r(i(13)),r(i(42)),r(i(43)),r(i(47)),r(i(48)),r(i(49)),r(i(50)),r(i(51)),r(i(8))},function(t,e,i){\"use strict\";var r=this&&this.__extends||function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])})(e,i)};return function(e,i){function r(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}();Object.defineProperty(e,\"__esModule\",{value:!0});var o=i(8),n=i(0),s=i(3),a=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e._radius=5,e}return r(e,t),Object.defineProperty(e.prototype,\"radius\",{get:function(){return this._radius},set:function(t){var e=this;this._radius!==t&&(this._radius=t,n.Tools.SetImmediate(function(){e._arrangeChildren()}))},enumerable:!0,configurable:!0}),e.prototype._mapGridNode=function(t,e){var i=t.mesh;if(i){var r=this._cylindricalMapping(e);switch(t.position=r,this.orientation){case s.Container3D.FACEORIGIN_ORIENTATION:i.lookAt(new BABYLON.Vector3(-r.x,r.y,-r.z));break;case s.Container3D.FACEORIGINREVERSED_ORIENTATION:i.lookAt(new BABYLON.Vector3(2*r.x,r.y,2*r.z));break;case s.Container3D.FACEFORWARD_ORIENTATION:break;case s.Container3D.FACEFORWARDREVERSED_ORIENTATION:i.rotate(BABYLON.Axis.Y,Math.PI,BABYLON.Space.LOCAL)}}},e.prototype._cylindricalMapping=function(t){var e=new n.Vector3(0,t.y,this._radius),i=t.x/this._radius;return n.Matrix.RotationYawPitchRollToRef(i,0,0,n.Tmp.Matrix[0]),n.Vector3.TransformNormal(e,n.Tmp.Matrix[0])},e}(o.VolumeBasedPanel);e.CylinderPanel=a},function(t,e,i){\"use strict\";var r=this&&this.__extends||function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])})(e,i)};return function(e,i){function r(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}();Object.defineProperty(e,\"__esModule\",{value:!0});var o=i(14),n=i(0),s=i(26),a=i(6),h=i(11),l=i(5),u=i(12),c=function(t){function e(e,i){void 0===i&&(i=!0);var r=t.call(this,e)||this;return r._shareMaterials=!0,r._shareMaterials=i,r.pointerEnterAnimation=function(){r.mesh&&r._frontPlate.setEnabled(!0)},r.pointerOutAnimation=function(){r.mesh&&r._frontPlate.setEnabled(!1)},r}return r(e,t),e.prototype._disposeTooltip=function(){this._tooltipFade=null,this._tooltipTextBlock&&this._tooltipTextBlock.dispose(),this._tooltipTexture&&this._tooltipTexture.dispose(),this._tooltipMesh&&this._tooltipMesh.dispose(),this.onPointerEnterObservable.remove(this._tooltipHoverObserver),this.onPointerOutObservable.remove(this._tooltipOutObserver)},Object.defineProperty(e.prototype,\"tooltipText\",{get:function(){return this._tooltipTextBlock?this._tooltipTextBlock.text:null},set:function(t){var e=this;if(t){if(!this._tooltipFade){this._tooltipMesh=BABYLON.MeshBuilder.CreatePlane(\"\",{size:1},this._backPlate._scene);var i=BABYLON.MeshBuilder.CreatePlane(\"\",{size:1,sideOrientation:BABYLON.Mesh.DOUBLESIDE},this._backPlate._scene),r=new n.StandardMaterial(\"\",this._backPlate._scene);r.diffuseColor=BABYLON.Color3.FromHexString(\"#212121\"),i.material=r,i.isPickable=!1,this._tooltipMesh.addChild(i),i.position.z=.05,this._tooltipMesh.scaling.y=1/3,this._tooltipMesh.position.y=.7,this._tooltipMesh.position.z=-.15,this._tooltipMesh.isPickable=!1,this._tooltipMesh.parent=this._backPlate,this._tooltipTexture=u.AdvancedDynamicTexture.CreateForMesh(this._tooltipMesh),this._tooltipTextBlock=new l.TextBlock,this._tooltipTextBlock.scaleY=3,this._tooltipTextBlock.color=\"white\",this._tooltipTextBlock.fontSize=130,this._tooltipTexture.addControl(this._tooltipTextBlock),this._tooltipFade=new BABYLON.FadeInOutBehavior,this._tooltipFade.delay=500,this._tooltipMesh.addBehavior(this._tooltipFade),this._tooltipHoverObserver=this.onPointerEnterObservable.add(function(){e._tooltipFade&&e._tooltipFade.fadeIn(!0)}),this._tooltipOutObserver=this.onPointerOutObservable.add(function(){e._tooltipFade&&e._tooltipFade.fadeIn(!1)})}this._tooltipTextBlock&&(this._tooltipTextBlock.text=t)}else this._disposeTooltip()},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,\"text\",{get:function(){return this._text},set:function(t){this._text!==t&&(this._text=t,this._rebuildContent())},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,\"imageUrl\",{get:function(){return this._imageUrl},set:function(t){this._imageUrl!==t&&(this._imageUrl=t,this._rebuildContent())},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,\"backMaterial\",{get:function(){return this._backMaterial},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,\"frontMaterial\",{get:function(){return this._frontMaterial},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,\"plateMaterial\",{get:function(){return this._plateMaterial},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,\"shareMaterials\",{get:function(){return this._shareMaterials},enumerable:!0,configurable:!0}),e.prototype._getTypeName=function(){return\"HolographicButton\"},e.prototype._rebuildContent=function(){this._disposeFacadeTexture();var t=new a.StackPanel;if(t.isVertical=!0,this._imageUrl){var e=new h.Image;e.source=this._imageUrl,e.paddingTop=\"40px\",e.height=\"180px\",e.width=\"100px\",e.paddingBottom=\"40px\",t.addControl(e)}if(this._text){var i=new l.TextBlock;i.text=this._text,i.color=\"white\",i.height=\"30px\",i.fontSize=24,t.addControl(i)}this._frontPlate&&(this.content=t)},e.prototype._createNode=function(e){return this._backPlate=n.MeshBuilder.CreateBox(this.name+\"BackMesh\",{width:1,height:1,depth:.08},e),this._frontPlate=n.MeshBuilder.CreateBox(this.name+\"FrontMesh\",{width:1,height:1,depth:.08},e),this._frontPlate.parent=this._backPlate,this._frontPlate.position.z=-.08,this._frontPlate.isPickable=!1,this._frontPlate.setEnabled(!1),this._textPlate=t.prototype._createNode.call(this,e),this._textPlate.parent=this._backPlate,this._textPlate.position.z=-.08,this._textPlate.isPickable=!1,this._backPlate},e.prototype._applyFacade=function(t){this._plateMaterial.emissiveTexture=t,this._plateMaterial.opacityTexture=t},e.prototype._createBackMaterial=function(t){var e=this;this._backMaterial=new s.FluentMaterial(this.name+\"Back Material\",t.getScene()),this._backMaterial.renderHoverLight=!0,this._pickedPointObserver=this._host.onPickedPointChangedObservable.add(function(t){t?(e._backMaterial.hoverPosition=t,e._backMaterial.hoverColor.a=1):e._backMaterial.hoverColor.a=0})},e.prototype._createFrontMaterial=function(t){this._frontMaterial=new s.FluentMaterial(this.name+\"Front Material\",t.getScene()),this._frontMaterial.innerGlowColorIntensity=0,this._frontMaterial.alpha=.5,this._frontMaterial.renderBorders=!0},e.prototype._createPlateMaterial=function(t){this._plateMaterial=new n.StandardMaterial(this.name+\"Plate Material\",t.getScene()),this._plateMaterial.specularColor=n.Color3.Black()},e.prototype._affectMaterial=function(t){this._shareMaterials?(this._host._sharedMaterials.backFluentMaterial?this._backMaterial=this._host._sharedMaterials.backFluentMaterial:(this._createBackMaterial(t),this._host._sharedMaterials.backFluentMaterial=this._backMaterial),this._host._sharedMaterials.frontFluentMaterial?this._frontMaterial=this._host._sharedMaterials.frontFluentMaterial:(this._createFrontMaterial(t),this._host._sharedMaterials.frontFluentMaterial=this._frontMaterial)):(this._createBackMaterial(t),this._createFrontMaterial(t)),this._createPlateMaterial(t),this._backPlate.material=this._backMaterial,this._frontPlate.material=this._frontMaterial,this._textPlate.material=this._plateMaterial,this._rebuildContent()},e.prototype.dispose=function(){t.prototype.dispose.call(this),this._disposeTooltip(),this.shareMaterials||(this._backMaterial.dispose(),this._frontMaterial.dispose(),this._plateMaterial.dispose(),this._pickedPointObserver&&(this._host.onPickedPointChangedObservable.remove(this._pickedPointObserver),this._pickedPointObserver=null))},e}(o.Button3D);e.HolographicButton=c},function(t,e,i){\"use strict\";Object.defineProperty(e,\"__esModule\",{value:!0});var r=i(0),o=i(45);e.fShader=o;var n=i(46);e.vShader=n,e.registerShader=function(){r.Effect.ShadersStore.fluentVertexShader=n,r.Effect.ShadersStore.fluentPixelShader=o}},function(t,e){t.exports=\"precision highp float;\\nvarying vec2 vUV;\\nuniform vec4 albedoColor;\\n#ifdef INNERGLOW\\nuniform vec4 innerGlowColor;\\n#endif\\n#ifdef BORDER\\nvarying vec2 scaleInfo;\\nuniform float edgeSmoothingValue;\\nuniform float borderMinValue;\\n#endif\\n#ifdef HOVERLIGHT\\nvarying vec3 worldPosition;\\nuniform vec3 hoverPosition;\\nuniform vec4 hoverColor;\\nuniform float hoverRadius;\\n#endif\\n#ifdef TEXTURE\\nuniform sampler2D albedoSampler;\\n#endif\\nvoid main(void) {\\nvec3 albedo=albedoColor.rgb;\\nfloat alpha=albedoColor.a;\\n#ifdef TEXTURE\\nalbedo=texture2D(albedoSampler,vUV).rgb;\\n#endif\\n#ifdef HOVERLIGHT\\nfloat pointToHover=(1.0-clamp(length(hoverPosition-worldPosition)/hoverRadius,0.,1.))*hoverColor.a;\\nalbedo=clamp(albedo+hoverColor.rgb*pointToHover,0.,1.);\\n#else\\nfloat pointToHover=1.0;\\n#endif\\n#ifdef BORDER \\nfloat borderPower=10.0;\\nfloat inverseBorderPower=1.0/borderPower;\\nvec3 borderColor=albedo*borderPower;\\nvec2 distanceToEdge;\\ndistanceToEdge.x=abs(vUV.x-0.5)*2.0;\\ndistanceToEdge.y=abs(vUV.y-0.5)*2.0;\\nfloat borderValue=max(smoothstep(scaleInfo.x-edgeSmoothingValue,scaleInfo.x+edgeSmoothingValue,distanceToEdge.x),\\nsmoothstep(scaleInfo.y-edgeSmoothingValue,scaleInfo.y+edgeSmoothingValue,distanceToEdge.y));\\nborderColor=borderColor*borderValue*max(borderMinValue*inverseBorderPower,pointToHover); \\nalbedo+=borderColor;\\nalpha=max(alpha,borderValue);\\n#endif\\n#ifdef INNERGLOW\\n\\nvec2 uvGlow=(vUV-vec2(0.5,0.5))*(innerGlowColor.a*2.0);\\nuvGlow=uvGlow*uvGlow;\\nuvGlow=uvGlow*uvGlow;\\nalbedo+=mix(vec3(0.0,0.0,0.0),innerGlowColor.rgb,uvGlow.x+uvGlow.y); \\n#endif\\ngl_FragColor=vec4(albedo,alpha);\\n}\"},function(t,e){t.exports=\"precision highp float;\\n\\nattribute vec3 position;\\nattribute vec3 normal;\\nattribute vec2 uv;\\n\\nuniform mat4 world;\\nuniform mat4 viewProjection;\\nvarying vec2 vUV;\\n#ifdef BORDER\\nvarying vec2 scaleInfo;\\nuniform float borderWidth;\\nuniform vec3 scaleFactor;\\n#endif\\n#ifdef HOVERLIGHT\\nvarying vec3 worldPosition;\\n#endif\\nvoid main(void) {\\nvUV=uv;\\n#ifdef BORDER\\nvec3 scale=scaleFactor;\\nfloat minScale=min(min(scale.x,scale.y),scale.z);\\nfloat maxScale=max(max(scale.x,scale.y),scale.z);\\nfloat minOverMiddleScale=minScale/(scale.x+scale.y+scale.z-minScale-maxScale);\\nfloat areaYZ=scale.y*scale.z;\\nfloat areaXZ=scale.x*scale.z;\\nfloat areaXY=scale.x*scale.y;\\nfloat scaledBorderWidth=borderWidth; \\nif (abs(normal.x) == 1.0) \\n{\\nscale.x=scale.y;\\nscale.y=scale.z;\\nif (areaYZ>areaXZ && areaYZ>areaXY)\\n{\\nscaledBorderWidth*=minOverMiddleScale;\\n}\\n}\\nelse if (abs(normal.y) == 1.0) \\n{\\nscale.x=scale.z;\\nif (areaXZ>areaXY && areaXZ>areaYZ)\\n{\\nscaledBorderWidth*=minOverMiddleScale;\\n}\\n}\\nelse \\n{\\nif (areaXY>areaYZ && areaXY>areaXZ)\\n{\\nscaledBorderWidth*=minOverMiddleScale;\\n}\\n}\\nfloat scaleRatio=min(scale.x,scale.y)/max(scale.x,scale.y);\\nif (scale.x>scale.y)\\n{\\nscaleInfo.x=1.0-(scaledBorderWidth*scaleRatio);\\nscaleInfo.y=1.0-scaledBorderWidth;\\n}\\nelse\\n{\\nscaleInfo.x=1.0-scaledBorderWidth;\\nscaleInfo.y=1.0-(scaledBorderWidth*scaleRatio);\\n} \\n#endif \\nvec4 worldPos=world*vec4(position,1.0);\\n#ifdef HOVERLIGHT\\nworldPosition=worldPos.xyz;\\n#endif\\ngl_Position=viewProjection*worldPos;\\n}\\n\"},function(t,e,i){\"use strict\";var r=this&&this.__extends||function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])})(e,i)};return function(e,i){function r(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}();Object.defineProperty(e,\"__esModule\",{value:!0});var o=function(t){function e(e,i){var r=t.call(this,i)||this;return r._currentMesh=e,r.pointerEnterAnimation=function(){r.mesh&&r.mesh.scaling.scaleInPlace(1.1)},r.pointerOutAnimation=function(){r.mesh&&r.mesh.scaling.scaleInPlace(1/1.1)},r.pointerDownAnimation=function(){r.mesh&&r.mesh.scaling.scaleInPlace(.95)},r.pointerUpAnimation=function(){r.mesh&&r.mesh.scaling.scaleInPlace(1/.95)},r}return r(e,t),e.prototype._getTypeName=function(){return\"MeshButton3D\"},e.prototype._createNode=function(t){var e=this;return this._currentMesh.getChildMeshes().forEach(function(t){t.metadata=e}),this._currentMesh},e.prototype._affectMaterial=function(t){},e}(i(14).Button3D);e.MeshButton3D=o},function(t,e,i){\"use strict\";var r=this&&this.__extends||function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])})(e,i)};return function(e,i){function r(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}();Object.defineProperty(e,\"__esModule\",{value:!0});var o=i(0),n=i(3),s=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return r(e,t),e.prototype._mapGridNode=function(t,e){var i=t.mesh;if(i){t.position=e.clone();var r=o.Tmp.Vector3[0];switch(r.copyFrom(e),this.orientation){case n.Container3D.FACEORIGIN_ORIENTATION:case n.Container3D.FACEFORWARD_ORIENTATION:r.addInPlace(new BABYLON.Vector3(0,0,-1)),i.lookAt(r);break;case n.Container3D.FACEFORWARDREVERSED_ORIENTATION:case n.Container3D.FACEORIGINREVERSED_ORIENTATION:r.addInPlace(new BABYLON.Vector3(0,0,1)),i.lookAt(r)}}},e}(i(8).VolumeBasedPanel);e.PlanePanel=s},function(t,e,i){\"use strict\";var r=this&&this.__extends||function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])})(e,i)};return function(e,i){function r(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}();Object.defineProperty(e,\"__esModule\",{value:!0});var o=i(8),n=i(0),s=i(3),a=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e._iteration=100,e}return r(e,t),Object.defineProperty(e.prototype,\"iteration\",{get:function(){return this._iteration},set:function(t){var e=this;this._iteration!==t&&(this._iteration=t,n.Tools.SetImmediate(function(){e._arrangeChildren()}))},enumerable:!0,configurable:!0}),e.prototype._mapGridNode=function(t,e){var i=t.mesh,r=this._scatterMapping(e);if(i){switch(this.orientation){case s.Container3D.FACEORIGIN_ORIENTATION:case s.Container3D.FACEFORWARD_ORIENTATION:i.lookAt(new n.Vector3(0,0,-1));break;case s.Container3D.FACEFORWARDREVERSED_ORIENTATION:case s.Container3D.FACEORIGINREVERSED_ORIENTATION:i.lookAt(new n.Vector3(0,0,1))}t.position=r}},e.prototype._scatterMapping=function(t){return t.x=(1-2*Math.random())*this._cellWidth,t.y=(1-2*Math.random())*this._cellHeight,t},e.prototype._finalProcessing=function(){for(var t=[],e=0,i=this._children;e<i.length;e++){var r=i[e];r.mesh&&t.push(r.mesh)}for(var o=0;o<this._iteration;o++){t.sort(function(t,e){var i=t.position.lengthSquared(),r=e.position.lengthSquared();return i<r?1:i>r?-1:0});for(var s=Math.pow(this.margin,2),a=Math.max(this._cellWidth,this._cellHeight),h=n.Tmp.Vector2[0],l=n.Tmp.Vector3[0],u=0;u<t.length-1;u++)for(var c=u+1;c<t.length;c++)if(u!=c){t[c].position.subtractToRef(t[u].position,l),h.x=l.x,h.y=l.y;var _=a,f=h.lengthSquared()-s;(f-=Math.min(f,s))<Math.pow(_,2)&&(h.normalize(),l.scaleInPlace(.5*(_-Math.sqrt(f))),t[c].position.addInPlace(l),t[u].position.subtractInPlace(l))}}},e}(o.VolumeBasedPanel);e.ScatterPanel=a},function(t,e,i){\"use strict\";var r=this&&this.__extends||function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])})(e,i)};return function(e,i){function r(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}();Object.defineProperty(e,\"__esModule\",{value:!0});var o=i(8),n=i(0),s=i(3),a=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e._radius=5,e}return r(e,t),Object.defineProperty(e.prototype,\"radius\",{get:function(){return this._radius},set:function(t){var e=this;this._radius!==t&&(this._radius=t,n.Tools.SetImmediate(function(){e._arrangeChildren()}))},enumerable:!0,configurable:!0}),e.prototype._mapGridNode=function(t,e){var i=t.mesh;if(i){var r=this._sphericalMapping(e);switch(t.position=r,this.orientation){case s.Container3D.FACEORIGIN_ORIENTATION:i.lookAt(new BABYLON.Vector3(-r.x,-r.y,-r.z));break;case s.Container3D.FACEORIGINREVERSED_ORIENTATION:i.lookAt(new BABYLON.Vector3(2*r.x,2*r.y,2*r.z));break;case s.Container3D.FACEFORWARD_ORIENTATION:break;case s.Container3D.FACEFORWARDREVERSED_ORIENTATION:i.rotate(BABYLON.Axis.Y,Math.PI,BABYLON.Space.LOCAL)}}},e.prototype._sphericalMapping=function(t){var e=new n.Vector3(0,0,this._radius),i=t.y/this._radius,r=-t.x/this._radius;return n.Matrix.RotationYawPitchRollToRef(r,i,0,n.Tmp.Matrix[0]),n.Vector3.TransformNormal(e,n.Tmp.Matrix[0])},e}(o.VolumeBasedPanel);e.SpherePanel=a},function(t,e,i){\"use strict\";var r=this&&this.__extends||function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])})(e,i)};return function(e,i){function r(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}();Object.defineProperty(e,\"__esModule\",{value:!0});var o=i(3),n=i(0),s=function(t){function e(e){void 0===e&&(e=!1);var i=t.call(this)||this;return i._isVertical=!1,i.margin=.1,i._isVertical=e,i}return r(e,t),Object.defineProperty(e.prototype,\"isVertical\",{get:function(){return this._isVertical},set:function(t){var e=this;this._isVertical!==t&&(this._isVertical=t,n.Tools.SetImmediate(function(){e._arrangeChildren()}))},enumerable:!0,configurable:!0}),e.prototype._arrangeChildren=function(){for(var t,e=0,i=0,r=0,o=[],s=n.Matrix.Invert(this.node.computeWorldMatrix(!0)),a=0,h=this._children;a<h.length;a++){if((p=h[a]).mesh){r++,p.mesh.computeWorldMatrix(!0),p.mesh.getWorldMatrix().multiplyToRef(s,n.Tmp.Matrix[0]);var l=p.mesh.getBoundingInfo().boundingBox,u=n.Vector3.TransformNormal(l.extendSize,n.Tmp.Matrix[0]);o.push(u),this._isVertical?i+=u.y:e+=u.x}}this._isVertical?i+=(r-1)*this.margin/2:e+=(r-1)*this.margin/2,t=this._isVertical?-i:-e;for(var c=0,_=0,f=this._children;_<f.length;_++){var p;if((p=f[_]).mesh){r--;u=o[c++];this._isVertical?(p.position.y=t+u.y,p.position.x=0,t+=2*u.y):(p.position.x=t+u.x,p.position.y=0,t+=2*u.x),t+=r>0?this.margin:0}}},e}(o.Container3D);e.StackPanel3D=s},function(t,e,i){\"use strict\";Object.defineProperty(e,\"__esModule\",{value:!0}),function(t){for(var i in t)e.hasOwnProperty(i)||(e[i]=t[i])}(i(26))},function(t,e,i){\"use strict\";Object.defineProperty(e,\"__esModule\",{value:!0});var r=i(0),o=i(3),n=function(){function t(t){var e=this;this._lastControlOver={},this._lastControlDown={},this.onPickedPointChangedObservable=new r.Observable,this._sharedMaterials={},this._scene=t||r.Engine.LastCreatedScene,this._sceneDisposeObserver=this._scene.onDisposeObservable.add(function(){e._sceneDisposeObserver=null,e._utilityLayer=null,e.dispose()}),this._utilityLayer=new r.UtilityLayerRenderer(this._scene),this._utilityLayer.onlyCheckPointerDownEvents=!1,this._utilityLayer.mainSceneTrackerPredicate=function(t){return t&&t.metadata&&t.metadata._node},this._rootContainer=new o.Container3D(\"RootContainer\"),this._rootContainer._host=this;var i=this._utilityLayer.utilityLayerScene;this._pointerOutObserver=this._utilityLayer.onPointerOutObservable.add(function(t){e._handlePointerOut(t,!0)}),this._pointerObserver=i.onPointerObservable.add(function(t,i){e._doPicking(t)}),this._utilityLayer.utilityLayerScene.autoClear=!1,this._utilityLayer.utilityLayerScene.autoClearDepthAndStencil=!1,new r.HemisphericLight(\"hemi\",r.Vector3.Up(),this._utilityLayer.utilityLayerScene)}return Object.defineProperty(t.prototype,\"scene\",{get:function(){return this._scene},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,\"utilityLayer\",{get:function(){return this._utilityLayer},enumerable:!0,configurable:!0}),t.prototype._handlePointerOut=function(t,e){var i=this._lastControlOver[t];i&&(i._onPointerOut(i),delete this._lastControlOver[t]),e&&this._lastControlDown[t]&&(this._lastControlDown[t].forcePointerUp(),delete this._lastControlDown[t]),this.onPickedPointChangedObservable.notifyObservers(null)},t.prototype._doPicking=function(t){if(!this._utilityLayer||!this._utilityLayer.utilityLayerScene.activeCamera)return!1;var e=t.event,i=e.pointerId||0,o=e.button,n=t.pickInfo;if(!n||!n.hit)return this._handlePointerOut(i,t.type===r.PointerEventTypes.POINTERUP),!1;var s=n.pickedMesh.metadata;return n.pickedPoint&&this.onPickedPointChangedObservable.notifyObservers(n.pickedPoint),s._processObservables(t.type,n.pickedPoint,i,o)||t.type===r.PointerEventTypes.POINTERMOVE&&(this._lastControlOver[i]&&this._lastControlOver[i]._onPointerOut(this._lastControlOver[i]),delete this._lastControlOver[i]),t.type===r.PointerEventTypes.POINTERUP&&(this._lastControlDown[e.pointerId]&&(this._lastControlDown[e.pointerId].forcePointerUp(),delete this._lastControlDown[e.pointerId]),\"touch\"===e.pointerType&&this._handlePointerOut(i,!1)),!0},Object.defineProperty(t.prototype,\"rootContainer\",{get:function(){return this._rootContainer},enumerable:!0,configurable:!0}),t.prototype.containsControl=function(t){return this._rootContainer.containsControl(t)},t.prototype.addControl=function(t){return this._rootContainer.addControl(t),this},t.prototype.removeControl=function(t){return this._rootContainer.removeControl(t),this},t.prototype.dispose=function(){for(var t in this._rootContainer.dispose(),this._sharedMaterials)this._sharedMaterials.hasOwnProperty(t)&&this._sharedMaterials[t].dispose();this._sharedMaterials={},this._pointerOutObserver&&this._utilityLayer&&(this._utilityLayer.onPointerOutObservable.remove(this._pointerOutObserver),this._pointerOutObserver=null),this.onPickedPointChangedObservable.clear();var e=this._utilityLayer?this._utilityLayer.utilityLayerScene:null;e&&this._pointerObserver&&(e.onPointerObservable.remove(this._pointerObserver),this._pointerObserver=null),this._scene&&this._sceneDisposeObserver&&(this._scene.onDisposeObservable.remove(this._sceneDisposeObserver),this._sceneDisposeObserver=null),this._utilityLayer&&this._utilityLayer.dispose()},t}();e.GUI3DManager=n}])});\n//# sourceMappingURL=babylon.gui.min.js.map","!(function(e,t){var i=[],r=e.CANNON||this.CANNON,n=e.OIMO||this.OIMO,o=e.earcut||this.earcut;if(\"object\"==typeof exports&&\"object\"==typeof module){try{r=r||require(\"cannon\")}catch(e){}try{n=n||require(\"oimo\")}catch(e){}try{o=o||require(\"earcut\")}catch(e){}module.exports=t(r,n,o)}else if(\"function\"==typeof define&&define.amd)require.specified&&require.specified(\"cannon\")&&i.push(\"cannon\"),require.specified&&require.specified(\"oimo\")&&i.push(\"oimo\"),require.specified&&require.specified(\"earcut\")&&i.push(\"earcut\"),define(\"babylonjs\",i,t);else if(\"object\"==typeof exports){try{r=r||require(\"cannon\")}catch(e){}try{n=n||require(\"oimo\")}catch(e){}try{o=o||require(\"earcut\")}catch(e){}exports.babylonjs=t(r,n,o)}else e.BABYLON=t(r,n,o)})(this,(function(i,t,m){i=i||this.CANNON,t=t||this.OIMO,m=m||this.earcut;var r,e,n,o,s,a,l,c,h,u,d,f,p,_,g,v,b=this&&this.__decorate||function(e,t,i,r){var n,o=arguments.length,s=o<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,i):r;if(\"object\"==typeof Reflect&&\"function\"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,r);else for(var a=e.length-1;0<=a;a--)(n=e[a])&&(s=(o<3?n(s):3<o?n(t,i,s):n(t,i))||s);return 3<o&&s&&Object.defineProperty(t,i,s),s},T=this&&this.__extends||(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])},function(e,t){function i(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(i.prototype=t.prototype,new i)});!(function(b){var e=(function(){function e(){this._defines={},this._currentRank=32,this._maxRank=-1}return e.prototype.unBindMesh=function(){this._mesh=null},e.prototype.addFallback=function(e,t){this._defines[e]||(e<this._currentRank&&(this._currentRank=e),e>this._maxRank&&(this._maxRank=e),this._defines[e]=new Array),this._defines[e].push(t)},e.prototype.addCPUSkinningFallback=function(e,t){this._mesh=t,e<this._currentRank&&(this._currentRank=e),e>this._maxRank&&(this._maxRank=e)},Object.defineProperty(e.prototype,\"isMoreFallbacks\",{get:function(){return this._currentRank<=this._maxRank},enumerable:!0,configurable:!0}),e.prototype.reduce=function(e,t){if(this._mesh&&this._mesh.computeBonesUsingShaders&&0<this._mesh.numBoneInfluencers&&this._mesh.material){this._mesh.computeBonesUsingShaders=!1,e=e.replace(\"#define NUM_BONE_INFLUENCERS \"+this._mesh.numBoneInfluencers,\"#define NUM_BONE_INFLUENCERS 0\"),t._bonesComputationForcedToCPU=!0;for(var i=this._mesh.getScene(),r=0;r<i.meshes.length;r++){var n=i.meshes[r];if(n.material&&(n.computeBonesUsingShaders&&0!==n.numBoneInfluencers))if(n.material.getEffect()===t)n.computeBonesUsingShaders=!1;else if(n.subMeshes)for(var o=0,s=n.subMeshes;o<s.length;o++){if(s[o].effect===t){n.computeBonesUsingShaders=!1;break}}}}else{var a=this._defines[this._currentRank];if(a)for(r=0;r<a.length;r++)e=e.replace(\"#define \"+a[r],\"\");this._currentRank++}return e},e})();b.EffectFallbacks=e;var t=function(){};b.EffectCreationOptions=t;var i=(function(){function y(n,e,t,i,r,o,s,a,l,c){void 0===i&&(i=null),void 0===o&&(o=null),void 0===s&&(s=null),void 0===a&&(a=null),void 0===l&&(l=null);var h,u,d=this;if(this.uniqueId=0,this.onCompileObservable=new b.Observable,this.onErrorObservable=new b.Observable,this._bonesComputationForcedToCPU=!1,this._uniformBuffersNames={},this._isReady=!1,this._compilationError=\"\",this.name=n,e.attributes){var f=e;if(this._engine=t,this._attributesNames=f.attributes,this._uniformsNames=f.uniformsNames.concat(f.samplers),this._samplers=f.samplers.slice(),this.defines=f.defines,this.onError=f.onError,this.onCompiled=f.onCompiled,this._fallbacks=f.fallbacks,this._indexParameters=f.indexParameters,this._transformFeedbackVaryings=f.transformFeedbackVaryings,f.uniformBuffersNames)for(var p=0;p<f.uniformBuffersNames.length;p++)this._uniformBuffersNames[f.uniformBuffersNames[p]]=p}else this._engine=r,this.defines=o,this._uniformsNames=t.concat(i),this._samplers=i?i.slice():[],this._attributesNames=e,this.onError=l,this.onCompiled=a,this._indexParameters=c,this._fallbacks=s;this.uniqueId=y._uniqueIdSeed++,n.vertexElement?(h=document.getElementById(n.vertexElement))||(h=n.vertexElement):h=n.vertex||n,n.fragmentElement?(u=document.getElementById(n.fragmentElement))||(u=n.fragmentElement):u=n.fragment||n,this._loadVertexShader(h,(function(e){d._processIncludes(e,(function(e){d._processShaderConversion(e,!1,(function(r){d._loadFragmentShader(u,(function(e){d._processIncludes(e,(function(e){d._processShaderConversion(e,!0,(function(e){if(n){var t=n.vertexElement||n.vertex||n,i=n.fragmentElement||n.fragment||n;d._vertexSourceCode=\"#define SHADER_NAME vertex:\"+t+\"\\n\"+r,d._fragmentSourceCode=\"#define SHADER_NAME fragment:\"+i+\"\\n\"+e}else d._vertexSourceCode=r,d._fragmentSourceCode=e;d._prepareEffect()}))}))}))}))}))}))}return Object.defineProperty(y.prototype,\"onBindObservable\",{get:function(){return this._onBindObservable||(this._onBindObservable=new b.Observable),this._onBindObservable},enumerable:!0,configurable:!0}),Object.defineProperty(y.prototype,\"key\",{get:function(){return this._key},enumerable:!0,configurable:!0}),y.prototype.isReady=function(){return this._isReady},y.prototype.getEngine=function(){return this._engine},y.prototype.getProgram=function(){return this._program},y.prototype.getAttributesNames=function(){return this._attributesNames},y.prototype.getAttributeLocation=function(e){return this._attributes[e]},y.prototype.getAttributeLocationByName=function(e){var t=this._attributesNames.indexOf(e);return this._attributes[t]},y.prototype.getAttributesCount=function(){return this._attributes.length},y.prototype.getUniformIndex=function(e){return this._uniformsNames.indexOf(e)},y.prototype.getUniform=function(e){return this._uniforms[this._uniformsNames.indexOf(e)]},y.prototype.getSamplers=function(){return this._samplers},y.prototype.getCompilationError=function(){return this._compilationError},y.prototype.executeWhenCompiled=function(t){this.isReady()?t(this):this.onCompileObservable.add((function(e){t(e)}))},y.prototype._loadVertexShader=function(e,t){var i;if(b.Tools.IsWindowObjectExist()&&e instanceof HTMLElement)return void t(b.Tools.GetDOMTextContent(e));\"base64:\"!==e.substr(0,7)?y.ShadersStore[e+\"VertexShader\"]?t(y.ShadersStore[e+\"VertexShader\"]):(i=\".\"===e[0]||\"/\"===e[0]||-1<e.indexOf(\"http\")?e:b.Engine.ShadersRepository+e,this._engine._loadFile(i+\".vertex.fx\",t)):t(window.atob(e.substr(7)))},y.prototype._loadFragmentShader=function(e,t){var i;if(b.Tools.IsWindowObjectExist()&&e instanceof HTMLElement)return void t(b.Tools.GetDOMTextContent(e));\"base64:\"!==e.substr(0,7)?y.ShadersStore[e+\"PixelShader\"]?t(y.ShadersStore[e+\"PixelShader\"]):y.ShadersStore[e+\"FragmentShader\"]?t(y.ShadersStore[e+\"FragmentShader\"]):(i=\".\"===e[0]||\"/\"===e[0]||-1<e.indexOf(\"http\")?e:b.Engine.ShadersRepository+e,this._engine._loadFile(i+\".fragment.fx\",t)):t(window.atob(e.substr(7)))},y.prototype._dumpShadersSource=function(e,t,i){var r=(1<this._engine.webGLVersion?\"#version 300 es\\n#define WEBGL2 \\n\":\"\")+(i?i+\"\\n\":\"\");t=r+t;var n=2,o=/\\n/gm,s=\"\\n1\\t\"+(e=r+e).replace(o,(function(){return\"\\n\"+n+++\"\\t\"}));n=2;var a=\"\\n1\\t\"+t.replace(o,(function(){return\"\\n\"+n+++\"\\t\"}));this.name.vertexElement?(b.Tools.Error(\"Vertex shader: \"+this.name.vertexElement+s),b.Tools.Error(\"Fragment shader: \"+this.name.fragmentElement+a)):this.name.vertex?(b.Tools.Error(\"Vertex shader: \"+this.name.vertex+s),b.Tools.Error(\"Fragment shader: \"+this.name.fragment+a)):(b.Tools.Error(\"Vertex shader: \"+this.name+s),b.Tools.Error(\"Fragment shader: \"+this.name+a))},y.prototype._processShaderConversion=function(e,t,i){var r=this._processPrecision(e);if(1!=this._engine.webGLVersion)if(-1===r.indexOf(\"#version 3\")){var n=-1!==r.search(/#extension.+GL_EXT_draw_buffers.+require/),o=r.replace(/#extension.+(GL_OES_standard_derivatives|GL_EXT_shader_texture_lod|GL_EXT_frag_depth|GL_EXT_draw_buffers).+(enable|require)/g,\"\");o=(o=(o=o.replace(/varying(?![\\n\\r])\\s/g,t?\"in \":\"out \")).replace(/attribute[ \\t]/g,\"in \")).replace(/[ \\t]attribute/g,\" in\"),t&&(o=(o=(o=(o=(o=(o=(o=(o=o.replace(/texture2DLodEXT\\s*\\(/g,\"textureLod(\")).replace(/textureCubeLodEXT\\s*\\(/g,\"textureLod(\")).replace(/texture2D\\s*\\(/g,\"texture(\")).replace(/textureCube\\s*\\(/g,\"texture(\")).replace(/gl_FragDepthEXT/g,\"gl_FragDepth\")).replace(/gl_FragColor/g,\"glFragColor\")).replace(/gl_FragData/g,\"glFragData\")).replace(/void\\s+?main\\s*\\(/g,(n?\"\":\"out vec4 glFragColor;\\n\")+\"void main(\")),i(o)}else i(r.replace(\"#version 300 es\",\"\"));else i(r)},y.prototype._processIncludes=function(e,t){for(var i=this,r=/#include<(.+)>(\\((.*)\\))*(\\[(.*)\\])*/g,n=r.exec(e),o=new String(e);null!=n;){var s=n[1];if(-1!==s.indexOf(\"__decl__\")&&(s=s.replace(/__decl__/,\"\"),this._engine.supportsUniformBuffers&&(s=(s=s.replace(/Vertex/,\"Ubo\")).replace(/Fragment/,\"Ubo\")),s+=\"Declaration\"),!y.IncludesShadersStore[s]){var a=b.Engine.ShadersRepository+\"ShadersInclude/\"+s+\".fx\";return void this._engine._loadFile(a,(function(e){y.IncludesShadersStore[s]=e,i._processIncludes(o,t)}))}var l=y.IncludesShadersStore[s];if(n[2])for(var c=n[3].split(\",\"),h=0;h<c.length;h+=2){var u=new RegExp(c[h],\"g\"),d=c[h+1];l=l.replace(u,d)}if(n[4]){var f=n[5];if(-1!==f.indexOf(\"..\")){var p=f.split(\"..\"),_=parseInt(p[0]),m=parseInt(p[1]),g=l.slice(0);l=\"\",isNaN(m)&&(m=this._indexParameters[p[1]]);for(var v=_;v<m;v++)this._engine.supportsUniformBuffers||(g=g.replace(/light\\{X\\}.(\\w*)/g,(function(e,t){return t+\"{X}\"}))),l+=g.replace(/\\{X\\}/g,v.toString())+\"\\n\"}else this._engine.supportsUniformBuffers||(l=l.replace(/light\\{X\\}.(\\w*)/g,(function(e,t){return t+\"{X}\"}))),l=l.replace(/\\{X\\}/g,f)}o=o.replace(n[0],l),n=r.exec(e)}t(o)},y.prototype._processPrecision=function(e){return-1===e.indexOf(\"precision highp float\")?e=this._engine.getCaps().highPrecisionShaderSupported?\"precision highp float;\\n\"+e:\"precision mediump float;\\n\"+e:this._engine.getCaps().highPrecisionShaderSupported||(e=e.replace(\"precision highp float\",\"precision mediump float\")),e},y.prototype._rebuildProgram=function(e,t,i,r){var n=this;this._isReady=!1,this._vertexSourceCodeOverride=e,this._fragmentSourceCodeOverride=t,this.onError=function(e,t){r&&r(t)},this.onCompiled=function(){for(var e=n.getEngine().scenes,t=0;t<e.length;t++)e[t].markAllMaterialsAsDirty(b.Material.TextureDirtyFlag);i&&i(n._program)},this._fallbacks=null,this._prepareEffect()},y.prototype.getSpecificUniformLocations=function(e){return this._engine.getUniforms(this._program,e)},y.prototype._prepareEffect=function(){var t=this._attributesNames,e=this.defines,i=this._fallbacks;this._valueCache={};var r=this._program;try{var n,o=this._engine;if(this._vertexSourceCodeOverride&&this._fragmentSourceCodeOverride?this._program=o.createRawShaderProgram(this._vertexSourceCodeOverride,this._fragmentSourceCodeOverride,void 0,this._transformFeedbackVaryings):this._program=o.createShaderProgram(this._vertexSourceCode,this._fragmentSourceCode,e,void 0,this._transformFeedbackVaryings),this._program.__SPECTOR_rebuildProgram=this._rebuildProgram.bind(this),o.supportsUniformBuffers)for(var s in this._uniformBuffersNames)this.bindUniformBlock(s,this._uniformBuffersNames[s]);for(this._uniforms=o.getUniforms(this._program,this._uniformsNames),this._attributes=o.getAttributes(this._program,t),n=0;n<this._samplers.length;n++){null==this.getUniform(this._samplers[n])&&(this._samplers.splice(n,1),n--)}o.bindSamplers(this),this._compilationError=\"\",this._isReady=!0,this.onCompiled&&this.onCompiled(this),this.onCompileObservable.notifyObservers(this),this.onCompileObservable.clear(),this._fallbacks&&this._fallbacks.unBindMesh(),r&&this.getEngine()._deleteProgram(r)}catch(e){this._compilationError=e.message,b.Tools.Error(\"Unable to compile effect:\"),b.Tools.Error(\"Uniforms: \"+this._uniformsNames.map((function(e){return\" \"+e}))),b.Tools.Error(\"Attributes: \"+t.map((function(e){return\" \"+e}))),b.Tools.Error(\"Error: \"+this._compilationError),r&&(this._program=r,this._isReady=!0,this.onError&&this.onError(this,this._compilationError),this.onErrorObservable.notifyObservers(this)),i&&i.isMoreFallbacks?(b.Tools.Error(\"Trying next fallback.\"),this.defines=i.reduce(this.defines,this),this._prepareEffect()):(this.onError&&this.onError(this,this._compilationError),this.onErrorObservable.notifyObservers(this),this.onErrorObservable.clear(),this._fallbacks&&this._fallbacks.unBindMesh())}},Object.defineProperty(y.prototype,\"isSupported\",{get:function(){return\"\"===this._compilationError},enumerable:!0,configurable:!0}),y.prototype._bindTexture=function(e,t){this._engine._bindTexture(this._samplers.indexOf(e),t)},y.prototype.setTexture=function(e,t){this._engine.setTexture(this._samplers.indexOf(e),this.getUniform(e),t)},y.prototype.setDepthStencilTexture=function(e,t){this._engine.setDepthStencilTexture(this._samplers.indexOf(e),this.getUniform(e),t)},y.prototype.setTextureArray=function(e,t){if(-1===this._samplers.indexOf(e+\"Ex\"))for(var i=this._samplers.indexOf(e),r=1;r<t.length;r++)this._samplers.splice(i+r,0,e+\"Ex\");this._engine.setTextureArray(this._samplers.indexOf(e),this.getUniform(e),t)},y.prototype.setTextureFromPostProcess=function(e,t){this._engine.setTextureFromPostProcess(this._samplers.indexOf(e),t)},y.prototype.setTextureFromPostProcessOutput=function(e,t){this._engine.setTextureFromPostProcessOutput(this._samplers.indexOf(e),t)},y.prototype._cacheMatrix=function(e,t){var i=this._valueCache[e],r=t.updateFlag;return(void 0===i||i!==r)&&(this._valueCache[e]=r,!0)},y.prototype._cacheFloat2=function(e,t,i){var r=this._valueCache[e];if(!r)return r=[t,i],this._valueCache[e]=r,!0;var n=!1;return r[0]!==t&&(r[0]=t,n=!0),r[1]!==i&&(r[1]=i,n=!0),n},y.prototype._cacheFloat3=function(e,t,i,r){var n=this._valueCache[e];if(!n)return n=[t,i,r],this._valueCache[e]=n,!0;var o=!1;return n[0]!==t&&(n[0]=t,o=!0),n[1]!==i&&(n[1]=i,o=!0),n[2]!==r&&(n[2]=r,o=!0),o},y.prototype._cacheFloat4=function(e,t,i,r,n){var o=this._valueCache[e];if(!o)return o=[t,i,r,n],this._valueCache[e]=o,!0;var s=!1;return o[0]!==t&&(o[0]=t,s=!0),o[1]!==i&&(o[1]=i,s=!0),o[2]!==r&&(o[2]=r,s=!0),o[3]!==n&&(o[3]=n,s=!0),s},y.prototype.bindUniformBuffer=function(e,t){var i=this._uniformBuffersNames[t];void 0!==i&&y._baseCache[i]!==e&&(y._baseCache[i]=e,this._engine.bindUniformBufferBase(e,i))},y.prototype.bindUniformBlock=function(e,t){this._engine.bindUniformBlock(this._program,e,t)},y.prototype.setInt=function(e,t){var i=this._valueCache[e];return void 0!==i&&i===t||(this._valueCache[e]=t,this._engine.setInt(this.getUniform(e),t)),this},y.prototype.setIntArray=function(e,t){return this._valueCache[e]=null,this._engine.setIntArray(this.getUniform(e),t),this},y.prototype.setIntArray2=function(e,t){return this._valueCache[e]=null,this._engine.setIntArray2(this.getUniform(e),t),this},y.prototype.setIntArray3=function(e,t){return this._valueCache[e]=null,this._engine.setIntArray3(this.getUniform(e),t),this},y.prototype.setIntArray4=function(e,t){return this._valueCache[e]=null,this._engine.setIntArray4(this.getUniform(e),t),this},y.prototype.setFloatArray=function(e,t){return this._valueCache[e]=null,this._engine.setFloatArray(this.getUniform(e),t),this},y.prototype.setFloatArray2=function(e,t){return this._valueCache[e]=null,this._engine.setFloatArray2(this.getUniform(e),t),this},y.prototype.setFloatArray3=function(e,t){return this._valueCache[e]=null,this._engine.setFloatArray3(this.getUniform(e),t),this},y.prototype.setFloatArray4=function(e,t){return this._valueCache[e]=null,this._engine.setFloatArray4(this.getUniform(e),t),this},y.prototype.setArray=function(e,t){return this._valueCache[e]=null,this._engine.setArray(this.getUniform(e),t),this},y.prototype.setArray2=function(e,t){return this._valueCache[e]=null,this._engine.setArray2(this.getUniform(e),t),this},y.prototype.setArray3=function(e,t){return this._valueCache[e]=null,this._engine.setArray3(this.getUniform(e),t),this},y.prototype.setArray4=function(e,t){return this._valueCache[e]=null,this._engine.setArray4(this.getUniform(e),t),this},y.prototype.setMatrices=function(e,t){return t&&(this._valueCache[e]=null,this._engine.setMatrices(this.getUniform(e),t)),this},y.prototype.setMatrix=function(e,t){return this._cacheMatrix(e,t)&&this._engine.setMatrix(this.getUniform(e),t),this},y.prototype.setMatrix3x3=function(e,t){return this._valueCache[e]=null,this._engine.setMatrix3x3(this.getUniform(e),t),this},y.prototype.setMatrix2x2=function(e,t){return this._valueCache[e]=null,this._engine.setMatrix2x2(this.getUniform(e),t),this},y.prototype.setFloat=function(e,t){var i=this._valueCache[e];return void 0!==i&&i===t||(this._valueCache[e]=t,this._engine.setFloat(this.getUniform(e),t)),this},y.prototype.setBool=function(e,t){var i=this._valueCache[e];return void 0!==i&&i===t||(this._valueCache[e]=t,this._engine.setBool(this.getUniform(e),t?1:0)),this},y.prototype.setVector2=function(e,t){return this._cacheFloat2(e,t.x,t.y)&&this._engine.setFloat2(this.getUniform(e),t.x,t.y),this},y.prototype.setFloat2=function(e,t,i){return this._cacheFloat2(e,t,i)&&this._engine.setFloat2(this.getUniform(e),t,i),this},y.prototype.setVector3=function(e,t){return this._cacheFloat3(e,t.x,t.y,t.z)&&this._engine.setFloat3(this.getUniform(e),t.x,t.y,t.z),this},y.prototype.setFloat3=function(e,t,i,r){return this._cacheFloat3(e,t,i,r)&&this._engine.setFloat3(this.getUniform(e),t,i,r),this},y.prototype.setVector4=function(e,t){return this._cacheFloat4(e,t.x,t.y,t.z,t.w)&&this._engine.setFloat4(this.getUniform(e),t.x,t.y,t.z,t.w),this},y.prototype.setFloat4=function(e,t,i,r,n){return this._cacheFloat4(e,t,i,r,n)&&this._engine.setFloat4(this.getUniform(e),t,i,r,n),this},y.prototype.setColor3=function(e,t){return this._cacheFloat3(e,t.r,t.g,t.b)&&this._engine.setColor3(this.getUniform(e),t),this},y.prototype.setColor4=function(e,t,i){return this._cacheFloat4(e,t.r,t.g,t.b,i)&&this._engine.setColor4(this.getUniform(e),t,i),this},y.prototype.setDirectColor4=function(e,t){return this._cacheFloat4(e,t.r,t.g,t.b,t.a)&&this._engine.setDirectColor4(this.getUniform(e),t),this},y.RegisterShader=function(e,t,i){t&&(y.ShadersStore[e+\"PixelShader\"]=t),i&&(y.ShadersStore[e+\"VertexShader\"]=i)},y.ResetCache=function(){y._baseCache={}},y._uniqueIdSeed=0,y._baseCache={},y.ShadersStore={},y.IncludesShadersStore={},y})();b.Effect=i})($a||($a={})),(function(e){var t=(function(){function e(){}return e.KEYDOWN=1,e.KEYUP=2,e})();e.KeyboardEventTypes=t;var i=function(e,t){this.type=e,this.event=t},r=(function(r){function e(e,t){var i=r.call(this,e,t)||this;return i.type=e,i.event=t,i.skipOnPointerObservable=!1,i}return T(e,r),e})(e.KeyboardInfo=i);e.KeyboardInfoPre=r})($a||($a={})),(function(s){var e=(function(){function e(){}return e.POINTERDOWN=1,e.POINTERUP=2,e.POINTERMOVE=4,e.POINTERWHEEL=8,e.POINTERPICK=16,e.POINTERTAP=32,e.POINTERDOUBLETAP=64,e})();s.PointerEventTypes=e;var t=function(e,t){this.type=e,this.event=t},i=(function(o){function e(e,t,i,r){var n=o.call(this,e,t)||this;return n.ray=null,n.skipOnPointerObservable=!1,n.localPosition=new s.Vector2(i,r),n}return T(e,o),e})(s.PointerInfoBase=t);s.PointerInfoPre=i;var r=(function(n){function e(e,t,i){var r=n.call(this,e,t)||this;return r.pickInfo=i,r}return T(e,n),e})(t);s.PointerInfo=r})($a||($a={})),(function(f){f.ToGammaSpace=1/2.2,f.ToLinearSpace=2.2,f.Epsilon=.001;var t=(function(){function n(e,t,i){void 0===e&&(e=0),void 0===t&&(t=0),void 0===i&&(i=0),this.r=e,this.g=t,this.b=i}return n.prototype.toString=function(){return\"{R: \"+this.r+\" G:\"+this.g+\" B:\"+this.b+\"}\"},n.prototype.getClassName=function(){return\"Color3\"},n.prototype.getHashCode=function(){var e=this.r||0;return e=397*(e=397*e^(this.g||0))^(this.b||0)},n.prototype.toArray=function(e,t){return void 0===t&&(t=0),e[t]=this.r,e[t+1]=this.g,e[t+2]=this.b,this},n.prototype.toColor4=function(e){return void 0===e&&(e=1),new i(this.r,this.g,this.b,e)},n.prototype.asArray=function(){var e=new Array;return this.toArray(e,0),e},n.prototype.toLuminance=function(){return.3*this.r+.59*this.g+.11*this.b},n.prototype.multiply=function(e){return new n(this.r*e.r,this.g*e.g,this.b*e.b)},n.prototype.multiplyToRef=function(e,t){return t.r=this.r*e.r,t.g=this.g*e.g,t.b=this.b*e.b,this},n.prototype.equals=function(e){return e&&this.r===e.r&&this.g===e.g&&this.b===e.b},n.prototype.equalsFloats=function(e,t,i){return this.r===e&&this.g===t&&this.b===i},n.prototype.scale=function(e){return new n(this.r*e,this.g*e,this.b*e)},n.prototype.scaleToRef=function(e,t){return t.r=this.r*e,t.g=this.g*e,t.b=this.b*e,this},n.prototype.scaleAndAddToRef=function(e,t){return t.r+=this.r*e,t.g+=this.g*e,t.b+=this.b*e,this},n.prototype.clampToRef=function(e,t,i){return void 0===e&&(e=0),void 0===t&&(t=1),i.r=f.Scalar.Clamp(this.r,e,t),i.g=f.Scalar.Clamp(this.g,e,t),i.b=f.Scalar.Clamp(this.b,e,t),this},n.prototype.add=function(e){return new n(this.r+e.r,this.g+e.g,this.b+e.b)},n.prototype.addToRef=function(e,t){return t.r=this.r+e.r,t.g=this.g+e.g,t.b=this.b+e.b,this},n.prototype.subtract=function(e){return new n(this.r-e.r,this.g-e.g,this.b-e.b)},n.prototype.subtractToRef=function(e,t){return t.r=this.r-e.r,t.g=this.g-e.g,t.b=this.b-e.b,this},n.prototype.clone=function(){return new n(this.r,this.g,this.b)},n.prototype.copyFrom=function(e){return this.r=e.r,this.g=e.g,this.b=e.b,this},n.prototype.copyFromFloats=function(e,t,i){return this.r=e,this.g=t,this.b=i,this},n.prototype.set=function(e,t,i){return this.copyFromFloats(e,t,i)},n.prototype.toHexString=function(){var e=255*this.r|0,t=255*this.g|0,i=255*this.b|0;return\"#\"+f.Scalar.ToHex(e)+f.Scalar.ToHex(t)+f.Scalar.ToHex(i)},n.prototype.toLinearSpace=function(){var e=new n;return this.toLinearSpaceToRef(e),e},n.prototype.toLinearSpaceToRef=function(e){return e.r=Math.pow(this.r,f.ToLinearSpace),e.g=Math.pow(this.g,f.ToLinearSpace),e.b=Math.pow(this.b,f.ToLinearSpace),this},n.prototype.toGammaSpace=function(){var e=new n;return this.toGammaSpaceToRef(e),e},n.prototype.toGammaSpaceToRef=function(e){return e.r=Math.pow(this.r,f.ToGammaSpace),e.g=Math.pow(this.g,f.ToGammaSpace),e.b=Math.pow(this.b,f.ToGammaSpace),this},n.FromHexString=function(e){if(\"#\"!==e.substring(0,1)||7!==e.length)return new n(0,0,0);var t=parseInt(e.substring(1,3),16),i=parseInt(e.substring(3,5),16),r=parseInt(e.substring(5,7),16);return n.FromInts(t,i,r)},n.FromArray=function(e,t){return void 0===t&&(t=0),new n(e[t],e[t+1],e[t+2])},n.FromInts=function(e,t,i){return new n(e/255,t/255,i/255)},n.Lerp=function(e,t,i){var r=new n(0,0,0);return n.LerpToRef(e,t,i,r),r},n.LerpToRef=function(e,t,i,r){r.r=e.r+(t.r-e.r)*i,r.g=e.g+(t.g-e.g)*i,r.b=e.b+(t.b-e.b)*i},n.Red=function(){return new n(1,0,0)},n.Green=function(){return new n(0,1,0)},n.Blue=function(){return new n(0,0,1)},n.Black=function(){return new n(0,0,0)},n.White=function(){return new n(1,1,1)},n.Purple=function(){return new n(.5,0,.5)},n.Magenta=function(){return new n(1,0,1)},n.Yellow=function(){return new n(1,1,0)},n.Gray=function(){return new n(.5,.5,.5)},n.Teal=function(){return new n(0,1,1)},n.Random=function(){return new n(Math.random(),Math.random(),Math.random())},n})();f.Color3=t;var i=(function(){function o(e,t,i,r){void 0===e&&(e=0),void 0===t&&(t=0),void 0===i&&(i=0),void 0===r&&(r=1),this.r=e,this.g=t,this.b=i,this.a=r}return o.prototype.addInPlace=function(e){return this.r+=e.r,this.g+=e.g,this.b+=e.b,this.a+=e.a,this},o.prototype.asArray=function(){var e=new Array;return this.toArray(e,0),e},o.prototype.toArray=function(e,t){return void 0===t&&(t=0),e[t]=this.r,e[t+1]=this.g,e[t+2]=this.b,e[t+3]=this.a,this},o.prototype.add=function(e){return new o(this.r+e.r,this.g+e.g,this.b+e.b,this.a+e.a)},o.prototype.subtract=function(e){return new o(this.r-e.r,this.g-e.g,this.b-e.b,this.a-e.a)},o.prototype.subtractToRef=function(e,t){return t.r=this.r-e.r,t.g=this.g-e.g,t.b=this.b-e.b,t.a=this.a-e.a,this},o.prototype.scale=function(e){return new o(this.r*e,this.g*e,this.b*e,this.a*e)},o.prototype.scaleToRef=function(e,t){return t.r=this.r*e,t.g=this.g*e,t.b=this.b*e,t.a=this.a*e,this},o.prototype.scaleAndAddToRef=function(e,t){return t.r+=this.r*e,t.g+=this.g*e,t.b+=this.b*e,t.a+=this.a*e,this},o.prototype.clampToRef=function(e,t,i){return void 0===e&&(e=0),void 0===t&&(t=1),i.r=f.Scalar.Clamp(this.r,e,t),i.g=f.Scalar.Clamp(this.g,e,t),i.b=f.Scalar.Clamp(this.b,e,t),i.a=f.Scalar.Clamp(this.a,e,t),this},o.prototype.multiply=function(e){return new o(this.r*e.r,this.g*e.g,this.b*e.b,this.a*e.a)},o.prototype.multiplyToRef=function(e,t){return t.r=this.r*e.r,t.g=this.g*e.g,t.b=this.b*e.b,t.a=this.a*e.a,t},o.prototype.toString=function(){return\"{R: \"+this.r+\" G:\"+this.g+\" B:\"+this.b+\" A:\"+this.a+\"}\"},o.prototype.getClassName=function(){return\"Color4\"},o.prototype.getHashCode=function(){var e=this.r||0;return e=397*(e=397*(e=397*e^(this.g||0))^(this.b||0))^(this.a||0)},o.prototype.clone=function(){return new o(this.r,this.g,this.b,this.a)},o.prototype.copyFrom=function(e){return this.r=e.r,this.g=e.g,this.b=e.b,this.a=e.a,this},o.prototype.copyFromFloats=function(e,t,i,r){return this.r=e,this.g=t,this.b=i,this.a=r,this},o.prototype.set=function(e,t,i,r){return this.copyFromFloats(e,t,i,r)},o.prototype.toHexString=function(){var e=255*this.r|0,t=255*this.g|0,i=255*this.b|0,r=255*this.a|0;return\"#\"+f.Scalar.ToHex(e)+f.Scalar.ToHex(t)+f.Scalar.ToHex(i)+f.Scalar.ToHex(r)},o.prototype.toLinearSpace=function(){var e=new o;return this.toLinearSpaceToRef(e),e},o.prototype.toLinearSpaceToRef=function(e){return e.r=Math.pow(this.r,f.ToLinearSpace),e.g=Math.pow(this.g,f.ToLinearSpace),e.b=Math.pow(this.b,f.ToLinearSpace),e.a=this.a,this},o.prototype.toGammaSpace=function(){var e=new o;return this.toGammaSpaceToRef(e),e},o.prototype.toGammaSpaceToRef=function(e){return e.r=Math.pow(this.r,f.ToGammaSpace),e.g=Math.pow(this.g,f.ToGammaSpace),e.b=Math.pow(this.b,f.ToGammaSpace),e.a=this.a,this},o.FromHexString=function(e){if(\"#\"!==e.substring(0,1)||9!==e.length)return new o(0,0,0,0);var t=parseInt(e.substring(1,3),16),i=parseInt(e.substring(3,5),16),r=parseInt(e.substring(5,7),16),n=parseInt(e.substring(7,9),16);return o.FromInts(t,i,r,n)},o.Lerp=function(e,t,i){var r=new o(0,0,0,0);return o.LerpToRef(e,t,i,r),r},o.LerpToRef=function(e,t,i,r){r.r=e.r+(t.r-e.r)*i,r.g=e.g+(t.g-e.g)*i,r.b=e.b+(t.b-e.b)*i,r.a=e.a+(t.a-e.a)*i},o.FromColor3=function(e,t){return void 0===t&&(t=1),new o(e.r,e.g,e.b,t)},o.FromArray=function(e,t){return void 0===t&&(t=0),new o(e[t],e[t+1],e[t+2],e[t+3])},o.FromInts=function(e,t,i,r){return new o(e/255,t/255,i/255,r/255)},o.CheckColors4=function(e,t){if(e.length===3*t){for(var i=[],r=0;r<e.length;r+=3){var n=r/3*4;i[n]=e[r],i[n+1]=e[r+1],i[n+2]=e[r+2],i[n+3]=1}return i}return e},o})();f.Color4=i;var p=(function(){function u(e,t){void 0===e&&(e=0),void 0===t&&(t=0),this.x=e,this.y=t}return u.prototype.toString=function(){return\"{X: \"+this.x+\" Y:\"+this.y+\"}\"},u.prototype.getClassName=function(){return\"Vector2\"},u.prototype.getHashCode=function(){var e=this.x||0;return e=397*e^(this.y||0)},u.prototype.toArray=function(e,t){return void 0===t&&(t=0),e[t]=this.x,e[t+1]=this.y,this},u.prototype.asArray=function(){var e=new Array;return this.toArray(e,0),e},u.prototype.copyFrom=function(e){return this.x=e.x,this.y=e.y,this},u.prototype.copyFromFloats=function(e,t){return this.x=e,this.y=t,this},u.prototype.set=function(e,t){return this.copyFromFloats(e,t)},u.prototype.add=function(e){return new u(this.x+e.x,this.y+e.y)},u.prototype.addToRef=function(e,t){return t.x=this.x+e.x,t.y=this.y+e.y,this},u.prototype.addInPlace=function(e){return this.x+=e.x,this.y+=e.y,this},u.prototype.addVector3=function(e){return new u(this.x+e.x,this.y+e.y)},u.prototype.subtract=function(e){return new u(this.x-e.x,this.y-e.y)},u.prototype.subtractToRef=function(e,t){return t.x=this.x-e.x,t.y=this.y-e.y,this},u.prototype.subtractInPlace=function(e){return this.x-=e.x,this.y-=e.y,this},u.prototype.multiplyInPlace=function(e){return this.x*=e.x,this.y*=e.y,this},u.prototype.multiply=function(e){return new u(this.x*e.x,this.y*e.y)},u.prototype.multiplyToRef=function(e,t){return t.x=this.x*e.x,t.y=this.y*e.y,this},u.prototype.multiplyByFloats=function(e,t){return new u(this.x*e,this.y*t)},u.prototype.divide=function(e){return new u(this.x/e.x,this.y/e.y)},u.prototype.divideToRef=function(e,t){return t.x=this.x/e.x,t.y=this.y/e.y,this},u.prototype.divideInPlace=function(e){return this.divideToRef(e,this)},u.prototype.negate=function(){return new u(-this.x,-this.y)},u.prototype.scaleInPlace=function(e){return this.x*=e,this.y*=e,this},u.prototype.scale=function(e){var t=new u(0,0);return this.scaleToRef(e,t),t},u.prototype.scaleToRef=function(e,t){return t.x=this.x*e,t.y=this.y*e,this},u.prototype.scaleAndAddToRef=function(e,t){return t.x+=this.x*e,t.y+=this.y*e,this},u.prototype.equals=function(e){return e&&this.x===e.x&&this.y===e.y},u.prototype.equalsWithEpsilon=function(e,t){return void 0===t&&(t=f.Epsilon),e&&f.Scalar.WithinEpsilon(this.x,e.x,t)&&f.Scalar.WithinEpsilon(this.y,e.y,t)},u.prototype.floor=function(){return new u(Math.floor(this.x),Math.floor(this.y))},u.prototype.fract=function(){return new u(this.x-Math.floor(this.x),this.y-Math.floor(this.y))},u.prototype.length=function(){return Math.sqrt(this.x*this.x+this.y*this.y)},u.prototype.lengthSquared=function(){return this.x*this.x+this.y*this.y},u.prototype.normalize=function(){var e=this.length();if(0===e)return this;var t=1/e;return this.x*=t,this.y*=t,this},u.prototype.clone=function(){return new u(this.x,this.y)},u.Zero=function(){return new u(0,0)},u.One=function(){return new u(1,1)},u.FromArray=function(e,t){return void 0===t&&(t=0),new u(e[t],e[t+1])},u.FromArrayToRef=function(e,t,i){i.x=e[t],i.y=e[t+1]},u.CatmullRom=function(e,t,i,r,n){var o=n*n,s=n*o;return new u(.5*(2*t.x+(-e.x+i.x)*n+(2*e.x-5*t.x+4*i.x-r.x)*o+(-e.x+3*t.x-3*i.x+r.x)*s),.5*(2*t.y+(-e.y+i.y)*n+(2*e.y-5*t.y+4*i.y-r.y)*o+(-e.y+3*t.y-3*i.y+r.y)*s))},u.Clamp=function(e,t,i){var r=e.x;r=(r=r>i.x?i.x:r)<t.x?t.x:r;var n=e.y;return new u(r,n=(n=n>i.y?i.y:n)<t.y?t.y:n)},u.Hermite=function(e,t,i,r,n){var o=n*n,s=n*o,a=2*s-3*o+1,l=-2*s+3*o,c=s-2*o+n,h=s-o;return new u(e.x*a+i.x*l+t.x*c+r.x*h,e.y*a+i.y*l+t.y*c+r.y*h)},u.Lerp=function(e,t,i){return new u(e.x+(t.x-e.x)*i,e.y+(t.y-e.y)*i)},u.Dot=function(e,t){return e.x*t.x+e.y*t.y},u.Normalize=function(e){var t=e.clone();return t.normalize(),t},u.Minimize=function(e,t){return new u(e.x<t.x?e.x:t.x,e.y<t.y?e.y:t.y)},u.Maximize=function(e,t){return new u(e.x>t.x?e.x:t.x,e.y>t.y?e.y:t.y)},u.Transform=function(e,t){var i=u.Zero();return u.TransformToRef(e,t,i),i},u.TransformToRef=function(e,t,i){var r=e.x*t.m[0]+e.y*t.m[4]+t.m[12],n=e.x*t.m[1]+e.y*t.m[5]+t.m[13];i.x=r,i.y=n},u.PointInTriangle=function(e,t,i,r){var n=.5*(-i.y*r.x+t.y*(-i.x+r.x)+t.x*(i.y-r.y)+i.x*r.y),o=n<0?-1:1,s=(t.y*r.x-t.x*r.y+(r.y-t.y)*e.x+(t.x-r.x)*e.y)*o,a=(t.x*i.y-t.y*i.x+(t.y-i.y)*e.x+(i.x-t.x)*e.y)*o;return 0<s&&0<a&&s+a<2*n*o},u.Distance=function(e,t){return Math.sqrt(u.DistanceSquared(e,t))},u.DistanceSquared=function(e,t){var i=e.x-t.x,r=e.y-t.y;return i*i+r*r},u.Center=function(e,t){var i=e.add(t);return i.scaleInPlace(.5),i},u.DistanceOfPointFromSegment=function(e,t,i){var r=u.DistanceSquared(t,i);if(0===r)return u.Distance(e,t);var n=i.subtract(t),o=Math.max(0,Math.min(1,u.Dot(e.subtract(t),n)/r)),s=t.add(n.multiplyByFloats(o,o));return u.Distance(e,s)},u})();f.Vector2=p;var _=(function(){function d(e,t,i){void 0===e&&(e=0),void 0===t&&(t=0),void 0===i&&(i=0),this.x=e,this.y=t,this.z=i}return d.prototype.toString=function(){return\"{X: \"+this.x+\" Y:\"+this.y+\" Z:\"+this.z+\"}\"},d.prototype.getClassName=function(){return\"Vector3\"},d.prototype.getHashCode=function(){var e=this.x||0;return e=397*(e=397*e^(this.y||0))^(this.z||0)},d.prototype.asArray=function(){var e=[];return this.toArray(e,0),e},d.prototype.toArray=function(e,t){return void 0===t&&(t=0),e[t]=this.x,e[t+1]=this.y,e[t+2]=this.z,this},d.prototype.toQuaternion=function(){return f.Quaternion.RotationYawPitchRoll(this.x,this.y,this.z)},d.prototype.addInPlace=function(e){return this.x+=e.x,this.y+=e.y,this.z+=e.z,this},d.prototype.add=function(e){return new d(this.x+e.x,this.y+e.y,this.z+e.z)},d.prototype.addToRef=function(e,t){return t.x=this.x+e.x,t.y=this.y+e.y,t.z=this.z+e.z,this},d.prototype.subtractInPlace=function(e){return this.x-=e.x,this.y-=e.y,this.z-=e.z,this},d.prototype.subtract=function(e){return new d(this.x-e.x,this.y-e.y,this.z-e.z)},d.prototype.subtractToRef=function(e,t){return t.x=this.x-e.x,t.y=this.y-e.y,t.z=this.z-e.z,this},d.prototype.subtractFromFloats=function(e,t,i){return new d(this.x-e,this.y-t,this.z-i)},d.prototype.subtractFromFloatsToRef=function(e,t,i,r){return r.x=this.x-e,r.y=this.y-t,r.z=this.z-i,this},d.prototype.negate=function(){return new d(-this.x,-this.y,-this.z)},d.prototype.scaleInPlace=function(e){return this.x*=e,this.y*=e,this.z*=e,this},d.prototype.scale=function(e){return new d(this.x*e,this.y*e,this.z*e)},d.prototype.scaleToRef=function(e,t){return t.x=this.x*e,t.y=this.y*e,t.z=this.z*e,this},d.prototype.scaleAndAddToRef=function(e,t){return t.x+=this.x*e,t.y+=this.y*e,t.z+=this.z*e,this},d.prototype.equals=function(e){return e&&this.x===e.x&&this.y===e.y&&this.z===e.z},d.prototype.equalsWithEpsilon=function(e,t){return void 0===t&&(t=f.Epsilon),e&&f.Scalar.WithinEpsilon(this.x,e.x,t)&&f.Scalar.WithinEpsilon(this.y,e.y,t)&&f.Scalar.WithinEpsilon(this.z,e.z,t)},d.prototype.equalsToFloats=function(e,t,i){return this.x===e&&this.y===t&&this.z===i},d.prototype.multiplyInPlace=function(e){return this.x*=e.x,this.y*=e.y,this.z*=e.z,this},d.prototype.multiply=function(e){return new d(this.x*e.x,this.y*e.y,this.z*e.z)},d.prototype.multiplyToRef=function(e,t){return t.x=this.x*e.x,t.y=this.y*e.y,t.z=this.z*e.z,this},d.prototype.multiplyByFloats=function(e,t,i){return new d(this.x*e,this.y*t,this.z*i)},d.prototype.divide=function(e){return new d(this.x/e.x,this.y/e.y,this.z/e.z)},d.prototype.divideToRef=function(e,t){return t.x=this.x/e.x,t.y=this.y/e.y,t.z=this.z/e.z,this},d.prototype.divideInPlace=function(e){return this.divideToRef(e,this)},d.prototype.minimizeInPlace=function(e){return this.minimizeInPlaceFromFloats(e.x,e.y,e.z)},d.prototype.maximizeInPlace=function(e){return this.maximizeInPlaceFromFloats(e.x,e.y,e.z)},d.prototype.minimizeInPlaceFromFloats=function(e,t,i){return e<this.x&&(this.x=e),t<this.y&&(this.y=t),i<this.z&&(this.z=i),this},d.prototype.maximizeInPlaceFromFloats=function(e,t,i){return e>this.x&&(this.x=e),t>this.y&&(this.y=t),i>this.z&&(this.z=i),this},Object.defineProperty(d.prototype,\"isNonUniform\",{get:function(){var e=Math.abs(this.x),t=Math.abs(this.y);if(e!==t)return!0;var i=Math.abs(this.z);return e!==i||t!==i},enumerable:!0,configurable:!0}),d.prototype.floor=function(){return new d(Math.floor(this.x),Math.floor(this.y),Math.floor(this.z))},d.prototype.fract=function(){return new d(this.x-Math.floor(this.x),this.y-Math.floor(this.y),this.z-Math.floor(this.z))},d.prototype.length=function(){return Math.sqrt(this.x*this.x+this.y*this.y+this.z*this.z)},d.prototype.lengthSquared=function(){return this.x*this.x+this.y*this.y+this.z*this.z},d.prototype.normalize=function(){var e=this.length();if(0===e||1===e)return this;var t=1/e;return this.x*=t,this.y*=t,this.z*=t,this},d.prototype.normalizeToNew=function(){var e=new d(0,0,0);return this.normalizeToRef(e),e},d.prototype.normalizeToRef=function(e){var t=this.length();if(0===t||1===t)return e.set(this.x,this.y,this.z),e;var i=1/t;return this.scaleToRef(i,e),e},d.prototype.clone=function(){return new d(this.x,this.y,this.z)},d.prototype.copyFrom=function(e){return this.x=e.x,this.y=e.y,this.z=e.z,this},d.prototype.copyFromFloats=function(e,t,i){return this.x=e,this.y=t,this.z=i,this},d.prototype.set=function(e,t,i){return this.copyFromFloats(e,t,i)},d.GetClipFactor=function(e,t,i,r){var n=d.Dot(e,i)-r;return n/(n-(d.Dot(t,i)-r))},d.GetAngleBetweenVectors=function(e,t,i){var r=A.Vector3[1].copyFrom(e).normalize(),n=A.Vector3[2].copyFrom(t).normalize(),o=d.Dot(r,n),s=A.Vector3[3];return d.CrossToRef(r,n,s),0<d.Dot(s,i)?Math.acos(o):-Math.acos(o)},d.FromArray=function(e,t){return t||(t=0),new d(e[t],e[t+1],e[t+2])},d.FromFloatArray=function(e,t){return d.FromArray(e,t)},d.FromArrayToRef=function(e,t,i){i.x=e[t],i.y=e[t+1],i.z=e[t+2]},d.FromFloatArrayToRef=function(e,t,i){return d.FromArrayToRef(e,t,i)},d.FromFloatsToRef=function(e,t,i,r){r.x=e,r.y=t,r.z=i},d.Zero=function(){return new d(0,0,0)},d.One=function(){return new d(1,1,1)},d.Up=function(){return new d(0,1,0)},d.Down=function(){return new d(0,-1,0)},d.Forward=function(){return new d(0,0,1)},d.Backward=function(){return new d(0,0,-1)},d.Right=function(){return new d(1,0,0)},d.Left=function(){return new d(-1,0,0)},d.TransformCoordinates=function(e,t){var i=d.Zero();return d.TransformCoordinatesToRef(e,t,i),i},d.TransformCoordinatesToRef=function(e,t,i){var r=e.x*t.m[0]+e.y*t.m[4]+e.z*t.m[8]+t.m[12],n=e.x*t.m[1]+e.y*t.m[5]+e.z*t.m[9]+t.m[13],o=e.x*t.m[2]+e.y*t.m[6]+e.z*t.m[10]+t.m[14],s=e.x*t.m[3]+e.y*t.m[7]+e.z*t.m[11]+t.m[15];i.x=r/s,i.y=n/s,i.z=o/s},d.TransformCoordinatesFromFloatsToRef=function(e,t,i,r,n){var o=e*r.m[0]+t*r.m[4]+i*r.m[8]+r.m[12],s=e*r.m[1]+t*r.m[5]+i*r.m[9]+r.m[13],a=e*r.m[2]+t*r.m[6]+i*r.m[10]+r.m[14],l=e*r.m[3]+t*r.m[7]+i*r.m[11]+r.m[15];n.x=o/l,n.y=s/l,n.z=a/l},d.TransformNormal=function(e,t){var i=d.Zero();return d.TransformNormalToRef(e,t,i),i},d.TransformNormalToRef=function(e,t,i){var r=e.x*t.m[0]+e.y*t.m[4]+e.z*t.m[8],n=e.x*t.m[1]+e.y*t.m[5]+e.z*t.m[9],o=e.x*t.m[2]+e.y*t.m[6]+e.z*t.m[10];i.x=r,i.y=n,i.z=o},d.TransformNormalFromFloatsToRef=function(e,t,i,r,n){n.x=e*r.m[0]+t*r.m[4]+i*r.m[8],n.y=e*r.m[1]+t*r.m[5]+i*r.m[9],n.z=e*r.m[2]+t*r.m[6]+i*r.m[10]},d.CatmullRom=function(e,t,i,r,n){var o=n*n,s=n*o;return new d(.5*(2*t.x+(-e.x+i.x)*n+(2*e.x-5*t.x+4*i.x-r.x)*o+(-e.x+3*t.x-3*i.x+r.x)*s),.5*(2*t.y+(-e.y+i.y)*n+(2*e.y-5*t.y+4*i.y-r.y)*o+(-e.y+3*t.y-3*i.y+r.y)*s),.5*(2*t.z+(-e.z+i.z)*n+(2*e.z-5*t.z+4*i.z-r.z)*o+(-e.z+3*t.z-3*i.z+r.z)*s))},d.Clamp=function(e,t,i){var r=e.x;r=(r=r>i.x?i.x:r)<t.x?t.x:r;var n=e.y;n=(n=n>i.y?i.y:n)<t.y?t.y:n;var o=e.z;return new d(r,n,o=(o=o>i.z?i.z:o)<t.z?t.z:o)},d.Hermite=function(e,t,i,r,n){var o=n*n,s=n*o,a=2*s-3*o+1,l=-2*s+3*o,c=s-2*o+n,h=s-o;return new d(e.x*a+i.x*l+t.x*c+r.x*h,e.y*a+i.y*l+t.y*c+r.y*h,e.z*a+i.z*l+t.z*c+r.z*h)},d.Lerp=function(e,t,i){var r=new d(0,0,0);return d.LerpToRef(e,t,i,r),r},d.LerpToRef=function(e,t,i,r){r.x=e.x+(t.x-e.x)*i,r.y=e.y+(t.y-e.y)*i,r.z=e.z+(t.z-e.z)*i},d.Dot=function(e,t){return e.x*t.x+e.y*t.y+e.z*t.z},d.Cross=function(e,t){var i=d.Zero();return d.CrossToRef(e,t,i),i},d.CrossToRef=function(e,t,i){A.Vector3[0].x=e.y*t.z-e.z*t.y,A.Vector3[0].y=e.z*t.x-e.x*t.z,A.Vector3[0].z=e.x*t.y-e.y*t.x,i.copyFrom(A.Vector3[0])},d.Normalize=function(e){var t=d.Zero();return d.NormalizeToRef(e,t),t},d.NormalizeToRef=function(e,t){t.copyFrom(e),t.normalize()},d.Project=function(e,t,i,r){var n=r.width,o=r.height,s=r.x,a=r.y,l=d._viewportMatrixCache?d._viewportMatrixCache:d._viewportMatrixCache=new h;h.FromValuesToRef(n/2,0,0,0,0,-o/2,0,0,0,0,.5,0,s+n/2,o/2+a,.5,1,l);var c=A.Matrix[0];return t.multiplyToRef(i,c),c.multiplyToRef(l,c),d.TransformCoordinates(e,c)},d.UnprojectFromTransform=function(e,t,i,r,n){var o=A.Matrix[0];r.multiplyToRef(n,o),o.invert(),e.x=e.x/t*2-1,e.y=-(e.y/i*2-1);var s=d.TransformCoordinates(e,o),a=e.x*o.m[3]+e.y*o.m[7]+e.z*o.m[11]+o.m[15];return f.Scalar.WithinEpsilon(a,1)&&(s=s.scale(1/a)),s},d.Unproject=function(e,t,i,r,n,o){var s=d.Zero();return d.UnprojectToRef(e,t,i,r,n,o,s),s},d.UnprojectToRef=function(e,t,i,r,n,o,s){d.UnprojectFloatsToRef(e.x,e.y,e.z,t,i,r,n,o,s)},d.UnprojectFloatsToRef=function(e,t,i,r,n,o,s,a,l){var c=A.Matrix[0];o.multiplyToRef(s,c),c.multiplyToRef(a,c),c.invert();var h=A.Vector3[0];h.x=e/r*2-1,h.y=-(t/n*2-1),h.z=2*i-1,d.TransformCoordinatesToRef(h,c,l);var u=h.x*c.m[3]+h.y*c.m[7]+h.z*c.m[11]+c.m[15];f.Scalar.WithinEpsilon(u,1)&&l.scaleInPlace(1/u)},d.Minimize=function(e,t){var i=e.clone();return i.minimizeInPlace(t),i},d.Maximize=function(e,t){var i=e.clone();return i.maximizeInPlace(t),i},d.Distance=function(e,t){return Math.sqrt(d.DistanceSquared(e,t))},d.DistanceSquared=function(e,t){var i=e.x-t.x,r=e.y-t.y,n=e.z-t.z;return i*i+r*r+n*n},d.Center=function(e,t){var i=e.add(t);return i.scaleInPlace(.5),i},d.RotationFromAxis=function(e,t,i){var r=d.Zero();return d.RotationFromAxisToRef(e,t,i,r),r},d.RotationFromAxisToRef=function(e,t,i,r){var n=A.Quaternion[0];m.RotationQuaternionFromAxisToRef(e,t,i,n),n.toEulerAnglesToRef(r)},d})();f.Vector3=_;var r=(function(){function n(e,t,i,r){this.x=e,this.y=t,this.z=i,this.w=r}return n.prototype.toString=function(){return\"{X: \"+this.x+\" Y:\"+this.y+\" Z:\"+this.z+\" W:\"+this.w+\"}\"},n.prototype.getClassName=function(){return\"Vector4\"},n.prototype.getHashCode=function(){var e=this.x||0;return e=397*(e=397*(e=397*e^(this.y||0))^(this.z||0))^(this.w||0)},n.prototype.asArray=function(){var e=new Array;return this.toArray(e,0),e},n.prototype.toArray=function(e,t){return void 0===t&&(t=0),e[t]=this.x,e[t+1]=this.y,e[t+2]=this.z,e[t+3]=this.w,this},n.prototype.addInPlace=function(e){return this.x+=e.x,this.y+=e.y,this.z+=e.z,this.w+=e.w,this},n.prototype.add=function(e){return new n(this.x+e.x,this.y+e.y,this.z+e.z,this.w+e.w)},n.prototype.addToRef=function(e,t){return t.x=this.x+e.x,t.y=this.y+e.y,t.z=this.z+e.z,t.w=this.w+e.w,this},n.prototype.subtractInPlace=function(e){return this.x-=e.x,this.y-=e.y,this.z-=e.z,this.w-=e.w,this},n.prototype.subtract=function(e){return new n(this.x-e.x,this.y-e.y,this.z-e.z,this.w-e.w)},n.prototype.subtractToRef=function(e,t){return t.x=this.x-e.x,t.y=this.y-e.y,t.z=this.z-e.z,t.w=this.w-e.w,this},n.prototype.subtractFromFloats=function(e,t,i,r){return new n(this.x-e,this.y-t,this.z-i,this.w-r)},n.prototype.subtractFromFloatsToRef=function(e,t,i,r,n){return n.x=this.x-e,n.y=this.y-t,n.z=this.z-i,n.w=this.w-r,this},n.prototype.negate=function(){return new n(-this.x,-this.y,-this.z,-this.w)},n.prototype.scaleInPlace=function(e){return this.x*=e,this.y*=e,this.z*=e,this.w*=e,this},n.prototype.scale=function(e){return new n(this.x*e,this.y*e,this.z*e,this.w*e)},n.prototype.scaleToRef=function(e,t){return t.x=this.x*e,t.y=this.y*e,t.z=this.z*e,t.w=this.w*e,this},n.prototype.scaleAndAddToRef=function(e,t){return t.x+=this.x*e,t.y+=this.y*e,t.z+=this.z*e,t.w+=this.w*e,this},n.prototype.equals=function(e){return e&&this.x===e.x&&this.y===e.y&&this.z===e.z&&this.w===e.w},n.prototype.equalsWithEpsilon=function(e,t){return void 0===t&&(t=f.Epsilon),e&&f.Scalar.WithinEpsilon(this.x,e.x,t)&&f.Scalar.WithinEpsilon(this.y,e.y,t)&&f.Scalar.WithinEpsilon(this.z,e.z,t)&&f.Scalar.WithinEpsilon(this.w,e.w,t)},n.prototype.equalsToFloats=function(e,t,i,r){return this.x===e&&this.y===t&&this.z===i&&this.w===r},n.prototype.multiplyInPlace=function(e){return this.x*=e.x,this.y*=e.y,this.z*=e.z,this.w*=e.w,this},n.prototype.multiply=function(e){return new n(this.x*e.x,this.y*e.y,this.z*e.z,this.w*e.w)},n.prototype.multiplyToRef=function(e,t){return t.x=this.x*e.x,t.y=this.y*e.y,t.z=this.z*e.z,t.w=this.w*e.w,this},n.prototype.multiplyByFloats=function(e,t,i,r){return new n(this.x*e,this.y*t,this.z*i,this.w*r)},n.prototype.divide=function(e){return new n(this.x/e.x,this.y/e.y,this.z/e.z,this.w/e.w)},n.prototype.divideToRef=function(e,t){return t.x=this.x/e.x,t.y=this.y/e.y,t.z=this.z/e.z,t.w=this.w/e.w,this},n.prototype.divideInPlace=function(e){return this.divideToRef(e,this)},n.prototype.minimizeInPlace=function(e){return e.x<this.x&&(this.x=e.x),e.y<this.y&&(this.y=e.y),e.z<this.z&&(this.z=e.z),e.w<this.w&&(this.w=e.w),this},n.prototype.maximizeInPlace=function(e){return e.x>this.x&&(this.x=e.x),e.y>this.y&&(this.y=e.y),e.z>this.z&&(this.z=e.z),e.w>this.w&&(this.w=e.w),this},n.prototype.floor=function(){return new n(Math.floor(this.x),Math.floor(this.y),Math.floor(this.z),Math.floor(this.w))},n.prototype.fract=function(){return new n(this.x-Math.floor(this.x),this.y-Math.floor(this.y),this.z-Math.floor(this.z),this.w-Math.floor(this.w))},n.prototype.length=function(){return Math.sqrt(this.x*this.x+this.y*this.y+this.z*this.z+this.w*this.w)},n.prototype.lengthSquared=function(){return this.x*this.x+this.y*this.y+this.z*this.z+this.w*this.w},n.prototype.normalize=function(){var e=this.length();if(0===e)return this;var t=1/e;return this.x*=t,this.y*=t,this.z*=t,this.w*=t,this},n.prototype.toVector3=function(){return new _(this.x,this.y,this.z)},n.prototype.clone=function(){return new n(this.x,this.y,this.z,this.w)},n.prototype.copyFrom=function(e){return this.x=e.x,this.y=e.y,this.z=e.z,this.w=e.w,this},n.prototype.copyFromFloats=function(e,t,i,r){return this.x=e,this.y=t,this.z=i,this.w=r,this},n.prototype.set=function(e,t,i,r){return this.copyFromFloats(e,t,i,r)},n.FromArray=function(e,t){return t||(t=0),new n(e[t],e[t+1],e[t+2],e[t+3])},n.FromArrayToRef=function(e,t,i){i.x=e[t],i.y=e[t+1],i.z=e[t+2],i.w=e[t+3]},n.FromFloatArrayToRef=function(e,t,i){n.FromArrayToRef(e,t,i)},n.FromFloatsToRef=function(e,t,i,r,n){n.x=e,n.y=t,n.z=i,n.w=r},n.Zero=function(){return new n(0,0,0,0)},n.One=function(){return new n(1,1,1,1)},n.Normalize=function(e){var t=n.Zero();return n.NormalizeToRef(e,t),t},n.NormalizeToRef=function(e,t){t.copyFrom(e),t.normalize()},n.Minimize=function(e,t){var i=e.clone();return i.minimizeInPlace(t),i},n.Maximize=function(e,t){var i=e.clone();return i.maximizeInPlace(t),i},n.Distance=function(e,t){return Math.sqrt(n.DistanceSquared(e,t))},n.DistanceSquared=function(e,t){var i=e.x-t.x,r=e.y-t.y,n=e.z-t.z,o=e.w-t.w;return i*i+r*r+n*n+o*o},n.Center=function(e,t){var i=e.add(t);return i.scaleInPlace(.5),i},n.TransformNormal=function(e,t){var i=n.Zero();return n.TransformNormalToRef(e,t,i),i},n.TransformNormalToRef=function(e,t,i){var r=e.x*t.m[0]+e.y*t.m[4]+e.z*t.m[8],n=e.x*t.m[1]+e.y*t.m[5]+e.z*t.m[9],o=e.x*t.m[2]+e.y*t.m[6]+e.z*t.m[10];i.x=r,i.y=n,i.z=o,i.w=e.w},n.TransformNormalFromFloatsToRef=function(e,t,i,r,n,o){o.x=e*n.m[0]+t*n.m[4]+i*n.m[8],o.y=e*n.m[1]+t*n.m[5]+i*n.m[9],o.z=e*n.m[2]+t*n.m[6]+i*n.m[10],o.w=r},n})();f.Vector4=r;var e=(function(){function r(e,t){this.width=e,this.height=t}return r.prototype.toString=function(){return\"{W: \"+this.width+\", H: \"+this.height+\"}\"},r.prototype.getClassName=function(){return\"Size\"},r.prototype.getHashCode=function(){var e=this.width||0;return e=397*e^(this.height||0)},r.prototype.copyFrom=function(e){this.width=e.width,this.height=e.height},r.prototype.copyFromFloats=function(e,t){return this.width=e,this.height=t,this},r.prototype.set=function(e,t){return this.copyFromFloats(e,t)},r.prototype.multiplyByFloats=function(e,t){return new r(this.width*e,this.height*t)},r.prototype.clone=function(){return new r(this.width,this.height)},r.prototype.equals=function(e){return!!e&&(this.width===e.width&&this.height===e.height)},Object.defineProperty(r.prototype,\"surface\",{get:function(){return this.width*this.height},enumerable:!0,configurable:!0}),r.Zero=function(){return new r(0,0)},r.prototype.add=function(e){return new r(this.width+e.width,this.height+e.height)},r.prototype.subtract=function(e){return new r(this.width-e.width,this.height-e.height)},r.Lerp=function(e,t,i){return new r(e.width+(t.width-e.width)*i,e.height+(t.height-e.height)*i)},r})();f.Size=e;var m=(function(){function u(e,t,i,r){void 0===e&&(e=0),void 0===t&&(t=0),void 0===i&&(i=0),void 0===r&&(r=1),this.x=e,this.y=t,this.z=i,this.w=r}return u.prototype.toString=function(){return\"{X: \"+this.x+\" Y:\"+this.y+\" Z:\"+this.z+\" W:\"+this.w+\"}\"},u.prototype.getClassName=function(){return\"Quaternion\"},u.prototype.getHashCode=function(){var e=this.x||0;return e=397*(e=397*(e=397*e^(this.y||0))^(this.z||0))^(this.w||0)},u.prototype.asArray=function(){return[this.x,this.y,this.z,this.w]},u.prototype.equals=function(e){return e&&this.x===e.x&&this.y===e.y&&this.z===e.z&&this.w===e.w},u.prototype.clone=function(){return new u(this.x,this.y,this.z,this.w)},u.prototype.copyFrom=function(e){return this.x=e.x,this.y=e.y,this.z=e.z,this.w=e.w,this},u.prototype.copyFromFloats=function(e,t,i,r){return this.x=e,this.y=t,this.z=i,this.w=r,this},u.prototype.set=function(e,t,i,r){return this.copyFromFloats(e,t,i,r)},u.prototype.add=function(e){return new u(this.x+e.x,this.y+e.y,this.z+e.z,this.w+e.w)},u.prototype.addInPlace=function(e){return this.x+=e.x,this.y+=e.y,this.z+=e.z,this.w+=e.w,this},u.prototype.subtract=function(e){return new u(this.x-e.x,this.y-e.y,this.z-e.z,this.w-e.w)},u.prototype.scale=function(e){return new u(this.x*e,this.y*e,this.z*e,this.w*e)},u.prototype.scaleToRef=function(e,t){return t.x=this.x*e,t.y=this.y*e,t.z=this.z*e,t.w=this.w*e,this},u.prototype.scaleInPlace=function(e){return this.x*=e,this.y*=e,this.z*=e,this.w*=e,this},u.prototype.scaleAndAddToRef=function(e,t){return t.x+=this.x*e,t.y+=this.y*e,t.z+=this.z*e,t.w+=this.w*e,this},u.prototype.multiply=function(e){var t=new u(0,0,0,1);return this.multiplyToRef(e,t),t},u.prototype.multiplyToRef=function(e,t){var i=this.x*e.w+this.y*e.z-this.z*e.y+this.w*e.x,r=-this.x*e.z+this.y*e.w+this.z*e.x+this.w*e.y,n=this.x*e.y-this.y*e.x+this.z*e.w+this.w*e.z,o=-this.x*e.x-this.y*e.y-this.z*e.z+this.w*e.w;return t.copyFromFloats(i,r,n,o),this},u.prototype.multiplyInPlace=function(e){return this.multiplyToRef(e,this),this},u.prototype.conjugateToRef=function(e){return e.copyFromFloats(-this.x,-this.y,-this.z,this.w),this},u.prototype.conjugateInPlace=function(){return this.x*=-1,this.y*=-1,this.z*=-1,this},u.prototype.conjugate=function(){return new u(-this.x,-this.y,-this.z,this.w)},u.prototype.length=function(){return Math.sqrt(this.x*this.x+this.y*this.y+this.z*this.z+this.w*this.w)},u.prototype.normalize=function(){var e=1/this.length();return this.x*=e,this.y*=e,this.z*=e,this.w*=e,this},u.prototype.toEulerAngles=function(e){void 0===e&&(e=\"YZX\");var t=_.Zero();return this.toEulerAnglesToRef(t,e),t},u.prototype.toEulerAnglesToRef=function(e,t){void 0===t&&(t=\"YZX\");var i=this.z,r=this.x,n=this.y,o=this.w,s=o*o,a=i*i,l=r*r,c=n*n,h=n*i-r*o;return h<-.4999999?(e.y=2*Math.atan2(n,o),e.x=Math.PI/2,e.z=0):.4999999<h?(e.y=2*Math.atan2(n,o),e.x=-Math.PI/2,e.z=0):(e.z=Math.atan2(2*(r*n+i*o),-a-l+c+s),e.x=Math.asin(-2*(i*n-r*o)),e.y=Math.atan2(2*(i*r+n*o),a-l-c+s)),this},u.prototype.toRotationMatrix=function(e){var t=this.x*this.x,i=this.y*this.y,r=this.z*this.z,n=this.x*this.y,o=this.z*this.w,s=this.z*this.x,a=this.y*this.w,l=this.y*this.z,c=this.x*this.w;return e.m[0]=1-2*(i+r),e.m[1]=2*(n+o),e.m[2]=2*(s-a),e.m[3]=0,e.m[4]=2*(n-o),e.m[5]=1-2*(r+t),e.m[6]=2*(l+c),e.m[7]=0,e.m[8]=2*(s+a),e.m[9]=2*(l-c),e.m[10]=1-2*(i+t),e.m[11]=0,e.m[12]=0,e.m[13]=0,e.m[14]=0,e.m[15]=1,e._markAsUpdated(),this},u.prototype.fromRotationMatrix=function(e){return u.FromRotationMatrixToRef(e,this),this},u.FromRotationMatrix=function(e){var t=new u;return u.FromRotationMatrixToRef(e,t),t},u.FromRotationMatrixToRef=function(e,t){var i,r=e.m,n=r[0],o=r[4],s=r[8],a=r[1],l=r[5],c=r[9],h=r[2],u=r[6],d=r[10],f=n+l+d;0<f?(i=.5/Math.sqrt(f+1),t.w=.25/i,t.x=(u-c)*i,t.y=(s-h)*i,t.z=(a-o)*i):l<n&&d<n?(i=2*Math.sqrt(1+n-l-d),t.w=(u-c)/i,t.x=.25*i,t.y=(o+a)/i,t.z=(s+h)/i):d<l?(i=2*Math.sqrt(1+l-n-d),t.w=(s-h)/i,t.x=(o+a)/i,t.y=.25*i,t.z=(c+u)/i):(i=2*Math.sqrt(1+d-n-l),t.w=(a-o)/i,t.x=(s+h)/i,t.y=(c+u)/i,t.z=.25*i)},u.Dot=function(e,t){return e.x*t.x+e.y*t.y+e.z*t.z+e.w*t.w},u.AreClose=function(e,t){return 0<=u.Dot(e,t)},u.Zero=function(){return new u(0,0,0,0)},u.Inverse=function(e){return new u(-e.x,-e.y,-e.z,e.w)},u.Identity=function(){return new u(0,0,0,1)},u.IsIdentity=function(e){return e&&0===e.x&&0===e.y&&0===e.z&&1===e.w},u.RotationAxis=function(e,t){return u.RotationAxisToRef(e,t,new u)},u.RotationAxisToRef=function(e,t,i){var r=Math.sin(t/2);return e.normalize(),i.w=Math.cos(t/2),i.x=e.x*r,i.y=e.y*r,i.z=e.z*r,i},u.FromArray=function(e,t){return t||(t=0),new u(e[t],e[t+1],e[t+2],e[t+3])},u.RotationYawPitchRoll=function(e,t,i){var r=new u;return u.RotationYawPitchRollToRef(e,t,i,r),r},u.RotationYawPitchRollToRef=function(e,t,i,r){var n=.5*i,o=.5*t,s=.5*e,a=Math.sin(n),l=Math.cos(n),c=Math.sin(o),h=Math.cos(o),u=Math.sin(s),d=Math.cos(s);r.x=d*c*l+u*h*a,r.y=u*h*l-d*c*a,r.z=d*h*a-u*c*l,r.w=d*h*l+u*c*a},u.RotationAlphaBetaGamma=function(e,t,i){var r=new u;return u.RotationAlphaBetaGammaToRef(e,t,i,r),r},u.RotationAlphaBetaGammaToRef=function(e,t,i,r){var n=.5*(i+e),o=.5*(i-e),s=.5*t;r.x=Math.cos(o)*Math.sin(s),r.y=Math.sin(o)*Math.sin(s),r.z=Math.sin(n)*Math.cos(s),r.w=Math.cos(n)*Math.cos(s)},u.RotationQuaternionFromAxis=function(e,t,i){var r=new u(0,0,0,0);return u.RotationQuaternionFromAxisToRef(e,t,i,r),r},u.RotationQuaternionFromAxisToRef=function(e,t,i,r){var n=A.Matrix[0];h.FromXYZAxesToRef(e.normalize(),t.normalize(),i.normalize(),n),u.FromRotationMatrixToRef(n,r)},u.Slerp=function(e,t,i){var r=u.Identity();return u.SlerpToRef(e,t,i,r),r},u.SlerpToRef=function(e,t,i,r){var n,o,s=e.x*t.x+e.y*t.y+e.z*t.z+e.w*t.w,a=!1;if(s<0&&(a=!0,s=-s),.999999<s)o=1-i,n=a?-i:i;else{var l=Math.acos(s),c=1/Math.sin(l);o=Math.sin((1-i)*l)*c,n=a?-Math.sin(i*l)*c:Math.sin(i*l)*c}r.x=o*e.x+n*t.x,r.y=o*e.y+n*t.y,r.z=o*e.z+n*t.z,r.w=o*e.w+n*t.w},u.Hermite=function(e,t,i,r,n){var o=n*n,s=n*o,a=2*s-3*o+1,l=-2*s+3*o,c=s-2*o+n,h=s-o;return new u(e.x*a+i.x*l+t.x*c+r.x*h,e.y*a+i.y*l+t.y*c+r.y*h,e.z*a+i.z*l+t.z*c+r.z*h,e.w*a+i.w*l+t.w*c+r.w*h)},u})();f.Quaternion=m;var h=(function(){function g(){this._isIdentity=!1,this._isIdentityDirty=!0,this.m=new Float32Array(16),this._markAsUpdated()}return g.prototype._markAsUpdated=function(){this.updateFlag=g._updateFlagSeed++,this._isIdentityDirty=!0},g.prototype.isIdentity=function(e){return void 0===e&&(e=!1),this._isIdentityDirty&&(this._isIdentityDirty=!1,1!==this.m[0]||1!==this.m[5]||1!==this.m[15]?this._isIdentity=!1:0!==this.m[1]||0!==this.m[2]||0!==this.m[3]||0!==this.m[4]||0!==this.m[6]||0!==this.m[7]||0!==this.m[8]||0!==this.m[9]||0!==this.m[11]||0!==this.m[12]||0!==this.m[13]||0!==this.m[14]?this._isIdentity=!1:this._isIdentity=!0,e||1===this.m[10]||(this._isIdentity=!1)),this._isIdentity},g.prototype.determinant=function(){var e=this.m[10]*this.m[15]-this.m[11]*this.m[14],t=this.m[9]*this.m[15]-this.m[11]*this.m[13],i=this.m[9]*this.m[14]-this.m[10]*this.m[13],r=this.m[8]*this.m[15]-this.m[11]*this.m[12],n=this.m[8]*this.m[14]-this.m[10]*this.m[12],o=this.m[8]*this.m[13]-this.m[9]*this.m[12];return this.m[0]*(this.m[5]*e-this.m[6]*t+this.m[7]*i)-this.m[1]*(this.m[4]*e-this.m[6]*r+this.m[7]*n)+this.m[2]*(this.m[4]*t-this.m[5]*r+this.m[7]*o)-this.m[3]*(this.m[4]*i-this.m[5]*n+this.m[6]*o)},g.prototype.toArray=function(){return this.m},g.prototype.asArray=function(){return this.toArray()},g.prototype.invert=function(){return this.invertToRef(this),this},g.prototype.reset=function(){for(var e=0;e<16;e++)this.m[e]=0;return this._markAsUpdated(),this},g.prototype.add=function(e){var t=new g;return this.addToRef(e,t),t},g.prototype.addToRef=function(e,t){for(var i=0;i<16;i++)t.m[i]=this.m[i]+e.m[i];return t._markAsUpdated(),this},g.prototype.addToSelf=function(e){for(var t=0;t<16;t++)this.m[t]+=e.m[t];return this._markAsUpdated(),this},g.prototype.invertToRef=function(e){var t=this.m[0],i=this.m[1],r=this.m[2],n=this.m[3],o=this.m[4],s=this.m[5],a=this.m[6],l=this.m[7],c=this.m[8],h=this.m[9],u=this.m[10],d=this.m[11],f=this.m[12],p=this.m[13],_=this.m[14],m=this.m[15],g=u*m-d*_,v=h*m-d*p,y=h*_-u*p,b=c*m-d*f,T=c*_-u*f,E=c*p-h*f,x=s*g-a*v+l*y,P=-(o*g-a*b+l*T),A=o*v-s*b+l*E,S=-(o*y-s*T+a*E),M=1/(t*x+i*P+r*A+n*S),R=a*m-l*_,C=s*m-l*p,O=s*_-a*p,D=o*m-l*f,I=o*_-a*f,w=o*p-s*f,L=a*d-l*u,F=s*d-l*h,B=s*u-a*h,N=o*d-l*c,V=o*u-a*c,U=o*h-s*c;return e.m[0]=x*M,e.m[4]=P*M,e.m[8]=A*M,e.m[12]=S*M,e.m[1]=-(i*g-r*v+n*y)*M,e.m[5]=(t*g-r*b+n*T)*M,e.m[9]=-(t*v-i*b+n*E)*M,e.m[13]=(t*y-i*T+r*E)*M,e.m[2]=(i*R-r*C+n*O)*M,e.m[6]=-(t*R-r*D+n*I)*M,e.m[10]=(t*C-i*D+n*w)*M,e.m[14]=-(t*O-i*I+r*w)*M,e.m[3]=-(i*L-r*F+n*B)*M,e.m[7]=(t*L-r*N+n*V)*M,e.m[11]=-(t*F-i*N+n*U)*M,e.m[15]=(t*B-i*V+r*U)*M,e._markAsUpdated(),this},g.prototype.setTranslationFromFloats=function(e,t,i){return this.m[12]=e,this.m[13]=t,this.m[14]=i,this._markAsUpdated(),this},g.prototype.setTranslation=function(e){return this.m[12]=e.x,this.m[13]=e.y,this.m[14]=e.z,this._markAsUpdated(),this},g.prototype.getTranslation=function(){return new _(this.m[12],this.m[13],this.m[14])},g.prototype.getTranslationToRef=function(e){return e.x=this.m[12],e.y=this.m[13],e.z=this.m[14],this},g.prototype.removeRotationAndScaling=function(){return this.setRowFromFloats(0,1,0,0,0),this.setRowFromFloats(1,0,1,0,0),this.setRowFromFloats(2,0,0,1,0),this},g.prototype.multiply=function(e){var t=new g;return this.multiplyToRef(e,t),t},g.prototype.copyFrom=function(e){for(var t=0;t<16;t++)this.m[t]=e.m[t];return this._markAsUpdated(),this},g.prototype.copyToArray=function(e,t){void 0===t&&(t=0);for(var i=0;i<16;i++)e[t+i]=this.m[i];return this},g.prototype.multiplyToRef=function(e,t){return this.multiplyToArray(e,t.m,0),t._markAsUpdated(),this},g.prototype.multiplyToArray=function(e,t,i){var r=this.m[0],n=this.m[1],o=this.m[2],s=this.m[3],a=this.m[4],l=this.m[5],c=this.m[6],h=this.m[7],u=this.m[8],d=this.m[9],f=this.m[10],p=this.m[11],_=this.m[12],m=this.m[13],g=this.m[14],v=this.m[15],y=e.m[0],b=e.m[1],T=e.m[2],E=e.m[3],x=e.m[4],P=e.m[5],A=e.m[6],S=e.m[7],M=e.m[8],R=e.m[9],C=e.m[10],O=e.m[11],D=e.m[12],I=e.m[13],w=e.m[14],L=e.m[15];return t[i]=r*y+n*x+o*M+s*D,t[i+1]=r*b+n*P+o*R+s*I,t[i+2]=r*T+n*A+o*C+s*w,t[i+3]=r*E+n*S+o*O+s*L,t[i+4]=a*y+l*x+c*M+h*D,t[i+5]=a*b+l*P+c*R+h*I,t[i+6]=a*T+l*A+c*C+h*w,t[i+7]=a*E+l*S+c*O+h*L,t[i+8]=u*y+d*x+f*M+p*D,t[i+9]=u*b+d*P+f*R+p*I,t[i+10]=u*T+d*A+f*C+p*w,t[i+11]=u*E+d*S+f*O+p*L,t[i+12]=_*y+m*x+g*M+v*D,t[i+13]=_*b+m*P+g*R+v*I,t[i+14]=_*T+m*A+g*C+v*w,t[i+15]=_*E+m*S+g*O+v*L,this},g.prototype.equals=function(e){return e&&this.m[0]===e.m[0]&&this.m[1]===e.m[1]&&this.m[2]===e.m[2]&&this.m[3]===e.m[3]&&this.m[4]===e.m[4]&&this.m[5]===e.m[5]&&this.m[6]===e.m[6]&&this.m[7]===e.m[7]&&this.m[8]===e.m[8]&&this.m[9]===e.m[9]&&this.m[10]===e.m[10]&&this.m[11]===e.m[11]&&this.m[12]===e.m[12]&&this.m[13]===e.m[13]&&this.m[14]===e.m[14]&&this.m[15]===e.m[15]},g.prototype.clone=function(){return g.FromValues(this.m[0],this.m[1],this.m[2],this.m[3],this.m[4],this.m[5],this.m[6],this.m[7],this.m[8],this.m[9],this.m[10],this.m[11],this.m[12],this.m[13],this.m[14],this.m[15])},g.prototype.getClassName=function(){return\"Matrix\"},g.prototype.getHashCode=function(){for(var e=this.m[0]||0,t=1;t<16;t++)e=397*e^(this.m[t]||0);return e},g.prototype.decompose=function(e,t,i){return i&&(i.x=this.m[12],i.y=this.m[13],i.z=this.m[14]),(e=e||A.Vector3[0]).x=Math.sqrt(this.m[0]*this.m[0]+this.m[1]*this.m[1]+this.m[2]*this.m[2]),e.y=Math.sqrt(this.m[4]*this.m[4]+this.m[5]*this.m[5]+this.m[6]*this.m[6]),e.z=Math.sqrt(this.m[8]*this.m[8]+this.m[9]*this.m[9]+this.m[10]*this.m[10]),this.determinant()<=0&&(e.y*=-1),0===e.x||0===e.y||0===e.z?(t&&(t.x=0,t.y=0,t.z=0,t.w=1),!1):(t&&(g.FromValuesToRef(this.m[0]/e.x,this.m[1]/e.x,this.m[2]/e.x,0,this.m[4]/e.y,this.m[5]/e.y,this.m[6]/e.y,0,this.m[8]/e.z,this.m[9]/e.z,this.m[10]/e.z,0,0,0,0,1,A.Matrix[0]),m.FromRotationMatrixToRef(A.Matrix[0],t)),!0)},g.prototype.getRow=function(e){if(e<0||3<e)return null;var t=4*e;return new r(this.m[t+0],this.m[t+1],this.m[t+2],this.m[t+3])},g.prototype.setRow=function(e,t){if(e<0||3<e)return this;var i=4*e;return this.m[i+0]=t.x,this.m[i+1]=t.y,this.m[i+2]=t.z,this.m[i+3]=t.w,this._markAsUpdated(),this},g.prototype.transpose=function(){return g.Transpose(this)},g.prototype.transposeToRef=function(e){return g.TransposeToRef(this,e),this},g.prototype.setRowFromFloats=function(e,t,i,r,n){if(e<0||3<e)return this;var o=4*e;return this.m[o+0]=t,this.m[o+1]=i,this.m[o+2]=r,this.m[o+3]=n,this._markAsUpdated(),this},g.prototype.scale=function(e){var t=new g;return this.scaleToRef(e,t),t},g.prototype.scaleToRef=function(e,t){for(var i=0;i<16;i++)t.m[i]=this.m[i]*e;return t._markAsUpdated(),this},g.prototype.scaleAndAddToRef=function(e,t){for(var i=0;i<16;i++)t.m[i]+=this.m[i]*e;return t._markAsUpdated(),this},g.prototype.toNormalMatrix=function(e){this.invertToRef(e),e.transpose();var t=e.m;g.FromValuesToRef(t[0],t[1],t[2],0,t[4],t[5],t[6],0,t[8],t[9],t[10],0,0,0,0,1,e)},g.prototype.getRotationMatrix=function(){var e=g.Identity();return this.getRotationMatrixToRef(e),e},g.prototype.getRotationMatrixToRef=function(e){var t=this.m,i=Math.sqrt(t[0]*t[0]+t[1]*t[1]+t[2]*t[2]),r=Math.sqrt(t[4]*t[4]+t[5]*t[5]+t[6]*t[6]),n=Math.sqrt(t[8]*t[8]+t[9]*t[9]+t[10]*t[10]);return this.determinant()<=0&&(r*=-1),0===i||0===r||0===n?g.IdentityToRef(e):g.FromValuesToRef(t[0]/i,t[1]/i,t[2]/i,0,t[4]/r,t[5]/r,t[6]/r,0,t[8]/n,t[9]/n,t[10]/n,0,0,0,0,1,e),this},g.FromArray=function(e,t){var i=new g;return t||(t=0),g.FromArrayToRef(e,t,i),i},g.FromArrayToRef=function(e,t,i){for(var r=0;r<16;r++)i.m[r]=e[r+t];i._markAsUpdated()},g.FromFloat32ArrayToRefScaled=function(e,t,i,r){for(var n=0;n<16;n++)r.m[n]=e[n+t]*i;r._markAsUpdated()},g.FromValuesToRef=function(e,t,i,r,n,o,s,a,l,c,h,u,d,f,p,_,m){m.m[0]=e,m.m[1]=t,m.m[2]=i,m.m[3]=r,m.m[4]=n,m.m[5]=o,m.m[6]=s,m.m[7]=a,m.m[8]=l,m.m[9]=c,m.m[10]=h,m.m[11]=u,m.m[12]=d,m.m[13]=f,m.m[14]=p,m.m[15]=_,m._markAsUpdated()},Object.defineProperty(g,\"IdentityReadOnly\",{get:function(){return g._identityReadOnly},enumerable:!0,configurable:!0}),g.FromValues=function(e,t,i,r,n,o,s,a,l,c,h,u,d,f,p,_){var m=new g;return m.m[0]=e,m.m[1]=t,m.m[2]=i,m.m[3]=r,m.m[4]=n,m.m[5]=o,m.m[6]=s,m.m[7]=a,m.m[8]=l,m.m[9]=c,m.m[10]=h,m.m[11]=u,m.m[12]=d,m.m[13]=f,m.m[14]=p,m.m[15]=_,m},g.Compose=function(e,t,i){var r=g.Identity();return g.ComposeToRef(e,t,i,r),r},g.ComposeToRef=function(e,t,i,r){g.FromValuesToRef(e.x,0,0,0,0,e.y,0,0,0,0,e.z,0,0,0,0,1,A.Matrix[1]),t.toRotationMatrix(A.Matrix[0]),A.Matrix[1].multiplyToRef(A.Matrix[0],r),r.setTranslation(i)},g.Identity=function(){return g.FromValues(1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1)},g.IdentityToRef=function(e){g.FromValuesToRef(1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1,e)},g.Zero=function(){return g.FromValues(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0)},g.RotationX=function(e){var t=new g;return g.RotationXToRef(e,t),t},g.Invert=function(e){var t=new g;return e.invertToRef(t),t},g.RotationXToRef=function(e,t){var i=Math.sin(e),r=Math.cos(e);t.m[0]=1,t.m[15]=1,t.m[5]=r,t.m[10]=r,t.m[9]=-i,t.m[6]=i,t.m[1]=0,t.m[2]=0,t.m[3]=0,t.m[4]=0,t.m[7]=0,t.m[8]=0,t.m[11]=0,t.m[12]=0,t.m[13]=0,t.m[14]=0,t._markAsUpdated()},g.RotationY=function(e){var t=new g;return g.RotationYToRef(e,t),t},g.RotationYToRef=function(e,t){var i=Math.sin(e),r=Math.cos(e);t.m[5]=1,t.m[15]=1,t.m[0]=r,t.m[2]=-i,t.m[8]=i,t.m[10]=r,t.m[1]=0,t.m[3]=0,t.m[4]=0,t.m[6]=0,t.m[7]=0,t.m[9]=0,t.m[11]=0,t.m[12]=0,t.m[13]=0,t.m[14]=0,t._markAsUpdated()},g.RotationZ=function(e){var t=new g;return g.RotationZToRef(e,t),t},g.RotationZToRef=function(e,t){var i=Math.sin(e),r=Math.cos(e);t.m[10]=1,t.m[15]=1,t.m[0]=r,t.m[1]=i,t.m[4]=-i,t.m[5]=r,t.m[2]=0,t.m[3]=0,t.m[6]=0,t.m[7]=0,t.m[8]=0,t.m[9]=0,t.m[11]=0,t.m[12]=0,t.m[13]=0,t.m[14]=0,t._markAsUpdated()},g.RotationAxis=function(e,t){var i=g.Zero();return g.RotationAxisToRef(e,t,i),i},g.RotationAxisToRef=function(e,t,i){var r=Math.sin(-t),n=Math.cos(-t),o=1-n;e.normalize(),i.m[0]=e.x*e.x*o+n,i.m[1]=e.x*e.y*o-e.z*r,i.m[2]=e.x*e.z*o+e.y*r,i.m[3]=0,i.m[4]=e.y*e.x*o+e.z*r,i.m[5]=e.y*e.y*o+n,i.m[6]=e.y*e.z*o-e.x*r,i.m[7]=0,i.m[8]=e.z*e.x*o-e.y*r,i.m[9]=e.z*e.y*o+e.x*r,i.m[10]=e.z*e.z*o+n,i.m[11]=0,i.m[15]=1,i._markAsUpdated()},g.RotationYawPitchRoll=function(e,t,i){var r=new g;return g.RotationYawPitchRollToRef(e,t,i,r),r},g.RotationYawPitchRollToRef=function(e,t,i,r){m.RotationYawPitchRollToRef(e,t,i,this._tempQuaternion),this._tempQuaternion.toRotationMatrix(r)},g.Scaling=function(e,t,i){var r=g.Zero();return g.ScalingToRef(e,t,i,r),r},g.ScalingToRef=function(e,t,i,r){r.m[0]=e,r.m[1]=0,r.m[2]=0,r.m[3]=0,r.m[4]=0,r.m[5]=t,r.m[6]=0,r.m[7]=0,r.m[8]=0,r.m[9]=0,r.m[10]=i,r.m[11]=0,r.m[12]=0,r.m[13]=0,r.m[14]=0,r.m[15]=1,r._markAsUpdated()},g.Translation=function(e,t,i){var r=g.Identity();return g.TranslationToRef(e,t,i,r),r},g.TranslationToRef=function(e,t,i,r){g.FromValuesToRef(1,0,0,0,0,1,0,0,0,0,1,0,e,t,i,1,r)},g.Lerp=function(e,t,i){var r=g.Zero();return g.LerpToRef(e,t,i,r),r},g.LerpToRef=function(e,t,i,r){for(var n=0;n<16;n++)r.m[n]=e.m[n]*(1-i)+t.m[n]*i;r._markAsUpdated()},g.DecomposeLerp=function(e,t,i){var r=g.Zero();return g.DecomposeLerpToRef(e,t,i,r),r},g.DecomposeLerpToRef=function(e,t,i,r){var n=A.Vector3[0],o=A.Quaternion[0],s=A.Vector3[1];e.decompose(n,o,s);var a=A.Vector3[2],l=A.Quaternion[1],c=A.Vector3[3];t.decompose(a,l,c);var h=A.Vector3[4];_.LerpToRef(n,a,i,h);var u=A.Quaternion[2];m.SlerpToRef(o,l,i,u);var d=A.Vector3[5];_.LerpToRef(s,c,i,d),g.ComposeToRef(h,u,d,r)},g.LookAtLH=function(e,t,i){var r=g.Zero();return g.LookAtLHToRef(e,t,i,r),r},g.LookAtLHToRef=function(e,t,i,r){t.subtractToRef(e,this._zAxis),this._zAxis.normalize(),_.CrossToRef(i,this._zAxis,this._xAxis),0===this._xAxis.lengthSquared()?this._xAxis.x=1:this._xAxis.normalize(),_.CrossToRef(this._zAxis,this._xAxis,this._yAxis),this._yAxis.normalize();var n=-_.Dot(this._xAxis,e),o=-_.Dot(this._yAxis,e),s=-_.Dot(this._zAxis,e);return g.FromValuesToRef(this._xAxis.x,this._yAxis.x,this._zAxis.x,0,this._xAxis.y,this._yAxis.y,this._zAxis.y,0,this._xAxis.z,this._yAxis.z,this._zAxis.z,0,n,o,s,1,r)},g.LookAtRH=function(e,t,i){var r=g.Zero();return g.LookAtRHToRef(e,t,i,r),r},g.LookAtRHToRef=function(e,t,i,r){e.subtractToRef(t,this._zAxis),this._zAxis.normalize(),_.CrossToRef(i,this._zAxis,this._xAxis),0===this._xAxis.lengthSquared()?this._xAxis.x=1:this._xAxis.normalize(),_.CrossToRef(this._zAxis,this._xAxis,this._yAxis),this._yAxis.normalize();var n=-_.Dot(this._xAxis,e),o=-_.Dot(this._yAxis,e),s=-_.Dot(this._zAxis,e);return g.FromValuesToRef(this._xAxis.x,this._yAxis.x,this._zAxis.x,0,this._xAxis.y,this._yAxis.y,this._zAxis.y,0,this._xAxis.z,this._yAxis.z,this._zAxis.z,0,n,o,s,1,r)},g.OrthoLH=function(e,t,i,r){var n=g.Zero();return g.OrthoLHToRef(e,t,i,r,n),n},g.OrthoLHToRef=function(e,t,i,r,n){g.FromValuesToRef(2/e,0,0,0,0,2/t,0,0,0,0,2/(r-i),0,0,0,-(r+i)/(r-i),1,n)},g.OrthoOffCenterLH=function(e,t,i,r,n,o){var s=g.Zero();return g.OrthoOffCenterLHToRef(e,t,i,r,n,o,s),s},g.OrthoOffCenterLHToRef=function(e,t,i,r,n,o,s){g.FromValuesToRef(2/(t-e),0,0,0,0,2/(r-i),0,0,0,0,2/(o-n),0,(e+t)/(e-t),(r+i)/(i-r),-(o+n)/(o-n),1,s)},g.OrthoOffCenterRH=function(e,t,i,r,n,o){var s=g.Zero();return g.OrthoOffCenterRHToRef(e,t,i,r,n,o,s),s},g.OrthoOffCenterRHToRef=function(e,t,i,r,n,o,s){g.OrthoOffCenterLHToRef(e,t,i,r,n,o,s),s.m[10]*=-1},g.PerspectiveLH=function(e,t,i,r){var n=g.Zero();return g.FromValuesToRef(2*i/e,0,0,0,0,2*i/t,0,0,0,0,(r+i)/(r-i),1,0,0,-2*r*i/(r-i),0,n),n},g.PerspectiveFovLH=function(e,t,i,r){var n=g.Zero();return g.PerspectiveFovLHToRef(e,t,i,r,n),n},g.PerspectiveFovLHToRef=function(e,t,i,r,n,o){void 0===o&&(o=!0);var s=i,a=r,l=1/Math.tan(.5*e);g.FromValuesToRef(o?l/t:l,0,0,0,0,o?l:l*t,0,0,0,0,(a+s)/(a-s),1,0,0,-2*a*s/(a-s),0,n)},g.PerspectiveFovRH=function(e,t,i,r){var n=g.Zero();return g.PerspectiveFovRHToRef(e,t,i,r,n),n},g.PerspectiveFovRHToRef=function(e,t,i,r,n,o){void 0===o&&(o=!0);var s=i,a=r,l=1/Math.tan(.5*e);g.FromValuesToRef(o?l/t:l,0,0,0,0,o?l:l*t,0,0,0,0,-(a+s)/(a-s),-1,0,0,-2*a*s/(a-s),0,n)},g.PerspectiveFovWebVRToRef=function(e,t,i,r,n){void 0===n&&(n=!1);var o=n?-1:1,s=Math.tan(e.upDegrees*Math.PI/180),a=Math.tan(e.downDegrees*Math.PI/180),l=Math.tan(e.leftDegrees*Math.PI/180),c=Math.tan(e.rightDegrees*Math.PI/180),h=2/(l+c),u=2/(s+a);r.m[0]=h,r.m[1]=r.m[2]=r.m[3]=r.m[4]=0,r.m[5]=u,r.m[6]=r.m[7]=0,r.m[8]=(l-c)*h*.5,r.m[9]=-(s-a)*u*.5,r.m[10]=-i/(t-i),r.m[11]=1*o,r.m[12]=r.m[13]=r.m[15]=0,r.m[14]=-2*i*t/(i-t),r._markAsUpdated()},g.GetFinalMatrix=function(e,t,i,r,n,o){var s=e.width,a=e.height,l=e.x,c=e.y,h=g.FromValues(s/2,0,0,0,0,-a/2,0,0,0,0,o-n,0,l+s/2,a/2+c,n,1);return t.multiply(i).multiply(r).multiply(h)},g.GetAsMatrix2x2=function(e){return new Float32Array([e.m[0],e.m[1],e.m[4],e.m[5]])},g.GetAsMatrix3x3=function(e){return new Float32Array([e.m[0],e.m[1],e.m[2],e.m[4],e.m[5],e.m[6],e.m[8],e.m[9],e.m[10]])},g.Transpose=function(e){var t=new g;return g.TransposeToRef(e,t),t},g.TransposeToRef=function(e,t){t.m[0]=e.m[0],t.m[1]=e.m[4],t.m[2]=e.m[8],t.m[3]=e.m[12],t.m[4]=e.m[1],t.m[5]=e.m[5],t.m[6]=e.m[9],t.m[7]=e.m[13],t.m[8]=e.m[2],t.m[9]=e.m[6],t.m[10]=e.m[10],t.m[11]=e.m[14],t.m[12]=e.m[3],t.m[13]=e.m[7],t.m[14]=e.m[11],t.m[15]=e.m[15]},g.Reflection=function(e){var t=new g;return g.ReflectionToRef(e,t),t},g.ReflectionToRef=function(e,t){e.normalize();var i=e.normal.x,r=e.normal.y,n=e.normal.z,o=-2*i,s=-2*r,a=-2*n;t.m[0]=o*i+1,t.m[1]=s*i,t.m[2]=a*i,t.m[3]=0,t.m[4]=o*r,t.m[5]=s*r+1,t.m[6]=a*r,t.m[7]=0,t.m[8]=o*n,t.m[9]=s*n,t.m[10]=a*n+1,t.m[11]=0,t.m[12]=o*e.d,t.m[13]=s*e.d,t.m[14]=a*e.d,t.m[15]=1,t._markAsUpdated()},g.FromXYZAxesToRef=function(e,t,i,r){r.m[0]=e.x,r.m[1]=e.y,r.m[2]=e.z,r.m[3]=0,r.m[4]=t.x,r.m[5]=t.y,r.m[6]=t.z,r.m[7]=0,r.m[8]=i.x,r.m[9]=i.y,r.m[10]=i.z,r.m[11]=0,r.m[12]=0,r.m[13]=0,r.m[14]=0,r.m[15]=1,r._markAsUpdated()},g.FromQuaternionToRef=function(e,t){var i=e.x*e.x,r=e.y*e.y,n=e.z*e.z,o=e.x*e.y,s=e.z*e.w,a=e.z*e.x,l=e.y*e.w,c=e.y*e.z,h=e.x*e.w;t.m[0]=1-2*(r+n),t.m[1]=2*(o+s),t.m[2]=2*(a-l),t.m[3]=0,t.m[4]=2*(o-s),t.m[5]=1-2*(n+i),t.m[6]=2*(c+h),t.m[7]=0,t.m[8]=2*(a+l),t.m[9]=2*(c-h),t.m[10]=1-2*(r+i),t.m[11]=0,t.m[12]=0,t.m[13]=0,t.m[14]=0,t.m[15]=1,t._markAsUpdated()},g._tempQuaternion=new m,g._xAxis=_.Zero(),g._yAxis=_.Zero(),g._zAxis=_.Zero(),g._updateFlagSeed=0,g._identityReadOnly=g.Identity(),g})();f.Matrix=h;var n=(function(){function s(e,t,i,r){this.normal=new _(e,t,i),this.d=r}return s.prototype.asArray=function(){return[this.normal.x,this.normal.y,this.normal.z,this.d]},s.prototype.clone=function(){return new s(this.normal.x,this.normal.y,this.normal.z,this.d)},s.prototype.getClassName=function(){return\"Plane\"},s.prototype.getHashCode=function(){var e=this.normal.getHashCode();return e=397*e^(this.d||0)},s.prototype.normalize=function(){var e=Math.sqrt(this.normal.x*this.normal.x+this.normal.y*this.normal.y+this.normal.z*this.normal.z),t=0;return 0!==e&&(t=1/e),this.normal.x*=t,this.normal.y*=t,this.normal.z*=t,this.d*=t,this},s.prototype.transform=function(e){var t=h.Transpose(e),i=this.normal.x,r=this.normal.y,n=this.normal.z,o=this.d;return new s(i*t.m[0]+r*t.m[1]+n*t.m[2]+o*t.m[3],i*t.m[4]+r*t.m[5]+n*t.m[6]+o*t.m[7],i*t.m[8]+r*t.m[9]+n*t.m[10]+o*t.m[11],i*t.m[12]+r*t.m[13]+n*t.m[14]+o*t.m[15])},s.prototype.dotCoordinate=function(e){return this.normal.x*e.x+this.normal.y*e.y+this.normal.z*e.z+this.d},s.prototype.copyFromPoints=function(e,t,i){var r,n=t.x-e.x,o=t.y-e.y,s=t.z-e.z,a=i.x-e.x,l=i.y-e.y,c=i.z-e.z,h=o*c-s*l,u=s*a-n*c,d=n*l-o*a,f=Math.sqrt(h*h+u*u+d*d);return r=0!==f?1/f:0,this.normal.x=h*r,this.normal.y=u*r,this.normal.z=d*r,this.d=-(this.normal.x*e.x+this.normal.y*e.y+this.normal.z*e.z),this},s.prototype.isFrontFacingTo=function(e,t){return _.Dot(this.normal,e)<=t},s.prototype.signedDistanceTo=function(e){return _.Dot(e,this.normal)+this.d},s.FromArray=function(e){return new s(e[0],e[1],e[2],e[3])},s.FromPoints=function(e,t,i){var r=new s(0,0,0,0);return r.copyFromPoints(e,t,i),r},s.FromPositionAndNormal=function(e,t){var i=new s(0,0,0,0);return t.normalize(),i.normal=t,i.d=-(t.x*e.x+t.y*e.y+t.z*e.z),i},s.SignedDistanceToPlaneFromPositionAndNormal=function(e,t,i){var r=-(t.x*e.x+t.y*e.y+t.z*e.z);return _.Dot(i,t)+r},s})();f.Plane=n;var o=(function(){function n(e,t,i,r){this.x=e,this.y=t,this.width=i,this.height=r}return n.prototype.toGlobal=function(e,t){if(e.getRenderWidth){var i=e;return this.toGlobal(i.getRenderWidth(),i.getRenderHeight())}var r=e;return new n(this.x*r,this.y*t,this.width*r,this.height*t)},n.prototype.clone=function(){return new n(this.x,this.y,this.width,this.height)},n})();f.Viewport=o;var s,a=(function(){function r(){}return r.GetPlanes=function(e){for(var t=[],i=0;i<6;i++)t.push(new n(0,0,0,0));return r.GetPlanesToRef(e,t),t},r.GetNearPlaneToRef=function(e,t){t.normal.x=e.m[3]+e.m[2],t.normal.y=e.m[7]+e.m[6],t.normal.z=e.m[11]+e.m[10],t.d=e.m[15]+e.m[14],t.normalize()},r.GetFarPlaneToRef=function(e,t){t.normal.x=e.m[3]-e.m[2],t.normal.y=e.m[7]-e.m[6],t.normal.z=e.m[11]-e.m[10],t.d=e.m[15]-e.m[14],t.normalize()},r.GetLeftPlaneToRef=function(e,t){t.normal.x=e.m[3]+e.m[0],t.normal.y=e.m[7]+e.m[4],t.normal.z=e.m[11]+e.m[8],t.d=e.m[15]+e.m[12],t.normalize()},r.GetRightPlaneToRef=function(e,t){t.normal.x=e.m[3]-e.m[0],t.normal.y=e.m[7]-e.m[4],t.normal.z=e.m[11]-e.m[8],t.d=e.m[15]-e.m[12],t.normalize()},r.GetTopPlaneToRef=function(e,t){t.normal.x=e.m[3]-e.m[1],t.normal.y=e.m[7]-e.m[5],t.normal.z=e.m[11]-e.m[9],t.d=e.m[15]-e.m[13],t.normalize()},r.GetBottomPlaneToRef=function(e,t){t.normal.x=e.m[3]+e.m[1],t.normal.y=e.m[7]+e.m[5],t.normal.z=e.m[11]+e.m[9],t.d=e.m[15]+e.m[13],t.normalize()},r.GetPlanesToRef=function(e,t){r.GetNearPlaneToRef(e,t[0]),r.GetFarPlaneToRef(e,t[1]),r.GetLeftPlaneToRef(e,t[2]),r.GetRightPlaneToRef(e,t[3]),r.GetTopPlaneToRef(e,t[4]),r.GetBottomPlaneToRef(e,t[5])},r})();f.Frustum=a,(s=f.Space||(f.Space={}))[s.LOCAL=0]=\"LOCAL\",s[s.WORLD=1]=\"WORLD\",s[s.BONE=2]=\"BONE\";var l=(function(){function e(){}return e.X=new _(1,0,0),e.Y=new _(0,1,0),e.Z=new _(0,0,1),e})();f.Axis=l;var g,c,u=(function(){function e(){}return e.Interpolate=function(e,t,i,r,n){for(var o=1-3*r+3*t,s=3*r-6*t,a=3*t,l=e,c=0;c<5;c++){var h=l*l;l-=(o*(h*l)+s*h+a*l-e)*(1/(3*o*h+2*s*l+a)),l=Math.min(1,Math.max(0,l))}return 3*Math.pow(1-l,2)*l*i+3*(1-l)*Math.pow(l,2)*n+Math.pow(l,3)},e})();f.BezierCurve=u,(c=g=f.Orientation||(f.Orientation={}))[c.CW=0]=\"CW\",c[c.CCW=1]=\"CCW\";var d=(function(){function r(e){this._radians=e,this._radians<0&&(this._radians+=2*Math.PI)}return r.prototype.degrees=function(){return 180*this._radians/Math.PI},r.prototype.radians=function(){return this._radians},r.BetweenTwoPoints=function(e,t){var i=t.subtract(e);return new r(Math.atan2(i.y,i.x))},r.FromRadians=function(e){return new r(e)},r.FromDegrees=function(e){return new r(e*Math.PI/180)},r})();f.Angle=d;var v=function(e,t,i){this.startPoint=e,this.midPoint=t,this.endPoint=i;var r=Math.pow(t.x,2)+Math.pow(t.y,2),n=(Math.pow(e.x,2)+Math.pow(e.y,2)-r)/2,o=(r-Math.pow(i.x,2)-Math.pow(i.y,2))/2,s=(e.x-t.x)*(t.y-i.y)-(t.x-i.x)*(e.y-t.y);this.centerPoint=new p((n*(t.y-i.y)-o*(e.y-t.y))/s,((e.x-t.x)*o-(t.x-i.x)*n)/s),this.radius=this.centerPoint.subtract(this.startPoint).length(),this.startAngle=d.BetweenTwoPoints(this.centerPoint,this.startPoint);var a=this.startAngle.degrees(),l=d.BetweenTwoPoints(this.centerPoint,this.midPoint).degrees(),c=d.BetweenTwoPoints(this.centerPoint,this.endPoint).degrees();180<l-a&&(l-=360),l-a<-180&&(l+=360),180<c-l&&(c-=360),c-l<-180&&(c+=360),this.orientation=l-a<0?g.CW:g.CCW,this.angle=d.FromDegrees(this.orientation===g.CW?a-c:c-a)};f.Arc2=v;var y=(function(){function i(e,t){this._points=new Array,this._length=0,this.closed=!1,this._points.push(new p(e,t))}return i.prototype.addLineTo=function(e,t){if(this.closed)return this;var i=new p(e,t),r=this._points[this._points.length-1];return this._points.push(i),this._length+=i.subtract(r).length(),this},i.prototype.addArcTo=function(e,t,i,r,n){if(void 0===n&&(n=36),this.closed)return this;var o=this._points[this._points.length-1],s=new p(e,t),a=new p(i,r),l=new v(o,s,a),c=l.angle.radians()/n;l.orientation===g.CW&&(c*=-1);for(var h=l.startAngle.radians()+c,u=0;u<n;u++){var d=Math.cos(h)*l.radius+l.centerPoint.x,f=Math.sin(h)*l.radius+l.centerPoint.y;this.addLineTo(d,f),h+=c}return this},i.prototype.close=function(){return this.closed=!0,this},i.prototype.length=function(){var e=this._length;if(!this.closed){var t=this._points[this._points.length-1];e+=this._points[0].subtract(t).length()}return e},i.prototype.getPoints=function(){return this._points},i.prototype.getPointAtLengthPosition=function(e){if(e<0||1<e)return p.Zero();for(var t=e*this.length(),i=0,r=0;r<this._points.length;r++){var n=(r+1)%this._points.length,o=this._points[r],s=this._points[n].subtract(o),a=s.length()+i;if(i<=t&&t<=a){var l=s.normalize(),c=t-i;return new p(o.x+l.x*c,o.y+l.y*c)}i=a}return p.Zero()},i.StartingAt=function(e,t){return new i(e,t)},i})();f.Path2=y;var b=(function(){function e(e,t,i){void 0===t&&(t=null),this.path=e,this._curve=new Array,this._distances=new Array,this._tangents=new Array,this._normals=new Array,this._binormals=new Array;for(var r=0;r<e.length;r++)this._curve[r]=e[r].clone();this._raw=i||!1,this._compute(t)}return e.prototype.getCurve=function(){return this._curve},e.prototype.getTangents=function(){return this._tangents},e.prototype.getNormals=function(){return this._normals},e.prototype.getBinormals=function(){return this._binormals},e.prototype.getDistances=function(){return this._distances},e.prototype.update=function(e,t){void 0===t&&(t=null);for(var i=0;i<e.length;i++)this._curve[i].x=e[i].x,this._curve[i].y=e[i].y,this._curve[i].z=e[i].z;return this._compute(t),this},e.prototype._compute=function(e){var t=this._curve.length;this._tangents[0]=this._getFirstNonNullVector(0),this._raw||this._tangents[0].normalize(),this._tangents[t-1]=this._curve[t-1].subtract(this._curve[t-2]),this._raw||this._tangents[t-1].normalize();var i,r,n,o,s=this._tangents[0],a=this._normalVector(this._curve[0],s,e);this._normals[0]=a,this._raw||this._normals[0].normalize(),this._binormals[0]=_.Cross(s,this._normals[0]),this._raw||this._binormals[0].normalize(),this._distances[0]=0;for(var l=1;l<t;l++)i=this._getLastNonNullVector(l),l<t-1&&(r=this._getFirstNonNullVector(l),this._tangents[l]=i.add(r),this._tangents[l].normalize()),this._distances[l]=this._distances[l-1]+i.length(),n=this._tangents[l],o=this._binormals[l-1],this._normals[l]=_.Cross(o,n),this._raw||this._normals[l].normalize(),this._binormals[l]=_.Cross(n,this._normals[l]),this._raw||this._binormals[l].normalize()},e.prototype._getFirstNonNullVector=function(e){for(var t=1,i=this._curve[e+t].subtract(this._curve[e]);0===i.length()&&e+t+1<this._curve.length;)t++,i=this._curve[e+t].subtract(this._curve[e]);return i},e.prototype._getLastNonNullVector=function(e){for(var t=1,i=this._curve[e].subtract(this._curve[e-t]);0===i.length()&&t+1<e;)t++,i=this._curve[e].subtract(this._curve[e-t]);return i},e.prototype._normalVector=function(e,t,i){var r,n,o=t.length();(0===o&&(o=1),null==i)?(n=f.Scalar.WithinEpsilon(Math.abs(t.y)/o,1,f.Epsilon)?f.Scalar.WithinEpsilon(Math.abs(t.x)/o,1,f.Epsilon)?f.Scalar.WithinEpsilon(Math.abs(t.z)/o,1,f.Epsilon)?_.Zero():new _(0,0,1):new _(1,0,0):new _(0,-1,0),r=_.Cross(t,n)):(r=_.Cross(t,i),_.CrossToRef(r,t,r));return r.normalize(),r},e})();f.Path3D=b;var T=(function(){function h(e){this._length=0,this._points=e,this._length=this._computeLength(e)}return h.CreateQuadraticBezier=function(e,t,i,r){r=2<r?r:3;for(var n=new Array,o=function(e,t,i,r){return(1-e)*(1-e)*t+2*e*(1-e)*i+e*e*r},s=0;s<=r;s++)n.push(new _(o(s/r,e.x,t.x,i.x),o(s/r,e.y,t.y,i.y),o(s/r,e.z,t.z,i.z)));return new h(n)},h.CreateCubicBezier=function(e,t,i,r,n){n=3<n?n:4;for(var o=new Array,s=function(e,t,i,r,n){return(1-e)*(1-e)*(1-e)*t+3*e*(1-e)*(1-e)*i+3*e*e*(1-e)*r+e*e*e*n},a=0;a<=n;a++)o.push(new _(s(a/n,e.x,t.x,i.x,r.x),s(a/n,e.y,t.y,i.y,r.y),s(a/n,e.z,t.z,i.z,r.z)));return new h(o)},h.CreateHermiteSpline=function(e,t,i,r,n){for(var o=new Array,s=1/n,a=0;a<=n;a++)o.push(_.Hermite(e,t,i,r,a*s));return new h(o)},h.CreateCatmullRomSpline=function(e,t,i){var r=new Array,n=1/t,o=0;if(i){for(var s=e.length,a=0;a<s;a++)for(var l=o=0;l<t;l++)r.push(_.CatmullRom(e[a%s],e[(a+1)%s],e[(a+2)%s],e[(a+3)%s],o)),o+=n;r.push(r[0])}else{var c=new Array;c.push(e[0].clone()),Array.prototype.push.apply(c,e),c.push(e[e.length-1].clone());for(a=0;a<c.length-3;a++)for(l=o=0;l<t;l++)r.push(_.CatmullRom(c[a],c[a+1],c[a+2],c[a+3],o)),o+=n;a--,r.push(_.CatmullRom(c[a],c[a+1],c[a+2],c[a+3],o))}return new h(r)},h.prototype.getPoints=function(){return this._points},h.prototype.length=function(){return this._length},h.prototype.continue=function(e){for(var t=this._points[this._points.length-1],i=this._points.slice(),r=e.getPoints(),n=1;n<r.length;n++)i.push(r[n].subtract(r[0]).add(t));return new h(i)},h.prototype._computeLength=function(e){for(var t=0,i=1;i<e.length;i++)t+=e[i].subtract(e[i-1]).length();return t},h})();f.Curve3=T;var E=(function(){function e(e,t){void 0===e&&(e=_.Zero()),void 0===t&&(t=_.Up()),this.position=e,this.normal=t}return e.prototype.clone=function(){return new e(this.position.clone(),this.normal.clone())},e})();f.PositionNormalVertex=E;var x=(function(){function e(e,t,i){void 0===e&&(e=_.Zero()),void 0===t&&(t=_.Up()),void 0===i&&(i=p.Zero()),this.position=e,this.normal=t,this.uv=i}return e.prototype.clone=function(){return new e(this.position.clone(),this.normal.clone(),this.uv.clone())},e})();f.PositionNormalTextureVertex=x;var P=(function(){function e(){}return e.Color3=[t.Black(),t.Black(),t.Black()],e.Color4=[new i(0,0,0,0),new i(0,0,0,0)],e.Vector2=[p.Zero(),p.Zero(),p.Zero()],e.Vector3=[_.Zero(),_.Zero(),_.Zero(),_.Zero(),_.Zero(),_.Zero(),_.Zero(),_.Zero(),_.Zero()],e.Vector4=[r.Zero(),r.Zero(),r.Zero()],e.Quaternion=[m.Zero(),m.Zero()],e.Matrix=[h.Zero(),h.Zero(),h.Zero(),h.Zero(),h.Zero(),h.Zero(),h.Zero(),h.Zero()],e})();f.Tmp=P;var A=(function(){function e(){}return e.Vector3=[_.Zero(),_.Zero(),_.Zero(),_.Zero(),_.Zero(),_.Zero()],e.Matrix=[h.Zero(),h.Zero()],e.Quaternion=[m.Zero(),m.Zero(),m.Zero()],e})()})($a||($a={})),e=$a||($a={}),n=(function(){function n(){}return n.WithinEpsilon=function(e,t,i){void 0===i&&(i=1401298e-51);var r=e-t;return-i<=r&&r<=i},n.ToHex=function(e){var t=e.toString(16);return e<=15?(\"0\"+t).toUpperCase():t.toUpperCase()},n.Sign=function(e){return 0===(e=+e)||isNaN(e)?e:0<e?1:-1},n.Clamp=function(e,t,i){return void 0===t&&(t=0),void 0===i&&(i=1),Math.min(i,Math.max(t,e))},n.Log2=function(e){return Math.log(e)*Math.LOG2E},n.Repeat=function(e,t){return e-Math.floor(e/t)*t},n.Normalize=function(e,t,i){return(e-t)/(i-t)},n.Denormalize=function(e,t,i){return e*(i-t)+t},n.DeltaAngle=function(e,t){var i=n.Repeat(t-e,360);return 180<i&&(i-=360),i},n.PingPong=function(e,t){var i=n.Repeat(e,2*t);return t-Math.abs(i-t)},n.SmoothStep=function(e,t,i){var r=n.Clamp(i);return t*(r=-2*r*r*r+3*r*r)+e*(1-r)},n.MoveTowards=function(e,t,i){return Math.abs(t-e)<=i?t:e+n.Sign(t-e)*i},n.MoveTowardsAngle=function(e,t,i){var r=n.DeltaAngle(e,t);return-i<r&&r<i?t:n.MoveTowards(e,t=e+r,i)},n.Lerp=function(e,t,i){return e+(t-e)*i},n.LerpAngle=function(e,t,i){var r=n.Repeat(t-e,360);return 180<r&&(r-=360),e+r*n.Clamp(i)},n.InverseLerp=function(e,t,i){return e!=t?n.Clamp((i-e)/(t-e)):0},n.Hermite=function(e,t,i,r,n){var o=n*n,s=n*o;return e*(2*s-3*o+1)+i*(-2*s+3*o)+t*(s-2*o+n)+r*(s-o)},n.RandomRange=function(e,t){return e===t?e:Math.random()*(t-e)+e},n.RangeToPercent=function(e,t,i){return(e-t)/(i-t)},n.PercentToRange=function(e,t,i){return(i-t)*e+t},n.NormalizeRadians=function(e){return e-=n.TwoPi*Math.floor((e+Math.PI)/n.TwoPi)},n.TwoPi=2*Math.PI,n})(),e.Scalar=n,(function(u){var c={},h={},i=function(e,t,i){var r=e();u.Tags&&u.Tags.AddTagsTo(r,t.tags);var n=d(r);for(var o in n){var s=n[o],a=t[o],l=s.type;if(null!=a)switch(l){case 0:case 6:case 11:r[o]=a;break;case 1:r[o]=i||a.isRenderTarget?a:a.clone();break;case 2:case 3:case 4:case 5:case 7:case 10:r[o]=i?a:a.clone()}}return r};function d(e){var t=e.getClassName();if(h[t])return h[t];h[t]={};for(var i=h[t],r=e,n=t;n;){var o=c[n];for(var s in o)i[s]=o[s];var a=void 0,l=!1;do{if(!(a=Object.getPrototypeOf(r)).getClassName){l=!0;break}if(a.getClassName()!==n)break;r=a}while(a);if(l)break;n=a.getClassName(),r=a}return i}function t(n,o){return function(e,t){var i,r=(i=e.getClassName(),c[i]||(c[i]={}),c[i]);r[t]||(r[t]={type:n,sourceName:o})}}u.expandToProperty=function(e,t){return void 0===t&&(t=null),r=e,void 0===(n=t)&&(n=null),function(t,e){var i=n||\"_\"+e;Object.defineProperty(t,e,{get:function(){return this[i]},set:function(e){this[i]!==e&&(this[i]=e,t[r].apply(this))},enumerable:!0,configurable:!0})};var r,n},u.serialize=function(e){return t(0,e)},u.serializeAsTexture=function(e){return t(1,e)},u.serializeAsColor3=function(e){return t(2,e)},u.serializeAsFresnelParameters=function(e){return t(3,e)},u.serializeAsVector2=function(e){return t(4,e)},u.serializeAsVector3=function(e){return t(5,e)},u.serializeAsMeshReference=function(e){return t(6,e)},u.serializeAsColorCurves=function(e){return t(7,e)},u.serializeAsColor4=function(e){return t(8,e)},u.serializeAsImageProcessingConfiguration=function(e){return t(9,e)},u.serializeAsQuaternion=function(e){return t(10,e)},u.serializeAsCameraReference=function(e){return t(11,e)};var e=(function(){function e(){}return e.Serialize=function(e,t){t||(t={}),u.Tags&&(t.tags=u.Tags.GetTags(e));var i=d(e);for(var r in i){var n=i[r],o=n.sourceName||r,s=n.type,a=e[r];if(null!=a)switch(s){case 0:t[o]=a;break;case 1:t[o]=a.serialize();break;case 2:t[o]=a.asArray();break;case 3:t[o]=a.serialize();break;case 4:case 5:t[o]=a.asArray();break;case 6:t[o]=a.id;break;case 7:t[o]=a.serialize();break;case 8:t[o]=a.asArray();break;case 9:t[o]=a.serialize();break;case 10:t[o]=a.asArray();break;case 11:t[o]=a.id}}return t},e.Parse=function(e,t,i,r){void 0===r&&(r=null);var n=e();r||(r=\"\"),u.Tags&&u.Tags.AddTagsTo(n,t.tags);var o=d(n);for(var s in o){var a=o[s],l=t[a.sourceName||s],c=a.type;if(null!=l){var h=n;switch(c){case 0:h[s]=l;break;case 1:i&&(h[s]=u.Texture.Parse(l,i,r));break;case 2:h[s]=u.Color3.FromArray(l);break;case 3:h[s]=u.FresnelParameters.Parse(l);break;case 4:h[s]=u.Vector2.FromArray(l);break;case 5:h[s]=u.Vector3.FromArray(l);break;case 6:i&&(h[s]=i.getLastMeshByID(l));break;case 7:h[s]=u.ColorCurves.Parse(l);break;case 8:h[s]=u.Color4.FromArray(l);break;case 9:h[s]=u.ImageProcessingConfiguration.Parse(l);break;case 10:h[s]=u.Quaternion.FromArray(l);break;case 11:i&&(h[s]=i.getCameraByID(l))}}}return n},e.Clone=function(e,t){return i(e,t,!1)},e.Instanciate=function(e,t){return i(e,t,!0)},e})();u.SerializationHelper=e})($a||($a={})),o=$a||($a={}),s=(function(){function e(){var i=this;this.promise=new Promise(function(e,t){i._resolve=e,i._reject=t})}return Object.defineProperty(e.prototype,\"resolve\",{get:function(){return this._resolve},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,\"reject\",{get:function(){return this._reject},enumerable:!0,configurable:!0}),e})(),o.Deferred=s,(function(i){var r=(function(){function e(e,t,i,r){void 0===t&&(t=!1),this.initalize(e,t,i,r)}return e.prototype.initalize=function(e,t,i,r){return void 0===t&&(t=!1),this.mask=e,this.skipNextObservers=t,this.target=i,this.currentTarget=r,this},e})();i.EventState=r;var s=function(e,t,i){void 0===i&&(i=null),this.callback=e,this.mask=t,this.scope=i,this._willBeUnregistered=!1,this.unregisterOnNextCall=!1};i.Observer=s;var e=(function(){function l(){}return l.prototype.dispose=function(){if(this._observers&&this._observables)for(var e=0;e<this._observers.length;e++)this._observables[e].remove(this._observers[e]);this._observers=null,this._observables=null},l.Watch=function(e,t,i,r){void 0===i&&(i=-1),void 0===r&&(r=null);var n=new l;n._observers=new Array;for(var o=0,s=n._observables=e;o<s.length;o++){var a=s[o].add(t,i,!1,r);a&&n._observers.push(a)}return n},l})();i.MultiObserver=e;var t=(function(){function t(e){this._observers=new Array,this._eventState=new r(0),e&&(this._onObserverAdded=e)}return t.prototype.add=function(e,t,i,r,n){if(void 0===t&&(t=-1),void 0===i&&(i=!1),void 0===r&&(r=null),void 0===n&&(n=!1),!e)return null;var o=new s(e,t,r);return o.unregisterOnNextCall=n,i?this._observers.unshift(o):this._observers.push(o),this._onObserverAdded&&this._onObserverAdded(o),o},t.prototype.addOnce=function(e){return this.add(e,void 0,void 0,void 0,!0)},t.prototype.remove=function(e){return!!e&&(-1!==this._observers.indexOf(e)&&(this._deferUnregister(e),!0))},t.prototype.removeCallback=function(e,t){for(var i=0;i<this._observers.length;i++)if(this._observers[i].callback===e&&(!t||t===this._observers[i].scope))return this._deferUnregister(this._observers[i]),!0;return!1},t.prototype._deferUnregister=function(e){var t=this;e.unregisterOnNextCall=!1,e._willBeUnregistered=!0,i.Tools.SetImmediate((function(){t._remove(e)}))},t.prototype._remove=function(e){if(!e)return!1;var t=this._observers.indexOf(e);return-1!==t&&(this._observers.splice(t,1),!0)},t.prototype.notifyObservers=function(e,t,i,r){if(void 0===t&&(t=-1),!this._observers.length)return!0;var n=this._eventState;n.mask=t,n.target=i,n.currentTarget=r,n.skipNextObservers=!1,n.lastReturnValue=e;for(var o=0,s=this._observers;o<s.length;o++){var a=s[o];if(!a._willBeUnregistered&&(a.mask&t&&(a.scope?n.lastReturnValue=a.callback.apply(a.scope,[e,n]):n.lastReturnValue=a.callback(e,n),a.unregisterOnNextCall&&this._deferUnregister(a)),n.skipNextObservers))return!1}return!0},t.prototype.notifyObserversWithPromise=function(i,e,t,r){var n=this;void 0===e&&(e=-1);var o=Promise.resolve(i);if(!this._observers.length)return o;var s=this._eventState;return s.mask=e,s.target=t,s.currentTarget=r,s.skipNextObservers=!1,this._observers.forEach((function(t){s.skipNextObservers||t._willBeUnregistered||t.mask&e&&(o=t.scope?o.then((function(e){return s.lastReturnValue=e,t.callback.apply(t.scope,[i,s])})):o.then((function(e){return s.lastReturnValue=e,t.callback(i,s)})),t.unregisterOnNextCall&&n._deferUnregister(t))})),o.then((function(){return i}))},t.prototype.notifyObserver=function(e,t,i){void 0===i&&(i=-1);var r=this._eventState;r.mask=i,r.skipNextObservers=!1,e.callback(t,r)},t.prototype.hasObservers=function(){return 0<this._observers.length},t.prototype.clear=function(){this._observers=new Array,this._onObserverAdded=null},t.prototype.clone=function(){var e=new t;return e._observers=this._observers.slice(0),e},t.prototype.hasSpecificMask=function(e){void 0===e&&(e=-1);for(var t=0,i=this._observers;t<i.length;t++){var r=i[t];if(r.mask&e||r.mask===e)return!0}return!1},t})();i.Observable=t})($a||($a={})),a=$a||($a={}),l=(function(){function t(e){this.length=0,this.data=new Array(e),this._id=t._GlobalId++}return t.prototype.push=function(e){this.data[this.length++]=e,this.length>this.data.length&&(this.data.length*=2)},t.prototype.forEach=function(e){for(var t=0;t<this.length;t++)e(this.data[t])},t.prototype.sort=function(e){this.data.sort(e)},t.prototype.reset=function(){this.length=0},t.prototype.dispose=function(){this.reset(),this.data&&(this.data.length=0,this.data=[])},t.prototype.concat=function(e){if(0!==e.length){this.length+e.length>this.data.length&&(this.data.length=2*(this.length+e.length));for(var t=0;t<e.length;t++)this.data[this.length++]=(e.data||e)[t]}},t.prototype.indexOf=function(e){var t=this.data.indexOf(e);return t>=this.length?-1:t},t.prototype.contains=function(e){return-1!==this.indexOf(e)},t._GlobalId=0,t})(),c=(function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e._duplicateId=0,e}return T(e,t),e.prototype.push=function(e){t.prototype.push.call(this,e),e.__smartArrayFlags||(e.__smartArrayFlags={}),e.__smartArrayFlags[this._id]=this._duplicateId},e.prototype.pushNoDuplicate=function(e){return(!e.__smartArrayFlags||e.__smartArrayFlags[this._id]!==this._duplicateId)&&(this.push(e),!0)},e.prototype.reset=function(){t.prototype.reset.call(this),this._duplicateId++},e.prototype.concatWithNoDuplicate=function(e){if(0!==e.length){this.length+e.length>this.data.length&&(this.data.length=2*(this.length+e.length));for(var t=0;t<e.length;t++){var i=(e.data||e)[t];this.pushNoDuplicate(i)}}},e})(a.SmartArray=l),a.SmartArrayNoDuplicate=c,(function(_){var e=(function(){function e(){}return e.prototype.getColorToRef=function(e){this.color2?_.Color4.LerpToRef(this.color1,this.color2,Math.random(),e):e.copyFrom(this.color1)},e})();_.ColorGradient=e;var t=function(){};_.Color3Gradient=t;var i=(function(){function e(){}return e.prototype.getFactor=function(){return void 0===this.factor2?this.factor1:_.Scalar.Lerp(this.factor1,this.factor2,Math.random())},e})();_.FactorGradient=i;var g=(function(r){function n(e,t){var i=r.call(this,e)||this;return i.request=t,i.name=\"LoadFileError\",n._setPrototypeOf(i,n.prototype),i}return T(n,r),n._setPrototypeOf=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},n})(Error);_.LoadFileError=g;var v,r=(function(){function e(){}return e.ExponentialBackoff=function(r,n){return void 0===r&&(r=3),void 0===n&&(n=500),function(e,t,i){return 0!==t.status||r<=i||-1!==e.indexOf(\"file:\")?-1:Math.pow(2,i)*n}},e})();_.RetryStrategy=r;var c=function(e,t){return e?e instanceof _.Mesh?null:e instanceof _.SubMesh?e.clone(t):e.clone?e.clone():null:null},n=(function(){function m(){}return m.FetchToRef=function(e,t,i,r,n,o){var s=4*((Math.abs(e)*i%i|0)+(Math.abs(t)*r%r|0)*i);o.r=n[s]/255,o.g=n[s+1]/255,o.b=n[s+2]/255,o.a=n[s+3]/255},m.Mix=function(e,t,i){return e*(1-i)+t*i},m.Instantiate=function(e){if(m.RegisteredExternalClasses&&m.RegisteredExternalClasses[e])return m.RegisteredExternalClasses[e];for(var t=e.split(\".\"),i=window||this,r=0,n=t.length;r<n;r++)i=i[t[r]];return\"function\"!=typeof i?null:i},m.Slice=function(e,t,i){return e.slice?e.slice(t,i):Array.prototype.slice.call(e,t,i)},m.SetImmediate=function(e){m.IsWindowObjectExist()&&window.setImmediate?window.setImmediate(e):setTimeout(e,1)},m.IsExponentOfTwo=function(e){for(var t=1;(t*=2)<e;);return t===e},m.FloatRound=function(e){return Math.fround?Math.fround(e):m._tmpFloatArray[0]=e},m.CeilingPOT=function(e){return e--,e|=e>>1,e|=e>>2,e|=e>>4,e|=e>>8,e|=e>>16,++e},m.FloorPOT=function(e){return e|=e>>1,e|=e>>2,e|=e>>4,e|=e>>8,(e|=e>>16)-(e>>1)},m.NearestPOT=function(e){var t=m.CeilingPOT(e),i=m.FloorPOT(e);return e-i<t-e?i:t},m.GetExponentOfTwo=function(e,t,i){var r;switch(void 0===i&&(i=_.Engine.SCALEMODE_NEAREST),i){case _.Engine.SCALEMODE_FLOOR:r=m.FloorPOT(e);break;case _.Engine.SCALEMODE_NEAREST:r=m.NearestPOT(e);break;case _.Engine.SCALEMODE_CEILING:default:r=m.CeilingPOT(e)}return Math.min(r,t)},m.GetFilename=function(e){var t=e.lastIndexOf(\"/\");return t<0?e:e.substring(t+1)},m.GetFolderPath=function(e,t){void 0===t&&(t=!1);var i=e.lastIndexOf(\"/\");return i<0?t?e:\"\":e.substring(0,i+1)},m.GetDOMTextContent=function(e){for(var t=\"\",i=e.firstChild;i;)3===i.nodeType&&(t+=i.textContent),i=i.nextSibling;return t},m.ToDegrees=function(e){return 180*e/Math.PI},m.ToRadians=function(e){return e*Math.PI/180},m.EncodeArrayBufferTobase64=function(e){for(var t,i,r,n,o,s,a,l=\"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=\",c=\"\",h=0,u=new Uint8Array(e);h<u.length;)n=(t=u[h++])>>2,o=(3&t)<<4|(i=h<u.length?u[h++]:Number.NaN)>>4,s=(15&i)<<2|(r=h<u.length?u[h++]:Number.NaN)>>6,a=63&r,isNaN(i)?s=a=64:isNaN(r)&&(a=64),c+=l.charAt(n)+l.charAt(o)+l.charAt(s)+l.charAt(a);return\"data:image/png;base64,\"+c},m.ExtractMinAndMaxIndexed=function(e,t,i,r,n){void 0===n&&(n=null);for(var o=new _.Vector3(Number.MAX_VALUE,Number.MAX_VALUE,Number.MAX_VALUE),s=new _.Vector3(-Number.MAX_VALUE,-Number.MAX_VALUE,-Number.MAX_VALUE),a=i;a<i+r;a++){var l=3*t[a],c=e[l],h=e[l+1],u=e[l+2];o.minimizeInPlaceFromFloats(c,h,u),s.maximizeInPlaceFromFloats(c,h,u)}return n&&(o.x-=o.x*n.x+n.y,o.y-=o.y*n.x+n.y,o.z-=o.z*n.x+n.y,s.x+=s.x*n.x+n.y,s.y+=s.y*n.x+n.y,s.z+=s.z*n.x+n.y),{minimum:o,maximum:s}},m.ExtractMinAndMax=function(e,t,i,r,n){void 0===r&&(r=null);var o=new _.Vector3(Number.MAX_VALUE,Number.MAX_VALUE,Number.MAX_VALUE),s=new _.Vector3(-Number.MAX_VALUE,-Number.MAX_VALUE,-Number.MAX_VALUE);n||(n=3);for(var a=t,l=t*n;a<t+i;a++,l+=n){var c=e[l],h=e[l+1],u=e[l+2];o.minimizeInPlaceFromFloats(c,h,u),s.maximizeInPlaceFromFloats(c,h,u)}return r&&(o.x-=o.x*r.x+r.y,o.y-=o.y*r.x+r.y,o.z-=o.z*r.x+r.y,s.x+=s.x*r.x+r.y,s.y+=s.y*r.x+r.y,s.z+=s.z*r.x+r.y),{minimum:o,maximum:s}},m.MakeArray=function(e,t){return!0===t||void 0!==e&&null!=e?Array.isArray(e)?e:[e]:null},m.GetPointerPrefix=function(){var e=\"pointer\";return!m.IsWindowObjectExist()||window.PointerEvent||navigator.pointerEnabled||(e=\"mouse\"),e},m.QueueNewFrame=function(e,t){return m.IsWindowObjectExist()?(t||(t=window),t.requestAnimationFrame?t.requestAnimationFrame(e):t.msRequestAnimationFrame?t.msRequestAnimationFrame(e):t.webkitRequestAnimationFrame?t.webkitRequestAnimationFrame(e):t.mozRequestAnimationFrame?t.mozRequestAnimationFrame(e):t.oRequestAnimationFrame?t.oRequestAnimationFrame(e):window.setTimeout(e,16)):setTimeout(e,16)},m.RequestFullscreen=function(e){var t=e.requestFullscreen||e.msRequestFullscreen||e.webkitRequestFullscreen||e.mozRequestFullScreen;t&&t.call(e)},m.ExitFullscreen=function(){document.exitFullscreen?document.exitFullscreen():document.mozCancelFullScreen?document.mozCancelFullScreen():document.webkitCancelFullScreen?document.webkitCancelFullScreen():document.msCancelFullScreen&&document.msCancelFullScreen()},m.SetCorsBehavior=function(e,t){if((!e||0!==e.indexOf(\"data:\"))&&m.CorsBehavior)if(\"string\"==typeof m.CorsBehavior||m.CorsBehavior instanceof String)t.crossOrigin=m.CorsBehavior;else{var i=m.CorsBehavior(e);i&&(t.crossOrigin=i)}},m.CleanUrl=function(e){return e=e.replace(/#/gm,\"%23\")},m.LoadImage=function(t,e,i,r){var n,o=!1;t instanceof ArrayBuffer?(n=URL.createObjectURL(new Blob([t])),o=!0):t instanceof Blob?(n=URL.createObjectURL(t),o=!0):(n=m.CleanUrl(t),n=m.PreprocessUrl(t));var s=new Image;m.SetCorsBehavior(n,s);var a=function(){o&&s.src&&URL.revokeObjectURL(s.src),s.removeEventListener(\"load\",a),s.removeEventListener(\"error\",l),e(s)},l=function(e){o&&s.src&&URL.revokeObjectURL(s.src),s.removeEventListener(\"load\",a),s.removeEventListener(\"error\",l),m.Error(\"Error while trying to load image: \"+t),i&&i(\"Error while trying to load image: \"+t,e)};s.addEventListener(\"load\",a),s.addEventListener(\"error\",l);var c=function(){s.src=n};if(\"data:\"!==n.substr(0,5)&&r&&r.enableTexturesOffline&&_.Database.IsUASupportingBlobStorage)r.openAsync((function(){r&&r.loadImageFromDB(n,s)}),c);else{if(-1!==n.indexOf(\"file:\")){var h=decodeURIComponent(n.substring(5).toLowerCase());if(_.FilesInput.FilesToLoad[h]){try{var u;try{u=URL.createObjectURL(_.FilesInput.FilesToLoad[h])}catch(e){u=URL.createObjectURL(_.FilesInput.FilesToLoad[h])}s.src=u,o=!0}catch(e){s.src=\"\"}return s}}c()}return s},m.LoadFile=function(e,c,t,i,h,u){if(e=m.CleanUrl(e),-1!==(e=m.PreprocessUrl(e)).indexOf(\"file:\")){var r=decodeURIComponent(e.substring(5).toLowerCase());if(_.FilesInput.FilesToLoad[r])return m.ReadFile(_.FilesInput.FilesToLoad[r],c,t,h)}var d=m.BaseUrl+e,f=!1,p={onCompleteObservable:new _.Observable,abort:function(){return f=!0}},n=function(){var s=new XMLHttpRequest,a=null;p.abort=function(){f=!0,s.readyState!==(XMLHttpRequest.DONE||4)&&s.abort(),null!==a&&(clearTimeout(a),a=null)};var l=function(r){s.open(\"GET\",d,!0),h&&(s.responseType=\"arraybuffer\"),t&&s.addEventListener(\"progress\",t);var n=function(){s.removeEventListener(\"loadend\",n),p.onCompleteObservable.notifyObservers(p),p.onCompleteObservable.clear()};s.addEventListener(\"loadend\",n);var o=function(){if(!f&&s.readyState===(XMLHttpRequest.DONE||4)){if(s.removeEventListener(\"readystatechange\",o),200<=s.status&&s.status<300||0===s.status&&(!m.IsWindowObjectExist()||m.IsFileURL()))return void c(h?s.response:s.responseText,s.responseURL);var e=m.DefaultRetryStrategy;if(e){var t=e(d,s,r);if(-1!==t)return s.removeEventListener(\"loadend\",n),s=new XMLHttpRequest,void(a=setTimeout((function(){return l(r+1)}),t))}var i=new g(\"Error status: \"+s.status+\" \"+s.statusText+\" - Unable to load \"+d,s);if(!u)throw i;u(s,i)}};s.addEventListener(\"readystatechange\",o),s.send()};l(0)};if(i&&i.enableSceneOffline){var o=function(e){e&&400<e.status?u&&u(e):f||n()};i.openAsync((function(){f||i&&i.loadFileFromDB(e,(function(e){f||c(e),p.onCompleteObservable.notifyObservers(p)}),t?function(e){f||t(e)}:void 0,o,h)}),o)}else n();return p},m.LoadScript=function(t,e,i){if(m.IsWindowObjectExist()){var r=document.getElementsByTagName(\"head\")[0],n=document.createElement(\"script\");n.type=\"text/javascript\",n.src=t,n.onload=function(){e&&e()},n.onerror=function(e){i&&i(\"Unable to load script '\"+t+\"'\",e)},r.appendChild(n)}},m.ReadFileAsDataURL=function(e,t,i){var r=new FileReader,n={onCompleteObservable:new _.Observable,abort:function(){return r.abort()}};return r.onloadend=function(e){n.onCompleteObservable.notifyObservers(n)},r.onload=function(e){t(e.target.result)},r.onprogress=i,r.readAsDataURL(e),n},m.ReadFile=function(t,i,e,r){var n=new FileReader,o={onCompleteObservable:new _.Observable,abort:function(){return n.abort()}};return n.onloadend=function(e){return o.onCompleteObservable.notifyObservers(o)},n.onerror=function(e){m.Log(\"Error while reading file: \"+t.name),i(JSON.stringify({autoClear:!0,clearColor:[1,0,0],ambientColor:[0,0,0],gravity:[0,-9.807,0],meshes:[],cameras:[],lights:[]}))},n.onload=function(e){i(e.target.result)},e&&(n.onprogress=e),r?n.readAsArrayBuffer(t):n.readAsText(t),o},m.FileAsURL=function(e){var t=new Blob([e]);return(window.URL||window.webkitURL).createObjectURL(t)},m.Format=function(e,t){return void 0===t&&(t=2),e.toFixed(t)},m.CheckExtends=function(e,t,i){e.x<t.x&&(t.x=e.x),e.y<t.y&&(t.y=e.y),e.z<t.z&&(t.z=e.z),e.x>i.x&&(i.x=e.x),e.y>i.y&&(i.y=e.y),e.z>i.z&&(i.z=e.z)},m.DeepCopy=function(e,t,i,r){for(var n in e)if((\"_\"!==n[0]||r&&-1!==r.indexOf(n))&&(!i||-1===i.indexOf(n))){var o=e[n],s=typeof o;if(\"function\"!==s)try{if(\"object\"===s)if(o instanceof Array){if(t[n]=[],0<o.length)if(\"object\"==typeof o[0])for(var a=0;a<o.length;a++){var l=c(o[a],t);-1===t[n].indexOf(l)&&t[n].push(l)}else t[n]=o.slice(0)}else t[n]=c(o,t);else t[n]=o}catch(e){}}},m.IsEmpty=function(e){for(var t in e)if(e.hasOwnProperty(t))return!1;return!0},m.RegisterTopRootEvents=function(e){for(var t=0;t<e.length;t++){var i=e[t];window.addEventListener(i.name,i.handler,!1);try{window.parent&&window.parent.addEventListener(i.name,i.handler,!1)}catch(e){}}},m.UnregisterTopRootEvents=function(e){for(var t=0;t<e.length;t++){var i=e[t];window.removeEventListener(i.name,i.handler);try{window.parent&&window.parent.removeEventListener(i.name,i.handler)}catch(e){}}},m.DumpFramebuffer=function(e,t,i,r,n,o){void 0===n&&(n=\"image/png\");for(var s=4*e,a=t/2,l=i.readPixels(0,0,e,t),c=0;c<a;c++)for(var h=0;h<s;h++){var u=h+c*s,d=h+(t-c-1)*s,f=l[u];l[u]=l[d],l[d]=f}v||(v=document.createElement(\"canvas\")),v.width=e,v.height=t;var p=v.getContext(\"2d\");if(p){var _=p.createImageData(e,t);_.data.set(l),p.putImageData(_,0,0),m.EncodeScreenshotCanvasData(r,n,o)}},m.ToBlob=function(e,t,i){void 0===i&&(i=\"image/png\"),e.toBlob||(e.toBlob=function(n,o,s){var a=this;setTimeout((function(){for(var e=atob(a.toDataURL(o,s).split(\",\")[1]),t=e.length,i=new Uint8Array(t),r=0;r<t;r++)i[r]=e.charCodeAt(r);n(new Blob([i]))}))}),e.toBlob((function(e){t(e)}),i)},m.EncodeScreenshotCanvasData=function(e,t,s){(void 0===t&&(t=\"image/png\"),e)?e(v.toDataURL(t)):this.ToBlob(v,(function(e){if(\"download\"in document.createElement(\"a\")){if(!s){var t=new Date,i=(t.getFullYear()+\"-\"+(t.getMonth()+1)).slice(2)+\"-\"+t.getDate()+\"_\"+t.getHours()+\"-\"+(\"0\"+t.getMinutes()).slice(-2);s=\"screenshot_\"+i+\".png\"}m.Download(e,s)}else{var r=URL.createObjectURL(e),n=window.open(\"\");if(!n)return;var o=n.document.createElement(\"img\");o.onload=function(){URL.revokeObjectURL(r)},o.src=r,n.document.body.appendChild(o)}}),t)},m.Download=function(e,t){if(navigator&&navigator.msSaveBlob)navigator.msSaveBlob(e,t);else{var i=window.URL.createObjectURL(e),r=document.createElement(\"a\");document.body.appendChild(r),r.style.display=\"none\",r.href=i,r.download=t,r.addEventListener(\"click\",(function(){r.parentElement&&r.parentElement.removeChild(r)})),r.click(),window.URL.revokeObjectURL(i)}},m.CreateScreenshot=function(e,t,i,r,n){var o,s;if(void 0===n&&(n=\"image/png\"),i.precision)o=Math.round(e.getRenderWidth()*i.precision),s=Math.round(o/e.getAspectRatio(t));else if(i.width&&i.height)o=i.width,s=i.height;else if(i.width&&!i.height)o=i.width,s=Math.round(o/e.getAspectRatio(t));else if(i.height&&!i.width)s=i.height,o=Math.round(s*e.getAspectRatio(t));else{if(isNaN(i))return void m.Error(\"Invalid 'size' parameter !\");o=s=i}v||(v=document.createElement(\"canvas\")),v.width=o,v.height=s;var a=v.getContext(\"2d\"),l=e.getRenderWidth()/e.getRenderHeight(),c=o,h=c/l;s<h&&(c=(h=s)*l);var u=Math.max(0,o-c)/2,d=Math.max(0,s-h)/2,f=e.getRenderingCanvas();a&&f&&a.drawImage(f,u,d,c,h),m.EncodeScreenshotCanvasData(r,n)},m.CreateScreenshotUsingRenderTarget=function(e,t,i,r,n,o,s,a){var l,c;if(void 0===n&&(n=\"image/png\"),void 0===o&&(o=1),void 0===s&&(s=!1),i.precision)l=Math.round(e.getRenderWidth()*i.precision),c=Math.round(l/e.getAspectRatio(t)),i={width:l,height:c};else if(i.width&&i.height)l=i.width,c=i.height;else if(i.width&&!i.height)l=i.width,c=Math.round(l/e.getAspectRatio(t)),i={width:l,height:c};else if(i.height&&!i.width)c=i.height,i={width:l=Math.round(c*e.getAspectRatio(t)),height:c};else{if(isNaN(i))return void m.Error(\"Invalid 'size' parameter !\");l=c=i}var h=t.getScene(),u=null;h.activeCamera!==t&&(u=h.activeCamera,h.activeCamera=t);var d=new _.RenderTargetTexture(\"screenShot\",i,h,!1,!1,_.Engine.TEXTURETYPE_UNSIGNED_INT,!1,_.Texture.NEAREST_SAMPLINGMODE);d.renderList=null,d.samples=o,s&&d.addPostProcess(new _.FxaaPostProcess(\"antialiasing\",1,h.activeCamera)),d.onAfterRenderObservable.add((function(){m.DumpFramebuffer(l,c,e,r,n,a)})),h.incrementRenderId(),h.resetCachedMaterial(),d.render(!0),d.dispose(),u&&(h.activeCamera=u),t.getProjectionMatrix(!0)},m.ValidateXHRData=function(e,t){void 0===t&&(t=7);try{if(1&t){if(e.responseText&&0<e.responseText.length)return!0;if(1===t)return!1}if(2&t){var i=_.TGATools.GetTGAHeader(e.response);if(i.width&&i.height&&0<i.width&&0<i.height)return!0;if(2===t)return!1}if(4&t){var r=new Uint8Array(e.response,0,3);return 68===r[0]&&68===r[1]&&83===r[2]}}catch(e){}return!1},m.RandomId=function(){return\"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx\".replace(/[xy]/g,(function(e){var t=16*Math.random()|0;return(\"x\"===e?t:3&t|8).toString(16)}))},m.IsBase64=function(e){return!(e.length<5)&&\"data:\"===e.substr(0,5)},m.DecodeBase64=function(e){for(var t=atob(e.split(\",\")[1]),i=t.length,r=new Uint8Array(new ArrayBuffer(i)),n=0;n<i;n++)r[n]=t.charCodeAt(n);return r.buffer},m._AddLogEntry=function(e){m._LogCache=e+m._LogCache,m.OnNewCacheEntry&&m.OnNewCacheEntry(e)},m._FormatMessage=function(e){var t=function(e){return e<10?\"0\"+e:\"\"+e},i=new Date;return\"[\"+t(i.getHours())+\":\"+t(i.getMinutes())+\":\"+t(i.getSeconds())+\"]: \"+e},m._LogDisabled=function(e){},m._LogEnabled=function(e){var t=m._FormatMessage(e);console.log(\"BJS - \"+t),m._AddLogEntry(\"<div style='color:white'>\"+t+\"</div><br>\")},m._WarnDisabled=function(e){},m._WarnEnabled=function(e){var t=m._FormatMessage(e);console.warn(\"BJS - \"+t),m._AddLogEntry(\"<div style='color:orange'>\"+t+\"</div><br>\")},m._ErrorDisabled=function(e){},m._ErrorEnabled=function(e){m.errorsCount++;var t=m._FormatMessage(e);console.error(\"BJS - \"+t),m._AddLogEntry(\"<div style='color:red'>\"+t+\"</div><br>\")},Object.defineProperty(m,\"LogCache\",{get:function(){return m._LogCache},enumerable:!0,configurable:!0}),m.ClearLogCache=function(){m._LogCache=\"\",m.errorsCount=0},Object.defineProperty(m,\"LogLevels\",{set:function(e){m.Log=(e&m.MessageLogLevel)===m.MessageLogLevel?m._LogEnabled:m._LogDisabled,m.Warn=(e&m.WarningLogLevel)===m.WarningLogLevel?m._WarnEnabled:m._WarnDisabled,m.Error=(e&m.ErrorLogLevel)===m.ErrorLogLevel?m._ErrorEnabled:m._ErrorDisabled},enumerable:!0,configurable:!0}),m.IsFileURL=function(){return\"file:\"===location.protocol},m.IsWindowObjectExist=function(){return\"undefined\"!=typeof window},Object.defineProperty(m,\"PerformanceLogLevel\",{set:function(e){return(e&m.PerformanceUserMarkLogLevel)===m.PerformanceUserMarkLogLevel?(m.StartPerformanceCounter=m._StartUserMark,void(m.EndPerformanceCounter=m._EndUserMark)):(e&m.PerformanceConsoleLogLevel)===m.PerformanceConsoleLogLevel?(m.StartPerformanceCounter=m._StartPerformanceConsole,void(m.EndPerformanceCounter=m._EndPerformanceConsole)):(m.StartPerformanceCounter=m._StartPerformanceCounterDisabled,void(m.EndPerformanceCounter=m._EndPerformanceCounterDisabled))},enumerable:!0,configurable:!0}),m._StartPerformanceCounterDisabled=function(e,t){},m._EndPerformanceCounterDisabled=function(e,t){},m._StartUserMark=function(e,t){if(void 0===t&&(t=!0),!m._performance){if(!m.IsWindowObjectExist())return;m._performance=window.performance}t&&m._performance.mark&&m._performance.mark(e+\"-Begin\")},m._EndUserMark=function(e,t){void 0===t&&(t=!0),t&&m._performance.mark&&(m._performance.mark(e+\"-End\"),m._performance.measure(e,e+\"-Begin\",e+\"-End\"))},m._StartPerformanceConsole=function(e,t){void 0===t&&(t=!0),t&&(m._StartUserMark(e,t),console.time&&console.time(e))},m._EndPerformanceConsole=function(e,t){void 0===t&&(t=!0),t&&(m._EndUserMark(e,t),console.time&&console.timeEnd(e))},Object.defineProperty(m,\"Now\",{get:function(){return m.IsWindowObjectExist()&&window.performance&&window.performance.now?window.performance.now():Date.now()},enumerable:!0,configurable:!0}),m.GetClassName=function(e,t){void 0===t&&(t=!1);var i=null;if(!t&&e.getClassName)i=e.getClassName();else{if(e instanceof Object)i=(t?e:Object.getPrototypeOf(e)).constructor.__bjsclassName__;i||(i=typeof e)}return i},m.First=function(e,t){for(var i=0,r=e;i<r.length;i++){var n=r[i];if(t(n))return n}return null},m.getFullClassName=function(e,t){void 0===t&&(t=!1);var i=null,r=null;if(!t&&e.getClassName)i=e.getClassName();else{if(e instanceof Object){var n=t?e:Object.getPrototypeOf(e);i=n.constructor.__bjsclassName__,r=n.constructor.__bjsmoduleName__}i||(i=typeof e)}return i?(null!=r?r+\".\":\"\")+i:null},m.DelayAsync=function(t){return new Promise(function(e){setTimeout((function(){e()}),t)})},m.GetCurrentGradient=function(e,t,i){for(var r=0;r<t.length-1;r++){var n=t[r],o=t[r+1];if(e>=n.gradient&&e<=o.gradient)return void i(n,o,(e-n.gradient)/(o.gradient-n.gradient))}var s=t.length-1;i(t[s],t[s],1)},m.BaseUrl=\"\",m.DefaultRetryStrategy=r.ExponentialBackoff(),m.CorsBehavior=\"anonymous\",m.UseFallbackTexture=!0,m.RegisteredExternalClasses={},m.fallbackTexture=\"data:image/jpg;base64,/9j/4AAQSkZJRgABAQEAYABgAAD/4QBmRXhpZgAATU0AKgAAAAgABAEaAAUAAAABAAAAPgEbAAUAAAABAAAARgEoAAMAAAABAAIAAAExAAIAAAAQAAAATgAAAAAAAABgAAAAAQAAAGAAAAABcGFpbnQubmV0IDQuMC41AP/bAEMABAIDAwMCBAMDAwQEBAQFCQYFBQUFCwgIBgkNCw0NDQsMDA4QFBEODxMPDAwSGBITFRYXFxcOERkbGRYaFBYXFv/bAEMBBAQEBQUFCgYGChYPDA8WFhYWFhYWFhYWFhYWFhYWFhYWF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FPqCiiivhT++j5fooor7o/gU+oKKKK+FP76Pl+iiivuj+BT6gooor4U/vo+X6KKK+6P4FPqCiiivhT++j5fooor7o/gUKKKKAPqCiiivhT++j5fooor7o/gU+oKKKK+FP76Pl+iiivuj+BT6gooor4U/vo+X6KKK+6P4FPqCiiivhT++j5fooor7o/gU+oKKKK+FP76Pl+iiivuj+BT6gooor4U/vo+X6KKK+6P4FPqCiiivhT++j5fooor7o/gU+oKKKK+FP76CiiigD5fooor7o/gU+oKKKK+FP76Pl+iiivuj+BT6gooor4U/vo+X6KKK+6P4FPqCiiivhT++j5fooor7o/gU+oKKKK+FP76Pl+iiivuj+BT6gooor4U/vo+X6KKK+6P4FPqCiiivhT++j5fooor7o/gU+oKKKK+FP76Pl+iiivuj+BQooooA+oKKKK+FP76Pl+iiivuj+BT6gooor4U/vo+X6KKK+6P4FPqCiiivhT++j5fooor7o/gU+oKKKK+FP76Pl+iiivuj+BT6gooor4U/vo+X6KKK+6P4FPqCiiivhT++j5fooor7o/gU+oKKKK+FP76Pl+iiivuj+BT6gooor4U/voKKKKAPl+iiivuj+BT6gooor4U/vo+X6KKK+6P4FPqCiiivhT++j5fooor7o/gU+oKKKK+FP76Pl+iiivuj+BT6gooor4U/vo+X6KKK+6P4FPqCiiivhT++j5fooor7o/gU+oKKKK+FP76Pl+iiivuj+BT6gooor4U/vo+X6KKK+6P4FCiiigD6gooor4U/vo+X6KKK+6P4FPqCiiivhT++j5fooor7o/gU+oKKKK+FP76Pl+iiivuj+BT6gooor4U/vo+X6KKK+6P4FPqCiiivhT++j5fooor7o/gU+oKKKK+FP76Pl+iiivuj+BT6gooor4U/vo+X6KKK+6P4FPqCiiivhT++gooooA+X6KKK+6P4FPqCiiivhT++j5fooor7o/gU+oKKKK+FP76Pl+iiivuj+BT6gooor4U/vo+X6KKK+6P4FPqCiiivhT++j5fooor7o/gU+oKKKK+FP76Pl+iiivuj+BT6gooor4U/vo+X6KKK+6P4FPqCiiivhT++j5fooor7o/gUKKKKAPqCiiivhT++j5fooor7o/gU+oKKKK+FP76Pl+iiivuj+BT6gooor4U/vo+X6KKK+6P4FPqCiiivhT++j5fooor7o/gU+oKKKK+FP76Pl+iiivuj+BT6gooor4U/vo+X6KKK+6P4FPqCiiivhT++j5fooor7o/gU+oKKKK+FP76CiiigD5fooor7o/gU+oKKKK+FP76Pl+iiivuj+BT6gooor4U/vo+X6KKK+6P4FPqCiiivhT++j5fooor7o/gU+oKKKK+FP76Pl+iiivuj+BT6gooor4U/vo+X6KKK+6P4FPqCiiivhT++j5fooor7o/gU+oKKKK+FP76Pl+iiivuj+BQooooA+oKKKK+FP76Pl+iiivuj+BT6gooor4U/vo+X6KKK+6P4FPqCiiivhT++j5fooor7o/gU+oKKKK+FP76Pl+iiivuj+BT6gooor4U/vo+X6KKK+6P4FPqCiiivhT++j5fooor7o/gU+oKKKK+FP76Pl+iiivuj+BT6gooor4U/voKKKKAPl+iiivuj+BT6gooor4U/vo+X6KKK+6P4FPqCiiivhT++j5fooor7o/gU+oKKKK+FP76Pl+iiivuj+BT6gooor4U/vo+X6KKK+6P4FPqCiiivhT++j5fooor7o/gU+oKKKK+FP76Pl+iiivuj+BT6gooor4U/vo+X6KKK+6P4FCiiigD6gooor4U/vo+X6KKK+6P4FPqCiiivhT++j5fooor7o/gU+oKKKK+FP76Pl+iiivuj+BT6gooor4U/vo+X6KKK+6P4FPqCiiivhT++j5fooor7o/gU+oKKKK+FP76Pl+iiivuj+BT6gooor4U/vo+X6KKK+6P4FPqCiiivhT++gooooA+X6KKK+6P4FPqCiiivhT++j5fooor7o/gU+oKKKK+FP76Pl+iiivuj+BT6gooor4U/vo+X6KKK+6P4FPqCiiivhT++j5fooor7o/gU+oKKKK+FP76Pl+iiivuj+BT6gooor4U/vo+X6KKK+6P4FPqCiiivhT++j5fooor7o/gUKKKKAPqCiiivhT++j5fooor7o/gU+oKKKK+FP76Pl+iiivuj+BT6gooor4U/vo+X6KKK+6P4FPqCiiivhT++j5fooor7o/gU+oKKKK+FP76Pl+iiivuj+BT6gooor4U/vo+X6KKK+6P4FPqCiiivhT++j5fooor7o/gU+oKKKK+FP76P//Z\",m._tmpFloatArray=new Float32Array(1),m.PreprocessUrl=function(e){return e},m.NoneLogLevel=0,m.MessageLogLevel=1,m.WarningLogLevel=2,m.ErrorLogLevel=4,m.AllLogLevel=7,m._LogCache=\"\",m.errorsCount=0,m.Log=m._LogEnabled,m.Warn=m._WarnEnabled,m.Error=m._ErrorEnabled,m.PerformanceNoneLogLevel=0,m.PerformanceUserMarkLogLevel=1,m.PerformanceConsoleLogLevel=2,m.StartPerformanceCounter=m._StartPerformanceCounterDisabled,m.EndPerformanceCounter=m._EndPerformanceCounterDisabled,m})();_.Tools=n;var o=(function(){function i(){this._startMonitoringTime=0,this._min=0,this._max=0,this._average=0,this._lastSecAverage=0,this._current=0,this._totalValueCount=0,this._totalAccumulated=0,this._lastSecAccumulated=0,this._lastSecTime=0,this._lastSecValueCount=0}return Object.defineProperty(i.prototype,\"min\",{get:function(){return this._min},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,\"max\",{get:function(){return this._max},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,\"average\",{get:function(){return this._average},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,\"lastSecAverage\",{get:function(){return this._lastSecAverage},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,\"current\",{get:function(){return this._current},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,\"total\",{get:function(){return this._totalAccumulated},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,\"count\",{get:function(){return this._totalValueCount},enumerable:!0,configurable:!0}),i.prototype.fetchNewFrame=function(){this._totalValueCount++,this._current=0,this._lastSecValueCount++},i.prototype.addCount=function(e,t){i.Enabled&&(this._current+=e,t&&this._fetchResult())},i.prototype.beginMonitoring=function(){i.Enabled&&(this._startMonitoringTime=n.Now)},i.prototype.endMonitoring=function(e){if(void 0===e&&(e=!0),i.Enabled){e&&this.fetchNewFrame();var t=n.Now;this._current=t-this._startMonitoringTime,e&&this._fetchResult()}},i.prototype._fetchResult=function(){this._totalAccumulated+=this._current,this._lastSecAccumulated+=this._current,this._min=Math.min(this._min,this._current),this._max=Math.max(this._max,this._current),this._average=this._totalAccumulated/this._totalValueCount;var e=n.Now;1e3<e-this._lastSecTime&&(this._lastSecAverage=this._lastSecAccumulated/this._lastSecValueCount,this._lastSecTime=e,this._lastSecAccumulated=0,this._lastSecValueCount=0)},i.Enabled=!0,i})();_.PerfCounter=o,_.className=function(t,i){return function(e){e.__bjsclassName__=t,e.__bjsmoduleName__=null!=i?i:null}};var s=(function(){function a(e,t,i,r){void 0===r&&(r=0),this.iterations=e,this.index=r-1,this._done=!1,this._fn=t,this._successCallback=i}return a.prototype.executeNext=function(){this._done||(this.index+1<this.iterations?(++this.index,this._fn(this)):this.breakLoop())},a.prototype.breakLoop=function(){this._done=!0,this._successCallback()},a.Run=function(e,t,i,r){void 0===r&&(r=0);var n=new a(e,t,i,r);return n.executeNext(),n},a.SyncAsyncForLoop=function(r,n,o,e,s,t){return void 0===t&&(t=0),a.Run(Math.ceil(r/n),(function(i){s&&s()?i.breakLoop():setTimeout((function(){for(var e=0;e<n;++e){var t=i.index*n+e;if(r<=t)break;if(o(t),s&&s()){i.breakLoop();break}}i.executeNext()}),t)}),e)},a})();_.AsyncLoop=s})($a||($a={})),(function(o){var a,e;(e=a||(a={}))[e.Pending=0]=\"Pending\",e[e.Fulfilled=1]=\"Fulfilled\",e[e.Rejected=2]=\"Rejected\";var s=function(){this.count=0,this.target=0,this.results=[]},t=(function(){function n(e){var t=this;if(this._state=a.Pending,this._children=new Array,this._rejectWasConsumed=!1,e)try{e((function(e){t._resolve(e)}),(function(e){t._reject(e)}))}catch(e){this._reject(e)}}return Object.defineProperty(n.prototype,\"_result\",{get:function(){return this._resultValue},set:function(e){this._resultValue=e,this._parent&&void 0===this._parent._result&&(this._parent._result=e)},enumerable:!0,configurable:!0}),n.prototype.catch=function(e){return this.then(void 0,e)},n.prototype.then=function(e,t){var i=this,r=new n;return r._onFulfilled=e,r._onRejected=t,this._children.push(r),(r._parent=this)._state!==a.Pending&&o.Tools.SetImmediate((function(){if(i._state===a.Fulfilled||i._rejectWasConsumed){var e=r._resolve(i._result);if(null!=e)if(void 0!==e._state){var t=e;r._children.push(t),t._parent=r,r=t}else r._result=e}else r._reject(i._reason)})),r},n.prototype._moveChildren=function(e){var t,i=this;if((t=this._children).push.apply(t,e.splice(0,e.length)),this._children.forEach((function(e){e._parent=i})),this._state===a.Fulfilled)for(var r=0,n=this._children;r<n.length;r++){n[r]._resolve(this._result)}else if(this._state===a.Rejected)for(var o=0,s=this._children;o<s.length;o++){s[o]._reject(this._reason)}},n.prototype._resolve=function(e){try{this._state=a.Fulfilled;var t=null;if(this._onFulfilled&&(t=this._onFulfilled(e)),null!=t)if(void 0!==t._state){var i=t;i._parent=this,i._moveChildren(this._children),e=i._result}else e=t;this._result=e;for(var r=0,n=this._children;r<n.length;r++){n[r]._resolve(e)}this._children.length=0,delete this._onFulfilled,delete this._onRejected}catch(e){this._reject(e,!0)}},n.prototype._reject=function(t,e){if(void 0===e&&(e=!1),this._state=a.Rejected,this._reason=t,this._onRejected&&!e)try{this._onRejected(t),this._rejectWasConsumed=!0}catch(e){t=e}for(var i=0,r=this._children;i<r.length;i++){var n=r[i];this._rejectWasConsumed?n._resolve(null):n._reject(t)}this._children.length=0,delete this._onFulfilled,delete this._onRejected},n.resolve=function(e){var t=new n;return t._resolve(e),t},n._RegisterForFulfillment=function(e,t,i){e.then((function(e){return t.results[i]=e,t.count++,t.count===t.target&&t.rootPromise._resolve(t.results),null}),(function(e){t.rootPromise._state!==a.Rejected&&t.rootPromise._reject(e)}))},n.all=function(e){var t=new n,i=new s;if(i.target=e.length,i.rootPromise=t,e.length)for(var r=0;r<e.length;r++)n._RegisterForFulfillment(e[r],i,r);else t._resolve([]);return t},n.race=function(e){var t=new n;if(e.length)for(var i=0,r=e;i<r.length;i++){r[i].then((function(e){return t&&(t._resolve(e),t=null),null}),(function(e){t&&(t._reject(e),t=null)}))}return t},n})(),i=(function(){function e(){}return e.Apply=function(e){(void 0===e&&(e=!1),e||\"undefined\"==typeof Promise)&&(window.Promise=t)},e})();o.PromisePolyfill=i})($a||($a={})),h=$a||($a={}),u=(function(){function e(e){this._pendingActions=new Array,this._workerInfos=e.map((function(e){return{worker:e,active:!1}}))}return e.prototype.dispose=function(){for(var e=0,t=this._workerInfos;e<t.length;e++){t[e].worker.terminate()}delete this._workerInfos,delete this._pendingActions},e.prototype.push=function(e){for(var t=0,i=this._workerInfos;t<i.length;t++){var r=i[t];if(!r.active)return void this._execute(r,e)}this._pendingActions.push(e)},e.prototype._execute=function(t,e){var i=this;t.active=!0,e(t.worker,(function(){t.active=!1;var e=i._pendingActions.shift();e&&i._execute(t,e)}))},e})(),h.WorkerPool=u,d=$a||($a={}),f=(function(){function e(){this._isAlphaBlendDirty=!1,this._isBlendFunctionParametersDirty=!1,this._isBlendEquationParametersDirty=!1,this._isBlendConstantsDirty=!1,this._alphaBlend=!1,this._blendFunctionParameters=new Array(4),this._blendEquationParameters=new Array(2),this._blendConstants=new Array(4),this.reset()}return Object.defineProperty(e.prototype,\"isDirty\",{get:function(){return this._isAlphaBlendDirty||this._isBlendFunctionParametersDirty},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,\"alphaBlend\",{get:function(){return this._alphaBlend},set:function(e){this._alphaBlend!==e&&(this._alphaBlend=e,this._isAlphaBlendDirty=!0)},enumerable:!0,configurable:!0}),e.prototype.setAlphaBlendConstants=function(e,t,i,r){this._blendConstants[0]===e&&this._blendConstants[1]===t&&this._blendConstants[2]===i&&this._blendConstants[3]===r||(this._blendConstants[0]=e,this._blendConstants[1]=t,this._blendConstants[2]=i,this._blendConstants[3]=r,this._isBlendConstantsDirty=!0)},e.prototype.setAlphaBlendFunctionParameters=function(e,t,i,r){this._blendFunctionParameters[0]===e&&this._blendFunctionParameters[1]===t&&this._blendFunctionParameters[2]===i&&this._blendFunctionParameters[3]===r||(this._blendFunctionParameters[0]=e,this._blendFunctionParameters[1]=t,this._blendFunctionParameters[2]=i,this._blendFunctionParameters[3]=r,this._isBlendFunctionParametersDirty=!0)},e.prototype.setAlphaEquationParameters=function(e,t){this._blendEquationParameters[0]===e&&this._blendEquationParameters[1]===t||(this._blendEquationParameters[0]=e,this._blendEquationParameters[1]=t,this._isBlendEquationParametersDirty=!0)},e.prototype.reset=function(){this._alphaBlend=!1,this._blendFunctionParameters[0]=null,this._blendFunctionParameters[1]=null,this._blendFunctionParameters[2]=null,this._blendFunctionParameters[3]=null,this._blendEquationParameters[0]=null,this._blendEquationParameters[1]=null,this._blendConstants[0]=null,this._blendConstants[1]=null,this._blendConstants[2]=null,this._blendConstants[3]=null,this._isAlphaBlendDirty=!0,this._isBlendFunctionParametersDirty=!1,this._isBlendEquationParametersDirty=!1,this._isBlendConstantsDirty=!1},e.prototype.apply=function(e){this.isDirty&&(this._isAlphaBlendDirty&&(this._alphaBlend?e.enable(e.BLEND):e.disable(e.BLEND),this._isAlphaBlendDirty=!1),this._isBlendFunctionParametersDirty&&(e.blendFuncSeparate(this._blendFunctionParameters[0],this._blendFunctionParameters[1],this._blendFunctionParameters[2],this._blendFunctionParameters[3]),this._isBlendFunctionParametersDirty=!1),this._isBlendEquationParametersDirty&&(e.blendEquationSeparate(this._blendEquationParameters[0],this._blendEquationParameters[1]),this._isBlendEquationParametersDirty=!1),this._isBlendConstantsDirty&&(e.blendColor(this._blendConstants[0],this._blendConstants[1],this._blendConstants[2],this._blendConstants[3]),this._isBlendConstantsDirty=!1))},e})(),d._AlphaState=f,p=$a||($a={}),_=(function(){function e(){this._isDepthTestDirty=!1,this._isDepthMaskDirty=!1,this._isDepthFuncDirty=!1,this._isCullFaceDirty=!1,this._isCullDirty=!1,this._isZOffsetDirty=!1,this._isFrontFaceDirty=!1,this.reset()}return Object.defineProperty(e.prototype,\"isDirty\",{get:function(){return this._isDepthFuncDirty||this._isDepthTestDirty||this._isDepthMaskDirty||this._isCullFaceDirty||this._isCullDirty||this._isZOffsetDirty||this._isFrontFaceDirty},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,\"zOffset\",{get:function(){return this._zOffset},set:function(e){this._zOffset!==e&&(this._zOffset=e,this._isZOffsetDirty=!0)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,\"cullFace\",{get:function(){return this._cullFace},set:function(e){this._cullFace!==e&&(this._cullFace=e,this._isCullFaceDirty=!0)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,\"cull\",{get:function(){return this._cull},set:function(e){this._cull!==e&&(this._cull=e,this._isCullDirty=!0)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,\"depthFunc\",{get:function(){return this._depthFunc},set:function(e){this._depthFunc!==e&&(this._depthFunc=e,this._isDepthFuncDirty=!0)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,\"depthMask\",{get:function(){return this._depthMask},set:function(e){this._depthMask!==e&&(this._depthMask=e,this._isDepthMaskDirty=!0)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,\"depthTest\",{get:function(){return this._depthTest},set:function(e){this._depthTest!==e&&(this._depthTest=e,this._isDepthTestDirty=!0)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,\"frontFace\",{get:function(){return this._frontFace},set:function(e){this._frontFace!==e&&(this._frontFace=e,this._isFrontFaceDirty=!0)},enumerable:!0,configurable:!0}),e.prototype.reset=function(){this._depthMask=!0,this._depthTest=!0,this._depthFunc=null,this._cullFace=null,this._cull=null,this._zOffset=0,this._frontFace=null,this._isDepthTestDirty=!0,this._isDepthMaskDirty=!0,this._isDepthFuncDirty=!1,this._isCullFaceDirty=!1,this._isCullDirty=!1,this._isZOffsetDirty=!1,this._isFrontFaceDirty=!1},e.prototype.apply=function(e){this.isDirty&&(this._isCullDirty&&(this.cull?e.enable(e.CULL_FACE):e.disable(e.CULL_FACE),this._isCullDirty=!1),this._isCullFaceDirty&&(e.cullFace(this.cullFace),this._isCullFaceDirty=!1),this._isDepthMaskDirty&&(e.depthMask(this.depthMask),this._isDepthMaskDirty=!1),this._isDepthTestDirty&&(this.depthTest?e.enable(e.DEPTH_TEST):e.disable(e.DEPTH_TEST),this._isDepthTestDirty=!1),this._isDepthFuncDirty&&(e.depthFunc(this.depthFunc),this._isDepthFuncDirty=!1),this._isZOffsetDirty&&(this.zOffset?(e.enable(e.POLYGON_OFFSET_FILL),e.polygonOffset(this.zOffset,0)):e.disable(e.POLYGON_OFFSET_FILL),this._isZOffsetDirty=!1),this._isFrontFaceDirty&&(e.frontFace(this.frontFace),this._isFrontFaceDirty=!1))},e})(),p._DepthCullingState=_,g=$a||($a={}),v=(function(){function e(){this._isStencilTestDirty=!1,this._isStencilMaskDirty=!1,this._isStencilFuncDirty=!1,this._isStencilOpDirty=!1,this.reset()}return Object.defineProperty(e.prototype,\"isDirty\",{get:function(){return this._isStencilTestDirty||this._isStencilMaskDirty||this._isStencilFuncDirty||this._isStencilOpDirty},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,\"stencilFunc\",{get:function(){return this._stencilFunc},set:function(e){this._stencilFunc!==e&&(this._stencilFunc=e,this._isStencilFuncDirty=!0)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,\"stencilFuncRef\",{get:function(){return this._stencilFuncRef},set:function(e){this._stencilFuncRef!==e&&(this._stencilFuncRef=e,this._isStencilFuncDirty=!0)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,\"stencilFuncMask\",{get:function(){return this._stencilFuncMask},set:function(e){this._stencilFuncMask!==e&&(this._stencilFuncMask=e,this._isStencilFuncDirty=!0)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,\"stencilOpStencilFail\",{get:function(){return this._stencilOpStencilFail},set:function(e){this._stencilOpStencilFail!==e&&(this._stencilOpStencilFail=e,this._isStencilOpDirty=!0)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,\"stencilOpDepthFail\",{get:function(){return this._stencilOpDepthFail},set:function(e){this._stencilOpDepthFail!==e&&(this._stencilOpDepthFail=e,this._isStencilOpDirty=!0)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,\"stencilOpStencilDepthPass\",{get:function(){return this._stencilOpStencilDepthPass},set:function(e){this._stencilOpStencilDepthPass!==e&&(this._stencilOpStencilDepthPass=e,this._isStencilOpDirty=!0)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,\"stencilMask\",{get:function(){return this._stencilMask},set:function(e){this._stencilMask!==e&&(this._stencilMask=e,this._isStencilMaskDirty=!0)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,\"stencilTest\",{get:function(){return this._stencilTest},set:function(e){this._stencilTest!==e&&(this._stencilTest=e,this._isStencilTestDirty=!0)},enumerable:!0,configurable:!0}),e.prototype.reset=function(){this._stencilTest=!1,this._stencilMask=255,this._stencilFunc=g.Engine.ALWAYS,this._stencilFuncRef=1,this._stencilFuncMask=255,this._stencilOpStencilFail=g.Engine.KEEP,this._stencilOpDepthFail=g.Engine.KEEP,this._stencilOpStencilDepthPass=g.Engine.REPLACE,this._isStencilTestDirty=!0,this._isStencilMaskDirty=!0,this._isStencilFuncDirty=!0,this._isStencilOpDirty=!0},e.prototype.apply=function(e){this.isDirty&&(this._isStencilTestDirty&&(this.stencilTest?e.enable(e.STENCIL_TEST):e.disable(e.STENCIL_TEST),this._isStencilTestDirty=!1),this._isStencilMaskDirty&&(e.stencilMask(this.stencilMask),this._isStencilMaskDirty=!1),this._isStencilFuncDirty&&(e.stencilFunc(this.stencilFunc,this.stencilFuncRef,this.stencilFuncMask),this._isStencilFuncDirty=!1),this._isStencilOpDirty&&(e.stencilOp(this.stencilOpStencilFail,this.stencilOpDepthFail,this.stencilOpStencilDepthPass),this._isStencilOpDirty=!1))},e})(),g._StencilState=v;var y,E,x,P,A,S,M,R,C,O,D,I,w,L,F,B,N,V,U,z,G,k,W,H,X,j,Y,K,Q,Z,q,J,$,ee,te,ie,re,ne,oe,se,ae=this&&this.__assign||function(){return(ae=Object.assign||function(e){for(var t,i=1,r=arguments.length;i<r;i++)for(var n in t=arguments[i])Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e}).apply(this,arguments)};!(function(R){var b=function(){},e=function(){};R.InstancingAttributeInfo=e;var h=function(){};R.RenderTargetCreationOptions=h;var t=function(){};R.DepthTextureCreationOptions=t;var l=function(){};R.EngineCapabilities=l;var i=(function(){function M(e,t,i,r){void 0===r&&(r=!1);var n=this;this.forcePOTTextures=!1,this.isFullscreen=!1,this.isPointerLock=!1,this.cullBackFaces=!0,this.renderEvenInBackground=!0,this.preventCacheWipeBetweenFrames=!1,this.enableOfflineSupport=!1,this.disableManifestCheck=!1,this.scenes=new Array,this.postProcesses=new Array,this.validateShaderPrograms=!1,this.onResizeObservable=new R.Observable,this.onCanvasBlurObservable=new R.Observable,this.onCanvasFocusObservable=new R.Observable,this.onCanvasPointerOutObservable=new R.Observable,this.onBeforeTextureInitObservable=new R.Observable,this._vrDisplay=void 0,this._vrSupported=!1,this._vrExclusivePointerMode=!1,this.disableUniformBuffers=!1,this._uniformBuffers=new Array,this.onBeginFrameObservable=new R.Observable,this.onEndFrameObservable=new R.Observable,this.onBeforeShaderCompilationObservable=new R.Observable,this.onAfterShaderCompilationObservable=new R.Observable,this._windowIsBackground=!1,this._webGLVersion=1,this._badOS=!1,this._badDesktopOS=!1,this.disableTextureBindingOptimization=!1,this.onVRDisplayChangedObservable=new R.Observable,this.onVRRequestPresentComplete=new R.Observable,this.onVRRequestPresentStart=new R.Observable,this._colorWrite=!0,this._drawCalls=new R.PerfCounter,this._textureCollisions=new R.PerfCounter,this._renderingQueueLaunched=!1,this._activeRenderLoops=new Array,this._deterministicLockstep=!1,this._lockstepMaxSteps=4,this.onContextLostObservable=new R.Observable,this.onContextRestoredObservable=new R.Observable,this._contextWasLost=!1,this._doNotHandleContextLost=!1,this._performanceMonitor=new R.PerformanceMonitor,this._fps=60,this._deltaTime=0,this.disablePerformanceMonitorInBackground=!1,this._depthCullingState=new R._DepthCullingState,this._stencilState=new R._StencilState,this._alphaState=new R._AlphaState,this._alphaMode=M.ALPHA_DISABLE,this._internalTexturesCache=new Array,this._activeChannel=0,this._currentTextureChannel=-1,this._boundTexturesCache={},this._compiledEffects={},this._vertexAttribArraysEnabled=[],this._uintIndicesCurrentlySet=!1,this._currentBoundBuffer=new Array,this._currentFramebuffer=null,this._currentBufferPointers=new Array,this._currentInstanceLocations=new Array,this._currentInstanceBuffers=new Array,this._firstBoundInternalTextureTracker=new R.DummyInternalTextureTracker,this._lastBoundInternalTextureTracker=new R.DummyInternalTextureTracker,this._vaoRecordInProgress=!1,this._mustWipeVertexAttributes=!1,this._nextFreeTextureSlots=new Array,this._maxSimultaneousTextures=0,this._activeRequests=new Array,this._texturesSupported=new Array,this.premultipliedAlpha=!0,this._viewportCached=new R.Vector4(0,0,0,0),this._onVRFullScreenTriggered=function(){if(n._vrDisplay&&n._vrDisplay.isPresenting){n._oldSize=new R.Size(n.getRenderWidth(),n.getRenderHeight()),n._oldHardwareScaleFactor=n.getHardwareScalingLevel();var e=n._vrDisplay.getEyeParameters(\"left\");n.setHardwareScalingLevel(1),n.setSize(2*e.renderWidth,e.renderHeight)}else n.setHardwareScalingLevel(n._oldHardwareScaleFactor),n.setSize(n._oldSize.width,n._oldSize.height)},this._unpackFlipYCached=null,this.enableUnpackFlipYCached=!0,this._boundUniforms={},R.PromisePolyfill.Apply();var o=null;if(M.Instances.push(this),e){if(i=i||{},e.getContext){if(o=e,this._renderingCanvas=o,null!=t&&(i.antialias=t),void 0===i.deterministicLockstep&&(i.deterministicLockstep=!1),void 0===i.lockstepMaxSteps&&(i.lockstepMaxSteps=4),void 0===i.preserveDrawingBuffer&&(i.preserveDrawingBuffer=!1),void 0===i.audioEngine&&(i.audioEngine=!0),void 0===i.stencil&&(i.stencil=!0),!1===i.premultipliedAlpha&&(this.premultipliedAlpha=!1),this._deterministicLockstep=i.deterministicLockstep,this._lockstepMaxSteps=i.lockstepMaxSteps,this._doNotHandleContextLost=!!i.doNotHandleContextLost,navigator&&navigator.userAgent)for(var s=navigator.userAgent,a=0,l=M.ExceptionList;a<l.length;a++){var c=l[a],h=c.key,u=c.targets;if(-1<s.indexOf(h)){if(c.capture&&c.captureConstraint){var d=c.capture,f=c.captureConstraint,p=new RegExp(d).exec(s);if(p&&0<p.length)if(f<=parseInt(p[p.length-1]))continue}for(var _=0,m=u;_<m.length;_++){switch(m[_]){case\"uniformBuffer\":this.disableUniformBuffers=!0;break;case\"textureBindingOptimization\":this.disableTextureBindingOptimization=!0}}}}if(!i.disableWebGL2Support)try{this._gl=o.getContext(\"webgl2\",i)||o.getContext(\"experimental-webgl2\",i),this._gl&&(this._webGLVersion=2,this._gl.deleteQuery||(this._webGLVersion=1))}catch(e){}if(!this._gl){if(!o)throw new Error(\"The provided canvas is null or undefined.\");try{this._gl=o.getContext(\"webgl\",i)||o.getContext(\"experimental-webgl\",i)}catch(e){throw new Error(\"WebGL not supported\")}}if(!this._gl)throw new Error(\"WebGL not supported\");this._onCanvasFocus=function(){n.onCanvasFocusObservable.notifyObservers(n)},this._onCanvasBlur=function(){n.onCanvasBlurObservable.notifyObservers(n)},o.addEventListener(\"focus\",this._onCanvasFocus),o.addEventListener(\"blur\",this._onCanvasBlur),this._onBlur=function(){n.disablePerformanceMonitorInBackground&&n._performanceMonitor.disable(),n._windowIsBackground=!0},this._onFocus=function(){n.disablePerformanceMonitorInBackground&&n._performanceMonitor.enable(),n._windowIsBackground=!1},this._onCanvasPointerOut=function(e){n.onCanvasPointerOutObservable.notifyObservers(e)},window.addEventListener(\"blur\",this._onBlur),window.addEventListener(\"focus\",this._onFocus),o.addEventListener(\"pointerout\",this._onCanvasPointerOut),this._doNotHandleContextLost||(this._onContextLost=function(e){e.preventDefault(),n._contextWasLost=!0,R.Tools.Warn(\"WebGL context lost.\"),n.onContextLostObservable.notifyObservers(n)},this._onContextRestored=function(e){setTimeout((function(){n._initGLContext(),n._rebuildEffects(),n._rebuildInternalTextures(),n._rebuildBuffers(),n.wipeCaches(!0),R.Tools.Warn(\"WebGL context successfully restored.\"),n.onContextRestoredObservable.notifyObservers(n),n._contextWasLost=!1}),0)},o.addEventListener(\"webglcontextlost\",this._onContextLost,!1),o.addEventListener(\"webglcontextrestored\",this._onContextRestored,!1))}else{this._gl=e,this._renderingCanvas=this._gl.canvas,this._gl.renderbufferStorageMultisample&&(this._webGLVersion=2);var g=this._gl.getContextAttributes();g&&(i.stencil=g.stencil)}var v=i.limitDeviceRatio||window.devicePixelRatio||1;this._hardwareScalingLevel=r?1/Math.min(v,window.devicePixelRatio||1):1,this.resize(),this._isStencilEnable=!!i.stencil,this._initGLContext(),o&&(this._onFullscreenChange=function(){void 0!==document.fullscreen?n.isFullscreen=document.fullscreen:void 0!==document.mozFullScreen?n.isFullscreen=document.mozFullScreen:void 0!==document.webkitIsFullScreen?n.isFullscreen=document.webkitIsFullScreen:void 0!==document.msIsFullScreen&&(n.isFullscreen=document.msIsFullScreen),n.isFullscreen&&n._pointerLockRequested&&o&&(o.requestPointerLock=o.requestPointerLock||o.msRequestPointerLock||o.mozRequestPointerLock||o.webkitRequestPointerLock,o.requestPointerLock&&o.requestPointerLock())},document.addEventListener(\"fullscreenchange\",this._onFullscreenChange,!1),document.addEventListener(\"mozfullscreenchange\",this._onFullscreenChange,!1),document.addEventListener(\"webkitfullscreenchange\",this._onFullscreenChange,!1),document.addEventListener(\"msfullscreenchange\",this._onFullscreenChange,!1),this._onPointerLockChange=function(){n.isPointerLock=document.mozPointerLockElement===o||document.webkitPointerLockElement===o||document.msPointerLockElement===o||document.pointerLockElement===o},document.addEventListener(\"pointerlockchange\",this._onPointerLockChange,!1),document.addEventListener(\"mspointerlockchange\",this._onPointerLockChange,!1),document.addEventListener(\"mozpointerlockchange\",this._onPointerLockChange,!1),document.addEventListener(\"webkitpointerlockchange\",this._onPointerLockChange,!1),this._onVRDisplayPointerRestricted=function(){o&&o.requestPointerLock()},this._onVRDisplayPointerUnrestricted=function(){document.exitPointerLock()},window.addEventListener(\"vrdisplaypointerrestricted\",this._onVRDisplayPointerRestricted,!1),window.addEventListener(\"vrdisplaypointerunrestricted\",this._onVRDisplayPointerUnrestricted,!1)),!M.audioEngine&&i.audioEngine&&M.AudioEngineFactory&&(M.audioEngine=M.AudioEngineFactory(this.getRenderingCanvas()));for(var y=0;y<this._caps.maxVertexAttribs;y++)this._currentBufferPointers[y]=new b;this._linkTrackers(this._firstBoundInternalTextureTracker,this._lastBoundInternalTextureTracker),i.autoEnableWebVR&&this.initWebVR(),this._badOS=/iPad/i.test(navigator.userAgent)||/iPhone/i.test(navigator.userAgent),this._badDesktopOS=/^((?!chrome|android).)*safari/i.test(navigator.userAgent),console.log(\"Babylon.js engine (v\"+M.Version+\") launched\"),this.enableOfflineSupport=void 0!==R.Database}}return Object.defineProperty(M,\"LastCreatedEngine\",{get:function(){return 0===M.Instances.length?null:M.Instances[M.Instances.length-1]},enumerable:!0,configurable:!0}),Object.defineProperty(M,\"LastCreatedScene\",{get:function(){var e=M.LastCreatedEngine;return e?0===e.scenes.length?null:e.scenes[e.scenes.length-1]:null},enumerable:!0,configurable:!0}),M.MarkAllMaterialsAsDirty=function(e,t){for(var i=0;i<M.Instances.length;i++)for(var r=M.Instances[i],n=0;n<r.scenes.length;n++)r.scenes[n].markAllMaterialsAsDirty(e,t)},Object.defineProperty(M,\"Version\",{get:function(){return\"3.3.0\"},enumerable:!0,configurable:!0}),Object.defineProperty(M.prototype,\"isInVRExclusivePointerMode\",{get:function(){return this._vrExclusivePointerMode},enumerable:!0,configurable:!0}),Object.defineProperty(M.prototype,\"supportsUniformBuffers\",{get:function(){return 1<this.webGLVersion&&!this.disableUniformBuffers},enumerable:!0,configurable:!0}),Object.defineProperty(M.prototype,\"needPOTTextures\",{get:function(){return this._webGLVersion<2||this.forcePOTTextures},enumerable:!0,configurable:!0}),Object.defineProperty(M.prototype,\"doNotHandleContextLost\",{get:function(){return this._doNotHandleContextLost},set:function(e){this._doNotHandleContextLost=e},enumerable:!0,configurable:!0}),Object.defineProperty(M.prototype,\"performanceMonitor\",{get:function(){return this._performanceMonitor},enumerable:!0,configurable:!0}),Object.defineProperty(M.prototype,\"texturesSupported\",{get:function(){return this._texturesSupported},enumerable:!0,configurable:!0}),Object.defineProperty(M.prototype,\"textureFormatInUse\",{get:function(){return this._textureFormatInUse},enumerable:!0,configurable:!0}),Object.defineProperty(M.prototype,\"currentViewport\",{get:function(){return this._cachedViewport},enumerable:!0,configurable:!0}),Object.defineProperty(M.prototype,\"emptyTexture\",{get:function(){return this._emptyTexture||(this._emptyTexture=this.createRawTexture(new Uint8Array(4),1,1,M.TEXTUREFORMAT_RGBA,!1,!1,M.TEXTURE_NEAREST_SAMPLINGMODE)),this._emptyTexture},enumerable:!0,configurable:!0}),Object.defineProperty(M.prototype,\"emptyTexture3D\",{get:function(){return this._emptyTexture3D||(this._emptyTexture3D=this.createRawTexture3D(new Uint8Array(4),1,1,1,M.TEXTUREFORMAT_RGBA,!1,!1,M.TEXTURE_NEAREST_SAMPLINGMODE)),this._emptyTexture3D},enumerable:!0,configurable:!0}),Object.defineProperty(M.prototype,\"emptyCubeTexture\",{get:function(){if(!this._emptyCubeTexture){var e=new Uint8Array(4),t=[e,e,e,e,e,e];this._emptyCubeTexture=this.createRawCubeTexture(t,1,M.TEXTUREFORMAT_RGBA,M.TEXTURETYPE_UNSIGNED_INT,!1,!1,M.TEXTURE_NEAREST_SAMPLINGMODE)}return this._emptyCubeTexture},enumerable:!0,configurable:!0}),M.prototype._rebuildInternalTextures=function(){for(var e=0,t=this._internalTexturesCache.slice();e<t.length;e++){t[e]._rebuild()}},M.prototype._rebuildEffects=function(){for(var e in this._compiledEffects){this._compiledEffects[e]._prepareEffect()}R.Effect.ResetCache()},M.prototype._rebuildBuffers=function(){for(var e=0,t=this.scenes;e<t.length;e++){var i=t[e];i.resetCachedMaterial(),i._rebuildGeometries(),i._rebuildTextures()}for(var r=0,n=this._uniformBuffers;r<n.length;r++){n[r]._rebuild()}},M.prototype._initGLContext=function(){this._caps=new l,this._caps.maxTexturesImageUnits=this._gl.getParameter(this._gl.MAX_TEXTURE_IMAGE_UNITS),this._caps.maxCombinedTexturesImageUnits=this._gl.getParameter(this._gl.MAX_COMBINED_TEXTURE_IMAGE_UNITS),this._caps.maxVertexTextureImageUnits=this._gl.getParameter(this._gl.MAX_VERTEX_TEXTURE_IMAGE_UNITS),this._caps.maxTextureSize=this._gl.getParameter(this._gl.MAX_TEXTURE_SIZE),this._caps.maxCubemapTextureSize=this._gl.getParameter(this._gl.MAX_CUBE_MAP_TEXTURE_SIZE),this._caps.maxRenderTextureSize=this._gl.getParameter(this._gl.MAX_RENDERBUFFER_SIZE),this._caps.maxVertexAttribs=this._gl.getParameter(this._gl.MAX_VERTEX_ATTRIBS),this._caps.maxVaryingVectors=this._gl.getParameter(this._gl.MAX_VARYING_VECTORS),this._caps.maxFragmentUniformVectors=this._gl.getParameter(this._gl.MAX_FRAGMENT_UNIFORM_VECTORS),this._caps.maxVertexUniformVectors=this._gl.getParameter(this._gl.MAX_VERTEX_UNIFORM_VECTORS),this._glVersion=this._gl.getParameter(this._gl.VERSION);var e=this._gl.getExtension(\"WEBGL_debug_renderer_info\");if(null!=e&&(this._glRenderer=this._gl.getParameter(e.UNMASKED_RENDERER_WEBGL),this._glVendor=this._gl.getParameter(e.UNMASKED_VENDOR_WEBGL)),this._glVendor||(this._glVendor=\"Unknown vendor\"),this._glRenderer||(this._glRenderer=\"Unknown renderer\"),this._gl.HALF_FLOAT_OES=36193,34842!==this._gl.RGBA16F&&(this._gl.RGBA16F=34842),34836!==this._gl.RGBA32F&&(this._gl.RGBA32F=34836),35056!==this._gl.DEPTH24_STENCIL8&&(this._gl.DEPTH24_STENCIL8=35056),this._caps.standardDerivatives=1<this._webGLVersion||null!==this._gl.getExtension(\"OES_standard_derivatives\"),this._caps.astc=this._gl.getExtension(\"WEBGL_compressed_texture_astc\")||this._gl.getExtension(\"WEBKIT_WEBGL_compressed_texture_astc\"),this._caps.s3tc=this._gl.getExtension(\"WEBGL_compressed_texture_s3tc\")||this._gl.getExtension(\"WEBKIT_WEBGL_compressed_texture_s3tc\"),this._caps.pvrtc=this._gl.getExtension(\"WEBGL_compressed_texture_pvrtc\")||this._gl.getExtension(\"WEBKIT_WEBGL_compressed_texture_pvrtc\"),this._caps.etc1=this._gl.getExtension(\"WEBGL_compressed_texture_etc1\")||this._gl.getExtension(\"WEBKIT_WEBGL_compressed_texture_etc1\"),this._caps.etc2=this._gl.getExtension(\"WEBGL_compressed_texture_etc\")||this._gl.getExtension(\"WEBKIT_WEBGL_compressed_texture_etc\")||this._gl.getExtension(\"WEBGL_compressed_texture_es3_0\"),this._caps.textureAnisotropicFilterExtension=this._gl.getExtension(\"EXT_texture_filter_anisotropic\")||this._gl.getExtension(\"WEBKIT_EXT_texture_filter_anisotropic\")||this._gl.getExtension(\"MOZ_EXT_texture_filter_anisotropic\"),this._caps.maxAnisotropy=this._caps.textureAnisotropicFilterExtension?this._gl.getParameter(this._caps.textureAnisotropicFilterExtension.MAX_TEXTURE_MAX_ANISOTROPY_EXT):0,this._caps.uintIndices=1<this._webGLVersion||null!==this._gl.getExtension(\"OES_element_index_uint\"),this._caps.fragmentDepthSupported=1<this._webGLVersion||null!==this._gl.getExtension(\"EXT_frag_depth\"),this._caps.highPrecisionShaderSupported=!0,this._caps.timerQuery=this._gl.getExtension(\"EXT_disjoint_timer_query_webgl2\")||this._gl.getExtension(\"EXT_disjoint_timer_query\"),this._caps.timerQuery&&(1===this._webGLVersion&&(this._gl.getQuery=this._caps.timerQuery.getQueryEXT.bind(this._caps.timerQuery)),this._caps.canUseTimestampForTimerQuery=0<this._gl.getQuery(this._caps.timerQuery.TIMESTAMP_EXT,this._caps.timerQuery.QUERY_COUNTER_BITS_EXT)),this._caps.colorBufferFloat=1<this._webGLVersion&&this._gl.getExtension(\"EXT_color_buffer_float\"),this._caps.textureFloat=!!(1<this._webGLVersion||this._gl.getExtension(\"OES_texture_float\")),this._caps.textureFloatLinearFiltering=!(!this._caps.textureFloat||!this._gl.getExtension(\"OES_texture_float_linear\")),this._caps.textureFloatRender=!(!this._caps.textureFloat||!this._canRenderToFloatFramebuffer()),this._caps.textureHalfFloat=!!(1<this._webGLVersion||this._gl.getExtension(\"OES_texture_half_float\")),this._caps.textureHalfFloatLinearFiltering=!!(1<this._webGLVersion||this._caps.textureHalfFloat&&this._gl.getExtension(\"OES_texture_half_float_linear\")),1<this._webGLVersion&&(this._gl.HALF_FLOAT_OES=5131),this._caps.textureHalfFloatRender=this._caps.textureHalfFloat&&this._canRenderToHalfFloatFramebuffer(),this._caps.textureLOD=!!(1<this._webGLVersion||this._gl.getExtension(\"EXT_shader_texture_lod\")),1<this._webGLVersion)this._caps.drawBuffersExtension=!0;else{var t=this._gl.getExtension(\"WEBGL_draw_buffers\");if(null!==t){this._caps.drawBuffersExtension=!0,this._gl.drawBuffers=t.drawBuffersWEBGL.bind(t),this._gl.DRAW_FRAMEBUFFER=this._gl.FRAMEBUFFER;for(var i=0;i<16;i++)this._gl[\"COLOR_ATTACHMENT\"+i+\"_WEBGL\"]=t[\"COLOR_ATTACHMENT\"+i+\"_WEBGL\"]}else this._caps.drawBuffersExtension=!1}if(1<this._webGLVersion)this._caps.depthTextureExtension=!0;else{var r=this._gl.getExtension(\"WEBGL_depth_texture\");null!=r&&(this._caps.depthTextureExtension=!0,this._gl.UNSIGNED_INT_24_8=r.UNSIGNED_INT_24_8_WEBGL)}if(1<this._webGLVersion)this._caps.vertexArrayObject=!0;else{var n=this._gl.getExtension(\"OES_vertex_array_object\");null!=n?(this._caps.vertexArrayObject=!0,this._gl.createVertexArray=n.createVertexArrayOES.bind(n),this._gl.bindVertexArray=n.bindVertexArrayOES.bind(n),this._gl.deleteVertexArray=n.deleteVertexArrayOES.bind(n)):this._caps.vertexArrayObject=!1}if(1<this._webGLVersion)this._caps.instancedArrays=!0;else{var o=this._gl.getExtension(\"ANGLE_instanced_arrays\");null!=o?(this._caps.instancedArrays=!0,this._gl.drawArraysInstanced=o.drawArraysInstancedANGLE.bind(o),this._gl.drawElementsInstanced=o.drawElementsInstancedANGLE.bind(o),this._gl.vertexAttribDivisor=o.vertexAttribDivisorANGLE.bind(o)):this._caps.instancedArrays=!1}if(this._caps.astc&&this.texturesSupported.push(\"-astc.ktx\"),this._caps.s3tc&&this.texturesSupported.push(\"-dxt.ktx\"),this._caps.pvrtc&&this.texturesSupported.push(\"-pvrtc.ktx\"),this._caps.etc2&&this.texturesSupported.push(\"-etc2.ktx\"),this._caps.etc1&&this.texturesSupported.push(\"-etc1.ktx\"),this._gl.getShaderPrecisionFormat){var s=this._gl.getShaderPrecisionFormat(this._gl.FRAGMENT_SHADER,this._gl.HIGH_FLOAT);s&&(this._caps.highPrecisionShaderSupported=0!==s.precision)}this.setDepthBuffer(!0),this.setDepthFunctionToLessOrEqual(),this.setDepthWrite(!0),this._maxSimultaneousTextures=this._caps.maxCombinedTexturesImageUnits;for(var a=0;a<this._maxSimultaneousTextures;a++)this._nextFreeTextureSlots.push(a)},Object.defineProperty(M.prototype,\"webGLVersion\",{get:function(){return this._webGLVersion},enumerable:!0,configurable:!0}),Object.defineProperty(M.prototype,\"isStencilEnable\",{get:function(){return this._isStencilEnable},enumerable:!0,configurable:!0}),M.prototype._prepareWorkingCanvas=function(){if(!this._workingCanvas){this._workingCanvas=document.createElement(\"canvas\");var e=this._workingCanvas.getContext(\"2d\");e&&(this._workingContext=e)}},M.prototype.resetTextureCache=function(){for(var e in this._boundTexturesCache)if(this._boundTexturesCache.hasOwnProperty(e)){var t=this._boundTexturesCache[e];t&&this._removeDesignatedSlot(t),this._boundTexturesCache[e]=null}if(!this.disableTextureBindingOptimization){this._nextFreeTextureSlots=[];for(var i=0;i<this._maxSimultaneousTextures;i++)this._nextFreeTextureSlots.push(i)}this._currentTextureChannel=-1},M.prototype.isDeterministicLockStep=function(){return this._deterministicLockstep},M.prototype.getLockstepMaxSteps=function(){return this._lockstepMaxSteps},M.prototype.getGlInfo=function(){return{vendor:this._glVendor,renderer:this._glRenderer,version:this._glVersion}},M.prototype.getAspectRatio=function(e,t){void 0===t&&(t=!1);var i=e.viewport;return this.getRenderWidth(t)*i.width/(this.getRenderHeight(t)*i.height)},M.prototype.getScreenAspectRatio=function(){return this.getRenderWidth(!0)/this.getRenderHeight(!0)},M.prototype.getRenderWidth=function(e){return void 0===e&&(e=!1),!e&&this._currentRenderTarget?this._currentRenderTarget.width:this._gl.drawingBufferWidth},M.prototype.getRenderHeight=function(e){return void 0===e&&(e=!1),!e&&this._currentRenderTarget?this._currentRenderTarget.height:this._gl.drawingBufferHeight},M.prototype.getRenderingCanvas=function(){return this._renderingCanvas},M.prototype.getRenderingCanvasClientRect=function(){return this._renderingCanvas?this._renderingCanvas.getBoundingClientRect():null},M.prototype.setHardwareScalingLevel=function(e){this._hardwareScalingLevel=e,this.resize()},M.prototype.getHardwareScalingLevel=function(){return this._hardwareScalingLevel},M.prototype.getLoadedTexturesCache=function(){return this._internalTexturesCache},M.prototype.getCaps=function(){return this._caps},Object.defineProperty(M.prototype,\"drawCalls\",{get:function(){return R.Tools.Warn(\"drawCalls is deprecated. Please use SceneInstrumentation class\"),0},enumerable:!0,configurable:!0}),Object.defineProperty(M.prototype,\"drawCallsPerfCounter\",{get:function(){return R.Tools.Warn(\"drawCallsPerfCounter is deprecated. Please use SceneInstrumentation class\"),null},enumerable:!0,configurable:!0}),M.prototype.getDepthFunction=function(){return this._depthCullingState.depthFunc},M.prototype.setDepthFunction=function(e){this._depthCullingState.depthFunc=e},M.prototype.setDepthFunctionToGreater=function(){this._depthCullingState.depthFunc=this._gl.GREATER},M.prototype.setDepthFunctionToGreaterOrEqual=function(){this._depthCullingState.depthFunc=this._gl.GEQUAL},M.prototype.setDepthFunctionToLess=function(){this._depthCullingState.depthFunc=this._gl.LESS},M.prototype.setDepthFunctionToLessOrEqual=function(){this._depthCullingState.depthFunc=this._gl.LEQUAL},M.prototype.getStencilBuffer=function(){return this._stencilState.stencilTest},M.prototype.setStencilBuffer=function(e){this._stencilState.stencilTest=e},M.prototype.getStencilMask=function(){return this._stencilState.stencilMask},M.prototype.setStencilMask=function(e){this._stencilState.stencilMask=e},M.prototype.getStencilFunction=function(){return this._stencilState.stencilFunc},M.prototype.getStencilFunctionReference=function(){return this._stencilState.stencilFuncRef},M.prototype.getStencilFunctionMask=function(){return this._stencilState.stencilFuncMask},M.prototype.setStencilFunction=function(e){this._stencilState.stencilFunc=e},M.prototype.setStencilFunctionReference=function(e){this._stencilState.stencilFuncRef=e},M.prototype.setStencilFunctionMask=function(e){this._stencilState.stencilFuncMask=e},M.prototype.getStencilOperationFail=function(){return this._stencilState.stencilOpStencilFail},M.prototype.getStencilOperationDepthFail=function(){return this._stencilState.stencilOpDepthFail},M.prototype.getStencilOperationPass=function(){return this._stencilState.stencilOpStencilDepthPass},M.prototype.setStencilOperationFail=function(e){this._stencilState.stencilOpStencilFail=e},M.prototype.setStencilOperationDepthFail=function(e){this._stencilState.stencilOpDepthFail=e},M.prototype.setStencilOperationPass=function(e){this._stencilState.stencilOpStencilDepthPass=e},M.prototype.setDitheringState=function(e){e?this._gl.enable(this._gl.DITHER):this._gl.disable(this._gl.DITHER)},M.prototype.setRasterizerState=function(e){e?this._gl.disable(this._gl.RASTERIZER_DISCARD):this._gl.enable(this._gl.RASTERIZER_DISCARD)},M.prototype.stopRenderLoop=function(e){if(e){var t=this._activeRenderLoops.indexOf(e);0<=t&&this._activeRenderLoops.splice(t,1)}else this._activeRenderLoops=[]},M.prototype._renderLoop=function(){if(!this._contextWasLost){var e=!0;if(!this.renderEvenInBackground&&this._windowIsBackground&&(e=!1),e){this.beginFrame();for(var t=0;t<this._activeRenderLoops.length;t++){(0,this._activeRenderLoops[t])()}this.endFrame()}}if(0<this._activeRenderLoops.length){var i=null;this._vrDisplay&&this._vrDisplay.isPresenting&&(i=this._vrDisplay),this._frameHandler=R.Tools.QueueNewFrame(this._bindedRenderFunction,i)}else this._renderingQueueLaunched=!1},M.prototype.runRenderLoop=function(e){-1===this._activeRenderLoops.indexOf(e)&&(this._activeRenderLoops.push(e),this._renderingQueueLaunched||(this._renderingQueueLaunched=!0,this._bindedRenderFunction=this._renderLoop.bind(this),this._frameHandler=R.Tools.QueueNewFrame(this._bindedRenderFunction)))},M.prototype.switchFullscreen=function(e){this.isFullscreen?R.Tools.ExitFullscreen():(this._pointerLockRequested=e,this._renderingCanvas&&R.Tools.RequestFullscreen(this._renderingCanvas))},M.prototype.clear=function(e,t,i,r){void 0===r&&(r=!1),this.applyStates();var n=0;t&&e&&(this._gl.clearColor(e.r,e.g,e.b,void 0!==e.a?e.a:1),n|=this._gl.COLOR_BUFFER_BIT),i&&(this._gl.clearDepth(1),n|=this._gl.DEPTH_BUFFER_BIT),r&&(this._gl.clearStencil(0),n|=this._gl.STENCIL_BUFFER_BIT),this._gl.clear(n)},M.prototype.scissorClear=function(e,t,i,r,n){var o=this._gl,s=o.getParameter(o.SCISSOR_TEST),a=o.getParameter(o.SCISSOR_BOX);o.enable(o.SCISSOR_TEST),o.scissor(e,t,i,r),this.clear(n,!0,!0,!0),o.scissor(a[0],a[1],a[2],a[3]),!0===s?o.enable(o.SCISSOR_TEST):o.disable(o.SCISSOR_TEST)},M.prototype._viewport=function(e,t,i,r){e===this._viewportCached.x&&t===this._viewportCached.y&&i===this._viewportCached.z&&r===this._viewportCached.w||(this._viewportCached.x=e,this._viewportCached.y=t,this._viewportCached.z=i,this._viewportCached.w=r,this._gl.viewport(e,t,i,r))},M.prototype.setViewport=function(e,t,i){var r=t||this.getRenderWidth(),n=i||this.getRenderHeight(),o=e.x||0,s=e.y||0;this._cachedViewport=e,this._viewport(o*r,s*n,r*e.width,n*e.height)},M.prototype.setDirectViewport=function(e,t,i,r){var n=this._cachedViewport;return this._cachedViewport=null,this._viewport(e,t,i,r),n},M.prototype.beginFrame=function(){this.onBeginFrameObservable.notifyObservers(this),this._measureFps()},M.prototype.endFrame=function(){this._badOS&&this.flushFramebuffer(),this._vrDisplay&&this._vrDisplay.isPresenting&&this._vrDisplay.submitFrame(),this.onEndFrameObservable.notifyObservers(this)},M.prototype.resize=function(){if(!this._vrDisplay||!this._vrDisplay.isPresenting){var e=this._renderingCanvas?this._renderingCanvas.clientWidth:window.innerWidth,t=this._renderingCanvas?this._renderingCanvas.clientHeight:window.innerHeight;this.setSize(e/this._hardwareScalingLevel,t/this._hardwareScalingLevel)}},M.prototype.setSize=function(e,t){if(this._renderingCanvas&&(this._renderingCanvas.width!==e||this._renderingCanvas.height!==t)){this._renderingCanvas.width=e,this._renderingCanvas.height=t;for(var i=0;i<this.scenes.length;i++)for(var r=this.scenes[i],n=0;n<r.cameras.length;n++){r.cameras[n]._currentRenderId=0}this.onResizeObservable.hasObservers&&this.onResizeObservable.notifyObservers(this)}},M.prototype.isVRDevicePresent=function(){return!!this._vrDisplay},M.prototype.getVRDevice=function(){return this._vrDisplay},M.prototype.initWebVR=function(){return this.initWebVRAsync(),this.onVRDisplayChangedObservable},M.prototype.initWebVRAsync=function(){var i=this,t=function(){var t={vrDisplay:i._vrDisplay,vrSupported:i._vrSupported};i.onVRDisplayChangedObservable.notifyObservers(t),i._webVRInitPromise=new Promise(function(e){e(t)})};return this._onVrDisplayConnect||(this._onVrDisplayConnect=function(e){i._vrDisplay=e.display,t()},this._onVrDisplayDisconnect=function(){i._vrDisplay.cancelAnimationFrame(i._frameHandler),i._vrDisplay=void 0,i._frameHandler=R.Tools.QueueNewFrame(i._bindedRenderFunction),t()},this._onVrDisplayPresentChange=function(){i._vrExclusivePointerMode=i._vrDisplay&&i._vrDisplay.isPresenting},window.addEventListener(\"vrdisplayconnect\",this._onVrDisplayConnect),window.addEventListener(\"vrdisplaydisconnect\",this._onVrDisplayDisconnect),window.addEventListener(\"vrdisplaypresentchange\",this._onVrDisplayPresentChange)),this._webVRInitPromise=this._webVRInitPromise||this._getVRDisplaysAsync(),this._webVRInitPromise.then(t),this._webVRInitPromise},M.prototype.enableVR=function(){var e=this;if(this._vrDisplay&&!this._vrDisplay.isPresenting){this.onVRRequestPresentStart.notifyObservers(this),this._vrDisplay.requestPresent([{source:this.getRenderingCanvas()}]).then((function(){e.onVRRequestPresentComplete.notifyObservers(!0),e._onVRFullScreenTriggered()})).catch((function(){e.onVRRequestPresentComplete.notifyObservers(!1)}))}},M.prototype.disableVR=function(){this._vrDisplay&&this._vrDisplay.isPresenting&&this._vrDisplay.exitPresent().then(this._onVRFullScreenTriggered).catch(this._onVRFullScreenTriggered)},M.prototype._getVRDisplaysAsync=function(){var i=this;return new Promise(function(t,e){navigator.getVRDisplays?navigator.getVRDisplays().then((function(e){i._vrSupported=!0,i._vrDisplay=e[0],t({vrDisplay:i._vrDisplay,vrSupported:i._vrSupported})})):(i._vrDisplay=void 0,i._vrSupported=!1,t({vrDisplay:i._vrDisplay,vrSupported:i._vrSupported}))})},M.prototype.bindFramebuffer=function(e,t,i,r,n,o,s){void 0===s&&(s=0),this._currentRenderTarget&&this.unBindFramebuffer(this._currentRenderTarget),this._currentRenderTarget=e,this.bindUnboundFramebuffer(e._MSAAFramebuffer?e._MSAAFramebuffer:e._framebuffer);var a=this._gl;e.isCube&&(void 0===t&&(t=0),a.framebufferTexture2D(a.FRAMEBUFFER,a.COLOR_ATTACHMENT0,a.TEXTURE_CUBE_MAP_POSITIVE_X+t,e._webGLTexture,s),o&&(o._generateStencilBuffer?a.framebufferTexture2D(a.FRAMEBUFFER,a.DEPTH_STENCIL_ATTACHMENT,a.TEXTURE_CUBE_MAP_POSITIVE_X+t,o._webGLTexture,s):a.framebufferTexture2D(a.FRAMEBUFFER,a.DEPTH_ATTACHMENT,a.TEXTURE_CUBE_MAP_POSITIVE_X+t,o._webGLTexture,s))),this._cachedViewport&&!n?this.setViewport(this._cachedViewport,i,r):(i||(i=e.width,s&&(i/=Math.pow(2,s))),r||(r=e.height,s&&(r/=Math.pow(2,s))),this._viewport(0,0,i,r)),this.wipeCaches()},M.prototype.bindUnboundFramebuffer=function(e){this._currentFramebuffer!==e&&(this._gl.bindFramebuffer(this._gl.FRAMEBUFFER,e),this._currentFramebuffer=e)},M.prototype.unBindFramebuffer=function(e,t,i){void 0===t&&(t=!1),this._currentRenderTarget=null;var r=this._gl;e._MSAAFramebuffer&&(r.bindFramebuffer(r.READ_FRAMEBUFFER,e._MSAAFramebuffer),r.bindFramebuffer(r.DRAW_FRAMEBUFFER,e._framebuffer),r.blitFramebuffer(0,0,e.width,e.height,0,0,e.width,e.height,r.COLOR_BUFFER_BIT,r.NEAREST)),!e.generateMipMaps||t||e.isCube||(this._bindTextureDirectly(r.TEXTURE_2D,e,!0),r.generateMipmap(r.TEXTURE_2D),this._bindTextureDirectly(r.TEXTURE_2D,null)),i&&(e._MSAAFramebuffer&&this.bindUnboundFramebuffer(e._framebuffer),i()),this.bindUnboundFramebuffer(null)},M.prototype.unBindMultiColorAttachmentFramebuffer=function(e,t,i){void 0===t&&(t=!1),this._currentRenderTarget=null;var r=this._gl;if(e[0]._MSAAFramebuffer){r.bindFramebuffer(r.READ_FRAMEBUFFER,e[0]._MSAAFramebuffer),r.bindFramebuffer(r.DRAW_FRAMEBUFFER,e[0]._framebuffer);var n=e[0]._attachments;n||(n=new Array(e.length),e[0]._attachments=n);for(var o=0;o<e.length;o++){for(var s=e[o],a=0;a<n.length;a++)n[a]=r.NONE;n[o]=r[1<this.webGLVersion?\"COLOR_ATTACHMENT\"+o:\"COLOR_ATTACHMENT\"+o+\"_WEBGL\"],r.readBuffer(n[o]),r.drawBuffers(n),r.blitFramebuffer(0,0,s.width,s.height,0,0,s.width,s.height,r.COLOR_BUFFER_BIT,r.NEAREST)}for(o=0;o<n.length;o++)n[o]=r[1<this.webGLVersion?\"COLOR_ATTACHMENT\"+o:\"COLOR_ATTACHMENT\"+o+\"_WEBGL\"];r.drawBuffers(n)}for(o=0;o<e.length;o++){!(s=e[o]).generateMipMaps||t||s.isCube||(this._bindTextureDirectly(r.TEXTURE_2D,s),r.generateMipmap(r.TEXTURE_2D),this._bindTextureDirectly(r.TEXTURE_2D,null))}i&&(e[0]._MSAAFramebuffer&&this.bindUnboundFramebuffer(e[0]._framebuffer),i()),this.bindUnboundFramebuffer(null)},M.prototype.generateMipMapsForCubemap=function(e){if(e.generateMipMaps){var t=this._gl;this._bindTextureDirectly(t.TEXTURE_CUBE_MAP,e,!0),t.generateMipmap(t.TEXTURE_CUBE_MAP),this._bindTextureDirectly(t.TEXTURE_CUBE_MAP,null)}},M.prototype.flushFramebuffer=function(){this._gl.flush()},M.prototype.restoreDefaultFramebuffer=function(){this._currentRenderTarget?this.unBindFramebuffer(this._currentRenderTarget):this.bindUnboundFramebuffer(null),this._cachedViewport&&this.setViewport(this._cachedViewport),this.wipeCaches()},M.prototype.createUniformBuffer=function(e){var t=this._gl.createBuffer();if(!t)throw new Error(\"Unable to create uniform buffer\");return this.bindUniformBuffer(t),e instanceof Float32Array?this._gl.bufferData(this._gl.UNIFORM_BUFFER,e,this._gl.STATIC_DRAW):this._gl.bufferData(this._gl.UNIFORM_BUFFER,new Float32Array(e),this._gl.STATIC_DRAW),this.bindUniformBuffer(null),t.references=1,t},M.prototype.createDynamicUniformBuffer=function(e){var t=this._gl.createBuffer();if(!t)throw new Error(\"Unable to create dynamic uniform buffer\");return this.bindUniformBuffer(t),e instanceof Float32Array?this._gl.bufferData(this._gl.UNIFORM_BUFFER,e,this._gl.DYNAMIC_DRAW):this._gl.bufferData(this._gl.UNIFORM_BUFFER,new Float32Array(e),this._gl.DYNAMIC_DRAW),this.bindUniformBuffer(null),t.references=1,t},M.prototype.updateUniformBuffer=function(e,t,i,r){this.bindUniformBuffer(e),void 0===i&&(i=0),void 0===r?t instanceof Float32Array?this._gl.bufferSubData(this._gl.UNIFORM_BUFFER,i,t):this._gl.bufferSubData(this._gl.UNIFORM_BUFFER,i,new Float32Array(t)):t instanceof Float32Array?this._gl.bufferSubData(this._gl.UNIFORM_BUFFER,0,t.subarray(i,i+r)):this._gl.bufferSubData(this._gl.UNIFORM_BUFFER,0,new Float32Array(t).subarray(i,i+r)),this.bindUniformBuffer(null)},M.prototype._resetVertexBufferBinding=function(){this.bindArrayBuffer(null),this._cachedVertexBuffers=null},M.prototype.createVertexBuffer=function(e){var t=this._gl.createBuffer();if(!t)throw new Error(\"Unable to create vertex buffer\");return this.bindArrayBuffer(t),e instanceof Array?this._gl.bufferData(this._gl.ARRAY_BUFFER,new Float32Array(e),this._gl.STATIC_DRAW):this._gl.bufferData(this._gl.ARRAY_BUFFER,e,this._gl.STATIC_DRAW),this._resetVertexBufferBinding(),t.references=1,t},M.prototype.createDynamicVertexBuffer=function(e){var t=this._gl.createBuffer();if(!t)throw new Error(\"Unable to create dynamic vertex buffer\");return this.bindArrayBuffer(t),e instanceof Array?this._gl.bufferData(this._gl.ARRAY_BUFFER,new Float32Array(e),this._gl.DYNAMIC_DRAW):this._gl.bufferData(this._gl.ARRAY_BUFFER,e,this._gl.DYNAMIC_DRAW),this._resetVertexBufferBinding(),t.references=1,t},M.prototype.updateDynamicIndexBuffer=function(e,t,i){var r;void 0===i&&(i=0),this._currentBoundBuffer[this._gl.ELEMENT_ARRAY_BUFFER]=null,this.bindIndexBuffer(e),r=t instanceof Uint16Array||t instanceof Uint32Array?t:e.is32Bits?new Uint32Array(t):new Uint16Array(t),this._gl.bufferData(this._gl.ELEMENT_ARRAY_BUFFER,r,this._gl.DYNAMIC_DRAW),this._resetIndexBufferBinding()},M.prototype.updateDynamicVertexBuffer=function(e,t,i,r){this.bindArrayBuffer(e),void 0===i&&(i=0),void 0===r?t instanceof Array?this._gl.bufferSubData(this._gl.ARRAY_BUFFER,i,new Float32Array(t)):this._gl.bufferSubData(this._gl.ARRAY_BUFFER,i,t):t instanceof Array?this._gl.bufferSubData(this._gl.ARRAY_BUFFER,0,new Float32Array(t).subarray(i,i+r)):(t=t instanceof ArrayBuffer?new Uint8Array(t,i,r):new Uint8Array(t.buffer,t.byteOffset+i,r),this._gl.bufferSubData(this._gl.ARRAY_BUFFER,0,t)),this._resetVertexBufferBinding()},M.prototype._resetIndexBufferBinding=function(){this.bindIndexBuffer(null),this._cachedIndexBuffer=null},M.prototype.createIndexBuffer=function(e,t){var i,r=this._gl.createBuffer();if(!r)throw new Error(\"Unable to create index buffer\");this.bindIndexBuffer(r);var n=!1;if(e instanceof Uint16Array)i=e;else if(this._caps.uintIndices)if(e instanceof Uint32Array)i=e,n=!0;else{for(var o=0;o<e.length;o++)if(65535<e[o]){n=!0;break}i=n?new Uint32Array(e):new Uint16Array(e)}else i=new Uint16Array(e);return this._gl.bufferData(this._gl.ELEMENT_ARRAY_BUFFER,i,t?this._gl.DYNAMIC_DRAW:this._gl.STATIC_DRAW),this._resetIndexBufferBinding(),r.references=1,r.is32Bits=n,r},M.prototype.bindArrayBuffer=function(e){this._vaoRecordInProgress||this._unbindVertexArrayObject(),this.bindBuffer(e,this._gl.ARRAY_BUFFER)},M.prototype.bindUniformBuffer=function(e){this._gl.bindBuffer(this._gl.UNIFORM_BUFFER,e)},M.prototype.bindUniformBufferBase=function(e,t){this._gl.bindBufferBase(this._gl.UNIFORM_BUFFER,t,e)},M.prototype.bindUniformBlock=function(e,t,i){var r=this._gl.getUniformBlockIndex(e,t);this._gl.uniformBlockBinding(e,r,i)},M.prototype.bindIndexBuffer=function(e){this._vaoRecordInProgress||this._unbindVertexArrayObject(),this.bindBuffer(e,this._gl.ELEMENT_ARRAY_BUFFER)},M.prototype.bindBuffer=function(e,t){(this._vaoRecordInProgress||this._currentBoundBuffer[t]!==e)&&(this._gl.bindBuffer(t,e),this._currentBoundBuffer[t]=e)},M.prototype.updateArrayBuffer=function(e){this._gl.bufferSubData(this._gl.ARRAY_BUFFER,0,e)},M.prototype._vertexAttribPointer=function(e,t,i,r,n,o,s){var a=this._currentBufferPointers[t],l=!1;a.active?(a.buffer!==e&&(a.buffer=e,l=!0),a.size!==i&&(a.size=i,l=!0),a.type!==r&&(a.type=r,l=!0),a.normalized!==n&&(a.normalized=n,l=!0),a.stride!==o&&(a.stride=o,l=!0),a.offset!==s&&(a.offset=s,l=!0)):(l=!0,a.active=!0,a.index=t,a.size=i,a.type=r,a.normalized=n,a.stride=o,a.offset=s,a.buffer=e),(l||this._vaoRecordInProgress)&&(this.bindArrayBuffer(e),this._gl.vertexAttribPointer(t,i,r,n,o,s))},M.prototype._bindIndexBufferWithCache=function(e){null!=e&&this._cachedIndexBuffer!==e&&(this._cachedIndexBuffer=e,this.bindIndexBuffer(e),this._uintIndicesCurrentlySet=e.is32Bits)},M.prototype._bindVertexBuffersAttributes=function(e,t){var i=t.getAttributesNames();this._vaoRecordInProgress||this._unbindVertexArrayObject(),this.unbindAllAttributes();for(var r=0;r<i.length;r++){var n=t.getAttributeLocation(r);if(0<=n){var o=e[i[r]];if(!o)continue;this._gl.enableVertexAttribArray(n),this._vaoRecordInProgress||(this._vertexAttribArraysEnabled[n]=!0);var s=o.getBuffer();s&&(this._vertexAttribPointer(s,n,o.getSize(),o.type,o.normalized,o.byteStride,o.byteOffset),o.getIsInstanced()&&(this._gl.vertexAttribDivisor(n,o.getInstanceDivisor()),this._vaoRecordInProgress||(this._currentInstanceLocations.push(n),this._currentInstanceBuffers.push(s))))}}},M.prototype.recordVertexArrayObject=function(e,t,i){var r=this._gl.createVertexArray();return this._vaoRecordInProgress=!0,this._gl.bindVertexArray(r),this._mustWipeVertexAttributes=!0,this._bindVertexBuffersAttributes(e,i),this.bindIndexBuffer(t),this._vaoRecordInProgress=!1,this._gl.bindVertexArray(null),r},M.prototype.bindVertexArrayObject=function(e,t){this._cachedVertexArrayObject!==e&&(this._cachedVertexArrayObject=e,this._gl.bindVertexArray(e),this._cachedVertexBuffers=null,this._cachedIndexBuffer=null,this._uintIndicesCurrentlySet=null!=t&&t.is32Bits,this._mustWipeVertexAttributes=!0)},M.prototype.bindBuffersDirectly=function(e,t,i,r,n){if(this._cachedVertexBuffers!==e||this._cachedEffectForVertexBuffers!==n){this._cachedVertexBuffers=e;var o=(this._cachedEffectForVertexBuffers=n).getAttributesCount();this._unbindVertexArrayObject(),this.unbindAllAttributes();for(var s=0,a=0;a<o;a++)if(a<i.length){var l=n.getAttributeLocation(a);0<=l&&(this._gl.enableVertexAttribArray(l),this._vertexAttribArraysEnabled[l]=!0,this._vertexAttribPointer(e,l,i[a],this._gl.FLOAT,!1,r,s)),s+=4*i[a]}}this._bindIndexBufferWithCache(t)},M.prototype._unbindVertexArrayObject=function(){this._cachedVertexArrayObject&&(this._cachedVertexArrayObject=null,this._gl.bindVertexArray(null))},M.prototype.bindBuffers=function(e,t,i){this._cachedVertexBuffers===e&&this._cachedEffectForVertexBuffers===i||(this._cachedVertexBuffers=e,this._cachedEffectForVertexBuffers=i,this._bindVertexBuffersAttributes(e,i)),this._bindIndexBufferWithCache(t)},M.prototype.unbindInstanceAttributes=function(){for(var e,t=0,i=this._currentInstanceLocations.length;t<i;t++){var r=this._currentInstanceBuffers[t];e!=r&&r.references&&(e=r,this.bindArrayBuffer(r));var n=this._currentInstanceLocations[t];this._gl.vertexAttribDivisor(n,0)}this._currentInstanceBuffers.length=0,this._currentInstanceLocations.length=0},M.prototype.releaseVertexArrayObject=function(e){this._gl.deleteVertexArray(e)},M.prototype._releaseBuffer=function(e){return e.references--,0===e.references&&(this._gl.deleteBuffer(e),!0)},M.prototype.createInstancesBuffer=function(e){var t=this._gl.createBuffer();if(!t)throw new Error(\"Unable to create instance buffer\");return t.capacity=e,this.bindArrayBuffer(t),this._gl.bufferData(this._gl.ARRAY_BUFFER,e,this._gl.DYNAMIC_DRAW),t},M.prototype.deleteInstancesBuffer=function(e){this._gl.deleteBuffer(e)},M.prototype.updateAndBindInstancesBuffer=function(e,t,i){if(this.bindArrayBuffer(e),t&&this._gl.bufferSubData(this._gl.ARRAY_BUFFER,0,t),void 0!==i[0].index){for(var r=0,n=0;n<i.length;n++){r+=4*(o=i[n]).attributeSize}for(n=0;n<i.length;n++){var o=i[n];this._vertexAttribArraysEnabled[o.index]||(this._gl.enableVertexAttribArray(o.index),this._vertexAttribArraysEnabled[o.index]=!0),this._vertexAttribPointer(e,o.index,o.attributeSize,o.attribyteType||this._gl.FLOAT,o.normalized||!1,r,o.offset),this._gl.vertexAttribDivisor(o.index,1),this._currentInstanceLocations.push(o.index),this._currentInstanceBuffers.push(e)}}else for(var s=0;s<4;s++){var a=i[s];this._vertexAttribArraysEnabled[a]||(this._gl.enableVertexAttribArray(a),this._vertexAttribArraysEnabled[a]=!0),this._vertexAttribPointer(e,a,4,this._gl.FLOAT,!1,64,16*s),this._gl.vertexAttribDivisor(a,1),this._currentInstanceLocations.push(a),this._currentInstanceBuffers.push(e)}},M.prototype.applyStates=function(){this._depthCullingState.apply(this._gl),this._stencilState.apply(this._gl),this._alphaState.apply(this._gl)},M.prototype.draw=function(e,t,i,r){this.drawElementsType(e?R.Material.TriangleFillMode:R.Material.WireFrameFillMode,t,i,r)},M.prototype.drawPointClouds=function(e,t,i){this.drawArraysType(R.Material.PointFillMode,e,t,i)},M.prototype.drawUnIndexed=function(e,t,i,r){this.drawArraysType(e?R.Material.TriangleFillMode:R.Material.WireFrameFillMode,t,i,r)},M.prototype.drawElementsType=function(e,t,i,r){this.applyStates(),this._drawCalls.addCount(1,!1);var n=this._drawMode(e),o=this._uintIndicesCurrentlySet?this._gl.UNSIGNED_INT:this._gl.UNSIGNED_SHORT,s=this._uintIndicesCurrentlySet?4:2;r?this._gl.drawElementsInstanced(n,i,o,t*s,r):this._gl.drawElements(n,i,o,t*s)},M.prototype.drawArraysType=function(e,t,i,r){this.applyStates(),this._drawCalls.addCount(1,!1);var n=this._drawMode(e);r?this._gl.drawArraysInstanced(n,t,i,r):this._gl.drawArrays(n,t,i)},M.prototype._drawMode=function(e){switch(e){case R.Material.TriangleFillMode:return this._gl.TRIANGLES;case R.Material.PointFillMode:return this._gl.POINTS;case R.Material.WireFrameFillMode:return this._gl.LINES;case R.Material.PointListDrawMode:return this._gl.POINTS;case R.Material.LineListDrawMode:return this._gl.LINES;case R.Material.LineLoopDrawMode:return this._gl.LINE_LOOP;case R.Material.LineStripDrawMode:return this._gl.LINE_STRIP;case R.Material.TriangleStripDrawMode:return this._gl.TRIANGLE_STRIP;case R.Material.TriangleFanDrawMode:return this._gl.TRIANGLE_FAN;default:return this._gl.TRIANGLES}},M.prototype._releaseEffect=function(e){this._compiledEffects[e._key]&&(delete this._compiledEffects[e._key],this._deleteProgram(e.getProgram()))},M.prototype._deleteProgram=function(e){e&&(e.__SPECTOR_rebuildProgram=null,e.transformFeedback&&(this.deleteTransformFeedback(e.transformFeedback),e.transformFeedback=null),this._gl.deleteProgram(e))},M.prototype.createEffect=function(e,t,i,r,n,o,s,a,l){var c=(e.vertexElement||e.vertex||e)+\"+\"+(e.fragmentElement||e.fragment||e)+\"@\"+(n||t.defines);if(this._compiledEffects[c]){var h=this._compiledEffects[c];return s&&h.isReady()&&s(h),h}var u=new R.Effect(e,t,i,r,this,n,o,s,a,l);return u._key=c,this._compiledEffects[c]=u},M.prototype._compileShader=function(e,t,i,r){return this._compileRawShader(r+(i?i+\"\\n\":\"\")+e,t)},M.prototype._compileRawShader=function(e,t){var i=this._gl,r=i.createShader(\"vertex\"===t?i.VERTEX_SHADER:i.FRAGMENT_SHADER);if(!r)throw new Error(\"Something went wrong while compile the shader.\");if(i.shaderSource(r,e),i.compileShader(r),!i.getShaderParameter(r,i.COMPILE_STATUS)){var n=i.getShaderInfoLog(r);if(n)throw new Error(n)}return r},M.prototype.createRawShaderProgram=function(e,t,i,r){void 0===r&&(r=null),i=i||this._gl;var n=this._compileRawShader(e,\"vertex\"),o=this._compileRawShader(t,\"fragment\");return this._createShaderProgram(n,o,i,r)},M.prototype.createShaderProgram=function(e,t,i,r,n){void 0===n&&(n=null),r=r||this._gl,this.onBeforeShaderCompilationObservable.notifyObservers(this);var o=1<this._webGLVersion?\"#version 300 es\\n#define WEBGL2 \\n\":\"\",s=this._compileShader(e,\"vertex\",i,o),a=this._compileShader(t,\"fragment\",i,o),l=this._createShaderProgram(s,a,r,n);return this.onAfterShaderCompilationObservable.notifyObservers(this),l},M.prototype._createShaderProgram=function(e,t,i,r){void 0===r&&(r=null);var n,o=i.createProgram();if(!o)throw new Error(\"Unable to create program\");if(i.attachShader(o,e),i.attachShader(o,t),1<this.webGLVersion&&r){var s=this.createTransformFeedback();this.bindTransformFeedback(s),this.setTranformFeedbackVaryings(o,r),o.transformFeedback=s}if((i.linkProgram(o),1<this.webGLVersion&&r&&this.bindTransformFeedback(null),!i.getProgramParameter(o,i.LINK_STATUS))&&(n=i.getProgramInfoLog(o)))throw new Error(n);if(this.validateShaderPrograms&&(i.validateProgram(o),!i.getProgramParameter(o,i.VALIDATE_STATUS)&&(n=i.getProgramInfoLog(o))))throw new Error(n);return i.deleteShader(e),i.deleteShader(t),o},M.prototype.getUniforms=function(e,t){for(var i=new Array,r=0;r<t.length;r++)i.push(this._gl.getUniformLocation(e,t[r]));return i},M.prototype.getAttributes=function(e,t){for(var i=[],r=0;r<t.length;r++)try{i.push(this._gl.getAttribLocation(e,t[r]))}catch(e){i.push(-1)}return i},M.prototype.enableEffect=function(e){e&&e!==this._currentEffect&&(this.bindSamplers(e),(this._currentEffect=e).onBind&&e.onBind(e),e._onBindObservable&&e._onBindObservable.notifyObservers(e))},M.prototype.setIntArray=function(e,t){e&&this._gl.uniform1iv(e,t)},M.prototype.setIntArray2=function(e,t){e&&t.length%2==0&&this._gl.uniform2iv(e,t)},M.prototype.setIntArray3=function(e,t){e&&t.length%3==0&&this._gl.uniform3iv(e,t)},M.prototype.setIntArray4=function(e,t){e&&t.length%4==0&&this._gl.uniform4iv(e,t)},M.prototype.setFloatArray=function(e,t){e&&this._gl.uniform1fv(e,t)},M.prototype.setFloatArray2=function(e,t){e&&t.length%2==0&&this._gl.uniform2fv(e,t)},M.prototype.setFloatArray3=function(e,t){e&&t.length%3==0&&this._gl.uniform3fv(e,t)},M.prototype.setFloatArray4=function(e,t){e&&t.length%4==0&&this._gl.uniform4fv(e,t)},M.prototype.setArray=function(e,t){e&&this._gl.uniform1fv(e,t)},M.prototype.setArray2=function(e,t){e&&t.length%2==0&&this._gl.uniform2fv(e,t)},M.prototype.setArray3=function(e,t){e&&t.length%3==0&&this._gl.uniform3fv(e,t)},M.prototype.setArray4=function(e,t){e&&t.length%4==0&&this._gl.uniform4fv(e,t)},M.prototype.setMatrices=function(e,t){e&&this._gl.uniformMatrix4fv(e,!1,t)},M.prototype.setMatrix=function(e,t){e&&this._gl.uniformMatrix4fv(e,!1,t.toArray())},M.prototype.setMatrix3x3=function(e,t){e&&this._gl.uniformMatrix3fv(e,!1,t)},M.prototype.setMatrix2x2=function(e,t){e&&this._gl.uniformMatrix2fv(e,!1,t)},M.prototype.setInt=function(e,t){e&&this._gl.uniform1i(e,t)},M.prototype.setFloat=function(e,t){e&&this._gl.uniform1f(e,t)},M.prototype.setFloat2=function(e,t,i){e&&this._gl.uniform2f(e,t,i)},M.prototype.setFloat3=function(e,t,i,r){e&&this._gl.uniform3f(e,t,i,r)},M.prototype.setBool=function(e,t){e&&this._gl.uniform1i(e,t)},M.prototype.setFloat4=function(e,t,i,r,n){e&&this._gl.uniform4f(e,t,i,r,n)},M.prototype.setColor3=function(e,t){e&&this._gl.uniform3f(e,t.r,t.g,t.b)},M.prototype.setColor4=function(e,t,i){e&&this._gl.uniform4f(e,t.r,t.g,t.b,i)},M.prototype.setDirectColor4=function(e,t){e&&this._gl.uniform4f(e,t.r,t.g,t.b,t.a)},M.prototype.setState=function(e,t,i,r){void 0===t&&(t=0),void 0===r&&(r=!1),(this._depthCullingState.cull!==e||i)&&(this._depthCullingState.cull=e);var n=this.cullBackFaces?this._gl.BACK:this._gl.FRONT;(this._depthCullingState.cullFace!==n||i)&&(this._depthCullingState.cullFace=n),this.setZOffset(t);var o=r?this._gl.CW:this._gl.CCW;(this._depthCullingState.frontFace!==o||i)&&(this._depthCullingState.frontFace=o)},M.prototype.setZOffset=function(e){this._depthCullingState.zOffset=e},M.prototype.getZOffset=function(){return this._depthCullingState.zOffset},M.prototype.setDepthBuffer=function(e){this._depthCullingState.depthTest=e},M.prototype.getDepthWrite=function(){return this._depthCullingState.depthMask},M.prototype.setDepthWrite=function(e){this._depthCullingState.depthMask=e},M.prototype.setColorWrite=function(e){this._gl.colorMask(e,e,e,e),this._colorWrite=e},M.prototype.getColorWrite=function(){return this._colorWrite},M.prototype.setAlphaConstants=function(e,t,i,r){this._alphaState.setAlphaBlendConstants(e,t,i,r)},M.prototype.setAlphaMode=function(e,t){if(void 0===t&&(t=!1),this._alphaMode!==e){switch(e){case M.ALPHA_DISABLE:this._alphaState.alphaBlend=!1;break;case M.ALPHA_PREMULTIPLIED:this._alphaState.setAlphaBlendFunctionParameters(this._gl.ONE,this._gl.ONE_MINUS_SRC_ALPHA,this._gl.ONE,this._gl.ONE),this._alphaState.alphaBlend=!0;break;case M.ALPHA_PREMULTIPLIED_PORTERDUFF:this._alphaState.setAlphaBlendFunctionParameters(this._gl.ONE,this._gl.ONE_MINUS_SRC_ALPHA,this._gl.ONE,this._gl.ONE_MINUS_SRC_ALPHA),this._alphaState.alphaBlend=!0;break;case M.ALPHA_COMBINE:this._alphaState.setAlphaBlendFunctionParameters(this._gl.SRC_ALPHA,this._gl.ONE_MINUS_SRC_ALPHA,this._gl.ONE,this._gl.ONE),this._alphaState.alphaBlend=!0;break;case M.ALPHA_ONEONE:this._alphaState.setAlphaBlendFunctionParameters(this._gl.ONE,this._gl.ONE,this._gl.ZERO,this._gl.ONE),this._alphaState.alphaBlend=!0;break;case M.ALPHA_ADD:this._alphaState.setAlphaBlendFunctionParameters(this._gl.SRC_ALPHA,this._gl.ONE,this._gl.ZERO,this._gl.ONE),this._alphaState.alphaBlend=!0;break;case M.ALPHA_SUBTRACT:this._alphaState.setAlphaBlendFunctionParameters(this._gl.ZERO,this._gl.ONE_MINUS_SRC_COLOR,this._gl.ONE,this._gl.ONE),this._alphaState.alphaBlend=!0;break;case M.ALPHA_MULTIPLY:this._alphaState.setAlphaBlendFunctionParameters(this._gl.DST_COLOR,this._gl.ZERO,this._gl.ONE,this._gl.ONE),this._alphaState.alphaBlend=!0;break;case M.ALPHA_MAXIMIZED:this._alphaState.setAlphaBlendFunctionParameters(this._gl.SRC_ALPHA,this._gl.ONE_MINUS_SRC_COLOR,this._gl.ONE,this._gl.ONE),this._alphaState.alphaBlend=!0;break;case M.ALPHA_INTERPOLATE:this._alphaState.setAlphaBlendFunctionParameters(this._gl.CONSTANT_COLOR,this._gl.ONE_MINUS_CONSTANT_COLOR,this._gl.CONSTANT_ALPHA,this._gl.ONE_MINUS_CONSTANT_ALPHA),this._alphaState.alphaBlend=!0;break;case M.ALPHA_SCREENMODE:this._alphaState.setAlphaBlendFunctionParameters(this._gl.ONE,this._gl.ONE_MINUS_SRC_COLOR,this._gl.ONE,this._gl.ONE_MINUS_SRC_ALPHA),this._alphaState.alphaBlend=!0}t||this.setDepthWrite(e===M.ALPHA_DISABLE),this._alphaMode=e}},M.prototype.getAlphaMode=function(){return this._alphaMode},M.prototype.clearInternalTexturesCache=function(){this._internalTexturesCache=[]},M.prototype.wipeCaches=function(e){this.preventCacheWipeBetweenFrames&&!e||(this._currentEffect=null,this._viewportCached.x=0,this._viewportCached.y=0,this._viewportCached.z=0,this._viewportCached.w=0,e&&(this.resetTextureCache(),this._currentProgram=null,this._stencilState.reset(),this._depthCullingState.reset(),this.setDepthFunctionToLessOrEqual(),this._alphaState.reset(),this._unpackFlipYCached=null),this._resetVertexBufferBinding(),this._cachedIndexBuffer=null,this._cachedEffectForVertexBuffers=null,this._unbindVertexArrayObject(),this.bindIndexBuffer(null))},M.prototype.setTextureFormatToUse=function(e){for(var t=0,i=this.texturesSupported.length;t<i;t++)for(var r=0,n=e.length;r<n;r++)if(this._texturesSupported[t]===e[r].toLowerCase())return this._textureFormatInUse=this._texturesSupported[t];return this._textureFormatInUse=null},M.prototype._getSamplingParameters=function(e,t){var i=this._gl,r=i.NEAREST,n=i.NEAREST;switch(e){case M.TEXTURE_BILINEAR_SAMPLINGMODE:r=i.LINEAR,n=t?i.LINEAR_MIPMAP_NEAREST:i.LINEAR;break;case M.TEXTURE_TRILINEAR_SAMPLINGMODE:r=i.LINEAR,n=t?i.LINEAR_MIPMAP_LINEAR:i.LINEAR;break;case M.TEXTURE_NEAREST_SAMPLINGMODE:r=i.NEAREST,n=t?i.NEAREST_MIPMAP_LINEAR:i.NEAREST;break;case M.TEXTURE_NEAREST_NEAREST_MIPNEAREST:r=i.NEAREST,n=t?i.NEAREST_MIPMAP_NEAREST:i.NEAREST;break;case M.TEXTURE_NEAREST_LINEAR_MIPNEAREST:r=i.NEAREST,n=t?i.LINEAR_MIPMAP_NEAREST:i.LINEAR;break;case M.TEXTURE_NEAREST_LINEAR_MIPLINEAR:r=i.NEAREST,n=t?i.LINEAR_MIPMAP_LINEAR:i.LINEAR;break;case M.TEXTURE_NEAREST_LINEAR:r=i.NEAREST,n=i.LINEAR;break;case M.TEXTURE_NEAREST_NEAREST:r=i.NEAREST,n=i.NEAREST;break;case M.TEXTURE_LINEAR_NEAREST_MIPNEAREST:r=i.LINEAR,n=t?i.NEAREST_MIPMAP_NEAREST:i.NEAREST;break;case M.TEXTURE_LINEAR_NEAREST_MIPLINEAR:r=i.LINEAR,n=t?i.NEAREST_MIPMAP_LINEAR:i.NEAREST;break;case M.TEXTURE_LINEAR_LINEAR:r=i.LINEAR,n=i.LINEAR;break;case M.TEXTURE_LINEAR_NEAREST:r=i.LINEAR,n=i.NEAREST}return{min:n,mag:r}},M.prototype._partialLoadImg=function(e,t,i,r,n,o){var s;void 0===o&&(o=null);s=R.Tools.LoadImage(e,(function(){i[t]=s,i._internalCount++,r&&r._removePendingData(s),6===i._internalCount&&n(i)}),(function(e,t){r&&r._removePendingData(s),o&&o(e,t)}),r?r.database:null),r&&r._addPendingData(s)},M.prototype._cascadeLoadImgs=function(e,t,i,r,n){void 0===n&&(n=null);for(var o=[],s=o._internalCount=0;s<6;s++)this._partialLoadImg(r[s],s,o,t,i,n)},M.prototype._createTexture=function(){var e=this._gl.createTexture();if(!e)throw new Error(\"Unable to create texture\");return e},M.prototype.createTexture=function(r,n,o,c,s,e,a,l,t,h,i){var u=this;void 0===s&&(s=M.TEXTURE_TRILINEAR_SAMPLINGMODE),void 0===e&&(e=null),void 0===a&&(a=null),void 0===l&&(l=null),void 0===t&&(t=null),void 0===h&&(h=null),void 0===i&&(i=null);for(var d=String(r),f=\"data:\"===d.substr(0,5),p=\"blob:\"===d.substr(0,5),_=f&&-1!==d.indexOf(\";base64,\"),m=t||new R.InternalTexture(this,R.InternalTexture.DATASOURCE_URL),g=d.lastIndexOf(\".\"),v=i||(-1<g?d.substring(g).toLowerCase():\"\"),y=null,b=0,T=M._TextureLoaders;b<T.length;b++){var E=T[b];if(E.canLoad(v,this._textureFormatInUse,t,_,!!l)){y=E;break}}y&&(d=y.transformUrl(d,this._textureFormatInUse)),c&&c._addPendingData(m),m.url=d,m.generateMipMaps=!n,m.samplingMode=s,m.invertY=o,this._doNotHandleContextLost||(m._buffer=l);var x=null;e&&!t&&(x=m.onLoadedObservable.add(e)),t||this._internalTexturesCache.push(m);var P=function(e,t){c&&c._removePendingData(m);var i=!1;y&&(y.getFallbackTextureUrl(d,u._textureFormatInUse)&&(i=!0,u.createTexture(r,n,o,c,s,null,a,l,m)));i||(x&&m.onLoadedObservable.remove(x),R.Tools.UseFallbackTexture&&u.createTexture(R.Tools.fallbackTexture,n,o,c,s,null,a,l,m)),a&&a(e||\"Unknown error\",t)};if(y){var A=function(e){y.loadData(e,m,(function(e,t,i,r,n){u._prepareWebGLTexture(m,c,e,t,o,!i,r,(function(){return n(),!1}),s)}))};l?A(l):this._loadFile(d,A,void 0,c?c.database:void 0,!0,(function(e,t){P(\"Unable to load \"+(e&&e.responseURL,t))}))}else{var S=function(l){p&&!u._doNotHandleContextLost&&(m._buffer=l),u._prepareWebGLTexture(m,c,l.width,l.height,o,n,!1,(function(e,t,i){var r=u._gl,n=l.width===e&&l.height===t,o=h?u._getInternalFormat(h):\".jpg\"===v?r.RGB:r.RGBA;if(n)return r.texImage2D(r.TEXTURE_2D,0,o,o,r.UNSIGNED_BYTE,l),!1;var s=u._caps.maxTextureSize;if(l.width>s||l.height>s)return u._prepareWorkingCanvas(),u._workingCanvas&&u._workingContext&&(u._workingCanvas.width=e,u._workingCanvas.height=t,u._workingContext.drawImage(l,0,0,l.width,l.height,0,0,e,t),r.texImage2D(r.TEXTURE_2D,0,o,o,r.UNSIGNED_BYTE,u._workingCanvas),m.width=e,m.height=t),!1;var a=new R.InternalTexture(u,R.InternalTexture.DATASOURCE_TEMP);return u._bindTextureDirectly(r.TEXTURE_2D,a,!0),r.texImage2D(r.TEXTURE_2D,0,o,o,r.UNSIGNED_BYTE,l),r.texParameteri(r.TEXTURE_2D,r.TEXTURE_MAG_FILTER,r.LINEAR),r.texParameteri(r.TEXTURE_2D,r.TEXTURE_MIN_FILTER,r.LINEAR),r.texParameteri(r.TEXTURE_2D,r.TEXTURE_WRAP_S,r.CLAMP_TO_EDGE),r.texParameteri(r.TEXTURE_2D,r.TEXTURE_WRAP_T,r.CLAMP_TO_EDGE),u._rescaleTexture(a,m,c,o,(function(){u._releaseTexture(a),u._bindTextureDirectly(r.TEXTURE_2D,m,!0),i()})),!0}),s)};!f||_?l instanceof HTMLImageElement?S(l):R.Tools.LoadImage(d,S,P,c?c.database:null):\"string\"==typeof l||l instanceof ArrayBuffer||l instanceof Blob?R.Tools.LoadImage(l,S,P,c?c.database:null):S(l)}return m},M.prototype._rescaleTexture=function(t,i,r,n,o){var s=this,a=this.createRenderTargetTexture({width:i.width,height:i.height},{generateMipMaps:!1,type:M.TEXTURETYPE_UNSIGNED_INT,samplingMode:M.TEXTURE_BILINEAR_SAMPLINGMODE,generateDepthBuffer:!1,generateStencilBuffer:!1});this._rescalePostProcess||(this._rescalePostProcess=new R.PassPostProcess(\"rescale\",1,null,M.TEXTURE_BILINEAR_SAMPLINGMODE,this,!1,M.TEXTURETYPE_UNSIGNED_INT)),this._rescalePostProcess.getEffect().executeWhenCompiled((function(){s._rescalePostProcess.onApply=function(e){e._bindTexture(\"textureSampler\",t)};var e=r;e||(e=s.scenes[s.scenes.length-1]),e.postProcessManager.directRender([s._rescalePostProcess],a,!0),s._bindTextureDirectly(s._gl.TEXTURE_2D,i,!0),s._gl.copyTexImage2D(s._gl.TEXTURE_2D,0,n,0,0,i.width,i.height,0),s.unBindFramebuffer(a),s._releaseTexture(a),o&&o()}))},M.prototype.updateRawTexture=function(e,t,i,r,n,o){if(void 0===n&&(n=null),void 0===o&&(o=M.TEXTURETYPE_UNSIGNED_INT),e){var s=this._getRGBABufferInternalSizedFormat(o,i),a=this._getInternalFormat(i),l=this._getWebGLTextureType(o);this._bindTextureDirectly(this._gl.TEXTURE_2D,e,!0),this._unpackFlipY(void 0===r||!!r),this._doNotHandleContextLost||(e._bufferView=t,e.format=i,e.type=o,e.invertY=r,e._compression=n),e.width%4!=0&&this._gl.pixelStorei(this._gl.UNPACK_ALIGNMENT,1),n&&t?this._gl.compressedTexImage2D(this._gl.TEXTURE_2D,0,this.getCaps().s3tc[n],e.width,e.height,0,t):this._gl.texImage2D(this._gl.TEXTURE_2D,0,s,e.width,e.height,0,a,l,t),e.generateMipMaps&&this._gl.generateMipmap(this._gl.TEXTURE_2D),this._bindTextureDirectly(this._gl.TEXTURE_2D,null),e.isReady=!0}},M.prototype.createRawTexture=function(e,t,i,r,n,o,s,a,l){void 0===a&&(a=null),void 0===l&&(l=M.TEXTURETYPE_UNSIGNED_INT);var c=new R.InternalTexture(this,R.InternalTexture.DATASOURCE_RAW);c.baseWidth=t,c.baseHeight=i,c.width=t,c.height=i,c.format=r,c.generateMipMaps=n,c.samplingMode=s,c.invertY=o,c._compression=a,c.type=l,this._doNotHandleContextLost||(c._bufferView=e),this.updateRawTexture(c,e,r,o,a,l),this._bindTextureDirectly(this._gl.TEXTURE_2D,c,!0);var h=this._getSamplingParameters(s,n);return this._gl.texParameteri(this._gl.TEXTURE_2D,this._gl.TEXTURE_MAG_FILTER,h.mag),this._gl.texParameteri(this._gl.TEXTURE_2D,this._gl.TEXTURE_MIN_FILTER,h.min),n&&this._gl.generateMipmap(this._gl.TEXTURE_2D),this._bindTextureDirectly(this._gl.TEXTURE_2D,null),this._internalTexturesCache.push(c),c},M.prototype._unpackFlipY=function(e){this._unpackFlipYCached!==e&&(this._gl.pixelStorei(this._gl.UNPACK_FLIP_Y_WEBGL,e?1:0),this.enableUnpackFlipYCached&&(this._unpackFlipYCached=e))},M.prototype._getUnpackAlignement=function(){return this._gl.getParameter(this._gl.UNPACK_ALIGNMENT)},M.prototype.createDynamicTexture=function(e,t,i,r){var n=new R.InternalTexture(this,R.InternalTexture.DATASOURCE_DYNAMIC);return n.baseWidth=e,n.baseHeight=t,i&&(e=this.needPOTTextures?R.Tools.GetExponentOfTwo(e,this._caps.maxTextureSize):e,t=this.needPOTTextures?R.Tools.GetExponentOfTwo(t,this._caps.maxTextureSize):t),n.width=e,n.height=t,n.isReady=!1,n.generateMipMaps=i,n.samplingMode=r,this.updateTextureSamplingMode(r,n),this._internalTexturesCache.push(n),n},M.prototype.updateTextureSamplingMode=function(e,t){var i=this._getSamplingParameters(e,t.generateMipMaps);t.isCube?(this._setTextureParameterInteger(this._gl.TEXTURE_CUBE_MAP,this._gl.TEXTURE_MAG_FILTER,i.mag,t),this._setTextureParameterInteger(this._gl.TEXTURE_CUBE_MAP,this._gl.TEXTURE_MIN_FILTER,i.min),this._bindTextureDirectly(this._gl.TEXTURE_CUBE_MAP,null)):t.is3D?(this._setTextureParameterInteger(this._gl.TEXTURE_3D,this._gl.TEXTURE_MAG_FILTER,i.mag,t),this._setTextureParameterInteger(this._gl.TEXTURE_3D,this._gl.TEXTURE_MIN_FILTER,i.min),this._bindTextureDirectly(this._gl.TEXTURE_3D,null)):(this._setTextureParameterInteger(this._gl.TEXTURE_2D,this._gl.TEXTURE_MAG_FILTER,i.mag,t),this._setTextureParameterInteger(this._gl.TEXTURE_2D,this._gl.TEXTURE_MIN_FILTER,i.min),this._bindTextureDirectly(this._gl.TEXTURE_2D,null)),t.samplingMode=e},M.prototype.updateDynamicTexture=function(e,t,i,r,n){if(void 0===r&&(r=!1),e){this._bindTextureDirectly(this._gl.TEXTURE_2D,e,!0),this._unpackFlipY(i),r&&this._gl.pixelStorei(this._gl.UNPACK_PREMULTIPLY_ALPHA_WEBGL,1);var o=n?this._getInternalFormat(n):this._gl.RGBA;this._gl.texImage2D(this._gl.TEXTURE_2D,0,o,o,this._gl.UNSIGNED_BYTE,t),e.generateMipMaps&&this._gl.generateMipmap(this._gl.TEXTURE_2D),this._bindTextureDirectly(this._gl.TEXTURE_2D,null),r&&this._gl.pixelStorei(this._gl.UNPACK_PREMULTIPLY_ALPHA_WEBGL,0),e.isReady=!0}},M.prototype.updateVideoTexture=function(t,e,i){if(t&&!t._isDisabled){var r=this._bindTextureDirectly(this._gl.TEXTURE_2D,t,!0);this._unpackFlipY(!i);try{if(void 0===this._videoTextureSupported&&(this._gl.texImage2D(this._gl.TEXTURE_2D,0,this._gl.RGBA,this._gl.RGBA,this._gl.UNSIGNED_BYTE,e),0!==this._gl.getError()?this._videoTextureSupported=!1:this._videoTextureSupported=!0),this._videoTextureSupported)this._gl.texImage2D(this._gl.TEXTURE_2D,0,this._gl.RGBA,this._gl.RGBA,this._gl.UNSIGNED_BYTE,e);else{if(!t._workingCanvas){t._workingCanvas=document.createElement(\"canvas\");var n=t._workingCanvas.getContext(\"2d\");if(!n)throw new Error(\"Unable to get 2d context\");t._workingContext=n,t._workingCanvas.width=t.width,t._workingCanvas.height=t.height}t._workingContext.drawImage(e,0,0,e.videoWidth,e.videoHeight,0,0,t.width,t.height),this._gl.texImage2D(this._gl.TEXTURE_2D,0,this._gl.RGBA,this._gl.RGBA,this._gl.UNSIGNED_BYTE,t._workingCanvas)}t.generateMipMaps&&this._gl.generateMipmap(this._gl.TEXTURE_2D),r||this._bindTextureDirectly(this._gl.TEXTURE_2D,null),t.isReady=!0}catch(e){t._isDisabled=!0}}},M.prototype.updateTextureComparisonFunction=function(e,t){if(1!==this.webGLVersion){var i=this._gl;e.isCube?(this._bindTextureDirectly(this._gl.TEXTURE_CUBE_MAP,e,!0),0===t?(i.texParameteri(i.TEXTURE_CUBE_MAP,i.TEXTURE_COMPARE_FUNC,M.LEQUAL),i.texParameteri(i.TEXTURE_CUBE_MAP,i.TEXTURE_COMPARE_MODE,i.NONE)):(i.texParameteri(i.TEXTURE_CUBE_MAP,i.TEXTURE_COMPARE_FUNC,t),i.texParameteri(i.TEXTURE_CUBE_MAP,i.TEXTURE_COMPARE_MODE,i.COMPARE_REF_TO_TEXTURE)),this._bindTextureDirectly(this._gl.TEXTURE_CUBE_MAP,null)):(this._bindTextureDirectly(this._gl.TEXTURE_2D,e,!0),0===t?(i.texParameteri(i.TEXTURE_2D,i.TEXTURE_COMPARE_FUNC,M.LEQUAL),i.texParameteri(i.TEXTURE_2D,i.TEXTURE_COMPARE_MODE,i.NONE)):(i.texParameteri(i.TEXTURE_2D,i.TEXTURE_COMPARE_FUNC,t),i.texParameteri(i.TEXTURE_2D,i.TEXTURE_COMPARE_MODE,i.COMPARE_REF_TO_TEXTURE)),this._bindTextureDirectly(this._gl.TEXTURE_2D,null)),e._comparisonFunction=t}else R.Tools.Error(\"WebGL 1 does not support texture comparison.\")},M.prototype._setupDepthStencilTexture=function(e,t,i,r,n){var o=t.width||t,s=t.height||t;e.baseWidth=o,e.baseHeight=s,e.width=o,e.height=s,e.isReady=!0,e.samples=1,e.generateMipMaps=!1,e._generateDepthBuffer=!0,e._generateStencilBuffer=i,e.samplingMode=r?M.TEXTURE_BILINEAR_SAMPLINGMODE:M.TEXTURE_NEAREST_SAMPLINGMODE,e.type=M.TEXTURETYPE_UNSIGNED_INT,e._comparisonFunction=n;var a=this._gl,l=e.isCube?a.TEXTURE_CUBE_MAP:a.TEXTURE_2D,c=this._getSamplingParameters(e.samplingMode,!1);a.texParameteri(l,a.TEXTURE_MAG_FILTER,c.mag),a.texParameteri(l,a.TEXTURE_MIN_FILTER,c.min),a.texParameteri(l,a.TEXTURE_WRAP_S,a.CLAMP_TO_EDGE),a.texParameteri(l,a.TEXTURE_WRAP_T,a.CLAMP_TO_EDGE),0===n?(a.texParameteri(l,a.TEXTURE_COMPARE_FUNC,M.LEQUAL),a.texParameteri(l,a.TEXTURE_COMPARE_MODE,a.NONE)):(a.texParameteri(l,a.TEXTURE_COMPARE_FUNC,n),a.texParameteri(l,a.TEXTURE_COMPARE_MODE,a.COMPARE_REF_TO_TEXTURE))},M.prototype.createDepthStencilTexture=function(e,t){if(t.isCube){var i=e.width||e;return this._createDepthStencilCubeTexture(i,t)}return this._createDepthStencilTexture(e,t)},M.prototype._createDepthStencilTexture=function(e,t){var i=new R.InternalTexture(this,R.InternalTexture.DATASOURCE_DEPTHTEXTURE);if(!this._caps.depthTextureExtension)return R.Tools.Error(\"Depth texture is not supported by your browser or hardware.\"),i;var r=ae({bilinearFiltering:!1,comparisonFunction:0,generateStencil:!1},t),n=this._gl;return this._bindTextureDirectly(n.TEXTURE_2D,i,!0),this._setupDepthStencilTexture(i,e,r.generateStencil,r.bilinearFiltering,r.comparisonFunction),1<this.webGLVersion?r.generateStencil?n.texImage2D(n.TEXTURE_2D,0,n.DEPTH24_STENCIL8,i.width,i.height,0,n.DEPTH_STENCIL,n.UNSIGNED_INT_24_8,null):n.texImage2D(n.TEXTURE_2D,0,n.DEPTH_COMPONENT24,i.width,i.height,0,n.DEPTH_COMPONENT,n.UNSIGNED_INT,null):r.generateStencil?n.texImage2D(n.TEXTURE_2D,0,n.DEPTH_STENCIL,i.width,i.height,0,n.DEPTH_STENCIL,n.UNSIGNED_INT_24_8,null):n.texImage2D(n.TEXTURE_2D,0,n.DEPTH_COMPONENT,i.width,i.height,0,n.DEPTH_COMPONENT,n.UNSIGNED_INT,null),this._bindTextureDirectly(n.TEXTURE_2D,null),i},M.prototype._createDepthStencilCubeTexture=function(e,t){var i=new R.InternalTexture(this,R.InternalTexture.DATASOURCE_UNKNOWN);if(i.isCube=!0,1===this.webGLVersion)return R.Tools.Error(\"Depth cube texture is not supported by WebGL 1.\"),i;var r=ae({bilinearFiltering:!1,comparisonFunction:0,generateStencil:!1},t),n=this._gl;this._bindTextureDirectly(n.TEXTURE_CUBE_MAP,i,!0),this._setupDepthStencilTexture(i,e,r.generateStencil,r.bilinearFiltering,r.comparisonFunction);for(var o=0;o<6;o++)r.generateStencil?n.texImage2D(n.TEXTURE_CUBE_MAP_POSITIVE_X+o,0,n.DEPTH24_STENCIL8,e,e,0,n.DEPTH_STENCIL,n.UNSIGNED_INT_24_8,null):n.texImage2D(n.TEXTURE_CUBE_MAP_POSITIVE_X+o,0,n.DEPTH_COMPONENT24,e,e,0,n.DEPTH_COMPONENT,n.UNSIGNED_INT,null);return this._bindTextureDirectly(n.TEXTURE_CUBE_MAP,null),i},M.prototype.setFrameBufferDepthStencilTexture=function(e){var t=e.getInternalTexture();if(t&&t._framebuffer&&e.depthStencilTexture){var i=this._gl,r=e.depthStencilTexture;this.bindUnboundFramebuffer(t._framebuffer),r.isCube?r._generateStencilBuffer?i.framebufferTexture2D(i.FRAMEBUFFER,i.DEPTH_STENCIL_ATTACHMENT,i.TEXTURE_CUBE_MAP_POSITIVE_X,r._webGLTexture,0):i.framebufferTexture2D(i.FRAMEBUFFER,i.DEPTH_ATTACHMENT,i.TEXTURE_CUBE_MAP_POSITIVE_X,r._webGLTexture,0):r._generateStencilBuffer?i.framebufferTexture2D(i.FRAMEBUFFER,i.DEPTH_STENCIL_ATTACHMENT,i.TEXTURE_2D,r._webGLTexture,0):i.framebufferTexture2D(i.FRAMEBUFFER,i.DEPTH_ATTACHMENT,i.TEXTURE_2D,r._webGLTexture,0),this.bindUnboundFramebuffer(null)}},M.prototype.createRenderTargetTexture=function(e,t){var i=new h;void 0!==t&&\"object\"==typeof t?(i.generateMipMaps=t.generateMipMaps,i.generateDepthBuffer=void 0===t.generateDepthBuffer||t.generateDepthBuffer,i.generateStencilBuffer=i.generateDepthBuffer&&t.generateStencilBuffer,i.type=void 0===t.type?M.TEXTURETYPE_UNSIGNED_INT:t.type,i.samplingMode=void 0===t.samplingMode?M.TEXTURE_TRILINEAR_SAMPLINGMODE:t.samplingMode,i.format=void 0===t.format?M.TEXTUREFORMAT_RGBA:t.format):(i.generateMipMaps=t,i.generateDepthBuffer=!0,i.generateStencilBuffer=!1,i.type=M.TEXTURETYPE_UNSIGNED_INT,i.samplingMode=M.TEXTURE_TRILINEAR_SAMPLINGMODE,i.format=M.TEXTUREFORMAT_RGBA),(i.type!==M.TEXTURETYPE_FLOAT||this._caps.textureFloatLinearFiltering)&&(i.type!==M.TEXTURETYPE_HALF_FLOAT||this._caps.textureHalfFloatLinearFiltering)||(i.samplingMode=M.TEXTURE_NEAREST_SAMPLINGMODE);var r=this._gl,n=new R.InternalTexture(this,R.InternalTexture.DATASOURCE_RENDERTARGET);this._bindTextureDirectly(r.TEXTURE_2D,n,!0);var o=e.width||e,s=e.height||e,a=this._getSamplingParameters(i.samplingMode,!!i.generateMipMaps);i.type!==M.TEXTURETYPE_FLOAT||this._caps.textureFloat||(i.type=M.TEXTURETYPE_UNSIGNED_INT,R.Tools.Warn(\"Float textures are not supported. Render target forced to TEXTURETYPE_UNSIGNED_BYTE type\")),r.texParameteri(r.TEXTURE_2D,r.TEXTURE_MAG_FILTER,a.mag),r.texParameteri(r.TEXTURE_2D,r.TEXTURE_MIN_FILTER,a.min),r.texParameteri(r.TEXTURE_2D,r.TEXTURE_WRAP_S,r.CLAMP_TO_EDGE),r.texParameteri(r.TEXTURE_2D,r.TEXTURE_WRAP_T,r.CLAMP_TO_EDGE),r.texImage2D(r.TEXTURE_2D,0,this._getRGBABufferInternalSizedFormat(i.type,i.format),o,s,0,this._getInternalFormat(i.format),this._getWebGLTextureType(i.type),null);var l=this._currentFramebuffer,c=r.createFramebuffer();return this.bindUnboundFramebuffer(c),r.framebufferTexture2D(r.FRAMEBUFFER,r.COLOR_ATTACHMENT0,r.TEXTURE_2D,n._webGLTexture,0),n._depthStencilBuffer=this._setupFramebufferDepthAttachments(!!i.generateStencilBuffer,i.generateDepthBuffer,o,s),i.generateMipMaps&&this._gl.generateMipmap(this._gl.TEXTURE_2D),this._bindTextureDirectly(r.TEXTURE_2D,null),r.bindRenderbuffer(r.RENDERBUFFER,null),this.bindUnboundFramebuffer(l),n._framebuffer=c,n.baseWidth=o,n.baseHeight=s,n.width=o,n.height=s,n.isReady=!0,n.samples=1,n.generateMipMaps=!!i.generateMipMaps,n.samplingMode=i.samplingMode,n.type=i.type,n.format=i.format,n._generateDepthBuffer=i.generateDepthBuffer,n._generateStencilBuffer=!!i.generateStencilBuffer,this._internalTexturesCache.push(n),n},M.prototype.createMultipleRenderTarget=function(e,t){var i=!1,r=!0,n=!1,o=!1,s=1,a=M.TEXTURETYPE_UNSIGNED_INT,l=M.TEXTURE_TRILINEAR_SAMPLINGMODE,c=new Array,h=new Array;void 0!==t&&(i=void 0!==t.generateMipMaps&&t.generateMipMaps,r=void 0===t.generateDepthBuffer||t.generateDepthBuffer,n=void 0!==t.generateStencilBuffer&&t.generateStencilBuffer,o=void 0!==t.generateDepthTexture&&t.generateDepthTexture,s=t.textureCount||1,t.types&&(c=t.types),t.samplingModes&&(h=t.samplingModes));var u=this._gl,d=u.createFramebuffer();this.bindUnboundFramebuffer(d);for(var f=e.width||e,p=e.height||e,_=[],m=[],g=this._setupFramebufferDepthAttachments(n,r,f,p),v=0;v<s;v++){var y=h[v]||l,b=c[v]||a;(b!==M.TEXTURETYPE_FLOAT||this._caps.textureFloatLinearFiltering)&&(b!==M.TEXTURETYPE_HALF_FLOAT||this._caps.textureHalfFloatLinearFiltering)||(y=M.TEXTURE_NEAREST_SAMPLINGMODE);var T=this._getSamplingParameters(y,i);b!==M.TEXTURETYPE_FLOAT||this._caps.textureFloat||(b=M.TEXTURETYPE_UNSIGNED_INT,R.Tools.Warn(\"Float textures are not supported. Render target forced to TEXTURETYPE_UNSIGNED_BYTE type\"));var E=new R.InternalTexture(this,R.InternalTexture.DATASOURCE_MULTIRENDERTARGET),x=u[1<this.webGLVersion?\"COLOR_ATTACHMENT\"+v:\"COLOR_ATTACHMENT\"+v+\"_WEBGL\"];_.push(E),m.push(x),u.activeTexture(u[\"TEXTURE\"+v]),u.bindTexture(u.TEXTURE_2D,E._webGLTexture),u.texParameteri(u.TEXTURE_2D,u.TEXTURE_MAG_FILTER,T.mag),u.texParameteri(u.TEXTURE_2D,u.TEXTURE_MIN_FILTER,T.min),u.texParameteri(u.TEXTURE_2D,u.TEXTURE_WRAP_S,u.CLAMP_TO_EDGE),u.texParameteri(u.TEXTURE_2D,u.TEXTURE_WRAP_T,u.CLAMP_TO_EDGE),u.texImage2D(u.TEXTURE_2D,0,this._getRGBABufferInternalSizedFormat(b),f,p,0,u.RGBA,this._getWebGLTextureType(b),null),u.framebufferTexture2D(u.DRAW_FRAMEBUFFER,x,u.TEXTURE_2D,E._webGLTexture,0),i&&this._gl.generateMipmap(this._gl.TEXTURE_2D),this._bindTextureDirectly(u.TEXTURE_2D,null),E._framebuffer=d,E._depthStencilBuffer=g,E.baseWidth=f,E.baseHeight=p,E.width=f,E.height=p,E.isReady=!0,E.samples=1,E.generateMipMaps=i,E.samplingMode=y,E.type=b,E._generateDepthBuffer=r,E._generateStencilBuffer=n,E._attachments=m,this._internalTexturesCache.push(E)}if(o&&this._caps.depthTextureExtension){var P=new R.InternalTexture(this,R.InternalTexture.DATASOURCE_MULTIRENDERTARGET);u.activeTexture(u.TEXTURE0),u.bindTexture(u.TEXTURE_2D,P._webGLTexture),u.texParameteri(u.TEXTURE_2D,u.TEXTURE_MAG_FILTER,u.NEAREST),u.texParameteri(u.TEXTURE_2D,u.TEXTURE_MIN_FILTER,u.NEAREST),u.texParameteri(u.TEXTURE_2D,u.TEXTURE_WRAP_S,u.CLAMP_TO_EDGE),u.texParameteri(u.TEXTURE_2D,u.TEXTURE_WRAP_T,u.CLAMP_TO_EDGE),u.texImage2D(u.TEXTURE_2D,0,this.webGLVersion<2?u.DEPTH_COMPONENT:u.DEPTH_COMPONENT16,f,p,0,u.DEPTH_COMPONENT,u.UNSIGNED_SHORT,null),u.framebufferTexture2D(u.FRAMEBUFFER,u.DEPTH_ATTACHMENT,u.TEXTURE_2D,P._webGLTexture,0),P._framebuffer=d,P.baseWidth=f,P.baseHeight=p,P.width=f,P.height=p,P.isReady=!0,P.samples=1,P.generateMipMaps=i,P.samplingMode=u.NEAREST,P._generateDepthBuffer=r,P._generateStencilBuffer=n,_.push(P),this._internalTexturesCache.push(P)}return u.drawBuffers(m),u.bindRenderbuffer(u.RENDERBUFFER,null),this.bindUnboundFramebuffer(null),this.resetTextureCache(),_},M.prototype._setupFramebufferDepthAttachments=function(e,t,i,r,n){void 0===n&&(n=1);var o=null,s=this._gl;return e?(o=s.createRenderbuffer(),s.bindRenderbuffer(s.RENDERBUFFER,o),1<n?s.renderbufferStorageMultisample(s.RENDERBUFFER,n,s.DEPTH24_STENCIL8,i,r):s.renderbufferStorage(s.RENDERBUFFER,s.DEPTH_STENCIL,i,r),s.framebufferRenderbuffer(s.FRAMEBUFFER,s.DEPTH_STENCIL_ATTACHMENT,s.RENDERBUFFER,o)):t&&(o=s.createRenderbuffer(),s.bindRenderbuffer(s.RENDERBUFFER,o),1<n?s.renderbufferStorageMultisample(s.RENDERBUFFER,n,s.DEPTH_COMPONENT16,i,r):s.renderbufferStorage(s.RENDERBUFFER,s.DEPTH_COMPONENT16,i,r),s.framebufferRenderbuffer(s.FRAMEBUFFER,s.DEPTH_ATTACHMENT,s.RENDERBUFFER,o)),o},M.prototype.updateRenderTargetTextureSampleCount=function(e,t){if(this.webGLVersion<2||!e)return 1;if(e.samples===t)return t;var i=this._gl;if(t=Math.min(t,i.getParameter(i.MAX_SAMPLES)),e._depthStencilBuffer&&(i.deleteRenderbuffer(e._depthStencilBuffer),e._depthStencilBuffer=null),e._MSAAFramebuffer&&(i.deleteFramebuffer(e._MSAAFramebuffer),e._MSAAFramebuffer=null),e._MSAARenderBuffer&&(i.deleteRenderbuffer(e._MSAARenderBuffer),e._MSAARenderBuffer=null),1<t){var r=i.createFramebuffer();if(!r)throw new Error(\"Unable to create multi sampled framebuffer\");e._MSAAFramebuffer=r,this.bindUnboundFramebuffer(e._MSAAFramebuffer);var n=i.createRenderbuffer();if(!n)throw new Error(\"Unable to create multi sampled framebuffer\");i.bindRenderbuffer(i.RENDERBUFFER,n),i.renderbufferStorageMultisample(i.RENDERBUFFER,t,this._getRGBAMultiSampleBufferFormat(e.type),e.width,e.height),i.framebufferRenderbuffer(i.FRAMEBUFFER,i.COLOR_ATTACHMENT0,i.RENDERBUFFER,n),e._MSAARenderBuffer=n}else this.bindUnboundFramebuffer(e._framebuffer);return e.samples=t,e._depthStencilBuffer=this._setupFramebufferDepthAttachments(e._generateStencilBuffer,e._generateDepthBuffer,e.width,e.height,t),i.bindRenderbuffer(i.RENDERBUFFER,null),this.bindUnboundFramebuffer(null),t},M.prototype.updateMultipleRenderTargetTextureSampleCount=function(e,t){if(this.webGLVersion<2||!e||0==e.length)return 1;if(e[0].samples===t)return t;var i=this._gl;t=Math.min(t,i.getParameter(i.MAX_SAMPLES)),e[0]._depthStencilBuffer&&(i.deleteRenderbuffer(e[0]._depthStencilBuffer),e[0]._depthStencilBuffer=null),e[0]._MSAAFramebuffer&&(i.deleteFramebuffer(e[0]._MSAAFramebuffer),e[0]._MSAAFramebuffer=null);for(var r=0;r<e.length;r++)e[r]._MSAARenderBuffer&&(i.deleteRenderbuffer(e[r]._MSAARenderBuffer),e[r]._MSAARenderBuffer=null);if(1<t){var n=i.createFramebuffer();if(!n)throw new Error(\"Unable to create multi sampled framebuffer\");this.bindUnboundFramebuffer(n);var o=this._setupFramebufferDepthAttachments(e[0]._generateStencilBuffer,e[0]._generateDepthBuffer,e[0].width,e[0].height,t),s=[];for(r=0;r<e.length;r++){var a=e[r],l=i[1<this.webGLVersion?\"COLOR_ATTACHMENT\"+r:\"COLOR_ATTACHMENT\"+r+\"_WEBGL\"],c=i.createRenderbuffer();if(!c)throw new Error(\"Unable to create multi sampled framebuffer\");i.bindRenderbuffer(i.RENDERBUFFER,c),i.renderbufferStorageMultisample(i.RENDERBUFFER,t,this._getRGBAMultiSampleBufferFormat(a.type),a.width,a.height),i.framebufferRenderbuffer(i.FRAMEBUFFER,l,i.RENDERBUFFER,c),a._MSAAFramebuffer=n,a._MSAARenderBuffer=c,a.samples=t,a._depthStencilBuffer=o,i.bindRenderbuffer(i.RENDERBUFFER,null),s.push(l)}i.drawBuffers(s)}else this.bindUnboundFramebuffer(e[0]._framebuffer);return this.bindUnboundFramebuffer(null),t},M.prototype._uploadCompressedDataToTextureDirectly=function(e,t,i,r,n,o,s){void 0===o&&(o=0),void 0===s&&(s=0);var a=this._gl,l=a.TEXTURE_2D;e.isCube&&(l=a.TEXTURE_CUBE_MAP_POSITIVE_X+o),this._gl.compressedTexImage2D(l,s,t,i,r,0,n)},M.prototype._uploadDataToTextureDirectly=function(e,t,i,r){void 0===i&&(i=0),void 0===r&&(r=0);var n=this._gl,o=this._getWebGLTextureType(e.type),s=this._getInternalFormat(e.format),a=this._getRGBABufferInternalSizedFormat(e.type,s);this._unpackFlipY(e.invertY);var l=n.TEXTURE_2D;e.isCube&&(l=n.TEXTURE_CUBE_MAP_POSITIVE_X+i);var c=Math.round(R.Scalar.Log2(e.width)),h=Math.round(R.Scalar.Log2(e.height)),u=Math.pow(2,Math.max(c-r,0)),d=Math.pow(2,Math.max(h-r,0));n.texImage2D(l,r,a,u,d,0,s,o,t)},M.prototype._uploadArrayBufferViewToTexture=function(e,t,i,r){void 0===i&&(i=0),void 0===r&&(r=0);var n=this._gl,o=e.isCube?n.TEXTURE_CUBE_MAP:n.TEXTURE_2D;this._bindTextureDirectly(o,e,!0),this._uploadDataToTextureDirectly(e,t,i,r),this._bindTextureDirectly(o,null,!0)},M.prototype._uploadImageToTexture=function(e,t,i,r){void 0===i&&(i=0),void 0===r&&(r=0);var n=this._gl,o=this._getWebGLTextureType(e.type),s=this._getInternalFormat(e.format),a=this._getRGBABufferInternalSizedFormat(e.type,s),l=e.isCube?n.TEXTURE_CUBE_MAP:n.TEXTURE_2D;this._bindTextureDirectly(l,e,!0),this._unpackFlipY(e.invertY);var c=n.TEXTURE_2D;e.isCube&&(c=n.TEXTURE_CUBE_MAP_POSITIVE_X+i),n.texImage2D(c,r,a,s,o,t),this._bindTextureDirectly(l,null,!0)},M.prototype.createRenderTargetCubeTexture=function(e,t){var i=ae({generateMipMaps:!0,generateDepthBuffer:!0,generateStencilBuffer:!1,type:M.TEXTURETYPE_UNSIGNED_INT,samplingMode:M.TEXTURE_TRILINEAR_SAMPLINGMODE,format:M.TEXTUREFORMAT_RGBA},t);i.generateStencilBuffer=i.generateDepthBuffer&&i.generateStencilBuffer,(i.type!==M.TEXTURETYPE_FLOAT||this._caps.textureFloatLinearFiltering)&&(i.type!==M.TEXTURETYPE_HALF_FLOAT||this._caps.textureHalfFloatLinearFiltering)||(i.samplingMode=M.TEXTURE_NEAREST_SAMPLINGMODE);var r=this._gl,n=new R.InternalTexture(this,R.InternalTexture.DATASOURCE_RENDERTARGET);this._bindTextureDirectly(r.TEXTURE_CUBE_MAP,n,!0);var o=this._getSamplingParameters(i.samplingMode,i.generateMipMaps);i.type!==M.TEXTURETYPE_FLOAT||this._caps.textureFloat||(i.type=M.TEXTURETYPE_UNSIGNED_INT,R.Tools.Warn(\"Float textures are not supported. Cube render target forced to TEXTURETYPE_UNESIGNED_BYTE type\")),r.texParameteri(r.TEXTURE_CUBE_MAP,r.TEXTURE_MAG_FILTER,o.mag),r.texParameteri(r.TEXTURE_CUBE_MAP,r.TEXTURE_MIN_FILTER,o.min),r.texParameteri(r.TEXTURE_CUBE_MAP,r.TEXTURE_WRAP_S,r.CLAMP_TO_EDGE),r.texParameteri(r.TEXTURE_CUBE_MAP,r.TEXTURE_WRAP_T,r.CLAMP_TO_EDGE);for(var s=0;s<6;s++)r.texImage2D(r.TEXTURE_CUBE_MAP_POSITIVE_X+s,0,this._getRGBABufferInternalSizedFormat(i.type,i.format),e,e,0,this._getInternalFormat(i.format),this._getWebGLTextureType(i.type),null);var a=r.createFramebuffer();return this.bindUnboundFramebuffer(a),n._depthStencilBuffer=this._setupFramebufferDepthAttachments(i.generateStencilBuffer,i.generateDepthBuffer,e,e),i.generateMipMaps&&r.generateMipmap(r.TEXTURE_CUBE_MAP),this._bindTextureDirectly(r.TEXTURE_CUBE_MAP,null),r.bindRenderbuffer(r.RENDERBUFFER,null),this.bindUnboundFramebuffer(null),n._framebuffer=a,n.width=e,n.height=e,n.isReady=!0,n.isCube=!0,n.samples=1,n.generateMipMaps=i.generateMipMaps,n.samplingMode=i.samplingMode,n.type=i.type,n.format=i.format,n._generateDepthBuffer=i.generateDepthBuffer,n._generateStencilBuffer=i.generateStencilBuffer,this._internalTexturesCache.push(n),n},M.prototype.createPrefilteredCubeTexture=function(e,_,m,g,v,t,i,r,y){var b=this;void 0===v&&(v=null),void 0===t&&(t=null),void 0===r&&(r=null),void 0===y&&(y=!0);return this.createCubeTexture(e,_,null,!1,(function(e){if(e){var t=e.texture;if(y?e.info.sphericalPolynomial&&(t._sphericalPolynomial=e.info.sphericalPolynomial):t._sphericalPolynomial=new R.SphericalPolynomial,t._dataSource=R.InternalTexture.DATASOURCE_CUBEPREFILTERED,b._caps.textureLOD)v&&v(t);else{var i=b._gl,r=e.width;if(r){for(var n=[],o=0;o<3;o++){var s=1-o/2,a=g,l=R.Scalar.Log2(r)*m+g,c=a+(l-a)*s,h=Math.round(Math.min(Math.max(c,0),l)),u=new R.InternalTexture(b,R.InternalTexture.DATASOURCE_TEMP);if(u.type=t.type,u.format=t.format,u.width=Math.pow(2,Math.max(R.Scalar.Log2(r)-h,0)),u.height=u.width,u.isCube=!0,b._bindTextureDirectly(i.TEXTURE_CUBE_MAP,u,!0),i.texParameteri(i.TEXTURE_CUBE_MAP,i.TEXTURE_MAG_FILTER,i.LINEAR),i.texParameteri(i.TEXTURE_CUBE_MAP,i.TEXTURE_MIN_FILTER,i.LINEAR),i.texParameteri(i.TEXTURE_CUBE_MAP,i.TEXTURE_WRAP_S,i.CLAMP_TO_EDGE),i.texParameteri(i.TEXTURE_CUBE_MAP,i.TEXTURE_WRAP_T,i.CLAMP_TO_EDGE),e.isDDS){var d=e.info,f=e.data;b._unpackFlipY(d.isCompressed),R.DDSTools.UploadDDSLevels(b,u,f,d,!0,6,h)}else R.Tools.Warn(\"DDS is the only prefiltered cube map supported so far.\");b._bindTextureDirectly(i.TEXTURE_CUBE_MAP,null);var p=new R.BaseTexture(_);p.isCube=!0,(p._texture=u).isReady=!0,n.push(p)}t._lodTextureHigh=n[2],t._lodTextureMid=n[1],t._lodTextureLow=n[0],v&&v(t)}}}else v&&v(null)}),t,i,r,y,m,g)},M.prototype.createCubeTexture=function(r,n,o,s,a,l,c,e,h,u,d,t){var f=this;void 0===a&&(a=null),void 0===l&&(l=null),void 0===e&&(e=null),void 0===h&&(h=!1),void 0===u&&(u=0),void 0===d&&(d=0),void 0===t&&(t=null);var p=this._gl,_=t||new R.InternalTexture(this,R.InternalTexture.DATASOURCE_CUBE);_.isCube=!0,_.url=r,_.generateMipMaps=!s,_._lodGenerationScale=u,_._lodGenerationOffset=d,this._doNotHandleContextLost||(_._extension=e,_._files=o);for(var i=r.lastIndexOf(\".\"),m=e||(-1<i?r.substring(i).toLowerCase():\"\"),g=null,v=0,y=M._TextureLoaders;v<y.length;v++){var b=y[v];if(b.canLoad(m,this._textureFormatInUse,t,!1,!1)){g=b;break}}if(g){r=g.transformUrl(r,this._textureFormatInUse);var T=function(e){f._bindTextureDirectly(p.TEXTURE_CUBE_MAP,_,!0),g.loadCubeData(e,_,h,a,l)};o&&6===o.length?g.supportCascades?this._cascadeLoadFiles(n,T,o,l):l&&l(\"Textures type does not support cascades.\"):this._loadFile(r,T,void 0,void 0,!0,(function(e,t){if(g){var i=g.getFallbackTextureUrl(r,f._textureFormatInUse);i&&f.createCubeTexture(i,n,o,s,a,l,c,m,h,u,d,_)}l&&e&&l(e.status+\" \"+e.statusText,t)}))}else{if(!o)throw new Error(\"Cannot load cubemap because files were not defined\");this._cascadeLoadImgs(r,n,(function(e){var t=f.needPOTTextures?R.Tools.GetExponentOfTwo(e[0].width,f._caps.maxCubemapTextureSize):e[0].width,i=t;if(f._prepareWorkingCanvas(),f._workingCanvas&&f._workingContext){f._workingCanvas.width=t,f._workingCanvas.height=i;var r=[p.TEXTURE_CUBE_MAP_POSITIVE_X,p.TEXTURE_CUBE_MAP_POSITIVE_Y,p.TEXTURE_CUBE_MAP_POSITIVE_Z,p.TEXTURE_CUBE_MAP_NEGATIVE_X,p.TEXTURE_CUBE_MAP_NEGATIVE_Y,p.TEXTURE_CUBE_MAP_NEGATIVE_Z];f._bindTextureDirectly(p.TEXTURE_CUBE_MAP,_,!0),f._unpackFlipY(!1);for(var n=c?f._getInternalFormat(c):f._gl.RGBA,o=0;o<r.length;o++)f._workingContext.drawImage(e[o],0,0,e[o].width,e[o].height,0,0,t,i),p.texImage2D(r[o],0,n,n,p.UNSIGNED_BYTE,f._workingCanvas);s||p.generateMipmap(p.TEXTURE_CUBE_MAP),f._setCubeMapTextureParams(!s),_.width=t,_.height=i,_.isReady=!0,c&&(_.format=c),_.onLoadedObservable.notifyObservers(_),_.onLoadedObservable.clear(),a&&a()}}),o,l)}return this._internalTexturesCache.push(_),_},M.prototype._setCubeMapTextureParams=function(e){var t=this._gl;t.texParameteri(t.TEXTURE_CUBE_MAP,t.TEXTURE_MAG_FILTER,t.LINEAR),t.texParameteri(t.TEXTURE_CUBE_MAP,t.TEXTURE_MIN_FILTER,e?t.LINEAR_MIPMAP_LINEAR:t.LINEAR),t.texParameteri(t.TEXTURE_CUBE_MAP,t.TEXTURE_WRAP_S,t.CLAMP_TO_EDGE),t.texParameteri(t.TEXTURE_CUBE_MAP,t.TEXTURE_WRAP_T,t.CLAMP_TO_EDGE),this._bindTextureDirectly(t.TEXTURE_CUBE_MAP,null)},M.prototype.updateRawCubeTexture=function(e,t,i,r,n,o,s){void 0===o&&(o=null),void 0===s&&(s=0),e._bufferViewArray=t,e.format=i,e.type=r,e.invertY=n,e._compression=o;var a=this._gl,l=this._getWebGLTextureType(r),c=this._getInternalFormat(i),h=this._getRGBABufferInternalSizedFormat(r),u=!1;c===a.RGB&&(c=a.RGBA,u=!0),this._bindTextureDirectly(a.TEXTURE_CUBE_MAP,e,!0),this._unpackFlipY(void 0===n||!!n),e.width%4!=0&&a.pixelStorei(a.UNPACK_ALIGNMENT,1);for(var d=0;d<6;d++){var f=t[d];o?a.compressedTexImage2D(a.TEXTURE_CUBE_MAP_POSITIVE_X+d,s,this.getCaps().s3tc[o],e.width,e.height,0,f):(u&&(f=this._convertRGBtoRGBATextureData(f,e.width,e.height,r)),a.texImage2D(a.TEXTURE_CUBE_MAP_POSITIVE_X+d,s,h,e.width,e.height,0,c,l,f))}(!this.needPOTTextures||R.Tools.IsExponentOfTwo(e.width)&&R.Tools.IsExponentOfTwo(e.height))&&e.generateMipMaps&&0===s&&this._gl.generateMipmap(this._gl.TEXTURE_CUBE_MAP),this._bindTextureDirectly(this._gl.TEXTURE_CUBE_MAP,null),e.isReady=!0},M.prototype.createRawCubeTexture=function(e,t,i,r,n,o,s,a){void 0===a&&(a=null);var l=this._gl,c=new R.InternalTexture(this,R.InternalTexture.DATASOURCE_CUBERAW);c.isCube=!0,c.format=i,c.type=r,this._doNotHandleContextLost||(c._bufferViewArray=e);var h=this._getWebGLTextureType(r),u=this._getInternalFormat(i);u===l.RGB&&(u=l.RGBA),h!==l.FLOAT||this._caps.textureFloatLinearFiltering?h!==this._gl.HALF_FLOAT_OES||this._caps.textureHalfFloatLinearFiltering?h!==l.FLOAT||this._caps.textureFloatRender?h!==l.HALF_FLOAT||this._caps.colorBufferFloat||(n=!1,R.Tools.Warn(\"Render to half float textures is not supported. Mipmap generation forced to false.\")):(n=!1,R.Tools.Warn(\"Render to float textures is not supported. Mipmap generation forced to false.\")):(n=!1,s=M.TEXTURE_NEAREST_SAMPLINGMODE,R.Tools.Warn(\"Half float texture filtering is not supported. Mipmap generation and sampling mode are forced to false and TEXTURE_NEAREST_SAMPLINGMODE, respectively.\")):(n=!1,s=M.TEXTURE_NEAREST_SAMPLINGMODE,R.Tools.Warn(\"Float texture filtering is not supported. Mipmap generation and sampling mode are forced to false and TEXTURE_NEAREST_SAMPLINGMODE, respectively.\"));var d=t,f=d;c.width=d,c.height=f,!this.needPOTTextures||R.Tools.IsExponentOfTwo(c.width)&&R.Tools.IsExponentOfTwo(c.height)||(n=!1),e&&this.updateRawCubeTexture(c,e,i,r,o,a),this._bindTextureDirectly(this._gl.TEXTURE_CUBE_MAP,c,!0),e&&n&&this._gl.generateMipmap(this._gl.TEXTURE_CUBE_MAP);var p=this._getSamplingParameters(s,n);return l.texParameteri(l.TEXTURE_CUBE_MAP,l.TEXTURE_MAG_FILTER,p.mag),l.texParameteri(l.TEXTURE_CUBE_MAP,l.TEXTURE_MIN_FILTER,p.min),l.texParameteri(l.TEXTURE_CUBE_MAP,l.TEXTURE_WRAP_S,l.CLAMP_TO_EDGE),l.texParameteri(l.TEXTURE_CUBE_MAP,l.TEXTURE_WRAP_T,l.CLAMP_TO_EDGE),this._bindTextureDirectly(l.TEXTURE_CUBE_MAP,null),c.generateMipMaps=n,c},M.prototype.createRawCubeTextureFromUrl=function(e,d,t,f,p,i,_,m,g,r,n,v){var y=this;void 0===g&&(g=null),void 0===r&&(r=null),void 0===n&&(n=M.TEXTURE_TRILINEAR_SAMPLINGMODE),void 0===v&&(v=!1);var b=this._gl,T=this.createRawCubeTexture(null,t,f,p,!i,v,n);d._addPendingData(T),T.url=e,this._internalTexturesCache.push(T);return this._loadFile(e,(function(e){!(function(e){var t=T.width,i=_(e);if(i){if(m){var r=y._getWebGLTextureType(p),n=y._getInternalFormat(f),o=y._getRGBABufferInternalSizedFormat(p),s=!1;n===b.RGB&&(n=b.RGBA,s=!0),y._bindTextureDirectly(b.TEXTURE_CUBE_MAP,T,!0),y._unpackFlipY(!1);for(var a=m(i),l=0;l<a.length;l++)for(var c=t>>l,h=0;h<6;h++){var u=a[l][h];s&&(u=y._convertRGBtoRGBATextureData(u,c,c,p)),b.texImage2D(h,l,o,c,c,0,n,r,u)}y._bindTextureDirectly(b.TEXTURE_CUBE_MAP,null)}else y.updateRawCubeTexture(T,i,f,p,v);T.isReady=!0,d._removePendingData(T),g&&g()}})(e)}),void 0,d.database,!0,(function(e,t){d._removePendingData(T),r&&e&&r(e.status+\" \"+e.statusText,t)})),T},M.prototype.updateRawTexture3D=function(e,t,i,r,n,o){void 0===n&&(n=null),void 0===o&&(o=M.TEXTURETYPE_UNSIGNED_INT);var s=this._getWebGLTextureType(o),a=this._getInternalFormat(i),l=this._getRGBABufferInternalSizedFormat(o,i);this._bindTextureDirectly(this._gl.TEXTURE_3D,e,!0),this._unpackFlipY(void 0===r||!!r),this._doNotHandleContextLost||(e._bufferView=t,e.format=i,e.invertY=r,e._compression=n),e.width%4!=0&&this._gl.pixelStorei(this._gl.UNPACK_ALIGNMENT,1),n&&t?this._gl.compressedTexImage3D(this._gl.TEXTURE_3D,0,this.getCaps().s3tc[n],e.width,e.height,e.depth,0,t):this._gl.texImage3D(this._gl.TEXTURE_3D,0,l,e.width,e.height,e.depth,0,a,s,t),e.generateMipMaps&&this._gl.generateMipmap(this._gl.TEXTURE_3D),this._bindTextureDirectly(this._gl.TEXTURE_3D,null),e.isReady=!0},M.prototype.createRawTexture3D=function(e,t,i,r,n,o,s,a,l,c){void 0===l&&(l=null),void 0===c&&(c=M.TEXTURETYPE_UNSIGNED_INT);var h=new R.InternalTexture(this,R.InternalTexture.DATASOURCE_RAW3D);h.baseWidth=t,h.baseHeight=i,h.baseDepth=r,h.width=t,h.height=i,h.depth=r,h.format=n,h.type=c,h.generateMipMaps=o,h.samplingMode=a,h.is3D=!0,this._doNotHandleContextLost||(h._bufferView=e),this.updateRawTexture3D(h,e,n,s,l,c),this._bindTextureDirectly(this._gl.TEXTURE_3D,h,!0);var u=this._getSamplingParameters(a,o);return this._gl.texParameteri(this._gl.TEXTURE_3D,this._gl.TEXTURE_MAG_FILTER,u.mag),this._gl.texParameteri(this._gl.TEXTURE_3D,this._gl.TEXTURE_MIN_FILTER,u.min),o&&this._gl.generateMipmap(this._gl.TEXTURE_3D),this._bindTextureDirectly(this._gl.TEXTURE_3D,null),this._internalTexturesCache.push(h),h},M.prototype._prepareWebGLTextureContinuation=function(e,t,i,r,n){var o=this._gl;if(o){var s=this._getSamplingParameters(n,!i);o.texParameteri(o.TEXTURE_2D,o.TEXTURE_MAG_FILTER,s.mag),o.texParameteri(o.TEXTURE_2D,o.TEXTURE_MIN_FILTER,s.min),i||r||o.generateMipmap(o.TEXTURE_2D),this._bindTextureDirectly(o.TEXTURE_2D,null),t&&t._removePendingData(e),e.onLoadedObservable.notifyObservers(e),e.onLoadedObservable.clear()}},M.prototype._prepareWebGLTexture=function(e,t,i,r,n,o,s,a,l){var c=this;void 0===l&&(l=M.TEXTURE_TRILINEAR_SAMPLINGMODE);var h=this.getCaps().maxTextureSize,u=Math.min(h,this.needPOTTextures?R.Tools.GetExponentOfTwo(i,h):i),d=Math.min(h,this.needPOTTextures?R.Tools.GetExponentOfTwo(r,h):r),f=this._gl;f&&(e._webGLTexture?(this._bindTextureDirectly(f.TEXTURE_2D,e,!0),this._unpackFlipY(void 0===n||!!n),e.baseWidth=i,e.baseHeight=r,e.width=u,e.height=d,e.isReady=!0,a(u,d,(function(){c._prepareWebGLTextureContinuation(e,t,o,s,l)}))||this._prepareWebGLTextureContinuation(e,t,o,s,l)):t&&t._removePendingData(e))},M.prototype._convertRGBtoRGBATextureData=function(e,t,i,r){var n;n=r===M.TEXTURETYPE_FLOAT?new Float32Array(t*i*4):new Uint32Array(t*i*4);for(var o=0;o<t;o++)for(var s=0;s<i;s++){var a=3*(s*t+o),l=4*(s*t+o);n[l+0]=e[a+0],n[l+1]=e[a+1],n[l+2]=e[a+2],n[l+3]=1}return n},M.prototype._releaseFramebufferObjects=function(e){var t=this._gl;e._framebuffer&&(t.deleteFramebuffer(e._framebuffer),e._framebuffer=null),e._depthStencilBuffer&&(t.deleteRenderbuffer(e._depthStencilBuffer),e._depthStencilBuffer=null),e._MSAAFramebuffer&&(t.deleteFramebuffer(e._MSAAFramebuffer),e._MSAAFramebuffer=null),e._MSAARenderBuffer&&(t.deleteRenderbuffer(e._MSAARenderBuffer),e._MSAARenderBuffer=null)},M.prototype._releaseTexture=function(t){var e=this._gl;this._releaseFramebufferObjects(t),e.deleteTexture(t._webGLTexture),this.unbindAllTextures();var i=this._internalTexturesCache.indexOf(t);-1!==i&&this._internalTexturesCache.splice(i,1),t._lodTextureHigh&&t._lodTextureHigh.dispose(),t._lodTextureMid&&t._lodTextureMid.dispose(),t._lodTextureLow&&t._lodTextureLow.dispose(),this.scenes.forEach((function(e){e.postProcesses.forEach((function(e){e._outputTexture==t&&(e._outputTexture=null)})),e.cameras.forEach((function(e){e._postProcesses.forEach((function(e){e&&e._outputTexture==t&&(e._outputTexture=null)}))}))}))},M.prototype.setProgram=function(e){this._currentProgram!==e&&(this._gl.useProgram(e),this._currentProgram=e)},M.prototype.bindSamplers=function(e){this.setProgram(e.getProgram());for(var t=e.getSamplers(),i=0;i<t.length;i++){var r=e.getUniform(t[i]);r&&(this._boundUniforms[i]=r)}this._currentEffect=null},M.prototype._moveBoundTextureOnTop=function(e){this.disableTextureBindingOptimization||this._lastBoundInternalTextureTracker.previous===e||(this._linkTrackers(e.previous,e.next),this._linkTrackers(this._lastBoundInternalTextureTracker.previous,e),this._linkTrackers(e,this._lastBoundInternalTextureTracker))},M.prototype._getCorrectTextureChannel=function(e,t){if(!t)return-1;if(t._initialSlot=e,this.disableTextureBindingOptimization)e!==t._designatedSlot&&this._textureCollisions.addCount(1,!1);else if(e!==t._designatedSlot)return-1<t._designatedSlot?t._designatedSlot:this._nextFreeTextureSlots.length?this._nextFreeTextureSlots[0]:(this._textureCollisions.addCount(1,!1),this._removeDesignatedSlot(this._firstBoundInternalTextureTracker.next));return e},M.prototype._linkTrackers=function(e,t){(e.next=t).previous=e},M.prototype._removeDesignatedSlot=function(e){var t=e._designatedSlot;return-1===t?-1:(e._designatedSlot=-1,this.disableTextureBindingOptimization?-1:(this._linkTrackers(e.previous,e.next),this._boundTexturesCache[t]=null,this._nextFreeTextureSlots.push(t),t))},M.prototype._activateCurrentTexture=function(){this._currentTextureChannel!==this._activeChannel&&(this._gl.activeTexture(this._gl.TEXTURE0+this._activeChannel),this._currentTextureChannel=this._activeChannel)},M.prototype._bindTextureDirectly=function(e,t,i,r){void 0===i&&(i=!1),void 0===r&&(r=!1);var n=!1;i&&t&&-1<t._designatedSlot&&(this._activeChannel=t._designatedSlot);var o=this._boundTexturesCache[this._activeChannel],s=t&&-1<t._initialSlot;if(o!==t||r){if(o&&this._removeDesignatedSlot(o),this._activateCurrentTexture(),this._gl.bindTexture(e,t?t._webGLTexture:null),this._boundTexturesCache[this._activeChannel]=t){if(!this.disableTextureBindingOptimization){var a=this._nextFreeTextureSlots.indexOf(this._activeChannel);-1<a&&this._nextFreeTextureSlots.splice(a,1),this._linkTrackers(this._lastBoundInternalTextureTracker.previous,t),this._linkTrackers(t,this._lastBoundInternalTextureTracker)}t._designatedSlot=this._activeChannel}}else i&&(n=!0,this._activateCurrentTexture());return s&&!i&&this._bindSamplerUniformToChannel(t._initialSlot,this._activeChannel),n},M.prototype._bindTexture=function(e,t){e<0||(t&&(e=this._getCorrectTextureChannel(e,t)),this._activeChannel=e,this._bindTextureDirectly(this._gl.TEXTURE_2D,t))},M.prototype.setTextureFromPostProcess=function(e,t){this._bindTexture(e,t?t._textures.data[t._currentRenderTextureInd]:null)},M.prototype.setTextureFromPostProcessOutput=function(e,t){this._bindTexture(e,t?t._outputTexture:null)},M.prototype.unbindAllTextures=function(){for(var e=0;e<this._maxSimultaneousTextures;e++)this._activeChannel=e,this._bindTextureDirectly(this._gl.TEXTURE_2D,null),this._bindTextureDirectly(this._gl.TEXTURE_CUBE_MAP,null),1<this.webGLVersion&&this._bindTextureDirectly(this._gl.TEXTURE_3D,null)},M.prototype.setTexture=function(e,t,i){e<0||(t&&(this._boundUniforms[e]=t),this._setTexture(e,i))},M.prototype.setDepthStencilTexture=function(e,t,i){e<0||(t&&(this._boundUniforms[e]=t),i&&i.depthStencilTexture?this._setTexture(e,i,!1,!0):this._setTexture(e,null))},M.prototype._bindSamplerUniformToChannel=function(e,t){var i=this._boundUniforms[e];i._currentState!==t&&(this._gl.uniform1i(i,t),i._currentState=t)},M.prototype._getTextureWrapMode=function(e){switch(e){case M.TEXTURE_WRAP_ADDRESSMODE:return this._gl.REPEAT;case M.TEXTURE_CLAMP_ADDRESSMODE:return this._gl.CLAMP_TO_EDGE;case M.TEXTURE_MIRROR_ADDRESSMODE:return this._gl.MIRRORED_REPEAT}return this._gl.REPEAT},M.prototype._setTexture=function(e,t,i,r){if(void 0===i&&(i=!1),void 0===r&&(r=!1),!t)return null!=this._boundTexturesCache[e]&&(this._activeChannel=e,this._bindTextureDirectly(this._gl.TEXTURE_2D,null),this._bindTextureDirectly(this._gl.TEXTURE_CUBE_MAP,null),1<this.webGLVersion&&this._bindTextureDirectly(this._gl.TEXTURE_3D,null)),!1;if(t.video)this._activeChannel=e,t.update();else if(t.delayLoadState===M.DELAYLOADSTATE_NOTLOADED)return t.delayLoad(),!1;var n;n=r?t.depthStencilTexture:t.isReady()?t.getInternalTexture():t.isCube?this.emptyCubeTexture:t.is3D?this.emptyTexture3D:this.emptyTexture,i||(e=this._getCorrectTextureChannel(e,n));var o=!0;if(this._boundTexturesCache[e]===n&&(this._moveBoundTextureOnTop(n),i||this._bindSamplerUniformToChannel(n._initialSlot,e),o=!1),this._activeChannel=e,n&&n.is3D)o&&this._bindTextureDirectly(this._gl.TEXTURE_3D,n,i),n&&n._cachedWrapU!==t.wrapU&&(n._cachedWrapU=t.wrapU,this._setTextureParameterInteger(this._gl.TEXTURE_3D,this._gl.TEXTURE_WRAP_S,this._getTextureWrapMode(t.wrapU),n)),n&&n._cachedWrapV!==t.wrapV&&(n._cachedWrapV=t.wrapV,this._setTextureParameterInteger(this._gl.TEXTURE_3D,this._gl.TEXTURE_WRAP_T,this._getTextureWrapMode(t.wrapV),n)),n&&n._cachedWrapR!==t.wrapR&&(n._cachedWrapR=t.wrapR,this._setTextureParameterInteger(this._gl.TEXTURE_3D,this._gl.TEXTURE_WRAP_R,this._getTextureWrapMode(t.wrapR),n)),this._setAnisotropicLevel(this._gl.TEXTURE_3D,t);else if(n&&n.isCube){if(o&&this._bindTextureDirectly(this._gl.TEXTURE_CUBE_MAP,n,i),n._cachedCoordinatesMode!==t.coordinatesMode){n._cachedCoordinatesMode=t.coordinatesMode;var s=t.coordinatesMode!==M.TEXTURE_CUBIC_MODE&&t.coordinatesMode!==M.TEXTURE_SKYBOX_MODE?this._gl.REPEAT:this._gl.CLAMP_TO_EDGE;this._setTextureParameterInteger(this._gl.TEXTURE_CUBE_MAP,this._gl.TEXTURE_WRAP_S,s,n),this._setTextureParameterInteger(this._gl.TEXTURE_CUBE_MAP,this._gl.TEXTURE_WRAP_T,s)}this._setAnisotropicLevel(this._gl.TEXTURE_CUBE_MAP,t)}else o&&this._bindTextureDirectly(this._gl.TEXTURE_2D,n,i),n&&n._cachedWrapU!==t.wrapU&&(n._cachedWrapU=t.wrapU,this._setTextureParameterInteger(this._gl.TEXTURE_2D,this._gl.TEXTURE_WRAP_S,this._getTextureWrapMode(t.wrapU),n)),n&&n._cachedWrapV!==t.wrapV&&(n._cachedWrapV=t.wrapV,this._setTextureParameterInteger(this._gl.TEXTURE_2D,this._gl.TEXTURE_WRAP_T,this._getTextureWrapMode(t.wrapV),n)),this._setAnisotropicLevel(this._gl.TEXTURE_2D,t);return!0},M.prototype.setTextureArray=function(e,t,i){if(!(e<0)&&t){this._textureUnits&&this._textureUnits.length===i.length||(this._textureUnits=new Int32Array(i.length));for(var r=0;r<i.length;r++)this._textureUnits[r]=this._getCorrectTextureChannel(e+r,i[r].getInternalTexture());this._gl.uniform1iv(t,this._textureUnits);for(var n=0;n<i.length;n++)this._setTexture(this._textureUnits[n],i[n],!0)}},M.prototype._setAnisotropicLevel=function(e,t){var i=t.getInternalTexture();if(i){var r=this._caps.textureAnisotropicFilterExtension,n=t.anisotropicFilteringLevel;i.samplingMode!==M.TEXTURE_LINEAR_LINEAR_MIPNEAREST&&i.samplingMode!==M.TEXTURE_LINEAR_LINEAR_MIPLINEAR&&i.samplingMode!==M.TEXTURE_LINEAR_LINEAR&&(n=1),r&&i._cachedAnisotropicFilteringLevel!==n&&(this._setTextureParameterFloat(e,r.TEXTURE_MAX_ANISOTROPY_EXT,Math.min(n,this._caps.maxAnisotropy),i),i._cachedAnisotropicFilteringLevel=n)}},M.prototype._setTextureParameterFloat=function(e,t,i,r){this._bindTextureDirectly(e,r,!0,!0),this._gl.texParameterf(e,t,i)},M.prototype._setTextureParameterInteger=function(e,t,i,r){r&&this._bindTextureDirectly(e,r,!0,!0),this._gl.texParameteri(e,t,i)},M.prototype.readPixels=function(e,t,i,r){var n=new Uint8Array(r*i*4);return this._gl.readPixels(e,t,i,r,this._gl.RGBA,this._gl.UNSIGNED_BYTE,n),n},M.prototype.addExternalData=function(e,t){return this._externalData||(this._externalData=new R.StringDictionary),this._externalData.add(e,t)},M.prototype.getExternalData=function(e){return this._externalData||(this._externalData=new R.StringDictionary),this._externalData.get(e)},M.prototype.getOrAddExternalDataWithFactory=function(e,t){return this._externalData||(this._externalData=new R.StringDictionary),this._externalData.getOrAddWithFactory(e,t)},M.prototype.removeExternalData=function(e){return this._externalData||(this._externalData=new R.StringDictionary),this._externalData.remove(e)},M.prototype.unbindAllAttributes=function(){if(this._mustWipeVertexAttributes){this._mustWipeVertexAttributes=!1;for(var e=0;e<this._caps.maxVertexAttribs;e++)this._gl.disableVertexAttribArray(e),this._vertexAttribArraysEnabled[e]=!1,this._currentBufferPointers[e].active=!1}else{e=0;for(var t=this._vertexAttribArraysEnabled.length;e<t;e++)e>=this._caps.maxVertexAttribs||!this._vertexAttribArraysEnabled[e]||(this._gl.disableVertexAttribArray(e),this._vertexAttribArraysEnabled[e]=!1,this._currentBufferPointers[e].active=!1)}},M.prototype.releaseEffects=function(){for(var e in this._compiledEffects)this._deleteProgram(this._compiledEffects[e]._program);this._compiledEffects={}},M.prototype.dispose=function(){for(this.hideLoadingUI(),this.stopRenderLoop();this.postProcesses.length;)this.postProcesses[0].dispose();for(this._emptyTexture&&(this._releaseTexture(this._emptyTexture),this._emptyTexture=null),this._emptyCubeTexture&&(this._releaseTexture(this._emptyCubeTexture),this._emptyCubeTexture=null),this._rescalePostProcess&&this._rescalePostProcess.dispose();this.scenes.length;)this.scenes[0].dispose();1===M.Instances.length&&M.audioEngine&&M.audioEngine.dispose(),this.releaseEffects(),this.unbindAllAttributes(),this._boundUniforms=[],this._dummyFramebuffer&&this._gl.deleteFramebuffer(this._dummyFramebuffer),this.disableVR(),R.Tools.IsWindowObjectExist()&&(window.removeEventListener(\"blur\",this._onBlur),window.removeEventListener(\"focus\",this._onFocus),window.removeEventListener(\"vrdisplaypointerrestricted\",this._onVRDisplayPointerRestricted),window.removeEventListener(\"vrdisplaypointerunrestricted\",this._onVRDisplayPointerUnrestricted),this._renderingCanvas&&(this._renderingCanvas.removeEventListener(\"focus\",this._onCanvasFocus),this._renderingCanvas.removeEventListener(\"blur\",this._onCanvasBlur),this._renderingCanvas.removeEventListener(\"pointerout\",this._onCanvasPointerOut),this._doNotHandleContextLost||(this._renderingCanvas.removeEventListener(\"webglcontextlost\",this._onContextLost),this._renderingCanvas.removeEventListener(\"webglcontextrestored\",this._onContextRestored))),document.removeEventListener(\"fullscreenchange\",this._onFullscreenChange),document.removeEventListener(\"mozfullscreenchange\",this._onFullscreenChange),document.removeEventListener(\"webkitfullscreenchange\",this._onFullscreenChange),document.removeEventListener(\"msfullscreenchange\",this._onFullscreenChange),document.removeEventListener(\"pointerlockchange\",this._onPointerLockChange),document.removeEventListener(\"mspointerlockchange\",this._onPointerLockChange),document.removeEventListener(\"mozpointerlockchange\",this._onPointerLockChange),document.removeEventListener(\"webkitpointerlockchange\",this._onPointerLockChange),this._onVrDisplayConnect&&(window.removeEventListener(\"vrdisplayconnect\",this._onVrDisplayConnect),this._onVrDisplayDisconnect&&window.removeEventListener(\"vrdisplaydisconnect\",this._onVrDisplayDisconnect),this._onVrDisplayPresentChange&&window.removeEventListener(\"vrdisplaypresentchange\",this._onVrDisplayPresentChange),this._onVrDisplayConnect=null,this._onVrDisplayDisconnect=null));var e=M.Instances.indexOf(this);0<=e&&M.Instances.splice(e,1),this._workingCanvas=null,this._workingContext=null,this._currentBufferPointers=[],this._renderingCanvas=null,this._currentProgram=null,this._bindedRenderFunction=null,this.onResizeObservable.clear(),this.onCanvasBlurObservable.clear(),this.onCanvasFocusObservable.clear(),this.onCanvasPointerOutObservable.clear(),this.onBeginFrameObservable.clear(),this.onEndFrameObservable.clear(),R.Effect.ResetCache();for(var t=0,i=this._activeRequests;t<i.length;t++){i[t].abort()}},M.prototype.displayLoadingUI=function(){if(R.Tools.IsWindowObjectExist()){var e=this.loadingScreen;e&&e.displayLoadingUI()}},M.prototype.hideLoadingUI=function(){if(R.Tools.IsWindowObjectExist()){var e=this.loadingScreen;e&&e.hideLoadingUI()}},Object.defineProperty(M.prototype,\"loadingScreen\",{get:function(){return!this._loadingScreen&&R.DefaultLoadingScreen&&this._renderingCanvas&&(this._loadingScreen=new R.DefaultLoadingScreen(this._renderingCanvas)),this._loadingScreen},set:function(e){this._loadingScreen=e},enumerable:!0,configurable:!0}),Object.defineProperty(M.prototype,\"loadingUIText\",{set:function(e){this.loadingScreen.loadingUIText=e},enumerable:!0,configurable:!0}),Object.defineProperty(M.prototype,\"loadingUIBackgroundColor\",{set:function(e){this.loadingScreen.loadingUIBackgroundColor=e},enumerable:!0,configurable:!0}),M.prototype.attachContextLostEvent=function(e){this._renderingCanvas&&this._renderingCanvas.addEventListener(\"webglcontextlost\",e,!1)},M.prototype.attachContextRestoredEvent=function(e){this._renderingCanvas&&this._renderingCanvas.addEventListener(\"webglcontextrestored\",e,!1)},M.prototype.getVertexShaderSource=function(e){var t=this._gl.getAttachedShaders(e);return t?this._gl.getShaderSource(t[0]):null},M.prototype.getFragmentShaderSource=function(e){var t=this._gl.getAttachedShaders(e);return t?this._gl.getShaderSource(t[1]):null},M.prototype.getError=function(){return this._gl.getError()},M.prototype.getFps=function(){return this._fps},M.prototype.getDeltaTime=function(){return this._deltaTime},M.prototype._measureFps=function(){this._performanceMonitor.sampleFrame(),this._fps=this._performanceMonitor.averageFPS,this._deltaTime=this._performanceMonitor.instantaneousFrameTime||0},M.prototype._readTexturePixels=function(e,t,i,r,n,o){void 0===r&&(r=-1),void 0===n&&(n=0),void 0===o&&(o=null);var s=this._gl;if(!this._dummyFramebuffer){var a=s.createFramebuffer();if(!a)throw new Error(\"Unable to create dummy framebuffer\");this._dummyFramebuffer=a}s.bindFramebuffer(s.FRAMEBUFFER,this._dummyFramebuffer),-1<r?s.framebufferTexture2D(s.FRAMEBUFFER,s.COLOR_ATTACHMENT0,s.TEXTURE_CUBE_MAP_POSITIVE_X+r,e._webGLTexture,n):s.framebufferTexture2D(s.FRAMEBUFFER,s.COLOR_ATTACHMENT0,s.TEXTURE_2D,e._webGLTexture,n);var l=void 0!==e.type?this._getWebGLTextureType(e.type):s.UNSIGNED_BYTE;switch(l){case s.UNSIGNED_BYTE:o||(o=new Uint8Array(4*t*i)),l=s.UNSIGNED_BYTE;break;default:o||(o=new Float32Array(4*t*i)),l=s.FLOAT}return s.readPixels(0,0,t,i,s.RGBA,l,o),s.bindFramebuffer(s.FRAMEBUFFER,this._currentFramebuffer),o},M.prototype._canRenderToFloatFramebuffer=function(){return 1<this._webGLVersion?this._caps.colorBufferFloat:this._canRenderToFramebuffer(M.TEXTURETYPE_FLOAT)},M.prototype._canRenderToHalfFloatFramebuffer=function(){return 1<this._webGLVersion?this._caps.colorBufferFloat:this._canRenderToFramebuffer(M.TEXTURETYPE_HALF_FLOAT)},M.prototype._canRenderToFramebuffer=function(e){for(var t=this._gl;t.getError()!==t.NO_ERROR;);var i=!0,r=t.createTexture();t.bindTexture(t.TEXTURE_2D,r),t.texImage2D(t.TEXTURE_2D,0,this._getRGBABufferInternalSizedFormat(e),1,1,0,t.RGBA,this._getWebGLTextureType(e),null),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_MIN_FILTER,t.NEAREST),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_MAG_FILTER,t.NEAREST);var n=t.createFramebuffer();t.bindFramebuffer(t.FRAMEBUFFER,n),t.framebufferTexture2D(t.FRAMEBUFFER,t.COLOR_ATTACHMENT0,t.TEXTURE_2D,r,0);var o=t.checkFramebufferStatus(t.FRAMEBUFFER);if((i=(i=i&&o===t.FRAMEBUFFER_COMPLETE)&&t.getError()===t.NO_ERROR)&&(t.clear(t.COLOR_BUFFER_BIT),i=i&&t.getError()===t.NO_ERROR),i){t.bindFramebuffer(t.FRAMEBUFFER,null);var s=t.RGBA,a=t.UNSIGNED_BYTE,l=new Uint8Array(4);t.readPixels(0,0,1,1,s,a,l),i=i&&t.getError()===t.NO_ERROR}for(t.deleteTexture(r),t.deleteFramebuffer(n),t.bindFramebuffer(t.FRAMEBUFFER,null);!i&&t.getError()!==t.NO_ERROR;);return i},M.prototype._getWebGLTextureType=function(e){if(1===this._webGLVersion){switch(e){case M.TEXTURETYPE_FLOAT:return this._gl.FLOAT;case M.TEXTURETYPE_HALF_FLOAT:return this._gl.HALF_FLOAT_OES;case M.TEXTURETYPE_UNSIGNED_BYTE:return this._gl.UNSIGNED_BYTE}return this._gl.UNSIGNED_BYTE}switch(e){case M.TEXTURETYPE_BYTE:return this._gl.BYTE;case M.TEXTURETYPE_UNSIGNED_BYTE:return this._gl.UNSIGNED_BYTE;case M.TEXTURETYPE_SHORT:return this._gl.SHORT;case M.TEXTURETYPE_UNSIGNED_SHORT:return this._gl.UNSIGNED_SHORT;case M.TEXTURETYPE_INT:return this._gl.INT;case M.TEXTURETYPE_UNSIGNED_INTEGER:return this._gl.UNSIGNED_INT;case M.TEXTURETYPE_FLOAT:return this._gl.FLOAT;case M.TEXTURETYPE_HALF_FLOAT:return this._gl.HALF_FLOAT;case M.TEXTURETYPE_UNSIGNED_SHORT_4_4_4_4:return this._gl.UNSIGNED_SHORT_4_4_4_4;case M.TEXTURETYPE_UNSIGNED_SHORT_5_5_5_1:return this._gl.UNSIGNED_SHORT_5_5_5_1;case M.TEXTURETYPE_UNSIGNED_SHORT_5_6_5:return this._gl.UNSIGNED_SHORT_5_6_5;case M.TEXTURETYPE_UNSIGNED_INT_2_10_10_10_REV:return this._gl.UNSIGNED_INT_2_10_10_10_REV;case M.TEXTURETYPE_UNSIGNED_INT_24_8:return this._gl.UNSIGNED_INT_24_8;case M.TEXTURETYPE_UNSIGNED_INT_10F_11F_11F_REV:return this._gl.UNSIGNED_INT_10F_11F_11F_REV;case M.TEXTURETYPE_UNSIGNED_INT_5_9_9_9_REV:return this._gl.UNSIGNED_INT_5_9_9_9_REV;case M.TEXTURETYPE_FLOAT_32_UNSIGNED_INT_24_8_REV:return this._gl.FLOAT_32_UNSIGNED_INT_24_8_REV}return this._gl.UNSIGNED_BYTE},M.prototype._getInternalFormat=function(e){var t=this._gl.RGBA;switch(e){case M.TEXTUREFORMAT_ALPHA:t=this._gl.ALPHA;break;case M.TEXTUREFORMAT_LUMINANCE:t=this._gl.LUMINANCE;break;case M.TEXTUREFORMAT_LUMINANCE_ALPHA:t=this._gl.LUMINANCE_ALPHA;break;case M.TEXTUREFORMAT_RED:t=this._gl.RED;break;case M.TEXTUREFORMAT_RG:t=this._gl.RG;break;case M.TEXTUREFORMAT_RGB:t=this._gl.RGB;break;case M.TEXTUREFORMAT_RGBA:t=this._gl.RGBA}if(1<this._webGLVersion)switch(e){case M.TEXTUREFORMAT_RED_INTEGER:t=this._gl.RED_INTEGER;break;case M.TEXTUREFORMAT_RG_INTEGER:t=this._gl.RG_INTEGER;break;case M.TEXTUREFORMAT_RGB_INTEGER:t=this._gl.RGB_INTEGER;break;case M.TEXTUREFORMAT_RGBA_INTEGER:t=this._gl.RGBA_INTEGER}return t},M.prototype._getRGBABufferInternalSizedFormat=function(e,t){if(1===this._webGLVersion){if(void 0!==t)switch(t){case M.TEXTUREFORMAT_ALPHA:return this._gl.ALPHA;case M.TEXTUREFORMAT_LUMINANCE:return this._gl.LUMINANCE;case M.TEXTUREFORMAT_LUMINANCE_ALPHA:return this._gl.LUMINANCE_ALPHA}return this._gl.RGBA}switch(e){case M.TEXTURETYPE_BYTE:switch(t){case M.TEXTUREFORMAT_RED:return this._gl.R8_SNORM;case M.TEXTUREFORMAT_RG:return this._gl.RG8_SNORM;case M.TEXTUREFORMAT_RGB:return this._gl.RGB8_SNORM;case M.TEXTUREFORMAT_RED_INTEGER:return this._gl.R8I;case M.TEXTUREFORMAT_RG_INTEGER:return this._gl.RG8I;case M.TEXTUREFORMAT_RGB_INTEGER:return this._gl.RGB8I;case M.TEXTUREFORMAT_RGBA_INTEGER:return this._gl.RGBA8I;default:return this._gl.RGBA8_SNORM}case M.TEXTURETYPE_UNSIGNED_BYTE:switch(t){case M.TEXTUREFORMAT_RED:return this._gl.R8;case M.TEXTUREFORMAT_RG:return this._gl.RG8;case M.TEXTUREFORMAT_RGB:return this._gl.RGB8;case M.TEXTUREFORMAT_RGBA:return this._gl.RGBA8;case M.TEXTUREFORMAT_RED_INTEGER:return this._gl.R8UI;case M.TEXTUREFORMAT_RG_INTEGER:return this._gl.RG8UI;case M.TEXTUREFORMAT_RGB_INTEGER:return this._gl.RGB8UI;case M.TEXTUREFORMAT_RGBA_INTEGER:return this._gl.RGBA8UI;default:return this._gl.RGBA8}case M.TEXTURETYPE_SHORT:switch(t){case M.TEXTUREFORMAT_RED_INTEGER:return this._gl.R16I;case M.TEXTUREFORMAT_RG_INTEGER:return this._gl.RG16I;case M.TEXTUREFORMAT_RGB_INTEGER:return this._gl.RGB16I;case M.TEXTUREFORMAT_RGBA_INTEGER:default:return this._gl.RGBA16I}case M.TEXTURETYPE_UNSIGNED_SHORT:switch(t){case M.TEXTUREFORMAT_RED_INTEGER:return this._gl.R16UI;case M.TEXTUREFORMAT_RG_INTEGER:return this._gl.RG16UI;case M.TEXTUREFORMAT_RGB_INTEGER:return this._gl.RGB16UI;case M.TEXTUREFORMAT_RGBA_INTEGER:default:return this._gl.RGBA16UI}case M.TEXTURETYPE_INT:switch(t){case M.TEXTUREFORMAT_RED_INTEGER:return this._gl.R32I;case M.TEXTUREFORMAT_RG_INTEGER:return this._gl.RG32I;case M.TEXTUREFORMAT_RGB_INTEGER:return this._gl.RGB32I;case M.TEXTUREFORMAT_RGBA_INTEGER:default:return this._gl.RGBA32I}case M.TEXTURETYPE_UNSIGNED_INTEGER:switch(t){case M.TEXTUREFORMAT_RED_INTEGER:return this._gl.R32UI;case M.TEXTUREFORMAT_RG_INTEGER:return this._gl.RG32UI;case M.TEXTUREFORMAT_RGB_INTEGER:return this._gl.RGB32UI;case M.TEXTUREFORMAT_RGBA_INTEGER:default:return this._gl.RGBA32UI}case M.TEXTURETYPE_FLOAT:switch(t){case M.TEXTUREFORMAT_RED:return this._gl.R32F;case M.TEXTUREFORMAT_RG:return this._gl.RG32F;case M.TEXTUREFORMAT_RGB:return this._gl.RGB32F;case M.TEXTUREFORMAT_RGBA:default:return this._gl.RGBA32F}case M.TEXTURETYPE_HALF_FLOAT:switch(t){case M.TEXTUREFORMAT_RED:return this._gl.R16F;case M.TEXTUREFORMAT_RG:return this._gl.RG16F;case M.TEXTUREFORMAT_RGB:return this._gl.RGB16F;case M.TEXTUREFORMAT_RGBA:default:return this._gl.RGBA16F}case M.TEXTURETYPE_UNSIGNED_SHORT_5_6_5:return this._gl.RGB565;case M.TEXTURETYPE_UNSIGNED_INT_10F_11F_11F_REV:return this._gl.R11F_G11F_B10F;case M.TEXTURETYPE_UNSIGNED_INT_5_9_9_9_REV:return this._gl.RGB9_E5;case M.TEXTURETYPE_UNSIGNED_SHORT_4_4_4_4:return this._gl.RGBA4;case M.TEXTURETYPE_UNSIGNED_SHORT_5_5_5_1:return this._gl.RGB5_A1;case M.TEXTURETYPE_UNSIGNED_INT_2_10_10_10_REV:switch(t){case M.TEXTUREFORMAT_RGBA:return this._gl.RGB10_A2;case M.TEXTUREFORMAT_RGBA_INTEGER:return this._gl.RGB10_A2UI;default:return this._gl.RGB10_A2}}return this._gl.RGBA8},M.prototype._getRGBAMultiSampleBufferFormat=function(e){return e===M.TEXTURETYPE_FLOAT?this._gl.RGBA32F:e===M.TEXTURETYPE_HALF_FLOAT?this._gl.RGBA16F:this._gl.RGBA8},M.prototype._loadFile=function(e,t,i,r,n,o){var s=this,a=R.Tools.LoadFile(e,t,i,r,n,o);return this._activeRequests.push(a),a.onCompleteObservable.add((function(e){s._activeRequests.splice(s._activeRequests.indexOf(e),1)})),a},M.prototype._loadFileAsync=function(e,r,n){var o=this;return new Promise(function(t,i){o._loadFile(e,(function(e){t(e)}),void 0,r,n,(function(e,t){i(t)}))})},M.prototype._partialLoadFile=function(e,t,i,r,n,o){void 0===o&&(o=null);this._loadFile(e,(function(e){i[t]=e,i._internalCount++,6===i._internalCount&&n(i)}),void 0,void 0,!0,(function(e,t){o&&e&&o(e.status+\" \"+e.statusText,t)}))},M.prototype._cascadeLoadFiles=function(e,t,i,r){void 0===r&&(r=null);for(var n=[],o=n._internalCount=0;o<6;o++)this._partialLoadFile(i[o],o,n,e,t,r)},M.isSupported=function(){try{var e=document.createElement(\"canvas\");return null!=(e.getContext(\"webgl\")||e.getContext(\"experimental-webgl\"))&&!!window.WebGLRenderingContext}catch(e){return!1}},M.ExceptionList=[{key:\"Chrome/63.0\",capture:\"63\\\\.0\\\\.3239\\\\.(\\\\d+)\",captureConstraint:108,targets:[\"uniformBuffer\"]},{key:\"Firefox/58\",capture:null,captureConstraint:null,targets:[\"uniformBuffer\"]},{key:\"Firefox/59\",capture:null,captureConstraint:null,targets:[\"uniformBuffer\"]},{key:\"Macintosh\",capture:null,captureConstraint:null,targets:[\"textureBindingOptimization\"]},{key:\"iPhone\",capture:null,captureConstraint:null,targets:[\"textureBindingOptimization\"]},{key:\"iPad\",capture:null,captureConstraint:null,targets:[\"textureBindingOptimization\"]}],M.Instances=new Array,M._TextureLoaders=[],M.ALPHA_DISABLE=0,M.ALPHA_ADD=1,M.ALPHA_COMBINE=2,M.ALPHA_SUBTRACT=3,M.ALPHA_MULTIPLY=4,M.ALPHA_MAXIMIZED=5,M.ALPHA_ONEONE=6,M.ALPHA_PREMULTIPLIED=7,M.ALPHA_PREMULTIPLIED_PORTERDUFF=8,M.ALPHA_INTERPOLATE=9,M.ALPHA_SCREENMODE=10,M.DELAYLOADSTATE_NONE=0,M.DELAYLOADSTATE_LOADED=1,M.DELAYLOADSTATE_LOADING=2,M.DELAYLOADSTATE_NOTLOADED=4,M.NEVER=512,M.ALWAYS=519,M.LESS=513,M.EQUAL=514,M.LEQUAL=515,M.GREATER=516,M.GEQUAL=518,M.NOTEQUAL=517,M.KEEP=7680,M.REPLACE=7681,M.INCR=7682,M.DECR=7683,M.INVERT=5386,M.INCR_WRAP=34055,M.DECR_WRAP=34056,M.TEXTURE_CLAMP_ADDRESSMODE=0,M.TEXTURE_WRAP_ADDRESSMODE=1,M.TEXTURE_MIRROR_ADDRESSMODE=2,M.TEXTUREFORMAT_ALPHA=0,M.TEXTUREFORMAT_LUMINANCE=1,M.TEXTUREFORMAT_LUMINANCE_ALPHA=2,M.TEXTUREFORMAT_RGB=4,M.TEXTUREFORMAT_RGBA=5,M.TEXTUREFORMAT_RED=6,M.TEXTUREFORMAT_R=6,M.TEXTUREFORMAT_RG=7,M.TEXTUREFORMAT_RED_INTEGER=8,M.TEXTUREFORMAT_R_INTEGER=8,M.TEXTUREFORMAT_RG_INTEGER=9,M.TEXTUREFORMAT_RGB_INTEGER=10,M.TEXTUREFORMAT_RGBA_INTEGER=11,M.TEXTURETYPE_UNSIGNED_BYTE=0,M.TEXTURETYPE_UNSIGNED_INT=0,M.TEXTURETYPE_FLOAT=1,M.TEXTURETYPE_HALF_FLOAT=2,M.TEXTURETYPE_BYTE=3,M.TEXTURETYPE_SHORT=4,M.TEXTURETYPE_UNSIGNED_SHORT=5,M.TEXTURETYPE_INT=6,M.TEXTURETYPE_UNSIGNED_INTEGER=7,M.TEXTURETYPE_UNSIGNED_SHORT_4_4_4_4=8,M.TEXTURETYPE_UNSIGNED_SHORT_5_5_5_1=9,M.TEXTURETYPE_UNSIGNED_SHORT_5_6_5=10,M.TEXTURETYPE_UNSIGNED_INT_2_10_10_10_REV=11,M.TEXTURETYPE_UNSIGNED_INT_24_8=12,M.TEXTURETYPE_UNSIGNED_INT_10F_11F_11F_REV=13,M.TEXTURETYPE_UNSIGNED_INT_5_9_9_9_REV=14,M.TEXTURETYPE_FLOAT_32_UNSIGNED_INT_24_8_REV=15,M.TEXTURE_NEAREST_SAMPLINGMODE=1,M.TEXTURE_BILINEAR_SAMPLINGMODE=2,M.TEXTURE_TRILINEAR_SAMPLINGMODE=3,M.TEXTURE_NEAREST_NEAREST_MIPLINEAR=1,M.TEXTURE_LINEAR_LINEAR_MIPNEAREST=2,M.TEXTURE_LINEAR_LINEAR_MIPLINEAR=3,M.TEXTURE_NEAREST_NEAREST_MIPNEAREST=4,M.TEXTURE_NEAREST_LINEAR_MIPNEAREST=5,M.TEXTURE_NEAREST_LINEAR_MIPLINEAR=6,M.TEXTURE_NEAREST_LINEAR=7,M.TEXTURE_NEAREST_NEAREST=8,M.TEXTURE_LINEAR_NEAREST_MIPNEAREST=9,M.TEXTURE_LINEAR_NEAREST_MIPLINEAR=10,M.TEXTURE_LINEAR_LINEAR=11,M.TEXTURE_LINEAR_NEAREST=12,M.TEXTURE_EXPLICIT_MODE=0,M.TEXTURE_SPHERICAL_MODE=1,M.TEXTURE_PLANAR_MODE=2,M.TEXTURE_CUBIC_MODE=3,M.TEXTURE_PROJECTION_MODE=4,M.TEXTURE_SKYBOX_MODE=5,M.TEXTURE_INVCUBIC_MODE=6,M.TEXTURE_EQUIRECTANGULAR_MODE=7,M.TEXTURE_FIXED_EQUIRECTANGULAR_MODE=8,M.TEXTURE_FIXED_EQUIRECTANGULAR_MIRRORED_MODE=9,M.SCALEMODE_FLOOR=1,M.SCALEMODE_NEAREST=2,M.SCALEMODE_CEILING=3,M.CollisionsEpsilon=.001,M.CodeRepository=\"src/\",M.ShadersRepository=\"src/Shaders/\",M})();R.Engine=i})($a||($a={})),y=$a||($a={}),E=(function(){function e(e,t){void 0===t&&(t=null),this.state=\"\",this.metadata=null,this.doNotSerialize=!1,this._isDisposed=!1,this.animations=new Array,this._ranges={},this._isEnabled=!0,this._isParentEnabled=!0,this._isReady=!0,this._currentRenderId=-1,this._parentRenderId=-1,this._childRenderId=-1,this._worldMatrix=y.Matrix.Identity(),this._worldMatrixDeterminant=0,this._sceneRootNodesIndex=-1,this._animationPropertiesOverride=null,this.onDisposeObservable=new y.Observable,this._behaviors=new Array,this.name=e,this.id=e,this._scene=t||y.Engine.LastCreatedScene,this.uniqueId=this._scene.getUniqueId(),this._initCache(),this.addToSceneRootNodes()}return e.AddNodeConstructor=function(e,t){this._NodeConstructors[e]=t},e.Construct=function(e,t,i,r){var n=this._NodeConstructors[e];return n?n(t,i,r):null},e.prototype.isDisposed=function(){return this._isDisposed},Object.defineProperty(e.prototype,\"parent\",{get:function(){return this._parentNode},set:function(e){if(this._parentNode!==e){var t=this._parentNode;if(this._parentNode&&void 0!==this._parentNode._children&&null!==this._parentNode._children){var i=this._parentNode._children.indexOf(this);-1!==i&&this._parentNode._children.splice(i,1),e||this.addToSceneRootNodes()}this._parentNode=e,this._parentNode&&(void 0!==this._parentNode._children&&null!==this._parentNode._children||(this._parentNode._children=new Array),this._parentNode._children.push(this),t||this.removeFromSceneRootNodes()),this._syncParentEnabledState()}},enumerable:!0,configurable:!0}),e.prototype.addToSceneRootNodes=function(){-1===this._sceneRootNodesIndex&&(this._sceneRootNodesIndex=this._scene.rootNodes.length,this._scene.rootNodes.push(this))},e.prototype.removeFromSceneRootNodes=function(){if(-1!==this._sceneRootNodesIndex){var e=this._scene.rootNodes,t=e.length-1;e[this._sceneRootNodesIndex]=e[t],e[this._sceneRootNodesIndex]._sceneRootNodesIndex=this._sceneRootNodesIndex,this._scene.rootNodes.pop(),this._sceneRootNodesIndex=-1}},Object.defineProperty(e.prototype,\"animationPropertiesOverride\",{get:function(){return this._animationPropertiesOverride?this._animationPropertiesOverride:this._scene.animationPropertiesOverride},set:function(e){this._animationPropertiesOverride=e},enumerable:!0,configurable:!0}),e.prototype.getClassName=function(){return\"Node\"},Object.defineProperty(e.prototype,\"onDispose\",{set:function(e){this._onDisposeObserver&&this.onDisposeObservable.remove(this._onDisposeObserver),this._onDisposeObserver=this.onDisposeObservable.add(e)},enumerable:!0,configurable:!0}),e.prototype.getScene=function(){return this._scene},e.prototype.getEngine=function(){return this._scene.getEngine()},e.prototype.addBehavior=function(e,t){var i=this;return void 0===t&&(t=!1),-1!==this._behaviors.indexOf(e)||(e.init(),this._scene.isLoading&&!t?this._scene.onDataLoadedObservable.addOnce((function(){e.attach(i)})):e.attach(this),this._behaviors.push(e)),this},e.prototype.removeBehavior=function(e){var t=this._behaviors.indexOf(e);return-1===t||(this._behaviors[t].detach(),this._behaviors.splice(t,1)),this},Object.defineProperty(e.prototype,\"behaviors\",{get:function(){return this._behaviors},enumerable:!0,configurable:!0}),e.prototype.getBehaviorByName=function(e){for(var t=0,i=this._behaviors;t<i.length;t++){var r=i[t];if(r.name===e)return r}return null},e.prototype.getWorldMatrix=function(){return this._currentRenderId!==this._scene.getRenderId()&&this.computeWorldMatrix(),this._worldMatrix},e.prototype._getWorldMatrixDeterminant=function(){return this._worldMatrixDeterminant},Object.defineProperty(e.prototype,\"worldMatrixFromCache\",{get:function(){return this._worldMatrix},enumerable:!0,configurable:!0}),e.prototype._initCache=function(){this._cache={},this._cache.parent=void 0},e.prototype.updateCache=function(e){!e&&this.isSynchronized()||(this._cache.parent=this.parent,this._updateCache())},e.prototype._updateCache=function(e){},e.prototype._isSynchronized=function(){return!0},e.prototype._markSyncedWithParent=function(){this._parentNode&&(this._parentRenderId=this._parentNode._childRenderId)},e.prototype.isSynchronizedWithParent=function(){return!this._parentNode||this._parentRenderId===this._parentNode._childRenderId&&this._parentNode.isSynchronized()},e.prototype.isSynchronized=function(){return this._cache.parent!=this._parentNode?(this._cache.parent=this._parentNode,!1):!(this._parentNode&&!this.isSynchronizedWithParent())&&this._isSynchronized()},e.prototype.isReady=function(e){return void 0===e&&(e=!1),this._isReady},e.prototype.isEnabled=function(e){return void 0===e&&(e=!0),!1===e?this._isEnabled:!!this._isEnabled&&this._isParentEnabled},e.prototype._syncParentEnabledState=function(){this._isParentEnabled=!this._parentNode||this._parentNode.isEnabled(),this._children&&this._children.forEach((function(e){e._syncParentEnabledState()}))},e.prototype.setEnabled=function(e){this._isEnabled=e,this._syncParentEnabledState()},e.prototype.isDescendantOf=function(e){return!!this.parent&&(this.parent===e||this.parent.isDescendantOf(e))},e.prototype._getDescendants=function(e,t,i){if(void 0===t&&(t=!1),this._children)for(var r=0;r<this._children.length;r++){var n=this._children[r];i&&!i(n)||e.push(n),t||n._getDescendants(e,!1,i)}},e.prototype.getDescendants=function(e,t){var i=new Array;return this._getDescendants(i,e,t),i},e.prototype.getChildMeshes=function(e,t){var i=[];return this._getDescendants(i,e,(function(e){return(!t||t(e))&&e instanceof y.AbstractMesh})),i},e.prototype.getChildTransformNodes=function(e,t){var i=[];return this._getDescendants(i,e,(function(e){return(!t||t(e))&&e instanceof y.TransformNode})),i},e.prototype.getChildren=function(e){return this.getDescendants(!0,e)},e.prototype._setReady=function(e){e!==this._isReady&&(e?(this.onReady&&this.onReady(this),this._isReady=!0):this._isReady=!1)},e.prototype.getAnimationByName=function(e){for(var t=0;t<this.animations.length;t++){var i=this.animations[t];if(i.name===e)return i}return null},e.prototype.createAnimationRange=function(e,t,i){if(!this._ranges[e]){this._ranges[e]=new y.AnimationRange(e,t,i);for(var r=0,n=this.animations.length;r<n;r++)this.animations[r]&&this.animations[r].createRange(e,t,i)}},e.prototype.deleteAnimationRange=function(e,t){void 0===t&&(t=!0);for(var i=0,r=this.animations.length;i<r;i++)this.animations[i]&&this.animations[i].deleteRange(e,t);this._ranges[e]=null},e.prototype.getAnimationRange=function(e){return this._ranges[e]},e.prototype.beginAnimation=function(e,t,i,r){var n=this.getAnimationRange(e);return n?this._scene.beginAnimation(this,n.from,n.to,t,i,r):null},e.prototype.serializeAnimationRanges=function(){var e=[];for(var t in this._ranges){var i=this._ranges[t];if(i){var r={};r.name=t,r.from=i.from,r.to=i.to,e.push(r)}}return e},e.prototype.computeWorldMatrix=function(e){return this._worldMatrix||(this._worldMatrix=y.Matrix.Identity()),this._worldMatrix},e.prototype.dispose=function(e,t){if(void 0===t&&(t=!1),e)for(var i=0,r=this.getChildTransformNodes(!0);i<r.length;i++){var n=r[i];n.parent=null,n.computeWorldMatrix(!0)}else for(var o=0,s=this.getDescendants(!0);o<s.length;o++){s[o].dispose(e,t)}this.parent?this.parent=null:this.removeFromSceneRootNodes(),this.onDisposeObservable.notifyObservers(this),this.onDisposeObservable.clear();for(var a=0,l=this._behaviors;a<l.length;a++){l[a].detach()}this._behaviors=[],this._isDisposed=!0},e.ParseAnimationRanges=function(e,t,i){if(t.ranges)for(var r=0;r<t.ranges.length;r++){var n=t.ranges[r];e.createAnimationRange(n.name,n.from,n.to)}},e._NodeConstructors={},b([y.serialize()],e.prototype,\"name\",void 0),b([y.serialize()],e.prototype,\"id\",void 0),b([y.serialize()],e.prototype,\"uniqueId\",void 0),b([y.serialize()],e.prototype,\"state\",void 0),b([y.serialize()],e.prototype,\"metadata\",void 0),e})(),y.Node=E,x=$a||($a={}),P=x.Matrix.Identity(),A=(function(){function e(e,t){this.center=x.Vector3.Zero(),this.centerWorld=x.Vector3.Zero(),this.minimum=x.Vector3.Zero(),this.maximum=x.Vector3.Zero(),this.reConstruct(e,t)}return e.prototype.reConstruct=function(e,t){this.minimum.copyFrom(e),this.maximum.copyFrom(t);var i=x.Vector3.Distance(e,t);x.Vector3.LerpToRef(e,t,.5,this.center),this.radius=.5*i,this.centerWorld.set(0,0,0),this._update(P)},e.prototype.scale=function(e){var t=this.radius*e,i=x.Tmp.Vector3[0].set(t,t,t),r=x.Tmp.Vector3[1].copyFrom(this.center).subtractInPlace(i),n=x.Tmp.Vector3[2].copyFrom(this.center).addInPlace(i);return this.reConstruct(r,n),this},e.prototype._update=function(e){x.Vector3.TransformCoordinatesToRef(this.center,e,this.centerWorld);var t=x.Tmp.Vector3[0];x.Vector3.TransformNormalFromFloatsToRef(1,1,1,e,t),this.radiusWorld=Math.max(Math.abs(t.x),Math.abs(t.y),Math.abs(t.z))*this.radius},e.prototype.isInFrustum=function(e){for(var t=0;t<6;t++)if(e[t].dotCoordinate(this.centerWorld)<=-this.radiusWorld)return!1;return!0},e.prototype.intersectsPoint=function(e){var t=this.centerWorld.x-e.x,i=this.centerWorld.y-e.y,r=this.centerWorld.z-e.z,n=Math.sqrt(t*t+i*i+r*r);return!(this.radiusWorld<n)},e.Intersects=function(e,t){var i=e.centerWorld.x-t.centerWorld.x,r=e.centerWorld.y-t.centerWorld.y,n=e.centerWorld.z-t.centerWorld.z,o=Math.sqrt(i*i+r*r+n*n);return!(e.radiusWorld+t.radiusWorld<o)},e})(),x.BoundingSphere=A,S=$a||($a={}),M=(function(){function t(e,t){this.vectors=[S.Vector3.Zero(),S.Vector3.Zero(),S.Vector3.Zero(),S.Vector3.Zero(),S.Vector3.Zero(),S.Vector3.Zero(),S.Vector3.Zero(),S.Vector3.Zero()],this.center=S.Vector3.Zero(),this.centerWorld=S.Vector3.Zero(),this.extendSize=S.Vector3.Zero(),this.extendSizeWorld=S.Vector3.Zero(),this.directions=[S.Vector3.Zero(),S.Vector3.Zero(),S.Vector3.Zero()],this.vectorsWorld=[S.Vector3.Zero(),S.Vector3.Zero(),S.Vector3.Zero(),S.Vector3.Zero(),S.Vector3.Zero(),S.Vector3.Zero(),S.Vector3.Zero(),S.Vector3.Zero()],this.minimumWorld=S.Vector3.Zero(),this.maximumWorld=S.Vector3.Zero(),this.minimum=S.Vector3.Zero(),this.maximum=S.Vector3.Zero(),this.reConstruct(e,t)}return t.prototype.reConstruct=function(e,t){this.minimum.copyFrom(e),this.maximum.copyFrom(t),this.vectors[0].copyFrom(this.minimum),this.vectors[1].copyFrom(this.maximum),this.vectors[2].copyFrom(this.minimum),this.vectors[3].copyFrom(this.minimum),this.vectors[4].copyFrom(this.minimum),this.vectors[5].copyFrom(this.maximum),this.vectors[6].copyFrom(this.maximum),this.vectors[7].copyFrom(this.maximum),this.vectors[2].x=this.maximum.x,this.vectors[3].y=this.maximum.y,this.vectors[4].z=this.maximum.z,this.vectors[5].z=this.minimum.z,this.vectors[6].x=this.minimum.x,this.vectors[7].y=this.minimum.y,this.center.copyFrom(this.maximum).addInPlace(this.minimum).scaleInPlace(.5),this.extendSize.copyFrom(this.maximum).subtractInPlace(this.minimum).scaleInPlace(.5);for(var i=0;i<3;i++)this.directions[i].copyFromFloats(0,0,0);for(i=0;i<8;i++)this.vectorsWorld[i].copyFromFloats(0,0,0);this.minimumWorld.copyFromFloats(0,0,0),this.maximumWorld.copyFromFloats(0,0,0),this.centerWorld.copyFromFloats(0,0,0),this.extendSizeWorld.copyFromFloats(0,0,0),this._update(this._worldMatrix||S.Matrix.Identity())},t.prototype.scale=function(e){var t=S.Tmp.Vector3[0].copyFrom(this.maximum).subtractInPlace(this.minimum),i=t.length()*e;t.normalize();var r=t.scaleInPlace(.5*i),n=S.Tmp.Vector3[1].copyFrom(this.center).subtractInPlace(r),o=S.Tmp.Vector3[2].copyFrom(this.center).addInPlace(r);return this.reConstruct(n,o),this},t.prototype.getWorldMatrix=function(){return this._worldMatrix},t.prototype.setWorldMatrix=function(e){return this._worldMatrix.copyFrom(e),this},t.prototype._update=function(e){S.Vector3.FromFloatsToRef(Number.MAX_VALUE,Number.MAX_VALUE,Number.MAX_VALUE,this.minimumWorld),S.Vector3.FromFloatsToRef(-Number.MAX_VALUE,-Number.MAX_VALUE,-Number.MAX_VALUE,this.maximumWorld);for(var t=0;t<8;t++){var i=this.vectorsWorld[t];S.Vector3.TransformCoordinatesToRef(this.vectors[t],e,i),this.minimumWorld.minimizeInPlace(i),this.maximumWorld.maximizeInPlace(i)}this.maximumWorld.subtractToRef(this.minimumWorld,this.extendSizeWorld),this.extendSizeWorld.scaleInPlace(.5),this.maximumWorld.addToRef(this.minimumWorld,this.centerWorld),this.centerWorld.scaleInPlace(.5),S.Vector3.FromFloatArrayToRef(e.m,0,this.directions[0]),S.Vector3.FromFloatArrayToRef(e.m,4,this.directions[1]),S.Vector3.FromFloatArrayToRef(e.m,8,this.directions[2]),this._worldMatrix=e},t.prototype.isInFrustum=function(e){return t.IsInFrustum(this.vectorsWorld,e)},t.prototype.isCompletelyInFrustum=function(e){return t.IsCompletelyInFrustum(this.vectorsWorld,e)},t.prototype.intersectsPoint=function(e){var t=-S.Epsilon;return!(this.maximumWorld.x-e.x<t||t>e.x-this.minimumWorld.x)&&(!(this.maximumWorld.y-e.y<t||t>e.y-this.minimumWorld.y)&&!(this.maximumWorld.z-e.z<t||t>e.z-this.minimumWorld.z))},t.prototype.intersectsSphere=function(e){return t.IntersectsSphere(this.minimumWorld,this.maximumWorld,e.centerWorld,e.radiusWorld)},t.prototype.intersectsMinMax=function(e,t){return!(this.maximumWorld.x<e.x||this.minimumWorld.x>t.x)&&(!(this.maximumWorld.y<e.y||this.minimumWorld.y>t.y)&&!(this.maximumWorld.z<e.z||this.minimumWorld.z>t.z))},t.Intersects=function(e,t){return!(e.maximumWorld.x<t.minimumWorld.x||e.minimumWorld.x>t.maximumWorld.x)&&(!(e.maximumWorld.y<t.minimumWorld.y||e.minimumWorld.y>t.maximumWorld.y)&&!(e.maximumWorld.z<t.minimumWorld.z||e.minimumWorld.z>t.maximumWorld.z))},t.IntersectsSphere=function(e,t,i,r){var n=S.Vector3.Clamp(i,e,t);return S.Vector3.DistanceSquared(i,n)<=r*r},t.IsCompletelyInFrustum=function(e,t){for(var i=0;i<6;i++)for(var r=0;r<8;r++)if(t[i].dotCoordinate(e[r])<0)return!1;return!0},t.IsInFrustum=function(e,t){for(var i=0;i<6;i++){for(var r=8,n=0;n<8&&t[i].dotCoordinate(e[n])<0;n++)--r;if(0===r)return!1}return!0},t})(),S.BoundingBox=M,R=$a||($a={}),C=function(e,t){var i=R.Vector3.Dot(t.centerWorld,e),r=Math.abs(R.Vector3.Dot(t.directions[0],e))*t.extendSize.x+Math.abs(R.Vector3.Dot(t.directions[1],e))*t.extendSize.y+Math.abs(R.Vector3.Dot(t.directions[2],e))*t.extendSize.z;return{min:i-r,max:i+r}},O=function(e,t,i){var r,n,o,s=C(e,t),a=C(e,i);return r=s.min,n=s.max,o=a.min,!(a.max<r||n<o)},D=(function(){function e(e,t){this._isLocked=!1,this.boundingBox=new R.BoundingBox(e,t),this.boundingSphere=new R.BoundingSphere(e,t)}return Object.defineProperty(e.prototype,\"minimum\",{get:function(){return this.boundingBox.minimum},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,\"maximum\",{get:function(){return this.boundingBox.maximum},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,\"isLocked\",{get:function(){return this._isLocked},set:function(e){this._isLocked=e},enumerable:!0,configurable:!0}),e.prototype.update=function(e){this._isLocked||(this.boundingBox._update(e),this.boundingSphere._update(e))},e.prototype.centerOn=function(e,t){var i=R.Tmp.Vector3[0].copyFrom(e).subtractInPlace(t),r=R.Tmp.Vector3[1].copyFrom(e).addInPlace(t);return this.boundingBox.reConstruct(i,r),this.boundingSphere.reConstruct(i,r),this},e.prototype.scale=function(e){return this.boundingBox.scale(e),this.boundingSphere.scale(e),this},e.prototype.isInFrustum=function(e,t){return void 0===t&&(t=R.AbstractMesh.CULLINGSTRATEGY_STANDARD),!!this.boundingSphere.isInFrustum(e)&&(t===R.AbstractMesh.CULLINGSTRATEGY_BOUNDINGSPHERE_ONLY||this.boundingBox.isInFrustum(e))},Object.defineProperty(e.prototype,\"diagonalLength\",{get:function(){var e=this.boundingBox;return e.maximumWorld.subtract(e.minimumWorld).length()},enumerable:!0,configurable:!0}),e.prototype.isCompletelyInFrustum=function(e){return this.boundingBox.isCompletelyInFrustum(e)},e.prototype._checkCollision=function(e){return e._canDoCollision(this.boundingSphere.centerWorld,this.boundingSphere.radiusWorld,this.boundingBox.minimumWorld,this.boundingBox.maximumWorld)},e.prototype.intersectsPoint=function(e){return!!this.boundingSphere.centerWorld&&(!!this.boundingSphere.intersectsPoint(e)&&!!this.boundingBox.intersectsPoint(e))},e.prototype.intersects=function(e,t){if(!this.boundingSphere.centerWorld||!e.boundingSphere.centerWorld)return!1;if(!R.BoundingSphere.Intersects(this.boundingSphere,e.boundingSphere))return!1;if(!R.BoundingBox.Intersects(this.boundingBox,e.boundingBox))return!1;if(!t)return!0;var i=this.boundingBox,r=e.boundingBox;return!!O(i.directions[0],i,r)&&(!!O(i.directions[1],i,r)&&(!!O(i.directions[2],i,r)&&(!!O(r.directions[0],i,r)&&(!!O(r.directions[1],i,r)&&(!!O(r.directions[2],i,r)&&(!!O(R.Vector3.Cross(i.directions[0],r.directions[0]),i,r)&&(!!O(R.Vector3.Cross(i.directions[0],r.directions[1]),i,r)&&(!!O(R.Vector3.Cross(i.directions[0],r.directions[2]),i,r)&&(!!O(R.Vector3.Cross(i.directions[1],r.directions[0]),i,r)&&(!!O(R.Vector3.Cross(i.directions[1],r.directions[1]),i,r)&&(!!O(R.Vector3.Cross(i.directions[1],r.directions[2]),i,r)&&(!!O(R.Vector3.Cross(i.directions[2],r.directions[0]),i,r)&&(!!O(R.Vector3.Cross(i.directions[2],r.directions[1]),i,r)&&!!O(R.Vector3.Cross(i.directions[2],r.directions[2]),i,r))))))))))))))},e})(),R.BoundingInfo=D,I=$a||($a={}),w=(function(n){function h(e,t,i){void 0===t&&(t=null),void 0===i&&(i=!0);var r=n.call(this,e,t)||this;return r._forward=new I.Vector3(0,0,1),r._forwardInverted=new I.Vector3(0,0,-1),r._up=new I.Vector3(0,1,0),r._right=new I.Vector3(1,0,0),r._rightInverted=new I.Vector3(-1,0,0),r._position=I.Vector3.Zero(),r._rotation=I.Vector3.Zero(),r._scaling=I.Vector3.One(),r._isDirty=!1,r.billboardMode=h.BILLBOARDMODE_NONE,r.scalingDeterminant=1,r.infiniteDistance=!1,r.ignoreNonUniformScaling=!1,r._localWorld=I.Matrix.Zero(),r._absolutePosition=I.Vector3.Zero(),r._pivotMatrix=I.Matrix.Identity(),r._postMultiplyPivotMatrix=!1,r._isWorldMatrixFrozen=!1,r.onAfterWorldMatrixUpdateObservable=new I.Observable,r._nonUniformScaling=!1,i&&r.getScene().addTransformNode(r),r}return T(h,n),h.prototype.getClassName=function(){return\"TransformNode\"},Object.defineProperty(h.prototype,\"position\",{get:function(){return this._position},set:function(e){this._position=e,this._isDirty=!0},enumerable:!0,configurable:!0}),Object.defineProperty(h.prototype,\"rotation\",{get:function(){return this._rotation},set:function(e){this._rotation=e,this._isDirty=!0},enumerable:!0,configurable:!0}),Object.defineProperty(h.prototype,\"scaling\",{get:function(){return this._scaling},set:function(e){this._scaling=e,this._isDirty=!0},enumerable:!0,configurable:!0}),Object.defineProperty(h.prototype,\"rotationQuaternion\",{get:function(){return this._rotationQuaternion},set:function(e){(this._rotationQuaternion=e)&&this.rotation.length()&&this.rotation.copyFromFloats(0,0,0)},enumerable:!0,configurable:!0}),Object.defineProperty(h.prototype,\"forward\",{get:function(){return I.Vector3.Normalize(I.Vector3.TransformNormal(this.getScene().useRightHandedSystem?this._forwardInverted:this._forward,this.getWorldMatrix()))},enumerable:!0,configurable:!0}),Object.defineProperty(h.prototype,\"up\",{get:function(){return I.Vector3.Normalize(I.Vector3.TransformNormal(this._up,this.getWorldMatrix()))},enumerable:!0,configurable:!0}),Object.defineProperty(h.prototype,\"right\",{get:function(){return I.Vector3.Normalize(I.Vector3.TransformNormal(this.getScene().useRightHandedSystem?this._rightInverted:this._right,this.getWorldMatrix()))},enumerable:!0,configurable:!0}),h.prototype.updatePoseMatrix=function(e){return this._poseMatrix.copyFrom(e),this},h.prototype.getPoseMatrix=function(){return this._poseMatrix},h.prototype._isSynchronized=function(){return!this._isDirty&&(this.billboardMode===this._cache.billboardMode&&this.billboardMode===h.BILLBOARDMODE_NONE&&(!this._cache.pivotMatrixUpdated&&(!this.infiniteDistance&&(!!this._cache.position.equals(this._position)&&(!(this._rotationQuaternion&&!this._cache.rotationQuaternion.equals(this._rotationQuaternion))&&(!!this._cache.rotation.equals(this._rotation)&&!!this._cache.scaling.equals(this._scaling)))))))},h.prototype._initCache=function(){n.prototype._initCache.call(this),this._cache.localMatrixUpdated=!1,this._cache.position=I.Vector3.Zero(),this._cache.scaling=I.Vector3.Zero(),this._cache.rotation=I.Vector3.Zero(),this._cache.rotationQuaternion=new I.Quaternion(0,0,0,0),this._cache.billboardMode=-1},h.prototype.markAsDirty=function(e){return\"rotation\"===e&&(this.rotationQuaternion=null),this._currentRenderId=Number.MAX_VALUE,this._isDirty=!0,this},Object.defineProperty(h.prototype,\"absolutePosition\",{get:function(){return this._absolutePosition},enumerable:!0,configurable:!0}),h.prototype.setPreTransformMatrix=function(e){return this.setPivotMatrix(e,!1)},h.prototype.setPivotMatrix=function(e,t){return void 0===t&&(t=!0),this._pivotMatrix=e.clone(),this._cache.pivotMatrixUpdated=!0,this._postMultiplyPivotMatrix=t,this._postMultiplyPivotMatrix&&(this._pivotMatrixInverse?this._pivotMatrix.invertToRef(this._pivotMatrixInverse):this._pivotMatrixInverse=I.Matrix.Invert(this._pivotMatrix)),this},h.prototype.getPivotMatrix=function(){return this._pivotMatrix},h.prototype.freezeWorldMatrix=function(){return this._isWorldMatrixFrozen=!1,this.computeWorldMatrix(!0),this._isWorldMatrixFrozen=!0,this},h.prototype.unfreezeWorldMatrix=function(){return this._isWorldMatrixFrozen=!1,this.computeWorldMatrix(!0),this},Object.defineProperty(h.prototype,\"isWorldMatrixFrozen\",{get:function(){return this._isWorldMatrixFrozen},enumerable:!0,configurable:!0}),h.prototype.getAbsolutePosition=function(){return this.computeWorldMatrix(),this._absolutePosition},h.prototype.setAbsolutePosition=function(e){if(!e)return this;var t,i,r;if(void 0===e.x){if(arguments.length<3)return this;t=e,i=arguments[1],r=arguments[2]}else t=e.x,i=e.y,r=e.z;if(this.parent){var n=this.parent.getWorldMatrix().clone();n.invert();var o=new I.Vector3(t,i,r);this.position=I.Vector3.TransformCoordinates(o,n)}else this.position.x=t,this.position.y=i,this.position.z=r;return this},h.prototype.setPositionWithLocalVector=function(e){return this.computeWorldMatrix(),this.position=I.Vector3.TransformNormal(e,this._localWorld),this},h.prototype.getPositionExpressedInLocalSpace=function(){this.computeWorldMatrix();var e=this._localWorld.clone();return e.invert(),I.Vector3.TransformNormal(this.position,e)},h.prototype.locallyTranslate=function(e){return this.computeWorldMatrix(!0),this.position=I.Vector3.TransformCoordinates(e,this._localWorld),this},h.prototype.lookAt=function(e,t,i,r,n){void 0===t&&(t=0),void 0===i&&(i=0),void 0===r&&(r=0),void 0===n&&(n=I.Space.LOCAL);var o=h._lookAtVectorCache,s=n===I.Space.LOCAL?this.position:this.getAbsolutePosition();e.subtractToRef(s,o);var a=-Math.atan2(o.z,o.x)-Math.PI/2,l=Math.sqrt(o.x*o.x+o.z*o.z),c=Math.atan2(o.y,l);return this.rotationQuaternion?I.Quaternion.RotationYawPitchRollToRef(a+t,c+i,r,this.rotationQuaternion):(this.rotation.x=c+i,this.rotation.y=a+t,this.rotation.z=r),this},h.prototype.getDirection=function(e){var t=I.Vector3.Zero();return this.getDirectionToRef(e,t),t},h.prototype.getDirectionToRef=function(e,t){return I.Vector3.TransformNormalToRef(e,this.getWorldMatrix(),t),this},h.prototype.setPivotPoint=function(e,t){void 0===t&&(t=I.Space.LOCAL),0==this.getScene().getRenderId()&&this.computeWorldMatrix(!0);var i=this.getWorldMatrix();if(t==I.Space.WORLD){var r=I.Tmp.Matrix[0];i.invertToRef(r),e=I.Vector3.TransformCoordinates(e,r)}return this.setPivotMatrix(I.Matrix.Translation(-e.x,-e.y,-e.z),!0)},h.prototype.getPivotPoint=function(){var e=I.Vector3.Zero();return this.getPivotPointToRef(e),e},h.prototype.getPivotPointToRef=function(e){return e.x=-this._pivotMatrix.m[12],e.y=-this._pivotMatrix.m[13],e.z=-this._pivotMatrix.m[14],this},h.prototype.getAbsolutePivotPoint=function(){var e=I.Vector3.Zero();return this.getAbsolutePivotPointToRef(e),e},h.prototype.getAbsolutePivotPointToRef=function(e){return e.x=this._pivotMatrix.m[12],e.y=this._pivotMatrix.m[13],e.z=this._pivotMatrix.m[14],this.getPivotPointToRef(e),I.Vector3.TransformCoordinatesToRef(e,this.getWorldMatrix(),e),this},h.prototype.setParent=function(e){if(!e&&!this.parent)return this;if(e){r=I.Tmp.Quaternion[0],n=I.Tmp.Vector3[0],o=I.Tmp.Vector3[1];var t=I.Tmp.Matrix[0],i=I.Tmp.Matrix[1];this.computeWorldMatrix(!0),e.computeWorldMatrix(!0),e.getWorldMatrix().invertToRef(i),this.getWorldMatrix().multiplyToRef(i,t),t.decompose(o,r,n),this.rotationQuaternion?this.rotationQuaternion.copyFrom(r):r.toEulerAnglesToRef(this.rotation),this.position.x=n.x,this.position.y=n.y,this.position.z=n.z,this.scaling.x=o.x,this.scaling.y=o.y,this.scaling.z=o.z}else{var r=I.Tmp.Quaternion[0],n=I.Tmp.Vector3[0],o=I.Tmp.Vector3[1];this.parent&&this.parent.computeWorldMatrix&&this.parent.computeWorldMatrix(!0),this.computeWorldMatrix(!0),this.getWorldMatrix().decompose(o,r,n),this.rotationQuaternion?this.rotationQuaternion.copyFrom(r):r.toEulerAnglesToRef(this.rotation),this.scaling.x=o.x,this.scaling.y=o.y,this.scaling.z=o.z,this.position.x=n.x,this.position.y=n.y,this.position.z=n.z}return this.parent=e,this},Object.defineProperty(h.prototype,\"nonUniformScaling\",{get:function(){return this._nonUniformScaling},enumerable:!0,configurable:!0}),h.prototype._updateNonUniformScalingState=function(e){return this._nonUniformScaling!==e&&(this._nonUniformScaling=e,!0)},h.prototype.attachToBone=function(e,t){return this._transformToBoneReferal=t,(this.parent=e).getWorldMatrix().determinant()<0&&(this.scalingDeterminant*=-1),this},h.prototype.detachFromBone=function(){return this.parent&&(this.parent.getWorldMatrix().determinant()<0&&(this.scalingDeterminant*=-1),this._transformToBoneReferal=null,this.parent=null),this},h.prototype.rotate=function(e,t,i){var r;if(e.normalize(),this.rotationQuaternion||(this.rotationQuaternion=I.Quaternion.RotationYawPitchRoll(this.rotation.y,this.rotation.x,this.rotation.z),this.rotation=I.Vector3.Zero()),i&&i!==I.Space.LOCAL){if(this.parent){var n=this.parent.getWorldMatrix().clone();n.invert(),e=I.Vector3.TransformNormal(e,n)}(r=I.Quaternion.RotationAxisToRef(e,t,h._rotationAxisCache)).multiplyToRef(this.rotationQuaternion,this.rotationQuaternion)}else r=I.Quaternion.RotationAxisToRef(e,t,h._rotationAxisCache),this.rotationQuaternion.multiplyToRef(r,this.rotationQuaternion);return this},h.prototype.rotateAround=function(e,t,i){return t.normalize(),this.rotationQuaternion||(this.rotationQuaternion=I.Quaternion.RotationYawPitchRoll(this.rotation.y,this.rotation.x,this.rotation.z),this.rotation.copyFromFloats(0,0,0)),e.subtractToRef(this.position,I.Tmp.Vector3[0]),I.Matrix.TranslationToRef(I.Tmp.Vector3[0].x,I.Tmp.Vector3[0].y,I.Tmp.Vector3[0].z,I.Tmp.Matrix[0]),I.Tmp.Matrix[0].invertToRef(I.Tmp.Matrix[2]),I.Matrix.RotationAxisToRef(t,i,I.Tmp.Matrix[1]),I.Tmp.Matrix[2].multiplyToRef(I.Tmp.Matrix[1],I.Tmp.Matrix[2]),I.Tmp.Matrix[2].multiplyToRef(I.Tmp.Matrix[0],I.Tmp.Matrix[2]),I.Tmp.Matrix[2].decompose(I.Tmp.Vector3[0],I.Tmp.Quaternion[0],I.Tmp.Vector3[1]),this.position.addInPlace(I.Tmp.Vector3[1]),I.Tmp.Quaternion[0].multiplyToRef(this.rotationQuaternion,this.rotationQuaternion),this},h.prototype.translate=function(e,t,i){var r=e.scale(t);if(i&&i!==I.Space.LOCAL)this.setAbsolutePosition(this.getAbsolutePosition().add(r));else{var n=this.getPositionExpressedInLocalSpace().add(r);this.setPositionWithLocalVector(n)}return this},h.prototype.addRotation=function(e,t,i){var r;this.rotationQuaternion?r=this.rotationQuaternion:(r=I.Tmp.Quaternion[1],I.Quaternion.RotationYawPitchRollToRef(this.rotation.y,this.rotation.x,this.rotation.z,r));var n=I.Tmp.Quaternion[0];return I.Quaternion.RotationYawPitchRollToRef(t,e,i,n),r.multiplyInPlace(n),this.rotationQuaternion||r.toEulerAnglesToRef(this.rotation),this},h.prototype.computeWorldMatrix=function(e){if(this._isWorldMatrixFrozen)return this._worldMatrix;if(!e&&this.isSynchronized())return this._currentRenderId=this.getScene().getRenderId(),this._worldMatrix;(this._updateCache(),this._cache.position.copyFrom(this.position),this._cache.scaling.copyFrom(this.scaling),this._cache.pivotMatrixUpdated=!1,this._cache.billboardMode=this.billboardMode,this._currentRenderId=this.getScene().getRenderId(),this._childRenderId=this.getScene().getRenderId(),this._isDirty=!1,I.Matrix.ScalingToRef(this.scaling.x*this.scalingDeterminant,this.scaling.y*this.scalingDeterminant,this.scaling.z*this.scalingDeterminant,I.Tmp.Matrix[1]),this.rotationQuaternion)&&(this.rotation.length()&&(this.rotationQuaternion.multiplyInPlace(I.Quaternion.RotationYawPitchRoll(this.rotation.y,this.rotation.x,this.rotation.z)),this.rotation.copyFromFloats(0,0,0)));this.rotationQuaternion?(this.rotationQuaternion.toRotationMatrix(I.Tmp.Matrix[0]),this._cache.rotationQuaternion.copyFrom(this.rotationQuaternion)):(I.Matrix.RotationYawPitchRollToRef(this.rotation.y,this.rotation.x,this.rotation.z,I.Tmp.Matrix[0]),this._cache.rotation.copyFrom(this.rotation));var t=this.getScene().activeCamera;if(this.infiniteDistance&&!this.parent&&t){var i=t.getWorldMatrix(),r=new I.Vector3(i.m[12],i.m[13],i.m[14]);I.Matrix.TranslationToRef(this.position.x+r.x,this.position.y+r.y,this.position.z+r.z,I.Tmp.Matrix[2])}else I.Matrix.TranslationToRef(this.position.x,this.position.y,this.position.z,I.Tmp.Matrix[2]);if(this._pivotMatrix.multiplyToRef(I.Tmp.Matrix[1],I.Tmp.Matrix[4]),I.Tmp.Matrix[4].multiplyToRef(I.Tmp.Matrix[0],I.Tmp.Matrix[5]),this.billboardMode!==h.BILLBOARDMODE_NONE&&t){if((this.billboardMode&h.BILLBOARDMODE_ALL)!==h.BILLBOARDMODE_ALL){var n=I.Tmp.Vector3[3];this.parent&&this.parent.getWorldMatrix?this._transformToBoneReferal?(this.parent.getWorldMatrix().multiplyToRef(this._transformToBoneReferal.getWorldMatrix(),I.Tmp.Matrix[6]),I.Vector3.TransformCoordinatesToRef(this.position,I.Tmp.Matrix[6],n)):I.Vector3.TransformCoordinatesToRef(this.position,this.parent.getWorldMatrix(),n):n.copyFrom(this.position),n.subtractInPlace(t.globalPosition);var o=I.Tmp.Vector3[4].copyFromFloats(0,0,0);(this.billboardMode&h.BILLBOARDMODE_X)===h.BILLBOARDMODE_X&&(o.x=Math.atan2(-n.y,n.z)),(this.billboardMode&h.BILLBOARDMODE_Y)===h.BILLBOARDMODE_Y&&(o.y=Math.atan2(n.x,n.z)),(this.billboardMode&h.BILLBOARDMODE_Z)===h.BILLBOARDMODE_Z&&(o.z=Math.atan2(n.y,n.x)),I.Matrix.RotationYawPitchRollToRef(o.y,o.x,o.z,I.Tmp.Matrix[0])}else I.Tmp.Matrix[1].copyFrom(t.getViewMatrix()),I.Tmp.Matrix[1].setTranslationFromFloats(0,0,0),I.Tmp.Matrix[1].invertToRef(I.Tmp.Matrix[0]);I.Tmp.Matrix[1].copyFrom(I.Tmp.Matrix[5]),I.Tmp.Matrix[1].multiplyToRef(I.Tmp.Matrix[0],I.Tmp.Matrix[5])}return this._postMultiplyPivotMatrix&&I.Tmp.Matrix[5].multiplyToRef(this._pivotMatrixInverse,I.Tmp.Matrix[5]),I.Tmp.Matrix[5].multiplyToRef(I.Tmp.Matrix[2],this._localWorld),this.parent&&this.parent.getWorldMatrix?(this.billboardMode!==h.BILLBOARDMODE_NONE?(this._transformToBoneReferal?(this.parent.getWorldMatrix().multiplyToRef(this._transformToBoneReferal.getWorldMatrix(),I.Tmp.Matrix[6]),I.Tmp.Matrix[5].copyFrom(I.Tmp.Matrix[6])):I.Tmp.Matrix[5].copyFrom(this.parent.getWorldMatrix()),this._localWorld.getTranslationToRef(I.Tmp.Vector3[5]),I.Vector3.TransformCoordinatesToRef(I.Tmp.Vector3[5],I.Tmp.Matrix[5],I.Tmp.Vector3[5]),this._worldMatrix.copyFrom(this._localWorld),this._worldMatrix.setTranslation(I.Tmp.Vector3[5])):this._transformToBoneReferal?(this._localWorld.multiplyToRef(this.parent.getWorldMatrix(),I.Tmp.Matrix[6]),I.Tmp.Matrix[6].multiplyToRef(this._transformToBoneReferal.getWorldMatrix(),this._worldMatrix)):this._localWorld.multiplyToRef(this.parent.getWorldMatrix(),this._worldMatrix),this._markSyncedWithParent()):this._worldMatrix.copyFrom(this._localWorld),this.ignoreNonUniformScaling?this._updateNonUniformScalingState(!1):this.scaling.isNonUniform?this._updateNonUniformScalingState(!0):this.parent&&this.parent._nonUniformScaling?this._updateNonUniformScalingState(this.parent._nonUniformScaling):this._updateNonUniformScalingState(!1),this._afterComputeWorldMatrix(),this._absolutePosition.copyFromFloats(this._worldMatrix.m[12],this._worldMatrix.m[13],this._worldMatrix.m[14]),this.onAfterWorldMatrixUpdateObservable.notifyObservers(this),this._poseMatrix||(this._poseMatrix=I.Matrix.Invert(this._worldMatrix)),this._worldMatrixDeterminant=this._worldMatrix.determinant(),this._worldMatrix},h.prototype._afterComputeWorldMatrix=function(){},h.prototype.registerAfterWorldMatrixUpdate=function(e){return this.onAfterWorldMatrixUpdateObservable.add(e),this},h.prototype.unregisterAfterWorldMatrixUpdate=function(e){return this.onAfterWorldMatrixUpdateObservable.removeCallback(e),this},h.prototype.clone=function(e,t,i){var r=this,n=I.SerializationHelper.Clone((function(){return new h(e,r.getScene())}),this);if(n.name=e,n.id=e,t&&(n.parent=t),!i)for(var o=this.getDescendants(!0),s=0;s<o.length;s++){var a=o[s];a.clone&&a.clone(e+\".\"+a.name,n)}return n},h.prototype.serialize=function(e){var t=I.SerializationHelper.Serialize(this,e);return t.type=this.getClassName(),this.parent&&(t.parentId=this.parent.id),I.Tags&&I.Tags.HasTags(this)&&(t.tags=I.Tags.GetTags(this)),t.localMatrix=this.getPivotMatrix().asArray(),t.isEnabled=this.isEnabled(),this.parent&&(t.parentId=this.parent.id),t},h.Parse=function(e,t,i){var r=I.SerializationHelper.Parse((function(){return new h(e.name,t)}),e,t,i);return I.Tags&&I.Tags.AddTagsTo(r,e.tags),e.localMatrix?r.setPreTransformMatrix(I.Matrix.FromArray(e.localMatrix)):e.pivotMatrix&&r.setPivotMatrix(I.Matrix.FromArray(e.pivotMatrix)),r.setEnabled(e.isEnabled),e.parentId&&(r._waitingParentId=e.parentId),r},h.prototype.dispose=function(e,t){void 0===t&&(t=!1),this.getScene().stopAnimation(this),this.getScene().removeTransformNode(this),this.onAfterWorldMatrixUpdateObservable.clear(),n.prototype.dispose.call(this,e,t)},h.BILLBOARDMODE_NONE=0,h.BILLBOARDMODE_X=1,h.BILLBOARDMODE_Y=2,h.BILLBOARDMODE_Z=4,h.BILLBOARDMODE_ALL=7,h._lookAtVectorCache=new I.Vector3(0,0,0),h._rotationAxisCache=new I.Quaternion,b([I.serializeAsVector3(\"position\")],h.prototype,\"_position\",void 0),b([I.serializeAsVector3(\"rotation\")],h.prototype,\"_rotation\",void 0),b([I.serializeAsQuaternion(\"rotationQuaternion\")],h.prototype,\"_rotationQuaternion\",void 0),b([I.serializeAsVector3(\"scaling\")],h.prototype,\"_scaling\",void 0),b([I.serialize()],h.prototype,\"billboardMode\",void 0),b([I.serialize()],h.prototype,\"scalingDeterminant\",void 0),b([I.serialize()],h.prototype,\"infiniteDistance\",void 0),b([I.serialize()],h.prototype,\"ignoreNonUniformScaling\",void 0),h})(I.Node),I.TransformNode=w,L=$a||($a={}),F=function(){this.facetNb=0,this.partitioningSubdivisions=10,this.partitioningBBoxRatio=1.01,this.facetDataEnabled=!1,this.facetParameters={},this.bbSize=L.Vector3.Zero(),this.subDiv={max:1,X:1,Y:1,Z:1},this.facetDepthSort=!1,this.facetDepthSortEnabled=!1},B=(function(a){function i(e,t){void 0===t&&(t=null);var r=a.call(this,e,t,!1)||this;return r._facetData=new F,r.cullingStrategy=i.CULLINGSTRATEGY_STANDARD,r.onCollideObservable=new L.Observable,r.onCollisionPositionChangeObservable=new L.Observable,r.onMaterialChangedObservable=new L.Observable,r.definedFacingForward=!0,r._visibility=1,r.alphaIndex=Number.MAX_VALUE,r.isVisible=!0,r.isPickable=!0,r.showSubMeshesBoundingBox=!1,r.isBlocker=!1,r.enablePointerMoveEvents=!1,r.renderingGroupId=0,r._receiveShadows=!1,r.outlineColor=L.Color3.Red(),r.outlineWidth=.02,r.overlayColor=L.Color3.Red(),r.overlayAlpha=.5,r._hasVertexAlpha=!1,r._useVertexColors=!0,r._computeBonesUsingShaders=!0,r._numBoneInfluencers=4,r._applyFog=!0,r.useOctreeForRenderingSelection=!0,r.useOctreeForPicking=!0,r.useOctreeForCollisions=!0,r._layerMask=268435455,r.alwaysSelectAsActiveMesh=!1,r.actionManager=null,r._checkCollisions=!1,r._collisionMask=-1,r._collisionGroup=-1,r.ellipsoid=new L.Vector3(.5,1,.5),r.ellipsoidOffset=new L.Vector3(0,0,0),r._oldPositionForCollisions=new L.Vector3(0,0,0),r._diffPositionForCollisions=new L.Vector3(0,0,0),r.edgesWidth=1,r.edgesColor=new L.Color4(1,0,0,1),r._renderId=0,r._intersectionsInProgress=new Array,r._unIndexed=!1,r._lightSources=new Array,r.onRebuildObservable=new L.Observable,r._onCollisionPositionChange=function(e,t,i){void 0===i&&(i=null),r.getScene().workerCollisions&&t.multiplyInPlace(r._collider._radius),t.subtractToRef(r._oldPositionForCollisions,r._diffPositionForCollisions),r._diffPositionForCollisions.length()>L.Engine.CollisionsEpsilon&&r.position.addInPlace(r._diffPositionForCollisions),i&&r.onCollideObservable.notifyObservers(i),r.onCollisionPositionChangeObservable.notifyObservers(r.position)},r.getScene().addMesh(r),r._resyncLightSources(),r}return T(i,a),Object.defineProperty(i,\"BILLBOARDMODE_NONE\",{get:function(){return L.TransformNode.BILLBOARDMODE_NONE},enumerable:!0,configurable:!0}),Object.defineProperty(i,\"BILLBOARDMODE_X\",{get:function(){return L.TransformNode.BILLBOARDMODE_X},enumerable:!0,configurable:!0}),Object.defineProperty(i,\"BILLBOARDMODE_Y\",{get:function(){return L.TransformNode.BILLBOARDMODE_Y},enumerable:!0,configurable:!0}),Object.defineProperty(i,\"BILLBOARDMODE_Z\",{get:function(){return L.TransformNode.BILLBOARDMODE_Z},enumerable:!0,configurable:!0}),Object.defineProperty(i,\"BILLBOARDMODE_ALL\",{get:function(){return L.TransformNode.BILLBOARDMODE_ALL},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,\"facetNb\",{get:function(){return this._facetData.facetNb},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,\"partitioningSubdivisions\",{get:function(){return this._facetData.partitioningSubdivisions},set:function(e){this._facetData.partitioningSubdivisions=e},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,\"partitioningBBoxRatio\",{get:function(){return this._facetData.partitioningBBoxRatio},set:function(e){this._facetData.partitioningBBoxRatio=e},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,\"mustDepthSortFacets\",{get:function(){return this._facetData.facetDepthSort},set:function(e){this._facetData.facetDepthSort=e},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,\"facetDepthSortFrom\",{get:function(){return this._facetData.facetDepthSortFrom},set:function(e){this._facetData.facetDepthSortFrom=e},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,\"isFacetDataEnabled\",{get:function(){return this._facetData.facetDataEnabled},enumerable:!0,configurable:!0}),i.prototype._updateNonUniformScalingState=function(e){return!!a.prototype._updateNonUniformScalingState.call(this,e)&&(this._markSubMeshesAsMiscDirty(),!0)},Object.defineProperty(i.prototype,\"onCollide\",{set:function(e){this._onCollideObserver&&this.onCollideObservable.remove(this._onCollideObserver),this._onCollideObserver=this.onCollideObservable.add(e)},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,\"onCollisionPositionChange\",{set:function(e){this._onCollisionPositionChangeObserver&&this.onCollisionPositionChangeObservable.remove(this._onCollisionPositionChangeObserver),this._onCollisionPositionChangeObserver=this.onCollisionPositionChangeObservable.add(e)},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,\"visibility\",{get:function(){return this._visibility},set:function(e){this._visibility!==e&&(this._visibility=e,this._markSubMeshesAsMiscDirty())},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,\"material\",{get:function(){return this._material},set:function(e){this._material!==e&&(this._material=e,this.onMaterialChangedObservable.hasObservers&&this.onMaterialChangedObservable.notifyObservers(this),this.subMeshes&&this._unBindEffect())},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,\"receiveShadows\",{get:function(){return this._receiveShadows},set:function(e){this._receiveShadows!==e&&(this._receiveShadows=e,this._markSubMeshesAsLightDirty())},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,\"hasVertexAlpha\",{get:function(){return this._hasVertexAlpha},set:function(e){this._hasVertexAlpha!==e&&(this._hasVertexAlpha=e,this._markSubMeshesAsAttributesDirty(),this._markSubMeshesAsMiscDirty())},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,\"useVertexColors\",{get:function(){return this._useVertexColors},set:function(e){this._useVertexColors!==e&&(this._useVertexColors=e,this._markSubMeshesAsAttributesDirty())},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,\"computeBonesUsingShaders\",{get:function(){return this._computeBonesUsingShaders},set:function(e){this._computeBonesUsingShaders!==e&&(this._computeBonesUsingShaders=e,this._markSubMeshesAsAttributesDirty())},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,\"numBoneInfluencers\",{get:function(){return this._numBoneInfluencers},set:function(e){this._numBoneInfluencers!==e&&(this._numBoneInfluencers=e,this._markSubMeshesAsAttributesDirty())},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,\"applyFog\",{get:function(){return this._applyFog},set:function(e){this._applyFog!==e&&(this._applyFog=e,this._markSubMeshesAsMiscDirty())},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,\"layerMask\",{get:function(){return this._layerMask},set:function(e){e!==this._layerMask&&(this._layerMask=e,this._resyncLightSources())},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,\"collisionMask\",{get:function(){return this._collisionMask},set:function(e){this._collisionMask=isNaN(e)?-1:e},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,\"collisionGroup\",{get:function(){return this._collisionGroup},set:function(e){this._collisionGroup=isNaN(e)?-1:e},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,\"_positions\",{get:function(){return null},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,\"skeleton\",{get:function(){return this._skeleton},set:function(e){this._skeleton&&this._skeleton.needInitialSkinMatrix&&this._skeleton._unregisterMeshWithPoseMatrix(this),e&&e.needInitialSkinMatrix&&e._registerMeshWithPoseMatrix(this),this._skeleton=e,this._skeleton||(this._bonesTransformMatrices=null),this._markSubMeshesAsAttributesDirty()},enumerable:!0,configurable:!0}),i.prototype.getClassName=function(){return\"AbstractMesh\"},i.prototype.toString=function(e){var t=\"Name: \"+this.name+\", isInstance: \"+(this instanceof L.InstancedMesh?\"YES\":\"NO\");return t+=\", # of submeshes: \"+(this.subMeshes?this.subMeshes.length:0),this._skeleton&&(t+=\", skeleton: \"+this._skeleton.name),e&&(t+=\", billboard mode: \"+[\"NONE\",\"X\",\"Y\",null,\"Z\",null,null,\"ALL\"][this.billboardMode],t+=\", freeze wrld mat: \"+(this._isWorldMatrixFrozen||this._waitingFreezeWorldMatrix?\"YES\":\"NO\")),t},i.prototype._rebuild=function(){if(this.onRebuildObservable.notifyObservers(this),this._occlusionQuery&&(this._occlusionQuery=null),this.subMeshes)for(var e=0,t=this.subMeshes;e<t.length;e++){t[e]._rebuild()}},i.prototype._resyncLightSources=function(){for(var e=this._lightSources.length=0,t=this.getScene().lights;e<t.length;e++){var i=t[e];i.isEnabled()&&(i.canAffectMesh(this)&&this._lightSources.push(i))}this._markSubMeshesAsLightDirty()},i.prototype._resyncLighSource=function(e){var t=e.isEnabled()&&e.canAffectMesh(this),i=this._lightSources.indexOf(e);if(-1===i){if(!t)return;this._lightSources.push(e)}else{if(t)return;this._lightSources.splice(i,1)}this._markSubMeshesAsLightDirty()},i.prototype._unBindEffect=function(){for(var e=0,t=this.subMeshes;e<t.length;e++){t[e].setEffect(null)}},i.prototype._removeLightSource=function(e){var t=this._lightSources.indexOf(e);-1!==t&&(this._lightSources.splice(t,1),this._markSubMeshesAsLightDirty())},i.prototype._markSubMeshesAsDirty=function(e){if(this.subMeshes)for(var t=0,i=this.subMeshes;t<i.length;t++){var r=i[t];r._materialDefines&&e(r._materialDefines)}},i.prototype._markSubMeshesAsLightDirty=function(){this._markSubMeshesAsDirty((function(e){return e.markAsLightDirty()}))},i.prototype._markSubMeshesAsAttributesDirty=function(){this._markSubMeshesAsDirty((function(e){return e.markAsAttributesDirty()}))},i.prototype._markSubMeshesAsMiscDirty=function(){if(this.subMeshes)for(var e=0,t=this.subMeshes;e<t.length;e++){var i=t[e].getMaterial();i&&i.markAsDirty(L.Material.MiscDirtyFlag)}},Object.defineProperty(i.prototype,\"scaling\",{get:function(){return this._scaling},set:function(e){this._scaling=e,this.physicsImpostor&&this.physicsImpostor.forceUpdate()},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,\"isBlocked\",{get:function(){return!1},enumerable:!0,configurable:!0}),i.prototype.getLOD=function(e){return this},i.prototype.getTotalVertices=function(){return 0},i.prototype.getIndices=function(){return null},i.prototype.getVerticesData=function(e){return null},i.prototype.setVerticesData=function(e,t,i,r){return this},i.prototype.updateVerticesData=function(e,t,i,r){return this},i.prototype.setIndices=function(e,t){return this},i.prototype.isVerticesDataPresent=function(e){return!1},i.prototype.getBoundingInfo=function(){return this._masterMesh?this._masterMesh.getBoundingInfo():(this._boundingInfo||this._updateBoundingInfo(),this._boundingInfo)},i.prototype.normalizeToUnitCube=function(e){void 0===e&&(e=!0);var t=this.getHierarchyBoundingVectors(e),i=t.max.subtract(t.min),r=Math.max(i.x,i.y,i.z);if(0===r)return this;var n=1/r;return this.scaling.scaleInPlace(n),this},i.prototype.setBoundingInfo=function(e){return this._boundingInfo=e,this},Object.defineProperty(i.prototype,\"useBones\",{get:function(){return this.skeleton&&this.getScene().skeletonsEnabled&&this.isVerticesDataPresent(L.VertexBuffer.MatricesIndicesKind)&&this.isVerticesDataPresent(L.VertexBuffer.MatricesWeightsKind)},enumerable:!0,configurable:!0}),i.prototype._preActivate=function(){},i.prototype._preActivateForIntermediateRendering=function(e){},i.prototype._activate=function(e){this._renderId=e},i.prototype.getWorldMatrix=function(){return this._masterMesh?this._masterMesh.getWorldMatrix():a.prototype.getWorldMatrix.call(this)},i.prototype._getWorldMatrixDeterminant=function(){return this._masterMesh?this._masterMesh._getWorldMatrixDeterminant():a.prototype._getWorldMatrixDeterminant.call(this)},i.prototype.movePOV=function(e,t,i){return this.position.addInPlace(this.calcMovePOV(e,t,i)),this},i.prototype.calcMovePOV=function(e,t,i){var r=new L.Matrix;(this.rotationQuaternion?this.rotationQuaternion:L.Quaternion.RotationYawPitchRoll(this.rotation.y,this.rotation.x,this.rotation.z)).toRotationMatrix(r);var n=L.Vector3.Zero(),o=this.definedFacingForward?-1:1;return L.Vector3.TransformCoordinatesFromFloatsToRef(e*o,t,i*o,r,n),n},i.prototype.rotatePOV=function(e,t,i){return this.rotation.addInPlace(this.calcRotatePOV(e,t,i)),this},i.prototype.calcRotatePOV=function(e,t,i){var r=this.definedFacingForward?1:-1;return new L.Vector3(e*r,t,i*r)},i.prototype.getHierarchyBoundingVectors=function(e,t){var i,r;void 0===e&&(e=!0),void 0===t&&(t=null),this.getScene().incrementRenderId(),this.computeWorldMatrix(!0);var n=this.getBoundingInfo();if(this.subMeshes?(i=n.boundingBox.minimumWorld,r=n.boundingBox.maximumWorld):(i=new L.Vector3(Number.MAX_VALUE,Number.MAX_VALUE,Number.MAX_VALUE),r=new L.Vector3(-Number.MAX_VALUE,-Number.MAX_VALUE,-Number.MAX_VALUE)),e)for(var o=0,s=this.getDescendants(!1);o<s.length;o++){var a=s[o];if(a.computeWorldMatrix(!0),(!t||t(a))&&a.getBoundingInfo&&0!==a.getTotalVertices()){var l=a.getBoundingInfo().boundingBox,c=l.minimumWorld,h=l.maximumWorld;L.Tools.CheckExtends(c,i,r),L.Tools.CheckExtends(h,i,r)}}return{min:i,max:r}},i.prototype._updateBoundingInfo=function(){return this._boundingInfo=this._boundingInfo||new L.BoundingInfo(this.absolutePosition,this.absolutePosition),this._boundingInfo.update(this.worldMatrixFromCache),this._updateSubMeshesBoundingInfo(this.worldMatrixFromCache),this},i.prototype._updateSubMeshesBoundingInfo=function(e){if(!this.subMeshes)return this;for(var t=this.subMeshes.length,i=0;i<t;i++){var r=this.subMeshes[i];(1<t||!r.IsGlobal)&&r.updateBoundingInfo(e)}return this},i.prototype._afterComputeWorldMatrix=function(){this._updateBoundingInfo()},i.prototype.isInFrustum=function(e){return null!==this._boundingInfo&&this._boundingInfo.isInFrustum(e,this.cullingStrategy)},i.prototype.isCompletelyInFrustum=function(e){return null!==this._boundingInfo&&this._boundingInfo.isCompletelyInFrustum(e)},i.prototype.intersectsMesh=function(e,t,i){if(void 0===t&&(t=!1),!this._boundingInfo||!e._boundingInfo)return!1;if(this._boundingInfo.intersects(e._boundingInfo,t))return!0;if(i)for(var r=0,n=this.getChildMeshes();r<n.length;r++){if(n[r].intersectsMesh(e,t,!0))return!0}return!1},i.prototype.intersectsPoint=function(e){return!!this._boundingInfo&&this._boundingInfo.intersectsPoint(e)},i.prototype.getPositionInCameraSpace=function(e){return void 0===e&&(e=null),e||(e=this.getScene().activeCamera),L.Vector3.TransformCoordinates(this.absolutePosition,e.getViewMatrix())},i.prototype.getDistanceToCamera=function(e){return void 0===e&&(e=null),e||(e=this.getScene().activeCamera),this.absolutePosition.subtract(e.position).length()},Object.defineProperty(i.prototype,\"checkCollisions\",{get:function(){return this._checkCollisions},set:function(e){this._checkCollisions=e,this.getScene().workerCollisions&&this.getScene().collisionCoordinator.onMeshUpdated(this)},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,\"collider\",{get:function(){return this._collider},enumerable:!0,configurable:!0}),i.prototype.moveWithCollisions=function(e){return this.getAbsolutePosition().addToRef(this.ellipsoidOffset,this._oldPositionForCollisions),this._collider||(this._collider=new L.Collider),this._collider._radius=this.ellipsoid,this.getScene().collisionCoordinator.getNewPosition(this._oldPositionForCollisions,e,this._collider,3,this,this._onCollisionPositionChange,this.uniqueId),this},i.prototype._collideForSubMesh=function(e,t,i){if(this._generatePointsArray(),!this._positions)return this;if(!e._lastColliderWorldVertices||!e._lastColliderTransformMatrix.equals(t)){e._lastColliderTransformMatrix=t.clone(),e._lastColliderWorldVertices=[],e._trianglePlanes=[];for(var r=e.verticesStart,n=e.verticesStart+e.verticesCount,o=r;o<n;o++)e._lastColliderWorldVertices.push(L.Vector3.TransformCoordinates(this._positions[o],t))}return i._collide(e._trianglePlanes,e._lastColliderWorldVertices,this.getIndices(),e.indexStart,e.indexStart+e.indexCount,e.verticesStart,!!e.getMaterial()),i.collisionFound&&(i.collidedMesh=this),this},i.prototype._processCollisionsForSubMeshes=function(e,t){for(var i=this._scene.getCollidingSubMeshCandidates(this,e),r=i.length,n=0;n<r;n++){var o=i.data[n];1<r&&!o._checkCollision(e)||this._collideForSubMesh(o,t,e)}return this},i.prototype._checkCollision=function(e){if(!this._boundingInfo||!this._boundingInfo._checkCollision(e))return this;var t=L.Tmp.Matrix[0],i=L.Tmp.Matrix[1];return L.Matrix.ScalingToRef(1/e._radius.x,1/e._radius.y,1/e._radius.z,t),this.worldMatrixFromCache.multiplyToRef(t,i),this._processCollisionsForSubMeshes(e,i),this},i.prototype._generatePointsArray=function(){return!1},i.prototype.intersects=function(e,t){var i=new L.PickingInfo;if(!(this.subMeshes&&this._boundingInfo&&e.intersectsSphere(this._boundingInfo.boundingSphere)&&e.intersectsBox(this._boundingInfo.boundingBox)))return i;if(!this._generatePointsArray())return i;for(var r=null,n=this._scene.getIntersectingSubMeshCandidates(this,e),o=n.length,s=0;s<o;s++){var a=n.data[s];if(!(1<o)||a.canIntersects(e)){var l=a.intersects(e,this._positions,this.getIndices(),t);if(l&&(t||!r||l.distance<r.distance)&&((r=l).subMeshId=s,t))break}}if(r){var c=this.getWorldMatrix(),h=L.Vector3.TransformCoordinates(e.origin,c),u=e.direction.clone();u=u.scale(r.distance);var d=L.Vector3.TransformNormal(u,c),f=h.add(d);return i.hit=!0,i.distance=L.Vector3.Distance(h,f),i.pickedPoint=f,i.pickedMesh=this,i.bu=r.bu||0,i.bv=r.bv||0,i.faceId=r.faceId,i.subMeshId=r.subMeshId,i}return i},i.prototype.clone=function(e,t,i){return null},i.prototype.releaseSubMeshes=function(){if(this.subMeshes)for(;this.subMeshes.length;)this.subMeshes[0].dispose();else this.subMeshes=new Array;return this},i.prototype.dispose=function(e,t){var i,n=this;for(void 0===t&&(t=!1),this.getScene().freeActiveMeshes(),this.getScene().freeRenderingGroups(),void 0!==this.actionManager&&null!==this.actionManager&&(this.actionManager.dispose(),this.actionManager=null),this._skeleton=null,i=0;i<this._intersectionsInProgress.length;i++){var r=this._intersectionsInProgress[i],o=r._intersectionsInProgress.indexOf(this);r._intersectionsInProgress.splice(o,1)}this._intersectionsInProgress=[],this.getScene().lights.forEach((function(e){var t=e.includedOnlyMeshes.indexOf(n);-1!==t&&e.includedOnlyMeshes.splice(t,1),-1!==(t=e.excludedMeshes.indexOf(n))&&e.excludedMeshes.splice(t,1);var i=e.getShadowGenerator();if(i){var r=i.getShadowMap();r&&r.renderList&&-1!==(t=r.renderList.indexOf(n))&&r.renderList.splice(t,1)}})),\"InstancedMesh\"!==this.getClassName()&&this.releaseSubMeshes();var s=this.getScene().getEngine();if(this._occlusionQuery&&(this.isOcclusionQueryInProgress=!1,s.deleteQuery(this._occlusionQuery),this._occlusionQuery=null),s.wipeCaches(),this.getScene().removeMesh(this),t&&this.material&&this.material.dispose(!1,!0),!e)for(i=0;i<this.getScene().particleSystems.length;i++)this.getScene().particleSystems[i].emitter===this&&(this.getScene().particleSystems[i].dispose(),i--);this._facetData.facetDataEnabled&&this.disableFacetData(),this.onAfterWorldMatrixUpdateObservable.clear(),this.onCollideObservable.clear(),this.onCollisionPositionChangeObservable.clear(),this.onRebuildObservable.clear(),a.prototype.dispose.call(this,e,t)},i.prototype.addChild=function(e){return e.setParent(this),this},i.prototype.removeChild=function(e){return e.setParent(null),this},i.prototype._initFacetData=function(){var e=this._facetData;e.facetNormals||(e.facetNormals=new Array),e.facetPositions||(e.facetPositions=new Array),e.facetPartitioning||(e.facetPartitioning=new Array),e.facetNb=this.getIndices().length/3|0,e.partitioningSubdivisions=e.partitioningSubdivisions?e.partitioningSubdivisions:10,e.partitioningBBoxRatio=e.partitioningBBoxRatio?e.partitioningBBoxRatio:1.01;for(var t=0;t<e.facetNb;t++)e.facetNormals[t]=L.Vector3.Zero(),e.facetPositions[t]=L.Vector3.Zero();return e.facetDataEnabled=!0,this},i.prototype.updateFacetData=function(){var e=this._facetData;e.facetDataEnabled||this._initFacetData();var t=this.getVerticesData(L.VertexBuffer.PositionKind),i=this.getIndices(),r=this.getVerticesData(L.VertexBuffer.NormalKind),n=this.getBoundingInfo();if(e.facetDepthSort&&!e.facetDepthSortEnabled){if(e.facetDepthSortEnabled=!0,i instanceof Uint16Array)e.depthSortedIndices=new Uint16Array(i);else if(i instanceof Uint32Array)e.depthSortedIndices=new Uint32Array(i);else{for(var o=!1,s=0;s<i.length;s++)if(65535<i[s]){o=!0;break}e.depthSortedIndices=o?new Uint32Array(i):new Uint16Array(i)}if(e.facetDepthSortFunction=function(e,t){return t.sqDistance-e.sqDistance},!e.facetDepthSortFrom){var a=this.getScene().activeCamera;e.facetDepthSortFrom=a?a.position:L.Vector3.Zero()}e.depthSortedFacets=[];for(var l=0;l<e.facetNb;l++){var c={ind:3*l,sqDistance:0};e.depthSortedFacets.push(c)}e.invertedMatrix=L.Matrix.Identity(),e.facetDepthSortOrigin=L.Vector3.Zero()}e.bbSize.x=n.maximum.x-n.minimum.x>L.Epsilon?n.maximum.x-n.minimum.x:L.Epsilon,e.bbSize.y=n.maximum.y-n.minimum.y>L.Epsilon?n.maximum.y-n.minimum.y:L.Epsilon,e.bbSize.z=n.maximum.z-n.minimum.z>L.Epsilon?n.maximum.z-n.minimum.z:L.Epsilon;var h=e.bbSize.x>e.bbSize.y?e.bbSize.x:e.bbSize.y;if(h=h>e.bbSize.z?h:e.bbSize.z,e.subDiv.max=e.partitioningSubdivisions,e.subDiv.X=Math.floor(e.subDiv.max*e.bbSize.x/h),e.subDiv.Y=Math.floor(e.subDiv.max*e.bbSize.y/h),e.subDiv.Z=Math.floor(e.subDiv.max*e.bbSize.z/h),e.subDiv.X=e.subDiv.X<1?1:e.subDiv.X,e.subDiv.Y=e.subDiv.Y<1?1:e.subDiv.Y,e.subDiv.Z=e.subDiv.Z<1?1:e.subDiv.Z,e.facetParameters.facetNormals=this.getFacetLocalNormals(),e.facetParameters.facetPositions=this.getFacetLocalPositions(),e.facetParameters.facetPartitioning=this.getFacetLocalPartitioning(),e.facetParameters.bInfo=n,e.facetParameters.bbSize=e.bbSize,e.facetParameters.subDiv=e.subDiv,e.facetParameters.ratio=this.partitioningBBoxRatio,e.facetParameters.depthSort=e.facetDepthSort,e.facetDepthSort&&e.facetDepthSortEnabled&&(this.computeWorldMatrix(!0),this._worldMatrix.invertToRef(e.invertedMatrix),L.Vector3.TransformCoordinatesToRef(e.facetDepthSortFrom,e.invertedMatrix,e.facetDepthSortOrigin),e.facetParameters.distanceTo=e.facetDepthSortOrigin),e.facetParameters.depthSortedFacets=e.depthSortedFacets,L.VertexData.ComputeNormals(t,i,r,e.facetParameters),e.facetDepthSort&&e.facetDepthSortEnabled){e.depthSortedFacets.sort(e.facetDepthSortFunction);var u=e.depthSortedIndices.length/3|0;for(l=0;l<u;l++){var d=e.depthSortedFacets[l].ind;e.depthSortedIndices[3*l]=i[d],e.depthSortedIndices[3*l+1]=i[d+1],e.depthSortedIndices[3*l+2]=i[d+2]}this.updateIndices(e.depthSortedIndices)}return this},i.prototype.getFacetLocalNormals=function(){return this._facetData.facetNormals||this.updateFacetData(),this._facetData.facetNormals},i.prototype.getFacetLocalPositions=function(){return this._facetData.facetPositions||this.updateFacetData(),this._facetData.facetPositions},i.prototype.getFacetLocalPartitioning=function(){return this._facetData.facetPartitioning||this.updateFacetData(),this._facetData.facetPartitioning},i.prototype.getFacetPosition=function(e){var t=L.Vector3.Zero();return this.getFacetPositionToRef(e,t),t},i.prototype.getFacetPositionToRef=function(e,t){var i=this.getFacetLocalPositions()[e],r=this.getWorldMatrix();return L.Vector3.TransformCoordinatesToRef(i,r,t),this},i.prototype.getFacetNormal=function(e){var t=L.Vector3.Zero();return this.getFacetNormalToRef(e,t),t},i.prototype.getFacetNormalToRef=function(e,t){var i=this.getFacetLocalNormals()[e];return L.Vector3.TransformNormalToRef(i,this.getWorldMatrix(),t),this},i.prototype.getFacetsAtLocalCoordinates=function(e,t,i){var r=this.getBoundingInfo(),n=this._facetData,o=Math.floor((e-r.minimum.x*n.partitioningBBoxRatio)*n.subDiv.X*n.partitioningBBoxRatio/n.bbSize.x),s=Math.floor((t-r.minimum.y*n.partitioningBBoxRatio)*n.subDiv.Y*n.partitioningBBoxRatio/n.bbSize.y),a=Math.floor((i-r.minimum.z*n.partitioningBBoxRatio)*n.subDiv.Z*n.partitioningBBoxRatio/n.bbSize.z);return o<0||o>n.subDiv.max||s<0||s>n.subDiv.max||a<0||a>n.subDiv.max?null:n.facetPartitioning[o+n.subDiv.max*s+n.subDiv.max*n.subDiv.max*a]},i.prototype.getClosestFacetAtCoordinates=function(e,t,i,r,n,o){void 0===n&&(n=!1),void 0===o&&(o=!0);var s=this.getWorldMatrix(),a=L.Tmp.Matrix[5];s.invertToRef(a);var l=L.Tmp.Vector3[8];L.Vector3.TransformCoordinatesFromFloatsToRef(e,t,i,a,l);var c=this.getClosestFacetAtLocalCoordinates(l.x,l.y,l.z,r,n,o);return r&&L.Vector3.TransformCoordinatesFromFloatsToRef(r.x,r.y,r.z,s,r),c},i.prototype.getClosestFacetAtLocalCoordinates=function(e,t,i,r,n,o){void 0===n&&(n=!1),void 0===o&&(o=!0);var s=null,a=0,l=0,c=0,h=0,u=0,d=0,f=0,p=0,_=this.getFacetLocalPositions(),m=this.getFacetLocalNormals(),g=this.getFacetsAtLocalCoordinates(e,t,i);if(!g)return null;for(var v,y,b,T=Number.MAX_VALUE,E=T,x=0;x<g.length;x++)y=m[v=g[x]],h=(e-(b=_[v]).x)*y.x+(t-b.y)*y.y+(i-b.z)*y.z,(!n||n&&o&&0<=h||n&&!o&&h<=0)&&(h=y.x*b.x+y.y*b.y+y.z*b.z,u=-(y.x*e+y.y*t+y.z*i-h)/(y.x*y.x+y.y*y.y+y.z*y.z),(E=(a=(d=e+y.x*u)-e)*a+(l=(f=t+y.y*u)-t)*l+(c=(p=i+y.z*u)-i)*c)<T&&(T=E,s=v,r&&(r.x=d,r.y=f,r.z=p)));return s},i.prototype.getFacetDataParameters=function(){return this._facetData.facetParameters},i.prototype.disableFacetData=function(){return this._facetData.facetDataEnabled&&(this._facetData.facetDataEnabled=!1,this._facetData.facetPositions=new Array,this._facetData.facetNormals=new Array,this._facetData.facetPartitioning=new Array,this._facetData.facetParameters=null,this._facetData.depthSortedIndices=new Uint32Array(0)),this},i.prototype.updateIndices=function(e){return this},i.prototype.createNormals=function(e){var t,i=this.getVerticesData(L.VertexBuffer.PositionKind),r=this.getIndices();return t=this.isVerticesDataPresent(L.VertexBuffer.NormalKind)?this.getVerticesData(L.VertexBuffer.NormalKind):[],L.VertexData.ComputeNormals(i,r,t,{useRightHandedSystem:this.getScene().useRightHandedSystem}),this.setVerticesData(L.VertexBuffer.NormalKind,t,e),this},i.prototype.alignWithNormal=function(e,t){t||(t=L.Axis.Y);var i=L.Tmp.Vector3[0],r=L.Tmp.Vector3[1];return L.Vector3.CrossToRef(t,e,r),L.Vector3.CrossToRef(e,r,i),this.rotationQuaternion?L.Quaternion.RotationQuaternionFromAxisToRef(i,e,r,this.rotationQuaternion):L.Vector3.RotationFromAxisToRef(i,e,r,this.rotation),this},i.prototype._checkOcclusionQuery=function(){return!1},i.OCCLUSION_TYPE_NONE=0,i.OCCLUSION_TYPE_OPTIMISTIC=1,i.OCCLUSION_TYPE_STRICT=2,i.OCCLUSION_ALGORITHM_TYPE_ACCURATE=0,i.OCCLUSION_ALGORITHM_TYPE_CONSERVATIVE=1,i.CULLINGSTRATEGY_STANDARD=0,i.CULLINGSTRATEGY_BOUNDINGSPHERE_ONLY=1,i})(L.TransformNode),L.AbstractMesh=B,N=$a||($a={}),V=(function(n){function s(e,t){var i=n.call(this,e,t)||this;return i.diffuse=new N.Color3(1,1,1),i.specular=new N.Color3(1,1,1),i.falloffType=s.FALLOFF_DEFAULT,i.intensity=1,i._range=Number.MAX_VALUE,i._inverseSquaredRange=0,i._photometricScale=1,i._intensityMode=s.INTENSITYMODE_AUTOMATIC,i._radius=1e-5,i.renderPriority=0,i._shadowEnabled=!0,i._excludeWithLayerMask=0,i._includeOnlyWithLayerMask=0,i._lightmapMode=0,i._excludedMeshesIds=new Array,i._includedOnlyMeshesIds=new Array,i.getScene().addLight(i),i._uniformBuffer=new N.UniformBuffer(i.getScene().getEngine()),i._buildUniformLayout(),i.includedOnlyMeshes=new Array,i.excludedMeshes=new Array,i._resyncMeshes(),i}return T(s,n),Object.defineProperty(s.prototype,\"range\",{get:function(){return this._range},set:function(e){this._range=e,this._inverseSquaredRange=1/(this.range*this.range)},enumerable:!0,configurable:!0}),Object.defineProperty(s.prototype,\"intensityMode\",{get:function(){return this._intensityMode},set:function(e){this._intensityMode=e,this._computePhotometricScale()},enumerable:!0,configurable:!0}),Object.defineProperty(s.prototype,\"radius\",{get:function(){return this._radius},set:function(e){this._radius=e,this._computePhotometricScale()},enumerable:!0,configurable:!0}),Object.defineProperty(s.prototype,\"shadowEnabled\",{get:function(){return this._shadowEnabled},set:function(e){this._shadowEnabled!==e&&(this._shadowEnabled=e,this._markMeshesAsLightDirty())},enumerable:!0,configurable:!0}),Object.defineProperty(s.prototype,\"includedOnlyMeshes\",{get:function(){return this._includedOnlyMeshes},set:function(e){this._includedOnlyMeshes=e,this._hookArrayForIncludedOnly(e)},enumerable:!0,configurable:!0}),Object.defineProperty(s.prototype,\"excludedMeshes\",{get:function(){return this._excludedMeshes},set:function(e){this._excludedMeshes=e,this._hookArrayForExcluded(e)},enumerable:!0,configurable:!0}),Object.defineProperty(s.prototype,\"excludeWithLayerMask\",{get:function(){return this._excludeWithLayerMask},set:function(e){this._excludeWithLayerMask=e,this._resyncMeshes()},enumerable:!0,configurable:!0}),Object.defineProperty(s.prototype,\"includeOnlyWithLayerMask\",{get:function(){return this._includeOnlyWithLayerMask},set:function(e){this._includeOnlyWithLayerMask=e,this._resyncMeshes()},enumerable:!0,configurable:!0}),Object.defineProperty(s.prototype,\"lightmapMode\",{get:function(){return this._lightmapMode},set:function(e){this._lightmapMode!==e&&(this._lightmapMode=e,this._markMeshesAsLightDirty())},enumerable:!0,configurable:!0}),s.prototype.getClassName=function(){return\"Light\"},s.prototype.toString=function(e){var t=\"Name: \"+this.name;if(t+=\", type: \"+[\"Point\",\"Directional\",\"Spot\",\"Hemispheric\"][this.getTypeID()],this.animations)for(var i=0;i<this.animations.length;i++)t+=\", animation[0]: \"+this.animations[i].toString(e);return t},s.prototype._syncParentEnabledState=function(){n.prototype._syncParentEnabledState.call(this),this._resyncMeshes()},s.prototype.setEnabled=function(e){n.prototype.setEnabled.call(this,e),this._resyncMeshes()},s.prototype.getShadowGenerator=function(){return this._shadowGenerator},s.prototype.getAbsolutePosition=function(){return N.Vector3.Zero()},s.prototype.canAffectMesh=function(e){return!e||!(this.includedOnlyMeshes&&0<this.includedOnlyMeshes.length&&-1===this.includedOnlyMeshes.indexOf(e))&&(!(this.excludedMeshes&&0<this.excludedMeshes.length&&-1!==this.excludedMeshes.indexOf(e))&&((0===this.includeOnlyWithLayerMask||0!=(this.includeOnlyWithLayerMask&e.layerMask))&&!(0!==this.excludeWithLayerMask&&this.excludeWithLayerMask&e.layerMask)))},s.CompareLightsPriority=function(e,t){return e.shadowEnabled!==t.shadowEnabled?(t.shadowEnabled?1:0)-(e.shadowEnabled?1:0):t.renderPriority-e.renderPriority},s.prototype.dispose=function(e,t){void 0===t&&(t=!1),this._shadowGenerator&&(this._shadowGenerator.dispose(),this._shadowGenerator=null),this.getScene().stopAnimation(this);for(var i=0,r=this.getScene().meshes;i<r.length;i++){r[i]._removeLightSource(this)}this._uniformBuffer.dispose(),this.getScene().removeLight(this),n.prototype.dispose.call(this,e,t)},s.prototype.getTypeID=function(){return 0},s.prototype.getScaledIntensity=function(){return this._photometricScale*this.intensity},s.prototype.clone=function(e){var t=s.GetConstructorFromName(this.getTypeID(),e,this.getScene());return t?N.SerializationHelper.Clone(t,this):null},s.prototype.serialize=function(){var t=N.SerializationHelper.Serialize(this);return t.type=this.getTypeID(),this.parent&&(t.parentId=this.parent.id),0<this.excludedMeshes.length&&(t.excludedMeshesIds=[],this.excludedMeshes.forEach((function(e){t.excludedMeshesIds.push(e.id)}))),0<this.includedOnlyMeshes.length&&(t.includedOnlyMeshesIds=[],this.includedOnlyMeshes.forEach((function(e){t.includedOnlyMeshesIds.push(e.id)}))),N.Animation.AppendSerializedAnimations(this,t),t.ranges=this.serializeAnimationRanges(),t},s.GetConstructorFromName=function(e,t,i){var r=N.Node.Construct(\"Light_Type_\"+e,t,i);return r||null},s.Parse=function(e,t){var i=s.GetConstructorFromName(e.type,e.name,t);if(!i)return null;var r=N.SerializationHelper.Parse(i,e,t);if(e.excludedMeshesIds&&(r._excludedMeshesIds=e.excludedMeshesIds),e.includedOnlyMeshesIds&&(r._includedOnlyMeshesIds=e.includedOnlyMeshesIds),e.parentId&&(r._waitingParentId=e.parentId),e.animations){for(var n=0;n<e.animations.length;n++){var o=e.animations[n];r.animations.push(N.Animation.Parse(o))}N.Node.ParseAnimationRanges(r,e,t)}return e.autoAnimate&&t.beginAnimation(r,e.autoAnimateFrom,e.autoAnimateTo,e.autoAnimateLoop,e.autoAnimateSpeed||1),r},s.prototype._hookArrayForExcluded=function(o){var s=this,a=o.push;o.push=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];for(var i=a.apply(o,e),r=0,n=e;r<n.length;r++){n[r]._resyncLighSource(s)}return i};var l=o.splice;o.splice=function(e,t){for(var i=l.apply(o,[e,t]),r=0,n=i;r<n.length;r++){n[r]._resyncLighSource(s)}return i};for(var e=0,t=o;e<t.length;e++){t[e]._resyncLighSource(this)}},s.prototype._hookArrayForIncludedOnly=function(r){var n=this,o=r.push;r.push=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var i=o.apply(r,e);return n._resyncMeshes(),i};var s=r.splice;r.splice=function(e,t){var i=s.apply(r,[e,t]);return n._resyncMeshes(),i},this._resyncMeshes()},s.prototype._resyncMeshes=function(){for(var e=0,t=this.getScene().meshes;e<t.length;e++){t[e]._resyncLighSource(this)}},s.prototype._markMeshesAsLightDirty=function(){for(var e=0,t=this.getScene().meshes;e<t.length;e++){var i=t[e];-1!==i._lightSources.indexOf(this)&&i._markSubMeshesAsLightDirty()}},s.prototype._computePhotometricScale=function(){this._photometricScale=this._getPhotometricScale(),this.getScene().resetCachedMaterial()},s.prototype._getPhotometricScale=function(){var e=0,t=this.getTypeID(),i=this.intensityMode;switch(i===s.INTENSITYMODE_AUTOMATIC&&(i=t===s.LIGHTTYPEID_DIRECTIONALLIGHT?s.INTENSITYMODE_ILLUMINANCE:s.INTENSITYMODE_LUMINOUSINTENSITY),t){case s.LIGHTTYPEID_POINTLIGHT:case s.LIGHTTYPEID_SPOTLIGHT:switch(i){case s.INTENSITYMODE_LUMINOUSPOWER:e=1/(4*Math.PI);break;case s.INTENSITYMODE_LUMINOUSINTENSITY:e=1;break;case s.INTENSITYMODE_LUMINANCE:e=this.radius*this.radius}break;case s.LIGHTTYPEID_DIRECTIONALLIGHT:switch(i){case s.INTENSITYMODE_ILLUMINANCE:e=1;break;case s.INTENSITYMODE_LUMINANCE:var r=this.radius;r=Math.max(r,.001),e=2*Math.PI*(1-Math.cos(r))}break;case s.LIGHTTYPEID_HEMISPHERICLIGHT:e=1}return e},s.prototype._reorderLightsInScene=function(){var e=this.getScene();0!=this._renderPriority&&(e.requireLightSorting=!0),this.getScene().sortLightsByPriority()},s.FALLOFF_DEFAULT=0,s.FALLOFF_PHYSICAL=1,s.FALLOFF_GLTF=2,s.FALLOFF_STANDARD=3,s.LIGHTMAP_DEFAULT=0,s.LIGHTMAP_SPECULAR=1,s.LIGHTMAP_SHADOWSONLY=2,s.INTENSITYMODE_AUTOMATIC=0,s.INTENSITYMODE_LUMINOUSPOWER=1,s.INTENSITYMODE_LUMINOUSINTENSITY=2,s.INTENSITYMODE_ILLUMINANCE=3,s.INTENSITYMODE_LUMINANCE=4,s.LIGHTTYPEID_POINTLIGHT=0,s.LIGHTTYPEID_DIRECTIONALLIGHT=1,s.LIGHTTYPEID_SPOTLIGHT=2,s.LIGHTTYPEID_HEMISPHERICLIGHT=3,b([N.serializeAsColor3()],s.prototype,\"diffuse\",void 0),b([N.serializeAsColor3()],s.prototype,\"specular\",void 0),b([N.serialize()],s.prototype,\"falloffType\",void 0),b([N.serialize()],s.prototype,\"intensity\",void 0),b([N.serialize()],s.prototype,\"range\",null),b([N.serialize()],s.prototype,\"intensityMode\",null),b([N.serialize()],s.prototype,\"radius\",null),b([N.serialize()],s.prototype,\"_renderPriority\",void 0),b([N.expandToProperty(\"_reorderLightsInScene\")],s.prototype,\"renderPriority\",void 0),b([N.serialize(\"shadowEnabled\")],s.prototype,\"_shadowEnabled\",void 0),b([N.serialize(\"excludeWithLayerMask\")],s.prototype,\"_excludeWithLayerMask\",void 0),b([N.serialize(\"includeOnlyWithLayerMask\")],s.prototype,\"_includeOnlyWithLayerMask\",void 0),b([N.serialize(\"lightmapMode\")],s.prototype,\"_lightmapMode\",void 0),s})(N.Node),N.Light=V,U=$a||($a={}),z=(function(o){function c(e,t,i,r){void 0===r&&(r=!0);var n=o.call(this,e,i)||this;return n.upVector=U.Vector3.Up(),n.orthoLeft=null,n.orthoRight=null,n.orthoBottom=null,n.orthoTop=null,n.fov=.8,n.minZ=1,n.maxZ=1e4,n.inertia=.9,n.mode=c.PERSPECTIVE_CAMERA,n.isIntermediate=!1,n.viewport=new U.Viewport(0,0,1,1),n.layerMask=268435455,n.fovMode=c.FOVMODE_VERTICAL_FIXED,n.cameraRigMode=c.RIG_MODE_NONE,n.customRenderTargets=new Array,n.onViewMatrixChangedObservable=new U.Observable,n.onProjectionMatrixChangedObservable=new U.Observable,n.onAfterCheckInputsObservable=new U.Observable,n.onRestoreStateObservable=new U.Observable,n._rigCameras=new Array,n._webvrViewMatrix=U.Matrix.Identity(),n._skipRendering=!1,n._projectionMatrix=new U.Matrix,n._postProcesses=new Array,n._activeMeshes=new U.SmartArray(256),n._globalPosition=U.Vector3.Zero(),n._computedViewMatrix=U.Matrix.Identity(),n._doNotComputeProjectionMatrix=!1,n._transformMatrix=U.Matrix.Zero(),n._refreshFrustumPlanes=!0,n.getScene().addCamera(n),r&&!n.getScene().activeCamera&&(n.getScene().activeCamera=n),n.position=t,n}return T(c,o),c.prototype.storeState=function(){return this._stateStored=!0,this._storedFov=this.fov,this},c.prototype._restoreStateValues=function(){return!!this._stateStored&&(this.fov=this._storedFov,!0)},c.prototype.restoreState=function(){return!!this._restoreStateValues()&&(this.onRestoreStateObservable.notifyObservers(this),!0)},c.prototype.getClassName=function(){return\"Camera\"},c.prototype.toString=function(e){var t=\"Name: \"+this.name;if(t+=\", type: \"+this.getClassName(),this.animations)for(var i=0;i<this.animations.length;i++)t+=\", animation[0]: \"+this.animations[i].toString(e);return t},Object.defineProperty(c.prototype,\"globalPosition\",{get:function(){return this._globalPosition},enumerable:!0,configurable:!0}),c.prototype.getActiveMeshes=function(){return this._activeMeshes},c.prototype.isActiveMesh=function(e){return-1!==this._activeMeshes.indexOf(e)},c.prototype.isReady=function(e){if(void 0===e&&(e=!1),e)for(var t=0,i=this._postProcesses;t<i.length;t++){var r=i[t];if(r&&!r.isReady())return!1}return o.prototype.isReady.call(this,e)},c.prototype._initCache=function(){o.prototype._initCache.call(this),this._cache.position=new U.Vector3(Number.MAX_VALUE,Number.MAX_VALUE,Number.MAX_VALUE),this._cache.upVector=new U.Vector3(Number.MAX_VALUE,Number.MAX_VALUE,Number.MAX_VALUE),this._cache.mode=void 0,this._cache.minZ=void 0,this._cache.maxZ=void 0,this._cache.fov=void 0,this._cache.fovMode=void 0,this._cache.aspectRatio=void 0,this._cache.orthoLeft=void 0,this._cache.orthoRight=void 0,this._cache.orthoBottom=void 0,this._cache.orthoTop=void 0,this._cache.renderWidth=void 0,this._cache.renderHeight=void 0},c.prototype._updateCache=function(e){e||o.prototype._updateCache.call(this),this._cache.position.copyFrom(this.position),this._cache.upVector.copyFrom(this.upVector)},c.prototype._isSynchronized=function(){return this._isSynchronizedViewMatrix()&&this._isSynchronizedProjectionMatrix()},c.prototype._isSynchronizedViewMatrix=function(){return!!o.prototype._isSynchronized.call(this)&&(this._cache.position.equals(this.position)&&this._cache.upVector.equals(this.upVector)&&this.isSynchronizedWithParent())},c.prototype._isSynchronizedProjectionMatrix=function(){var e=this._cache.mode===this.mode&&this._cache.minZ===this.minZ&&this._cache.maxZ===this.maxZ;if(!e)return!1;var t=this.getEngine();return e=this.mode===c.PERSPECTIVE_CAMERA?this._cache.fov===this.fov&&this._cache.fovMode===this.fovMode&&this._cache.aspectRatio===t.getAspectRatio(this):this._cache.orthoLeft===this.orthoLeft&&this._cache.orthoRight===this.orthoRight&&this._cache.orthoBottom===this.orthoBottom&&this._cache.orthoTop===this.orthoTop&&this._cache.renderWidth===t.getRenderWidth()&&this._cache.renderHeight===t.getRenderHeight()},c.prototype.attachControl=function(e,t){},c.prototype.detachControl=function(e){},c.prototype.update=function(){this._checkInputs(),this.cameraRigMode!==c.RIG_MODE_NONE&&this._updateRigCameras()},c.prototype._checkInputs=function(){this.onAfterCheckInputsObservable.notifyObservers(this)},Object.defineProperty(c.prototype,\"rigCameras\",{get:function(){return this._rigCameras},enumerable:!0,configurable:!0}),Object.defineProperty(c.prototype,\"rigPostProcess\",{get:function(){return this._rigPostProcess},enumerable:!0,configurable:!0}),c.prototype._getFirstPostProcess=function(){for(var e=0;e<this._postProcesses.length;e++)if(null!==this._postProcesses[e])return this._postProcesses[e];return null},c.prototype._cascadePostProcessesToRigCams=function(){var e=this._getFirstPostProcess();e&&e.markTextureDirty();for(var t=0,i=this._rigCameras.length;t<i;t++){var r=this._rigCameras[t],n=r._rigPostProcess;if(n)n instanceof U.PassPostProcess&&(r.isIntermediate=0===this._postProcesses.length),r._postProcesses=this._postProcesses.slice(0).concat(n),n.markTextureDirty();else r._postProcesses=this._postProcesses.slice(0)}},c.prototype.attachPostProcess=function(e,t){return void 0===t&&(t=null),!e.isReusable()&&-1<this._postProcesses.indexOf(e)?(U.Tools.Error(\"You're trying to reuse a post process not defined as reusable.\"),0):(null==t||t<0?this._postProcesses.push(e):null===this._postProcesses[t]?this._postProcesses[t]=e:this._postProcesses.splice(t,0,e),this._cascadePostProcessesToRigCams(),this._postProcesses.indexOf(e))},c.prototype.detachPostProcess=function(e){var t=this._postProcesses.indexOf(e);-1!==t&&(this._postProcesses[t]=null),this._cascadePostProcessesToRigCams()},c.prototype.getWorldMatrix=function(){return this._isSynchronizedViewMatrix()||this.getViewMatrix(),this._worldMatrix},c.prototype._getViewMatrix=function(){return U.Matrix.Identity()},c.prototype.getViewMatrix=function(e){return!e&&this._isSynchronizedViewMatrix()||(this.updateCache(),this._computedViewMatrix=this._getViewMatrix(),this._currentRenderId=this.getScene().getRenderId(),this._childRenderId=this._currentRenderId,this._refreshFrustumPlanes=!0,this._cameraRigParams&&this._cameraRigParams.vrPreViewMatrix&&this._computedViewMatrix.multiplyToRef(this._cameraRigParams.vrPreViewMatrix,this._computedViewMatrix),this.onViewMatrixChangedObservable.notifyObservers(this),this._computedViewMatrix.invertToRef(this._worldMatrix)),this._computedViewMatrix},c.prototype.freezeProjectionMatrix=function(e){this._doNotComputeProjectionMatrix=!0,void 0!==e&&(this._projectionMatrix=e)},c.prototype.unfreezeProjectionMatrix=function(){this._doNotComputeProjectionMatrix=!1},c.prototype.getProjectionMatrix=function(e){if(this._doNotComputeProjectionMatrix||!e&&this._isSynchronizedProjectionMatrix())return this._projectionMatrix;this._cache.mode=this.mode,this._cache.minZ=this.minZ,this._cache.maxZ=this.maxZ,this._refreshFrustumPlanes=!0;var t=this.getEngine(),i=this.getScene();if(this.mode===c.PERSPECTIVE_CAMERA)this._cache.fov=this.fov,this._cache.fovMode=this.fovMode,this._cache.aspectRatio=t.getAspectRatio(this),this.minZ<=0&&(this.minZ=.1),i.useRightHandedSystem?U.Matrix.PerspectiveFovRHToRef(this.fov,t.getAspectRatio(this),this.minZ,this.maxZ,this._projectionMatrix,this.fovMode===c.FOVMODE_VERTICAL_FIXED):U.Matrix.PerspectiveFovLHToRef(this.fov,t.getAspectRatio(this),this.minZ,this.maxZ,this._projectionMatrix,this.fovMode===c.FOVMODE_VERTICAL_FIXED);else{var r=t.getRenderWidth()/2,n=t.getRenderHeight()/2;i.useRightHandedSystem?U.Matrix.OrthoOffCenterRHToRef(this.orthoLeft||-r,this.orthoRight||r,this.orthoBottom||-n,this.orthoTop||n,this.minZ,this.maxZ,this._projectionMatrix):U.Matrix.OrthoOffCenterLHToRef(this.orthoLeft||-r,this.orthoRight||r,this.orthoBottom||-n,this.orthoTop||n,this.minZ,this.maxZ,this._projectionMatrix),this._cache.orthoLeft=this.orthoLeft,this._cache.orthoRight=this.orthoRight,this._cache.orthoBottom=this.orthoBottom,this._cache.orthoTop=this.orthoTop,this._cache.renderWidth=t.getRenderWidth(),this._cache.renderHeight=t.getRenderHeight()}return this.onProjectionMatrixChangedObservable.notifyObservers(this),this._projectionMatrix},c.prototype.getTransformationMatrix=function(){return this._computedViewMatrix.multiplyToRef(this._projectionMatrix,this._transformMatrix),this._transformMatrix},c.prototype._updateFrustumPlanes=function(){this._refreshFrustumPlanes&&(this.getTransformationMatrix(),this._frustumPlanes?U.Frustum.GetPlanesToRef(this._transformMatrix,this._frustumPlanes):this._frustumPlanes=U.Frustum.GetPlanes(this._transformMatrix),this._refreshFrustumPlanes=!1)},c.prototype.isInFrustum=function(e){return this._updateFrustumPlanes(),e.isInFrustum(this._frustumPlanes)},c.prototype.isCompletelyInFrustum=function(e){return this._updateFrustumPlanes(),e.isCompletelyInFrustum(this._frustumPlanes)},c.prototype.getForwardRay=function(e,t,i){void 0===e&&(e=100),t||(t=this.getWorldMatrix()),i||(i=this.position);var r=this._scene.useRightHandedSystem?new U.Vector3(0,0,-1):new U.Vector3(0,0,1),n=U.Vector3.TransformNormal(r,t),o=U.Vector3.Normalize(n);return new U.Ray(i,o,e)},c.prototype.dispose=function(e,t){for(void 0===t&&(t=!1),this.onViewMatrixChangedObservable.clear(),this.onProjectionMatrixChangedObservable.clear(),this.onAfterCheckInputsObservable.clear(),this.onRestoreStateObservable.clear(),this.inputs&&this.inputs.clear(),this.getScene().stopAnimation(this),this.getScene().removeCamera(this);0<this._rigCameras.length;){var i=this._rigCameras.pop();i&&i.dispose()}if(this._rigPostProcess)this._rigPostProcess.dispose(this),this._rigPostProcess=null,this._postProcesses=[];else if(this.cameraRigMode!==c.RIG_MODE_NONE)this._rigPostProcess=null,this._postProcesses=[];else for(var r=this._postProcesses.length;0<=--r;){var n=this._postProcesses[r];n&&n.dispose(this)}for(r=this.customRenderTargets.length;0<=--r;)this.customRenderTargets[r].dispose();this.customRenderTargets=[],this._activeMeshes.dispose(),o.prototype.dispose.call(this,e,t)},Object.defineProperty(c.prototype,\"leftCamera\",{get:function(){return this._rigCameras.length<1?null:this._rigCameras[0]},enumerable:!0,configurable:!0}),Object.defineProperty(c.prototype,\"rightCamera\",{get:function(){return this._rigCameras.length<2?null:this._rigCameras[1]},enumerable:!0,configurable:!0}),c.prototype.getLeftTarget=function(){return this._rigCameras.length<1?null:this._rigCameras[0].getTarget()},c.prototype.getRightTarget=function(){return this._rigCameras.length<2?null:this._rigCameras[1].getTarget()},c.prototype.setCameraRigMode=function(e,t){if(this.cameraRigMode!==e){for(;0<this._rigCameras.length;){var i=this._rigCameras.pop();i&&i.dispose()}if(this.cameraRigMode=e,this._cameraRigParams={},this._cameraRigParams.interaxialDistance=t.interaxialDistance||.0637,this._cameraRigParams.stereoHalfAngle=U.Tools.ToRadians(this._cameraRigParams.interaxialDistance/.0637),this.cameraRigMode!==c.RIG_MODE_NONE){var r=this.createRigCamera(this.name+\"_L\",0),n=this.createRigCamera(this.name+\"_R\",1);r&&n&&(this._rigCameras.push(r),this._rigCameras.push(n))}switch(this.cameraRigMode){case c.RIG_MODE_STEREOSCOPIC_ANAGLYPH:this._rigCameras[0]._rigPostProcess=new U.PassPostProcess(this.name+\"_passthru\",1,this._rigCameras[0]),this._rigCameras[1]._rigPostProcess=new U.AnaglyphPostProcess(this.name+\"_anaglyph\",1,this._rigCameras);break;case c.RIG_MODE_STEREOSCOPIC_SIDEBYSIDE_PARALLEL:case c.RIG_MODE_STEREOSCOPIC_SIDEBYSIDE_CROSSEYED:case c.RIG_MODE_STEREOSCOPIC_OVERUNDER:var o=this.cameraRigMode===c.RIG_MODE_STEREOSCOPIC_SIDEBYSIDE_PARALLEL||this.cameraRigMode===c.RIG_MODE_STEREOSCOPIC_SIDEBYSIDE_CROSSEYED;this._rigCameras[0]._rigPostProcess=new U.PassPostProcess(this.name+\"_passthru\",1,this._rigCameras[0]),this._rigCameras[1]._rigPostProcess=new U.StereoscopicInterlacePostProcess(this.name+\"_stereoInterlace\",this._rigCameras,o);break;case c.RIG_MODE_VR:var s=t.vrCameraMetrics||U.VRCameraMetrics.GetDefault();this._rigCameras[0]._cameraRigParams.vrMetrics=s,this._rigCameras[0].viewport=new U.Viewport(0,0,.5,1),this._rigCameras[0]._cameraRigParams.vrWorkMatrix=new U.Matrix,this._rigCameras[0]._cameraRigParams.vrHMatrix=s.leftHMatrix,this._rigCameras[0]._cameraRigParams.vrPreViewMatrix=s.leftPreViewMatrix,this._rigCameras[0].getProjectionMatrix=this._rigCameras[0]._getVRProjectionMatrix,this._rigCameras[1]._cameraRigParams.vrMetrics=s,this._rigCameras[1].viewport=new U.Viewport(.5,0,.5,1),this._rigCameras[1]._cameraRigParams.vrWorkMatrix=new U.Matrix,this._rigCameras[1]._cameraRigParams.vrHMatrix=s.rightHMatrix,this._rigCameras[1]._cameraRigParams.vrPreViewMatrix=s.rightPreViewMatrix,this._rigCameras[1].getProjectionMatrix=this._rigCameras[1]._getVRProjectionMatrix,s.compensateDistortion&&(this._rigCameras[0]._rigPostProcess=new U.VRDistortionCorrectionPostProcess(\"VR_Distort_Compensation_Left\",this._rigCameras[0],!1,s),this._rigCameras[1]._rigPostProcess=new U.VRDistortionCorrectionPostProcess(\"VR_Distort_Compensation_Right\",this._rigCameras[1],!0,s));break;case c.RIG_MODE_WEBVR:if(t.vrDisplay){var a=t.vrDisplay.getEyeParameters(\"left\"),l=t.vrDisplay.getEyeParameters(\"right\");this._rigCameras[0].viewport=new U.Viewport(0,0,.5,1),this._rigCameras[0].setCameraRigParameter(\"left\",!0),this._rigCameras[0].setCameraRigParameter(\"specs\",t.specs),this._rigCameras[0].setCameraRigParameter(\"eyeParameters\",a),this._rigCameras[0].setCameraRigParameter(\"frameData\",t.frameData),this._rigCameras[0].setCameraRigParameter(\"parentCamera\",t.parentCamera),this._rigCameras[0]._cameraRigParams.vrWorkMatrix=new U.Matrix,this._rigCameras[0].getProjectionMatrix=this._getWebVRProjectionMatrix,(this._rigCameras[0].parent=this)._rigCameras[0]._getViewMatrix=this._getWebVRViewMatrix,this._rigCameras[1].viewport=new U.Viewport(.5,0,.5,1),this._rigCameras[1].setCameraRigParameter(\"eyeParameters\",l),this._rigCameras[1].setCameraRigParameter(\"specs\",t.specs),this._rigCameras[1].setCameraRigParameter(\"frameData\",t.frameData),this._rigCameras[1].setCameraRigParameter(\"parentCamera\",t.parentCamera),this._rigCameras[1]._cameraRigParams.vrWorkMatrix=new U.Matrix,this._rigCameras[1].getProjectionMatrix=this._getWebVRProjectionMatrix,(this._rigCameras[1].parent=this)._rigCameras[1]._getViewMatrix=this._getWebVRViewMatrix,c.UseAlternateWebVRRendering&&(this._rigCameras[1]._skipRendering=!0,this._rigCameras[0]._alternateCamera=this._rigCameras[1])}}this._cascadePostProcessesToRigCams(),this.update()}},c.prototype._getVRProjectionMatrix=function(){return U.Matrix.PerspectiveFovLHToRef(this._cameraRigParams.vrMetrics.aspectRatioFov,this._cameraRigParams.vrMetrics.aspectRatio,this.minZ,this.maxZ,this._cameraRigParams.vrWorkMatrix),this._cameraRigParams.vrWorkMatrix.multiplyToRef(this._cameraRigParams.vrHMatrix,this._projectionMatrix),this._projectionMatrix},c.prototype._updateCameraRotationMatrix=function(){},c.prototype._updateWebVRCameraRotationMatrix=function(){},c.prototype._getWebVRProjectionMatrix=function(){return U.Matrix.Identity()},c.prototype._getWebVRViewMatrix=function(){return U.Matrix.Identity()},c.prototype.setCameraRigParameter=function(e,t){this._cameraRigParams||(this._cameraRigParams={}),this._cameraRigParams[e]=t,\"interaxialDistance\"===e&&(this._cameraRigParams.stereoHalfAngle=U.Tools.ToRadians(t/.0637))},c.prototype.createRigCamera=function(e,t){return null},c.prototype._updateRigCameras=function(){for(var e=0;e<this._rigCameras.length;e++)this._rigCameras[e].minZ=this.minZ,this._rigCameras[e].maxZ=this.maxZ,this._rigCameras[e].fov=this.fov;this.cameraRigMode===c.RIG_MODE_STEREOSCOPIC_ANAGLYPH&&(this._rigCameras[0].viewport=this._rigCameras[1].viewport=this.viewport)},c.prototype._setupInputs=function(){},c.prototype.serialize=function(){var e=U.SerializationHelper.Serialize(this);return e.type=this.getClassName(),this.parent&&(e.parentId=this.parent.id),this.inputs&&this.inputs.serialize(e),U.Animation.AppendSerializedAnimations(this,e),e.ranges=this.serializeAnimationRanges(),e},c.prototype.clone=function(e){return U.SerializationHelper.Clone(c.GetConstructorFromName(this.getClassName(),e,this.getScene(),this.interaxialDistance,this.isStereoscopicSideBySide),this)},c.prototype.getDirection=function(e){var t=U.Vector3.Zero();return this.getDirectionToRef(e,t),t},c.prototype.getDirectionToRef=function(e,t){U.Vector3.TransformNormalToRef(e,this.getWorldMatrix(),t)},c.GetConstructorFromName=function(e,t,i,r,n){void 0===r&&(r=0),void 0===n&&(n=!0);var o=U.Node.Construct(e,t,i,{interaxial_distance:r,isStereoscopicSideBySide:n});return o||function(){return new U.UniversalCamera(t,U.Vector3.Zero(),i)}},c.prototype.computeWorldMatrix=function(){return this.getWorldMatrix()},c.Parse=function(e,t){var i=e.type,r=c.GetConstructorFromName(i,e.name,t,e.interaxial_distance,e.isStereoscopicSideBySide),n=U.SerializationHelper.Parse(r,e,t);if(e.parentId&&(n._waitingParentId=e.parentId),n.inputs&&(n.inputs.parse(e),n._setupInputs()),n.setPosition&&(n.position.copyFromFloats(0,0,0),n.setPosition(U.Vector3.FromArray(e.position))),e.target&&n.setTarget&&n.setTarget(U.Vector3.FromArray(e.target)),e.cameraRigMode){var o=e.interaxial_distance?{interaxialDistance:e.interaxial_distance}:{};n.setCameraRigMode(e.cameraRigMode,o)}if(e.animations){for(var s=0;s<e.animations.length;s++){var a=e.animations[s];n.animations.push(U.Animation.Parse(a))}U.Node.ParseAnimationRanges(n,e,t)}return e.autoAnimate&&t.beginAnimation(n,e.autoAnimateFrom,e.autoAnimateTo,e.autoAnimateLoop,e.autoAnimateSpeed||1),n},c.PERSPECTIVE_CAMERA=0,c.ORTHOGRAPHIC_CAMERA=1,c.FOVMODE_VERTICAL_FIXED=0,c.FOVMODE_HORIZONTAL_FIXED=1,c.RIG_MODE_NONE=0,c.RIG_MODE_STEREOSCOPIC_ANAGLYPH=10,c.RIG_MODE_STEREOSCOPIC_SIDEBYSIDE_PARALLEL=11,c.RIG_MODE_STEREOSCOPIC_SIDEBYSIDE_CROSSEYED=12,c.RIG_MODE_STEREOSCOPIC_OVERUNDER=13,c.RIG_MODE_VR=20,c.RIG_MODE_WEBVR=21,c.ForceAttachControlToAlwaysPreventDefault=!1,c.UseAlternateWebVRRendering=!1,b([U.serializeAsVector3()],c.prototype,\"position\",void 0),b([U.serializeAsVector3()],c.prototype,\"upVector\",void 0),b([U.serialize()],c.prototype,\"orthoLeft\",void 0),b([U.serialize()],c.prototype,\"orthoRight\",void 0),b([U.serialize()],c.prototype,\"orthoBottom\",void 0),b([U.serialize()],c.prototype,\"orthoTop\",void 0),b([U.serialize()],c.prototype,\"fov\",void 0),b([U.serialize()],c.prototype,\"minZ\",void 0),b([U.serialize()],c.prototype,\"maxZ\",void 0),b([U.serialize()],c.prototype,\"inertia\",void 0),b([U.serialize()],c.prototype,\"mode\",void 0),b([U.serialize()],c.prototype,\"layerMask\",void 0),b([U.serialize()],c.prototype,\"fovMode\",void 0),b([U.serialize()],c.prototype,\"cameraRigMode\",void 0),b([U.serialize()],c.prototype,\"interaxialDistance\",void 0),b([U.serialize()],c.prototype,\"isStereoscopicSideBySide\",void 0),c})(U.Node),U.Camera=z,G=$a||($a={}),k=(function(){function p(e){this._useSceneAutoClearSetup=!1,this._renderingGroups=new Array,this._autoClearDepthStencil={},this._customOpaqueSortCompareFn={},this._customAlphaTestSortCompareFn={},this._customTransparentSortCompareFn={},this._renderingGroupInfo=new G.RenderingGroupInfo,this._scene=e;for(var t=p.MIN_RENDERINGGROUPS;t<p.MAX_RENDERINGGROUPS;t++)this._autoClearDepthStencil[t]={autoClear:!0,depth:!0,stencil:!0}}return p.prototype._clearDepthStencilBuffer=function(e,t){void 0===e&&(e=!0),void 0===t&&(t=!0),this._depthStencilBufferAlreadyCleaned||(this._scene.getEngine().clear(null,!1,e,t),this._depthStencilBufferAlreadyCleaned=!0)},p.prototype.render=function(e,t,i,r){var n=this._renderingGroupInfo;if(n.scene=this._scene,n.camera=this._scene.activeCamera,this._scene.spriteManagers&&r)for(var o=0;o<this._scene.spriteManagers.length;o++){var s=this._scene.spriteManagers[o];this.dispatchSprites(s)}for(o=p.MIN_RENDERINGGROUPS;o<p.MAX_RENDERINGGROUPS;o++){this._depthStencilBufferAlreadyCleaned=o===p.MIN_RENDERINGGROUPS;var a=this._renderingGroups[o];if(a){var l=Math.pow(2,o);if(n.renderingGroupId=o,this._scene.onBeforeRenderingGroupObservable.notifyObservers(n,l),p.AUTOCLEAR){var c=this._useSceneAutoClearSetup?this._scene.getAutoClearDepthStencilSetup(o):this._autoClearDepthStencil[o];c&&c.autoClear&&this._clearDepthStencilBuffer(c.depth,c.stencil)}for(var h=0,u=this._scene._beforeRenderingGroupDrawStage;h<u.length;h++){u[h].action(o)}a.render(e,r,i,t);for(var d=0,f=this._scene._afterRenderingGroupDrawStage;d<f.length;d++){f[d].action(o)}this._scene.onAfterRenderingGroupObservable.notifyObservers(n,l)}}},p.prototype.reset=function(){for(var e=p.MIN_RENDERINGGROUPS;e<p.MAX_RENDERINGGROUPS;e++){var t=this._renderingGroups[e];t&&t.prepare()}},p.prototype.dispose=function(){this.freeRenderingGroups(),this._renderingGroups.length=0,this._renderingGroupInfo=null},p.prototype.freeRenderingGroups=function(){for(var e=p.MIN_RENDERINGGROUPS;e<p.MAX_RENDERINGGROUPS;e++){var t=this._renderingGroups[e];t&&t.dispose()}},p.prototype._prepareRenderingGroup=function(e){void 0===this._renderingGroups[e]&&(this._renderingGroups[e]=new G.RenderingGroup(e,this._scene,this._customOpaqueSortCompareFn[e],this._customAlphaTestSortCompareFn[e],this._customTransparentSortCompareFn[e]))},p.prototype.dispatchSprites=function(e){var t=e.renderingGroupId||0;this._prepareRenderingGroup(t),this._renderingGroups[t].dispatchSprites(e)},p.prototype.dispatchParticles=function(e){var t=e.renderingGroupId||0;this._prepareRenderingGroup(t),this._renderingGroups[t].dispatchParticles(e)},p.prototype.dispatch=function(e,t,i){void 0===t&&(t=e.getMesh());var r=t.renderingGroupId||0;this._prepareRenderingGroup(r),this._renderingGroups[r].dispatch(e,t,i)},p.prototype.setRenderingOrder=function(e,t,i,r){if(void 0===t&&(t=null),void 0===i&&(i=null),void 0===r&&(r=null),this._customOpaqueSortCompareFn[e]=t,this._customAlphaTestSortCompareFn[e]=i,this._customTransparentSortCompareFn[e]=r,this._renderingGroups[e]){var n=this._renderingGroups[e];n.opaqueSortCompareFn=this._customOpaqueSortCompareFn[e],n.alphaTestSortCompareFn=this._customAlphaTestSortCompareFn[e],n.transparentSortCompareFn=this._customTransparentSortCompareFn[e]}},p.prototype.setRenderingAutoClearDepthStencil=function(e,t,i,r){void 0===i&&(i=!0),void 0===r&&(r=!0),this._autoClearDepthStencil[e]={autoClear:t,depth:i,stencil:r}},p.prototype.getAutoClearDepthStencilSetup=function(e){return this._autoClearDepthStencil[e]},p.MAX_RENDERINGGROUPS=4,p.MIN_RENDERINGGROUPS=0,p.AUTOCLEAR=!0,p})(),G.RenderingManager=k,W=$a||($a={}),H=(function(){function i(e,t,i,r,n){void 0===i&&(i=null),void 0===r&&(r=null),void 0===n&&(n=null),this.index=e,this._opaqueSubMeshes=new W.SmartArray(256),this._transparentSubMeshes=new W.SmartArray(256),this._alphaTestSubMeshes=new W.SmartArray(256),this._depthOnlySubMeshes=new W.SmartArray(256),this._particleSystems=new W.SmartArray(256),this._spriteManagers=new W.SmartArray(256),this._edgesRenderers=new W.SmartArray(16),this._scene=t,this.opaqueSortCompareFn=i,this.alphaTestSortCompareFn=r,this.transparentSortCompareFn=n}return Object.defineProperty(i.prototype,\"opaqueSortCompareFn\",{set:function(e){this._opaqueSortCompareFn=e,this._renderOpaque=e?this.renderOpaqueSorted:i.renderUnsorted},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,\"alphaTestSortCompareFn\",{set:function(e){this._alphaTestSortCompareFn=e,this._renderAlphaTest=e?this.renderAlphaTestSorted:i.renderUnsorted},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,\"transparentSortCompareFn\",{set:function(e){this._transparentSortCompareFn=e||i.defaultTransparentSortCompare,this._renderTransparent=this.renderTransparentSorted},enumerable:!0,configurable:!0}),i.prototype.render=function(e,t,i,r){if(e)e(this._opaqueSubMeshes,this._alphaTestSubMeshes,this._transparentSubMeshes,this._depthOnlySubMeshes);else{var n=this._scene.getEngine();0!==this._depthOnlySubMeshes.length&&(n.setColorWrite(!1),this._renderAlphaTest(this._depthOnlySubMeshes),n.setColorWrite(!0)),0!==this._opaqueSubMeshes.length&&this._renderOpaque(this._opaqueSubMeshes),0!==this._alphaTestSubMeshes.length&&this._renderAlphaTest(this._alphaTestSubMeshes);var o=n.getStencilBuffer();if(n.setStencilBuffer(!1),t&&this._renderSprites(),i&&this._renderParticles(r),this.onBeforeTransparentRendering&&this.onBeforeTransparentRendering(),0!==this._transparentSubMeshes.length&&(this._renderTransparent(this._transparentSubMeshes),n.setAlphaMode(W.Engine.ALPHA_DISABLE)),n.setStencilBuffer(!1),this._edgesRenderers.length){for(var s=0;s<this._edgesRenderers.length;s++)this._edgesRenderers.data[s].render();n.setAlphaMode(W.Engine.ALPHA_DISABLE)}n.setStencilBuffer(o)}},i.prototype.renderOpaqueSorted=function(e){return i.renderSorted(e,this._opaqueSortCompareFn,this._scene.activeCamera,!1)},i.prototype.renderAlphaTestSorted=function(e){return i.renderSorted(e,this._alphaTestSortCompareFn,this._scene.activeCamera,!1)},i.prototype.renderTransparentSorted=function(e){return i.renderSorted(e,this._transparentSortCompareFn,this._scene.activeCamera,!0)},i.renderSorted=function(e,t,i,r){for(var n,o=0,s=i?i.globalPosition:W.Vector3.Zero();o<e.length;o++)(n=e.data[o])._alphaIndex=n.getMesh().alphaIndex,n._distanceToCamera=n.getBoundingInfo().boundingSphere.centerWorld.subtract(s).length();var a=e.data.slice(0,e.length);for(t&&a.sort(t),o=0;o<a.length;o++){if(n=a[o],r){var l=n.getMaterial();if(l&&l.needDepthPrePass){var c=l.getScene().getEngine();c.setColorWrite(!1),c.setAlphaMode(W.Engine.ALPHA_DISABLE),n.render(!1),c.setColorWrite(!0)}}n.render(r)}},i.renderUnsorted=function(e){for(var t=0;t<e.length;t++){e.data[t].render(!1)}},i.defaultTransparentSortCompare=function(e,t){return e._alphaIndex>t._alphaIndex?1:e._alphaIndex<t._alphaIndex?-1:i.backToFrontSortCompare(e,t)},i.backToFrontSortCompare=function(e,t){return e._distanceToCamera<t._distanceToCamera?1:e._distanceToCamera>t._distanceToCamera?-1:0},i.frontToBackSortCompare=function(e,t){return e._distanceToCamera<t._distanceToCamera?-1:e._distanceToCamera>t._distanceToCamera?1:0},i.prototype.prepare=function(){this._opaqueSubMeshes.reset(),this._transparentSubMeshes.reset(),this._alphaTestSubMeshes.reset(),this._depthOnlySubMeshes.reset(),this._particleSystems.reset(),this._spriteManagers.reset(),this._edgesRenderers.reset()},i.prototype.dispose=function(){this._opaqueSubMeshes.dispose(),this._transparentSubMeshes.dispose(),this._alphaTestSubMeshes.dispose(),this._depthOnlySubMeshes.dispose(),this._particleSystems.dispose(),this._spriteManagers.dispose(),this._edgesRenderers.dispose()},i.prototype.dispatch=function(e,t,i){void 0===t&&(t=e.getMesh()),void 0===i&&(i=e.getMaterial()),null!=i&&(i.needAlphaBlendingForMesh(t)?this._transparentSubMeshes.push(e):i.needAlphaTesting()?(i.needDepthPrePass&&this._depthOnlySubMeshes.push(e),this._alphaTestSubMeshes.push(e)):(i.needDepthPrePass&&this._depthOnlySubMeshes.push(e),this._opaqueSubMeshes.push(e)),t._edgesRenderer&&t._edgesRenderer.isEnabled&&this._edgesRenderers.push(t._edgesRenderer))},i.prototype.dispatchSprites=function(e){this._spriteManagers.push(e)},i.prototype.dispatchParticles=function(e){this._particleSystems.push(e)},i.prototype._renderParticles=function(e){if(0!==this._particleSystems.length){var t=this._scene.activeCamera;this._scene.onBeforeParticlesRenderingObservable.notifyObservers(this._scene);for(var i=0;i<this._particleSystems.length;i++){var r=this._particleSystems.data[i];if(0!==(t&&t.layerMask&r.layerMask)){var n=r.emitter;n.position&&e&&-1===e.indexOf(n)||this._scene._activeParticles.addCount(r.render(),!1)}}this._scene.onAfterParticlesRenderingObservable.notifyObservers(this._scene)}},i.prototype._renderSprites=function(){if(this._scene.spritesEnabled&&0!==this._spriteManagers.length){var e=this._scene.activeCamera;this._scene.onBeforeSpritesRenderingObservable.notifyObservers(this._scene);for(var t=0;t<this._spriteManagers.length;t++){var i=this._spriteManagers.data[t];0!==(e&&e.layerMask&i.layerMask)&&i.render()}this._scene.onAfterSpritesRenderingObservable.notifyObservers(this._scene)}},i})(),W.RenderingGroup=H,(function(e){var t=(function(){function e(){}return e.NAME_EFFECTLAYER=\"EffectLayer\",e.NAME_LAYER=\"Layer\",e.NAME_LENSFLARESYSTEM=\"LensFlareSystem\",e.NAME_BOUNDINGBOXRENDERER=\"BoundingBoxRenderer\",e.NAME_PARTICLESYSTEM=\"ParticleSystem\",e.NAME_GAMEPAD=\"Gamepad\",e.NAME_SIMPLIFICATIONQUEUE=\"SimplificationQueue\",e.NAME_GEOMETRYBUFFERRENDERER=\"GeometryBufferRenderer\",e.NAME_DEPTHRENDERER=\"DepthRenderer\",e.NAME_POSTPROCESSRENDERPIPELINEMANAGER=\"PostProcessRenderPipelineManager\",e.NAME_SPRITE=\"Sprite\",e.NAME_OUTLINERENDERER=\"Outline\",e.NAME_PROCEDURALTEXTURE=\"ProceduralTexture\",e.NAME_SHADOWGENERATOR=\"ShadowGenerator\",e.NAME_OCTREE=\"Octree\",e.NAME_PHYSICSENGINE=\"PhysicsEngine\",e.NAME_AUDIO=\"Audio\",e.STEP_ISREADYFORMESH_EFFECTLAYER=0,e.STEP_BEFOREEVALUATEACTIVEMESH_BOUNDINGBOXRENDERER=0,e.STEP_EVALUATESUBMESH_BOUNDINGBOXRENDERER=0,e.STEP_ACTIVEMESH_BOUNDINGBOXRENDERER=0,e.STEP_CAMERADRAWRENDERTARGET_EFFECTLAYER=1,e.STEP_BEFORECAMERADRAW_EFFECTLAYER=0,e.STEP_BEFORECAMERADRAW_LAYER=1,e.STEP_BEFORERENDERINGMESH_OUTLINE=0,e.STEP_AFTERRENDERINGMESH_OUTLINE=0,e.STEP_AFTERRENDERINGGROUPDRAW_EFFECTLAYER_DRAW=0,e.STEP_AFTERRENDERINGGROUPDRAW_BOUNDINGBOXRENDERER=1,e.STEP_BEFORECAMERAUPDATE_SIMPLIFICATIONQUEUE=0,e.STEP_BEFORECAMERAUPDATE_GAMEPAD=1,e.STEP_BEFORECLEAR_PROCEDURALTEXTURE=0,e.STEP_AFTERCAMERADRAW_EFFECTLAYER=0,e.STEP_AFTERCAMERADRAW_LENSFLARESYSTEM=1,e.STEP_AFTERCAMERADRAW_EFFECTLAYER_DRAW=2,e.STEP_AFTERCAMERADRAW_LAYER=3,e.STEP_AFTERRENDER_AUDIO=0,e.STEP_GATHERRENDERTARGETS_SHADOWGENERATOR=0,e.STEP_GATHERRENDERTARGETS_GEOMETRYBUFFERRENDERER=1,e.STEP_GATHERRENDERTARGETS_DEPTHRENDERER=2,e.STEP_GATHERRENDERTARGETS_POSTPROCESSRENDERPIPELINEMANAGER=3,e.STEP_GATHERACTIVECAMERARENDERTARGETS_DEPTHRENDERER=0,e.STEP_POINTERMOVE_SPRITE=0,e.STEP_POINTERDOWN_SPRITE=0,e.STEP_POINTERUP_SPRITE=0,e})();e.SceneComponentConstants=t;var i=(function(t){function e(e){return t.apply(this,e)||this}return T(e,t),e.Create=function(){return Object.create(e.prototype)},e.prototype.registerStep=function(e,t,i){var r=0;for(Number.MAX_VALUE;r<this.length;r++){if(e<this[r].index)break}this.splice(r,0,{index:e,component:t,action:i.bind(t)})},e.prototype.clear=function(){this.length=0},e})(Array);e.Stage=i})($a||($a={})),X=$a||($a={}),j=(function(){function e(){this.rootNodes=new Array,this.cameras=new Array,this.lights=new Array,this.meshes=new Array,this.skeletons=new Array,this.particleSystems=new Array,this.animations=[],this.animationGroups=new Array,this.multiMaterials=new Array,this.materials=new Array,this.morphTargetManagers=new Array,this.geometries=new Array,this.transformNodes=new Array,this.actionManagers=new Array,this.textures=new Array}return e.AddParser=function(e,t){this._BabylonFileParsers[e]=t},e.GetParser=function(e){return this._BabylonFileParsers[e]?this._BabylonFileParsers[e]:null},e.AddIndividualParser=function(e,t){this._IndividualBabylonFileParsers[e]=t},e.GetIndividualParser=function(e){return this._IndividualBabylonFileParsers[e]?this._IndividualBabylonFileParsers[e]:null},e.Parse=function(e,t,i,r){for(var n in this._BabylonFileParsers)this._BabylonFileParsers.hasOwnProperty(n)&&this._BabylonFileParsers[n](e,t,i,r)},e._BabylonFileParsers={},e._IndividualBabylonFileParsers={},e})(),X.AbstractScene=j,(function(x){var u=(function(){function e(){this._singleClick=!1,this._doubleClick=!1,this._hasSwiped=!1,this._ignore=!1}return Object.defineProperty(e.prototype,\"singleClick\",{get:function(){return this._singleClick},set:function(e){this._singleClick=e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,\"doubleClick\",{get:function(){return this._doubleClick},set:function(e){this._doubleClick=e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,\"hasSwiped\",{get:function(){return this._hasSwiped},set:function(e){this._hasSwiped=e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,\"ignore\",{get:function(){return this._ignore},set:function(e){this._ignore=e},enumerable:!0,configurable:!0}),e})(),e=function(){};x.RenderingGroupInfo=e;var t=(function(i){function E(e){var t=i.call(this)||this;return t.autoClear=!0,t.autoClearDepthAndStencil=!0,t.clearColor=new x.Color4(.2,.2,.3,1),t.ambientColor=new x.Color3(0,0,0),t._forceWireframe=!1,t._forcePointsCloud=!1,t.animationsEnabled=!0,t._animationPropertiesOverride=null,t.useConstantAnimationDeltaTime=!1,t.constantlyUpdateMeshUnderPointer=!1,t.hoverCursor=\"pointer\",t.defaultCursor=\"\",t.preventDefaultOnPointerDown=!0,t.metadata=null,t.disableOfflineSupportExceptionRules=new Array,t.onDisposeObservable=new x.Observable,t._onDisposeObserver=null,t.onBeforeRenderObservable=new x.Observable,t._onBeforeRenderObserver=null,t.onAfterRenderObservable=new x.Observable,t._onAfterRenderObserver=null,t.onBeforeAnimationsObservable=new x.Observable,t.onAfterAnimationsObservable=new x.Observable,t.onBeforeDrawPhaseObservable=new x.Observable,t.onAfterDrawPhaseObservable=new x.Observable,t.onReadyObservable=new x.Observable,t.onBeforeCameraRenderObservable=new x.Observable,t._onBeforeCameraRenderObserver=null,t.onAfterCameraRenderObservable=new x.Observable,t._onAfterCameraRenderObserver=null,t.onBeforeActiveMeshesEvaluationObservable=new x.Observable,t.onAfterActiveMeshesEvaluationObservable=new x.Observable,t.onBeforeParticlesRenderingObservable=new x.Observable,t.onAfterParticlesRenderingObservable=new x.Observable,t.onDataLoadedObservable=new x.Observable,t.onNewCameraAddedObservable=new x.Observable,t.onCameraRemovedObservable=new x.Observable,t.onNewLightAddedObservable=new x.Observable,t.onLightRemovedObservable=new x.Observable,t.onNewGeometryAddedObservable=new x.Observable,t.onGeometryRemovedObservable=new x.Observable,t.onNewTransformNodeAddedObservable=new x.Observable,t.onTransformNodeRemovedObservable=new x.Observable,t.onNewMeshAddedObservable=new x.Observable,t.onMeshRemovedObservable=new x.Observable,t.onNewMaterialAddedObservable=new x.Observable,t.onMaterialRemovedObservable=new x.Observable,t.onNewTextureAddedObservable=new x.Observable,t.onTextureRemovedObservable=new x.Observable,t.onBeforeRenderTargetsRenderObservable=new x.Observable,t.onAfterRenderTargetsRenderObservable=new x.Observable,t.onBeforeStepObservable=new x.Observable,t.onAfterStepObservable=new x.Observable,t.onBeforeRenderingGroupObservable=new x.Observable,t.onAfterRenderingGroupObservable=new x.Observable,t.onMeshImportedObservable=new x.Observable,t._registeredForLateAnimationBindings=new x.SmartArrayNoDuplicate(256),t.onPrePointerObservable=new x.Observable,t.onPointerObservable=new x.Observable,t._meshPickProceed=!1,t._currentPickResult=null,t._previousPickResult=null,t._totalPointersPressed=0,t._doubleClickOccured=!1,t.cameraToUseForPointers=null,t._pointerX=0,t._pointerY=0,t._startingPointerPosition=new x.Vector2(0,0),t._previousStartingPointerPosition=new x.Vector2(0,0),t._startingPointerTime=0,t._previousStartingPointerTime=0,t._pointerCaptures={},t._timeAccumulator=0,t._currentStepId=0,t._currentInternalStep=0,t.onPreKeyboardObservable=new x.Observable,t.onKeyboardObservable=new x.Observable,t._useRightHandedSystem=!1,t._fogEnabled=!0,t._fogMode=E.FOGMODE_NONE,t.fogColor=new x.Color3(.2,.2,.3),t.fogDensity=.1,t.fogStart=0,t.fogEnd=1e3,t._shadowsEnabled=!0,t._lightsEnabled=!0,t.activeCameras=new Array,t._texturesEnabled=!0,t.particlesEnabled=!0,t.spritesEnabled=!0,t._skeletonsEnabled=!0,t.lensFlaresEnabled=!0,t.collisionsEnabled=!0,t.gravity=new x.Vector3(0,-9.807,0),t.postProcessesEnabled=!0,t.postProcesses=new Array,t.renderTargetsEnabled=!0,t.dumpNextRenderTargets=!1,t.customRenderTargets=new Array,t.importedMeshesFiles=new Array,t.probesEnabled=!0,t._meshesForIntersections=new x.SmartArrayNoDuplicate(256),t.proceduralTexturesEnabled=!0,t._totalVertices=new x.PerfCounter,t._activeIndices=new x.PerfCounter,t._activeParticles=new x.PerfCounter,t._activeBones=new x.PerfCounter,t._animationTime=0,t.animationTimeScale=1,t._renderId=0,t._frameId=0,t._executeWhenReadyTimeoutId=-1,t._intermediateRendering=!1,t._viewUpdateFlag=-1,t._projectionUpdateFlag=-1,t._alternateViewUpdateFlag=-1,t._alternateProjectionUpdateFlag=-1,t._toBeDisposed=new Array(256),t._activeRequests=new Array,t._pendingData=new Array,t._isDisposed=!1,t.dispatchAllSubMeshesOfActiveMeshes=!1,t._activeMeshes=new x.SmartArray(256),t._processedMaterials=new x.SmartArray(256),t._renderTargets=new x.SmartArrayNoDuplicate(256),t._activeParticleSystems=new x.SmartArray(256),t._activeSkeletons=new x.SmartArrayNoDuplicate(32),t._softwareSkinnedMeshes=new x.SmartArrayNoDuplicate(32),t._activeAnimatables=new Array,t._transformMatrix=x.Matrix.Zero(),t._useAlternateCameraConfiguration=!1,t._alternateRendering=!1,t.requireLightSorting=!1,t._components=[],t._serializableComponents=[],t._transientComponents=[],t._beforeCameraUpdateStage=x.Stage.Create(),t._beforeClearStage=x.Stage.Create(),t._gatherRenderTargetsStage=x.Stage.Create(),t._gatherActiveCameraRenderTargetsStage=x.Stage.Create(),t._isReadyForMeshStage=x.Stage.Create(),t._beforeEvaluateActiveMeshStage=x.Stage.Create(),t._evaluateSubMeshStage=x.Stage.Create(),t._activeMeshStage=x.Stage.Create(),t._cameraDrawRenderTargetStage=x.Stage.Create(),t._beforeCameraDrawStage=x.Stage.Create(),t._beforeRenderingGroupDrawStage=x.Stage.Create(),t._beforeRenderingMeshStage=x.Stage.Create(),t._afterRenderingMeshStage=x.Stage.Create(),t._afterRenderingGroupDrawStage=x.Stage.Create(),t._afterCameraDrawStage=x.Stage.Create(),t._afterRenderStage=x.Stage.Create(),t._pointerMoveStage=x.Stage.Create(),t._pointerDownStage=x.Stage.Create(),t._pointerUpStage=x.Stage.Create(),t._defaultMeshCandidates={data:[],length:0},t._defaultSubMeshCandidates={data:[],length:0},t._activeMeshesFrozen=!1,t._allowPostProcessClearColor=!0,t.getDeterministicFrameTime=function(){return 1e3/60},t._tempPickingRay=x.Ray?x.Ray.Zero():null,t._blockMaterialDirtyMechanism=!1,t._engine=e||x.Engine.LastCreatedEngine,t._engine.scenes.push(t),t._uid=null,t._renderingManager=new x.RenderingManager(t),x.PostProcessManager&&(t.postProcessManager=new x.PostProcessManager(t)),x.Tools.IsWindowObjectExist()&&t.attachControl(),t.workerCollisions=!1,t._createUbo(),x.ImageProcessingConfiguration&&(t._imageProcessingConfiguration=new x.ImageProcessingConfiguration),t.setDefaultCandidateProviders(),t}return T(E,i),Object.defineProperty(E.prototype,\"environmentTexture\",{get:function(){return this._environmentTexture},set:function(e){this._environmentTexture!==e&&(this._environmentTexture=e,this.markAllMaterialsAsDirty(x.Material.TextureDirtyFlag))},enumerable:!0,configurable:!0}),Object.defineProperty(E.prototype,\"imageProcessingConfiguration\",{get:function(){return this._imageProcessingConfiguration},enumerable:!0,configurable:!0}),Object.defineProperty(E.prototype,\"forceWireframe\",{get:function(){return this._forceWireframe},set:function(e){this._forceWireframe!==e&&(this._forceWireframe=e,this.markAllMaterialsAsDirty(x.Material.MiscDirtyFlag))},enumerable:!0,configurable:!0}),Object.defineProperty(E.prototype,\"forcePointsCloud\",{get:function(){return this._forcePointsCloud},set:function(e){this._forcePointsCloud!==e&&(this._forcePointsCloud=e,this.markAllMaterialsAsDirty(x.Material.MiscDirtyFlag))},enumerable:!0,configurable:!0}),Object.defineProperty(E.prototype,\"animationPropertiesOverride\",{get:function(){return this._animationPropertiesOverride},set:function(e){this._animationPropertiesOverride=e},enumerable:!0,configurable:!0}),Object.defineProperty(E.prototype,\"onDispose\",{set:function(e){this._onDisposeObserver&&this.onDisposeObservable.remove(this._onDisposeObserver),this._onDisposeObserver=this.onDisposeObservable.add(e)},enumerable:!0,configurable:!0}),Object.defineProperty(E.prototype,\"beforeRender\",{set:function(e){this._onBeforeRenderObserver&&this.onBeforeRenderObservable.remove(this._onBeforeRenderObserver),e&&(this._onBeforeRenderObserver=this.onBeforeRenderObservable.add(e))},enumerable:!0,configurable:!0}),Object.defineProperty(E.prototype,\"afterRender\",{set:function(e){this._onAfterRenderObserver&&this.onAfterRenderObservable.remove(this._onAfterRenderObserver),e&&(this._onAfterRenderObserver=this.onAfterRenderObservable.add(e))},enumerable:!0,configurable:!0}),Object.defineProperty(E.prototype,\"beforeCameraRender\",{set:function(e){this._onBeforeCameraRenderObserver&&this.onBeforeCameraRenderObservable.remove(this._onBeforeCameraRenderObserver),this._onBeforeCameraRenderObserver=this.onBeforeCameraRenderObservable.add(e)},enumerable:!0,configurable:!0}),Object.defineProperty(E.prototype,\"afterCameraRender\",{set:function(e){this._onAfterCameraRenderObserver&&this.onAfterCameraRenderObservable.remove(this._onAfterCameraRenderObserver),this._onAfterCameraRenderObserver=this.onAfterCameraRenderObservable.add(e)},enumerable:!0,configurable:!0}),Object.defineProperty(E.prototype,\"unTranslatedPointer\",{get:function(){return new x.Vector2(this._unTranslatedPointerX,this._unTranslatedPointerY)},enumerable:!0,configurable:!0}),Object.defineProperty(E.prototype,\"useRightHandedSystem\",{get:function(){return this._useRightHandedSystem},set:function(e){this._useRightHandedSystem!==e&&(this._useRightHandedSystem=e,this.markAllMaterialsAsDirty(x.Material.MiscDirtyFlag))},enumerable:!0,configurable:!0}),E.prototype.setStepId=function(e){this._currentStepId=e},E.prototype.getStepId=function(){return this._currentStepId},E.prototype.getInternalStep=function(){return this._currentInternalStep},Object.defineProperty(E.prototype,\"fogEnabled\",{get:function(){return this._fogEnabled},set:function(e){this._fogEnabled!==e&&(this._fogEnabled=e,this.markAllMaterialsAsDirty(x.Material.MiscDirtyFlag))},enumerable:!0,configurable:!0}),Object.defineProperty(E.prototype,\"fogMode\",{get:function(){return this._fogMode},set:function(e){this._fogMode!==e&&(this._fogMode=e,this.markAllMaterialsAsDirty(x.Material.MiscDirtyFlag))},enumerable:!0,configurable:!0}),Object.defineProperty(E.prototype,\"shadowsEnabled\",{get:function(){return this._shadowsEnabled},set:function(e){this._shadowsEnabled!==e&&(this._shadowsEnabled=e,this.markAllMaterialsAsDirty(x.Material.LightDirtyFlag))},enumerable:!0,configurable:!0}),Object.defineProperty(E.prototype,\"lightsEnabled\",{get:function(){return this._lightsEnabled},set:function(e){this._lightsEnabled!==e&&(this._lightsEnabled=e,this.markAllMaterialsAsDirty(x.Material.LightDirtyFlag))},enumerable:!0,configurable:!0}),Object.defineProperty(E.prototype,\"defaultMaterial\",{get:function(){return this._defaultMaterial||(this._defaultMaterial=new x.StandardMaterial(\"default material\",this)),this._defaultMaterial},set:function(e){this._defaultMaterial=e},enumerable:!0,configurable:!0}),Object.defineProperty(E.prototype,\"texturesEnabled\",{get:function(){return this._texturesEnabled},set:function(e){this._texturesEnabled!==e&&(this._texturesEnabled=e,this.markAllMaterialsAsDirty(x.Material.TextureDirtyFlag))},enumerable:!0,configurable:!0}),Object.defineProperty(E.prototype,\"skeletonsEnabled\",{get:function(){return this._skeletonsEnabled},set:function(e){this._skeletonsEnabled!==e&&(this._skeletonsEnabled=e,this.markAllMaterialsAsDirty(x.Material.AttributesDirtyFlag))},enumerable:!0,configurable:!0}),Object.defineProperty(E.prototype,\"_isAlternateRenderingEnabled\",{get:function(){return this._alternateRendering},enumerable:!0,configurable:!0}),Object.defineProperty(E.prototype,\"frustumPlanes\",{get:function(){return this._frustumPlanes},enumerable:!0,configurable:!0}),E.prototype._registerTransientComponents=function(){if(0<this._transientComponents.length){for(var e=0,t=this._transientComponents;e<t.length;e++){t[e].register()}this._transientComponents=[]}},E.prototype._addComponent=function(e){this._components.push(e),this._transientComponents.push(e);var t=e;t.addFromContainer&&this._serializableComponents.push(t)},E.prototype._getComponent=function(e){for(var t=0,i=this._components;t<i.length;t++){var r=i[t];if(r.name===e)return r}return null},E.prototype._getDefaultMeshCandidates=function(){return this._defaultMeshCandidates.data=this.meshes,this._defaultMeshCandidates.length=this.meshes.length,this._defaultMeshCandidates},E.prototype._getDefaultSubMeshCandidates=function(e){return this._defaultSubMeshCandidates.data=e.subMeshes,this._defaultSubMeshCandidates.length=e.subMeshes.length,this._defaultSubMeshCandidates},E.prototype.setDefaultCandidateProviders=function(){this.getActiveMeshCandidates=this._getDefaultMeshCandidates.bind(this),this.getActiveSubMeshCandidates=this._getDefaultSubMeshCandidates.bind(this),this.getIntersectingSubMeshCandidates=this._getDefaultSubMeshCandidates.bind(this),this.getCollidingSubMeshCandidates=this._getDefaultSubMeshCandidates.bind(this)},Object.defineProperty(E.prototype,\"workerCollisions\",{get:function(){return this._workerCollisions},set:function(e){x.CollisionCoordinatorLegacy&&(e=e&&!!Worker&&!!x.CollisionWorker,this._workerCollisions=e,this.collisionCoordinator&&this.collisionCoordinator.destroy(),this.collisionCoordinator=e?new x.CollisionCoordinatorWorker:new x.CollisionCoordinatorLegacy,this.collisionCoordinator.init(this))},enumerable:!0,configurable:!0}),Object.defineProperty(E.prototype,\"meshUnderPointer\",{get:function(){return this._pointerOverMesh},enumerable:!0,configurable:!0}),Object.defineProperty(E.prototype,\"pointerX\",{get:function(){return this._pointerX},enumerable:!0,configurable:!0}),Object.defineProperty(E.prototype,\"pointerY\",{get:function(){return this._pointerY},enumerable:!0,configurable:!0}),E.prototype.getCachedMaterial=function(){return this._cachedMaterial},E.prototype.getCachedEffect=function(){return this._cachedEffect},E.prototype.getCachedVisibility=function(){return this._cachedVisibility},E.prototype.isCachedMaterialInvalid=function(e,t,i){return void 0===i&&(i=1),this._cachedEffect!==t||this._cachedMaterial!==e||this._cachedVisibility!==i},E.prototype.getEngine=function(){return this._engine},E.prototype.getTotalVertices=function(){return this._totalVertices.current},Object.defineProperty(E.prototype,\"totalVerticesPerfCounter\",{get:function(){return this._totalVertices},enumerable:!0,configurable:!0}),E.prototype.getActiveIndices=function(){return this._activeIndices.current},Object.defineProperty(E.prototype,\"totalActiveIndicesPerfCounter\",{get:function(){return this._activeIndices},enumerable:!0,configurable:!0}),E.prototype.getActiveParticles=function(){return this._activeParticles.current},Object.defineProperty(E.prototype,\"activeParticlesPerfCounter\",{get:function(){return this._activeParticles},enumerable:!0,configurable:!0}),E.prototype.getActiveBones=function(){return this._activeBones.current},Object.defineProperty(E.prototype,\"activeBonesPerfCounter\",{get:function(){return this._activeBones},enumerable:!0,configurable:!0}),E.prototype.getInterFramePerfCounter=function(){return x.Tools.Warn(\"getInterFramePerfCounter is deprecated. Please use SceneInstrumentation class\"),0},Object.defineProperty(E.prototype,\"interFramePerfCounter\",{get:function(){return x.Tools.Warn(\"interFramePerfCounter is deprecated. Please use SceneInstrumentation class\"),null},enumerable:!0,configurable:!0}),E.prototype.getLastFrameDuration=function(){return x.Tools.Warn(\"getLastFrameDuration is deprecated. Please use SceneInstrumentation class\"),0},Object.defineProperty(E.prototype,\"lastFramePerfCounter\",{get:function(){return x.Tools.Warn(\"lastFramePerfCounter is deprecated. Please use SceneInstrumentation class\"),null},enumerable:!0,configurable:!0}),E.prototype.getEvaluateActiveMeshesDuration=function(){return x.Tools.Warn(\"getEvaluateActiveMeshesDuration is deprecated. Please use SceneInstrumentation class\"),0},Object.defineProperty(E.prototype,\"evaluateActiveMeshesDurationPerfCounter\",{get:function(){return x.Tools.Warn(\"evaluateActiveMeshesDurationPerfCounter is deprecated. Please use SceneInstrumentation class\"),null},enumerable:!0,configurable:!0}),E.prototype.getActiveMeshes=function(){return this._activeMeshes},E.prototype.getRenderTargetsDuration=function(){return x.Tools.Warn(\"getRenderTargetsDuration is deprecated. Please use SceneInstrumentation class\"),0},E.prototype.getRenderDuration=function(){return x.Tools.Warn(\"getRenderDuration is deprecated. Please use SceneInstrumentation class\"),0},Object.defineProperty(E.prototype,\"renderDurationPerfCounter\",{get:function(){return x.Tools.Warn(\"renderDurationPerfCounter is deprecated. Please use SceneInstrumentation class\"),null},enumerable:!0,configurable:!0}),E.prototype.getParticlesDuration=function(){return x.Tools.Warn(\"getParticlesDuration is deprecated. Please use SceneInstrumentation class\"),0},Object.defineProperty(E.prototype,\"particlesDurationPerfCounter\",{get:function(){return x.Tools.Warn(\"particlesDurationPerfCounter is deprecated. Please use SceneInstrumentation class\"),null},enumerable:!0,configurable:!0}),E.prototype.getSpritesDuration=function(){return x.Tools.Warn(\"getSpritesDuration is deprecated. Please use SceneInstrumentation class\"),0},Object.defineProperty(E.prototype,\"spriteDuractionPerfCounter\",{get:function(){return x.Tools.Warn(\"spriteDuractionPerfCounter is deprecated. Please use SceneInstrumentation class\"),null},enumerable:!0,configurable:!0}),E.prototype.getAnimationRatio=function(){return void 0!==this._animationRatio?this._animationRatio:1},E.prototype.getRenderId=function(){return this._renderId},E.prototype.getFrameId=function(){return this._frameId},E.prototype.incrementRenderId=function(){this._renderId++},E.prototype._updatePointerPosition=function(e){var t=this._engine.getRenderingCanvasClientRect();t&&(this._pointerX=e.clientX-t.left,this._pointerY=e.clientY-t.top,this._unTranslatedPointerX=this._pointerX,this._unTranslatedPointerY=this._pointerY)},E.prototype._createUbo=function(){this._sceneUbo=new x.UniformBuffer(this._engine,void 0,!0),this._sceneUbo.addUniform(\"viewProjection\",16),this._sceneUbo.addUniform(\"view\",16)},E.prototype._createAlternateUbo=function(){this._alternateSceneUbo=new x.UniformBuffer(this._engine,void 0,!0),this._alternateSceneUbo.addUniform(\"viewProjection\",16),this._alternateSceneUbo.addUniform(\"view\",16)},E.prototype._setRayOnPointerInfo=function(e){e.pickInfo&&(e.pickInfo.ray||(e.pickInfo.ray=this.createPickingRay(e.event.offsetX,e.event.offsetY,x.Matrix.Identity(),this.activeCamera)))},E.prototype.simulatePointerMove=function(e,t){var i=new PointerEvent(\"pointermove\",t);return this._checkPrePointerObservable(e,i,x.PointerEventTypes.POINTERMOVE)?this:this._processPointerMove(e,i)},E.prototype._processPointerMove=function(e,t){var i=this._engine.getRenderingCanvas();if(!i)return this;i.style.cursor=this.defaultCursor;var r=!!(e&&e.hit&&e.pickedMesh);r?(this.setPointerOverMesh(e.pickedMesh),this._pointerOverMesh&&this._pointerOverMesh.actionManager&&this._pointerOverMesh.actionManager.hasPointerTriggers&&(this._pointerOverMesh.actionManager.hoverCursor?i.style.cursor=this._pointerOverMesh.actionManager.hoverCursor:i.style.cursor=this.hoverCursor)):this.setPointerOverMesh(null);for(var n=0,o=this._pointerMoveStage;n<o.length;n++){e=o[n].action(this._unTranslatedPointerX,this._unTranslatedPointerY,e,r,i)}if(e){var s=\"mousewheel\"===t.type||\"DOMMouseScroll\"===t.type?x.PointerEventTypes.POINTERWHEEL:x.PointerEventTypes.POINTERMOVE;if(this.onPointerMove&&this.onPointerMove(t,e,s),this.onPointerObservable.hasObservers()){var a=new x.PointerInfo(s,t,e);this._setRayOnPointerInfo(a),this.onPointerObservable.notifyObservers(a,s)}}return this},E.prototype._checkPrePointerObservable=function(e,t,i){var r=new x.PointerInfoPre(i,t,this._unTranslatedPointerX,this._unTranslatedPointerY);return e&&(r.ray=e.ray),this.onPrePointerObservable.notifyObservers(r,i),!!r.skipOnPointerObservable},E.prototype.simulatePointerDown=function(e,t){var i=new PointerEvent(\"pointerdown\",t);return this._checkPrePointerObservable(e,i,x.PointerEventTypes.POINTERDOWN)?this:this._processPointerDown(e,i)},E.prototype._processPointerDown=function(e,t){var i=this;if(e&&e.hit&&e.pickedMesh){this._pickedDownMesh=e.pickedMesh;var r=e.pickedMesh.actionManager;if(r){if(r.hasPickTriggers)switch(r.processTrigger(x.ActionManager.OnPickDownTrigger,x.ActionEvent.CreateNew(e.pickedMesh,t)),t.button){case 0:r.processTrigger(x.ActionManager.OnLeftPickTrigger,x.ActionEvent.CreateNew(e.pickedMesh,t));break;case 1:r.processTrigger(x.ActionManager.OnCenterPickTrigger,x.ActionEvent.CreateNew(e.pickedMesh,t));break;case 2:r.processTrigger(x.ActionManager.OnRightPickTrigger,x.ActionEvent.CreateNew(e.pickedMesh,t))}r.hasSpecificTrigger(x.ActionManager.OnLongPressTrigger)&&window.setTimeout((function(){var e=i.pick(i._unTranslatedPointerX,i._unTranslatedPointerY,(function(e){return e.isPickable&&e.isVisible&&e.isReady()&&e.actionManager&&e.actionManager.hasSpecificTrigger(x.ActionManager.OnLongPressTrigger)&&e==i._pickedDownMesh}),!1,i.cameraToUseForPointers);e&&e.hit&&e.pickedMesh&&r&&0!==i._totalPointersPressed&&Date.now()-i._startingPointerTime>E.LongPressDelay&&!i._isPointerSwiping()&&(i._startingPointerTime=0,r.processTrigger(x.ActionManager.OnLongPressTrigger,x.ActionEvent.CreateNew(e.pickedMesh,t)))}),E.LongPressDelay)}}else for(var n=0,o=this._pointerDownStage;n<o.length;n++){e=o[n].action(this._unTranslatedPointerX,this._unTranslatedPointerY,e,t)}if(e){var s=x.PointerEventTypes.POINTERDOWN;if(this.onPointerDown&&this.onPointerDown(t,e,s),this.onPointerObservable.hasObservers()){var a=new x.PointerInfo(s,t,e);this._setRayOnPointerInfo(a),this.onPointerObservable.notifyObservers(a,s)}}return this},E.prototype.simulatePointerUp=function(e,t){var i=new PointerEvent(\"pointerup\",t),r=new u;return r.singleClick=!0,r.ignore=!0,this._checkPrePointerObservable(e,i,x.PointerEventTypes.POINTERUP)?this:this._processPointerUp(e,i,r)},E.prototype._processPointerUp=function(e,t,i){if(e&&e&&e.pickedMesh){if(this._pickedUpMesh=e.pickedMesh,this._pickedDownMesh===this._pickedUpMesh&&(this.onPointerPick&&this.onPointerPick(t,e),i.singleClick&&!i.ignore&&this.onPointerObservable.hasObservers())){var r=x.PointerEventTypes.POINTERPICK,n=new x.PointerInfo(r,t,e);this._setRayOnPointerInfo(n),this.onPointerObservable.notifyObservers(n,r)}e.pickedMesh.actionManager&&(i.ignore&&e.pickedMesh.actionManager.processTrigger(x.ActionManager.OnPickUpTrigger,x.ActionEvent.CreateNew(e.pickedMesh,t)),i.hasSwiped||i.ignore||!i.singleClick||e.pickedMesh.actionManager.processTrigger(x.ActionManager.OnPickTrigger,x.ActionEvent.CreateNew(e.pickedMesh,t)),i.doubleClick&&!i.ignore&&e.pickedMesh.actionManager.hasSpecificTrigger(x.ActionManager.OnDoublePickTrigger)&&e.pickedMesh.actionManager.processTrigger(x.ActionManager.OnDoublePickTrigger,x.ActionEvent.CreateNew(e.pickedMesh,t)))}else if(!i.ignore)for(var o=0,s=this._pointerUpStage;o<s.length;o++){e=s[o].action(this._unTranslatedPointerX,this._unTranslatedPointerY,e,t)}this._pickedDownMesh&&this._pickedDownMesh.actionManager&&this._pickedDownMesh.actionManager.hasSpecificTrigger(x.ActionManager.OnPickOutTrigger)&&this._pickedDownMesh!==this._pickedUpMesh&&this._pickedDownMesh.actionManager.processTrigger(x.ActionManager.OnPickOutTrigger,x.ActionEvent.CreateNew(this._pickedDownMesh,t));var a=x.PointerEventTypes.POINTERUP;if(this.onPointerObservable.hasObservers())if(i.ignore){n=new x.PointerInfo(a,t,e);this._setRayOnPointerInfo(n),this.onPointerObservable.notifyObservers(n,a)}else if(!i.hasSwiped){if(i.singleClick&&this.onPointerObservable.hasSpecificMask(x.PointerEventTypes.POINTERTAP)){var l=x.PointerEventTypes.POINTERTAP,n=new x.PointerInfo(l,t,e);this._setRayOnPointerInfo(n),this.onPointerObservable.notifyObservers(n,l)}if(i.doubleClick&&this.onPointerObservable.hasSpecificMask(x.PointerEventTypes.POINTERDOUBLETAP)){var c=x.PointerEventTypes.POINTERDOUBLETAP;n=new x.PointerInfo(c,t,e);this._setRayOnPointerInfo(n),this.onPointerObservable.notifyObservers(n,c)}}return this.onPointerUp&&this.onPointerUp(t,e,a),this},E.prototype.isPointerCaptured=function(e){return void 0===e&&(e=0),this._pointerCaptures[e]},E.prototype._isPointerSwiping=function(){return Math.abs(this._startingPointerPosition.x-this._pointerX)>E.DragMovementThreshold||Math.abs(this._startingPointerPosition.y-this._pointerY)>E.DragMovementThreshold},E.prototype.attachControl=function(e,t,i){var h=this;void 0===e&&(e=!0),void 0===t&&(t=!0),void 0===i&&(i=!0),this._initActionManager=function(e,t){if(!h._meshPickProceed){var i=h.pick(h._unTranslatedPointerX,h._unTranslatedPointerY,h.pointerDownPredicate,!1,h.cameraToUseForPointers);(h._currentPickResult=i)&&(e=i.hit&&i.pickedMesh?i.pickedMesh.actionManager:null),h._meshPickProceed=!0}return e},this._delayedSimpleClick=function(e,t,i){(Date.now()-h._previousStartingPointerTime>E.DoubleClickDelay&&!h._doubleClickOccured||e!==h._previousButtonPressed)&&(h._doubleClickOccured=!1,t.singleClick=!0,t.ignore=!1,i(t,h._currentPickResult))},this._initClickEvent=function(e,t,i,r){var n=new u,o=h._currentPickResult=null,s=e.hasSpecificMask(x.PointerEventTypes.POINTERPICK)||t.hasSpecificMask(x.PointerEventTypes.POINTERPICK)||e.hasSpecificMask(x.PointerEventTypes.POINTERTAP)||t.hasSpecificMask(x.PointerEventTypes.POINTERTAP)||e.hasSpecificMask(x.PointerEventTypes.POINTERDOUBLETAP)||t.hasSpecificMask(x.PointerEventTypes.POINTERDOUBLETAP);if(!s&&x.ActionManager&&x.ActionManager.HasPickTriggers&&(o=h._initActionManager(o,n))&&(s=o.hasPickTriggers),s){var a=i.button;if(n.hasSwiped=h._isPointerSwiping(),!n.hasSwiped){var l=!E.ExclusiveDoubleClickMode;l||(l=!e.hasSpecificMask(x.PointerEventTypes.POINTERDOUBLETAP)&&!t.hasSpecificMask(x.PointerEventTypes.POINTERDOUBLETAP))&&!x.ActionManager.HasSpecificTrigger(x.ActionManager.OnDoublePickTrigger)&&(o=h._initActionManager(o,n))&&(l=!o.hasSpecificTrigger(x.ActionManager.OnDoublePickTrigger)),l?(Date.now()-h._previousStartingPointerTime>E.DoubleClickDelay||a!==h._previousButtonPressed)&&(n.singleClick=!0,r(n,h._currentPickResult)):(h._previousDelayedSimpleClickTimeout=h._delayedSimpleClickTimeout,h._delayedSimpleClickTimeout=window.setTimeout(h._delayedSimpleClick.bind(h,a,n,r),E.DoubleClickDelay));var c=e.hasSpecificMask(x.PointerEventTypes.POINTERDOUBLETAP)||t.hasSpecificMask(x.PointerEventTypes.POINTERDOUBLETAP);!c&&x.ActionManager.HasSpecificTrigger(x.ActionManager.OnDoublePickTrigger)&&(o=h._initActionManager(o,n))&&(c=o.hasSpecificTrigger(x.ActionManager.OnDoublePickTrigger)),c&&(a===h._previousButtonPressed&&Date.now()-h._previousStartingPointerTime<E.DoubleClickDelay&&!h._doubleClickOccured?n.hasSwiped||h._isPointerSwiping()?(h._doubleClickOccured=!1,h._previousStartingPointerTime=h._startingPointerTime,h._previousStartingPointerPosition.x=h._startingPointerPosition.x,h._previousStartingPointerPosition.y=h._startingPointerPosition.y,h._previousButtonPressed=a,E.ExclusiveDoubleClickMode?(h._previousDelayedSimpleClickTimeout&&clearTimeout(h._previousDelayedSimpleClickTimeout),h._previousDelayedSimpleClickTimeout=h._delayedSimpleClickTimeout,r(n,h._previousPickResult)):r(n,h._currentPickResult)):(h._previousStartingPointerTime=0,h._doubleClickOccured=!0,n.doubleClick=!0,n.ignore=!1,E.ExclusiveDoubleClickMode&&h._previousDelayedSimpleClickTimeout&&clearTimeout(h._previousDelayedSimpleClickTimeout),h._previousDelayedSimpleClickTimeout=h._delayedSimpleClickTimeout,r(n,h._currentPickResult)):(h._doubleClickOccured=!1,h._previousStartingPointerTime=h._startingPointerTime,h._previousStartingPointerPosition.x=h._startingPointerPosition.x,h._previousStartingPointerPosition.y=h._startingPointerPosition.y,h._previousButtonPressed=a))}}n.ignore=!0,r(n,h._currentPickResult)},this._onPointerMove=function(e){if(h._updatePointerPosition(e),!h._checkPrePointerObservable(null,e,\"mousewheel\"===e.type||\"DOMMouseScroll\"===e.type?x.PointerEventTypes.POINTERWHEEL:x.PointerEventTypes.POINTERMOVE)&&(h.cameraToUseForPointers||h.activeCamera)){h.pointerMovePredicate||(h.pointerMovePredicate=function(e){return e.isPickable&&e.isVisible&&e.isReady()&&e.isEnabled()&&(e.enablePointerMoveEvents||h.constantlyUpdateMeshUnderPointer||null!==e.actionManager&&void 0!==e.actionManager)});var t=h.pick(h._unTranslatedPointerX,h._unTranslatedPointerY,h.pointerMovePredicate,!1,h.cameraToUseForPointers);h._processPointerMove(t,e)}},this._onPointerDown=function(e){if(h._totalPointersPressed++,h._pickedDownMesh=null,h._meshPickProceed=!1,h._updatePointerPosition(e),h.preventDefaultOnPointerDown&&o&&(e.preventDefault(),o.focus()),!h._checkPrePointerObservable(null,e,x.PointerEventTypes.POINTERDOWN)&&(h.cameraToUseForPointers||h.activeCamera)){h._pointerCaptures[e.pointerId]=!0,h._startingPointerPosition.x=h._pointerX,h._startingPointerPosition.y=h._pointerY,h._startingPointerTime=Date.now(),h.pointerDownPredicate||(h.pointerDownPredicate=function(e){return e.isPickable&&e.isVisible&&e.isReady()&&e.isEnabled()}),h._pickedDownMesh=null;var t=h.pick(h._unTranslatedPointerX,h._unTranslatedPointerY,h.pointerDownPredicate,!1,h.cameraToUseForPointers);h._processPointerDown(t,e)}},this._onPointerUp=function(i){0!==h._totalPointersPressed&&(h._totalPointersPressed--,h._pickedUpMesh=null,h._meshPickProceed=!1,h._updatePointerPosition(i),h._initClickEvent(h.onPrePointerObservable,h.onPointerObservable,i,(function(e,t){if(h.onPrePointerObservable.hasObservers())if(e.ignore){if(h._checkPrePointerObservable(null,i,x.PointerEventTypes.POINTERUP))return}else if(!e.hasSwiped){if(e.singleClick&&h.onPrePointerObservable.hasSpecificMask(x.PointerEventTypes.POINTERTAP)&&h._checkPrePointerObservable(null,i,x.PointerEventTypes.POINTERTAP))return;if(e.doubleClick&&h.onPrePointerObservable.hasSpecificMask(x.PointerEventTypes.POINTERDOUBLETAP)&&h._checkPrePointerObservable(null,i,x.PointerEventTypes.POINTERDOUBLETAP))return}(h.cameraToUseForPointers||h.activeCamera)&&(h._pointerCaptures[i.pointerId]=!1,h.pointerUpPredicate||(h.pointerUpPredicate=function(e){return e.isPickable&&e.isVisible&&e.isReady()&&e.isEnabled()}),!h._meshPickProceed&&(x.ActionManager&&x.ActionManager.HasTriggers||h.onPointerObservable.hasObservers())&&h._initActionManager(null,e),t||(t=h._currentPickResult),h._processPointerUp(t,i,e),h._previousPickResult=h._currentPickResult)})))},this._onKeyDown=function(e){var t=x.KeyboardEventTypes.KEYDOWN;if(h.onPreKeyboardObservable.hasObservers()){var i=new x.KeyboardInfoPre(t,e);if(h.onPreKeyboardObservable.notifyObservers(i,t),i.skipOnPointerObservable)return}if(h.onKeyboardObservable.hasObservers()){i=new x.KeyboardInfo(t,e);h.onKeyboardObservable.notifyObservers(i,t)}h.actionManager&&h.actionManager.processTrigger(x.ActionManager.OnKeyDownTrigger,x.ActionEvent.CreateNewFromScene(h,e))},this._onKeyUp=function(e){var t=x.KeyboardEventTypes.KEYUP;if(h.onPreKeyboardObservable.hasObservers()){var i=new x.KeyboardInfoPre(t,e);if(h.onPreKeyboardObservable.notifyObservers(i,t),i.skipOnPointerObservable)return}if(h.onKeyboardObservable.hasObservers()){i=new x.KeyboardInfo(t,e);h.onKeyboardObservable.notifyObservers(i,t)}h.actionManager&&h.actionManager.processTrigger(x.ActionManager.OnKeyUpTrigger,x.ActionEvent.CreateNewFromScene(h,e))};var r=this.getEngine();this._onCanvasFocusObserver=r.onCanvasFocusObservable.add((function(){o&&(o.addEventListener(\"keydown\",h._onKeyDown,!1),o.addEventListener(\"keyup\",h._onKeyUp,!1))})),this._onCanvasBlurObserver=r.onCanvasBlurObservable.add((function(){o&&(o.removeEventListener(\"keydown\",h._onKeyDown),o.removeEventListener(\"keyup\",h._onKeyUp))}));var n=x.Tools.GetPointerPrefix(),o=this._engine.getRenderingCanvas();o&&(i&&(o.addEventListener(n+\"move\",this._onPointerMove,!1),o.addEventListener(\"mousewheel\",this._onPointerMove,!1),o.addEventListener(\"DOMMouseScroll\",this._onPointerMove,!1)),t&&o.addEventListener(n+\"down\",this._onPointerDown,!1),e&&window.addEventListener(n+\"up\",this._onPointerUp,!1),o.tabIndex=1)},E.prototype.detachControl=function(){var e=this.getEngine(),t=x.Tools.GetPointerPrefix(),i=e.getRenderingCanvas();i&&(i.removeEventListener(t+\"move\",this._onPointerMove),i.removeEventListener(t+\"down\",this._onPointerDown),window.removeEventListener(t+\"up\",this._onPointerUp),this._onCanvasBlurObserver&&e.onCanvasBlurObservable.remove(this._onCanvasBlurObserver),this._onCanvasFocusObserver&&e.onCanvasFocusObservable.remove(this._onCanvasFocusObserver),i.removeEventListener(\"mousewheel\",this._onPointerMove),i.removeEventListener(\"DOMMouseScroll\",this._onPointerMove),i.removeEventListener(\"keydown\",this._onKeyDown),i.removeEventListener(\"keyup\",this._onKeyUp),this.onKeyboardObservable.clear(),this.onPreKeyboardObservable.clear(),this.onPointerObservable.clear(),this.onPrePointerObservable.clear())},E.prototype.isReady=function(){if(this._isDisposed)return!1;if(0<this._pendingData.length)return!1;var e,t=this.getEngine();for(e=0;e<this.geometries.length;e++){if(this.geometries[e].delayLoadState===x.Engine.DELAYLOADSTATE_LOADING)return!1}for(e=0;e<this.meshes.length;e++){var i=this.meshes[e];if(i.isEnabled()&&(i.subMeshes&&0!==i.subMeshes.length)){if(!i.isReady(!0))return!1;for(var r=\"InstancedMesh\"===i.getClassName()||t.getCaps().instancedArrays&&0<i.instances.length,n=0,o=this._isReadyForMeshStage;n<o.length;n++){if(!o[n].action(i,r))return!1}}}if(this.activeCameras&&0<this.activeCameras.length)for(var s=0,a=this.activeCameras;s<a.length;s++){if(!a[s].isReady(!0))return!1}else if(this.activeCamera&&!this.activeCamera.isReady(!0))return!1;for(var l=0,c=this.particleSystems;l<c.length;l++){if(!c[l].isReady())return!1}return!0},E.prototype.resetCachedMaterial=function(){this._cachedMaterial=null,this._cachedEffect=null,this._cachedVisibility=null},E.prototype.registerBeforeRender=function(e){this.onBeforeRenderObservable.add(e)},E.prototype.unregisterBeforeRender=function(e){this.onBeforeRenderObservable.removeCallback(e)},E.prototype.registerAfterRender=function(e){this.onAfterRenderObservable.add(e)},E.prototype.unregisterAfterRender=function(e){this.onAfterRenderObservable.removeCallback(e)},E.prototype._executeOnceBeforeRender=function(e){var t=this,i=function(){e(),setTimeout((function(){t.unregisterBeforeRender(i)}))};this.registerBeforeRender(i)},E.prototype.executeOnceBeforeRender=function(e,t){var i=this;void 0!==t?setTimeout((function(){i._executeOnceBeforeRender(e)}),t):this._executeOnceBeforeRender(e)},E.prototype._addPendingData=function(e){this._pendingData.push(e)},E.prototype._removePendingData=function(e){var t=this.isLoading,i=this._pendingData.indexOf(e);-1!==i&&this._pendingData.splice(i,1),t&&!this.isLoading&&this.onDataLoadedObservable.notifyObservers(this)},E.prototype.getWaitingItemsCount=function(){return this._pendingData.length},Object.defineProperty(E.prototype,\"isLoading\",{get:function(){return 0<this._pendingData.length},enumerable:!0,configurable:!0}),E.prototype.executeWhenReady=function(e){var t=this;this.onReadyObservable.add(e),-1===this._executeWhenReadyTimeoutId&&(this._executeWhenReadyTimeoutId=setTimeout((function(){t._checkIsReady()}),150))},E.prototype.whenReadyAsync=function(){var t=this;return new Promise(function(e){t.executeWhenReady((function(){e()}))})},E.prototype._checkIsReady=function(){var e=this;if(this._registerTransientComponents(),this.isReady())return this.onReadyObservable.notifyObservers(this),this.onReadyObservable.clear(),void(this._executeWhenReadyTimeoutId=-1);this._executeWhenReadyTimeoutId=setTimeout((function(){e._checkIsReady()}),150)},E.prototype.beginWeightedAnimation=function(e,t,i,r,n,o,s,a,l){void 0===r&&(r=1),void 0===o&&(o=1);var c=this.beginAnimation(e,t,i,n,o,s,a,!1,l);return c.weight=r,c},E.prototype.beginAnimation=function(e,t,i,r,n,o,s,a,l){void 0===n&&(n=1),void 0===a&&(a=!0),i<t&&0<n&&(n*=-1),a&&this.stopAnimation(e,void 0,l),s||(s=new x.Animatable(this,e,t,i,r,n,o));var c=!l||l(e);if(e.animations&&c&&s.appendAnimations(e,e.animations),e.getAnimatables)for(var h=e.getAnimatables(),u=0;u<h.length;u++)this.beginAnimation(h[u],t,i,r,n,o,s,a,l);return s.reset(),s},E.prototype.beginDirectAnimation=function(e,t,i,r,n,o,s){return void 0===o&&(o=1),new x.Animatable(this,e,i,r,n,o,s,t)},E.prototype.beginDirectHierarchyAnimation=function(e,t,i,r,n,o,s,a){var l=e.getDescendants(t),c=[];c.push(this.beginDirectAnimation(e,i,r,n,o,s,a));for(var h=0,u=l;h<u.length;h++){var d=u[h];c.push(this.beginDirectAnimation(d,i,r,n,o,s,a))}return c},E.prototype.getAnimatableByTarget=function(e){for(var t=0;t<this._activeAnimatables.length;t++)if(this._activeAnimatables[t].target===e)return this._activeAnimatables[t];return null},E.prototype.getAllAnimatablesByTarget=function(e){for(var t=[],i=0;i<this._activeAnimatables.length;i++)this._activeAnimatables[i].target===e&&t.push(this._activeAnimatables[i]);return t},Object.defineProperty(E.prototype,\"animatables\",{get:function(){return this._activeAnimatables},enumerable:!0,configurable:!0}),E.prototype.stopAnimation=function(e,t,i){for(var r=0,n=this.getAllAnimatablesByTarget(e);r<n.length;r++){n[r].stop(t,i)}},E.prototype.stopAllAnimations=function(){if(this._activeAnimatables){for(var e=0;e<this._activeAnimatables.length;e++)this._activeAnimatables[e].stop();this._activeAnimatables=[]}for(var t=0,i=this.animationGroups;t<i.length;t++){i[t].stop()}},E.prototype._animate=function(){if(this.animationsEnabled&&0!==this._activeAnimatables.length){var e=x.Tools.Now;if(!this._animationTimeLast){if(0<this._pendingData.length)return;this._animationTimeLast=e}var t=this.useConstantAnimationDeltaTime?16:(e-this._animationTimeLast)*this.animationTimeScale;this._animationTime+=t,this._animationTimeLast=e;for(var i=0;i<this._activeAnimatables.length;i++)this._activeAnimatables[i]._animate(this._animationTime);this._processLateAnimationBindings()}},E.prototype._registerTargetForLateAnimationBinding=function(e,t){var i=e.target;this._registeredForLateAnimationBindings.pushNoDuplicate(i),i._lateAnimationHolders||(i._lateAnimationHolders={}),i._lateAnimationHolders[e.targetPath]||(i._lateAnimationHolders[e.targetPath]={totalWeight:0,animations:[],originalValue:t}),i._lateAnimationHolders[e.targetPath].animations.push(e),i._lateAnimationHolders[e.targetPath].totalWeight+=e.weight},E.prototype._processLateAnimationBindingsForMatrices=function(e){var t=1,i=x.Tmp.Vector3[0],r=x.Tmp.Vector3[1],n=x.Tmp.Quaternion[0],o=0,s=e.animations[0],a=e.originalValue,l=1;if(e.totalWeight<1)a.decompose(r,n,i),l=1-e.totalWeight;else if(o=1,t=e.totalWeight,s.currentValue.decompose(r,n,i),1==(l=s.weight/t))return s.currentValue;r.scaleInPlace(l),i.scaleInPlace(l),n.scaleInPlace(l);for(var c=o;c<e.animations.length;c++){var h=e.animations[c],u=(l=h.weight/t,x.Tmp.Vector3[2]),d=x.Tmp.Vector3[3],f=x.Tmp.Quaternion[1];h.currentValue.decompose(d,f,u),d.scaleAndAddToRef(l,r),f.scaleAndAddToRef(l,n),u.scaleAndAddToRef(l,i)}return x.Matrix.ComposeToRef(r,n,i,s._workValue),s._workValue},E.prototype._processLateAnimationBindingsForQuaternions=function(e,t){var i=e.animations[0],r=e.originalValue;if(1===e.animations.length)return x.Quaternion.SlerpToRef(r,i.currentValue,Math.min(1,e.totalWeight),t),t;var n,o,s=1;if(e.totalWeight<1){var a=1-e.totalWeight;o=[],(n=[]).push(r),o.push(a)}else{if(2===e.animations.length)return x.Quaternion.SlerpToRef(e.animations[0].currentValue,e.animations[1].currentValue,e.animations[1].weight/e.totalWeight,t),t;n=[],o=[],s=e.totalWeight}for(var l=0;l<e.animations.length;l++){var c=e.animations[l];n.push(c.currentValue),o.push(c.weight/s)}for(var h=0,u=null,d=0;d<n.length;)u?(h+=o[d],x.Quaternion.SlerpToRef(u,n[d],o[d]/h,u),d++):(x.Quaternion.SlerpToRef(n[d],n[d+1],o[d+1]/(o[d]+o[d+1]),t),u=t,h=o[d]+o[d+1],d+=2);return u},E.prototype._processLateAnimationBindings=function(){if(this._registeredForLateAnimationBindings.length){for(var e=0;e<this._registeredForLateAnimationBindings.length;e++){var t=this._registeredForLateAnimationBindings.data[e];for(var i in t._lateAnimationHolders){var r=t._lateAnimationHolders[i],n=r.animations[0],o=r.originalValue,s=x.Animation.AllowMatrixDecomposeForInterpolation&&o.m,a=t[i];if(s)a=this._processLateAnimationBindingsForMatrices(r);else if(void 0!==o.w)a=this._processLateAnimationBindingsForQuaternions(r,a||x.Quaternion.Identity());else{var l=0,c=1;if(r.totalWeight<1)a=o.scale?o.scale(1-r.totalWeight):o*(1-r.totalWeight);else{c=r.totalWeight;var h=n.weight/c;a=1!==h?n.currentValue.scale?n.currentValue.scale(h):n.currentValue*h:n.currentValue,l=1}for(var u=l;u<r.animations.length;u++){var d=r.animations[u],f=d.weight/c;d.currentValue.scaleAndAddToRef?d.currentValue.scaleAndAddToRef(f,a):a+=d.currentValue*f}}t[i]=a}t._lateAnimationHolders={}}this._registeredForLateAnimationBindings.reset()}},E.prototype._switchToAlternateCameraConfiguration=function(e){this._useAlternateCameraConfiguration=e},E.prototype.getViewMatrix=function(){return this._useAlternateCameraConfiguration?this._alternateViewMatrix:this._viewMatrix},E.prototype.getProjectionMatrix=function(){return this._useAlternateCameraConfiguration?this._alternateProjectionMatrix:this._projectionMatrix},E.prototype.getTransformMatrix=function(){return this._useAlternateCameraConfiguration?this._alternateTransformMatrix:this._transformMatrix},E.prototype.setTransformMatrix=function(e,t){if(this._viewUpdateFlag!==e.updateFlag||this._projectionUpdateFlag!==t.updateFlag){if(this._viewUpdateFlag=e.updateFlag,this._projectionUpdateFlag=t.updateFlag,this._viewMatrix=e,this._projectionMatrix=t,this._viewMatrix.multiplyToRef(this._projectionMatrix,this._transformMatrix),this._frustumPlanes?x.Frustum.GetPlanesToRef(this._transformMatrix,this._frustumPlanes):this._frustumPlanes=x.Frustum.GetPlanes(this._transformMatrix),this.activeCamera&&this.activeCamera._alternateCamera){var i=this.activeCamera._alternateCamera;i.getViewMatrix().multiplyToRef(i.getProjectionMatrix(),x.Tmp.Matrix[0]),x.Frustum.GetRightPlaneToRef(x.Tmp.Matrix[0],this._frustumPlanes[3])}this._sceneUbo.useUbo&&(this._sceneUbo.updateMatrix(\"viewProjection\",this._transformMatrix),this._sceneUbo.updateMatrix(\"view\",this._viewMatrix),this._sceneUbo.update())}},E.prototype._setAlternateTransformMatrix=function(e,t){this._alternateViewUpdateFlag===e.updateFlag&&this._alternateProjectionUpdateFlag===t.updateFlag||(this._alternateViewUpdateFlag=e.updateFlag,this._alternateProjectionUpdateFlag=t.updateFlag,this._alternateViewMatrix=e,this._alternateProjectionMatrix=t,this._alternateTransformMatrix||(this._alternateTransformMatrix=x.Matrix.Zero()),this._alternateViewMatrix.multiplyToRef(this._alternateProjectionMatrix,this._alternateTransformMatrix),this._alternateSceneUbo||this._createAlternateUbo(),this._alternateSceneUbo.useUbo&&(this._alternateSceneUbo.updateMatrix(\"viewProjection\",this._alternateTransformMatrix),this._alternateSceneUbo.updateMatrix(\"view\",this._alternateViewMatrix),this._alternateSceneUbo.update()))},E.prototype.getSceneUniformBuffer=function(){return this._useAlternateCameraConfiguration?this._alternateSceneUbo:this._sceneUbo},E.prototype.getUniqueId=function(){var e=E._uniqueIdCounter;return E._uniqueIdCounter++,e},E.prototype.addMesh=function(e,t){var i=this;void 0===t&&(t=!1),this.meshes.push(e),this.collisionCoordinator&&this.collisionCoordinator.onMeshAdded(e),e._resyncLightSources(),this.onNewMeshAddedObservable.notifyObservers(e),t&&e.getChildMeshes().forEach((function(e){i.addMesh(e)}))},E.prototype.removeMesh=function(e,t){var i=this;void 0===t&&(t=!1);var r=this.meshes.indexOf(e);return-1!==r&&this.meshes.splice(r,1),this.onMeshRemovedObservable.notifyObservers(e),t&&e.getChildMeshes().forEach((function(e){i.removeMesh(e)})),r},E.prototype.addTransformNode=function(e){this.transformNodes.push(e),this.onNewTransformNodeAddedObservable.notifyObservers(e)},E.prototype.removeTransformNode=function(e){var t=this.transformNodes.indexOf(e);return-1!==t&&this.transformNodes.splice(t,1),this.onTransformNodeRemovedObservable.notifyObservers(e),t},E.prototype.removeSkeleton=function(e){var t=this.skeletons.indexOf(e);return-1!==t&&this.skeletons.splice(t,1),t},E.prototype.removeMorphTargetManager=function(e){var t=this.morphTargetManagers.indexOf(e);return-1!==t&&this.morphTargetManagers.splice(t,1),t},E.prototype.removeLight=function(e){var t=this.lights.indexOf(e);if(-1!==t){for(var i=0,r=this.meshes;i<r.length;i++){r[i]._removeLightSource(e)}this.lights.splice(t,1),this.sortLightsByPriority()}return this.onLightRemovedObservable.notifyObservers(e),t},E.prototype.removeCamera=function(e){var t=this.cameras.indexOf(e);-1!==t&&this.cameras.splice(t,1);var i=this.activeCameras.indexOf(e);return-1!==i&&this.activeCameras.splice(i,1),this.activeCamera===e&&(0<this.cameras.length?this.activeCamera=this.cameras[0]:this.activeCamera=null),this.onCameraRemovedObservable.notifyObservers(e),t},E.prototype.removeParticleSystem=function(e){var t=this.particleSystems.indexOf(e);return-1!==t&&this.particleSystems.splice(t,1),t},E.prototype.removeAnimation=function(e){var t=this.animations.indexOf(e);return-1!==t&&this.animations.splice(t,1),t},E.prototype.removeAnimationGroup=function(e){var t=this.animationGroups.indexOf(e);return-1!==t&&this.animationGroups.splice(t,1),t},E.prototype.removeMultiMaterial=function(e){var t=this.multiMaterials.indexOf(e);return-1!==t&&this.multiMaterials.splice(t,1),t},E.prototype.removeMaterial=function(e){var t=this.materials.indexOf(e);return-1!==t&&this.materials.splice(t,1),this.onMaterialRemovedObservable.notifyObservers(e),t},E.prototype.removeActionManager=function(e){var t=this.actionManagers.indexOf(e);return-1!==t&&this.actionManagers.splice(t,1),t},E.prototype.removeTexture=function(e){var t=this.textures.indexOf(e);return-1!==t&&this.textures.splice(t,1),this.onTextureRemovedObservable.notifyObservers(e),t},E.prototype.addLight=function(e){this.lights.push(e),this.sortLightsByPriority();for(var t=0,i=this.meshes;t<i.length;t++){var r=i[t];-1===r._lightSources.indexOf(e)&&(r._lightSources.push(e),r._resyncLightSources())}this.onNewLightAddedObservable.notifyObservers(e)},E.prototype.sortLightsByPriority=function(){this.requireLightSorting&&this.lights.sort(x.Light.CompareLightsPriority)},E.prototype.addCamera=function(e){this.cameras.push(e),this.onNewCameraAddedObservable.notifyObservers(e)},E.prototype.addSkeleton=function(e){this.skeletons.push(e)},E.prototype.addParticleSystem=function(e){this.particleSystems.push(e)},E.prototype.addAnimation=function(e){this.animations.push(e)},E.prototype.addAnimationGroup=function(e){this.animationGroups.push(e)},E.prototype.addMultiMaterial=function(e){this.multiMaterials.push(e)},E.prototype.addMaterial=function(e){this.materials.push(e),this.onNewMaterialAddedObservable.notifyObservers(e)},E.prototype.addMorphTargetManager=function(e){this.morphTargetManagers.push(e)},E.prototype.addGeometry=function(e){this.geometries.push(e)},E.prototype.addActionManager=function(e){this.actionManagers.push(e)},E.prototype.addTexture=function(e){this.textures.push(e),this.onNewTextureAddedObservable.notifyObservers(e)},E.prototype.switchActiveCamera=function(e,t){void 0===t&&(t=!0);var i=this._engine.getRenderingCanvas();i&&(this.activeCamera&&this.activeCamera.detachControl(i),this.activeCamera=e,t&&e.attachControl(i))},E.prototype.setActiveCameraByID=function(e){var t=this.getCameraByID(e);return t?this.activeCamera=t:null},E.prototype.setActiveCameraByName=function(e){var t=this.getCameraByName(e);return t?this.activeCamera=t:null},E.prototype.getAnimationGroupByName=function(e){for(var t=0;t<this.animationGroups.length;t++)if(this.animationGroups[t].name===e)return this.animationGroups[t];return null},E.prototype.getMaterialByID=function(e){for(var t=0;t<this.materials.length;t++)if(this.materials[t].id===e)return this.materials[t];return null},E.prototype.getMaterialByName=function(e){for(var t=0;t<this.materials.length;t++)if(this.materials[t].name===e)return this.materials[t];return null},E.prototype.getCameraByID=function(e){for(var t=0;t<this.cameras.length;t++)if(this.cameras[t].id===e)return this.cameras[t];return null},E.prototype.getCameraByUniqueID=function(e){for(var t=0;t<this.cameras.length;t++)if(this.cameras[t].uniqueId===e)return this.cameras[t];return null},E.prototype.getCameraByName=function(e){for(var t=0;t<this.cameras.length;t++)if(this.cameras[t].name===e)return this.cameras[t];return null},E.prototype.getBoneByID=function(e){for(var t=0;t<this.skeletons.length;t++)for(var i=this.skeletons[t],r=0;r<i.bones.length;r++)if(i.bones[r].id===e)return i.bones[r];return null},E.prototype.getBoneByName=function(e){for(var t=0;t<this.skeletons.length;t++)for(var i=this.skeletons[t],r=0;r<i.bones.length;r++)if(i.bones[r].name===e)return i.bones[r];return null},E.prototype.getLightByName=function(e){for(var t=0;t<this.lights.length;t++)if(this.lights[t].name===e)return this.lights[t];return null},E.prototype.getLightByID=function(e){for(var t=0;t<this.lights.length;t++)if(this.lights[t].id===e)return this.lights[t];return null},E.prototype.getLightByUniqueID=function(e){for(var t=0;t<this.lights.length;t++)if(this.lights[t].uniqueId===e)return this.lights[t];return null},E.prototype.getParticleSystemByID=function(e){for(var t=0;t<this.particleSystems.length;t++)if(this.particleSystems[t].id===e)return this.particleSystems[t];return null},E.prototype.getGeometryByID=function(e){for(var t=0;t<this.geometries.length;t++)if(this.geometries[t].id===e)return this.geometries[t];return null},E.prototype.pushGeometry=function(e,t){return!(!t&&this.getGeometryByID(e.id))&&(this.geometries.push(e),this.collisionCoordinator&&this.collisionCoordinator.onGeometryAdded(e),this.onNewGeometryAddedObservable.notifyObservers(e),!0)},E.prototype.removeGeometry=function(e){var t=this.geometries.indexOf(e);return-1<t&&(this.geometries.splice(t,1),this.collisionCoordinator&&this.collisionCoordinator.onGeometryDeleted(e),this.onGeometryRemovedObservable.notifyObservers(e),!0)},E.prototype.getGeometries=function(){return this.geometries},E.prototype.getMeshByID=function(e){for(var t=0;t<this.meshes.length;t++)if(this.meshes[t].id===e)return this.meshes[t];return null},E.prototype.getMeshesByID=function(t){return this.meshes.filter((function(e){return e.id===t}))},E.prototype.getTransformNodeByID=function(e){for(var t=0;t<this.transformNodes.length;t++)if(this.transformNodes[t].id===e)return this.transformNodes[t];return null},E.prototype.getTransformNodesByID=function(t){return this.transformNodes.filter((function(e){return e.id===t}))},E.prototype.getMeshByUniqueID=function(e){for(var t=0;t<this.meshes.length;t++)if(this.meshes[t].uniqueId===e)return this.meshes[t];return null},E.prototype.getLastMeshByID=function(e){for(var t=this.meshes.length-1;0<=t;t--)if(this.meshes[t].id===e)return this.meshes[t];return null},E.prototype.getLastEntryByID=function(e){var t;for(t=this.meshes.length-1;0<=t;t--)if(this.meshes[t].id===e)return this.meshes[t];for(t=this.transformNodes.length-1;0<=t;t--)if(this.transformNodes[t].id===e)return this.transformNodes[t];for(t=this.cameras.length-1;0<=t;t--)if(this.cameras[t].id===e)return this.cameras[t];for(t=this.lights.length-1;0<=t;t--)if(this.lights[t].id===e)return this.lights[t];return null},E.prototype.getNodeByID=function(e){var t=this.getMeshByID(e);if(t)return t;var i=this.getLightByID(e);if(i)return i;var r=this.getCameraByID(e);return r||this.getBoneByID(e)},E.prototype.getNodeByName=function(e){var t=this.getMeshByName(e);if(t)return t;var i=this.getLightByName(e);if(i)return i;var r=this.getCameraByName(e);return r||this.getBoneByName(e)},E.prototype.getMeshByName=function(e){for(var t=0;t<this.meshes.length;t++)if(this.meshes[t].name===e)return this.meshes[t];return null},E.prototype.getTransformNodeByName=function(e){for(var t=0;t<this.transformNodes.length;t++)if(this.transformNodes[t].name===e)return this.transformNodes[t];return null},E.prototype.getLastSkeletonByID=function(e){for(var t=this.skeletons.length-1;0<=t;t--)if(this.skeletons[t].id===e)return this.skeletons[t];return null},E.prototype.getSkeletonById=function(e){for(var t=0;t<this.skeletons.length;t++)if(this.skeletons[t].id===e)return this.skeletons[t];return null},E.prototype.getSkeletonByName=function(e){for(var t=0;t<this.skeletons.length;t++)if(this.skeletons[t].name===e)return this.skeletons[t];return null},E.prototype.getMorphTargetManagerById=function(e){for(var t=0;t<this.morphTargetManagers.length;t++)if(this.morphTargetManagers[t].uniqueId===e)return this.morphTargetManagers[t];return null},E.prototype.isActiveMesh=function(e){return-1!==this._activeMeshes.indexOf(e)},Object.defineProperty(E.prototype,\"uid\",{get:function(){return this._uid||(this._uid=x.Tools.RandomId()),this._uid},enumerable:!0,configurable:!0}),E.prototype.addExternalData=function(e,t){return this._externalData||(this._externalData=new x.StringDictionary),this._externalData.add(e,t)},E.prototype.getExternalData=function(e){return this._externalData?this._externalData.get(e):null},E.prototype.getOrAddExternalDataWithFactory=function(e,t){return this._externalData||(this._externalData=new x.StringDictionary),this._externalData.getOrAddWithFactory(e,t)},E.prototype.removeExternalData=function(e){return this._externalData.remove(e)},E.prototype._evaluateSubMesh=function(e,t){if(this.dispatchAllSubMeshesOfActiveMeshes||t.alwaysSelectAsActiveMesh||1===t.subMeshes.length||e.isInFrustum(this._frustumPlanes)){for(var i=0,r=this._evaluateSubMeshStage;i<r.length;i++){r[i].action(t,e)}var n=e.getMaterial();null!=n&&(n.hasRenderTargetTextures&&void 0!==n.getRenderTargetTextures&&-1===this._processedMaterials.indexOf(n)&&(this._processedMaterials.push(n),this._renderTargets.concatWithNoDuplicate(n.getRenderTargetTextures())),this._activeIndices.addCount(e.indexCount,!1),this._renderingManager.dispatch(e,t,n))}},E.prototype.freeProcessedMaterials=function(){this._processedMaterials.dispose()},E.prototype.freeActiveMeshes=function(){if(this._activeMeshes.dispose(),this.activeCamera&&this.activeCamera._activeMeshes&&this.activeCamera._activeMeshes.dispose(),this.activeCameras)for(var e=0;e<this.activeCameras.length;e++){var t=this.activeCameras[e];t&&t._activeMeshes&&t._activeMeshes.dispose()}},E.prototype.freeRenderingGroups=function(){if(this._renderingManager&&this._renderingManager.freeRenderingGroups(),this.textures)for(var e=0;e<this.textures.length;e++){var t=this.textures[e];t&&t.renderList&&t.freeRenderingGroups()}},E.prototype._isInIntermediateRendering=function(){return this._intermediateRendering},E.prototype.freezeActiveMeshes=function(){return this.activeCamera&&(this._frustumPlanes||this.setTransformMatrix(this.activeCamera.getViewMatrix(),this.activeCamera.getProjectionMatrix()),this._evaluateActiveMeshes(),this._activeMeshesFrozen=!0),this},E.prototype.unfreezeActiveMeshes=function(){return this._activeMeshesFrozen=!1,this},E.prototype._evaluateActiveMeshes=function(){if((!this._activeMeshesFrozen||!this._activeMeshes.length)&&this.activeCamera){this.onBeforeActiveMeshesEvaluationObservable.notifyObservers(this),this.activeCamera._activeMeshes.reset(),this._activeMeshes.reset(),this._renderingManager.reset(),this._processedMaterials.reset(),this._activeParticleSystems.reset(),this._activeSkeletons.reset(),this._softwareSkinnedMeshes.reset();for(var e=0,t=this._beforeEvaluateActiveMeshStage;e<t.length;e++){t[e].action()}for(var i=this.getActiveMeshCandidates(),r=i.length,n=0;n<r;n++){var o=i.data[n];if(!o.isBlocked&&(this._totalVertices.addCount(o.getTotalVertices(),!1),o.isReady()&&o.isEnabled())){o.computeWorldMatrix(),o.actionManager&&o.actionManager.hasSpecificTriggers2(x.ActionManager.OnIntersectionEnterTrigger,x.ActionManager.OnIntersectionExitTrigger)&&this._meshesForIntersections.pushNoDuplicate(o);var s=o.getLOD(this.activeCamera);null!=s&&(o._preActivate(),o.isVisible&&0<o.visibility&&(o.alwaysSelectAsActiveMesh||0!=(o.layerMask&this.activeCamera.layerMask)&&o.isInFrustum(this._frustumPlanes))&&(this._activeMeshes.push(o),this.activeCamera._activeMeshes.push(o),o._activate(this._renderId),s!==o&&s._activate(this._renderId),this._activeMesh(o,s)))}}if(this.onAfterActiveMeshesEvaluationObservable.notifyObservers(this),this.particlesEnabled){this.onBeforeParticlesRenderingObservable.notifyObservers(this);for(var a=0;a<this.particleSystems.length;a++){var l=this.particleSystems[a];if(l.isStarted()&&l.emitter){var c=l.emitter;c.position&&!c.isEnabled()||(this._activeParticleSystems.push(l),l.animate(),this._renderingManager.dispatchParticles(l))}}this.onAfterParticlesRenderingObservable.notifyObservers(this)}}},E.prototype._activeMesh=function(e,t){this._skeletonsEnabled&&null!==t.skeleton&&void 0!==t.skeleton&&(this._activeSkeletons.pushNoDuplicate(t.skeleton)&&t.skeleton.prepare(),t.computeBonesUsingShaders||this._softwareSkinnedMeshes.pushNoDuplicate(t));for(var i=0,r=this._activeMeshStage;i<r.length;i++){r[i].action(e,t)}if(null!=t&&void 0!==t.subMeshes&&null!==t.subMeshes&&0<t.subMeshes.length)for(var n=this.getActiveSubMeshCandidates(t),o=n.length,s=0;s<o;s++){var a=n.data[s];this._evaluateSubMesh(a,t)}},E.prototype.updateTransformMatrix=function(e){this.activeCamera&&this.setTransformMatrix(this.activeCamera.getViewMatrix(),this.activeCamera.getProjectionMatrix(e))},E.prototype.updateAlternateTransformMatrix=function(e){this._setAlternateTransformMatrix(e.getViewMatrix(),e.getProjectionMatrix())},E.prototype._renderForCamera=function(e,t){if(!e||!e._skipRendering){var i=this._engine;if(this.activeCamera=e,!this.activeCamera)throw new Error(\"Active camera not set\");i.setViewport(this.activeCamera.viewport),this.resetCachedMaterial(),this._renderId++,this.updateTransformMatrix(),e._alternateCamera&&(this.updateAlternateTransformMatrix(e._alternateCamera),this._alternateRendering=!0),this.onBeforeCameraRenderObservable.notifyObservers(this.activeCamera),this._evaluateActiveMeshes();for(var r=0;r<this._softwareSkinnedMeshes.length;r++){var n=this._softwareSkinnedMeshes.data[r];n.applySkeleton(n.skeleton)}this.onBeforeRenderTargetsRenderObservable.notifyObservers(this),e.customRenderTargets&&0<e.customRenderTargets.length&&this._renderTargets.concatWithNoDuplicate(e.customRenderTargets),t&&t.customRenderTargets&&0<t.customRenderTargets.length&&this._renderTargets.concatWithNoDuplicate(t.customRenderTargets);for(var o=0,s=this._gatherActiveCameraRenderTargetsStage;o<s.length;o++){s[o].action(this._renderTargets)}if(this.renderTargetsEnabled){if(this._intermediateRendering=!0,0<this._renderTargets.length){x.Tools.StartPerformanceCounter(\"Render targets\",0<this._renderTargets.length);for(var a=0;a<this._renderTargets.length;a++){var l=this._renderTargets.data[a];if(l._shouldRender()){this._renderId++;var c=l.activeCamera&&l.activeCamera!==this.activeCamera;l.render(c,this.dumpNextRenderTargets)}}x.Tools.EndPerformanceCounter(\"Render targets\",0<this._renderTargets.length),this._renderId++}for(var h=0,u=this._cameraDrawRenderTargetStage;h<u.length;h++){u[h].action(this.activeCamera)}this._intermediateRendering=!1,i.restoreDefaultFramebuffer()}this.onAfterRenderTargetsRenderObservable.notifyObservers(this),this.postProcessManager&&this.postProcessManager._prepareFrame();for(var d=0,f=this._beforeCameraDrawStage;d<f.length;d++){f[d].action(this.activeCamera)}this.onBeforeDrawPhaseObservable.notifyObservers(this),this._renderingManager.render(null,null,!0,!0),this.onAfterDrawPhaseObservable.notifyObservers(this);for(var p=0,_=this._afterCameraDrawStage;p<_.length;p++){_[p].action(this.activeCamera)}this.postProcessManager&&this.postProcessManager._finalizeFrame(e.isIntermediate),this._renderTargets.reset(),this._alternateRendering=!1,this.onAfterCameraRenderObservable.notifyObservers(this.activeCamera)}},E.prototype._processSubCameras=function(e){if(e.cameraRigMode!==x.Camera.RIG_MODE_NONE){for(var t=0;t<e._rigCameras.length;t++)this._renderForCamera(e._rigCameras[t],e);this.activeCamera=e,this.setTransformMatrix(this.activeCamera.getViewMatrix(),this.activeCamera.getProjectionMatrix())}else this._renderForCamera(e)},E.prototype._checkIntersections=function(){for(var e=0;e<this._meshesForIntersections.length;e++){var t=this._meshesForIntersections.data[e];if(t.actionManager)for(var i=0;i<t.actionManager.actions.length;i++){var r=t.actionManager.actions[i];if(r.trigger===x.ActionManager.OnIntersectionEnterTrigger||r.trigger===x.ActionManager.OnIntersectionExitTrigger){var n=r.getTriggerParameter(),o=n instanceof x.AbstractMesh?n:n.mesh,s=o.intersectsMesh(t,n.usePreciseIntersection),a=t._intersectionsInProgress.indexOf(o);s&&-1===a?r.trigger===x.ActionManager.OnIntersectionEnterTrigger?(r._executeCurrent(x.ActionEvent.CreateNew(t,void 0,o)),t._intersectionsInProgress.push(o)):r.trigger===x.ActionManager.OnIntersectionExitTrigger&&t._intersectionsInProgress.push(o):!s&&-1<a&&(r.trigger===x.ActionManager.OnIntersectionExitTrigger&&r._executeCurrent(x.ActionEvent.CreateNew(t,void 0,o)),t.actionManager.hasSpecificTrigger(x.ActionManager.OnIntersectionExitTrigger,(function(e){var t=e instanceof x.AbstractMesh?e:e.mesh;return o===t}))&&r.trigger!==x.ActionManager.OnIntersectionExitTrigger||t._intersectionsInProgress.splice(a,1))}}}},E.prototype._advancePhysicsEngineStep=function(e){},E.prototype.render=function(e){if(void 0===e&&(e=!0),!this.isDisposed){if(this._frameId++,this._registerTransientComponents(),this._activeParticles.fetchNewFrame(),this._totalVertices.fetchNewFrame(),this._activeIndices.fetchNewFrame(),this._activeBones.fetchNewFrame(),this._meshesForIntersections.reset(),this.resetCachedMaterial(),this.onBeforeAnimationsObservable.notifyObservers(this),this.actionManager&&this.actionManager.processTrigger(x.ActionManager.OnEveryFrameTrigger),this._engine.isDeterministicLockStep()){var t=Math.max(E.MinDeltaTime,Math.min(this._engine.getDeltaTime(),E.MaxDeltaTime))+this._timeAccumulator,i=this.getDeterministicFrameTime(),r=0,n=this._engine.getLockstepMaxSteps(),o=Math.floor(t/60);for(o=Math.min(o,n);this.onBeforeStepObservable.notifyObservers(this),this._animationRatio=.06*i,this._animate(),this.onAfterAnimationsObservable.notifyObservers(this),this._advancePhysicsEngineStep(i),this.onAfterStepObservable.notifyObservers(this),this._currentStepId++,0<(t-=i)&&++r<o;);this._timeAccumulator=t<0?0:t}else{t=this.useConstantAnimationDeltaTime?16:Math.max(E.MinDeltaTime,Math.min(this._engine.getDeltaTime(),E.MaxDeltaTime));this._animationRatio=.06*t,this._animate(),this.onAfterAnimationsObservable.notifyObservers(this),this._advancePhysicsEngineStep(t)}for(var s=0,a=this._beforeCameraUpdateStage;s<a.length;s++){a[s].action()}if(e)if(0<this.activeCameras.length)for(var l=0;l<this.activeCameras.length;l++){var c=this.activeCameras[l];if(c.update(),c.cameraRigMode!==x.Camera.RIG_MODE_NONE)for(var h=0;h<c._rigCameras.length;h++)c._rigCameras[h].update()}else if(this.activeCamera&&(this.activeCamera.update(),this.activeCamera.cameraRigMode!==x.Camera.RIG_MODE_NONE))for(h=0;h<this.activeCamera._rigCameras.length;h++)this.activeCamera._rigCameras[h].update();this.onBeforeRenderObservable.notifyObservers(this),this.onBeforeRenderTargetsRenderObservable.notifyObservers(this);var u=this.getEngine(),d=this.activeCamera;if(this.renderTargetsEnabled){x.Tools.StartPerformanceCounter(\"Custom render targets\",0<this.customRenderTargets.length),this._intermediateRendering=!0;for(var f=0;f<this.customRenderTargets.length;f++){var p=this.customRenderTargets[f];if(p._shouldRender()){if(this._renderId++,this.activeCamera=p.activeCamera||this.activeCamera,!this.activeCamera)throw new Error(\"Active camera not set\");u.setViewport(this.activeCamera.viewport),this.updateTransformMatrix(),p.render(d!==this.activeCamera,this.dumpNextRenderTargets)}}x.Tools.EndPerformanceCounter(\"Custom render targets\",0<this.customRenderTargets.length),this._intermediateRendering=!1,this._renderId++}0<this.customRenderTargets.length&&u.restoreDefaultFramebuffer(),this.onAfterRenderTargetsRenderObservable.notifyObservers(this),this.activeCamera=d;for(var _=0,m=this._beforeClearStage;_<m.length;_++){m[_].action()}(this.autoClearDepthAndStencil||this.autoClear)&&this._engine.clear(this.clearColor,this.autoClear||this.forceWireframe||this.forcePointsCloud,this.autoClearDepthAndStencil,this.autoClearDepthAndStencil);for(var g=0,v=this._gatherRenderTargetsStage;g<v.length;g++){v[g].action(this._renderTargets)}if(0<this.activeCameras.length)for(l=0;l<this.activeCameras.length;l++)0<l&&this._engine.clear(null,!1,!0,!0),this._processSubCameras(this.activeCameras[l]);else{if(!this.activeCamera)throw new Error(\"No camera defined\");this._processSubCameras(this.activeCamera)}this._checkIntersections();for(var y=0,b=this._afterRenderStage;y<b.length;y++){b[y].action()}if(this.afterRender&&this.afterRender(),this.onAfterRenderObservable.notifyObservers(this),this._toBeDisposed.length){for(h=0;h<this._toBeDisposed.length;h++){var T=this._toBeDisposed[h];T&&T.dispose()}this._toBeDisposed=[]}this.dumpNextRenderTargets&&(this.dumpNextRenderTargets=!1),this._activeBones.addCount(0,!0),this._activeIndices.addCount(0,!0),this._activeParticles.addCount(0,!0)}},E.prototype.freezeMaterials=function(){for(var e=0;e<this.materials.length;e++)this.materials[e].freeze()},E.prototype.unfreezeMaterials=function(){for(var e=0;e<this.materials.length;e++)this.materials[e].unfreeze()},E.prototype.dispose=function(){this.beforeRender=null,this.afterRender=null,this.skeletons=[],this.morphTargetManagers=[],this._transientComponents=[],this._isReadyForMeshStage.clear(),this._beforeEvaluateActiveMeshStage.clear(),this._evaluateSubMeshStage.clear(),this._activeMeshStage.clear(),this._cameraDrawRenderTargetStage.clear(),this._beforeCameraDrawStage.clear(),this._beforeRenderingGroupDrawStage.clear(),this._beforeRenderingMeshStage.clear(),this._afterRenderingMeshStage.clear(),this._afterRenderingGroupDrawStage.clear(),this._afterCameraDrawStage.clear(),this._afterRenderStage.clear(),this._beforeCameraUpdateStage.clear(),this._beforeClearStage.clear(),this._gatherRenderTargetsStage.clear(),this._gatherActiveCameraRenderTargetsStage.clear(),this._pointerMoveStage.clear(),this._pointerDownStage.clear(),this._pointerUpStage.clear();for(var e=0,t=this._components;e<t.length;e++){t[e].dispose()}this.importedMeshesFiles=new Array,this.stopAllAnimations(),this.resetCachedMaterial(),this.activeCamera&&(this.activeCamera._activeMeshes.dispose(),this.activeCamera=null),this._activeMeshes.dispose(),this._renderingManager.dispose(),this._processedMaterials.dispose(),this._activeParticleSystems.dispose(),this._activeSkeletons.dispose(),this._softwareSkinnedMeshes.dispose(),this._renderTargets.dispose(),this._registeredForLateAnimationBindings.dispose(),this._meshesForIntersections.dispose(),this._toBeDisposed=[];for(var i=0,r=this._activeRequests;i<r.length;i++){r[i].abort()}this.onDisposeObservable.notifyObservers(this),this.onDisposeObservable.clear(),this.onBeforeRenderObservable.clear(),this.onAfterRenderObservable.clear(),this.onBeforeRenderTargetsRenderObservable.clear(),this.onAfterRenderTargetsRenderObservable.clear(),this.onAfterStepObservable.clear(),this.onBeforeStepObservable.clear(),this.onBeforeActiveMeshesEvaluationObservable.clear(),this.onAfterActiveMeshesEvaluationObservable.clear(),this.onBeforeParticlesRenderingObservable.clear(),this.onAfterParticlesRenderingObservable.clear(),this.onBeforeDrawPhaseObservable.clear(),this.onAfterDrawPhaseObservable.clear(),this.onBeforeAnimationsObservable.clear(),this.onAfterAnimationsObservable.clear(),this.onDataLoadedObservable.clear(),this.onBeforeRenderingGroupObservable.clear(),this.onAfterRenderingGroupObservable.clear(),this.onMeshImportedObservable.clear(),this.onBeforeCameraRenderObservable.clear(),this.onAfterCameraRenderObservable.clear(),this.onReadyObservable.clear(),this.onNewCameraAddedObservable.clear(),this.onCameraRemovedObservable.clear(),this.onNewLightAddedObservable.clear(),this.onLightRemovedObservable.clear(),this.onNewGeometryAddedObservable.clear(),this.onGeometryRemovedObservable.clear(),this.onNewTransformNodeAddedObservable.clear(),this.onTransformNodeRemovedObservable.clear(),this.onNewMeshAddedObservable.clear(),this.onMeshRemovedObservable.clear(),this.onNewMaterialAddedObservable.clear(),this.onMaterialRemovedObservable.clear(),this.onNewTextureAddedObservable.clear(),this.onTextureRemovedObservable.clear(),this.onPrePointerObservable.clear(),this.onPointerObservable.clear(),this.onPreKeyboardObservable.clear(),this.onKeyboardObservable.clear(),this.detachControl();var n,o=this._engine.getRenderingCanvas();if(o)for(n=0;n<this.cameras.length;n++)this.cameras[n].detachControl(o);for(;this.animationGroups.length;)this.animationGroups[0].dispose();for(;this.lights.length;)this.lights[0].dispose();for(;this.meshes.length;)this.meshes[0].dispose(!0);for(;this.transformNodes.length;)this.removeTransformNode(this.transformNodes[0]);for(;this.cameras.length;)this.cameras[0].dispose();for(this.defaultMaterial&&this.defaultMaterial.dispose();this.multiMaterials.length;)this.multiMaterials[0].dispose();for(;this.materials.length;)this.materials[0].dispose();for(;this.particleSystems.length;)this.particleSystems[0].dispose();for(;this.postProcesses.length;)this.postProcesses[0].dispose();for(;this.textures.length;)this.textures[0].dispose();this._sceneUbo.dispose(),this._alternateSceneUbo&&this._alternateSceneUbo.dispose(),this.postProcessManager.dispose(),-1<(n=this._engine.scenes.indexOf(this))&&this._engine.scenes.splice(n,1),this._engine.wipeCaches(!0),this._isDisposed=!0},Object.defineProperty(E.prototype,\"isDisposed\",{get:function(){return this._isDisposed},enumerable:!0,configurable:!0}),E.prototype.clearCachedVertexData=function(){for(var e=0;e<this.meshes.length;e++){var t=this.meshes[e].geometry;if(t)for(var i in t._indices=[],t._vertexBuffers)t._vertexBuffers.hasOwnProperty(i)&&(t._vertexBuffers[i]._buffer._data=null)}},E.prototype.cleanCachedTextureBuffer=function(){for(var e=0,t=this.textures;e<t.length;e++){var i=t[e];i._buffer&&(i._buffer=null)}},E.prototype.getWorldExtends=function(e){var n=new x.Vector3(Number.MAX_VALUE,Number.MAX_VALUE,Number.MAX_VALUE),o=new x.Vector3(-Number.MAX_VALUE,-Number.MAX_VALUE,-Number.MAX_VALUE);return e=e||function(){return!0},this.meshes.filter(e).forEach((function(e){if(e.computeWorldMatrix(!0),e.subMeshes&&0!==e.subMeshes.length&&!e.infiniteDistance){var t=e.getBoundingInfo(),i=t.boundingBox.minimumWorld,r=t.boundingBox.maximumWorld;x.Tools.CheckExtends(i,n,o),x.Tools.CheckExtends(r,n,o)}})),{min:n,max:o}},E.prototype.createPickingRay=function(e,t,i,r,n){void 0===n&&(n=!1);var o=x.Ray.Zero();return this.createPickingRayToRef(e,t,i,o,r,n),o},E.prototype.createPickingRayToRef=function(e,t,i,r,n,o){void 0===o&&(o=!1);var s=this._engine;if(!n){if(!this.activeCamera)throw new Error(\"Active camera not set\");n=this.activeCamera}var a=n.viewport.toGlobal(s.getRenderWidth(),s.getRenderHeight());return e=e/this._engine.getHardwareScalingLevel()-a.x,t=t/this._engine.getHardwareScalingLevel()-(this._engine.getRenderHeight()-a.y-a.height),r.update(e,t,a.width,a.height,i||x.Matrix.Identity(),o?x.Matrix.Identity():n.getViewMatrix(),n.getProjectionMatrix()),this},E.prototype.createPickingRayInCameraSpace=function(e,t,i){var r=x.Ray.Zero();return this.createPickingRayInCameraSpaceToRef(e,t,r,i),r},E.prototype.createPickingRayInCameraSpaceToRef=function(e,t,i,r){if(!x.PickingInfo)return this;var n=this._engine;if(!r){if(!this.activeCamera)throw new Error(\"Active camera not set\");r=this.activeCamera}var o=r.viewport.toGlobal(n.getRenderWidth(),n.getRenderHeight()),s=x.Matrix.Identity();return e=e/this._engine.getHardwareScalingLevel()-o.x,t=t/this._engine.getHardwareScalingLevel()-(this._engine.getRenderHeight()-o.y-o.height),i.update(e,t,o.width,o.height,s,s,r.getProjectionMatrix()),this},E.prototype._internalPick=function(e,t,i){if(!x.PickingInfo)return null;for(var r=null,n=0;n<this.meshes.length;n++){var o=this.meshes[n];if(t){if(!t(o))continue}else if(!o.isEnabled()||!o.isVisible||!o.isPickable)continue;var s=e(o.getWorldMatrix()),a=o.intersects(s,i);if(a&&a.hit&&((i||null==r||!(a.distance>=r.distance))&&(r=a,i)))break}return r||new x.PickingInfo},E.prototype._internalMultiPick=function(e,t){if(!x.PickingInfo)return null;for(var i=new Array,r=0;r<this.meshes.length;r++){var n=this.meshes[r];if(t){if(!t(n))continue}else if(!n.isEnabled()||!n.isVisible||!n.isPickable)continue;var o=e(n.getWorldMatrix()),s=n.intersects(o,!1);s&&s.hit&&i.push(s)}return i},E.prototype.pick=function(t,i,e,r,n){var o=this;if(!x.PickingInfo)return null;var s=this._internalPick((function(e){return o.createPickingRayToRef(t,i,e,o._tempPickingRay,n||null),o._tempPickingRay}),e,r);return s&&(s.ray=this.createPickingRay(t,i,x.Matrix.Identity(),n||null)),s},E.prototype.pickWithRay=function(t,e,i){var r=this,n=this._internalPick((function(e){return r._pickWithRayInverseMatrix||(r._pickWithRayInverseMatrix=x.Matrix.Identity()),e.invertToRef(r._pickWithRayInverseMatrix),r._cachedRayForTransform||(r._cachedRayForTransform=x.Ray.Zero()),x.Ray.TransformToRef(t,r._pickWithRayInverseMatrix,r._cachedRayForTransform),r._cachedRayForTransform}),e,i);return n&&(n.ray=t),n},E.prototype.multiPick=function(t,i,e,r){var n=this;return this._internalMultiPick((function(e){return n.createPickingRay(t,i,e,r||null)}),e)},E.prototype.multiPickWithRay=function(t,e){var i=this;return this._internalMultiPick((function(e){return i._pickWithRayInverseMatrix||(i._pickWithRayInverseMatrix=x.Matrix.Identity()),e.invertToRef(i._pickWithRayInverseMatrix),i._cachedRayForTransform||(i._cachedRayForTransform=x.Ray.Zero()),x.Ray.TransformToRef(t,i._pickWithRayInverseMatrix,i._cachedRayForTransform),i._cachedRayForTransform}),e)},E.prototype.setPointerOverMesh=function(e){this._pointerOverMesh!==e&&(this._pointerOverMesh&&this._pointerOverMesh.actionManager&&this._pointerOverMesh.actionManager.processTrigger(x.ActionManager.OnPointerOutTrigger,x.ActionEvent.CreateNew(this._pointerOverMesh)),this._pointerOverMesh=e,this._pointerOverMesh&&this._pointerOverMesh.actionManager&&this._pointerOverMesh.actionManager.processTrigger(x.ActionManager.OnPointerOverTrigger,x.ActionEvent.CreateNew(this._pointerOverMesh)))},E.prototype.getPointerOverMesh=function(){return this._pointerOverMesh},E.prototype._rebuildGeometries=function(){for(var e=0,t=this.geometries;e<t.length;e++){t[e]._rebuild()}for(var i=0,r=this.meshes;i<r.length;i++){r[i]._rebuild()}this.postProcessManager&&this.postProcessManager._rebuild();for(var n=0,o=this._components;n<o.length;n++){o[n].rebuild()}for(var s=0,a=this.particleSystems;s<a.length;s++){a[s].rebuild()}},E.prototype._rebuildTextures=function(){for(var e=0,t=this.textures;e<t.length;e++){t[e]._rebuild()}this.markAllMaterialsAsDirty(x.Material.TextureDirtyFlag)},E.prototype._getByTags=function(e,t,i){if(void 0===t)return e;var r=[];for(var n in i=i||function(e){},e){var o=e[n];x.Tags&&x.Tags.MatchesQuery(o,t)&&(r.push(o),i(o))}return r},E.prototype.getMeshesByTags=function(e,t){return this._getByTags(this.meshes,e,t)},E.prototype.getCamerasByTags=function(e,t){return this._getByTags(this.cameras,e,t)},E.prototype.getLightsByTags=function(e,t){return this._getByTags(this.lights,e,t)},E.prototype.getMaterialByTags=function(e,t){return this._getByTags(this.materials,e,t).concat(this._getByTags(this.multiMaterials,e,t))},E.prototype.setRenderingOrder=function(e,t,i,r){void 0===t&&(t=null),void 0===i&&(i=null),void 0===r&&(r=null),this._renderingManager.setRenderingOrder(e,t,i,r)},E.prototype.setRenderingAutoClearDepthStencil=function(e,t,i,r){void 0===i&&(i=!0),void 0===r&&(r=!0),this._renderingManager.setRenderingAutoClearDepthStencil(e,t,i,r)},E.prototype.getAutoClearDepthStencilSetup=function(e){return this._renderingManager.getAutoClearDepthStencilSetup(e)},Object.defineProperty(E.prototype,\"blockMaterialDirtyMechanism\",{get:function(){return this._blockMaterialDirtyMechanism},set:function(e){this._blockMaterialDirtyMechanism!==e&&((this._blockMaterialDirtyMechanism=e)||this.markAllMaterialsAsDirty(x.Material.AllDirtyFlag))},enumerable:!0,configurable:!0}),E.prototype.markAllMaterialsAsDirty=function(e,t){if(!this._blockMaterialDirtyMechanism)for(var i=0,r=this.materials;i<r.length;i++){var n=r[i];t&&!t(n)||n.markAsDirty(e)}},E.prototype._loadFile=function(e,t,i,r,n,o){var s=this,a=x.Tools.LoadFile(e,t,i,r?this.database:void 0,n,o);return this._activeRequests.push(a),a.onCompleteObservable.add((function(e){s._activeRequests.splice(s._activeRequests.indexOf(e),1)})),a},E.prototype._loadFileAsync=function(e,r,n){var o=this;return new Promise(function(t,i){o._loadFile(e,(function(e){t(e)}),void 0,r,n,(function(e,t){i(t)}))})},E._uniqueIdCounter=0,E.FOGMODE_NONE=0,E.FOGMODE_EXP=1,E.FOGMODE_EXP2=2,E.FOGMODE_LINEAR=3,E.MinDeltaTime=1,E.MaxDeltaTime=1e3,E.DragMovementThreshold=10,E.LongPressDelay=500,E.DoubleClickDelay=300,E.ExclusiveDoubleClickMode=!1,E})(x.AbstractScene);x.Scene=t})($a||($a={})),(function(r){var n=(function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return T(t,e),t})(r.AbstractScene);r.KeepAssets=n;var e=(function(i){function e(e){var t=i.call(this)||this;return t.scene=e,t}return T(e,i),e.prototype.addAllToScene=function(){var t=this;this.cameras.forEach((function(e){t.scene.addCamera(e)})),this.lights.forEach((function(e){t.scene.addLight(e)})),this.meshes.forEach((function(e){t.scene.addMesh(e)})),this.skeletons.forEach((function(e){t.scene.addSkeleton(e)})),this.animations.forEach((function(e){t.scene.addAnimation(e)})),this.animationGroups.forEach((function(e){t.scene.addAnimationGroup(e)})),this.multiMaterials.forEach((function(e){t.scene.addMultiMaterial(e)})),this.materials.forEach((function(e){t.scene.addMaterial(e)})),this.morphTargetManagers.forEach((function(e){t.scene.addMorphTargetManager(e)})),this.geometries.forEach((function(e){t.scene.addGeometry(e)})),this.transformNodes.forEach((function(e){t.scene.addTransformNode(e)})),this.actionManagers.forEach((function(e){t.scene.addActionManager(e)})),this.textures.forEach((function(e){t.scene.addTexture(e)}));for(var e=0,i=this.scene._serializableComponents;e<i.length;e++){i[e].addFromContainer(this.scene)}},e.prototype.removeAllFromScene=function(){var t=this;this.cameras.forEach((function(e){t.scene.removeCamera(e)})),this.lights.forEach((function(e){t.scene.removeLight(e)})),this.meshes.forEach((function(e){t.scene.removeMesh(e)})),this.skeletons.forEach((function(e){t.scene.removeSkeleton(e)})),this.animations.forEach((function(e){t.scene.removeAnimation(e)})),this.animationGroups.forEach((function(e){t.scene.removeAnimationGroup(e)})),this.multiMaterials.forEach((function(e){t.scene.removeMultiMaterial(e)})),this.materials.forEach((function(e){t.scene.removeMaterial(e)})),this.morphTargetManagers.forEach((function(e){t.scene.removeMorphTargetManager(e)})),this.geometries.forEach((function(e){t.scene.removeGeometry(e)})),this.transformNodes.forEach((function(e){t.scene.removeTransformNode(e)})),this.actionManagers.forEach((function(e){t.scene.removeActionManager(e)})),this.textures.forEach((function(e){t.scene.removeTexture(e)}));for(var e=0,i=this.scene._serializableComponents;e<i.length;e++){i[e].removeFromContainer(this.scene)}},e.prototype._moveAssets=function(e,t,i){if(e)for(var r=0,n=e;r<n.length;r++){var o=n[r],s=!0;if(i)for(var a=0,l=i;a<l.length;a++){if(o===l[a]){s=!1;break}}s&&t.push(o)}},e.prototype.moveAllFromScene=function(e){for(var t in void 0===e&&(e=new n),this)this.hasOwnProperty(t)&&(this[t]=this[t]||[],this._moveAssets(this.scene[t],this[t],e[t]));this.removeAllFromScene()},e.prototype.createRootMesh=function(){var t=new r.Mesh(\"assetContainerRootMesh\",this.scene);return this.meshes.forEach((function(e){e.parent||t.addChild(e)})),this.meshes.unshift(t),t},e})(r.AbstractScene);r.AssetContainer=e})($a||($a={})),Y=$a||($a={}),K=(function(){function e(e,t,i,r,n,o,s){void 0===r&&(r=0),void 0===n&&(n=!1),void 0===o&&(o=!1),void 0===s&&(s=!1),e instanceof Y.Mesh?this._engine=e.getScene().getEngine():this._engine=e,this._updatable=i,this._instanced=o,this._data=t,this.byteStride=s?r:r*Float32Array.BYTES_PER_ELEMENT,n||this.create()}return e.prototype.createVertexBuffer=function(e,t,i,r,n,o){void 0===o&&(o=!1);var s=o?t:t*Float32Array.BYTES_PER_ELEMENT,a=r?o?r:r*Float32Array.BYTES_PER_ELEMENT:this.byteStride;return new Y.VertexBuffer(this._engine,this,e,this._updatable,!0,a,void 0===n?this._instanced:n,s,i,void 0,void 0,!0)},e.prototype.isUpdatable=function(){return this._updatable},e.prototype.getData=function(){return this._data},e.prototype.getBuffer=function(){return this._buffer},e.prototype.getStrideSize=function(){return this.byteStride/Float32Array.BYTES_PER_ELEMENT},e.prototype.create=function(e){void 0===e&&(e=null),!e&&this._buffer||(e=e||this._data)&&(this._buffer?this._updatable&&(this._engine.updateDynamicVertexBuffer(this._buffer,e),this._data=e):this._updatable?(this._buffer=this._engine.createDynamicVertexBuffer(e),this._data=e):this._buffer=this._engine.createVertexBuffer(e))},e.prototype._rebuild=function(){this._buffer=null,this.create(this._data)},e.prototype.update=function(e){this.create(e)},e.prototype.updateDirectly=function(e,t,i,r){void 0===r&&(r=!1),this._buffer&&this._updatable&&(this._engine.updateDynamicVertexBuffer(this._buffer,e,r?t:t*Float32Array.BYTES_PER_ELEMENT,i?i*this.byteStride:void 0),this._data=null)},e.prototype.dispose=function(){this._buffer&&this._engine._releaseBuffer(this._buffer)&&(this._buffer=null)},e})(),Y.Buffer=K,Q=$a||($a={}),Z=(function(){function _(e,t,i,r,n,o,s,a,l,c,h,u){if(void 0===h&&(h=!1),void 0===u&&(u=!1),t instanceof Q.Buffer?(this._buffer=t,this._ownsBuffer=!1):(this._buffer=new Q.Buffer(e,t,r,o,n,s,u),this._ownsBuffer=!0),this._kind=i,null==c){var d=this.getData();this.type=_.FLOAT,d instanceof Int8Array?this.type=_.BYTE:d instanceof Uint8Array?this.type=_.UNSIGNED_BYTE:d instanceof Int16Array?this.type=_.SHORT:d instanceof Uint16Array?this.type=_.UNSIGNED_SHORT:d instanceof Int32Array?this.type=_.INT:d instanceof Uint32Array&&(this.type=_.UNSIGNED_INT)}else this.type=c;var f=_.GetTypeByteLength(this.type);u?(this._size=l||(o?o/f:_.DeduceStride(i)),this.byteStride=o||this._buffer.byteStride||this._size*f,this.byteOffset=a||0):(this._size=l||o||_.DeduceStride(i),this.byteStride=o?o*f:this._buffer.byteStride||this._size*f,this.byteOffset=(a||0)*f),this.normalized=h,this._instanced=void 0!==s&&s,this._instanceDivisor=s?1:0}return Object.defineProperty(_.prototype,\"instanceDivisor\",{get:function(){return this._instanceDivisor},set:function(e){this._instanceDivisor=e,this._instanced=0!=e},enumerable:!0,configurable:!0}),_.prototype._rebuild=function(){this._buffer&&this._buffer._rebuild()},_.prototype.getKind=function(){return this._kind},_.prototype.isUpdatable=function(){return this._buffer.isUpdatable()},_.prototype.getData=function(){return this._buffer.getData()},_.prototype.getBuffer=function(){return this._buffer.getBuffer()},_.prototype.getStrideSize=function(){return this.byteStride/_.GetTypeByteLength(this.type)},_.prototype.getOffset=function(){return this.byteOffset/_.GetTypeByteLength(this.type)},_.prototype.getSize=function(){return this._size},_.prototype.getIsInstanced=function(){return this._instanced},_.prototype.getInstanceDivisor=function(){return this._instanceDivisor},_.prototype.create=function(e){this._buffer.create(e)},_.prototype.update=function(e){this._buffer.update(e)},_.prototype.updateDirectly=function(e,t,i){void 0===i&&(i=!1),this._buffer.updateDirectly(e,t,void 0,i)},_.prototype.dispose=function(){this._ownsBuffer&&this._buffer.dispose()},_.prototype.forEach=function(e,t){_.ForEach(this._buffer.getData(),this.byteOffset,this.byteStride,this._size,this.type,e,this.normalized,t)},_.DeduceStride=function(e){switch(e){case _.UVKind:case _.UV2Kind:case _.UV3Kind:case _.UV4Kind:case _.UV5Kind:case _.UV6Kind:return 2;case _.NormalKind:case _.PositionKind:return 3;case _.ColorKind:case _.MatricesIndicesKind:case _.MatricesIndicesExtraKind:case _.MatricesWeightsKind:case _.MatricesWeightsExtraKind:case _.TangentKind:return 4;default:throw new Error(\"Invalid kind '\"+e+\"'\")}},_.GetTypeByteLength=function(e){switch(e){case _.BYTE:case _.UNSIGNED_BYTE:return 1;case _.SHORT:case _.UNSIGNED_SHORT:return 2;case _.INT:case _.FLOAT:return 4;default:throw new Error(\"Invalid type '\"+e+\"'\")}},_.ForEach=function(e,t,i,r,n,o,s,a){if(e instanceof Array)for(var l=t/4,c=i/4,h=0;h<o;h+=r){for(var u=0;u<r;u++)a(e[l+u],h+u);l+=c}else{var d=e instanceof ArrayBuffer?new DataView(e):new DataView(e.buffer,e.byteOffset,e.byteLength),f=_.GetTypeByteLength(n);for(h=0;h<o;h+=r){var p=t;for(u=0;u<r;u++){a(_._GetFloatValue(d,n,p,s),h+u),p+=f}t+=i}}},_._GetFloatValue=function(e,t,i,r){switch(t){case _.BYTE:var n=e.getInt8(i);return r&&(n=Math.max(n/127,-1)),n;case _.UNSIGNED_BYTE:n=e.getUint8(i);return r&&(n/=255),n;case _.SHORT:n=e.getInt16(i,!0);return r&&(n=Math.max(n/16383,-1)),n;case _.UNSIGNED_SHORT:n=e.getUint16(i,!0);return r&&(n/=65535),n;case _.FLOAT:return e.getFloat32(i,!0);default:throw new Error(\"Invalid component type \"+t)}},_.BYTE=5120,_.UNSIGNED_BYTE=5121,_.SHORT=5122,_.UNSIGNED_SHORT=5123,_.INT=5124,_.UNSIGNED_INT=5125,_.FLOAT=5126,_.PositionKind=\"position\",_.NormalKind=\"normal\",_.TangentKind=\"tangent\",_.UVKind=\"uv\",_.UV2Kind=\"uv2\",_.UV3Kind=\"uv3\",_.UV4Kind=\"uv4\",_.UV5Kind=\"uv5\",_.UV6Kind=\"uv6\",_.ColorKind=\"color\",_.MatricesIndicesKind=\"matricesIndices\",_.MatricesWeightsKind=\"matricesWeights\",_.MatricesIndicesExtraKind=\"matricesIndicesExtra\",_.MatricesWeightsExtraKind=\"matricesWeightsExtra\",_})(),Q.VertexBuffer=Z,q=function(){this.previous=null,this.next=null},($a||($a={})).DummyInternalTextureTracker=q,J=$a||($a={}),$=(function(){function o(e,t){this.onLoadedObservable=new J.Observable,this.previous=null,this.next=null,this._initialSlot=-1,this._designatedSlot=-1,this._dataSource=o.DATASOURCE_UNKNOWN,this._comparisonFunction=0,this._sphericalPolynomial=null,this._lodGenerationScale=0,this._lodGenerationOffset=0,this._isRGBD=!1,this._references=1,this._engine=e,this._dataSource=t,this._webGLTexture=e._createTexture()}return o.prototype.getEngine=function(){return this._engine},Object.defineProperty(o.prototype,\"dataSource\",{get:function(){return this._dataSource},enumerable:!0,configurable:!0}),o.prototype.incrementReferences=function(){this._references++},o.prototype.updateSize=function(e,t,i){void 0===i&&(i=1),this.width=e,this.height=t,this.depth=i,this.baseWidth=e,this.baseHeight=t,this.baseDepth=i,this._size=e*t*i},o.prototype._rebuild=function(){var e,t=this;switch(this.isReady=!1,this._cachedCoordinatesMode=null,this._cachedWrapU=null,this._cachedWrapV=null,this._cachedAnisotropicFilteringLevel=null,this._dataSource){case o.DATASOURCE_TEMP:return;case o.DATASOURCE_URL:return void(e=this._engine.createTexture(this.url,!this.generateMipMaps,this.invertY,null,this.samplingMode,(function(){t.isReady=!0}),null,this._buffer,void 0,this.format))._swapAndDie(this);case o.DATASOURCE_RAW:return(e=this._engine.createRawTexture(this._bufferView,this.baseWidth,this.baseHeight,this.format,this.generateMipMaps,this.invertY,this.samplingMode,this._compression))._swapAndDie(this),void(this.isReady=!0);case o.DATASOURCE_RAW3D:return(e=this._engine.createRawTexture3D(this._bufferView,this.baseWidth,this.baseHeight,this.baseDepth,this.format,this.generateMipMaps,this.invertY,this.samplingMode,this._compression))._swapAndDie(this),void(this.isReady=!0);case o.DATASOURCE_DYNAMIC:return void(e=this._engine.createDynamicTexture(this.baseWidth,this.baseHeight,this.generateMipMaps,this.samplingMode))._swapAndDie(this);case o.DATASOURCE_RENDERTARGET:var i=new J.RenderTargetCreationOptions;if(i.generateDepthBuffer=this._generateDepthBuffer,i.generateMipMaps=this.generateMipMaps,i.generateStencilBuffer=this._generateStencilBuffer,i.samplingMode=this.samplingMode,i.type=this.type,this.isCube)e=this._engine.createRenderTargetCubeTexture(this.width,i);else{var r={width:this.width,height:this.height};e=this._engine.createRenderTargetTexture(r,i)}return e._swapAndDie(this),void(this.isReady=!0);case o.DATASOURCE_DEPTHTEXTURE:var n={bilinearFiltering:this.samplingMode!==J.Texture.BILINEAR_SAMPLINGMODE,comparisonFunction:this._comparisonFunction,generateStencil:this._generateStencilBuffer,isCube:this.isCube};return(e=this._engine.createDepthStencilTexture({width:this.width,height:this.height},n))._swapAndDie(this),void(this.isReady=!0);case o.DATASOURCE_CUBE:return void(e=this._engine.createCubeTexture(this.url,null,this._files,!this.generateMipMaps,(function(){t.isReady=!0}),null,this.format,this._extension))._swapAndDie(this);case o.DATASOURCE_CUBERAW:return(e=this._engine.createRawCubeTexture(this._bufferViewArray,this.width,this.format,this.type,this.generateMipMaps,this.invertY,this.samplingMode,this._compression))._swapAndDie(this),void(this.isReady=!0);case o.DATASOURCE_CUBERAW_RGBD:return e=this._engine.createRawCubeTexture(null,this.width,this.format,this.type,this.generateMipMaps,this.invertY,this.samplingMode,this._compression),J.RawCubeTexture._UpdateRGBDAsync(e,this._bufferViewArrayArray,this._sphericalPolynomial,this._lodGenerationScale,this._lodGenerationOffset).then((function(){t.isReady=!0})),void e._swapAndDie(this);case o.DATASOURCE_CUBEPREFILTERED:return void((e=this._engine.createPrefilteredCubeTexture(this.url,null,this._lodGenerationScale,this._lodGenerationOffset,(function(e){e&&e._swapAndDie(t),t.isReady=!0}),null,this.format,this._extension))._sphericalPolynomial=this._sphericalPolynomial)}},o.prototype._swapAndDie=function(e){e._webGLTexture=this._webGLTexture,this._framebuffer&&(e._framebuffer=this._framebuffer),this._depthStencilBuffer&&(e._depthStencilBuffer=this._depthStencilBuffer),this._lodTextureHigh&&(e._lodTextureHigh&&e._lodTextureHigh.dispose(),e._lodTextureHigh=this._lodTextureHigh),this._lodTextureMid&&(e._lodTextureMid&&e._lodTextureMid.dispose(),e._lodTextureMid=this._lodTextureMid),this._lodTextureLow&&(e._lodTextureLow&&e._lodTextureLow.dispose(),e._lodTextureLow=this._lodTextureLow);var t=this._engine.getLoadedTexturesCache(),i=t.indexOf(this);-1!==i&&t.splice(i,1)},o.prototype.dispose=function(){this._webGLTexture&&(this._references--,0===this._references&&(this._engine._releaseTexture(this),this._webGLTexture=null,this.previous=null,this.next=null))},o.DATASOURCE_UNKNOWN=0,o.DATASOURCE_URL=1,o.DATASOURCE_TEMP=2,o.DATASOURCE_RAW=3,o.DATASOURCE_DYNAMIC=4,o.DATASOURCE_RENDERTARGET=5,o.DATASOURCE_MULTIRENDERTARGET=6,o.DATASOURCE_CUBE=7,o.DATASOURCE_CUBERAW=8,o.DATASOURCE_CUBEPREFILTERED=9,o.DATASOURCE_RAW3D=10,o.DATASOURCE_DEPTHTEXTURE=11,o.DATASOURCE_CUBERAW_RGBD=12,o})(),J.InternalTexture=$,ee=$a||($a={}),te=(function(){function t(e){this._hasAlpha=!1,this.getAlphaFromRGB=!1,this.level=1,this.coordinatesIndex=0,this._coordinatesMode=ee.Texture.EXPLICIT_MODE,this.wrapU=ee.Texture.WRAP_ADDRESSMODE,this.wrapV=ee.Texture.WRAP_ADDRESSMODE,this.wrapR=ee.Texture.WRAP_ADDRESSMODE,this.anisotropicFilteringLevel=t.DEFAULT_ANISOTROPIC_FILTERING_LEVEL,this.isCube=!1,this.is3D=!1,this.gammaSpace=!0,this.invertZ=!1,this.lodLevelInAlpha=!1,this.isRenderTarget=!1,this.animations=new Array,this.onDisposeObservable=new ee.Observable,this.delayLoadState=ee.Engine.DELAYLOADSTATE_NONE,this._cachedSize=ee.Size.Zero(),this._scene=e||ee.Engine.LastCreatedScene,this._scene&&(this._scene.textures.push(this),this._scene.onNewTextureAddedObservable.notifyObservers(this)),this._uid=null}return Object.defineProperty(t.prototype,\"hasAlpha\",{get:function(){return this._hasAlpha},set:function(e){this._hasAlpha!==e&&(this._hasAlpha=e,this._scene&&this._scene.markAllMaterialsAsDirty(ee.Material.TextureDirtyFlag|ee.Material.MiscDirtyFlag))},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,\"coordinatesMode\",{get:function(){return this._coordinatesMode},set:function(e){this._coordinatesMode!==e&&(this._coordinatesMode=e,this._scene&&this._scene.markAllMaterialsAsDirty(ee.Material.TextureDirtyFlag))},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,\"isRGBD\",{get:function(){return null!=this._texture&&this._texture._isRGBD},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,\"lodGenerationOffset\",{get:function(){return this._texture?this._texture._lodGenerationOffset:0},set:function(e){this._texture&&(this._texture._lodGenerationOffset=e)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,\"lodGenerationScale\",{get:function(){return this._texture?this._texture._lodGenerationScale:0},set:function(e){this._texture&&(this._texture._lodGenerationScale=e)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,\"uid\",{get:function(){return this._uid||(this._uid=ee.Tools.RandomId()),this._uid},enumerable:!0,configurable:!0}),t.prototype.toString=function(){return this.name},t.prototype.getClassName=function(){return\"BaseTexture\"},Object.defineProperty(t.prototype,\"onDispose\",{set:function(e){this._onDisposeObserver&&this.onDisposeObservable.remove(this._onDisposeObserver),this._onDisposeObserver=this.onDisposeObservable.add(e)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,\"isBlocking\",{get:function(){return!0},enumerable:!0,configurable:!0}),t.prototype.getScene=function(){return this._scene},t.prototype.getTextureMatrix=function(){return ee.Matrix.IdentityReadOnly},t.prototype.getReflectionTextureMatrix=function(){return ee.Matrix.IdentityReadOnly},t.prototype.getInternalTexture=function(){return this._texture},t.prototype.isReadyOrNotBlocking=function(){return!this.isBlocking||this.isReady()},t.prototype.isReady=function(){return this.delayLoadState===ee.Engine.DELAYLOADSTATE_NOTLOADED?(this.delayLoad(),!1):!!this._texture&&this._texture.isReady},t.prototype.getSize=function(){if(this._texture){if(this._texture.width)return this._cachedSize.width=this._texture.width,this._cachedSize.height=this._texture.height,this._cachedSize;if(this._texture._size)return this._cachedSize.width=this._texture._size,this._cachedSize.height=this._texture._size,this._cachedSize}return this._cachedSize},t.prototype.getBaseSize=function(){return this.isReady()&&this._texture?this._texture._size?new ee.Size(this._texture._size,this._texture._size):new ee.Size(this._texture.baseWidth,this._texture.baseHeight):ee.Size.Zero()},t.prototype.scale=function(e){},Object.defineProperty(t.prototype,\"canRescale\",{get:function(){return!1},enumerable:!0,configurable:!0}),t.prototype._getFromCache=function(e,t,i){if(!this._scene)return null;for(var r=this._scene.getEngine().getLoadedTexturesCache(),n=0;n<r.length;n++){var o=r[n];if(o.url===e&&o.generateMipMaps===!t&&(!i||i===o.samplingMode))return o.incrementReferences(),o}return null},t.prototype._rebuild=function(){},t.prototype.delayLoad=function(){},t.prototype.clone=function(){return null},Object.defineProperty(t.prototype,\"textureType\",{get:function(){return this._texture&&void 0!==this._texture.type?this._texture.type:ee.Engine.TEXTURETYPE_UNSIGNED_INT},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,\"textureFormat\",{get:function(){return this._texture&&void 0!==this._texture.format?this._texture.format:ee.Engine.TEXTUREFORMAT_RGBA},enumerable:!0,configurable:!0}),t.prototype.readPixels=function(e,t,i){if(void 0===e&&(e=0),void 0===t&&(t=0),void 0===i&&(i=null),!this._texture)return null;var r=this.getSize(),n=r.width,o=r.height,s=this.getScene();if(!s)return null;var a=s.getEngine();return 0!=t&&(n/=Math.pow(2,t),o/=Math.pow(2,t),n=Math.round(n),o=Math.round(o)),this._texture.isCube?a._readTexturePixels(this._texture,n,o,e,t,i):a._readTexturePixels(this._texture,n,o,-1,t,i)},t.prototype.releaseInternalTexture=function(){this._texture&&(this._texture.dispose(),this._texture=null)},Object.defineProperty(t.prototype,\"sphericalPolynomial\",{get:function(){return this._texture&&ee.CubeMapToSphericalPolynomialTools&&this.isReady()?(this._texture._sphericalPolynomial||(this._texture._sphericalPolynomial=ee.CubeMapToSphericalPolynomialTools.ConvertCubeMapTextureToSphericalPolynomial(this)),this._texture._sphericalPolynomial):null},set:function(e){this._texture&&(this._texture._sphericalPolynomial=e)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,\"_lodTextureHigh\",{get:function(){return this._texture?this._texture._lodTextureHigh:null},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,\"_lodTextureMid\",{get:function(){return this._texture?this._texture._lodTextureMid:null},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,\"_lodTextureLow\",{get:function(){return this._texture?this._texture._lodTextureLow:null},enumerable:!0,configurable:!0}),t.prototype.dispose=function(){if(this._scene){this._scene.stopAnimation(this),this._scene._removePendingData(this);var e=this._scene.textures.indexOf(this);0<=e&&this._scene.textures.splice(e,1),this._scene.onTextureRemovedObservable.notifyObservers(this),void 0!==this._texture&&(this.releaseInternalTexture(),this.onDisposeObservable.notifyObservers(this),this.onDisposeObservable.clear())}},t.prototype.serialize=function(){if(!this.name)return null;var e=ee.SerializationHelper.Serialize(this);return ee.Animation.AppendSerializedAnimations(this,e),e},t.WhenAllReady=function(t,i){var r=t.length;if(0!==r)for(var n,o,e=function(){if((n=t[s]).isReady())0==--r&&i();else{o=n.onLoadObservable;var e=function(){o.removeCallback(e),0==--r&&i()};o.add(e)}},s=0;s<t.length;s++)e();else i()},t.DEFAULT_ANISOTROPIC_FILTERING_LEVEL=4,b([ee.serialize()],t.prototype,\"name\",void 0),b([ee.serialize(\"hasAlpha\")],t.prototype,\"_hasAlpha\",void 0),b([ee.serialize()],t.prototype,\"getAlphaFromRGB\",void 0),b([ee.serialize()],t.prototype,\"level\",void 0),b([ee.serialize()],t.prototype,\"coordinatesIndex\",void 0),b([ee.serialize(\"coordinatesMode\")],t.prototype,\"_coordinatesMode\",void 0),b([ee.serialize()],t.prototype,\"wrapU\",void 0),b([ee.serialize()],t.prototype,\"wrapV\",void 0),b([ee.serialize()],t.prototype,\"wrapR\",void 0),b([ee.serialize()],t.prototype,\"anisotropicFilteringLevel\",void 0),b([ee.serialize()],t.prototype,\"isCube\",void 0),b([ee.serialize()],t.prototype,\"is3D\",void 0),b([ee.serialize()],t.prototype,\"gammaSpace\",void 0),b([ee.serialize()],t.prototype,\"invertZ\",void 0),b([ee.serialize()],t.prototype,\"lodLevelInAlpha\",void 0),b([ee.serialize()],t.prototype,\"lodGenerationOffset\",null),b([ee.serialize()],t.prototype,\"lodGenerationScale\",null),b([ee.serialize()],t.prototype,\"isRenderTarget\",void 0),t})(),ee.BaseTexture=te,ie=$a||($a={}),re=(function(d){function f(e,t,i,r,n,o,s,a,l,c){void 0===i&&(i=!1),void 0===r&&(r=!0),void 0===n&&(n=f.TRILINEAR_SAMPLINGMODE),void 0===o&&(o=null),void 0===s&&(s=null),void 0===a&&(a=null),void 0===l&&(l=!1);var h=d.call(this,t)||this;if(h.uOffset=0,h.vOffset=0,h.uScale=1,h.vScale=1,h.uAng=0,h.vAng=0,h.wAng=0,h.uRotationCenter=.5,h.vRotationCenter=.5,h.wRotationCenter=.5,h.onLoadObservable=new ie.Observable,h._isBlocking=!0,h.name=e||\"\",h.url=e,h._noMipmap=i,h._invertY=r,h._samplingMode=n,h._buffer=a,h._deleteBuffer=l,c&&(h._format=c),!(t=h.getScene()))return h;t.getEngine().onBeforeTextureInitObservable.notifyObservers(h);var u=function(){h.onLoadObservable.hasObservers()&&h.onLoadObservable.notifyObservers(h),o&&o(),!h.isBlocking&&t&&t.resetCachedMaterial()};return h.url?(h._texture=h._getFromCache(h.url,i,n),h._texture?h._texture.isReady?ie.Tools.SetImmediate((function(){return u()})):h._texture.onLoadedObservable.add(u):t.useDelayedTextureLoading?(h.delayLoadState=ie.Engine.DELAYLOADSTATE_NOTLOADED,h._delayedOnLoad=u,h._delayedOnError=s):(h._texture=t.getEngine().createTexture(h.url,i,r,t,h._samplingMode,u,s,h._buffer,void 0,h._format),l&&delete h._buffer)):(h._delayedOnLoad=u,h._delayedOnError=s),h}return T(f,d),Object.defineProperty(f.prototype,\"noMipmap\",{get:function(){return this._noMipmap},enumerable:!0,configurable:!0}),Object.defineProperty(f.prototype,\"isBlocking\",{get:function(){return this._isBlocking},set:function(e){this._isBlocking=e},enumerable:!0,configurable:!0}),Object.defineProperty(f.prototype,\"samplingMode\",{get:function(){return this._samplingMode},enumerable:!0,configurable:!0}),f.prototype.updateURL=function(e,t){if(void 0===t&&(t=null),this.url)throw new Error(\"URL is already set\");this.url=e,this._buffer=t,this.delayLoadState=ie.Engine.DELAYLOADSTATE_NOTLOADED,this.delayLoad()},f.prototype.delayLoad=function(){if(this.delayLoadState===ie.Engine.DELAYLOADSTATE_NOTLOADED){var e=this.getScene();e&&(this.delayLoadState=ie.Engine.DELAYLOADSTATE_LOADED,this._texture=this._getFromCache(this.url,this._noMipmap,this._samplingMode),this._texture?this._delayedOnLoad&&(this._texture.isReady?ie.Tools.SetImmediate(this._delayedOnLoad):this._texture.onLoadedObservable.add(this._delayedOnLoad)):(this._texture=e.getEngine().createTexture(this.url,this._noMipmap,this._invertY,e,this._samplingMode,this._delayedOnLoad,this._delayedOnError,this._buffer,null,this._format),this._deleteBuffer&&delete this._buffer),this._delayedOnLoad=null,this._delayedOnError=null)}},f.prototype.updateSamplingMode=function(e){if(this._texture){var t=this.getScene();t&&(this._samplingMode=e,t.getEngine().updateTextureSamplingMode(e,this._texture))}},f.prototype._prepareRowForTextureGeneration=function(e,t,i,r){e*=this.uScale,t*=this.vScale,e-=this.uRotationCenter*this.uScale,t-=this.vRotationCenter*this.vScale,i-=this.wRotationCenter,ie.Vector3.TransformCoordinatesFromFloatsToRef(e,t,i,this._rowGenerationMatrix,r),r.x+=this.uRotationCenter*this.uScale+this.uOffset,r.y+=this.vRotationCenter*this.vScale+this.vOffset,r.z+=this.wRotationCenter},f.prototype.getTextureMatrix=function(){var t=this;if(this.uOffset===this._cachedUOffset&&this.vOffset===this._cachedVOffset&&this.uScale===this._cachedUScale&&this.vScale===this._cachedVScale&&this.uAng===this._cachedUAng&&this.vAng===this._cachedVAng&&this.wAng===this._cachedWAng)return this._cachedTextureMatrix;this._cachedUOffset=this.uOffset,this._cachedVOffset=this.vOffset,this._cachedUScale=this.uScale,this._cachedVScale=this.vScale,this._cachedUAng=this.uAng,this._cachedVAng=this.vAng,this._cachedWAng=this.wAng,this._cachedTextureMatrix||(this._cachedTextureMatrix=ie.Matrix.Zero(),this._rowGenerationMatrix=new ie.Matrix,this._t0=ie.Vector3.Zero(),this._t1=ie.Vector3.Zero(),this._t2=ie.Vector3.Zero()),ie.Matrix.RotationYawPitchRollToRef(this.vAng,this.uAng,this.wAng,this._rowGenerationMatrix),this._prepareRowForTextureGeneration(0,0,0,this._t0),this._prepareRowForTextureGeneration(1,0,0,this._t1),this._prepareRowForTextureGeneration(0,1,0,this._t2),this._t1.subtractInPlace(this._t0),this._t2.subtractInPlace(this._t0),ie.Matrix.IdentityToRef(this._cachedTextureMatrix),this._cachedTextureMatrix.m[0]=this._t1.x,this._cachedTextureMatrix.m[1]=this._t1.y,this._cachedTextureMatrix.m[2]=this._t1.z,this._cachedTextureMatrix.m[4]=this._t2.x,this._cachedTextureMatrix.m[5]=this._t2.y,this._cachedTextureMatrix.m[6]=this._t2.z,this._cachedTextureMatrix.m[8]=this._t0.x,this._cachedTextureMatrix.m[9]=this._t0.y,this._cachedTextureMatrix.m[10]=this._t0.z;var e=this.getScene();return e&&e.markAllMaterialsAsDirty(ie.Material.TextureDirtyFlag,(function(e){return e.hasTexture(t)})),this._cachedTextureMatrix},f.prototype.getReflectionTextureMatrix=function(){var t=this,e=this.getScene();if(!e)return this._cachedTextureMatrix;if(this.uOffset===this._cachedUOffset&&this.vOffset===this._cachedVOffset&&this.uScale===this._cachedUScale&&this.vScale===this._cachedVScale&&this.coordinatesMode===this._cachedCoordinatesMode){if(this.coordinatesMode!==f.PROJECTION_MODE)return this._cachedTextureMatrix;if(this._cachedProjectionMatrixId===e.getProjectionMatrix().updateFlag)return this._cachedTextureMatrix}switch(this._cachedTextureMatrix||(this._cachedTextureMatrix=ie.Matrix.Zero()),this._projectionModeMatrix||(this._projectionModeMatrix=ie.Matrix.Zero()),this._cachedUOffset=this.uOffset,this._cachedVOffset=this.vOffset,this._cachedUScale=this.uScale,this._cachedVScale=this.vScale,this._cachedCoordinatesMode=this.coordinatesMode,this.coordinatesMode){case f.PLANAR_MODE:ie.Matrix.IdentityToRef(this._cachedTextureMatrix),this._cachedTextureMatrix[0]=this.uScale,this._cachedTextureMatrix[5]=this.vScale,this._cachedTextureMatrix[12]=this.uOffset,this._cachedTextureMatrix[13]=this.vOffset;break;case f.PROJECTION_MODE:ie.Matrix.IdentityToRef(this._projectionModeMatrix),this._projectionModeMatrix.m[0]=.5,this._projectionModeMatrix.m[5]=-.5,this._projectionModeMatrix.m[10]=0,this._projectionModeMatrix.m[12]=.5,this._projectionModeMatrix.m[13]=.5,this._projectionModeMatrix.m[14]=1,this._projectionModeMatrix.m[15]=1;var i=e.getProjectionMatrix();this._cachedProjectionMatrixId=i.updateFlag,i.multiplyToRef(this._projectionModeMatrix,this._cachedTextureMatrix);break;default:ie.Matrix.IdentityToRef(this._cachedTextureMatrix)}return e.markAllMaterialsAsDirty(ie.Material.TextureDirtyFlag,(function(e){return-1!==e.getActiveTextures().indexOf(t)})),this._cachedTextureMatrix},f.prototype.clone=function(){var e=this;return ie.SerializationHelper.Clone((function(){return new f(e._texture?e._texture.url:null,e.getScene(),e._noMipmap,e._invertY,e._samplingMode)}),this)},f.prototype.serialize=function(){var e=d.prototype.serialize.call(this);return\"string\"==typeof this._buffer&&\"data:\"===this._buffer.substr(0,5)&&(e.base64String=this._buffer,e.name=e.name.replace(\"data:\",\"\")),e.invertY=this._invertY,e.samplingMode=this.samplingMode,e},f.prototype.getClassName=function(){return\"Texture\"},f.prototype.dispose=function(){d.prototype.dispose.call(this),this.onLoadObservable.clear(),this._delayedOnLoad=null,this._delayedOnError=null},f.Parse=function(o,s,a){if(o.customType){var e=ie.Tools.Instantiate(o.customType).Parse(o,s,a);return o.samplingMode&&e.updateSamplingMode&&e._samplingMode&&e._samplingMode!==o.samplingMode&&e.updateSamplingMode(o.samplingMode),e}if(o.isCube)return ie.CubeTexture.Parse(o,s,a);if(!o.name&&!o.isRenderTarget)return null;var t=ie.SerializationHelper.Parse((function(){var e,t=!0;if(o.noMipmap&&(t=!1),o.mirrorPlane){var i=new ie.MirrorTexture(o.name,o.renderTargetSize,s,t);return i._waitingRenderList=o.renderList,i.mirrorPlane=ie.Plane.FromArray(o.mirrorPlane),i}if(o.isRenderTarget){var r=new ie.RenderTargetTexture(o.name,o.renderTargetSize,s,t);return r._waitingRenderList=o.renderList,r}if(o.base64String)e=f.CreateFromBase64String(o.base64String,o.name,s,!t);else{var n=a+o.name;f.UseSerializedUrlIfAny&&o.url&&(n=o.url),e=new f(n,s,!t,o.invertY)}return e}),o,s);if(o.samplingMode){var i=o.samplingMode;t._samplingMode!==i&&t.updateSamplingMode(i)}if(o.animations)for(var r=0;r<o.animations.length;r++){var n=o.animations[r];t.animations.push(ie.Animation.Parse(n))}return t},f.CreateFromBase64String=function(e,t,i,r,n,o,s,a,l){return void 0===o&&(o=f.TRILINEAR_SAMPLINGMODE),void 0===s&&(s=null),void 0===a&&(a=null),void 0===l&&(l=ie.Engine.TEXTUREFORMAT_RGBA),new f(\"data:\"+t,i,r,n,o,s,a,e,!1,l)},f.LoadFromDataString=function(e,t,i,r,n,o,s,a,l,c){return void 0===r&&(r=!1),void 0===n&&(n=!1),void 0===o&&(o=!0),void 0===s&&(s=f.TRILINEAR_SAMPLINGMODE),void 0===a&&(a=null),void 0===l&&(l=null),void 0===c&&(c=ie.Engine.TEXTUREFORMAT_RGBA),\"data:\"!==e.substr(0,5)&&(e=\"data:\"+e),new f(e,i,n,o,s,a,l,t,r,c)},f.NEAREST_SAMPLINGMODE=ie.Engine.TEXTURE_NEAREST_SAMPLINGMODE,f.NEAREST_NEAREST_MIPLINEAR=ie.Engine.TEXTURE_NEAREST_NEAREST_MIPLINEAR,f.BILINEAR_SAMPLINGMODE=ie.Engine.TEXTURE_BILINEAR_SAMPLINGMODE,f.LINEAR_LINEAR_MIPNEAREST=ie.Engine.TEXTURE_LINEAR_LINEAR_MIPNEAREST,f.TRILINEAR_SAMPLINGMODE=ie.Engine.TEXTURE_TRILINEAR_SAMPLINGMODE,f.LINEAR_LINEAR_MIPLINEAR=ie.Engine.TEXTURE_LINEAR_LINEAR_MIPLINEAR,f.NEAREST_NEAREST_MIPNEAREST=ie.Engine.TEXTURE_NEAREST_NEAREST_MIPNEAREST,f.NEAREST_LINEAR_MIPNEAREST=ie.Engine.TEXTURE_NEAREST_LINEAR_MIPNEAREST,f.NEAREST_LINEAR_MIPLINEAR=ie.Engine.TEXTURE_NEAREST_LINEAR_MIPLINEAR,f.NEAREST_LINEAR=ie.Engine.TEXTURE_NEAREST_LINEAR,f.NEAREST_NEAREST=ie.Engine.TEXTURE_NEAREST_NEAREST,f.LINEAR_NEAREST_MIPNEAREST=ie.Engine.TEXTURE_LINEAR_NEAREST_MIPNEAREST,f.LINEAR_NEAREST_MIPLINEAR=ie.Engine.TEXTURE_LINEAR_NEAREST_MIPLINEAR,f.LINEAR_LINEAR=ie.Engine.TEXTURE_LINEAR_LINEAR,f.LINEAR_NEAREST=ie.Engine.TEXTURE_LINEAR_NEAREST,f.EXPLICIT_MODE=ie.Engine.TEXTURE_EXPLICIT_MODE,f.SPHERICAL_MODE=ie.Engine.TEXTURE_SPHERICAL_MODE,f.PLANAR_MODE=ie.Engine.TEXTURE_PLANAR_MODE,f.CUBIC_MODE=ie.Engine.TEXTURE_CUBIC_MODE,f.PROJECTION_MODE=ie.Engine.TEXTURE_PROJECTION_MODE,f.SKYBOX_MODE=ie.Engine.TEXTURE_SKYBOX_MODE,f.INVCUBIC_MODE=ie.Engine.TEXTURE_INVCUBIC_MODE,f.EQUIRECTANGULAR_MODE=ie.Engine.TEXTURE_EQUIRECTANGULAR_MODE,f.FIXED_EQUIRECTANGULAR_MODE=ie.Engine.TEXTURE_FIXED_EQUIRECTANGULAR_MODE,f.FIXED_EQUIRECTANGULAR_MIRRORED_MODE=ie.Engine.TEXTURE_FIXED_EQUIRECTANGULAR_MIRRORED_MODE,f.CLAMP_ADDRESSMODE=ie.Engine.TEXTURE_CLAMP_ADDRESSMODE,f.WRAP_ADDRESSMODE=ie.Engine.TEXTURE_WRAP_ADDRESSMODE,f.MIRROR_ADDRESSMODE=ie.Engine.TEXTURE_MIRROR_ADDRESSMODE,f.UseSerializedUrlIfAny=!1,b([ie.serialize()],f.prototype,\"url\",void 0),b([ie.serialize()],f.prototype,\"uOffset\",void 0),b([ie.serialize()],f.prototype,\"vOffset\",void 0),b([ie.serialize()],f.prototype,\"uScale\",void 0),b([ie.serialize()],f.prototype,\"vScale\",void 0),b([ie.serialize()],f.prototype,\"uAng\",void 0),b([ie.serialize()],f.prototype,\"vAng\",void 0),b([ie.serialize()],f.prototype,\"wAng\",void 0),b([ie.serialize()],f.prototype,\"uRotationCenter\",void 0),b([ie.serialize()],f.prototype,\"vRotationCenter\",void 0),b([ie.serialize()],f.prototype,\"wRotationCenter\",void 0),b([ie.serialize()],f.prototype,\"isBlocking\",null),f})(ie.BaseTexture),ie.Texture=re,(function(S){var e=function(){};S._CreationDataStorage=e;var m=function(){this.visibleInstances={},this.renderIdForInstances=new Array,this.batchCache=new t,this.instancesBufferSize=2048},t=function(){this.mustReturn=!1,this.visibleInstances=new Array,this.renderSelf=new Array};S._InstancesBatch=t;var i=(function(v){function _(e,t,i,r,n,o){void 0===t&&(t=null),void 0===i&&(i=null),void 0===r&&(r=null),void 0===o&&(o=!0);var s=v.call(this,e,t)||this;if(s.delayLoadState=S.Engine.DELAYLOADSTATE_NONE,s.instances=new Array,s._LODLevels=new Array,s._instanceDataStorage=new m,s._originalBuilderSideOrientation=_.DEFAULTSIDE,s.overrideMaterialSideOrientation=null,s._areNormalsFrozen=!1,s._source=null,t=s.getScene(),r){if(r._geometry&&r._geometry.applyToMesh(s),S.Tools.DeepCopy(r,s,[\"name\",\"material\",\"skeleton\",\"instances\",\"parent\",\"uniqueId\",\"source\",\"metadata\",\"hasLODLevels\",\"geometry\",\"isBlocked\",\"areNormalsFrozen\",\"onBeforeDrawObservable\",\"onBeforeRenderObservable\",\"onAfterRenderObservable\",\"onBeforeDraw\"],[\"_poseMatrix\"]),s._source=r,s._originalBuilderSideOrientation=r._originalBuilderSideOrientation,s._creationDataStorage=r._creationDataStorage,s._source._ranges){var a=s._source._ranges;for(var e in a)a.hasOwnProperty(e)&&a[e]&&s.createAnimationRange(e,a[e].from,a[e].to)}var l;if(r.metadata&&r.metadata.clone?s.metadata=r.metadata.clone():s.metadata=r.metadata,S.Tags&&S.Tags.HasTags(r)&&S.Tags.AddTagsTo(s,S.Tags.GetTags(r,!0)),s.parent=r.parent,s.setPivotMatrix(r.getPivotMatrix()),s.id=e+\".\"+r.id,s.material=r.material,!n)for(var c=r.getDescendants(!0),h=0;h<c.length;h++){var u=c[h];u.clone&&u.clone(e+\".\"+u.name,s)}var d=s.getScene().getPhysicsEngine();if(o&&d){var f=d.getImpostorForPhysicsObject(r);f&&(s.physicsImpostor=f.clone(s))}for(l=0;l<t.particleSystems.length;l++){var p=t.particleSystems[l];p.emitter===r&&p.clone(p.name,s)}s.refreshBoundingInfo(),s.computeWorldMatrix(!0)}return null!==i&&(s.parent=i),s}return T(_,v),Object.defineProperty(_.prototype,\"onBeforeRenderObservable\",{get:function(){return this._onBeforeRenderObservable||(this._onBeforeRenderObservable=new S.Observable),this._onBeforeRenderObservable},enumerable:!0,configurable:!0}),Object.defineProperty(_.prototype,\"onAfterRenderObservable\",{get:function(){return this._onAfterRenderObservable||(this._onAfterRenderObservable=new S.Observable),this._onAfterRenderObservable},enumerable:!0,configurable:!0}),Object.defineProperty(_.prototype,\"onBeforeDrawObservable\",{get:function(){return this._onBeforeDrawObservable||(this._onBeforeDrawObservable=new S.Observable),this._onBeforeDrawObservable},enumerable:!0,configurable:!0}),Object.defineProperty(_.prototype,\"onBeforeDraw\",{set:function(e){this._onBeforeDrawObserver&&this.onBeforeDrawObservable.remove(this._onBeforeDrawObserver),this._onBeforeDrawObserver=this.onBeforeDrawObservable.add(e)},enumerable:!0,configurable:!0}),Object.defineProperty(_.prototype,\"morphTargetManager\",{get:function(){return this._morphTargetManager},set:function(e){this._morphTargetManager!==e&&(this._morphTargetManager=e,this._syncGeometryWithMorphTargetManager())},enumerable:!0,configurable:!0}),Object.defineProperty(_.prototype,\"source\",{get:function(){return this._source},enumerable:!0,configurable:!0}),Object.defineProperty(_.prototype,\"isUnIndexed\",{get:function(){return this._unIndexed},set:function(e){this._unIndexed!==e&&(this._unIndexed=e,this._markSubMeshesAsAttributesDirty())},enumerable:!0,configurable:!0}),_.prototype.getClassName=function(){return\"Mesh\"},_.prototype.toString=function(e){var t=v.prototype.toString.call(this,e);if(t+=\", n vertices: \"+this.getTotalVertices(),t+=\", parent: \"+(this._waitingParentId?this._waitingParentId:this.parent?this.parent.name:\"NONE\"),this.animations)for(var i=0;i<this.animations.length;i++)t+=\", animation[0]: \"+this.animations[i].toString(e);if(e)if(this._geometry){var r=this.getIndices(),n=this.getVerticesData(S.VertexBuffer.PositionKind);n&&r&&(t+=\", flat shading: \"+(n.length/3===r.length?\"YES\":\"NO\"))}else t+=\", flat shading: UNKNOWN\";return t},_.prototype._unBindEffect=function(){v.prototype._unBindEffect.call(this);for(var e=0,t=this.instances;e<t.length;e++){t[e]._unBindEffect()}},Object.defineProperty(_.prototype,\"hasLODLevels\",{get:function(){return 0<this._LODLevels.length},enumerable:!0,configurable:!0}),_.prototype.getLODLevels=function(){return this._LODLevels},_.prototype._sortLODLevels=function(){this._LODLevels.sort((function(e,t){return e.distance<t.distance?1:e.distance>t.distance?-1:0}))},_.prototype.addLODLevel=function(e,t){if(t&&t._masterMesh)return S.Tools.Warn(\"You cannot use a mesh as LOD level twice\"),this;var i=new S.MeshLODLevel(e,t);return this._LODLevels.push(i),t&&(t._masterMesh=this),this._sortLODLevels(),this},_.prototype.getLODLevelAtDistance=function(e){for(var t=0;t<this._LODLevels.length;t++){var i=this._LODLevels[t];if(i.distance===e)return i.mesh}return null},_.prototype.removeLODLevel=function(e){for(var t=0;t<this._LODLevels.length;t++)this._LODLevels[t].mesh===e&&(this._LODLevels.splice(t,1),e&&(e._masterMesh=null));return this._sortLODLevels(),this},_.prototype.getLOD=function(e,t){if(!this._LODLevels||0===this._LODLevels.length)return this;var i;t?i=t:i=this.getBoundingInfo().boundingSphere;var r=i.centerWorld.subtract(e.globalPosition).length();if(this._LODLevels[this._LODLevels.length-1].distance>r)return this.onLODLevelSelection&&this.onLODLevelSelection(r,this,this._LODLevels[this._LODLevels.length-1].mesh),this;for(var n=0;n<this._LODLevels.length;n++){var o=this._LODLevels[n];if(o.distance<r)return o.mesh&&(o.mesh._preActivate(),o.mesh._updateSubMeshesBoundingInfo(this.worldMatrixFromCache)),this.onLODLevelSelection&&this.onLODLevelSelection(r,this,o.mesh),o.mesh}return this.onLODLevelSelection&&this.onLODLevelSelection(r,this,this),this},Object.defineProperty(_.prototype,\"geometry\",{get:function(){return this._geometry},enumerable:!0,configurable:!0}),_.prototype.getTotalVertices=function(){return null===this._geometry||void 0===this._geometry?0:this._geometry.getTotalVertices()},_.prototype.getVerticesData=function(e,t,i){return this._geometry?this._geometry.getVerticesData(e,t,i):null},_.prototype.getVertexBuffer=function(e){return this._geometry?this._geometry.getVertexBuffer(e):null},_.prototype.isVerticesDataPresent=function(e){return this._geometry?this._geometry.isVerticesDataPresent(e):!!this._delayInfo&&-1!==this._delayInfo.indexOf(e)},_.prototype.isVertexBufferUpdatable=function(e){return this._geometry?this._geometry.isVertexBufferUpdatable(e):!!this._delayInfo&&-1!==this._delayInfo.indexOf(e)},_.prototype.getVerticesDataKinds=function(){if(!this._geometry){var r=new Array;return this._delayInfo&&this._delayInfo.forEach((function(e,t,i){r.push(e)})),r}return this._geometry.getVerticesDataKinds()},_.prototype.getTotalIndices=function(){return this._geometry?this._geometry.getTotalIndices():0},_.prototype.getIndices=function(e,t){return this._geometry?this._geometry.getIndices(e,t):[]},Object.defineProperty(_.prototype,\"isBlocked\",{get:function(){return null!==this._masterMesh&&void 0!==this._masterMesh},enumerable:!0,configurable:!0}),_.prototype.isReady=function(e,t){if(void 0===e&&(e=!1),void 0===t&&(t=!1),this.delayLoadState===S.Engine.DELAYLOADSTATE_LOADING)return!1;if(!v.prototype.isReady.call(this,e))return!1;if(!this.subMeshes||0===this.subMeshes.length)return!0;if(!e)return!0;var i=this.getEngine(),r=this.getScene(),n=t||i.getCaps().instancedArrays&&0<this.instances.length;this.computeWorldMatrix();var o=this.material||r.defaultMaterial;if(o)if(o.storeEffectOnSubMeshes)for(var s=0,a=this.subMeshes;s<a.length;s++){var l=(p=a[s]).getMaterial();if(l)if(l.storeEffectOnSubMeshes){if(!l.isReadyForSubMesh(this,p,n))return!1}else if(!l.isReady(this,n))return!1}else if(!o.isReady(this,n))return!1;for(var c=0,h=this._lightSources;c<h.length;c++){var u=h[c].getShadowGenerator();if(u)for(var d=0,f=this.subMeshes;d<f.length;d++){var p=f[d];if(!u.isReady(p,n))return!1}}for(var _=0,m=this._LODLevels;_<m.length;_++){var g=m[_];if(g.mesh&&!g.mesh.isReady(n))return!1}return!0},Object.defineProperty(_.prototype,\"areNormalsFrozen\",{get:function(){return this._areNormalsFrozen},enumerable:!0,configurable:!0}),_.prototype.freezeNormals=function(){return this._areNormalsFrozen=!0,this},_.prototype.unfreezeNormals=function(){return this._areNormalsFrozen=!1,this},Object.defineProperty(_.prototype,\"overridenInstanceCount\",{set:function(e){this._instanceDataStorage.overridenInstanceCount=e},enumerable:!0,configurable:!0}),_.prototype._preActivate=function(){var e=this.getScene().getRenderId();return this._preActivateId===e||(this._preActivateId=e,this._instanceDataStorage.visibleInstances=null),this},_.prototype._preActivateForIntermediateRendering=function(e){return this._instanceDataStorage.visibleInstances&&(this._instanceDataStorage.visibleInstances.intermediateDefaultRenderId=e),this},_.prototype._registerInstanceForRenderId=function(e,t){return this._instanceDataStorage.visibleInstances||(this._instanceDataStorage.visibleInstances={},this._instanceDataStorage.visibleInstances.defaultRenderId=t,this._instanceDataStorage.visibleInstances.selfDefaultRenderId=this._renderId),this._instanceDataStorage.visibleInstances[t]||(this._instanceDataStorage.visibleInstances[t]=new Array),this._instanceDataStorage.visibleInstances[t].push(e),this},_.prototype.refreshBoundingInfo=function(){return this._refreshBoundingInfo(!1)},_.prototype._refreshBoundingInfo=function(e){if(this._boundingInfo&&this._boundingInfo.isLocked)return this;var t=this._getPositionData(e);if(t){var i=this.geometry?this.geometry.boundingBias:null,r=S.Tools.ExtractMinAndMax(t,0,this.getTotalVertices(),i);this._boundingInfo=new S.BoundingInfo(r.minimum,r.maximum)}if(this.subMeshes)for(var n=0;n<this.subMeshes.length;n++)this.subMeshes[n].refreshBoundingInfo();return this._updateBoundingInfo(),this},_.prototype._getPositionData=function(e){var t=this.getVerticesData(S.VertexBuffer.PositionKind);if(t&&e&&this.skeleton){t=S.Tools.Slice(t);var i=this.getVerticesData(S.VertexBuffer.MatricesIndicesKind),r=this.getVerticesData(S.VertexBuffer.MatricesWeightsKind);if(r&&i)for(var n=4<this.numBoneInfluencers,o=n?this.getVerticesData(S.VertexBuffer.MatricesIndicesExtraKind):null,s=n?this.getVerticesData(S.VertexBuffer.MatricesWeightsExtraKind):null,a=this.skeleton.getTransformMatrices(this),l=S.Tmp.Vector3[0],c=S.Tmp.Matrix[0],h=S.Tmp.Matrix[1],u=0,d=0;d<t.length;d+=3,u+=4){var f,p;for(c.reset(),f=0;f<4;f++)0<(p=r[u+f])&&(S.Matrix.FromFloat32ArrayToRefScaled(a,Math.floor(16*i[u+f]),p,h),c.addToSelf(h));if(n)for(f=0;f<4;f++)0<(p=s[u+f])&&(S.Matrix.FromFloat32ArrayToRefScaled(a,Math.floor(16*o[u+f]),p,h),c.addToSelf(h));S.Vector3.TransformCoordinatesFromFloatsToRef(t[d],t[d+1],t[d+2],c,l),l.toArray(t,d)}}return t},_.prototype._createGlobalSubMesh=function(e){var t=this.getTotalVertices();if(!t||!this.getIndices())return null;if(this.subMeshes&&0<this.subMeshes.length){var i=this.getIndices();if(!i)return null;var r=i.length,n=!1;if(e)n=!0;else for(var o=0,s=this.subMeshes;o<s.length;o++){var a=s[o];if(a.indexStart+a.indexCount>=r){n=!0;break}if(a.verticesStart+a.verticesCount>=t){n=!0;break}}if(!n)return this.subMeshes[0]}return this.releaseSubMeshes(),new S.SubMesh(0,0,t,0,this.getTotalIndices(),this)},_.prototype.subdivide=function(e){if(!(e<1)){for(var t=this.getTotalIndices(),i=t/e|0,r=0;i%3!=0;)i++;this.releaseSubMeshes();for(var n=0;n<e&&!(t<=r);n++)S.SubMesh.CreateFromIndices(0,r,Math.min(i,t-r),this),r+=i;this.synchronizeInstances()}},_.prototype.setVerticesData=function(e,t,i,r){if(void 0===i&&(i=!1),this._geometry)this._geometry.setVerticesData(e,t,i,r);else{var n=new S.VertexData;n.set(t,e);var o=this.getScene();new S.Geometry(S.Geometry.RandomId(),o,n,i,this)}return this},_.prototype.markVerticesDataAsUpdatable=function(e,t){void 0===t&&(t=!0);var i=this.getVertexBuffer(e);i&&i.isUpdatable()!==t&&this.setVerticesData(e,this.getVerticesData(e),t)},_.prototype.setVerticesBuffer=function(e){return this._geometry||(this._geometry=S.Geometry.CreateGeometryForMesh(this)),this._geometry.setVerticesBuffer(e),this},_.prototype.updateVerticesData=function(e,t,i,r){return this._geometry&&(r?(this.makeGeometryUnique(),this.updateVerticesData(e,t,i,!1)):this._geometry.updateVerticesData(e,t,i)),this},_.prototype.updateMeshPositions=function(e,t){void 0===t&&(t=!0);var i=this.getVerticesData(S.VertexBuffer.PositionKind);if(!i)return this;if(e(i),this.updateVerticesData(S.VertexBuffer.PositionKind,i,!1,!1),t){var r=this.getIndices(),n=this.getVerticesData(S.VertexBuffer.NormalKind);if(!n)return this;S.VertexData.ComputeNormals(i,r,n),this.updateVerticesData(S.VertexBuffer.NormalKind,n,!1,!1)}return this},_.prototype.makeGeometryUnique=function(){if(!this._geometry)return this;var e=this._geometry,t=this._geometry.copy(S.Geometry.RandomId());return e.releaseForMesh(this,!0),t.applyToMesh(this),this},_.prototype.setIndices=function(e,t,i){if(void 0===t&&(t=null),void 0===i&&(i=!1),this._geometry)this._geometry.setIndices(e,t,i);else{var r=new S.VertexData;r.indices=e;var n=this.getScene();new S.Geometry(S.Geometry.RandomId(),n,r,i,this)}return this},_.prototype.updateIndices=function(e,t){return this._geometry&&this._geometry.updateIndices(e,t),this},_.prototype.toLeftHanded=function(){return this._geometry&&this._geometry.toLeftHanded(),this},_.prototype._bind=function(e,t,i){if(!this._geometry)return this;var r,n=this.getScene().getEngine();if(this._unIndexed)r=null;else switch(i){case S.Material.PointFillMode:r=null;break;case S.Material.WireFrameFillMode:r=e._getLinesIndexBuffer(this.getIndices(),n);break;default:case S.Material.TriangleFillMode:r=this._unIndexed?null:this._geometry.getIndexBuffer()}return this._geometry._bind(t,r),this},_.prototype._draw=function(e,t,i,r){if(void 0===r&&(r=!1),!this._geometry||!this._geometry.getVertexBuffers()||!this._unIndexed&&!this._geometry.getIndexBuffer())return this;this._onBeforeDrawObservable&&this._onBeforeDrawObservable.notifyObservers(this);var n=this.getScene(),o=n.getEngine();if(this._unIndexed||t==S.Material.PointFillMode?o.drawArraysType(t,e.verticesStart,e.verticesCount,i):t==S.Material.WireFrameFillMode?o.drawElementsType(t,0,e._linesIndexCount,i):o.drawElementsType(t,e.indexStart,e.indexCount,i),n._isAlternateRenderingEnabled&&!r){var s=e.effect||this._effectiveMaterial.getEffect();if(!s||!n.activeCamera)return this;n._switchToAlternateCameraConfiguration(!0),this._effectiveMaterial.bindView(s),this._effectiveMaterial.bindViewProjection(s),o.setViewport(n.activeCamera._alternateCamera.viewport),this._draw(e,t,i,!0),o.setViewport(n.activeCamera.viewport),n._switchToAlternateCameraConfiguration(!1),this._effectiveMaterial.bindView(s),this._effectiveMaterial.bindViewProjection(s)}return this},_.prototype.registerBeforeRender=function(e){return this.onBeforeRenderObservable.add(e),this},_.prototype.unregisterBeforeRender=function(e){return this.onBeforeRenderObservable.removeCallback(e),this},_.prototype.registerAfterRender=function(e){return this.onAfterRenderObservable.add(e),this},_.prototype.unregisterAfterRender=function(e){return this.onAfterRenderObservable.removeCallback(e),this},_.prototype._getInstancesRenderList=function(e){var t=this.getScene(),i=this._instanceDataStorage.batchCache;if(i.mustReturn=!1,i.renderSelf[e]=this.isEnabled()&&this.isVisible,i.visibleInstances[e]=null,this._instanceDataStorage.visibleInstances){var r=this._instanceDataStorage.visibleInstances,n=t.getRenderId(),o=t._isInIntermediateRendering()?r.intermediateDefaultRenderId:r.defaultRenderId;i.visibleInstances[e]=r[n];var s=this._renderId;!i.visibleInstances[e]&&o&&(i.visibleInstances[e]=r[o],n=Math.max(o,n),s=Math.max(r.selfDefaultRenderId,n));var a=i.visibleInstances[e];if(a&&a.length){if(this._instanceDataStorage.renderIdForInstances[e]===n)return i.mustReturn=!0,i;n!==s&&(i.renderSelf[e]=!1)}this._instanceDataStorage.renderIdForInstances[e]=n}return i},_.prototype._renderWithInstances=function(e,t,i,r,n){var o=i.visibleInstances[e._id];if(!o)return this;for(var s=16*(o.length+1)*4,a=this._instanceDataStorage,l=a.instancesBufferSize,c=a.instancesBuffer;a.instancesBufferSize<s;)a.instancesBufferSize*=2;a.instancesData&&l==a.instancesBufferSize||(a.instancesData=new Float32Array(a.instancesBufferSize/4));var h=0,u=0,d=this.getWorldMatrix();if(i.renderSelf[e._id]&&(d.copyToArray(a.instancesData,h),h+=16,u++),o)for(var f=0;f<o.length;f++){o[f].getWorldMatrix().copyToArray(a.instancesData,h),h+=16,u++}return c&&l==a.instancesBufferSize?c.updateDirectly(a.instancesData,0,u):(c&&c.dispose(),c=new S.Buffer(n,a.instancesData,!0,16,!1,!0),a.instancesBuffer=c,this.setVerticesBuffer(c.createVertexBuffer(\"world0\",0,4)),this.setVerticesBuffer(c.createVertexBuffer(\"world1\",4,4)),this.setVerticesBuffer(c.createVertexBuffer(\"world2\",8,4)),this.setVerticesBuffer(c.createVertexBuffer(\"world3\",12,4))),this._bind(e,r,t),this._draw(e,t,u),n.unbindInstanceAttributes(),this},_.prototype._processRendering=function(e,t,i,r,n,o,s){var a=this.getScene().getEngine();if(n)this._renderWithInstances(e,i,r,t,a);else{r.renderSelf[e._id]&&(o&&o(!1,this.getWorldMatrix(),s),this._draw(e,i,this._instanceDataStorage.overridenInstanceCount));var l=r.visibleInstances[e._id];if(l)for(var c=0;c<l.length;c++){var h=l[c].getWorldMatrix();o&&o(!0,h,s),this._draw(e,i)}}return this},_.prototype.render=function(e,t){if(this._checkOcclusionQuery())return this;var i=this.getScene(),r=this._getInstancesRenderList(e._id);if(r.mustReturn)return this;if(!this._geometry||!this._geometry.getVertexBuffers()||!this._unIndexed&&!this._geometry.getIndexBuffer())return this;this._onBeforeRenderObservable&&this._onBeforeRenderObservable.notifyObservers(this);var n,o=i.getEngine(),s=o.getCaps().instancedArrays&&null!==r.visibleInstances[e._id]&&void 0!==r.visibleInstances[e._id],a=e.getMaterial();if(!a)return this;if(this._effectiveMaterial=a,this._effectiveMaterial.storeEffectOnSubMeshes){if(!this._effectiveMaterial.isReadyForSubMesh(this,e,s))return this}else if(!this._effectiveMaterial.isReady(this,s))return this;t&&o.setAlphaMode(this._effectiveMaterial.alphaMode);for(var l=0,c=i._beforeRenderingMeshStage;l<c.length;l++){c[l].action(this,e,r)}if(!(n=this._effectiveMaterial.storeEffectOnSubMeshes?e.effect:this._effectiveMaterial.getEffect()))return this;var h=this.overrideMaterialSideOrientation;null==h&&(h=this._effectiveMaterial.sideOrientation,this._getWorldMatrixDeterminant()<0&&(h=h===S.Material.ClockWiseSideOrientation?S.Material.CounterClockWiseSideOrientation:S.Material.ClockWiseSideOrientation));var u=this._effectiveMaterial._preBind(n,h);this._effectiveMaterial.forceDepthWrite&&o.setDepthWrite(!0);var d=i.forcePointsCloud?S.Material.PointFillMode:i.forceWireframe?S.Material.WireFrameFillMode:this._effectiveMaterial.fillMode;s||this._bind(e,n,d);var f=this.getWorldMatrix();this._effectiveMaterial.storeEffectOnSubMeshes?this._effectiveMaterial.bindForSubMesh(f,this,e):this._effectiveMaterial.bind(f,this),!this._effectiveMaterial.backFaceCulling&&this._effectiveMaterial.separateCullingPass&&(o.setState(!0,this._effectiveMaterial.zOffset,!1,!u),this._processRendering(e,n,d,r,s,this._onBeforeDraw,this._effectiveMaterial),o.setState(!0,this._effectiveMaterial.zOffset,!1,u)),this._processRendering(e,n,d,r,s,this._onBeforeDraw,this._effectiveMaterial),this._effectiveMaterial.unbind();for(var p=0,_=i._afterRenderingMeshStage;p<_.length;p++){_[p].action(this,e,r)}return this._onAfterRenderObservable&&this._onAfterRenderObservable.notifyObservers(this),this},_.prototype._onBeforeDraw=function(e,t,i){e&&i&&i.bindOnlyWorldMatrix(t)},_.prototype.cleanMatrixWeights=function(){this.isVerticesDataPresent(S.VertexBuffer.MatricesWeightsKind)&&(this.isVerticesDataPresent(S.VertexBuffer.MatricesWeightsExtraKind)?this.normalizeSkinWeightsAndExtra():this.normalizeSkinFourWeights())},_.prototype.normalizeSkinFourWeights=function(){for(var e=this.getVerticesData(S.VertexBuffer.MatricesWeightsKind),t=e.length,i=0;i<t;i+=4){var r=e[i]+e[i+1]+e[i+2]+e[i+3];if(0===r)e[i]=1;else{var n=1/r;e[i]*=n,e[i+1]*=n,e[i+2]*=n,e[i+3]*=n}}this.setVerticesData(S.VertexBuffer.MatricesWeightsKind,e)},_.prototype.normalizeSkinWeightsAndExtra=function(){for(var e=this.getVerticesData(S.VertexBuffer.MatricesWeightsExtraKind),t=this.getVerticesData(S.VertexBuffer.MatricesWeightsKind),i=t.length,r=0;r<i;r+=4){var n=t[r]+t[r+1]+t[r+2]+t[r+3];if(0===(n+=e[r]+e[r+1]+e[r+2]+e[r+3]))t[r]=1;else{var o=1/n;t[r]*=o,t[r+1]*=o,t[r+2]*=o,t[r+3]*=o,e[r]*=o,e[r+1]*=o,e[r+2]*=o,e[r+3]*=o}}this.setVerticesData(S.VertexBuffer.MatricesWeightsKind,t),this.setVerticesData(S.VertexBuffer.MatricesWeightsKind,e)},_.prototype.validateSkinning=function(){var e=this.getVerticesData(S.VertexBuffer.MatricesWeightsExtraKind),t=this.getVerticesData(S.VertexBuffer.MatricesWeightsKind);if(null===t||null==this.skeleton)return{skinned:!1,valid:!0,report:\"not skinned\"};for(var i=t.length,r=0,n=0,o=0,s=0,a=null===e?4:8,l=new Array,c=0;c<=a;c++)l[c]=0;for(c=0;c<i;c+=4){for(var h=t[c],u=h,d=0===u?0:1,f=1;f<a;f++){var p=f<4?t[c+f]:e[c+f-4];h<p&&r++,0!==p&&d++,u+=p,h=p}if(l[d]++,o<d&&(o=d),0===u)n++;else{var _=1/u,m=0;for(f=0;f<a;f++)m+=f<4?Math.abs(t[c+f]-t[c+f]*_):Math.abs(e[c+f-4]-e[c+f-4]*_);.001<m&&s++}}var g=this.skeleton.bones.length,v=this.getVerticesData(S.VertexBuffer.MatricesIndicesKind),y=this.getVerticesData(S.VertexBuffer.MatricesIndicesExtraKind),b=0;for(c=0;c<i;c++)for(f=0;f<a;f++){var T=f<4?v[f]:y[f-4];(g<=T||T<0)&&b++}return{skinned:!0,valid:0===n&&0===s&&0===b,report:\"Number of Weights = \"+i/4+\"\\nMaximum influences = \"+o+\"\\nMissing Weights = \"+n+\"\\nNot Sorted = \"+r+\"\\nNot Normalized = \"+s+\"\\nWeightCounts = [\"+l+\"]\\nNumber of bones = \"+g+\"\\nBad Bone Indices = \"+b}},_.prototype._checkDelayState=function(){var e=this.getScene();return this._geometry?this._geometry.load(e):this.delayLoadState===S.Engine.DELAYLOADSTATE_NOTLOADED&&(this.delayLoadState=S.Engine.DELAYLOADSTATE_LOADING,this._queueLoad(e)),this},_.prototype._queueLoad=function(t){var i=this;t._addPendingData(this);var e=-1!==this.delayLoadingFile.indexOf(\".babylonbinarymeshdata\");return S.Tools.LoadFile(this.delayLoadingFile,(function(e){e instanceof ArrayBuffer?i._delayLoadingFunction(e,i):i._delayLoadingFunction(JSON.parse(e),i),i.instances.forEach((function(e){e._syncSubMeshes()})),i.delayLoadState=S.Engine.DELAYLOADSTATE_LOADED,t._removePendingData(i)}),(function(){}),t.database,e),this},_.prototype.isInFrustum=function(e){return this.delayLoadState!==S.Engine.DELAYLOADSTATE_LOADING&&(!!v.prototype.isInFrustum.call(this,e)&&(this._checkDelayState(),!0))},_.prototype.setMaterialByID=function(e){var t,i=this.getScene().materials;for(t=i.length-1;-1<t;t--)if(i[t].id===e)return this.material=i[t],this;var r=this.getScene().multiMaterials;for(t=r.length-1;-1<t;t--)if(r[t].id===e)return this.material=r[t],this;return this},_.prototype.getAnimatables=function(){var e=new Array;return this.material&&e.push(this.material),this.skeleton&&e.push(this.skeleton),e},_.prototype.bakeTransformIntoVertices=function(e){if(!this.isVerticesDataPresent(S.VertexBuffer.PositionKind))return this;var t=this.subMeshes.splice(0);this._resetPointsArrayCache();var i,r=this.getVerticesData(S.VertexBuffer.PositionKind),n=new Array;for(i=0;i<r.length;i+=3)S.Vector3.TransformCoordinates(S.Vector3.FromArray(r,i),e).toArray(n,i);if(this.setVerticesData(S.VertexBuffer.PositionKind,n,this.getVertexBuffer(S.VertexBuffer.PositionKind).isUpdatable()),this.isVerticesDataPresent(S.VertexBuffer.NormalKind)){for(r=this.getVerticesData(S.VertexBuffer.NormalKind),n=[],i=0;i<r.length;i+=3)S.Vector3.TransformNormal(S.Vector3.FromArray(r,i),e).normalize().toArray(n,i);this.setVerticesData(S.VertexBuffer.NormalKind,n,this.getVertexBuffer(S.VertexBuffer.NormalKind).isUpdatable())}return e.m[0]*e.m[5]*e.m[10]<0&&this.flipFaces(),this.releaseSubMeshes(),this.subMeshes=t,this},_.prototype.bakeCurrentTransformIntoVertices=function(){return this.bakeTransformIntoVertices(this.computeWorldMatrix(!0)),this.scaling.copyFromFloats(1,1,1),this.position.copyFromFloats(0,0,0),this.rotation.copyFromFloats(0,0,0),this.rotationQuaternion&&(this.rotationQuaternion=S.Quaternion.Identity()),this._worldMatrix=S.Matrix.Identity(),this},Object.defineProperty(_.prototype,\"_positions\",{get:function(){return this._geometry?this._geometry._positions:null},enumerable:!0,configurable:!0}),_.prototype._resetPointsArrayCache=function(){return this._geometry&&this._geometry._resetPointsArrayCache(),this},_.prototype._generatePointsArray=function(){return!!this._geometry&&this._geometry._generatePointsArray()},_.prototype.clone=function(e,t,i,r){return void 0===e&&(e=\"\"),void 0===r&&(r=!0),new _(e,this.getScene(),t,this,i,r)},_.prototype.dispose=function(e,t){var i=this;for(void 0===t&&(t=!1),this.morphTargetManager=null,this._geometry&&this._geometry.releaseForMesh(this,!0),this._onBeforeDrawObservable&&this._onBeforeDrawObservable.clear(),this._onBeforeRenderObservable&&this._onBeforeRenderObservable.clear(),this._onAfterRenderObservable&&this._onAfterRenderObservable.clear(),this.getScene().meshes.forEach((function(e){var t=e;t._source&&t._source===i&&(t._source=null)})),this._source=null,this._instanceDataStorage.instancesBuffer&&(this._instanceDataStorage.instancesBuffer.dispose(),this._instanceDataStorage.instancesBuffer=null);this.instances.length;)this.instances[0].dispose();v.prototype.dispose.call(this,e,t)},_.prototype.applyDisplacementMap=function(e,s,a,l,c,h,u){var d=this;void 0===u&&(u=!1);var t=this.getScene();return S.Tools.LoadImage(e,(function(e){var t=document.createElement(\"canvas\"),i=t.getContext(\"2d\"),r=e.width,n=e.height;t.width=r,t.height=n,i.drawImage(e,0,0);var o=i.getImageData(0,0,r,n).data;d.applyDisplacementMapFromBuffer(o,r,n,s,a,c,h,u),l&&l(d)}),(function(){}),t.database),this},_.prototype.applyDisplacementMapFromBuffer=function(e,t,i,r,n,o,s,a){if(void 0===a&&(a=!1),!this.isVerticesDataPresent(S.VertexBuffer.PositionKind)||!this.isVerticesDataPresent(S.VertexBuffer.NormalKind)||!this.isVerticesDataPresent(S.VertexBuffer.UVKind))return S.Tools.Warn(\"Cannot call applyDisplacementMap: Given mesh is not complete. Position, Normal or UV are missing\"),this;var l=this.getVerticesData(S.VertexBuffer.PositionKind,!0,!0),c=this.getVerticesData(S.VertexBuffer.NormalKind),h=this.getVerticesData(S.VertexBuffer.UVKind),u=S.Vector3.Zero(),d=S.Vector3.Zero(),f=S.Vector2.Zero();o=o||S.Vector2.Zero(),s=s||new S.Vector2(1,1);for(var p=0;p<l.length;p+=3){S.Vector3.FromArrayToRef(l,p,u),S.Vector3.FromArrayToRef(c,p,d),S.Vector2.FromArrayToRef(h,p/3*2,f);var _=4*((Math.abs(f.x*s.x+o.x)*t%t|0)+(Math.abs(f.y*s.y+o.y)*i%i|0)*t),m=.3*(e[_]/255)+.59*(e[_+1]/255)+.11*(e[_+2]/255);d.normalize(),d.scaleInPlace(r+(n-r)*m),(u=u.add(d)).toArray(l,p)}return S.VertexData.ComputeNormals(l,this.getIndices(),c),a?(this.setVerticesData(S.VertexBuffer.PositionKind,l),this.setVerticesData(S.VertexBuffer.NormalKind,c)):(this.updateVerticesData(S.VertexBuffer.PositionKind,l),this.updateVerticesData(S.VertexBuffer.NormalKind,c)),this},_.prototype.convertToFlatShadedMesh=function(){var e,t,i=this.getVerticesDataKinds(),r={},n={},o={},s=!1;for(e=0;e<i.length;e++){t=i[e];var a=this.getVertexBuffer(t);t!==S.VertexBuffer.NormalKind?(r[t]=a,n[t]=r[t].getData(),o[t]=[]):(s=a.isUpdatable(),i.splice(e,1),e--)}var l,c=this.subMeshes.slice(0),h=this.getIndices(),u=this.getTotalIndices();for(l=0;l<u;l++){var d=h[l];for(e=0;e<i.length;e++)for(var f=r[t=i[e]].getStrideSize(),p=0;p<f;p++)o[t].push(n[t][d*f+p])}var _=[],m=o[S.VertexBuffer.PositionKind];for(l=0;l<u;l+=3){h[l]=l,h[l+1]=l+1,h[l+2]=l+2;for(var g=S.Vector3.FromArray(m,3*l),v=S.Vector3.FromArray(m,3*(l+1)),y=S.Vector3.FromArray(m,3*(l+2)),b=g.subtract(v),T=y.subtract(v),E=S.Vector3.Normalize(S.Vector3.Cross(b,T)),x=0;x<3;x++)_.push(E.x),_.push(E.y),_.push(E.z)}for(this.setIndices(h),this.setVerticesData(S.VertexBuffer.NormalKind,_,s),e=0;e<i.length;e++)t=i[e],this.setVerticesData(t,o[t],r[t].isUpdatable());this.releaseSubMeshes();for(var P=0;P<c.length;P++){var A=c[P];S.SubMesh.AddToMesh(A.materialIndex,A.indexStart,A.indexCount,A.indexStart,A.indexCount,this)}return this.synchronizeInstances(),this},_.prototype.convertToUnIndexedMesh=function(){var e,t,i=this.getVerticesDataKinds(),r={},n={},o={};for(e=0;e<i.length;e++){t=i[e];var s=this.getVertexBuffer(t);r[t]=s,n[t]=r[t].getData(),o[t]=[]}var a,l=this.subMeshes.slice(0),c=this.getIndices(),h=this.getTotalIndices();for(a=0;a<h;a++){var u=c[a];for(e=0;e<i.length;e++)for(var d=r[t=i[e]].getStrideSize(),f=0;f<d;f++)o[t].push(n[t][u*d+f])}for(a=0;a<h;a+=3)c[a]=a,c[a+1]=a+1,c[a+2]=a+2;for(this.setIndices(c),e=0;e<i.length;e++)t=i[e],this.setVerticesData(t,o[t],r[t].isUpdatable());this.releaseSubMeshes();for(var p=0;p<l.length;p++){var _=l[p];S.SubMesh.AddToMesh(_.materialIndex,_.indexStart,_.indexCount,_.indexStart,_.indexCount,this)}return this._unIndexed=!0,this.synchronizeInstances(),this},_.prototype.flipFaces=function(e){void 0===e&&(e=!1);var t,i,r=S.VertexData.ExtractFromMesh(this);if(e&&this.isVerticesDataPresent(S.VertexBuffer.NormalKind)&&r.normals)for(t=0;t<r.normals.length;t++)r.normals[t]*=-1;if(r.indices)for(t=0;t<r.indices.length;t+=3)i=r.indices[t+1],r.indices[t+1]=r.indices[t+2],r.indices[t+2]=i;return r.applyToMesh(this),this},_.prototype.createInstance=function(e){return new S.InstancedMesh(e,this)},_.prototype.synchronizeInstances=function(){for(var e=0;e<this.instances.length;e++){this.instances[e]._syncSubMeshes()}return this},_.prototype.optimizeIndices=function(i){var r=this,n=this.getIndices(),e=this.getVerticesData(S.VertexBuffer.PositionKind);if(!e||!n)return this;for(var o=new Array,t=0;t<e.length;t+=3)o.push(S.Vector3.FromArray(e,t));var s=new Array;return S.AsyncLoop.SyncAsyncForLoop(o.length,40,(function(e){for(var t=o.length-1-e,i=o[t],r=0;r<t;++r){var n=o[r];if(i.equals(n)){s[t]=r;break}}}),(function(){for(var e=0;e<n.length;++e)n[e]=s[n[e]]||n[e];var t=r.subMeshes.slice(0);r.setIndices(n),r.subMeshes=t,i&&i(r)})),this},_.prototype.serialize=function(e){e.name=this.name,e.id=this.id,e.type=this.getClassName(),S.Tags&&S.Tags.HasTags(this)&&(e.tags=S.Tags.GetTags(this)),e.position=this.position.asArray(),this.rotationQuaternion?e.rotationQuaternion=this.rotationQuaternion.asArray():this.rotation&&(e.rotation=this.rotation.asArray()),e.scaling=this.scaling.asArray(),e.localMatrix=this.getPivotMatrix().asArray(),e.isEnabled=this.isEnabled(!1),e.isVisible=this.isVisible,e.infiniteDistance=this.infiniteDistance,e.pickable=this.isPickable,e.receiveShadows=this.receiveShadows,e.billboardMode=this.billboardMode,e.visibility=this.visibility,e.checkCollisions=this.checkCollisions,e.isBlocker=this.isBlocker,this.parent&&(e.parentId=this.parent.id),e.isUnIndexed=this.isUnIndexed;var t=this._geometry;if(t){var i=t.id;e.geometryId=i,e.subMeshes=[];for(var r=0;r<this.subMeshes.length;r++){var n=this.subMeshes[r];e.subMeshes.push({materialIndex:n.materialIndex,verticesStart:n.verticesStart,verticesCount:n.verticesCount,indexStart:n.indexStart,indexCount:n.indexCount})}}this.material?e.materialId=this.material.id:this.material=null,this.morphTargetManager&&(e.morphTargetManagerId=this.morphTargetManager.uniqueId),this.skeleton&&(e.skeletonId=this.skeleton.id);var o=this.getPhysicsImpostor();o&&(e.physicsMass=o.getParam(\"mass\"),e.physicsFriction=o.getParam(\"friction\"),e.physicsRestitution=o.getParam(\"mass\"),e.physicsImpostor=o.type),this.metadata&&(e.metadata=this.metadata),e.instances=[];for(var s=0;s<this.instances.length;s++){var a=this.instances[s];if(!a.doNotSerialize){var l={name:a.name,id:a.id,position:a.position.asArray(),scaling:a.scaling.asArray()};a.parent&&(l.parentId=a.parent.id),a.rotationQuaternion?l.rotationQuaternion=a.rotationQuaternion.asArray():a.rotation&&(l.rotation=a.rotation.asArray()),e.instances.push(l),S.Animation.AppendSerializedAnimations(a,l),l.ranges=a.serializeAnimationRanges()}}S.Animation.AppendSerializedAnimations(this,e),e.ranges=this.serializeAnimationRanges(),e.layerMask=this.layerMask,e.alphaIndex=this.alphaIndex,e.hasVertexAlpha=this.hasVertexAlpha,e.overlayAlpha=this.overlayAlpha,e.overlayColor=this.overlayColor.asArray(),e.renderOverlay=this.renderOverlay,e.applyFog=this.applyFog,this.actionManager&&(e.actions=this.actionManager.serialize(this.name))},_.prototype._syncGeometryWithMorphTargetManager=function(){if(this.geometry){this._markSubMeshesAsAttributesDirty();var e=this._morphTargetManager;if(e&&e.vertexCount){if(e.vertexCount!==this.getTotalVertices())return S.Tools.Error(\"Mesh is incompatible with morph targets. Targets and mesh must all have the same vertices count.\"),void(this.morphTargetManager=null);for(var t=0;t<e.numInfluencers;t++){var i=e.getActiveTarget(t),r=i.getPositions();if(!r)return void S.Tools.Error(\"Invalid morph target. Target must have positions.\");this.geometry.setVerticesData(S.VertexBuffer.PositionKind+t,r,!1,3);var n=i.getNormals();n&&this.geometry.setVerticesData(S.VertexBuffer.NormalKind+t,n,!1,3);var o=i.getTangents();o&&this.geometry.setVerticesData(S.VertexBuffer.TangentKind+t,o,!1,3)}}else for(t=0;this.geometry.isVerticesDataPresent(S.VertexBuffer.PositionKind+t);)this.geometry.removeVerticesData(S.VertexBuffer.PositionKind+t),this.geometry.isVerticesDataPresent(S.VertexBuffer.NormalKind+t)&&this.geometry.removeVerticesData(S.VertexBuffer.NormalKind+t),this.geometry.isVerticesDataPresent(S.VertexBuffer.TangentKind+t)&&this.geometry.removeVerticesData(S.VertexBuffer.TangentKind+t),t++}},_.Parse=function(e,t,i){var r;if((r=e.type&&\"GroundMesh\"===e.type?S.GroundMesh.Parse(e,t):new _(e.name,t)).id=e.id,S.Tags&&S.Tags.AddTagsTo(r,e.tags),r.position=S.Vector3.FromArray(e.position),void 0!==e.metadata&&(r.metadata=e.metadata),e.rotationQuaternion?r.rotationQuaternion=S.Quaternion.FromArray(e.rotationQuaternion):e.rotation&&(r.rotation=S.Vector3.FromArray(e.rotation)),r.scaling=S.Vector3.FromArray(e.scaling),e.localMatrix?r.setPreTransformMatrix(S.Matrix.FromArray(e.localMatrix)):e.pivotMatrix&&r.setPivotMatrix(S.Matrix.FromArray(e.pivotMatrix)),r.setEnabled(e.isEnabled),r.isVisible=e.isVisible,r.infiniteDistance=e.infiniteDistance,r.showBoundingBox=e.showBoundingBox,r.showSubMeshesBoundingBox=e.showSubMeshesBoundingBox,void 0!==e.applyFog&&(r.applyFog=e.applyFog),void 0!==e.pickable&&(r.isPickable=e.pickable),void 0!==e.alphaIndex&&(r.alphaIndex=e.alphaIndex),r.receiveShadows=e.receiveShadows,r.billboardMode=e.billboardMode,void 0!==e.visibility&&(r.visibility=e.visibility),r.checkCollisions=e.checkCollisions,void 0!==e.isBlocker&&(r.isBlocker=e.isBlocker),r._shouldGenerateFlatShading=e.useFlatShading,e.freezeWorldMatrix&&(r._waitingFreezeWorldMatrix=e.freezeWorldMatrix),e.parentId&&(r._waitingParentId=e.parentId),void 0!==e.actions&&(r._waitingActions=e.actions),void 0!==e.overlayAlpha&&(r.overlayAlpha=e.overlayAlpha),void 0!==e.overlayColor&&(r.overlayColor=S.Color3.FromArray(e.overlayColor)),void 0!==e.renderOverlay&&(r.renderOverlay=e.renderOverlay),r.isUnIndexed=!!e.isUnIndexed,r.hasVertexAlpha=e.hasVertexAlpha,e.delayLoadingFile?(r.delayLoadState=S.Engine.DELAYLOADSTATE_NOTLOADED,r.delayLoadingFile=i+e.delayLoadingFile,r._boundingInfo=new S.BoundingInfo(S.Vector3.FromArray(e.boundingBoxMinimum),S.Vector3.FromArray(e.boundingBoxMaximum)),e._binaryInfo&&(r._binaryInfo=e._binaryInfo),r._delayInfo=[],e.hasUVs&&r._delayInfo.push(S.VertexBuffer.UVKind),e.hasUVs2&&r._delayInfo.push(S.VertexBuffer.UV2Kind),e.hasUVs3&&r._delayInfo.push(S.VertexBuffer.UV3Kind),e.hasUVs4&&r._delayInfo.push(S.VertexBuffer.UV4Kind),e.hasUVs5&&r._delayInfo.push(S.VertexBuffer.UV5Kind),e.hasUVs6&&r._delayInfo.push(S.VertexBuffer.UV6Kind),e.hasColors&&r._delayInfo.push(S.VertexBuffer.ColorKind),e.hasMatricesIndices&&r._delayInfo.push(S.VertexBuffer.MatricesIndicesKind),e.hasMatricesWeights&&r._delayInfo.push(S.VertexBuffer.MatricesWeightsKind),r._delayLoadingFunction=S.Geometry._ImportGeometry,S.SceneLoader.ForceFullSceneLoadingForIncremental&&r._checkDelayState()):S.Geometry._ImportGeometry(e,r),e.materialId?r.setMaterialByID(e.materialId):r.material=null,-1<e.morphTargetManagerId&&(r.morphTargetManager=t.getMorphTargetManagerById(e.morphTargetManagerId)),-1<e.skeletonId&&(r.skeleton=t.getLastSkeletonByID(e.skeletonId),e.numBoneInfluencers&&(r.numBoneInfluencers=e.numBoneInfluencers)),e.animations){for(var n=0;n<e.animations.length;n++){var o=e.animations[n];r.animations.push(S.Animation.Parse(o))}S.Node.ParseAnimationRanges(r,e,t)}if(e.autoAnimate&&t.beginAnimation(r,e.autoAnimateFrom,e.autoAnimateTo,e.autoAnimateLoop,e.autoAnimateSpeed||1),e.layerMask&&!isNaN(e.layerMask)?r.layerMask=Math.abs(parseInt(e.layerMask)):r.layerMask=268435455,e.physicsImpostor&&(r.physicsImpostor=new S.PhysicsImpostor(r,e.physicsImpostor,{mass:e.physicsMass,friction:e.physicsFriction,restitution:e.physicsRestitution},t)),e.instances)for(var s=0;s<e.instances.length;s++){var a=e.instances[s],l=r.createInstance(a.name);if(a.id&&(l.id=a.id),S.Tags&&(a.tags?S.Tags.AddTagsTo(l,a.tags):S.Tags.AddTagsTo(l,e.tags)),l.position=S.Vector3.FromArray(a.position),a.parentId&&(l._waitingParentId=a.parentId),a.rotationQuaternion?l.rotationQuaternion=S.Quaternion.FromArray(a.rotationQuaternion):a.rotation&&(l.rotation=S.Vector3.FromArray(a.rotation)),l.scaling=S.Vector3.FromArray(a.scaling),null!=a.checkCollisions&&null!=a.checkCollisions&&(l.checkCollisions=a.checkCollisions),null!=a.pickable&&null!=a.pickable&&(l.isPickable=a.pickable),null!=a.showBoundingBox&&null!=a.showBoundingBox&&(l.showBoundingBox=a.showBoundingBox),null!=a.showSubMeshesBoundingBox&&null!=a.showSubMeshesBoundingBox&&(l.showSubMeshesBoundingBox=a.showSubMeshesBoundingBox),null!=a.alphaIndex&&null!=a.showSubMeshesBoundingBox&&(l.alphaIndex=a.alphaIndex),a.physicsImpostor&&(l.physicsImpostor=new S.PhysicsImpostor(l,a.physicsImpostor,{mass:a.physicsMass,friction:a.physicsFriction,restitution:a.physicsRestitution},t)),a.animations){for(n=0;n<a.animations.length;n++)o=a.animations[n],l.animations.push(S.Animation.Parse(o));S.Node.ParseAnimationRanges(l,a,t),a.autoAnimate&&t.beginAnimation(l,a.autoAnimateFrom,a.autoAnimateTo,a.autoAnimateLoop,a.autoAnimateSpeed||1)}}return r},_.CreateRibbon=function(e,t,i,r,n,o,s,a,l){return void 0===i&&(i=!1),void 0===s&&(s=!1),S.MeshBuilder.CreateRibbon(e,{pathArray:t,closeArray:i,closePath:r,offset:n,updatable:s,sideOrientation:a,instance:l},o)},_.CreateDisc=function(e,t,i,r,n,o){void 0===r&&(r=null);var s={radius:t,tessellation:i,sideOrientation:o,updatable:n};return S.MeshBuilder.CreateDisc(e,s,r)},_.CreateBox=function(e,t,i,r,n){void 0===i&&(i=null);var o={size:t,sideOrientation:n,updatable:r};return S.MeshBuilder.CreateBox(e,o,i)},_.CreateSphere=function(e,t,i,r,n,o){var s={segments:t,diameterX:i,diameterY:i,diameterZ:i,sideOrientation:o,updatable:n};return S.MeshBuilder.CreateSphere(e,s,r)},_.CreateCylinder=function(e,t,i,r,n,o,s,a,l){void 0!==s&&s instanceof S.Scene||(void 0!==s&&(l=a||_.DEFAULTSIDE,a=s),s=o,o=1);var c={height:t,diameterTop:i,diameterBottom:r,tessellation:n,subdivisions:o,sideOrientation:l,updatable:a};return S.MeshBuilder.CreateCylinder(e,c,s)},_.CreateTorus=function(e,t,i,r,n,o,s){var a={diameter:t,thickness:i,tessellation:r,sideOrientation:s,updatable:o};return S.MeshBuilder.CreateTorus(e,a,n)},_.CreateTorusKnot=function(e,t,i,r,n,o,s,a,l,c){var h={radius:t,tube:i,radialSegments:r,tubularSegments:n,p:o,q:s,sideOrientation:c,updatable:l};return S.MeshBuilder.CreateTorusKnot(e,h,a)},_.CreateLines=function(e,t,i,r,n){void 0===i&&(i=null),void 0===r&&(r=!1),void 0===n&&(n=null);var o={points:t,updatable:r,instance:n};return S.MeshBuilder.CreateLines(e,o,i)},_.CreateDashedLines=function(e,t,i,r,n,o,s,a){void 0===o&&(o=null);var l={points:t,dashSize:i,gapSize:r,dashNb:n,updatable:s,instance:a};return S.MeshBuilder.CreateDashedLines(e,l,o)},_.CreatePolygon=function(e,t,i,r,n,o){var s={shape:t,holes:r,updatable:n,sideOrientation:o};return S.MeshBuilder.CreatePolygon(e,s,i)},_.ExtrudePolygon=function(e,t,i,r,n,o,s){var a={shape:t,holes:n,depth:i,updatable:o,sideOrientation:s};return S.MeshBuilder.ExtrudePolygon(e,a,r)},_.ExtrudeShape=function(e,t,i,r,n,o,s,a,l,c){void 0===s&&(s=null);var h={shape:t,path:i,scale:r,rotation:n,cap:0===o?0:o||_.NO_CAP,sideOrientation:l,instance:c,updatable:a};return S.MeshBuilder.ExtrudeShape(e,h,s)},_.ExtrudeShapeCustom=function(e,t,i,r,n,o,s,a,l,c,h,u){var d={shape:t,path:i,scaleFunction:r,rotationFunction:n,ribbonCloseArray:o,ribbonClosePath:s,cap:0===a?0:a||_.NO_CAP,sideOrientation:h,instance:u,updatable:c};return S.MeshBuilder.ExtrudeShapeCustom(e,d,l)},_.CreateLathe=function(e,t,i,r,n,o,s){var a={shape:t,radius:i,tessellation:r,sideOrientation:s,updatable:o};return S.MeshBuilder.CreateLathe(e,a,n)},_.CreatePlane=function(e,t,i,r,n){var o={size:t,width:t,height:t,sideOrientation:n,updatable:r};return S.MeshBuilder.CreatePlane(e,o,i)},_.CreateGround=function(e,t,i,r,n,o){var s={width:t,height:i,subdivisions:r,updatable:o};return S.MeshBuilder.CreateGround(e,s,n)},_.CreateTiledGround=function(e,t,i,r,n,o,s,a,l){var c={xmin:t,zmin:i,xmax:r,zmax:n,subdivisions:o,precision:s,updatable:l};return S.MeshBuilder.CreateTiledGround(e,c,a)},_.CreateGroundFromHeightMap=function(e,t,i,r,n,o,s,a,l,c,h){var u={width:i,height:r,subdivisions:n,minHeight:o,maxHeight:s,updatable:l,onReady:c,alphaFilter:h};return S.MeshBuilder.CreateGroundFromHeightMap(e,t,u,a)},_.CreateTube=function(e,t,i,r,n,o,s,a,l,c){var h={path:t,radius:i,tessellation:r,radiusFunction:n,arc:1,cap:o,updatable:a,sideOrientation:l,instance:c};return S.MeshBuilder.CreateTube(e,h,s)},_.CreatePolyhedron=function(e,t,i){return S.MeshBuilder.CreatePolyhedron(e,t,i)},_.CreateIcoSphere=function(e,t,i){return S.MeshBuilder.CreateIcoSphere(e,t,i)},_.CreateDecal=function(e,t,i,r,n,o){var s={position:i,normal:r,size:n,angle:o};return S.MeshBuilder.CreateDecal(e,t,s)},_.prototype.setPositionsForCPUSkinning=function(){if(!this._sourcePositions){var e=this.getVerticesData(S.VertexBuffer.PositionKind);if(!e)return this._sourcePositions;this._sourcePositions=new Float32Array(e),this.isVertexBufferUpdatable(S.VertexBuffer.PositionKind)||this.setVerticesData(S.VertexBuffer.PositionKind,e,!0)}return this._sourcePositions},_.prototype.setNormalsForCPUSkinning=function(){if(!this._sourceNormals){var e=this.getVerticesData(S.VertexBuffer.NormalKind);if(!e)return this._sourceNormals;this._sourceNormals=new Float32Array(e),this.isVertexBufferUpdatable(S.VertexBuffer.NormalKind)||this.setVerticesData(S.VertexBuffer.NormalKind,e,!0)}return this._sourceNormals},_.prototype.applySkeleton=function(e){if(!this.geometry)return this;if(this.geometry._softwareSkinningFrameId==this.getScene().getFrameId())return this;if(this.geometry._softwareSkinningFrameId=this.getScene().getFrameId(),!this.isVerticesDataPresent(S.VertexBuffer.PositionKind))return this;if(!this.isVerticesDataPresent(S.VertexBuffer.NormalKind))return this;if(!this.isVerticesDataPresent(S.VertexBuffer.MatricesIndicesKind))return this;if(!this.isVerticesDataPresent(S.VertexBuffer.MatricesWeightsKind))return this;if(!this._sourcePositions){var t=this.subMeshes.slice();this.setPositionsForCPUSkinning(),this.subMeshes=t}this._sourceNormals||this.setNormalsForCPUSkinning();var i=this.getVerticesData(S.VertexBuffer.PositionKind);if(!i)return this;i instanceof Float32Array||(i=new Float32Array(i));var r=this.getVerticesData(S.VertexBuffer.NormalKind);if(!r)return this;r instanceof Float32Array||(r=new Float32Array(r));var n=this.getVerticesData(S.VertexBuffer.MatricesIndicesKind),o=this.getVerticesData(S.VertexBuffer.MatricesWeightsKind);if(!o||!n)return this;for(var s,a=4<this.numBoneInfluencers,l=a?this.getVerticesData(S.VertexBuffer.MatricesIndicesExtraKind):null,c=a?this.getVerticesData(S.VertexBuffer.MatricesWeightsExtraKind):null,h=e.getTransformMatrices(this),u=S.Vector3.Zero(),d=new S.Matrix,f=new S.Matrix,p=0,_=0;_<i.length;_+=3,p+=4){var m;for(s=0;s<4;s++)0<(m=o[p+s])&&(S.Matrix.FromFloat32ArrayToRefScaled(h,Math.floor(16*n[p+s]),m,f),d.addToSelf(f));if(a)for(s=0;s<4;s++)0<(m=c[p+s])&&(S.Matrix.FromFloat32ArrayToRefScaled(h,Math.floor(16*l[p+s]),m,f),d.addToSelf(f));S.Vector3.TransformCoordinatesFromFloatsToRef(this._sourcePositions[_],this._sourcePositions[_+1],this._sourcePositions[_+2],d,u),u.toArray(i,_),S.Vector3.TransformNormalFromFloatsToRef(this._sourceNormals[_],this._sourceNormals[_+1],this._sourceNormals[_+2],d,u),u.toArray(r,_),d.reset()}return this.updateVerticesData(S.VertexBuffer.PositionKind,i),this.updateVerticesData(S.VertexBuffer.NormalKind,r),this},_.MinMax=function(e){var n=null,o=null;return e.forEach((function(e,t,i){var r=e.getBoundingInfo().boundingBox;n&&o?(n.minimizeInPlace(r.minimumWorld),o.maximizeInPlace(r.maximumWorld)):(n=r.minimumWorld,o=r.maximumWorld)})),n&&o?{min:n,max:o}:{min:S.Vector3.Zero(),max:S.Vector3.Zero()}},_.Center=function(e){var t=e instanceof Array?_.MinMax(e):e;return S.Vector3.Center(t.min,t.max)},_.MergeMeshes=function(e,t,i,r,n){var o;if(void 0===t&&(t=!0),!i){var s=0;for(o=0;o<e.length;o++)if(e[o]&&65536<(s+=e[o].getTotalVertices()))return S.Tools.Warn(\"Cannot merge meshes because resulting mesh will have more than 65536 vertices. Please use allow32BitsIndices = true to use 32 bits indices\"),null}var a,l=null,c=new Array,h=null;for(o=0;o<e.length;o++)if(e[o]){var u=e[o].computeWorldMatrix(!0);(a=S.VertexData.ExtractFromMesh(e[o],!0,!0)).transform(u),l?l.merge(a,i):(l=a,h=e[o]),n&&c.push(e[o].getTotalIndices())}if(h=h,r||(r=new _(h.name+\"_merged\",h.getScene())),l.applyToMesh(r),r.material=h.material,r.checkCollisions=h.checkCollisions,t)for(o=0;o<e.length;o++)e[o]&&e[o].dispose();if(n){r.releaseSubMeshes();for(var d=o=0;o<c.length;)S.SubMesh.CreateFromIndices(0,d,c[o],r),d+=c[o],o++}return r},_.FRONTSIDE=0,_.BACKSIDE=1,_.DOUBLESIDE=2,_.DEFAULTSIDE=0,_.NO_CAP=0,_.CAP_START=1,_.CAP_END=2,_.CAP_ALL=3,_})(S.AbstractMesh);S.Mesh=i})($a||($a={})),ne=$a||($a={}),oe=(function(){function e(){}return Object.defineProperty(e.prototype,\"effect\",{get:function(){return this._materialEffect},enumerable:!0,configurable:!0}),e.prototype.setEffect=function(e,t){void 0===t&&(t=null),this._materialEffect!==e?(this._materialDefines=t,this._materialEffect=e):e||(this._materialDefines=null)},e})(),se=(function(c){function h(e,t,i,r,n,o,s,a){void 0===a&&(a=!0);var l=c.call(this)||this;return l.materialIndex=e,l.verticesStart=t,l.verticesCount=i,l.indexStart=r,l.indexCount=n,l._renderId=0,l._mesh=o,l._renderingMesh=s||o,o.subMeshes.push(l),l._trianglePlanes=[],l._id=o.subMeshes.length-1,a&&(l.refreshBoundingInfo(),o.computeWorldMatrix(!0)),l}return T(h,c),h.AddToMesh=function(e,t,i,r,n,o,s,a){return void 0===a&&(a=!0),new h(e,t,i,r,n,o,s,a)},Object.defineProperty(h.prototype,\"IsGlobal\",{get:function(){return 0===this.verticesStart&&this.verticesCount===this._mesh.getTotalVertices()},enumerable:!0,configurable:!0}),h.prototype.getBoundingInfo=function(){return this.IsGlobal?this._mesh.getBoundingInfo():this._boundingInfo},h.prototype.setBoundingInfo=function(e){return this._boundingInfo=e,this},h.prototype.getMesh=function(){return this._mesh},h.prototype.getRenderingMesh=function(){return this._renderingMesh},h.prototype.getMaterial=function(){var e=this._renderingMesh.material;if(null==e)return this._mesh.getScene().defaultMaterial;if(e.getSubMaterial){var t=e.getSubMaterial(this.materialIndex);return this._currentMaterial!==t&&(this._currentMaterial=t,this._materialDefines=null),t}return e},h.prototype.refreshBoundingInfo=function(){if(this._lastColliderWorldVertices=null,this.IsGlobal||!this._renderingMesh||!this._renderingMesh.geometry)return this;var e=this._renderingMesh.getVerticesData(ne.VertexBuffer.PositionKind);if(!e)return this._boundingInfo=this._mesh.getBoundingInfo(),this;var t,i=this._renderingMesh.getIndices();if(0===this.indexStart&&this.indexCount===i.length){var r=this._renderingMesh.getBoundingInfo();t={minimum:r.minimum.clone(),maximum:r.maximum.clone()}}else t=ne.Tools.ExtractMinAndMaxIndexed(e,i,this.indexStart,this.indexCount,this._renderingMesh.geometry.boundingBias);return this._boundingInfo=new ne.BoundingInfo(t.minimum,t.maximum),this},h.prototype._checkCollision=function(e){return this.getBoundingInfo()._checkCollision(e)},h.prototype.updateBoundingInfo=function(e){var t=this.getBoundingInfo();return t||(this.refreshBoundingInfo(),t=this.getBoundingInfo()),t.update(e),this},h.prototype.isInFrustum=function(e){var t=this.getBoundingInfo();return!!t&&t.isInFrustum(e,this._mesh.cullingStrategy)},h.prototype.isCompletelyInFrustum=function(e){var t=this.getBoundingInfo();return!!t&&t.isCompletelyInFrustum(e)},h.prototype.render=function(e){return this._renderingMesh.render(this,e),this},h.prototype._getLinesIndexBuffer=function(e,t){if(!this._linesIndexBuffer){for(var i=[],r=this.indexStart;r<this.indexStart+this.indexCount;r+=3)i.push(e[r],e[r+1],e[r+1],e[r+2],e[r+2],e[r]);this._linesIndexBuffer=t.createIndexBuffer(i),this._linesIndexCount=i.length}return this._linesIndexBuffer},h.prototype.canIntersects=function(e){var t=this.getBoundingInfo();return!!t&&e.intersectsBox(t.boundingBox)},h.prototype.intersects=function(e,t,i,r){var n=this.getMaterial();if(!n)return null;switch(n.fillMode){case ne.Material.PointListDrawMode:case ne.Material.LineListDrawMode:case ne.Material.LineLoopDrawMode:case ne.Material.LineStripDrawMode:case ne.Material.TriangleFanDrawMode:case ne.Material.TriangleStripDrawMode:return null}if(ne.LinesMesh){var o=this._mesh instanceof ne.InstancedMesh?this._mesh.sourceMesh:this._mesh;if(o instanceof ne.LinesMesh){var s=o;return this._intersectLines(e,t,i,s.intersectionThreshold,r)}}return this._intersectTriangles(e,t,i,r)},h.prototype._intersectLines=function(e,t,i,r,n){for(var o=null,s=this.indexStart;s<this.indexStart+this.indexCount;s+=2){var a=t[i[s]],l=t[i[s+1]],c=e.intersectionSegment(a,l,r);if(!(c<0)&&((n||!o||c<o.distance)&&(o=new ne.IntersectionInfo(null,null,c),n)))break}return o},h.prototype._intersectTriangles=function(e,t,i,r){for(var n=null,o=this.indexStart;o<this.indexStart+this.indexCount;o+=3){var s=t[i[o]],a=t[i[o+1]],l=t[i[o+2]],c=e.intersectsTriangle(s,a,l);if(c){if(c.distance<0)continue;if((r||!n||c.distance<n.distance)&&((n=c).faceId=o/3,r))break}}return n},h.prototype._rebuild=function(){this._linesIndexBuffer&&(this._linesIndexBuffer=null)},h.prototype.clone=function(e,t){var i=new h(this.materialIndex,this.verticesStart,this.verticesCount,this.indexStart,this.indexCount,e,t,!1);if(!this.IsGlobal){var r=this.getBoundingInfo();if(!r)return i;i._boundingInfo=new ne.BoundingInfo(r.minimum,r.maximum)}return i},h.prototype.dispose=function(){this._linesIndexBuffer&&(this._mesh.getScene().getEngine()._releaseBuffer(this._linesIndexBuffer),this._linesIndexBuffer=null);var e=this._mesh.subMeshes.indexOf(this);this._mesh.subMeshes.splice(e,1)},h.CreateFromIndices=function(e,t,i,r,n){for(var o=Number.MAX_VALUE,s=-Number.MAX_VALUE,a=(n=n||r).getIndices(),l=t;l<t+i;l++){var c=a[l];c<o&&(o=c),s<c&&(s=c)}return new h(e,o,s-o+1,t,i,r,n)},h})(ne.BaseSubMesh=oe),ne.SubMesh=se;var le,ce,he,ue,de,fe,pe,_e,me,ge,ve,ye,be,Te,Ee,xe,Pe,Ae,Se,Me,Re,Ce,Oe,De,Ie,we,Le,Fe,Be,Ne,Ve,Ue,ze,Ge,ke,We,He,Xe,je,Ye,Ke,Qe,Ze,qe,Je,$e,et,tt,it,rt,nt,ot,st,at,lt,ct,ht,ut,dt,ft,pt,_t,mt,gt,vt,yt,bt,Tt,Et,xt,Pt,At,St,Mt,Rt,Ct,Ot,Dt,It,wt,Lt,Ft,Bt,Nt,Vt,Ut,zt,Gt,kt,Wt,Ht,Xt,jt,Yt,Kt,Qt,Zt,qt,Jt,$t,ei,ti,ii,ri,ni,oi,si,ai,li,ci,hi,ui,di,fi,pi,_i,mi,gi,vi,yi,bi,Ti,Ei,xi,Pi,Ai,Si,Mi,Ri,Ci,Oi,Di,Ii,wi,Li,Fi,Bi,Ni,Vi,Ui,zi,Gi,ki,Wi,Hi,Xi,ji,Yi,Ki,Qi,Zi,qi,Ji;ae=this&&this.__assign||function(){return(ae=Object.assign||function(e){for(var t,i=1,r=arguments.length;i<r;i++)for(var n in t=arguments[i])Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e}).apply(this,arguments)};!(function(l){var e=(function(){function e(){this._isDirty=!0,this._areLightsDirty=!0,this._areAttributesDirty=!0,this._areTexturesDirty=!0,this._areFresnelDirty=!0,this._areMiscDirty=!0,this._areImageProcessingDirty=!0,this._normals=!1,this._uvs=!1,this._needNormals=!1,this._needUVs=!1}return Object.defineProperty(e.prototype,\"isDirty\",{get:function(){return this._isDirty},enumerable:!0,configurable:!0}),e.prototype.markAsProcessed=function(){this._isDirty=!1,this._areAttributesDirty=!1,this._areTexturesDirty=!1,this._areFresnelDirty=!1,this._areLightsDirty=!1,this._areMiscDirty=!1,this._areImageProcessingDirty=!1},e.prototype.markAsUnprocessed=function(){this._isDirty=!0},e.prototype.markAllAsDirty=function(){this._areTexturesDirty=!0,this._areAttributesDirty=!0,this._areLightsDirty=!0,this._areFresnelDirty=!0,this._areMiscDirty=!0,this._areImageProcessingDirty=!0,this._isDirty=!0},e.prototype.markAsImageProcessingDirty=function(){this._areImageProcessingDirty=!0,this._isDirty=!0},e.prototype.markAsLightDirty=function(){this._areLightsDirty=!0,this._isDirty=!0},e.prototype.markAsAttributesDirty=function(){this._areAttributesDirty=!0,this._isDirty=!0},e.prototype.markAsTexturesDirty=function(){this._areTexturesDirty=!0,this._isDirty=!0},e.prototype.markAsFresnelDirty=function(){this._areFresnelDirty=!0,this._isDirty=!0},e.prototype.markAsMiscDirty=function(){this._areMiscDirty=!0,this._isDirty=!0},e.prototype.rebuild=function(){this._keys&&delete this._keys,this._keys=[];for(var e=0,t=Object.keys(this);e<t.length;e++){var i=t[e];\"_\"!==i[0]&&this._keys.push(i)}},e.prototype.isEqual=function(e){if(this._keys.length!==e._keys.length)return!1;for(var t=0;t<this._keys.length;t++){var i=this._keys[t];if(this[i]!==e[i])return!1}return!0},e.prototype.cloneTo=function(e){this._keys.length!==e._keys.length&&(e._keys=this._keys.slice(0));for(var t=0;t<this._keys.length;t++){var i=this._keys[t];e[i]=this[i]}},e.prototype.reset=function(){for(var e=0;e<this._keys.length;e++){var t=this._keys[e];switch(typeof this[t]){case\"number\":this[t]=0;break;case\"string\":this[t]=\"\";break;default:this[t]=!1}}},e.prototype.toString=function(){for(var e=\"\",t=0;t<this._keys.length;t++){var i=this._keys[t],r=this[i];switch(typeof r){case\"number\":case\"string\":e+=\"#define \"+i+\" \"+r+\"\\n\";break;default:r&&(e+=\"#define \"+i+\"\\n\")}}return e},e})();l.MaterialDefines=e;var t=(function(){function n(e,t,i){this.checkReadyOnEveryCall=!1,this.checkReadyOnlyOnce=!1,this.state=\"\",this._alpha=1,this._backFaceCulling=!0,this.doNotSerialize=!1,this.storeEffectOnSubMeshes=!1,this.onDisposeObservable=new l.Observable,this._alphaMode=l.Engine.ALPHA_COMBINE,this._needDepthPrePass=!1,this.disableDepthWrite=!1,this.forceDepthWrite=!1,this.separateCullingPass=!1,this._fogEnabled=!0,this.pointSize=1,this.zOffset=0,this._wasPreviouslyReady=!1,this._fillMode=n.TriangleFillMode,this.name=e,this.id=e||l.Tools.RandomId(),this._scene=t||l.Engine.LastCreatedScene,this.uniqueId=this._scene.getUniqueId(),this._scene.useRightHandedSystem?this.sideOrientation=n.ClockWiseSideOrientation:this.sideOrientation=n.CounterClockWiseSideOrientation,this._uniformBuffer=new l.UniformBuffer(this._scene.getEngine()),this._useUBO=this.getScene().getEngine().supportsUniformBuffers,i||(this._scene.materials.push(this),this._scene.onNewMaterialAddedObservable.notifyObservers(this))}return Object.defineProperty(n,\"TriangleFillMode\",{get:function(){return n._TriangleFillMode},enumerable:!0,configurable:!0}),Object.defineProperty(n,\"WireFrameFillMode\",{get:function(){return n._WireFrameFillMode},enumerable:!0,configurable:!0}),Object.defineProperty(n,\"PointFillMode\",{get:function(){return n._PointFillMode},enumerable:!0,configurable:!0}),Object.defineProperty(n,\"PointListDrawMode\",{get:function(){return n._PointListDrawMode},enumerable:!0,configurable:!0}),Object.defineProperty(n,\"LineListDrawMode\",{get:function(){return n._LineListDrawMode},enumerable:!0,configurable:!0}),Object.defineProperty(n,\"LineLoopDrawMode\",{get:function(){return n._LineLoopDrawMode},enumerable:!0,configurable:!0}),Object.defineProperty(n,\"LineStripDrawMode\",{get:function(){return n._LineStripDrawMode},enumerable:!0,configurable:!0}),Object.defineProperty(n,\"TriangleStripDrawMode\",{get:function(){return n._TriangleStripDrawMode},enumerable:!0,configurable:!0}),Object.defineProperty(n,\"TriangleFanDrawMode\",{get:function(){return n._TriangleFanDrawMode},enumerable:!0,configurable:!0}),Object.defineProperty(n,\"ClockWiseSideOrientation\",{get:function(){return n._ClockWiseSideOrientation},enumerable:!0,configurable:!0}),Object.defineProperty(n,\"CounterClockWiseSideOrientation\",{get:function(){return n._CounterClockWiseSideOrientation},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,\"alpha\",{get:function(){return this._alpha},set:function(e){this._alpha!==e&&(this._alpha=e,this.markAsDirty(n.MiscDirtyFlag))},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,\"backFaceCulling\",{get:function(){return this._backFaceCulling},set:function(e){this._backFaceCulling!==e&&(this._backFaceCulling=e,this.markAsDirty(n.TextureDirtyFlag))},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,\"hasRenderTargetTextures\",{get:function(){return!1},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,\"onDispose\",{set:function(e){this._onDisposeObserver&&this.onDisposeObservable.remove(this._onDisposeObserver),this._onDisposeObserver=this.onDisposeObservable.add(e)},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,\"onBindObservable\",{get:function(){return this._onBindObservable||(this._onBindObservable=new l.Observable),this._onBindObservable},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,\"onBind\",{set:function(e){this._onBindObserver&&this.onBindObservable.remove(this._onBindObserver),this._onBindObserver=this.onBindObservable.add(e)},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,\"onUnBindObservable\",{get:function(){return this._onUnBindObservable||(this._onUnBindObservable=new l.Observable),this._onUnBindObservable},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,\"alphaMode\",{get:function(){return this._alphaMode},set:function(e){this._alphaMode!==e&&(this._alphaMode=e,this.markAsDirty(n.TextureDirtyFlag))},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,\"needDepthPrePass\",{get:function(){return this._needDepthPrePass},set:function(e){this._needDepthPrePass!==e&&(this._needDepthPrePass=e,this._needDepthPrePass&&(this.checkReadyOnEveryCall=!0))},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,\"fogEnabled\",{get:function(){return this._fogEnabled},set:function(e){this._fogEnabled!==e&&(this._fogEnabled=e,this.markAsDirty(n.MiscDirtyFlag))},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,\"wireframe\",{get:function(){switch(this._fillMode){case n.WireFrameFillMode:case n.LineListDrawMode:case n.LineLoopDrawMode:case n.LineStripDrawMode:return!0}return this._scene.forceWireframe},set:function(e){this.fillMode=e?n.WireFrameFillMode:n.TriangleFillMode},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,\"pointsCloud\",{get:function(){switch(this._fillMode){case n.PointFillMode:case n.PointListDrawMode:return!0}return this._scene.forcePointsCloud},set:function(e){this.fillMode=e?n.PointFillMode:n.TriangleFillMode},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,\"fillMode\",{get:function(){return this._fillMode},set:function(e){this._fillMode!==e&&(this._fillMode=e,this.markAsDirty(n.MiscDirtyFlag))},enumerable:!0,configurable:!0}),n.prototype.toString=function(e){return\"Name: \"+this.name},n.prototype.getClassName=function(){return\"Material\"},Object.defineProperty(n.prototype,\"isFrozen\",{get:function(){return this.checkReadyOnlyOnce},enumerable:!0,configurable:!0}),n.prototype.freeze=function(){this.checkReadyOnlyOnce=!0},n.prototype.unfreeze=function(){this.checkReadyOnlyOnce=!1},n.prototype.isReady=function(e,t){return!0},n.prototype.isReadyForSubMesh=function(e,t,i){return!1},n.prototype.getEffect=function(){return this._effect},n.prototype.getScene=function(){return this._scene},n.prototype.needAlphaBlending=function(){return this.alpha<1},n.prototype.needAlphaBlendingForMesh=function(e){return this.needAlphaBlending()||e.visibility<1||e.hasVertexAlpha},n.prototype.needAlphaTesting=function(){return!1},n.prototype.getAlphaTestTexture=function(){return null},n.prototype.markDirty=function(){this._wasPreviouslyReady=!1},n.prototype._preBind=function(e,t){void 0===t&&(t=null);var i=this._scene.getEngine(),r=(null==t?this.sideOrientation:t)===n.ClockWiseSideOrientation;return i.enableEffect(e||this._effect),i.setState(this.backFaceCulling,this.zOffset,!1,r),r},n.prototype.bind=function(e,t){},n.prototype.bindForSubMesh=function(e,t,i){},n.prototype.bindOnlyWorldMatrix=function(e){},n.prototype.bindSceneUniformBuffer=function(e,t){t.bindToEffect(e,\"Scene\")},n.prototype.bindView=function(e){this._useUBO?this.bindSceneUniformBuffer(e,this.getScene().getSceneUniformBuffer()):e.setMatrix(\"view\",this.getScene().getViewMatrix())},n.prototype.bindViewProjection=function(e){this._useUBO?this.bindSceneUniformBuffer(e,this.getScene().getSceneUniformBuffer()):e.setMatrix(\"viewProjection\",this.getScene().getTransformMatrix())},n.prototype._shouldTurnAlphaTestOn=function(e){return!this.needAlphaBlendingForMesh(e)&&this.needAlphaTesting()},n.prototype._afterBind=function(e){if((this._scene._cachedMaterial=this)._scene._cachedVisibility=e?e.visibility:1,this._onBindObservable&&e&&this._onBindObservable.notifyObservers(e),this.disableDepthWrite){var t=this._scene.getEngine();this._cachedDepthWriteState=t.getDepthWrite(),t.setDepthWrite(!1)}},n.prototype.unbind=function(){(this._onUnBindObservable&&this._onUnBindObservable.notifyObservers(this),this.disableDepthWrite)&&this._scene.getEngine().setDepthWrite(this._cachedDepthWriteState)},n.prototype.getActiveTextures=function(){return[]},n.prototype.hasTexture=function(e){return!1},n.prototype.clone=function(e){return null},n.prototype.getBindedMeshes=function(){for(var e=new Array,t=0;t<this._scene.meshes.length;t++){var i=this._scene.meshes[t];i.material===this&&e.push(i)}return e},n.prototype.forceCompilation=function(t,i,e){var r=this,n=ae({clipPlane:!1},e),o=new l.BaseSubMesh,s=this.getScene(),a=function(){if(r._scene&&r._scene.getEngine()){o._materialDefines&&(o._materialDefines._renderId=-1);var e=s.clipPlane;n.clipPlane&&(s.clipPlane=new l.Plane(0,0,0,1)),r.storeEffectOnSubMeshes?r.isReadyForSubMesh(t,o)?i&&i(r):setTimeout(a,16):r.isReady(t)?i&&i(r):setTimeout(a,16),n.clipPlane&&(s.clipPlane=e)}};a()},n.prototype.forceCompilationAsync=function(t,i){var r=this;return new Promise(function(e){r.forceCompilation(t,(function(){e()}),i)})},n.prototype.markAsDirty=function(e){e&n.TextureDirtyFlag&&this._markAllSubMeshesAsTexturesDirty(),e&n.LightDirtyFlag&&this._markAllSubMeshesAsLightsDirty(),e&n.FresnelDirtyFlag&&this._markAllSubMeshesAsFresnelDirty(),e&n.AttributesDirtyFlag&&this._markAllSubMeshesAsAttributesDirty(),e&n.MiscDirtyFlag&&this._markAllSubMeshesAsMiscDirty(),this.getScene().resetCachedMaterial()},n.prototype._markAllSubMeshesAsDirty=function(e){for(var t=0,i=this.getScene().meshes;t<i.length;t++){var r=i[t];if(r.subMeshes)for(var n=0,o=r.subMeshes;n<o.length;n++){var s=o[n];s.getMaterial()===this&&(s._materialDefines&&e(s._materialDefines))}}},n.prototype._markAllSubMeshesAsImageProcessingDirty=function(){this._markAllSubMeshesAsDirty((function(e){return e.markAsImageProcessingDirty()}))},n.prototype._markAllSubMeshesAsTexturesDirty=function(){this._markAllSubMeshesAsDirty((function(e){return e.markAsTexturesDirty()}))},n.prototype._markAllSubMeshesAsFresnelDirty=function(){this._markAllSubMeshesAsDirty((function(e){return e.markAsFresnelDirty()}))},n.prototype._markAllSubMeshesAsFresnelAndMiscDirty=function(){this._markAllSubMeshesAsDirty((function(e){e.markAsFresnelDirty(),e.markAsMiscDirty()}))},n.prototype._markAllSubMeshesAsLightsDirty=function(){this._markAllSubMeshesAsDirty((function(e){return e.markAsLightDirty()}))},n.prototype._markAllSubMeshesAsAttributesDirty=function(){this._markAllSubMeshesAsDirty((function(e){return e.markAsAttributesDirty()}))},n.prototype._markAllSubMeshesAsMiscDirty=function(){this._markAllSubMeshesAsDirty((function(e){return e.markAsMiscDirty()}))},n.prototype._markAllSubMeshesAsTexturesAndMiscDirty=function(){this._markAllSubMeshesAsDirty((function(e){e.markAsTexturesDirty(),e.markAsMiscDirty()}))},n.prototype.dispose=function(e,t){this.getScene().stopAnimation(this),this.getScene().freeProcessedMaterials();var i=this._scene.materials.indexOf(this);for(0<=i&&this._scene.materials.splice(i,1),this._scene.onMaterialRemovedObservable.notifyObservers(this),i=0;i<this._scene.meshes.length;i++){var r=this._scene.meshes[i];if(r.material===this&&(r.material=null,r.geometry)){var n=r.geometry;if(this.storeEffectOnSubMeshes)for(var o=0,s=r.subMeshes;o<s.length;o++){var a=s[o];n._releaseVertexArrayObject(a._materialEffect),e&&a._materialEffect&&this._scene.getEngine()._releaseEffect(a._materialEffect)}else n._releaseVertexArrayObject(this._effect)}}this._uniformBuffer.dispose(),e&&this._effect&&(this.storeEffectOnSubMeshes||this._scene.getEngine()._releaseEffect(this._effect),this._effect=null),this.onDisposeObservable.notifyObservers(this),this.onDisposeObservable.clear(),this._onBindObservable&&this._onBindObservable.clear(),this._onUnBindObservable&&this._onUnBindObservable.clear()},n.prototype.serialize=function(){return l.SerializationHelper.Serialize(this)},n.ParseMultiMaterial=function(e,t){var i=new l.MultiMaterial(e.name,t);i.id=e.id,l.Tags&&l.Tags.AddTagsTo(i,e.tags);for(var r=0;r<e.materials.length;r++){var n=e.materials[r];n?i.subMaterials.push(t.getMaterialByID(n)):i.subMaterials.push(null)}return i},n.Parse=function(e,t,i){return e.customType&&\"BABYLON.StandardMaterial\"!==e.customType?\"BABYLON.PBRMaterial\"!==e.customType||!e.overloadedAlbedo||(e.customType=\"BABYLON.LegacyPBRMaterial\",l.LegacyPBRMaterial)?l.Tools.Instantiate(e.customType).Parse(e,t,i):void l.Tools.Error(\"Your scene is trying to load a legacy version of the PBRMaterial, please, include it from the materials library.\"):l.StandardMaterial.Parse(e,t,i)},n._TriangleFillMode=0,n._WireFrameFillMode=1,n._PointFillMode=2,n._PointListDrawMode=3,n._LineListDrawMode=4,n._LineLoopDrawMode=5,n._LineStripDrawMode=6,n._TriangleStripDrawMode=7,n._TriangleFanDrawMode=8,n._ClockWiseSideOrientation=0,n._CounterClockWiseSideOrientation=1,n.TextureDirtyFlag=1,n.LightDirtyFlag=2,n.FresnelDirtyFlag=4,n.AttributesDirtyFlag=8,n.MiscDirtyFlag=16,n.AllDirtyFlag=31,b([l.serialize()],n.prototype,\"id\",void 0),b([l.serialize()],n.prototype,\"uniqueId\",void 0),b([l.serialize()],n.prototype,\"name\",void 0),b([l.serialize()],n.prototype,\"checkReadyOnEveryCall\",void 0),b([l.serialize()],n.prototype,\"checkReadyOnlyOnce\",void 0),b([l.serialize()],n.prototype,\"state\",void 0),b([l.serialize(\"alpha\")],n.prototype,\"_alpha\",void 0),b([l.serialize(\"backFaceCulling\")],n.prototype,\"_backFaceCulling\",void 0),b([l.serialize()],n.prototype,\"sideOrientation\",void 0),b([l.serialize(\"alphaMode\")],n.prototype,\"_alphaMode\",void 0),b([l.serialize()],n.prototype,\"_needDepthPrePass\",void 0),b([l.serialize()],n.prototype,\"disableDepthWrite\",void 0),b([l.serialize()],n.prototype,\"forceDepthWrite\",void 0),b([l.serialize()],n.prototype,\"separateCullingPass\",void 0),b([l.serialize(\"fogEnabled\")],n.prototype,\"_fogEnabled\",void 0),b([l.serialize()],n.prototype,\"pointSize\",void 0),b([l.serialize()],n.prototype,\"zOffset\",void 0),b([l.serialize()],n.prototype,\"wireframe\",null),b([l.serialize()],n.prototype,\"pointsCloud\",null),b([l.serialize()],n.prototype,\"fillMode\",null),n})();l.Material=t})($a||($a={})),le=$a||($a={}),ce=(function(){function s(e,t,i){this._engine=e,this._noUBO=!e.supportsUniformBuffers,this._dynamic=i,this._data=t||[],this._uniformLocations={},this._uniformSizes={},this._uniformLocationPointer=0,this._needSync=!1,this._noUBO?(this.updateMatrix3x3=this._updateMatrix3x3ForEffect,this.updateMatrix2x2=this._updateMatrix2x2ForEffect,this.updateFloat=this._updateFloatForEffect,this.updateFloat2=this._updateFloat2ForEffect,this.updateFloat3=this._updateFloat3ForEffect,this.updateFloat4=this._updateFloat4ForEffect,this.updateMatrix=this._updateMatrixForEffect,this.updateVector3=this._updateVector3ForEffect,this.updateVector4=this._updateVector4ForEffect,this.updateColor3=this._updateColor3ForEffect,this.updateColor4=this._updateColor4ForEffect):(this._engine._uniformBuffers.push(this),this.updateMatrix3x3=this._updateMatrix3x3ForUniform,this.updateMatrix2x2=this._updateMatrix2x2ForUniform,this.updateFloat=this._updateFloatForUniform,this.updateFloat2=this._updateFloat2ForUniform,this.updateFloat3=this._updateFloat3ForUniform,this.updateFloat4=this._updateFloat4ForUniform,this.updateMatrix=this._updateMatrixForUniform,this.updateVector3=this._updateVector3ForUniform,this.updateVector4=this._updateVector4ForUniform,this.updateColor3=this._updateColor3ForUniform,this.updateColor4=this._updateColor4ForUniform)}return Object.defineProperty(s.prototype,\"useUbo\",{get:function(){return!this._noUBO},enumerable:!0,configurable:!0}),Object.defineProperty(s.prototype,\"isSync\",{get:function(){return!this._needSync},enumerable:!0,configurable:!0}),s.prototype.isDynamic=function(){return void 0!==this._dynamic},s.prototype.getData=function(){return this._bufferData},s.prototype.getBuffer=function(){return this._buffer},s.prototype._fillAlignment=function(e){var t;if(t=e<=2?e:4,this._uniformLocationPointer%t!=0){var i=this._uniformLocationPointer;this._uniformLocationPointer+=t-this._uniformLocationPointer%t;for(var r=this._uniformLocationPointer-i,n=0;n<r;n++)this._data.push(0)}},s.prototype.addUniform=function(e,t){if(!this._noUBO&&void 0===this._uniformLocations[e]){var i;if(t instanceof Array)t=(i=t).length;else{t=t,i=[];for(var r=0;r<t;r++)i.push(0)}this._fillAlignment(t),this._uniformSizes[e]=t,this._uniformLocations[e]=this._uniformLocationPointer,this._uniformLocationPointer+=t;for(r=0;r<t;r++)this._data.push(i[r]);this._needSync=!0}},s.prototype.addMatrix=function(e,t){this.addUniform(e,Array.prototype.slice.call(t.toArray()))},s.prototype.addFloat2=function(e,t,i){var r=[t,i];this.addUniform(e,r)},s.prototype.addFloat3=function(e,t,i,r){var n=[t,i,r];this.addUniform(e,n)},s.prototype.addColor3=function(e,t){var i=new Array;t.toArray(i),this.addUniform(e,i)},s.prototype.addColor4=function(e,t,i){var r=new Array;t.toArray(r),r.push(i),this.addUniform(e,r)},s.prototype.addVector3=function(e,t){var i=new Array;t.toArray(i),this.addUniform(e,i)},s.prototype.addMatrix3x3=function(e){this.addUniform(e,12)},s.prototype.addMatrix2x2=function(e){this.addUniform(e,8)},s.prototype.create=function(){this._noUBO||this._buffer||(this._fillAlignment(4),this._bufferData=new Float32Array(this._data),this._rebuild(),this._needSync=!0)},s.prototype._rebuild=function(){this._noUBO||(this._dynamic?this._buffer=this._engine.createDynamicUniformBuffer(this._bufferData):this._buffer=this._engine.createUniformBuffer(this._bufferData))},s.prototype.update=function(){this._buffer?(this._dynamic||this._needSync)&&(this._engine.updateUniformBuffer(this._buffer,this._bufferData),this._needSync=!1):this.create()},s.prototype.updateUniform=function(e,t,i){var r=this._uniformLocations[e];if(void 0===r){if(this._buffer)return void le.Tools.Error(\"Cannot add an uniform after UBO has been created.\");this.addUniform(e,i),r=this._uniformLocations[e]}if(this._buffer||this.create(),this._dynamic)for(o=0;o<i;o++)this._bufferData[r+o]=t[o];else{for(var n=!1,o=0;o<i;o++)this._bufferData[r+o]!==t[o]&&(n=!0,this._bufferData[r+o]=t[o]);this._needSync=this._needSync||n}},s.prototype._updateMatrix3x3ForUniform=function(e,t){for(var i=0;i<3;i++)s._tempBuffer[4*i]=t[3*i],s._tempBuffer[4*i+1]=t[3*i+1],s._tempBuffer[4*i+2]=t[3*i+2],s._tempBuffer[4*i+3]=0;this.updateUniform(e,s._tempBuffer,12)},s.prototype._updateMatrix3x3ForEffect=function(e,t){this._currentEffect.setMatrix3x3(e,t)},s.prototype._updateMatrix2x2ForEffect=function(e,t){this._currentEffect.setMatrix2x2(e,t)},s.prototype._updateMatrix2x2ForUniform=function(e,t){for(var i=0;i<2;i++)s._tempBuffer[4*i]=t[2*i],s._tempBuffer[4*i+1]=t[2*i+1],s._tempBuffer[4*i+2]=0,s._tempBuffer[4*i+3]=0;this.updateUniform(e,s._tempBuffer,8)},s.prototype._updateFloatForEffect=function(e,t){this._currentEffect.setFloat(e,t)},s.prototype._updateFloatForUniform=function(e,t){s._tempBuffer[0]=t,this.updateUniform(e,s._tempBuffer,1)},s.prototype._updateFloat2ForEffect=function(e,t,i,r){void 0===r&&(r=\"\"),this._currentEffect.setFloat2(e+r,t,i)},s.prototype._updateFloat2ForUniform=function(e,t,i,r){void 0===r&&(r=\"\"),s._tempBuffer[0]=t,s._tempBuffer[1]=i,this.updateUniform(e,s._tempBuffer,2)},s.prototype._updateFloat3ForEffect=function(e,t,i,r,n){void 0===n&&(n=\"\"),this._currentEffect.setFloat3(e+n,t,i,r)},s.prototype._updateFloat3ForUniform=function(e,t,i,r,n){void 0===n&&(n=\"\"),s._tempBuffer[0]=t,s._tempBuffer[1]=i,s._tempBuffer[2]=r,this.updateUniform(e,s._tempBuffer,3)},s.prototype._updateFloat4ForEffect=function(e,t,i,r,n,o){void 0===o&&(o=\"\"),this._currentEffect.setFloat4(e+o,t,i,r,n)},s.prototype._updateFloat4ForUniform=function(e,t,i,r,n,o){void 0===o&&(o=\"\"),s._tempBuffer[0]=t,s._tempBuffer[1]=i,s._tempBuffer[2]=r,s._tempBuffer[3]=n,this.updateUniform(e,s._tempBuffer,4)},s.prototype._updateMatrixForEffect=function(e,t){this._currentEffect.setMatrix(e,t)},s.prototype._updateMatrixForUniform=function(e,t){this.updateUniform(e,t.toArray(),16)},s.prototype._updateVector3ForEffect=function(e,t){this._currentEffect.setVector3(e,t)},s.prototype._updateVector3ForUniform=function(e,t){t.toArray(s._tempBuffer),this.updateUniform(e,s._tempBuffer,3)},s.prototype._updateVector4ForEffect=function(e,t){this._currentEffect.setVector4(e,t)},s.prototype._updateVector4ForUniform=function(e,t){t.toArray(s._tempBuffer),this.updateUniform(e,s._tempBuffer,4)},s.prototype._updateColor3ForEffect=function(e,t,i){void 0===i&&(i=\"\"),this._currentEffect.setColor3(e+i,t)},s.prototype._updateColor3ForUniform=function(e,t,i){void 0===i&&(i=\"\"),t.toArray(s._tempBuffer),this.updateUniform(e,s._tempBuffer,3)},s.prototype._updateColor4ForEffect=function(e,t,i,r){void 0===r&&(r=\"\"),this._currentEffect.setColor4(e+r,t,i)},s.prototype._updateColor4ForUniform=function(e,t,i,r){void 0===r&&(r=\"\"),t.toArray(s._tempBuffer),s._tempBuffer[3]=i,this.updateUniform(e,s._tempBuffer,4)},s.prototype.setTexture=function(e,t){this._currentEffect.setTexture(e,t)},s.prototype.updateUniformDirectly=function(e,t){this.updateUniform(e,t,t.length),this.update()},s.prototype.bindToEffect=function(e,t){this._currentEffect=e,!this._noUBO&&this._buffer&&e.bindUniformBuffer(this._buffer,t)},s.prototype.dispose=function(){if(!this._noUBO){var e=this._engine._uniformBuffers.indexOf(this);-1!==e&&this._engine._uniformBuffers.splice(e,1),this._buffer&&this._engine._releaseBuffer(this._buffer)&&(this._buffer=null)}},s._MAX_UNIFORM_SIZE=256,s._tempBuffer=new Float32Array(s._MAX_UNIFORM_SIZE),s})(),le.UniformBuffer=ce,he=$a||($a={}),ue=(function(){function q(){}return q.prototype.set=function(e,t){switch(t){case he.VertexBuffer.PositionKind:this.positions=e;break;case he.VertexBuffer.NormalKind:this.normals=e;break;case he.VertexBuffer.TangentKind:this.tangents=e;break;case he.VertexBuffer.UVKind:this.uvs=e;break;case he.VertexBuffer.UV2Kind:this.uvs2=e;break;case he.VertexBuffer.UV3Kind:this.uvs3=e;break;case he.VertexBuffer.UV4Kind:this.uvs4=e;break;case he.VertexBuffer.UV5Kind:this.uvs5=e;break;case he.VertexBuffer.UV6Kind:this.uvs6=e;break;case he.VertexBuffer.ColorKind:this.colors=e;break;case he.VertexBuffer.MatricesIndicesKind:this.matricesIndices=e;break;case he.VertexBuffer.MatricesWeightsKind:this.matricesWeights=e;break;case he.VertexBuffer.MatricesIndicesExtraKind:this.matricesIndicesExtra=e;break;case he.VertexBuffer.MatricesWeightsExtraKind:this.matricesWeightsExtra=e}},q.prototype.applyToMesh=function(e,t){return this._applyTo(e,t),this},q.prototype.applyToGeometry=function(e,t){return this._applyTo(e,t),this},q.prototype.updateMesh=function(e,t,i){return this._update(e),this},q.prototype.updateGeometry=function(e,t,i){return this._update(e),this},q.prototype._applyTo=function(e,t){return void 0===t&&(t=!1),this.positions&&e.setVerticesData(he.VertexBuffer.PositionKind,this.positions,t),this.normals&&e.setVerticesData(he.VertexBuffer.NormalKind,this.normals,t),this.tangents&&e.setVerticesData(he.VertexBuffer.TangentKind,this.tangents,t),this.uvs&&e.setVerticesData(he.VertexBuffer.UVKind,this.uvs,t),this.uvs2&&e.setVerticesData(he.VertexBuffer.UV2Kind,this.uvs2,t),this.uvs3&&e.setVerticesData(he.VertexBuffer.UV3Kind,this.uvs3,t),this.uvs4&&e.setVerticesData(he.VertexBuffer.UV4Kind,this.uvs4,t),this.uvs5&&e.setVerticesData(he.VertexBuffer.UV5Kind,this.uvs5,t),this.uvs6&&e.setVerticesData(he.VertexBuffer.UV6Kind,this.uvs6,t),this.colors&&e.setVerticesData(he.VertexBuffer.ColorKind,this.colors,t),this.matricesIndices&&e.setVerticesData(he.VertexBuffer.MatricesIndicesKind,this.matricesIndices,t),this.matricesWeights&&e.setVerticesData(he.VertexBuffer.MatricesWeightsKind,this.matricesWeights,t),this.matricesIndicesExtra&&e.setVerticesData(he.VertexBuffer.MatricesIndicesExtraKind,this.matricesIndicesExtra,t),this.matricesWeightsExtra&&e.setVerticesData(he.VertexBuffer.MatricesWeightsExtraKind,this.matricesWeightsExtra,t),this.indices?e.setIndices(this.indices,null,t):e.setIndices([],null),this},q.prototype._update=function(e,t,i){return this.positions&&e.updateVerticesData(he.VertexBuffer.PositionKind,this.positions,t,i),this.normals&&e.updateVerticesData(he.VertexBuffer.NormalKind,this.normals,t,i),this.tangents&&e.updateVerticesData(he.VertexBuffer.TangentKind,this.tangents,t,i),this.uvs&&e.updateVerticesData(he.VertexBuffer.UVKind,this.uvs,t,i),this.uvs2&&e.updateVerticesData(he.VertexBuffer.UV2Kind,this.uvs2,t,i),this.uvs3&&e.updateVerticesData(he.VertexBuffer.UV3Kind,this.uvs3,t,i),this.uvs4&&e.updateVerticesData(he.VertexBuffer.UV4Kind,this.uvs4,t,i),this.uvs5&&e.updateVerticesData(he.VertexBuffer.UV5Kind,this.uvs5,t,i),this.uvs6&&e.updateVerticesData(he.VertexBuffer.UV6Kind,this.uvs6,t,i),this.colors&&e.updateVerticesData(he.VertexBuffer.ColorKind,this.colors,t,i),this.matricesIndices&&e.updateVerticesData(he.VertexBuffer.MatricesIndicesKind,this.matricesIndices,t,i),this.matricesWeights&&e.updateVerticesData(he.VertexBuffer.MatricesWeightsKind,this.matricesWeights,t,i),this.matricesIndicesExtra&&e.updateVerticesData(he.VertexBuffer.MatricesIndicesExtraKind,this.matricesIndicesExtra,t,i),this.matricesWeightsExtra&&e.updateVerticesData(he.VertexBuffer.MatricesWeightsExtraKind,this.matricesWeightsExtra,t,i),this.indices&&e.setIndices(this.indices,null),this},q.prototype.transform=function(e){var t,i=e.m[0]*e.m[5]*e.m[10]<0,r=he.Vector3.Zero();if(this.positions){var n=he.Vector3.Zero();for(t=0;t<this.positions.length;t+=3)he.Vector3.FromArrayToRef(this.positions,t,n),he.Vector3.TransformCoordinatesToRef(n,e,r),this.positions[t]=r.x,this.positions[t+1]=r.y,this.positions[t+2]=r.z}if(this.normals){var o=he.Vector3.Zero();for(t=0;t<this.normals.length;t+=3)he.Vector3.FromArrayToRef(this.normals,t,o),he.Vector3.TransformNormalToRef(o,e,r),this.normals[t]=r.x,this.normals[t+1]=r.y,this.normals[t+2]=r.z}if(this.tangents){var s=he.Vector4.Zero(),a=he.Vector4.Zero();for(t=0;t<this.tangents.length;t+=4)he.Vector4.FromArrayToRef(this.tangents,t,s),he.Vector4.TransformNormalToRef(s,e,a),this.tangents[t]=a.x,this.tangents[t+1]=a.y,this.tangents[t+2]=a.z,this.tangents[t+3]=a.w}if(i&&this.indices)for(t=0;t<this.indices.length;t+=3){var l=this.indices[t+1];this.indices[t+1]=this.indices[t+2],this.indices[t+2]=l}return this},q.prototype.merge=function(e,t){if(void 0===t&&(t=!1),this._validate(),e._validate(),!this.normals!=!e.normals||!this.tangents!=!e.tangents||!this.uvs!=!e.uvs||!this.uvs2!=!e.uvs2||!this.uvs3!=!e.uvs3||!this.uvs4!=!e.uvs4||!this.uvs5!=!e.uvs5||!this.uvs6!=!e.uvs6||!this.colors!=!e.colors||!this.matricesIndices!=!e.matricesIndices||!this.matricesWeights!=!e.matricesWeights||!this.matricesIndicesExtra!=!e.matricesIndicesExtra||!this.matricesWeightsExtra!=!e.matricesWeightsExtra)throw new Error(\"Cannot merge vertex data that do not have the same set of attributes\");if(e.indices){this.indices||(this.indices=[]);var i=this.positions?this.positions.length/3:0;if(void 0!==this.indices.BYTES_PER_ELEMENT){var r=this.indices.length+e.indices.length,n=t||this.indices instanceof Uint32Array?new Uint32Array(r):new Uint16Array(r);n.set(this.indices);for(var o=this.indices.length,s=0;s<e.indices.length;s++)n[o+s]=e.indices[s]+i;this.indices=n}else for(s=0;s<e.indices.length;s++)this.indices.push(e.indices[s]+i)}return this.positions=this._mergeElement(this.positions,e.positions),this.normals=this._mergeElement(this.normals,e.normals),this.tangents=this._mergeElement(this.tangents,e.tangents),this.uvs=this._mergeElement(this.uvs,e.uvs),this.uvs2=this._mergeElement(this.uvs2,e.uvs2),this.uvs3=this._mergeElement(this.uvs3,e.uvs3),this.uvs4=this._mergeElement(this.uvs4,e.uvs4),this.uvs5=this._mergeElement(this.uvs5,e.uvs5),this.uvs6=this._mergeElement(this.uvs6,e.uvs6),this.colors=this._mergeElement(this.colors,e.colors),this.matricesIndices=this._mergeElement(this.matricesIndices,e.matricesIndices),this.matricesWeights=this._mergeElement(this.matricesWeights,e.matricesWeights),this.matricesIndicesExtra=this._mergeElement(this.matricesIndicesExtra,e.matricesIndicesExtra),this.matricesWeightsExtra=this._mergeElement(this.matricesWeightsExtra,e.matricesWeightsExtra),this},q.prototype._mergeElement=function(e,t){if(!e)return t;if(!t)return e;var i=t.length+e.length,r=e instanceof Float32Array,n=t instanceof Float32Array;if(r){var o=new Float32Array(i);return o.set(e),o.set(t,e.length),o}if(n){var s=e.slice(0),a=0;for(i=t.length;a<i;a++)s.push(t[a]);return s}return e.concat(t)},q.prototype._validate=function(){if(!this.positions)throw new Error(\"Positions are required\");var r=function(e,t){var i=he.VertexBuffer.DeduceStride(e);if(t.length%i!=0)throw new Error(\"The \"+e+\"s array count must be a multiple of \"+i);return t.length/i},n=r(he.VertexBuffer.PositionKind,this.positions),e=function(e,t){var i=r(e,t);if(i!==n)throw new Error(\"The \"+e+\"s element count (\"+i+\") does not match the positions count (\"+n+\")\")};this.normals&&e(he.VertexBuffer.NormalKind,this.normals),this.tangents&&e(he.VertexBuffer.TangentKind,this.tangents),this.uvs&&e(he.VertexBuffer.UVKind,this.uvs),this.uvs2&&e(he.VertexBuffer.UV2Kind,this.uvs2),this.uvs3&&e(he.VertexBuffer.UV3Kind,this.uvs3),this.uvs4&&e(he.VertexBuffer.UV4Kind,this.uvs4),this.uvs5&&e(he.VertexBuffer.UV5Kind,this.uvs5),this.uvs6&&e(he.VertexBuffer.UV6Kind,this.uvs6),this.colors&&e(he.VertexBuffer.ColorKind,this.colors),this.matricesIndices&&e(he.VertexBuffer.MatricesIndicesKind,this.matricesIndices),this.matricesWeights&&e(he.VertexBuffer.MatricesWeightsKind,this.matricesWeights),this.matricesIndicesExtra&&e(he.VertexBuffer.MatricesIndicesExtraKind,this.matricesIndicesExtra),this.matricesWeightsExtra&&e(he.VertexBuffer.MatricesWeightsExtraKind,this.matricesWeightsExtra)},q.prototype.serialize=function(){var e=this.serialize();return this.positions&&(e.positions=this.positions),this.normals&&(e.normals=this.normals),this.tangents&&(e.tangents=this.tangents),this.uvs&&(e.uvs=this.uvs),this.uvs2&&(e.uvs2=this.uvs2),this.uvs3&&(e.uvs3=this.uvs3),this.uvs4&&(e.uvs4=this.uvs4),this.uvs5&&(e.uvs5=this.uvs5),this.uvs6&&(e.uvs6=this.uvs6),this.colors&&(e.colors=this.colors),this.matricesIndices&&(e.matricesIndices=this.matricesIndices,e.matricesIndices._isExpanded=!0),this.matricesWeights&&(e.matricesWeights=this.matricesWeights),this.matricesIndicesExtra&&(e.matricesIndicesExtra=this.matricesIndicesExtra,e.matricesIndicesExtra._isExpanded=!0),this.matricesWeightsExtra&&(e.matricesWeightsExtra=this.matricesWeightsExtra),e.indices=this.indices,e},q.ExtractFromMesh=function(e,t,i){return q._ExtractFrom(e,t,i)},q.ExtractFromGeometry=function(e,t,i){return q._ExtractFrom(e,t,i)},q._ExtractFrom=function(e,t,i){var r=new q;return e.isVerticesDataPresent(he.VertexBuffer.PositionKind)&&(r.positions=e.getVerticesData(he.VertexBuffer.PositionKind,t,i)),e.isVerticesDataPresent(he.VertexBuffer.NormalKind)&&(r.normals=e.getVerticesData(he.VertexBuffer.NormalKind,t,i)),e.isVerticesDataPresent(he.VertexBuffer.TangentKind)&&(r.tangents=e.getVerticesData(he.VertexBuffer.TangentKind,t,i)),e.isVerticesDataPresent(he.VertexBuffer.UVKind)&&(r.uvs=e.getVerticesData(he.VertexBuffer.UVKind,t,i)),e.isVerticesDataPresent(he.VertexBuffer.UV2Kind)&&(r.uvs2=e.getVerticesData(he.VertexBuffer.UV2Kind,t,i)),e.isVerticesDataPresent(he.VertexBuffer.UV3Kind)&&(r.uvs3=e.getVerticesData(he.VertexBuffer.UV3Kind,t,i)),e.isVerticesDataPresent(he.VertexBuffer.UV4Kind)&&(r.uvs4=e.getVerticesData(he.VertexBuffer.UV4Kind,t,i)),e.isVerticesDataPresent(he.VertexBuffer.UV5Kind)&&(r.uvs5=e.getVerticesData(he.VertexBuffer.UV5Kind,t,i)),e.isVerticesDataPresent(he.VertexBuffer.UV6Kind)&&(r.uvs6=e.getVerticesData(he.VertexBuffer.UV6Kind,t,i)),e.isVerticesDataPresent(he.VertexBuffer.ColorKind)&&(r.colors=e.getVerticesData(he.VertexBuffer.ColorKind,t,i)),e.isVerticesDataPresent(he.VertexBuffer.MatricesIndicesKind)&&(r.matricesIndices=e.getVerticesData(he.VertexBuffer.MatricesIndicesKind,t,i)),e.isVerticesDataPresent(he.VertexBuffer.MatricesWeightsKind)&&(r.matricesWeights=e.getVerticesData(he.VertexBuffer.MatricesWeightsKind,t,i)),e.isVerticesDataPresent(he.VertexBuffer.MatricesIndicesExtraKind)&&(r.matricesIndicesExtra=e.getVerticesData(he.VertexBuffer.MatricesIndicesExtraKind,t,i)),e.isVerticesDataPresent(he.VertexBuffer.MatricesWeightsExtraKind)&&(r.matricesWeightsExtra=e.getVerticesData(he.VertexBuffer.MatricesWeightsExtraKind,t,i)),r.indices=e.getIndices(t,i),r},q.CreateRibbon=function(e){var t=e.pathArray,i=e.closeArray||!1,r=e.closePath||!1,n=e.invertUV||!1,o=Math.floor(t[0].length/2),s=e.offset||o;s=o<s?o:Math.floor(s);var a,l,c,h,u=0===e.sideOrientation?0:e.sideOrientation||he.Mesh.DEFAULTSIDE,d=e.uvs,f=e.colors,p=[],_=[],m=[],g=[],v=[],y=[],b=[],T=[],E=[],x=[];if(t.length<2){var P=[],A=[];for(c=0;c<t[0].length-s;c++)P.push(t[0][c]),A.push(t[0][c+s]);t=[P,A]}var S,M,R,C,O,D=0,I=r?1:0;for(a=t[0].length,l=0;l<t.length;l++){for(b[l]=0,v[l]=[0],a=a<(M=(S=t[l]).length)?a:M,h=0;h<M;)p.push(S[h].x,S[h].y,S[h].z),0<h&&(R=S[h].subtract(S[h-1]).length()+b[l],v[l].push(R),b[l]=R),h++;r&&(h--,p.push(S[0].x,S[0].y,S[0].z),R=S[h].subtract(S[0]).length()+b[l],v[l].push(R),b[l]=R),E[l]=M+I,x[l]=D,D+=M+I}var w,L,F=null,B=null;for(c=0;c<a+I;c++){for(T[c]=0,y[c]=[0],l=0;l<t.length-1;l++)C=t[l],O=t[l+1],c===a?(F=C[0],B=O[0]):(F=C[c],B=O[c]),R=B.subtract(F).length()+T[c],y[c].push(R),T[c]=R;i&&B&&F&&(C=t[l],O=t[0],c===a&&(B=O[0]),R=B.subtract(F).length()+T[c],T[c]=R)}if(d)for(l=0;l<d.length;l++)g.push(d[l].x,d[l].y);else for(l=0;l<t.length;l++)for(c=0;c<a+I;c++)w=0!=b[l]?v[l][c]/b[l]:0,L=0!=T[c]?y[c][l]/T[c]:0,n?g.push(L,w):g.push(w,L);for(var N=l=0,V=E[l]-1,U=E[l+1]-1,z=V<U?V:U,G=x[1]-x[0],k=i?E.length:E.length-1;N<=z&&l<k;)_.push(N,N+G,N+1),_.push(N+G+1,N+1,N+G),(N+=1)===z&&(++l===E.length-1?(G=x[0]-x[l],V=E[l]-1,U=E[0]-1):(G=x[l+1]-x[l],V=E[l]-1,U=E[l+1]-1),N=x[l],z=V<U?V+N:U+N);if(q.ComputeNormals(p,_,m),r){var W=0,H=0;for(l=0;l<t.length;l++)W=3*x[l],H=l+1<t.length?3*(x[l+1]-1):m.length-3,m[W]=.5*(m[W]+m[H]),m[W+1]=.5*(m[W+1]+m[H+1]),m[W+2]=.5*(m[W+2]+m[H+2]),m[H]=m[W],m[H+1]=m[W+1],m[H+2]=m[W+2]}q._ComputeSides(u,p,_,m,g,e.frontUVs,e.backUVs);var X=null;if(f){X=new Float32Array(4*f.length);for(var j=0;j<f.length;j++)X[4*j]=f[j].r,X[4*j+1]=f[j].g,X[4*j+2]=f[j].b,X[4*j+3]=f[j].a}var Y=new q,K=new Float32Array(p),Q=new Float32Array(m),Z=new Float32Array(g);return Y.indices=_,Y.positions=K,Y.normals=Q,Y.uvs=Z,X&&Y.set(X,he.VertexBuffer.ColorKind),r&&(Y._idx=x),Y},q.CreateBox=function(e){for(var t=[new he.Vector3(0,0,1),new he.Vector3(0,0,-1),new he.Vector3(1,0,0),new he.Vector3(-1,0,0),new he.Vector3(0,1,0),new he.Vector3(0,-1,0)],i=[],r=[],n=[],o=[],s=e.width||e.size||1,a=e.height||e.size||1,l=e.depth||e.size||1,c=0===e.sideOrientation?0:e.sideOrientation||he.Mesh.DEFAULTSIDE,h=e.faceUV||new Array(6),u=e.faceColors,d=[],f=0;f<6;f++)void 0===h[f]&&(h[f]=new he.Vector4(0,0,1,1)),u&&void 0===u[f]&&(u[f]=new he.Color4(1,1,1,1));for(var p=new he.Vector3(s/2,a/2,l/2),_=0;_<t.length;_++){var m=t[_],g=new he.Vector3(m.y,m.z,m.x),v=he.Vector3.Cross(m,g),y=r.length/3;i.push(y),i.push(y+1),i.push(y+2),i.push(y),i.push(y+2),i.push(y+3);var b=m.subtract(g).subtract(v).multiply(p);r.push(b.x,b.y,b.z),n.push(m.x,m.y,m.z),o.push(h[_].z,h[_].w),u&&d.push(u[_].r,u[_].g,u[_].b,u[_].a),b=m.subtract(g).add(v).multiply(p),r.push(b.x,b.y,b.z),n.push(m.x,m.y,m.z),o.push(h[_].x,h[_].w),u&&d.push(u[_].r,u[_].g,u[_].b,u[_].a),b=m.add(g).add(v).multiply(p),r.push(b.x,b.y,b.z),n.push(m.x,m.y,m.z),o.push(h[_].x,h[_].y),u&&d.push(u[_].r,u[_].g,u[_].b,u[_].a),b=m.add(g).subtract(v).multiply(p),r.push(b.x,b.y,b.z),n.push(m.x,m.y,m.z),o.push(h[_].z,h[_].y),u&&d.push(u[_].r,u[_].g,u[_].b,u[_].a)}q._ComputeSides(c,r,i,n,o,e.frontUVs,e.backUVs);var T=new q;if(T.indices=i,T.positions=r,T.normals=n,T.uvs=o,u){var E=c===he.Mesh.DOUBLESIDE?d.concat(d):d;T.colors=E}return T},q.CreateSphere=function(e){for(var t=e.segments||32,i=e.diameterX||e.diameter||1,r=e.diameterY||e.diameter||1,n=e.diameterZ||e.diameter||1,o=e.arc&&(e.arc<=0||1<e.arc)?1:e.arc||1,s=e.slice&&e.slice<=0?1:e.slice||1,a=0===e.sideOrientation?0:e.sideOrientation||he.Mesh.DEFAULTSIDE,l=new he.Vector3(i/2,r/2,n/2),c=2+t,h=2*c,u=[],d=[],f=[],p=[],_=0;_<=c;_++){for(var m=_/c,g=m*Math.PI*s,v=0;v<=h;v++){var y=v/h,b=y*Math.PI*2*o,T=he.Matrix.RotationZ(-g),E=he.Matrix.RotationY(b),x=he.Vector3.TransformCoordinates(he.Vector3.Up(),T),P=he.Vector3.TransformCoordinates(x,E),A=P.multiply(l),S=P.divide(l).normalize();d.push(A.x,A.y,A.z),f.push(S.x,S.y,S.z),p.push(y,m)}if(0<_)for(var M=d.length/3,R=M-2*(h+1);R+h+2<M;R++)u.push(R),u.push(R+1),u.push(R+h+1),u.push(R+h+1),u.push(R+1),u.push(R+h+2)}q._ComputeSides(a,d,u,f,p,e.frontUVs,e.backUVs);var C=new q;return C.indices=u,C.positions=d,C.normals=f,C.uvs=p,C},q.CreateCylinder=function(e){var t,p=e.height||2,_=0===e.diameterTop?0:e.diameterTop||e.diameter||1,m=0===e.diameterBottom?0:e.diameterBottom||e.diameter||1,g=e.tessellation||24,i=e.subdivisions||1,r=!!e.hasRings,n=!!e.enclose,v=e.arc&&(e.arc<=0||1<e.arc)?1:e.arc||1,o=0===e.sideOrientation?0:e.sideOrientation||he.Mesh.DEFAULTSIDE,y=e.faceUV||new Array(3),b=e.faceColors,T=2+(1+(1!==v&&n?2:0))*(r?i:1);for(t=0;t<T;t++)b&&void 0===b[t]&&(b[t]=new he.Color4(1,1,1,1));for(t=0;t<T;t++)y&&void 0===y[t]&&(y[t]=new he.Vector4(0,0,1,1));var s,a,l,c,h,u,E=new Array,x=new Array,P=new Array,A=new Array,S=new Array,d=2*Math.PI*v/g,f=(m-_)/2/p,M=he.Vector3.Zero(),R=he.Vector3.Zero(),C=he.Vector3.Zero(),O=he.Vector3.Zero(),D=he.Vector3.Zero(),I=he.Axis.Y,w=1,L=1,F=0,B=0;for(c=0;c<=i;c++)for(l=((a=c/i)*(_-m)+m)/2,w=r&&0!==c&&c!==i?2:1,u=0;u<w;u++){for(r&&(L+=u),n&&(L+=2*u),h=0;h<=g;h++)s=h*d,M.x=Math.cos(-s)*l,M.y=-p/2+a*p,M.z=Math.sin(-s)*l,0===_&&c===i?(R.x=P[P.length-3*(g+1)],R.y=P[P.length-3*(g+1)+1],R.z=P[P.length-3*(g+1)+2]):(R.x=M.x,R.z=M.z,R.y=Math.sqrt(R.x*R.x+R.z*R.z)*f,R.normalize()),0===h&&(C.copyFrom(M),O.copyFrom(R)),x.push(M.x,M.y,M.z),P.push(R.x,R.y,R.z),B=r?F!==L?y[L].y:y[L].w:y[L].y+(y[L].w-y[L].y)*a,A.push(y[L].x+(y[L].z-y[L].x)*h/g,B),b&&S.push(b[L].r,b[L].g,b[L].b,b[L].a);1!==v&&n&&(x.push(M.x,M.y,M.z),x.push(0,M.y,0),x.push(0,M.y,0),x.push(C.x,C.y,C.z),he.Vector3.CrossToRef(I,R,D),D.normalize(),P.push(D.x,D.y,D.z,D.x,D.y,D.z),he.Vector3.CrossToRef(O,I,D),D.normalize(),P.push(D.x,D.y,D.z,D.x,D.y,D.z),B=r?F!==L?y[L+1].y:y[L+1].w:y[L+1].y+(y[L+1].w-y[L+1].y)*a,A.push(y[L+1].x,B),A.push(y[L+1].z,B),B=r?F!==L?y[L+2].y:y[L+2].w:y[L+2].y+(y[L+2].w-y[L+2].y)*a,A.push(y[L+2].x,B),A.push(y[L+2].z,B),b&&(S.push(b[L+1].r,b[L+1].g,b[L+1].b,b[L+1].a),S.push(b[L+1].r,b[L+1].g,b[L+1].b,b[L+1].a),S.push(b[L+2].r,b[L+2].g,b[L+2].b,b[L+2].a),S.push(b[L+2].r,b[L+2].g,b[L+2].b,b[L+2].a))),F!==L&&(F=L)}var N=1!==v&&n?g+4:g;for(L=c=0;L<i;L++){var V=0,U=0,z=0,G=0;for(h=0;h<g;h++)V=c*(N+1)+h,U=(c+1)*(N+1)+h,z=c*(N+1)+(h+1),G=(c+1)*(N+1)+(h+1),E.push(V,U,z),E.push(G,z,U);1!==v&&n&&(E.push(V+2,U+2,z+2),E.push(G+2,z+2,U+2),E.push(V+4,U+4,z+4),E.push(G+4,z+4,U+4)),c=r?c+2:c+1}var k=function(e){var t=e?_/2:m/2;if(0!==t){var i,r,n,o=e?y[T-1]:y[0],s=null;b&&(s=e?b[T-1]:b[0]);var a=x.length/3,l=e?p/2:-p/2,c=new he.Vector3(0,l,0);x.push(c.x,c.y,c.z),P.push(0,e?1:-1,0),A.push(o.x+.5*(o.z-o.x),o.y+.5*(o.w-o.y)),s&&S.push(s.r,s.g,s.b,s.a);var h=new he.Vector2(.5,.5);for(n=0;n<=g;n++){i=2*Math.PI*n*v/g;var u=Math.cos(-i),d=Math.sin(-i);r=new he.Vector3(u*t,l,d*t);var f=new he.Vector2(u*h.x+.5,d*h.y+.5);x.push(r.x,r.y,r.z),P.push(0,e?1:-1,0),A.push(o.x+(o.z-o.x)*f.x,o.y+(o.w-o.y)*f.y),s&&S.push(s.r,s.g,s.b,s.a)}for(n=0;n<g;n++)e?(E.push(a),E.push(a+(n+2)),E.push(a+(n+1))):(E.push(a),E.push(a+(n+1)),E.push(a+(n+2)))}};k(!1),k(!0),q._ComputeSides(o,x,E,P,A,e.frontUVs,e.backUVs);var W=new q;return W.indices=E,W.positions=x,W.normals=P,W.uvs=A,b&&(W.colors=S),W},q.CreateTorus=function(e){for(var t=[],i=[],r=[],n=[],o=e.diameter||1,s=e.thickness||.5,a=e.tessellation||16,l=0===e.sideOrientation?0:e.sideOrientation||he.Mesh.DEFAULTSIDE,c=a+1,h=0;h<=a;h++)for(var u=h/a,d=h*Math.PI*2/a-Math.PI/2,f=he.Matrix.Translation(o/2,0,0).multiply(he.Matrix.RotationY(d)),p=0;p<=a;p++){var _=1-p/a,m=p*Math.PI*2/a+Math.PI,g=Math.cos(m),v=Math.sin(m),y=new he.Vector3(g,v,0),b=y.scale(s/2),T=new he.Vector2(u,_);b=he.Vector3.TransformCoordinates(b,f),y=he.Vector3.TransformNormal(y,f),i.push(b.x,b.y,b.z),r.push(y.x,y.y,y.z),n.push(T.x,T.y);var E=(h+1)%c,x=(p+1)%c;t.push(h*c+p),t.push(h*c+x),t.push(E*c+p),t.push(h*c+x),t.push(E*c+x),t.push(E*c+p)}q._ComputeSides(l,i,t,r,n,e.frontUVs,e.backUVs);var P=new q;return P.indices=t,P.positions=i,P.normals=r,P.uvs=n,P},q.CreateLineSystem=function(e){for(var t=[],i=[],r=e.lines,n=e.colors,o=[],s=0,a=0;a<r.length;a++)for(var l=r[a],c=0;c<l.length;c++){if(i.push(l[c].x,l[c].y,l[c].z),n){var h=n[a];o.push(h[c].r,h[c].g,h[c].b,h[c].a)}0<c&&(t.push(s-1),t.push(s)),s++}var u=new q;return u.indices=t,u.positions=i,n&&(u.colors=o),u},q.CreateDashedLines=function(e){var t,i,r=e.dashSize||3,n=e.gapSize||1,o=e.dashNb||200,s=e.points,a=new Array,l=new Array,c=he.Vector3.Zero(),h=0,u=0,d=0,f=0,p=0;for(p=0;p<s.length-1;p++)s[p+1].subtractToRef(s[p],c),h+=c.length();for(i=r*(t=h/o)/(r+n),p=0;p<s.length-1;p++){s[p+1].subtractToRef(s[p],c),u=Math.floor(c.length()/t),c.normalize();for(var _=0;_<u;_++)d=t*_,a.push(s[p].x+d*c.x,s[p].y+d*c.y,s[p].z+d*c.z),a.push(s[p].x+(d+i)*c.x,s[p].y+(d+i)*c.y,s[p].z+(d+i)*c.z),l.push(f,f+1),f+=2}var m=new q;return m.positions=a,m.indices=l,m},q.CreateGround=function(e){var t,i,r=[],n=[],o=[],s=[],a=e.width||1,l=e.height||1,c=e.subdivisionsX||e.subdivisions||1,h=e.subdivisionsY||e.subdivisions||1;for(t=0;t<=h;t++)for(i=0;i<=c;i++){var u=new he.Vector3(i*a/c-a/2,0,(h-t)*l/h-l/2),d=new he.Vector3(0,1,0);n.push(u.x,u.y,u.z),o.push(d.x,d.y,d.z),s.push(i/c,1-t/h)}for(t=0;t<h;t++)for(i=0;i<c;i++)r.push(i+1+(t+1)*(c+1)),r.push(i+1+t*(c+1)),r.push(i+t*(c+1)),r.push(i+(t+1)*(c+1)),r.push(i+1+(t+1)*(c+1)),r.push(i+t*(c+1));var f=new q;return f.indices=r,f.positions=n,f.normals=o,f.uvs=s,f},q.CreateTiledGround=function(e){var c,h,t,i,r=void 0!==e.xmin&&null!==e.xmin?e.xmin:-1,n=void 0!==e.zmin&&null!==e.zmin?e.zmin:-1,o=void 0!==e.xmax&&null!==e.xmax?e.xmax:1,s=void 0!==e.zmax&&null!==e.zmax?e.zmax:1,a=e.subdivisions||{w:1,h:1},u=e.precision||{w:1,h:1},d=new Array,f=new Array,p=new Array,_=new Array;a.h=a.h<1?1:a.h,a.w=a.w<1?1:a.w,u.w=u.w<1?1:u.w,u.h=u.h<1?1:u.h;var l=(o-r)/a.w,m=(s-n)/a.h;function g(e,t,i,r){var n=f.length/3,o=u.w+1;for(c=0;c<u.h;c++)for(h=0;h<u.w;h++){var s=[n+h+c*o,n+(h+1)+c*o,n+(h+1)+(c+1)*o,n+h+(c+1)*o];d.push(s[1]),d.push(s[2]),d.push(s[3]),d.push(s[0]),d.push(s[1]),d.push(s[3])}var a=he.Vector3.Zero(),l=new he.Vector3(0,1,0);for(c=0;c<=u.h;c++)for(a.z=c*(r-t)/u.h+t,h=0;h<=u.w;h++)a.x=h*(i-e)/u.w+e,a.y=0,f.push(a.x,a.y,a.z),p.push(l.x,l.y,l.z),_.push(h/u.w,c/u.h)}for(t=0;t<a.h;t++)for(i=0;i<a.w;i++)g(r+i*l,n+t*m,r+(i+1)*l,n+(t+1)*m);var v=new q;return v.indices=d,v.positions=f,v.normals=p,v.uvs=_,v},q.CreateGroundFromHeightMap=function(e){var t,i,r=[],n=[],o=[],s=[],a=e.colorFilter||new he.Color3(.3,.59,.11),l=e.alphaFilter||0;for(t=0;t<=e.subdivisions;t++)for(i=0;i<=e.subdivisions;i++){var c=new he.Vector3(i*e.width/e.subdivisions-e.width/2,0,(e.subdivisions-t)*e.height/e.subdivisions-e.height/2),h=4*(((c.x+e.width/2)/e.width*(e.bufferWidth-1)|0)+((1-(c.z+e.height/2)/e.height)*(e.bufferHeight-1)|0)*e.bufferWidth),u=e.buffer[h]/255,d=e.buffer[h+1]/255,f=e.buffer[h+2]/255,p=e.buffer[h+3]/255,_=u*a.r+d*a.g+f*a.b;c.y=l<=p?e.minHeight+(e.maxHeight-e.minHeight)*_:e.minHeight-he.Epsilon,n.push(c.x,c.y,c.z),o.push(0,0,0),s.push(i/e.subdivisions,1-t/e.subdivisions)}for(t=0;t<e.subdivisions;t++)for(i=0;i<e.subdivisions;i++){var m=i+1+(t+1)*(e.subdivisions+1),g=i+1+t*(e.subdivisions+1),v=i+t*(e.subdivisions+1),y=i+(t+1)*(e.subdivisions+1),b=n[3*m+1]>=e.minHeight,T=n[3*g+1]>=e.minHeight,E=n[3*v+1]>=e.minHeight;b&&T&&E&&(r.push(m),r.push(g),r.push(v)),n[3*y+1]>=e.minHeight&&b&&E&&(r.push(y),r.push(m),r.push(v))}q.ComputeNormals(n,r,o);var x=new q;return x.indices=r,x.positions=n,x.normals=o,x.uvs=s,x},q.CreatePlane=function(e){var t=[],i=[],r=[],n=[],o=e.width||e.size||1,s=e.height||e.size||1,a=0===e.sideOrientation?0:e.sideOrientation||he.Mesh.DEFAULTSIDE,l=o/2,c=s/2;i.push(-l,-c,0),r.push(0,0,-1),n.push(0,0),i.push(l,-c,0),r.push(0,0,-1),n.push(1,0),i.push(l,c,0),r.push(0,0,-1),n.push(1,1),i.push(-l,c,0),r.push(0,0,-1),n.push(0,1),t.push(0),t.push(1),t.push(2),t.push(0),t.push(2),t.push(3),q._ComputeSides(a,i,t,r,n,e.frontUVs,e.backUVs);var h=new q;return h.indices=t,h.positions=i,h.normals=r,h.uvs=n,h},q.CreateDisc=function(e){var t=new Array,i=new Array,r=new Array,n=new Array,o=e.radius||.5,s=e.tessellation||64,a=e.arc&&(e.arc<=0||1<e.arc)?1:e.arc||1,l=0===e.sideOrientation?0:e.sideOrientation||he.Mesh.DEFAULTSIDE;t.push(0,0,0),n.push(.5,.5);for(var c=2*Math.PI*a,h=c/s,u=0;u<c;u+=h){var d=Math.cos(u),f=Math.sin(u),p=(d+1)/2,_=(1-f)/2;t.push(o*d,o*f,0),n.push(p,_)}1===a&&(t.push(t[3],t[4],t[5]),n.push(n[2],n[3]));for(var m=t.length/3,g=1;g<m-1;g++)i.push(g+1,0,g);q.ComputeNormals(t,i,r),q._ComputeSides(l,t,i,r,n,e.frontUVs,e.backUVs);var v=new q;return v.indices=i,v.positions=t,v.normals=r,v.uvs=n,v},q.CreatePolygon=function(e,t,i,r,n,o){for(var s=i||new Array(3),a=r,l=[],c=0;c<3;c++)void 0===s[c]&&(s[c]=new he.Vector4(0,0,1,1)),a&&void 0===a[c]&&(a[c]=new he.Color4(1,1,1,1));for(var h=e.getVerticesData(he.VertexBuffer.PositionKind),u=e.getVerticesData(he.VertexBuffer.NormalKind),d=e.getVerticesData(he.VertexBuffer.UVKind),f=e.getIndices(),p=0,_=0,m=0;m<u.length;m+=3)Math.abs(u[m+1])<.001&&(_=1),Math.abs(u[m+1]-1)<.001&&(_=0),Math.abs(u[m+1]+1)<.001&&(_=2),d[2*(p=m/3)]=(1-d[2*p])*s[_].x+d[2*p]*s[_].z,d[2*p+1]=(1-d[2*p+1])*s[_].y+d[2*p+1]*s[_].w,a&&l.push(a[_].r,a[_].g,a[_].b,a[_].a);q._ComputeSides(t,h,f,u,d,n,o);var g=new q;if(g.indices=f,g.positions=h,g.normals=u,g.uvs=d,a){var v=t===he.Mesh.DOUBLESIDE?l.concat(l):l;g.colors=v}return g},q.CreateIcoSphere=function(e){var t,i=e.sideOrientation||he.Mesh.DEFAULTSIDE,r=e.radius||1,f=void 0===e.flat||e.flat,p=e.subdivisions||4,_=e.radiusX||r,m=e.radiusY||r,g=e.radiusZ||r,n=(1+Math.sqrt(5))/2,o=[-1,n,-0,1,n,0,-1,-n,0,1,-n,0,0,-1,-n,0,1,-n,0,-1,n,0,1,n,n,0,1,n,0,-1,-n,0,1,-n,0,-1],s=[0,11,5,0,5,1,0,1,7,0,7,10,12,22,23,1,5,20,5,11,4,23,22,13,22,18,6,7,1,8,14,21,4,14,4,2,16,13,6,15,6,19,3,8,9,4,21,5,13,17,23,6,13,22,19,6,18,9,8,1],a=[0,1,2,3,4,5,6,7,8,9,10,11,0,2,3,3,3,4,7,8,9,9,10,11],l=[5,1,3,1,6,4,0,0,5,3,4,2,2,2,4,0,2,0,1,1,6,0,6,2,0,4,3,3,4,4,3,1,4,2,4,4,0,2,1,1,2,2,3,3,1,3,2,4],c=[0,0,0,0,1,0,0,1,1,0,0,0,1,1,0,0,1,1,1,0],v=new Array,y=new Array,b=new Array,T=new Array,E=0,x=new Array(3),P=new Array(3);for(t=0;t<3;t++)x[t]=he.Vector3.Zero(),P[t]=he.Vector2.Zero();for(var h=0;h<20;h++){for(t=0;t<3;t++){var u=s[3*h+t];x[t].copyFromFloats(o[3*a[u]],o[3*a[u]+1],o[3*a[u]+2]),x[t].normalize().scaleInPlace(r),P[t].copyFromFloats(l[2*u]*(138/1024)+60/1024+c[h]*(-40/1024),l[2*u+1]*(239/1024)+26/1024+c[h]*(20/1024))}for(var d=function(e,t,i,r){var n,o=he.Vector3.Lerp(x[0],x[2],t/p),s=he.Vector3.Lerp(x[1],x[2],t/p),a=p===t?x[2]:he.Vector3.Lerp(o,s,e/(p-t));if(a.normalize(),f){var l=he.Vector3.Lerp(x[0],x[2],r/p),c=he.Vector3.Lerp(x[1],x[2],r/p);n=he.Vector3.Lerp(l,c,i/(p-r))}else n=new he.Vector3(a.x,a.y,a.z);n.x/=_,n.y/=m,n.z/=g,n.normalize();var h=he.Vector2.Lerp(P[0],P[2],t/p),u=he.Vector2.Lerp(P[1],P[2],t/p),d=p===t?P[2]:he.Vector2.Lerp(h,u,e/(p-t));y.push(a.x*_,a.y*m,a.z*g),b.push(n.x,n.y,n.z),T.push(d.x,d.y),v.push(E),E++},A=0;A<p;A++)for(var S=0;S+A<p;S++)d(S,A,S+1/3,A+1/3),d(S+1,A,S+1/3,A+1/3),d(S,A+1,S+1/3,A+1/3),S+A+1<p&&(d(S+1,A,S+2/3,A+2/3),d(S+1,A+1,S+2/3,A+2/3),d(S,A+1,S+2/3,A+2/3))}q._ComputeSides(i,y,v,b,T,e.frontUVs,e.backUVs);var M=new q;return M.indices=v,M.positions=y,M.normals=b,M.uvs=T,M},q.CreatePolyhedron=function(e){var t=[];t[0]={vertex:[[0,0,1.732051],[1.632993,0,-.5773503],[-.8164966,1.414214,-.5773503],[-.8164966,-1.414214,-.5773503]],face:[[0,1,2],[0,2,3],[0,3,1],[1,3,2]]},t[1]={vertex:[[0,0,1.414214],[1.414214,0,0],[0,1.414214,0],[-1.414214,0,0],[0,-1.414214,0],[0,0,-1.414214]],face:[[0,1,2],[0,2,3],[0,3,4],[0,4,1],[1,4,5],[1,5,2],[2,5,3],[3,5,4]]},t[2]={vertex:[[0,0,1.070466],[.7136442,0,.7978784],[-.3568221,.618034,.7978784],[-.3568221,-.618034,.7978784],[.7978784,.618034,.3568221],[.7978784,-.618034,.3568221],[-.9341724,.381966,.3568221],[.1362939,1,.3568221],[.1362939,-1,.3568221],[-.9341724,-.381966,.3568221],[.9341724,.381966,-.3568221],[.9341724,-.381966,-.3568221],[-.7978784,.618034,-.3568221],[-.1362939,1,-.3568221],[-.1362939,-1,-.3568221],[-.7978784,-.618034,-.3568221],[.3568221,.618034,-.7978784],[.3568221,-.618034,-.7978784],[-.7136442,0,-.7978784],[0,0,-1.070466]],face:[[0,1,4,7,2],[0,2,6,9,3],[0,3,8,5,1],[1,5,11,10,4],[2,7,13,12,6],[3,9,15,14,8],[4,10,16,13,7],[5,8,14,17,11],[6,12,18,15,9],[10,11,17,19,16],[12,13,16,19,18],[14,15,18,19,17]]},t[3]={vertex:[[0,0,1.175571],[1.051462,0,.5257311],[.3249197,1,.5257311],[-.8506508,.618034,.5257311],[-.8506508,-.618034,.5257311],[.3249197,-1,.5257311],[.8506508,.618034,-.5257311],[.8506508,-.618034,-.5257311],[-.3249197,1,-.5257311],[-1.051462,0,-.5257311],[-.3249197,-1,-.5257311],[0,0,-1.175571]],face:[[0,1,2],[0,2,3],[0,3,4],[0,4,5],[0,5,1],[1,5,7],[1,7,6],[1,6,2],[2,6,8],[2,8,3],[3,8,9],[3,9,4],[4,9,10],[4,10,5],[5,10,7],[6,7,11],[6,11,8],[7,10,11],[8,11,9],[9,11,10]]},t[4]={vertex:[[0,0,1.070722],[.7148135,0,.7971752],[-.104682,.7071068,.7971752],[-.6841528,.2071068,.7971752],[-.104682,-.7071068,.7971752],[.6101315,.7071068,.5236279],[1.04156,.2071068,.1367736],[.6101315,-.7071068,.5236279],[-.3574067,1,.1367736],[-.7888348,-.5,.5236279],[-.9368776,.5,.1367736],[-.3574067,-1,.1367736],[.3574067,1,-.1367736],[.9368776,-.5,-.1367736],[.7888348,.5,-.5236279],[.3574067,-1,-.1367736],[-.6101315,.7071068,-.5236279],[-1.04156,-.2071068,-.1367736],[-.6101315,-.7071068,-.5236279],[.104682,.7071068,-.7971752],[.6841528,-.2071068,-.7971752],[.104682,-.7071068,-.7971752],[-.7148135,0,-.7971752],[0,0,-1.070722]],face:[[0,2,3],[1,6,5],[4,9,11],[7,15,13],[8,16,10],[12,14,19],[17,22,18],[20,21,23],[0,1,5,2],[0,3,9,4],[0,4,7,1],[1,7,13,6],[2,5,12,8],[2,8,10,3],[3,10,17,9],[4,11,15,7],[5,6,14,12],[6,13,20,14],[8,12,19,16],[9,17,18,11],[10,16,22,17],[11,18,21,15],[13,15,21,20],[14,20,23,19],[16,19,23,22],[18,22,23,21]]},t[5]={vertex:[[0,0,1.322876],[1.309307,0,.1889822],[-.9819805,.8660254,.1889822],[.1636634,-1.299038,.1889822],[.3273268,.8660254,-.9449112],[-.8183171,-.4330127,-.9449112]],face:[[0,3,1],[2,4,5],[0,1,4,2],[0,2,5,3],[1,3,5,4]]},t[6]={vertex:[[0,0,1.159953],[1.013464,0,.5642542],[-.3501431,.9510565,.5642542],[-.7715208,-.6571639,.5642542],[.6633206,.9510565,-.03144481],[.8682979,-.6571639,-.3996071],[-1.121664,.2938926,-.03144481],[-.2348831,-1.063314,-.3996071],[.5181548,.2938926,-.9953061],[-.5850262,-.112257,-.9953061]],face:[[0,1,4,2],[0,2,6,3],[1,5,8,4],[3,6,9,7],[5,7,9,8],[0,3,7,5,1],[2,4,8,9,6]]},t[7]={vertex:[[0,0,1.118034],[.8944272,0,.6708204],[-.2236068,.8660254,.6708204],[-.7826238,-.4330127,.6708204],[.6708204,.8660254,.2236068],[1.006231,-.4330127,-.2236068],[-1.006231,.4330127,.2236068],[-.6708204,-.8660254,-.2236068],[.7826238,.4330127,-.6708204],[.2236068,-.8660254,-.6708204],[-.8944272,0,-.6708204],[0,0,-1.118034]],face:[[0,1,4,2],[0,2,6,3],[1,5,8,4],[3,6,10,7],[5,9,11,8],[7,10,11,9],[0,3,7,9,5,1],[2,4,8,11,10,6]]},t[8]={vertex:[[-.729665,.670121,.319155],[-.655235,-.29213,-.754096],[-.093922,-.607123,.537818],[.702196,.595691,.485187],[.776626,-.36656,-.588064]],face:[[1,4,2],[0,1,2],[3,0,2],[4,3,2],[4,1,0,3]]},t[9]={vertex:[[-.868849,-.100041,.61257],[-.329458,.976099,.28078],[-.26629,-.013796,-.477654],[-.13392,-1.034115,.229829],[.738834,.707117,-.307018],[.859683,-.535264,-.338508]],face:[[3,0,2],[5,3,2],[4,5,2],[1,4,2],[0,1,2],[0,3,5,4,1]]},t[10]={vertex:[[-.610389,.243975,.531213],[-.187812,-.48795,-.664016],[-.187812,.9759,-.664016],[.187812,-.9759,.664016],[.798201,.243975,.132803]],face:[[1,3,0],[3,4,0],[3,1,4],[0,2,1],[0,4,2],[2,4,1]]},t[11]={vertex:[[-1.028778,.392027,-.048786],[-.640503,-.646161,.621837],[-.125162,-.395663,-.540059],[.004683,.888447,-.651988],[.125161,.395663,.540059],[.632925,-.791376,.433102],[1.031672,.157063,-.354165]],face:[[3,2,0],[2,1,0],[2,5,1],[0,4,3],[0,1,4],[4,1,5],[2,3,6],[3,4,6],[5,2,6],[4,5,6]]},t[12]={vertex:[[-.669867,.334933,-.529576],[-.669867,.334933,.529577],[-.4043,1.212901,0],[-.334933,-.669867,-.529576],[-.334933,-.669867,.529577],[.334933,.669867,-.529576],[.334933,.669867,.529577],[.4043,-1.212901,0],[.669867,-.334933,-.529576],[.669867,-.334933,.529577]],face:[[8,9,7],[6,5,2],[3,8,7],[5,0,2],[4,3,7],[0,1,2],[9,4,7],[1,6,2],[9,8,5,6],[8,3,0,5],[3,4,1,0],[4,9,6,1]]},t[13]={vertex:[[-.931836,.219976,-.264632],[-.636706,.318353,.692816],[-.613483,-.735083,-.264632],[-.326545,.979634,0],[-.318353,-.636706,.692816],[-.159176,.477529,-.856368],[.159176,-.477529,-.856368],[.318353,.636706,.692816],[.326545,-.979634,0],[.613482,.735082,-.264632],[.636706,-.318353,.692816],[.931835,-.219977,-.264632]],face:[[11,10,8],[7,9,3],[6,11,8],[9,5,3],[2,6,8],[5,0,3],[4,2,8],[0,1,3],[10,4,8],[1,7,3],[10,11,9,7],[11,6,5,9],[6,2,0,5],[2,4,1,0],[4,10,7,1]]},t[14]={vertex:[[-.93465,.300459,-.271185],[-.838689,-.260219,-.516017],[-.711319,.717591,.128359],[-.710334,-.156922,.080946],[-.599799,.556003,-.725148],[-.503838,-.004675,-.969981],[-.487004,.26021,.48049],[-.460089,-.750282,-.512622],[-.376468,.973135,-.325605],[-.331735,-.646985,.084342],[-.254001,.831847,.530001],[-.125239,-.494738,-.966586],[.029622,.027949,.730817],[.056536,-.982543,-.262295],[.08085,1.087391,.076037],[.125583,-.532729,.485984],[.262625,.599586,.780328],[.391387,-.726999,-.716259],[.513854,-.868287,.139347],[.597475,.85513,.326364],[.641224,.109523,.783723],[.737185,-.451155,.538891],[.848705,-.612742,-.314616],[.976075,.365067,.32976],[1.072036,-.19561,.084927]],face:[[15,18,21],[12,20,16],[6,10,2],[3,0,1],[9,7,13],[2,8,4,0],[0,4,5,1],[1,5,11,7],[7,11,17,13],[13,17,22,18],[18,22,24,21],[21,24,23,20],[20,23,19,16],[16,19,14,10],[10,14,8,2],[15,9,13,18],[12,15,21,20],[6,12,16,10],[3,6,2,0],[9,3,1,7],[9,15,12,6,3],[22,17,11,5,4,8,14,19,23,24]]};var i,r,n,o,s,a,l=e.type&&(e.type<0||e.type>=t.length)?0:e.type||0,c=e.size,h=e.sizeX||c||1,u=e.sizeY||c||1,d=e.sizeZ||c||1,f=e.custom||t[l],p=f.face.length,_=e.faceUV||new Array(p),m=e.faceColors,g=void 0===e.flat||e.flat,v=0===e.sideOrientation?0:e.sideOrientation||he.Mesh.DEFAULTSIDE,y=new Array,b=new Array,T=new Array,E=new Array,x=new Array,P=0,A=0,S=new Array,M=0,R=0;if(g)for(R=0;R<p;R++)m&&void 0===m[R]&&(m[R]=new he.Color4(1,1,1,1)),_&&void 0===_[R]&&(_[R]=new he.Vector4(0,0,1,1));if(g)for(R=0;R<p;R++){var C=f.face[R].length;for(n=2*Math.PI/C,o=.5*Math.tan(n/2),s=.5,M=0;M<C;M++)y.push(f.vertex[f.face[R][M]][0]*h,f.vertex[f.face[R][M]][1]*u,f.vertex[f.face[R][M]][2]*d),S.push(P),P++,i=_[R].x+(_[R].z-_[R].x)*(.5+o),r=_[R].y+(_[R].w-_[R].y)*(s-.5),E.push(i,r),a=o*Math.cos(n)-s*Math.sin(n),s=o*Math.sin(n)+s*Math.cos(n),o=a,m&&x.push(m[R].r,m[R].g,m[R].b,m[R].a);for(M=0;M<C-2;M++)b.push(S[0+A],S[M+2+A],S[M+1+A]);A+=C}else{for(M=0;M<f.vertex.length;M++)y.push(f.vertex[M][0]*h,f.vertex[M][1]*u,f.vertex[M][2]*d),E.push(0,0);for(R=0;R<p;R++)for(M=0;M<f.face[R].length-2;M++)b.push(f.face[R][0],f.face[R][M+2],f.face[R][M+1])}q.ComputeNormals(y,b,T),q._ComputeSides(v,y,b,T,E,e.frontUVs,e.backUVs);var O=new q;return O.positions=y,O.indices=b,O.normals=T,O.uvs=E,m&&g&&(O.colors=x),O},q.CreateTorusKnot=function(e){var t,i,r=new Array,n=new Array,o=new Array,s=new Array,l=e.radius||2,a=e.tube||.5,c=e.radialSegments||32,h=e.tubularSegments||32,u=e.p||2,d=e.q||3,f=0===e.sideOrientation?0:e.sideOrientation||he.Mesh.DEFAULTSIDE,p=function(e){var t=Math.cos(e),i=Math.sin(e),r=d/u*e,n=Math.cos(r),o=l*(2+n)*.5*t,s=l*(2+n)*i*.5,a=l*Math.sin(r)*.5;return new he.Vector3(o,s,a)};for(t=0;t<=c;t++){var _=t%c/c*2*u*Math.PI,m=p(_),g=p(_+.01),v=g.subtract(m),y=g.add(m),b=he.Vector3.Cross(v,y);for(y=he.Vector3.Cross(b,v),b.normalize(),y.normalize(),i=0;i<h;i++){var T=i%h/h*2*Math.PI,E=-a*Math.cos(T),x=a*Math.sin(T);n.push(m.x+E*y.x+x*b.x),n.push(m.y+E*y.y+x*b.y),n.push(m.z+E*y.z+x*b.z),s.push(t/c),s.push(i/h)}}for(t=0;t<c;t++)for(i=0;i<h;i++){var P=(i+1)%h,A=t*h+i,S=(t+1)*h+i,M=(t+1)*h+P,R=t*h+P;r.push(R),r.push(S),r.push(A),r.push(R),r.push(M),r.push(S)}q.ComputeNormals(n,r,o),q._ComputeSides(f,n,r,o,s,e.frontUVs,e.backUVs);var C=new q;return C.indices=r,C.positions=n,C.normals=o,C.uvs=s,C},q.ComputeNormals=function(e,t,i,r){var n=0,o=0,s=0,a=0,l=0,c=0,h=0,u=0,d=0,f=0,p=0,_=0,m=0,g=0,v=0,y=0,b=0,T=0,E=0,x=0,P=!1,A=!1,S=!1,M=!1,R=1,C=0,O=null;if(r&&(P=!!r.facetNormals,A=!!r.facetPositions,S=!!r.facetPartitioning,R=!0===r.useRightHandedSystem?-1:1,C=r.ratio||0,M=!!r.depthSort,O=r.distanceTo,M)){void 0===O&&(O=he.Vector3.Zero());var D=r.depthSortedFacets}var I=0,w=0,L=0,F=0;if(S&&r&&r.bbSize){var B=0,N=0,V=0,U=0,z=0,G=0,k=0,W=0,H=0,X=0,j=0,Y=0,K=0,Q=0,Z=0,q=0,J=r.bbSize.x>r.bbSize.y?r.bbSize.x:r.bbSize.y;J=J>r.bbSize.z?J:r.bbSize.z,I=r.subDiv.X*C/r.bbSize.x,w=r.subDiv.Y*C/r.bbSize.y,L=r.subDiv.Z*C/r.bbSize.z,F=r.subDiv.max*r.subDiv.max,r.facetPartitioning.length=0}for(n=0;n<e.length;n++)i[n]=0;var $=t.length/3|0;for(n=0;n<$;n++){if(m=(_=3*t[3*n])+1,g=_+2,y=(v=3*t[3*n+1])+1,b=v+2,E=(T=3*t[3*n+2])+1,x=T+2,o=e[_]-e[v],s=e[m]-e[y],a=e[g]-e[b],l=e[T]-e[v],c=e[E]-e[y],u=R*(s*(h=e[x]-e[b])-a*c),d=R*(a*l-o*h),f=R*(o*c-s*l),u/=p=0===(p=Math.sqrt(u*u+d*d+f*f))?1:p,d/=p,f/=p,P&&r&&(r.facetNormals[n].x=u,r.facetNormals[n].y=d,r.facetNormals[n].z=f),A&&r&&(r.facetPositions[n].x=(e[_]+e[v]+e[T])/3,r.facetPositions[n].y=(e[m]+e[y]+e[E])/3,r.facetPositions[n].z=(e[g]+e[b]+e[x])/3),S&&r&&(B=Math.floor((r.facetPositions[n].x-r.bInfo.minimum.x*C)*I),N=Math.floor((r.facetPositions[n].y-r.bInfo.minimum.y*C)*w),V=Math.floor((r.facetPositions[n].z-r.bInfo.minimum.z*C)*L),U=Math.floor((e[_]-r.bInfo.minimum.x*C)*I),z=Math.floor((e[m]-r.bInfo.minimum.y*C)*w),G=Math.floor((e[g]-r.bInfo.minimum.z*C)*L),k=Math.floor((e[v]-r.bInfo.minimum.x*C)*I),W=Math.floor((e[y]-r.bInfo.minimum.y*C)*w),H=Math.floor((e[b]-r.bInfo.minimum.z*C)*L),X=Math.floor((e[T]-r.bInfo.minimum.x*C)*I),j=Math.floor((e[E]-r.bInfo.minimum.y*C)*w),Y=Math.floor((e[x]-r.bInfo.minimum.z*C)*L),Q=U+r.subDiv.max*z+F*G,Z=k+r.subDiv.max*W+F*H,q=X+r.subDiv.max*j+F*Y,K=B+r.subDiv.max*N+F*V,r.facetPartitioning[K]=r.facetPartitioning[K]?r.facetPartitioning[K]:new Array,r.facetPartitioning[Q]=r.facetPartitioning[Q]?r.facetPartitioning[Q]:new Array,r.facetPartitioning[Z]=r.facetPartitioning[Z]?r.facetPartitioning[Z]:new Array,r.facetPartitioning[q]=r.facetPartitioning[q]?r.facetPartitioning[q]:new Array,r.facetPartitioning[Q].push(n),Z!=Q&&r.facetPartitioning[Z].push(n),q!=Z&&q!=Q&&r.facetPartitioning[q].push(n),K!=Q&&K!=Z&&K!=q&&r.facetPartitioning[K].push(n)),M&&r&&r.facetPositions){var ee=D[n];ee.ind=3*n,ee.sqDistance=he.Vector3.DistanceSquared(r.facetPositions[n],O)}i[_]+=u,i[m]+=d,i[g]+=f,i[v]+=u,i[y]+=d,i[b]+=f,i[T]+=u,i[E]+=d,i[x]+=f}for(n=0;n<i.length/3;n++)u=i[3*n],d=i[3*n+1],f=i[3*n+2],u/=p=0===(p=Math.sqrt(u*u+d*d+f*f))?1:p,d/=p,f/=p,i[3*n]=u,i[3*n+1]=d,i[3*n+2]=f},q._ComputeSides=function(e,t,i,r,n,o,s){var a,l,c=i.length,h=r.length;switch(e=e||he.Mesh.DEFAULTSIDE){case he.Mesh.FRONTSIDE:break;case he.Mesh.BACKSIDE:var u;for(a=0;a<c;a+=3)u=i[a],i[a]=i[a+2],i[a+2]=u;for(l=0;l<h;l++)r[l]=-r[l];break;case he.Mesh.DOUBLESIDE:for(var d=t.length,f=d/3,p=0;p<d;p++)t[d+p]=t[p];for(a=0;a<c;a+=3)i[a+c]=i[a+2]+f,i[a+1+c]=i[a+1]+f,i[a+2+c]=i[a]+f;for(l=0;l<h;l++)r[h+l]=-r[l];var _=n.length,m=0;for(m=0;m<_;m++)n[m+_]=n[m];for(o=o||new he.Vector4(0,0,1,1),s=s||new he.Vector4(0,0,1,1),a=m=0;a<_/2;a++)n[m]=o.x+(o.z-o.x)*n[m],n[m+1]=o.y+(o.w-o.y)*n[m+1],n[m+_]=s.x+(s.z-s.x)*n[m+_],n[m+_+1]=s.y+(s.w-s.y)*n[m+_+1],m+=2}},q.ImportVertexData=function(e,t){var i=new q,r=e.positions;r&&i.set(r,he.VertexBuffer.PositionKind);var n=e.normals;n&&i.set(n,he.VertexBuffer.NormalKind);var o=e.tangents;o&&i.set(o,he.VertexBuffer.TangentKind);var s=e.uvs;s&&i.set(s,he.VertexBuffer.UVKind);var a=e.uv2s;a&&i.set(a,he.VertexBuffer.UV2Kind);var l=e.uv3s;l&&i.set(l,he.VertexBuffer.UV3Kind);var c=e.uv4s;c&&i.set(c,he.VertexBuffer.UV4Kind);var h=e.uv5s;h&&i.set(h,he.VertexBuffer.UV5Kind);var u=e.uv6s;u&&i.set(u,he.VertexBuffer.UV6Kind);var d=e.colors;d&&i.set(he.Color4.CheckColors4(d,r.length/3),he.VertexBuffer.ColorKind);var f=e.matricesIndices;f&&i.set(f,he.VertexBuffer.MatricesIndicesKind);var p=e.matricesWeights;p&&i.set(p,he.VertexBuffer.MatricesWeightsKind);var _=e.indices;_&&(i.indices=_),t.setAllVerticesData(i,e.updatable)},q})(),he.VertexData=ue,(function(I){var e=(function(){function D(e,t,i,r,n){void 0===r&&(r=!1),void 0===n&&(n=null),this.delayLoadState=I.Engine.DELAYLOADSTATE_NONE,this._totalVertices=0,this._isDisposed=!1,this._indexBufferIsUpdatable=!1,this.id=e,this._engine=t.getEngine(),this._meshes=[],this._scene=t,this._vertexBuffers={},this._indices=[],this._updatable=r,i?this.setAllVerticesData(i,r):(this._totalVertices=0,this._indices=[]),this._engine.getCaps().vertexArrayObject&&(this._vertexArrayObjects={}),n&&(\"LinesMesh\"===n.getClassName()&&(this.boundingBias=new I.Vector2(0,n.intersectionThreshold),this._updateExtend()),this.applyToMesh(n),n.computeWorldMatrix(!0))}return Object.defineProperty(D.prototype,\"boundingBias\",{get:function(){return this._boundingBias},set:function(e){if(this._boundingBias){if(this._boundingBias.equals(e))return;this._boundingBias.copyFrom(e)}else this._boundingBias=e.clone();this._updateBoundingInfo(!0,null)},enumerable:!0,configurable:!0}),D.CreateGeometryForMesh=function(e){var t=new D(D.RandomId(),e.getScene());return t.applyToMesh(e),t},Object.defineProperty(D.prototype,\"extend\",{get:function(){return this._extend},enumerable:!0,configurable:!0}),D.prototype.getScene=function(){return this._scene},D.prototype.getEngine=function(){return this._engine},D.prototype.isReady=function(){return this.delayLoadState===I.Engine.DELAYLOADSTATE_LOADED||this.delayLoadState===I.Engine.DELAYLOADSTATE_NONE},Object.defineProperty(D.prototype,\"doNotSerialize\",{get:function(){for(var e=0;e<this._meshes.length;e++)if(!this._meshes[e].doNotSerialize)return!1;return!0},enumerable:!0,configurable:!0}),D.prototype._rebuild=function(){for(var e in this._vertexArrayObjects&&(this._vertexArrayObjects={}),0!==this._meshes.length&&this._indices&&(this._indexBuffer=this._engine.createIndexBuffer(this._indices)),this._vertexBuffers){this._vertexBuffers[e]._rebuild()}},D.prototype.setAllVerticesData=function(e,t){e.applyToGeometry(this,t),this.notifyUpdate()},D.prototype.setVerticesData=function(e,t,i,r){void 0===i&&(i=!1);var n=new I.VertexBuffer(this._engine,t,e,i,0===this._meshes.length,r);this.setVerticesBuffer(n)},D.prototype.removeVerticesData=function(e){this._vertexBuffers[e]&&(this._vertexBuffers[e].dispose(),delete this._vertexBuffers[e])},D.prototype.setVerticesBuffer=function(e,t){void 0===t&&(t=null);var i=e.getKind();if(this._vertexBuffers[i]&&this._vertexBuffers[i].dispose(),this._vertexBuffers[i]=e,i===I.VertexBuffer.PositionKind){var r=e.getData();null!=t?this._totalVertices=t:null!=r&&(this._totalVertices=r.length/(e.byteStride/4)),this._updateExtend(r),this._resetPointsArrayCache();for(var n=this._meshes,o=n.length,s=0;s<o;s++){var a=n[s];a._boundingInfo=new I.BoundingInfo(this._extend.minimum,this._extend.maximum),a._createGlobalSubMesh(!1),a.computeWorldMatrix(!0)}}this.notifyUpdate(i),this._vertexArrayObjects&&(this._disposeVertexArrayObjects(),this._vertexArrayObjects={})},D.prototype.updateVerticesDataDirectly=function(e,t,i,r){void 0===r&&(r=!1);var n=this.getVertexBuffer(e);n&&(n.updateDirectly(t,i,r),this.notifyUpdate(e))},D.prototype.updateVerticesData=function(e,t,i){void 0===i&&(i=!1);var r=this.getVertexBuffer(e);r&&(r.update(t),e===I.VertexBuffer.PositionKind&&this._updateBoundingInfo(i,t),this.notifyUpdate(e))},D.prototype._updateBoundingInfo=function(e,t){e&&this._updateExtend(t);var i=this._meshes,r=i.length;this._resetPointsArrayCache();for(var n=0;n<r;n++){var o=i[n];if(e){o._boundingInfo=new I.BoundingInfo(this._extend.minimum,this._extend.maximum);for(var s=0;s<o.subMeshes.length;s++){o.subMeshes[s].refreshBoundingInfo()}}}},D.prototype._bind=function(e,t){if(e){void 0===t&&(t=this._indexBuffer);var i=this.getVertexBuffers();i&&(t==this._indexBuffer&&this._vertexArrayObjects?(this._vertexArrayObjects[e.key]||(this._vertexArrayObjects[e.key]=this._engine.recordVertexArrayObject(i,t,e)),this._engine.bindVertexArrayObject(this._vertexArrayObjects[e.key],t)):this._engine.bindBuffers(i,t,e))}},D.prototype.getTotalVertices=function(){return this.isReady()?this._totalVertices:0},D.prototype.getVerticesData=function(e,t,i){var r=this.getVertexBuffer(e);if(!r)return null;var n=r.getData();if(!n)return null;var o=r.getSize()*I.VertexBuffer.GetTypeByteLength(r.type),s=this._totalVertices*r.getSize();if(r.type!==I.VertexBuffer.FLOAT||r.byteStride!==o){var a=new Array(s);return r.forEach(s,(function(e,t){a[t]=e})),a}if(!(n instanceof Array||n instanceof Float32Array)||0!==r.byteOffset||n.length!==s){if(n instanceof Array){var l=r.byteOffset/4;return I.Tools.Slice(n,l,l+s)}if(n instanceof ArrayBuffer)return new Float32Array(n,r.byteOffset,s);l=n.byteOffset+r.byteOffset;if(i||t&&1!==this._meshes.length){var c=new Float32Array(s),h=new Float32Array(n.buffer,l,s);return c.set(h),c}return new Float32Array(n.buffer,l,s)}return i||t&&1!==this._meshes.length?I.Tools.Slice(n):n},D.prototype.isVertexBufferUpdatable=function(e){var t=this._vertexBuffers[e];return!!t&&t.isUpdatable()},D.prototype.getVertexBuffer=function(e){return this.isReady()?this._vertexBuffers[e]:null},D.prototype.getVertexBuffers=function(){return this.isReady()?this._vertexBuffers:null},D.prototype.isVerticesDataPresent=function(e){return this._vertexBuffers?void 0!==this._vertexBuffers[e]:!!this._delayInfo&&-1!==this._delayInfo.indexOf(e)},D.prototype.getVerticesDataKinds=function(){var e,t=[];if(!this._vertexBuffers&&this._delayInfo)for(e in this._delayInfo)t.push(e);else for(e in this._vertexBuffers)t.push(e);return t},D.prototype.updateIndices=function(e,t){this._indexBuffer&&(this._indexBufferIsUpdatable?this._engine.updateDynamicIndexBuffer(this._indexBuffer,e,t):this.setIndices(e,null,!0))},D.prototype.setIndices=function(e,t,i){void 0===t&&(t=null),void 0===i&&(i=!1),this._indexBuffer&&this._engine._releaseBuffer(this._indexBuffer),this._disposeVertexArrayObjects(),this._indices=e,this._indexBufferIsUpdatable=i,0!==this._meshes.length&&this._indices&&(this._indexBuffer=this._engine.createIndexBuffer(this._indices,i)),null!=t&&(this._totalVertices=t);for(var r=this._meshes,n=r.length,o=0;o<n;o++)r[o]._createGlobalSubMesh(!0);this.notifyUpdate()},D.prototype.getTotalIndices=function(){return this.isReady()?this._indices.length:0},D.prototype.getIndices=function(e,t){if(!this.isReady())return null;var i=this._indices;if(t||e&&1!==this._meshes.length){for(var r=i.length,n=[],o=0;o<r;o++)n.push(i[o]);return n}return i},D.prototype.getIndexBuffer=function(){return this.isReady()?this._indexBuffer:null},D.prototype._releaseVertexArrayObject=function(e){void 0===e&&(e=null),e&&this._vertexArrayObjects&&this._vertexArrayObjects[e.key]&&(this._engine.releaseVertexArrayObject(this._vertexArrayObjects[e.key]),delete this._vertexArrayObjects[e.key])},D.prototype.releaseForMesh=function(e,t){var i=this._meshes,r=i.indexOf(e);-1!==r&&(i.splice(r,1),e._geometry=null,0===i.length&&t&&this.dispose())},D.prototype.applyToMesh=function(e){if(e._geometry!==this){var t=e._geometry;t&&t.releaseForMesh(e);var i=this._meshes;(e._geometry=this)._scene.pushGeometry(this),i.push(e),this.isReady()?this._applyToMesh(e):e._boundingInfo=this._boundingInfo}},D.prototype._updateExtend=function(e){void 0===e&&(e=null),e||(e=this.getVerticesData(I.VertexBuffer.PositionKind)),this._extend=I.Tools.ExtractMinAndMax(e,0,this._totalVertices,this.boundingBias,3)},D.prototype._applyToMesh=function(e){var t=this._meshes.length;for(var i in this._vertexBuffers){1===t&&this._vertexBuffers[i].create();var r=this._vertexBuffers[i].getBuffer();r&&(r.references=t),i===I.VertexBuffer.PositionKind&&(this._extend||this._updateExtend(),e._boundingInfo=new I.BoundingInfo(this._extend.minimum,this._extend.maximum),e._createGlobalSubMesh(!1),e._updateBoundingInfo())}1===t&&this._indices&&0<this._indices.length&&(this._indexBuffer=this._engine.createIndexBuffer(this._indices)),this._indexBuffer&&(this._indexBuffer.references=t),e._syncGeometryWithMorphTargetManager()},D.prototype.notifyUpdate=function(e){this.onGeometryUpdated&&this.onGeometryUpdated(this,e);for(var t=0,i=this._meshes;t<i.length;t++){i[t]._markSubMeshesAsAttributesDirty()}},D.prototype.load=function(e,t){this.delayLoadState!==I.Engine.DELAYLOADSTATE_LOADING&&(this.isReady()?t&&t():(this.delayLoadState=I.Engine.DELAYLOADSTATE_LOADING,this._queueLoad(e,t)))},D.prototype._queueLoad=function(n,o){var s=this;this.delayLoadingFile&&(n._addPendingData(this),n._loadFile(this.delayLoadingFile,(function(e){if(s._delayLoadingFunction){s._delayLoadingFunction(JSON.parse(e),s),s.delayLoadState=I.Engine.DELAYLOADSTATE_LOADED,s._delayInfo=[],n._removePendingData(s);for(var t=s._meshes,i=t.length,r=0;r<i;r++)s._applyToMesh(t[r]);o&&o()}}),void 0,!0))},D.prototype.toLeftHanded=function(){var e=this.getIndices(!1);if(null!=e&&0<e.length){for(var t=0;t<e.length;t+=3){var i=e[t+0];e[t+0]=e[t+2],e[t+2]=i}this.setIndices(e)}var r=this.getVerticesData(I.VertexBuffer.PositionKind,!1);if(null!=r&&0<r.length){for(t=0;t<r.length;t+=3)r[t+2]=-r[t+2];this.setVerticesData(I.VertexBuffer.PositionKind,r,!1)}var n=this.getVerticesData(I.VertexBuffer.NormalKind,!1);if(null!=n&&0<n.length){for(t=0;t<n.length;t+=3)n[t+2]=-n[t+2];this.setVerticesData(I.VertexBuffer.NormalKind,n,!1)}},D.prototype._resetPointsArrayCache=function(){this._positions=null},D.prototype._generatePointsArray=function(){if(this._positions)return!0;var e=this.getVerticesData(I.VertexBuffer.PositionKind);if(!e||0===e.length)return!1;this._positions=[];for(var t=0;t<e.length;t+=3)this._positions.push(I.Vector3.FromArray(e,t));return!0},D.prototype.isDisposed=function(){return this._isDisposed},D.prototype._disposeVertexArrayObjects=function(){if(this._vertexArrayObjects){for(var e in this._vertexArrayObjects)this._engine.releaseVertexArrayObject(this._vertexArrayObjects[e]);this._vertexArrayObjects={}}},D.prototype.dispose=function(){var e,t=this._meshes,i=t.length;for(e=0;e<i;e++)this.releaseForMesh(t[e]);for(var r in this._meshes=[],this._disposeVertexArrayObjects(),this._vertexBuffers)this._vertexBuffers[r].dispose();this._vertexBuffers={},this._totalVertices=0,this._indexBuffer&&this._engine._releaseBuffer(this._indexBuffer),this._indexBuffer=null,this._indices=[],this.delayLoadState=I.Engine.DELAYLOADSTATE_NONE,this.delayLoadingFile=null,this._delayLoadingFunction=null,this._delayInfo=[],this._boundingInfo=null,this._scene.removeGeometry(this),this._isDisposed=!0},D.prototype.copy=function(e){var t=new I.VertexData;t.indices=[];var i=this.getIndices();if(i)for(var r=0;r<i.length;r++)t.indices.push(i[r]);var n,o=!1,s=!1;for(n in this._vertexBuffers){var a=this.getVerticesData(n);if(a instanceof Float32Array?t.set(new Float32Array(a),n):t.set(a.slice(0),n),!s){var l=this.getVertexBuffer(n);l&&(s=!(o=l.isUpdatable()))}}var c=new D(e,this._scene,t,o);for(n in c.delayLoadState=this.delayLoadState,c.delayLoadingFile=this.delayLoadingFile,c._delayLoadingFunction=this._delayLoadingFunction,this._delayInfo)c._delayInfo=c._delayInfo||[],c._delayInfo.push(n);return c._boundingInfo=new I.BoundingInfo(this._extend.minimum,this._extend.maximum),c},D.prototype.serialize=function(){var e={};return e.id=this.id,e.updatable=this._updatable,I.Tags&&I.Tags.HasTags(this)&&(e.tags=I.Tags.GetTags(this)),e},D.prototype.toNumberArray=function(e){return Array.isArray(e)?e:Array.prototype.slice.call(e)},D.prototype.serializeVerticeData=function(){var e=this.serialize();return this.isVerticesDataPresent(I.VertexBuffer.PositionKind)&&(e.positions=this.toNumberArray(this.getVerticesData(I.VertexBuffer.PositionKind)),this.isVertexBufferUpdatable(I.VertexBuffer.PositionKind)&&(e.positions._updatable=!0)),this.isVerticesDataPresent(I.VertexBuffer.NormalKind)&&(e.normals=this.toNumberArray(this.getVerticesData(I.VertexBuffer.NormalKind)),this.isVertexBufferUpdatable(I.VertexBuffer.NormalKind)&&(e.normals._updatable=!0)),this.isVerticesDataPresent(I.VertexBuffer.TangentKind)&&(e.tangets=this.toNumberArray(this.getVerticesData(I.VertexBuffer.TangentKind)),this.isVertexBufferUpdatable(I.VertexBuffer.TangentKind)&&(e.tangets._updatable=!0)),this.isVerticesDataPresent(I.VertexBuffer.UVKind)&&(e.uvs=this.toNumberArray(this.getVerticesData(I.VertexBuffer.UVKind)),this.isVertexBufferUpdatable(I.VertexBuffer.UVKind)&&(e.uvs._updatable=!0)),this.isVerticesDataPresent(I.VertexBuffer.UV2Kind)&&(e.uv2s=this.toNumberArray(this.getVerticesData(I.VertexBuffer.UV2Kind)),this.isVertexBufferUpdatable(I.VertexBuffer.UV2Kind)&&(e.uv2s._updatable=!0)),this.isVerticesDataPresent(I.VertexBuffer.UV3Kind)&&(e.uv3s=this.toNumberArray(this.getVerticesData(I.VertexBuffer.UV3Kind)),this.isVertexBufferUpdatable(I.VertexBuffer.UV3Kind)&&(e.uv3s._updatable=!0)),this.isVerticesDataPresent(I.VertexBuffer.UV4Kind)&&(e.uv4s=this.toNumberArray(this.getVerticesData(I.VertexBuffer.UV4Kind)),this.isVertexBufferUpdatable(I.VertexBuffer.UV4Kind)&&(e.uv4s._updatable=!0)),this.isVerticesDataPresent(I.VertexBuffer.UV5Kind)&&(e.uv5s=this.toNumberArray(this.getVerticesData(I.VertexBuffer.UV5Kind)),this.isVertexBufferUpdatable(I.VertexBuffer.UV5Kind)&&(e.uv5s._updatable=!0)),this.isVerticesDataPresent(I.VertexBuffer.UV6Kind)&&(e.uv6s=this.toNumberArray(this.getVerticesData(I.VertexBuffer.UV6Kind)),this.isVertexBufferUpdatable(I.VertexBuffer.UV6Kind)&&(e.uv6s._updatable=!0)),this.isVerticesDataPresent(I.VertexBuffer.ColorKind)&&(e.colors=this.toNumberArray(this.getVerticesData(I.VertexBuffer.ColorKind)),this.isVertexBufferUpdatable(I.VertexBuffer.ColorKind)&&(e.colors._updatable=!0)),this.isVerticesDataPresent(I.VertexBuffer.MatricesIndicesKind)&&(e.matricesIndices=this.toNumberArray(this.getVerticesData(I.VertexBuffer.MatricesIndicesKind)),e.matricesIndices._isExpanded=!0,this.isVertexBufferUpdatable(I.VertexBuffer.MatricesIndicesKind)&&(e.matricesIndices._updatable=!0)),this.isVerticesDataPresent(I.VertexBuffer.MatricesWeightsKind)&&(e.matricesWeights=this.toNumberArray(this.getVerticesData(I.VertexBuffer.MatricesWeightsKind)),this.isVertexBufferUpdatable(I.VertexBuffer.MatricesWeightsKind)&&(e.matricesWeights._updatable=!0)),e.indices=this.toNumberArray(this.getIndices()),e},D.ExtractFromMesh=function(e,t){var i=e._geometry;return i?i.copy(t):null},D.RandomId=function(){return I.Tools.RandomId()},D._ImportGeometry=function(e,t){var i=t.getScene(),r=e.geometryId;if(r){var n=i.getGeometryByID(r);n&&n.applyToMesh(t)}else if(e instanceof ArrayBuffer){var o=t._binaryInfo;if(o.positionsAttrDesc&&0<o.positionsAttrDesc.count){var s=new Float32Array(e,o.positionsAttrDesc.offset,o.positionsAttrDesc.count);t.setVerticesData(I.VertexBuffer.PositionKind,s,!1)}if(o.normalsAttrDesc&&0<o.normalsAttrDesc.count){var a=new Float32Array(e,o.normalsAttrDesc.offset,o.normalsAttrDesc.count);t.setVerticesData(I.VertexBuffer.NormalKind,a,!1)}if(o.tangetsAttrDesc&&0<o.tangetsAttrDesc.count){var l=new Float32Array(e,o.tangetsAttrDesc.offset,o.tangetsAttrDesc.count);t.setVerticesData(I.VertexBuffer.TangentKind,l,!1)}if(o.uvsAttrDesc&&0<o.uvsAttrDesc.count){var c=new Float32Array(e,o.uvsAttrDesc.offset,o.uvsAttrDesc.count);t.setVerticesData(I.VertexBuffer.UVKind,c,!1)}if(o.uvs2AttrDesc&&0<o.uvs2AttrDesc.count){var h=new Float32Array(e,o.uvs2AttrDesc.offset,o.uvs2AttrDesc.count);t.setVerticesData(I.VertexBuffer.UV2Kind,h,!1)}if(o.uvs3AttrDesc&&0<o.uvs3AttrDesc.count){var u=new Float32Array(e,o.uvs3AttrDesc.offset,o.uvs3AttrDesc.count);t.setVerticesData(I.VertexBuffer.UV3Kind,u,!1)}if(o.uvs4AttrDesc&&0<o.uvs4AttrDesc.count){var d=new Float32Array(e,o.uvs4AttrDesc.offset,o.uvs4AttrDesc.count);t.setVerticesData(I.VertexBuffer.UV4Kind,d,!1)}if(o.uvs5AttrDesc&&0<o.uvs5AttrDesc.count){var f=new Float32Array(e,o.uvs5AttrDesc.offset,o.uvs5AttrDesc.count);t.setVerticesData(I.VertexBuffer.UV5Kind,f,!1)}if(o.uvs6AttrDesc&&0<o.uvs6AttrDesc.count){var p=new Float32Array(e,o.uvs6AttrDesc.offset,o.uvs6AttrDesc.count);t.setVerticesData(I.VertexBuffer.UV6Kind,p,!1)}if(o.colorsAttrDesc&&0<o.colorsAttrDesc.count){var _=new Float32Array(e,o.colorsAttrDesc.offset,o.colorsAttrDesc.count);t.setVerticesData(I.VertexBuffer.ColorKind,_,!1,o.colorsAttrDesc.stride)}if(o.matricesIndicesAttrDesc&&0<o.matricesIndicesAttrDesc.count){for(var m=new Int32Array(e,o.matricesIndicesAttrDesc.offset,o.matricesIndicesAttrDesc.count),g=[],v=0;v<m.length;v++){var y=m[v];g.push(255&y),g.push((65280&y)>>8),g.push((16711680&y)>>16),g.push(y>>24)}t.setVerticesData(I.VertexBuffer.MatricesIndicesKind,g,!1)}if(o.matricesWeightsAttrDesc&&0<o.matricesWeightsAttrDesc.count){var b=new Float32Array(e,o.matricesWeightsAttrDesc.offset,o.matricesWeightsAttrDesc.count);t.setVerticesData(I.VertexBuffer.MatricesWeightsKind,b,!1)}if(o.indicesAttrDesc&&0<o.indicesAttrDesc.count){var T=new Int32Array(e,o.indicesAttrDesc.offset,o.indicesAttrDesc.count);t.setIndices(T,null)}if(o.subMeshesAttrDesc&&0<o.subMeshesAttrDesc.count){var E=new Int32Array(e,o.subMeshesAttrDesc.offset,5*o.subMeshesAttrDesc.count);t.subMeshes=[];for(v=0;v<o.subMeshesAttrDesc.count;v++){var x=E[5*v+0],P=E[5*v+1],A=E[5*v+2],S=E[5*v+3],M=E[5*v+4];I.SubMesh.AddToMesh(x,P,A,S,M,t)}}}else if(e.positions&&e.normals&&e.indices){if(t.setVerticesData(I.VertexBuffer.PositionKind,e.positions,e.positions._updatable),t.setVerticesData(I.VertexBuffer.NormalKind,e.normals,e.normals._updatable),e.tangents&&t.setVerticesData(I.VertexBuffer.TangentKind,e.tangents,e.tangents._updatable),e.uvs&&t.setVerticesData(I.VertexBuffer.UVKind,e.uvs,e.uvs._updatable),e.uvs2&&t.setVerticesData(I.VertexBuffer.UV2Kind,e.uvs2,e.uvs2._updatable),e.uvs3&&t.setVerticesData(I.VertexBuffer.UV3Kind,e.uvs3,e.uvs3._updatable),e.uvs4&&t.setVerticesData(I.VertexBuffer.UV4Kind,e.uvs4,e.uvs4._updatable),e.uvs5&&t.setVerticesData(I.VertexBuffer.UV5Kind,e.uvs5,e.uvs5._updatable),e.uvs6&&t.setVerticesData(I.VertexBuffer.UV6Kind,e.uvs6,e.uvs6._updatable),e.colors&&t.setVerticesData(I.VertexBuffer.ColorKind,I.Color4.CheckColors4(e.colors,e.positions.length/3),e.colors._updatable),e.matricesIndices)if(e.matricesIndices._isExpanded)delete e.matricesIndices._isExpanded,t.setVerticesData(I.VertexBuffer.MatricesIndicesKind,e.matricesIndices,e.matricesIndices._updatable);else{for(g=[],v=0;v<e.matricesIndices.length;v++){var R=e.matricesIndices[v];g.push(255&R),g.push((65280&R)>>8),g.push((16711680&R)>>16),g.push(R>>24)}t.setVerticesData(I.VertexBuffer.MatricesIndicesKind,g,e.matricesIndices._updatable)}if(e.matricesIndicesExtra)if(e.matricesIndicesExtra._isExpanded)delete e.matricesIndices._isExpanded,t.setVerticesData(I.VertexBuffer.MatricesIndicesExtraKind,e.matricesIndicesExtra,e.matricesIndicesExtra._updatable);else{for(g=[],v=0;v<e.matricesIndicesExtra.length;v++){R=e.matricesIndicesExtra[v];g.push(255&R),g.push((65280&R)>>8),g.push((16711680&R)>>16),g.push(R>>24)}t.setVerticesData(I.VertexBuffer.MatricesIndicesExtraKind,g,e.matricesIndicesExtra._updatable)}e.matricesWeights&&(D._CleanMatricesWeights(e,t),t.setVerticesData(I.VertexBuffer.MatricesWeightsKind,e.matricesWeights,e.matricesWeights._updatable)),e.matricesWeightsExtra&&t.setVerticesData(I.VertexBuffer.MatricesWeightsExtraKind,e.matricesWeightsExtra,e.matricesWeights._updatable),t.setIndices(e.indices,null)}if(e.subMeshes){t.subMeshes=[];for(var C=0;C<e.subMeshes.length;C++){var O=e.subMeshes[C];I.SubMesh.AddToMesh(O.materialIndex,O.verticesStart,O.verticesCount,O.indexStart,O.indexCount,t)}}t._shouldGenerateFlatShading&&(t.convertToFlatShadedMesh(),delete t._shouldGenerateFlatShading),t.computeWorldMatrix(!0),i.onMeshImportedObservable.notifyObservers(t)},D._CleanMatricesWeights=function(e,t){if(I.SceneLoader.CleanBoneMatrixWeights){var i=0;if(-1<e.skeletonId){var r=t.getScene().getLastSkeletonByID(e.skeletonId);if(r){i=r.bones.length;for(var n=t.getVerticesData(I.VertexBuffer.MatricesIndicesKind),o=t.getVerticesData(I.VertexBuffer.MatricesIndicesExtraKind),s=e.matricesWeights,a=e.matricesWeightsExtra,l=e.numBoneInfluencer,c=s.length,h=0;h<c;h+=4){for(var u=0,d=-1,f=0;f<4;f++){u+=p=s[h+f],p<.001&&d<0&&(d=f)}if(a)for(f=0;f<4;f++){var p;u+=p=a[h+f],p<.001&&d<0&&(d=f+4)}if((d<0||l-1<d)&&(d=l-1),.001<u){var _=1/u;for(f=0;f<4;f++)s[h+f]*=_;if(a)for(f=0;f<4;f++)a[h+f]*=_}else 4<=d?(a[h+d-4]=1-u,o[h+d-4]=i):(s[h+d]=1-u,n[h+d]=i)}t.setVerticesData(I.VertexBuffer.MatricesIndicesKind,n),e.matricesWeightsExtra&&t.setVerticesData(I.VertexBuffer.MatricesIndicesExtraKind,o)}}}},D.Parse=function(e,t,i){if(t.getGeometryByID(e.id))return null;var r=new D(e.id,t,void 0,e.updatable);return I.Tags&&I.Tags.AddTagsTo(r,e.tags),e.delayLoadingFile?(r.delayLoadState=I.Engine.DELAYLOADSTATE_NOTLOADED,r.delayLoadingFile=i+e.delayLoadingFile,r._boundingInfo=new I.BoundingInfo(I.Vector3.FromArray(e.boundingBoxMinimum),I.Vector3.FromArray(e.boundingBoxMaximum)),r._delayInfo=[],e.hasUVs&&r._delayInfo.push(I.VertexBuffer.UVKind),e.hasUVs2&&r._delayInfo.push(I.VertexBuffer.UV2Kind),e.hasUVs3&&r._delayInfo.push(I.VertexBuffer.UV3Kind),e.hasUVs4&&r._delayInfo.push(I.VertexBuffer.UV4Kind),e.hasUVs5&&r._delayInfo.push(I.VertexBuffer.UV5Kind),e.hasUVs6&&r._delayInfo.push(I.VertexBuffer.UV6Kind),e.hasColors&&r._delayInfo.push(I.VertexBuffer.ColorKind),e.hasMatricesIndices&&r._delayInfo.push(I.VertexBuffer.MatricesIndicesKind),e.hasMatricesWeights&&r._delayInfo.push(I.VertexBuffer.MatricesWeightsKind),r._delayLoadingFunction=I.VertexData.ImportVertexData):I.VertexData.ImportVertexData(e,r),t.pushGeometry(r,!0),r},D})(),t=(function(o){function e(e,t,i,r){void 0===i&&(i=!1),void 0===r&&(r=null);var n=o.call(this,e,t,void 0,!1,r)||this;return n._canBeRegenerated=i,n._beingRegenerated=!0,n.regenerate(),n._beingRegenerated=!1,n}return T(e,o),e.prototype.canBeRegenerated=function(){return this._canBeRegenerated},e.prototype.regenerate=function(){this._canBeRegenerated&&(this._beingRegenerated=!0,this.setAllVerticesData(this._regenerateVertexData(),!1),this._beingRegenerated=!1)},e.prototype.asNewGeometry=function(e){return o.prototype.copy.call(this,e)},e.prototype.setAllVerticesData=function(e,t){this._beingRegenerated&&o.prototype.setAllVerticesData.call(this,e,!1)},e.prototype.setVerticesData=function(e,t,i){this._beingRegenerated&&o.prototype.setVerticesData.call(this,e,t,!1)},e.prototype._regenerateVertexData=function(){throw new Error(\"Abstract method\")},e.prototype.copy=function(e){throw new Error(\"Must be overriden in sub-classes.\")},e.prototype.serialize=function(){var e=o.prototype.serialize.call(this);return e.canBeRegenerated=this.canBeRegenerated(),e},e})(I.Geometry=e),i=(function(h){function t(e,t,i,r,n,o,s,a,l){void 0===l&&(l=I.Mesh.DEFAULTSIDE);var c=h.call(this,e,t,s,a)||this;return c.pathArray=i,c.closeArray=r,c.closePath=n,c.offset=o,c.side=l,c}return T(t,h),t.prototype._regenerateVertexData=function(){return I.VertexData.CreateRibbon({pathArray:this.pathArray,closeArray:this.closeArray,closePath:this.closePath,offset:this.offset,sideOrientation:this.side})},t.prototype.copy=function(e){return new t(e,this.getScene(),this.pathArray,this.closeArray,this.closePath,this.offset,this.canBeRegenerated(),void 0,this.side)},t})(I._PrimitiveGeometry=t);I.RibbonGeometry=i;var r=(function(a){function r(e,t,i,r,n,o){void 0===n&&(n=null),void 0===o&&(o=I.Mesh.DEFAULTSIDE);var s=a.call(this,e,t,r,n)||this;return s.size=i,s.side=o,s}return T(r,a),r.prototype._regenerateVertexData=function(){return I.VertexData.CreateBox({size:this.size,sideOrientation:this.side})},r.prototype.copy=function(e){return new r(e,this.getScene(),this.size,this.canBeRegenerated(),void 0,this.side)},r.prototype.serialize=function(){var e=a.prototype.serialize.call(this);return e.size=this.size,e},r.Parse=function(e,t){if(t.getGeometryByID(e.id))return null;var i=new r(e.id,t,e.size,e.canBeRegenerated,null);return I.Tags&&I.Tags.AddTagsTo(i,e.tags),t.pushGeometry(i,!0),i},r})(t);I.BoxGeometry=r;var n=(function(l){function r(e,t,i,r,n,o,s){void 0===o&&(o=null),void 0===s&&(s=I.Mesh.DEFAULTSIDE);var a=l.call(this,e,t,n,o)||this;return a.segments=i,a.diameter=r,a.side=s,a}return T(r,l),r.prototype._regenerateVertexData=function(){return I.VertexData.CreateSphere({segments:this.segments,diameter:this.diameter,sideOrientation:this.side})},r.prototype.copy=function(e){return new r(e,this.getScene(),this.segments,this.diameter,this.canBeRegenerated(),null,this.side)},r.prototype.serialize=function(){var e=l.prototype.serialize.call(this);return e.segments=this.segments,e.diameter=this.diameter,e},r.Parse=function(e,t){if(t.getGeometryByID(e.id))return null;var i=new r(e.id,t,e.segments,e.diameter,e.canBeRegenerated,null);return I.Tags&&I.Tags.AddTagsTo(i,e.tags),t.pushGeometry(i,!0),i},r})(t);I.SphereGeometry=n;var o=(function(l){function t(e,t,i,r,n,o,s){void 0===o&&(o=null),void 0===s&&(s=I.Mesh.DEFAULTSIDE);var a=l.call(this,e,t,n,o)||this;return a.radius=i,a.tessellation=r,a.side=s,a}return T(t,l),t.prototype._regenerateVertexData=function(){return I.VertexData.CreateDisc({radius:this.radius,tessellation:this.tessellation,sideOrientation:this.side})},t.prototype.copy=function(e){return new t(e,this.getScene(),this.radius,this.tessellation,this.canBeRegenerated(),null,this.side)},t})(t);I.DiscGeometry=o;var s=(function(u){function r(e,t,i,r,n,o,s,a,l,c){void 0===s&&(s=1),void 0===l&&(l=null),void 0===c&&(c=I.Mesh.DEFAULTSIDE);var h=u.call(this,e,t,a,l)||this;return h.height=i,h.diameterTop=r,h.diameterBottom=n,h.tessellation=o,h.subdivisions=s,h.side=c,h}return T(r,u),r.prototype._regenerateVertexData=function(){return I.VertexData.CreateCylinder({height:this.height,diameterTop:this.diameterTop,diameterBottom:this.diameterBottom,tessellation:this.tessellation,subdivisions:this.subdivisions,sideOrientation:this.side})},r.prototype.copy=function(e){return new r(e,this.getScene(),this.height,this.diameterTop,this.diameterBottom,this.tessellation,this.subdivisions,this.canBeRegenerated(),null,this.side)},r.prototype.serialize=function(){var e=u.prototype.serialize.call(this);return e.height=this.height,e.diameterTop=this.diameterTop,e.diameterBottom=this.diameterBottom,e.tessellation=this.tessellation,e},r.Parse=function(e,t){if(t.getGeometryByID(e.id))return null;var i=new r(e.id,t,e.height,e.diameterTop,e.diameterBottom,e.tessellation,e.subdivisions,e.canBeRegenerated,null);return I.Tags&&I.Tags.AddTagsTo(i,e.tags),t.pushGeometry(i,!0),i},r})(t);I.CylinderGeometry=s;var a=(function(c){function r(e,t,i,r,n,o,s,a){void 0===s&&(s=null),void 0===a&&(a=I.Mesh.DEFAULTSIDE);var l=c.call(this,e,t,o,s)||this;return l.diameter=i,l.thickness=r,l.tessellation=n,l.side=a,l}return T(r,c),r.prototype._regenerateVertexData=function(){return I.VertexData.CreateTorus({diameter:this.diameter,thickness:this.thickness,tessellation:this.tessellation,sideOrientation:this.side})},r.prototype.copy=function(e){return new r(e,this.getScene(),this.diameter,this.thickness,this.tessellation,this.canBeRegenerated(),null,this.side)},r.prototype.serialize=function(){var e=c.prototype.serialize.call(this);return e.diameter=this.diameter,e.thickness=this.thickness,e.tessellation=this.tessellation,e},r.Parse=function(e,t){if(t.getGeometryByID(e.id))return null;var i=new r(e.id,t,e.diameter,e.thickness,e.tessellation,e.canBeRegenerated,null);return I.Tags&&I.Tags.AddTagsTo(i,e.tags),t.pushGeometry(i,!0),i},r})(t);I.TorusGeometry=a;var l=(function(l){function r(e,t,i,r,n,o,s){void 0===s&&(s=null);var a=l.call(this,e,t,o,s)||this;return a.width=i,a.height=r,a.subdivisions=n,a}return T(r,l),r.prototype._regenerateVertexData=function(){return I.VertexData.CreateGround({width:this.width,height:this.height,subdivisions:this.subdivisions})},r.prototype.copy=function(e){return new r(e,this.getScene(),this.width,this.height,this.subdivisions,this.canBeRegenerated(),null)},r.prototype.serialize=function(){var e=l.prototype.serialize.call(this);return e.width=this.width,e.height=this.height,e.subdivisions=this.subdivisions,e},r.Parse=function(e,t){if(t.getGeometryByID(e.id))return null;var i=new r(e.id,t,e.width,e.height,e.subdivisions,e.canBeRegenerated,null);return I.Tags&&I.Tags.AddTagsTo(i,e.tags),t.pushGeometry(i,!0),i},r})(t);I.GroundGeometry=l;var c=(function(u){function t(e,t,i,r,n,o,s,a,l,c){void 0===c&&(c=null);var h=u.call(this,e,t,l,c)||this;return h.xmin=i,h.zmin=r,h.xmax=n,h.zmax=o,h.subdivisions=s,h.precision=a,h}return T(t,u),t.prototype._regenerateVertexData=function(){return I.VertexData.CreateTiledGround({xmin:this.xmin,zmin:this.zmin,xmax:this.xmax,zmax:this.zmax,subdivisions:this.subdivisions,precision:this.precision})},t.prototype.copy=function(e){return new t(e,this.getScene(),this.xmin,this.zmin,this.xmax,this.zmax,this.subdivisions,this.precision,this.canBeRegenerated(),null)},t})(t);I.TiledGroundGeometry=c;var h=(function(a){function r(e,t,i,r,n,o){void 0===n&&(n=null),void 0===o&&(o=I.Mesh.DEFAULTSIDE);var s=a.call(this,e,t,r,n)||this;return s.size=i,s.side=o,s}return T(r,a),r.prototype._regenerateVertexData=function(){return I.VertexData.CreatePlane({size:this.size,sideOrientation:this.side})},r.prototype.copy=function(e){return new r(e,this.getScene(),this.size,this.canBeRegenerated(),null,this.side)},r.prototype.serialize=function(){var e=a.prototype.serialize.call(this);return e.size=this.size,e},r.Parse=function(e,t){if(t.getGeometryByID(e.id))return null;var i=new r(e.id,t,e.size,e.canBeRegenerated,null);return I.Tags&&I.Tags.AddTagsTo(i,e.tags),t.pushGeometry(i,!0),i},r})(t);I.PlaneGeometry=h;var u=(function(d){function r(e,t,i,r,n,o,s,a,l,c,h){void 0===c&&(c=null),void 0===h&&(h=I.Mesh.DEFAULTSIDE);var u=d.call(this,e,t,l,c)||this;return u.radius=i,u.tube=r,u.radialSegments=n,u.tubularSegments=o,u.p=s,u.q=a,u.side=h,u}return T(r,d),r.prototype._regenerateVertexData=function(){return I.VertexData.CreateTorusKnot({radius:this.radius,tube:this.tube,radialSegments:this.radialSegments,tubularSegments:this.tubularSegments,p:this.p,q:this.q,sideOrientation:this.side})},r.prototype.copy=function(e){return new r(e,this.getScene(),this.radius,this.tube,this.radialSegments,this.tubularSegments,this.p,this.q,this.canBeRegenerated(),null,this.side)},r.prototype.serialize=function(){var e=d.prototype.serialize.call(this);return e.radius=this.radius,e.tube=this.tube,e.radialSegments=this.radialSegments,e.tubularSegments=this.tubularSegments,e.p=this.p,e.q=this.q,e},r.Parse=function(e,t){if(t.getGeometryByID(e.id))return null;var i=new r(e.id,t,e.radius,e.tube,e.radialSegments,e.tubularSegments,e.p,e.q,e.canBeRegenerated,null);return I.Tags&&I.Tags.AddTagsTo(i,e.tags),t.pushGeometry(i,!0),i},r})(t);I.TorusKnotGeometry=u})($a||($a={})),(function(i){var e=(function(){function e(e){void 0===e&&(e=30),this._enabled=!0,this._rollingFrameTime=new t(e)}return e.prototype.sampleFrame=function(e){if(void 0===e&&(e=i.Tools.Now),this._enabled){if(null!=this._lastFrameTimeMs){var t=e-this._lastFrameTimeMs;this._rollingFrameTime.add(t)}this._lastFrameTimeMs=e}},Object.defineProperty(e.prototype,\"averageFrameTime\",{get:function(){return this._rollingFrameTime.average},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,\"averageFrameTimeVariance\",{get:function(){return this._rollingFrameTime.variance},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,\"instantaneousFrameTime\",{get:function(){return this._rollingFrameTime.history(0)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,\"averageFPS\",{get:function(){return 1e3/this._rollingFrameTime.average},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,\"instantaneousFPS\",{get:function(){var e=this._rollingFrameTime.history(0);return 0===e?0:1e3/e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,\"isSaturated\",{get:function(){return this._rollingFrameTime.isSaturated()},enumerable:!0,configurable:!0}),e.prototype.enable=function(){this._enabled=!0},e.prototype.disable=function(){this._enabled=!1,this._lastFrameTimeMs=null},Object.defineProperty(e.prototype,\"isEnabled\",{get:function(){return this._enabled},enumerable:!0,configurable:!0}),e.prototype.reset=function(){this._lastFrameTimeMs=null,this._rollingFrameTime.reset()},e})();i.PerformanceMonitor=e;var t=(function(){function e(e){this._samples=new Array(e),this.reset()}return e.prototype.add=function(e){var t;if(this.isSaturated()){var i=this._samples[this._pos];t=i-this.average,this.average-=t/(this._sampleCount-1),this._m2-=t*(i-this.average)}else this._sampleCount++;t=e-this.average,this.average+=t/this._sampleCount,this._m2+=t*(e-this.average),this.variance=this._m2/(this._sampleCount-1),this._samples[this._pos]=e,this._pos++,this._pos%=this._samples.length},e.prototype.history=function(e){if(e>=this._sampleCount||e>=this._samples.length)return 0;var t=this._wrapPosition(this._pos-1);return this._samples[this._wrapPosition(t-e)]},e.prototype.isSaturated=function(){return this._sampleCount>=this._samples.length},e.prototype.reset=function(){this.average=0,this.variance=0,this._sampleCount=0,this._pos=0,this._m2=0},e.prototype._wrapPosition=function(e){var t=this._samples.length;return(e%t+t)%t},e})();i.RollingAverage=t})($a||($a={})),de=$a||($a={}),fe=(function(){function u(){}return u.BindEyePosition=function(e,t){t._forcedViewPosition?e.setVector3(\"vEyePosition\",t._forcedViewPosition):e.setVector3(\"vEyePosition\",t._mirroredCameraPosition?t._mirroredCameraPosition:t.activeCamera.globalPosition)},u.PrepareDefinesForMergedUV=function(e,t,i){t._needUVs=!0,t[i]=!0,e.getTextureMatrix().isIdentity(!0)?(t[i+\"DIRECTUV\"]=e.coordinatesIndex+1,0===e.coordinatesIndex?t.MAINUV1=!0:t.MAINUV2=!0):t[i+\"DIRECTUV\"]=0},u.BindTextureMatrix=function(e,t,i){var r=e.getTextureMatrix();r.isIdentity(!0)||t.updateMatrix(i+\"Matrix\",r)},u.PrepareDefinesForMisc=function(e,t,i,r,n,o,s){s._areMiscDirty&&(s.LOGARITHMICDEPTH=i,s.POINTSIZE=r,s.FOG=t.fogEnabled&&e.applyFog&&t.fogMode!==de.Scene.FOGMODE_NONE&&n,s.NONUNIFORMSCALING=e.nonUniformScaling,s.ALPHATEST=o)},u.PrepareDefinesForFrameBoundValues=function(e,t,i,r,n){void 0===n&&(n=null);var o,s,a,l,c=!1;o=null==n?void 0!==e.clipPlane&&null!==e.clipPlane:n,s=null==n?void 0!==e.clipPlane2&&null!==e.clipPlane2:n,a=null==n?void 0!==e.clipPlane3&&null!==e.clipPlane3:n,l=null==n?void 0!==e.clipPlane4&&null!==e.clipPlane4:n,i.CLIPPLANE!==o&&(i.CLIPPLANE=o,c=!0),i.CLIPPLANE2!==s&&(i.CLIPPLANE2=s,c=!0),i.CLIPPLANE3!==a&&(i.CLIPPLANE3=a,c=!0),i.CLIPPLANE4!==l&&(i.CLIPPLANE4=l,c=!0),i.DEPTHPREPASS!==!t.getColorWrite()&&(i.DEPTHPREPASS=!i.DEPTHPREPASS,c=!0),i.INSTANCES!==r&&(i.INSTANCES=r,c=!0),c&&i.markAsUnprocessed()},u.PrepareDefinesForAttributes=function(e,t,i,r,n,o){if(void 0===n&&(n=!1),void 0===o&&(o=!0),!t._areAttributesDirty&&t._needNormals===t._normals&&t._needUVs===t._uvs)return!1;if(t._normals=t._needNormals,t._uvs=t._needUVs,t.NORMAL=t._needNormals&&e.isVerticesDataPresent(de.VertexBuffer.NormalKind),t._needNormals&&e.isVerticesDataPresent(de.VertexBuffer.TangentKind)&&(t.TANGENT=!0),t._needUVs?(t.UV1=e.isVerticesDataPresent(de.VertexBuffer.UVKind),t.UV2=e.isVerticesDataPresent(de.VertexBuffer.UV2Kind)):(t.UV1=!1,t.UV2=!1),i){var s=e.useVertexColors&&e.isVerticesDataPresent(de.VertexBuffer.ColorKind);t.VERTEXCOLOR=s,t.VERTEXALPHA=e.hasVertexAlpha&&s&&o}if(r&&(e.useBones&&e.computeBonesUsingShaders&&e.skeleton?(t.NUM_BONE_INFLUENCERS=e.numBoneInfluencers,t.BonesPerMesh=e.skeleton.bones.length+1):(t.NUM_BONE_INFLUENCERS=0,t.BonesPerMesh=0)),n){var a=e.morphTargetManager;a?(t.MORPHTARGETS_TANGENT=a.supportsTangents&&t.TANGENT,t.MORPHTARGETS_NORMAL=a.supportsNormals&&t.NORMAL,t.MORPHTARGETS=0<a.numInfluencers,t.NUM_MORPH_INFLUENCERS=a.numInfluencers):(t.MORPHTARGETS_TANGENT=!1,t.MORPHTARGETS_NORMAL=!1,t.MORPHTARGETS=!1,t.NUM_MORPH_INFLUENCERS=0)}return!0},u.PrepareDefinesForLights=function(e,t,i,r,n,o){if(void 0===n&&(n=4),void 0===o&&(o=!1),!i._areLightsDirty)return i._needNormals;var s=0,a=!1,l=!1,c=!1,h=!1,u=!1;if(e.lightsEnabled&&!o)for(var d=0,f=t._lightSources;d<f.length;d++){var p=f[d];switch(a=!0,void 0===i[\"LIGHT\"+s]&&(l=!0),i[\"LIGHT\"+s]=!0,i[\"SPOTLIGHT\"+s]=!1,i[\"HEMILIGHT\"+s]=!1,i[\"POINTLIGHT\"+s]=!1,i[\"DIRLIGHT\"+s]=!1,p.prepareLightSpecificDefines(i,s),i[\"LIGHT_FALLOFF_PHYSICAL\"+s]=!1,i[\"LIGHT_FALLOFF_GLTF\"+s]=!1,i[\"LIGHT_FALLOFF_STANDARD\"+s]=!1,p.falloffType){case de.Light.FALLOFF_GLTF:i[\"LIGHT_FALLOFF_GLTF\"+s]=!0;break;case de.Light.FALLOFF_PHYSICAL:i[\"LIGHT_FALLOFF_PHYSICAL\"+s]=!0;break;case de.Light.FALLOFF_STANDARD:i[\"LIGHT_FALLOFF_STANDARD\"+s]=!0}if(r&&!p.specular.equalsFloats(0,0,0)&&(u=!0),i[\"SHADOW\"+s]=!1,i[\"SHADOWPCF\"+s]=!1,i[\"SHADOWPCSS\"+s]=!1,i[\"SHADOWPOISSON\"+s]=!1,i[\"SHADOWESM\"+s]=!1,i[\"SHADOWCUBE\"+s]=!1,i[\"SHADOWLOWQUALITY\"+s]=!1,i[\"SHADOWMEDIUMQUALITY\"+s]=!1,t&&t.receiveShadows&&e.shadowsEnabled&&p.shadowEnabled){var _=p.getShadowGenerator();if(_){var m=_.getShadowMap();m&&m.renderList&&0<m.renderList.length&&(h=!0,_.prepareDefines(i,s))}}if(p.lightmapMode!=de.Light.LIGHTMAP_DEFAULT?(c=!0,i[\"LIGHTMAPEXCLUDED\"+s]=!0,i[\"LIGHTMAPNOSPECULAR\"+s]=p.lightmapMode==de.Light.LIGHTMAP_SHADOWSONLY):(i[\"LIGHTMAPEXCLUDED\"+s]=!1,i[\"LIGHTMAPNOSPECULAR\"+s]=!1),++s===n)break}i.SPECULARTERM=u,i.SHADOWS=h;for(var g=s;g<n;g++)void 0!==i[\"LIGHT\"+g]&&(i[\"LIGHT\"+g]=!1,i[\"HEMILIGHT\"+s]=!1,i[\"POINTLIGHT\"+s]=!1,i[\"DIRLIGHT\"+s]=!1,i[\"SPOTLIGHT\"+s]=!1,i[\"SHADOW\"+s]=!1);var v=e.getEngine().getCaps();return void 0===i.SHADOWFLOAT&&(l=!0),i.SHADOWFLOAT=h&&(v.textureFloatRender&&v.textureFloatLinearFiltering||v.textureHalfFloatRender&&v.textureHalfFloatLinearFiltering),i.LIGHTMAPEXCLUDED=c,l&&i.rebuild(),a},u.PrepareUniformsAndSamplersList=function(e,t,i,r){var n;void 0===r&&(r=4);var o=null;if(e.uniformsNames){var s=e;n=s.uniformsNames,o=s.uniformBuffersNames,t=s.samplers,i=s.defines,r=s.maxSimultaneousLights}else n=e,t||(t=[]);for(var a=0;a<r&&i[\"LIGHT\"+a];a++)n.push(\"vLightData\"+a,\"vLightDiffuse\"+a,\"vLightSpecular\"+a,\"vLightDirection\"+a,\"vLightFalloff\"+a,\"vLightGround\"+a,\"lightMatrix\"+a,\"shadowsInfo\"+a,\"depthValues\"+a),o&&o.push(\"Light\"+a),t.push(\"shadowSampler\"+a),t.push(\"depthSampler\"+a),i[\"PROJECTEDLIGHTTEXTURE\"+a]&&(t.push(\"projectionLightSampler\"+a),n.push(\"textureProjectionMatrix\"+a));i.NUM_MORPH_INFLUENCERS&&n.push(\"morphTargetInfluences\")},u.HandleFallbacksForShadows=function(e,t,i,r){void 0===i&&(i=4),void 0===r&&(r=0);for(var n=0,o=0;o<i&&e[\"LIGHT\"+o];o++)0<o&&(n=r+o,t.addFallback(n,\"LIGHT\"+o)),e.SHADOWS||(e[\"SHADOW\"+o]&&t.addFallback(r,\"SHADOW\"+o),e[\"SHADOWPCF\"+o]&&t.addFallback(r,\"SHADOWPCF\"+o),e[\"SHADOWPCSS\"+o]&&t.addFallback(r,\"SHADOWPCSS\"+o),e[\"SHADOWPOISSON\"+o]&&t.addFallback(r,\"SHADOWPOISSON\"+o),e[\"SHADOWESM\"+o]&&t.addFallback(r,\"SHADOWESM\"+o));return n++},u.PrepareAttributesForMorphTargets=function(e,t,i){var r=i.NUM_MORPH_INFLUENCERS;if(0<r&&de.Engine.LastCreatedEngine)for(var n=de.Engine.LastCreatedEngine.getCaps().maxVertexAttribs,o=t.morphTargetManager,s=o&&o.supportsNormals&&i.NORMAL,a=o&&o.supportsTangents&&i.TANGENT,l=0;l<r;l++)e.push(de.VertexBuffer.PositionKind+l),s&&e.push(de.VertexBuffer.NormalKind+l),a&&e.push(de.VertexBuffer.TangentKind+l),e.length>n&&de.Tools.Error(\"Cannot add more vertex attributes for mesh \"+t.name)},u.PrepareAttributesForBones=function(e,t,i,r){0<i.NUM_BONE_INFLUENCERS&&(r.addCPUSkinningFallback(0,t),e.push(de.VertexBuffer.MatricesIndicesKind),e.push(de.VertexBuffer.MatricesWeightsKind),4<i.NUM_BONE_INFLUENCERS&&(e.push(de.VertexBuffer.MatricesIndicesExtraKind),e.push(de.VertexBuffer.MatricesWeightsExtraKind)))},u.PrepareAttributesForInstances=function(e,t){t.INSTANCES&&(e.push(\"world0\"),e.push(\"world1\"),e.push(\"world2\"),e.push(\"world3\"))},u.BindLightShadow=function(e,t,i,r,n){if(e.shadowEnabled&&i.receiveShadows){var o=e.getShadowGenerator();o&&o.bindShadowLight(r,n)}},u.BindLightProperties=function(e,t,i){e.transferToEffect(t,i+\"\")},u.BindLights=function(e,t,i,r,n,o){void 0===n&&(n=4),void 0===o&&(o=!1);for(var s=Math.min(t._lightSources.length,n),a=0;a<s;a++){var l=t._lightSources[a],c=a.toString(),h=l.getScaledIntensity();l._uniformBuffer.bindToEffect(i,\"Light\"+a),u.BindLightProperties(l,i,a),l.diffuse.scaleToRef(h,de.Tmp.Color3[0]),l._uniformBuffer.updateColor4(\"vLightDiffuse\",de.Tmp.Color3[0],o?l.radius:l.range,c),r.SPECULARTERM&&(l.specular.scaleToRef(h,de.Tmp.Color3[1]),l._uniformBuffer.updateColor3(\"vLightSpecular\",de.Tmp.Color3[1],c)),e.shadowsEnabled&&this.BindLightShadow(l,e,t,c,i),l._uniformBuffer.update()}},u.BindFogParameters=function(e,t,i,r){void 0===r&&(r=!1),e.fogEnabled&&t.applyFog&&e.fogMode!==de.Scene.FOGMODE_NONE&&(i.setFloat4(\"vFogInfos\",e.fogMode,e.fogStart,e.fogEnd,e.fogDensity),r?(e.fogColor.toLinearSpaceToRef(this._tempFogColor),i.setColor3(\"vFogColor\",this._tempFogColor)):i.setColor3(\"vFogColor\",e.fogColor))},u.BindBonesParameters=function(e,t){if(t&&e&&(e.computeBonesUsingShaders&&t._bonesComputationForcedToCPU&&(e.computeBonesUsingShaders=!1),e.useBones&&e.computeBonesUsingShaders&&e.skeleton)){var i=e.skeleton.getTransformMatrices(e);i&&t.setMatrices(\"mBones\",i)}},u.BindMorphTargetParameters=function(e,t){var i=e.morphTargetManager;e&&i&&t.setFloatArray(\"morphTargetInfluences\",i.influences)},u.BindLogDepth=function(e,t,i){e.LOGARITHMICDEPTH&&t.setFloat(\"logarithmicDepthConstant\",2/(Math.log(i.activeCamera.maxZ+1)/Math.LN2))},u.BindClipPlane=function(e,t){if(t.clipPlane){var i=t.clipPlane;e.setFloat4(\"vClipPlane\",i.normal.x,i.normal.y,i.normal.z,i.d)}if(t.clipPlane2){i=t.clipPlane2;e.setFloat4(\"vClipPlane2\",i.normal.x,i.normal.y,i.normal.z,i.d)}if(t.clipPlane3){i=t.clipPlane3;e.setFloat4(\"vClipPlane3\",i.normal.x,i.normal.y,i.normal.z,i.d)}if(t.clipPlane4){i=t.clipPlane4;e.setFloat4(\"vClipPlane4\",i.normal.x,i.normal.y,i.normal.z,i.d)}},u._tempFogColor=de.Color3.Black(),u})(),de.MaterialHelper=fe,pe=$a||($a={}),_e=(function(r){function e(e,t){var i=r.call(this,e,t)||this;return i._normalMatrix=new pe.Matrix,i.storeEffectOnSubMeshes=!0,i}return T(e,r),e.prototype.getEffect=function(){return this._activeEffect},e.prototype.isReady=function(e,t){return!!e&&(!e.subMeshes||0===e.subMeshes.length||this.isReadyForSubMesh(e,e.subMeshes[0],t))},e.prototype.bindOnlyWorldMatrix=function(e){this._activeEffect.setMatrix(\"world\",e)},e.prototype.bindOnlyNormalMatrix=function(e){this._activeEffect.setMatrix(\"normalMatrix\",e)},e.prototype.bind=function(e,t){t&&this.bindForSubMesh(e,t,t.subMeshes[0])},e.prototype._afterBind=function(e,t){void 0===t&&(t=null),r.prototype._afterBind.call(this,e),this.getScene()._cachedEffect=t},e.prototype._mustRebind=function(e,t,i){return void 0===i&&(i=1),e.isCachedMaterialInvalid(this,t,i)},e})(pe.Material),pe.PushMaterial=_e,(function(p){var _=(function(t){function e(){var e=t.call(this)||this;return e.MAINUV1=!1,e.MAINUV2=!1,e.DIFFUSE=!1,e.DIFFUSEDIRECTUV=0,e.AMBIENT=!1,e.AMBIENTDIRECTUV=0,e.OPACITY=!1,e.OPACITYDIRECTUV=0,e.OPACITYRGB=!1,e.REFLECTION=!1,e.EMISSIVE=!1,e.EMISSIVEDIRECTUV=0,e.SPECULAR=!1,e.SPECULARDIRECTUV=0,e.BUMP=!1,e.BUMPDIRECTUV=0,e.PARALLAX=!1,e.PARALLAXOCCLUSION=!1,e.SPECULAROVERALPHA=!1,e.CLIPPLANE=!1,e.CLIPPLANE2=!1,e.CLIPPLANE3=!1,e.CLIPPLANE4=!1,e.ALPHATEST=!1,e.DEPTHPREPASS=!1,e.ALPHAFROMDIFFUSE=!1,e.POINTSIZE=!1,e.FOG=!1,e.SPECULARTERM=!1,e.DIFFUSEFRESNEL=!1,e.OPACITYFRESNEL=!1,e.REFLECTIONFRESNEL=!1,e.REFRACTIONFRESNEL=!1,e.EMISSIVEFRESNEL=!1,e.FRESNEL=!1,e.NORMAL=!1,e.UV1=!1,e.UV2=!1,e.VERTEXCOLOR=!1,e.VERTEXALPHA=!1,e.NUM_BONE_INFLUENCERS=0,e.BonesPerMesh=0,e.INSTANCES=!1,e.GLOSSINESS=!1,e.ROUGHNESS=!1,e.EMISSIVEASILLUMINATION=!1,e.LINKEMISSIVEWITHDIFFUSE=!1,e.REFLECTIONFRESNELFROMSPECULAR=!1,e.LIGHTMAP=!1,e.LIGHTMAPDIRECTUV=0,e.OBJECTSPACE_NORMALMAP=!1,e.USELIGHTMAPASSHADOWMAP=!1,e.REFLECTIONMAP_3D=!1,e.REFLECTIONMAP_SPHERICAL=!1,e.REFLECTIONMAP_PLANAR=!1,e.REFLECTIONMAP_CUBIC=!1,e.USE_LOCAL_REFLECTIONMAP_CUBIC=!1,e.REFLECTIONMAP_PROJECTION=!1,e.REFLECTIONMAP_SKYBOX=!1,e.REFLECTIONMAP_SKYBOX_TRANSFORMED=!1,e.REFLECTIONMAP_EXPLICIT=!1,e.REFLECTIONMAP_EQUIRECTANGULAR=!1,e.REFLECTIONMAP_EQUIRECTANGULAR_FIXED=!1,e.REFLECTIONMAP_MIRROREDEQUIRECTANGULAR_FIXED=!1,e.INVERTCUBICMAP=!1,e.LOGARITHMICDEPTH=!1,e.REFRACTION=!1,e.REFRACTIONMAP_3D=!1,e.REFLECTIONOVERALPHA=!1,e.TWOSIDEDLIGHTING=!1,e.SHADOWFLOAT=!1,e.MORPHTARGETS=!1,e.MORPHTARGETS_NORMAL=!1,e.MORPHTARGETS_TANGENT=!1,e.NUM_MORPH_INFLUENCERS=0,e.NONUNIFORMSCALING=!1,e.PREMULTIPLYALPHA=!1,e.IMAGEPROCESSING=!1,e.VIGNETTE=!1,e.VIGNETTEBLENDMODEMULTIPLY=!1,e.VIGNETTEBLENDMODEOPAQUE=!1,e.TONEMAPPING=!1,e.TONEMAPPING_ACES=!1,e.CONTRAST=!1,e.COLORCURVES=!1,e.COLORGRADING=!1,e.COLORGRADING3D=!1,e.SAMPLER3DGREENDEPTH=!1,e.SAMPLER3DBGRMAP=!1,e.IMAGEPROCESSINGPOSTPROCESS=!1,e.IS_REFLECTION_LINEAR=!1,e.IS_REFRACTION_LINEAR=!1,e.EXPOSURE=!1,e.rebuild(),e}return T(e,t),e.prototype.setReflectionMode=function(e){for(var t=0,i=[\"REFLECTIONMAP_CUBIC\",\"REFLECTIONMAP_EXPLICIT\",\"REFLECTIONMAP_PLANAR\",\"REFLECTIONMAP_PROJECTION\",\"REFLECTIONMAP_PROJECTION\",\"REFLECTIONMAP_SKYBOX\",\"REFLECTIONMAP_SPHERICAL\",\"REFLECTIONMAP_EQUIRECTANGULAR\",\"REFLECTIONMAP_EQUIRECTANGULAR_FIXED\",\"REFLECTIONMAP_MIRROREDEQUIRECTANGULAR_FIXED\"];t<i.length;t++){var r=i[t];this[r]=r===e}},e})(p.MaterialDefines);p.StandardMaterialDefines=_;var e=(function(r){function f(e,t){var i=r.call(this,e,t)||this;return i.ambientColor=new p.Color3(0,0,0),i.diffuseColor=new p.Color3(1,1,1),i.specularColor=new p.Color3(1,1,1),i.emissiveColor=new p.Color3(0,0,0),i.specularPower=64,i._useAlphaFromDiffuseTexture=!1,i._useEmissiveAsIllumination=!1,i._linkEmissiveWithDiffuse=!1,i._useSpecularOverAlpha=!1,i._useReflectionOverAlpha=!1,i._disableLighting=!1,i._useObjectSpaceNormalMap=!1,i._useParallax=!1,i._useParallaxOcclusion=!1,i.parallaxScaleBias=.05,i._roughness=0,i.indexOfRefraction=.98,i.invertRefractionY=!0,i.alphaCutOff=.4,i._useLightmapAsShadowmap=!1,i._useReflectionFresnelFromSpecular=!1,i._useGlossinessFromSpecularMapAlpha=!1,i._maxSimultaneousLights=4,i._invertNormalMapX=!1,i._invertNormalMapY=!1,i._twoSidedLighting=!1,i._renderTargets=new p.SmartArray(16),i._worldViewProjectionMatrix=p.Matrix.Zero(),i._globalAmbientColor=new p.Color3(0,0,0),i._attachImageProcessingConfiguration(null),i.getRenderTargetTextures=function(){return i._renderTargets.reset(),f.ReflectionTextureEnabled&&i._reflectionTexture&&i._reflectionTexture.isRenderTarget&&i._renderTargets.push(i._reflectionTexture),f.RefractionTextureEnabled&&i._refractionTexture&&i._refractionTexture.isRenderTarget&&i._renderTargets.push(i._refractionTexture),i._renderTargets},i}return T(f,r),Object.defineProperty(f.prototype,\"imageProcessingConfiguration\",{get:function(){return this._imageProcessingConfiguration},set:function(e){this._attachImageProcessingConfiguration(e),this._markAllSubMeshesAsTexturesDirty()},enumerable:!0,configurable:!0}),f.prototype._attachImageProcessingConfiguration=function(e){var t=this;e!==this._imageProcessingConfiguration&&(this._imageProcessingConfiguration&&this._imageProcessingObserver&&this._imageProcessingConfiguration.onUpdateParameters.remove(this._imageProcessingObserver),this._imageProcessingConfiguration=e||this.getScene().imageProcessingConfiguration,this._imageProcessingConfiguration&&(this._imageProcessingObserver=this._imageProcessingConfiguration.onUpdateParameters.add((function(e){t._markAllSubMeshesAsImageProcessingDirty()}))))},Object.defineProperty(f.prototype,\"cameraColorCurvesEnabled\",{get:function(){return this.imageProcessingConfiguration.colorCurvesEnabled},set:function(e){this.imageProcessingConfiguration.colorCurvesEnabled=e},enumerable:!0,configurable:!0}),Object.defineProperty(f.prototype,\"cameraColorGradingEnabled\",{get:function(){return this.imageProcessingConfiguration.colorGradingEnabled},set:function(e){this.imageProcessingConfiguration.colorGradingEnabled=e},enumerable:!0,configurable:!0}),Object.defineProperty(f.prototype,\"cameraToneMappingEnabled\",{get:function(){return this._imageProcessingConfiguration.toneMappingEnabled},set:function(e){this._imageProcessingConfiguration.toneMappingEnabled=e},enumerable:!0,configurable:!0}),Object.defineProperty(f.prototype,\"cameraExposure\",{get:function(){return this._imageProcessingConfiguration.exposure},set:function(e){this._imageProcessingConfiguration.exposure=e},enumerable:!0,configurable:!0}),Object.defineProperty(f.prototype,\"cameraContrast\",{get:function(){return this._imageProcessingConfiguration.contrast},set:function(e){this._imageProcessingConfiguration.contrast=e},enumerable:!0,configurable:!0}),Object.defineProperty(f.prototype,\"cameraColorGradingTexture\",{get:function(){return this._imageProcessingConfiguration.colorGradingTexture},set:function(e){this._imageProcessingConfiguration.colorGradingTexture=e},enumerable:!0,configurable:!0}),Object.defineProperty(f.prototype,\"cameraColorCurves\",{get:function(){return this._imageProcessingConfiguration.colorCurves},set:function(e){this._imageProcessingConfiguration.colorCurves=e},enumerable:!0,configurable:!0}),Object.defineProperty(f.prototype,\"hasRenderTargetTextures\",{get:function(){return!!(f.ReflectionTextureEnabled&&this._reflectionTexture&&this._reflectionTexture.isRenderTarget)||!!(f.RefractionTextureEnabled&&this._refractionTexture&&this._refractionTexture.isRenderTarget)},enumerable:!0,configurable:!0}),f.prototype.getClassName=function(){return\"StandardMaterial\"},Object.defineProperty(f.prototype,\"useLogarithmicDepth\",{get:function(){return this._useLogarithmicDepth},set:function(e){this._useLogarithmicDepth=e&&this.getScene().getEngine().getCaps().fragmentDepthSupported,this._markAllSubMeshesAsMiscDirty()},enumerable:!0,configurable:!0}),f.prototype.needAlphaBlending=function(){return this.alpha<1||null!=this._opacityTexture||this._shouldUseAlphaFromDiffuseTexture()||this._opacityFresnelParameters&&this._opacityFresnelParameters.isEnabled},f.prototype.needAlphaTesting=function(){return null!=this._diffuseTexture&&this._diffuseTexture.hasAlpha},f.prototype._shouldUseAlphaFromDiffuseTexture=function(){return null!=this._diffuseTexture&&this._diffuseTexture.hasAlpha&&this._useAlphaFromDiffuseTexture},f.prototype.getAlphaTestTexture=function(){return this._diffuseTexture},f.prototype.isReadyForSubMesh=function(e,t,i){if(void 0===i&&(i=!1),t.effect&&this.isFrozen&&this._wasPreviouslyReady)return!0;t._materialDefines||(t._materialDefines=new _);var r=this.getScene(),n=t._materialDefines;if(!this.checkReadyOnEveryCall&&t.effect&&n._renderId===r.getRenderId())return!0;var o=r.getEngine();if(n._needNormals=p.MaterialHelper.PrepareDefinesForLights(r,e,n,!0,this._maxSimultaneousLights,this._disableLighting),n._areTexturesDirty){if(n._needUVs=!1,n.MAINUV1=!1,n.MAINUV2=!1,r.texturesEnabled){if(this._diffuseTexture&&f.DiffuseTextureEnabled){if(!this._diffuseTexture.isReadyOrNotBlocking())return!1;p.MaterialHelper.PrepareDefinesForMergedUV(this._diffuseTexture,n,\"DIFFUSE\")}else n.DIFFUSE=!1;if(this._ambientTexture&&f.AmbientTextureEnabled){if(!this._ambientTexture.isReadyOrNotBlocking())return!1;p.MaterialHelper.PrepareDefinesForMergedUV(this._ambientTexture,n,\"AMBIENT\")}else n.AMBIENT=!1;if(this._opacityTexture&&f.OpacityTextureEnabled){if(!this._opacityTexture.isReadyOrNotBlocking())return!1;p.MaterialHelper.PrepareDefinesForMergedUV(this._opacityTexture,n,\"OPACITY\"),n.OPACITYRGB=this._opacityTexture.getAlphaFromRGB}else n.OPACITY=!1;if(this._reflectionTexture&&f.ReflectionTextureEnabled){if(!this._reflectionTexture.isReadyOrNotBlocking())return!1;switch(n._needNormals=!0,n.REFLECTION=!0,n.ROUGHNESS=0<this._roughness,n.REFLECTIONOVERALPHA=this._useReflectionOverAlpha,n.INVERTCUBICMAP=this._reflectionTexture.coordinatesMode===p.Texture.INVCUBIC_MODE,n.REFLECTIONMAP_3D=this._reflectionTexture.isCube,this._reflectionTexture.coordinatesMode){case p.Texture.EXPLICIT_MODE:n.setReflectionMode(\"REFLECTIONMAP_EXPLICIT\");break;case p.Texture.PLANAR_MODE:n.setReflectionMode(\"REFLECTIONMAP_PLANAR\");break;case p.Texture.PROJECTION_MODE:n.setReflectionMode(\"REFLECTIONMAP_PROJECTION\");break;case p.Texture.SKYBOX_MODE:n.setReflectionMode(\"REFLECTIONMAP_SKYBOX\"),n.REFLECTIONMAP_SKYBOX_TRANSFORMED=!this._reflectionTexture.getReflectionTextureMatrix().isIdentity();break;case p.Texture.SPHERICAL_MODE:n.setReflectionMode(\"REFLECTIONMAP_SPHERICAL\");break;case p.Texture.EQUIRECTANGULAR_MODE:n.setReflectionMode(\"REFLECTIONMAP_EQUIRECTANGULAR\");break;case p.Texture.FIXED_EQUIRECTANGULAR_MODE:n.setReflectionMode(\"REFLECTIONMAP_EQUIRECTANGULAR_FIXED\");break;case p.Texture.FIXED_EQUIRECTANGULAR_MIRRORED_MODE:n.setReflectionMode(\"REFLECTIONMAP_MIRROREDEQUIRECTANGULAR_FIXED\");break;case p.Texture.CUBIC_MODE:case p.Texture.INVCUBIC_MODE:default:n.setReflectionMode(\"REFLECTIONMAP_CUBIC\")}n.USE_LOCAL_REFLECTIONMAP_CUBIC=!!this._reflectionTexture.boundingBoxSize}else n.REFLECTION=!1;if(this._emissiveTexture&&f.EmissiveTextureEnabled){if(!this._emissiveTexture.isReadyOrNotBlocking())return!1;p.MaterialHelper.PrepareDefinesForMergedUV(this._emissiveTexture,n,\"EMISSIVE\")}else n.EMISSIVE=!1;if(this._lightmapTexture&&f.LightmapTextureEnabled){if(!this._lightmapTexture.isReadyOrNotBlocking())return!1;p.MaterialHelper.PrepareDefinesForMergedUV(this._lightmapTexture,n,\"LIGHTMAP\"),n.USELIGHTMAPASSHADOWMAP=this._useLightmapAsShadowmap}else n.LIGHTMAP=!1;if(this._specularTexture&&f.SpecularTextureEnabled){if(!this._specularTexture.isReadyOrNotBlocking())return!1;p.MaterialHelper.PrepareDefinesForMergedUV(this._specularTexture,n,\"SPECULAR\"),n.GLOSSINESS=this._useGlossinessFromSpecularMapAlpha}else n.SPECULAR=!1;if(r.getEngine().getCaps().standardDerivatives&&this._bumpTexture&&f.BumpTextureEnabled){if(!this._bumpTexture.isReady())return!1;p.MaterialHelper.PrepareDefinesForMergedUV(this._bumpTexture,n,\"BUMP\"),n.PARALLAX=this._useParallax,n.PARALLAXOCCLUSION=this._useParallaxOcclusion,n.OBJECTSPACE_NORMALMAP=this._useObjectSpaceNormalMap}else n.BUMP=!1;if(this._refractionTexture&&f.RefractionTextureEnabled){if(!this._refractionTexture.isReadyOrNotBlocking())return!1;n._needUVs=!0,n.REFRACTION=!0,n.REFRACTIONMAP_3D=this._refractionTexture.isCube}else n.REFRACTION=!1;n.TWOSIDEDLIGHTING=!this._backFaceCulling&&this._twoSidedLighting}else n.DIFFUSE=!1,n.AMBIENT=!1,n.OPACITY=!1,n.REFLECTION=!1,n.EMISSIVE=!1,n.LIGHTMAP=!1,n.BUMP=!1,n.REFRACTION=!1;n.ALPHAFROMDIFFUSE=this._shouldUseAlphaFromDiffuseTexture(),n.EMISSIVEASILLUMINATION=this._useEmissiveAsIllumination,n.LINKEMISSIVEWITHDIFFUSE=this._linkEmissiveWithDiffuse,n.SPECULAROVERALPHA=this._useSpecularOverAlpha,n.PREMULTIPLYALPHA=this.alphaMode===p.Engine.ALPHA_PREMULTIPLIED||this.alphaMode===p.Engine.ALPHA_PREMULTIPLIED_PORTERDUFF}if(n._areImageProcessingDirty&&this._imageProcessingConfiguration){if(!this._imageProcessingConfiguration.isReady())return!1;this._imageProcessingConfiguration.prepareDefines(n),n.IS_REFLECTION_LINEAR=null!=this.reflectionTexture&&!this.reflectionTexture.gammaSpace,n.IS_REFRACTION_LINEAR=null!=this.refractionTexture&&!this.refractionTexture.gammaSpace}if(n._areFresnelDirty&&(f.FresnelEnabled?(this._diffuseFresnelParameters||this._opacityFresnelParameters||this._emissiveFresnelParameters||this._refractionFresnelParameters||this._reflectionFresnelParameters)&&(n.DIFFUSEFRESNEL=this._diffuseFresnelParameters&&this._diffuseFresnelParameters.isEnabled,n.OPACITYFRESNEL=this._opacityFresnelParameters&&this._opacityFresnelParameters.isEnabled,n.REFLECTIONFRESNEL=this._reflectionFresnelParameters&&this._reflectionFresnelParameters.isEnabled,n.REFLECTIONFRESNELFROMSPECULAR=this._useReflectionFresnelFromSpecular,n.REFRACTIONFRESNEL=this._refractionFresnelParameters&&this._refractionFresnelParameters.isEnabled,n.EMISSIVEFRESNEL=this._emissiveFresnelParameters&&this._emissiveFresnelParameters.isEnabled,n._needNormals=!0,n.FRESNEL=!0):n.FRESNEL=!1),p.MaterialHelper.PrepareDefinesForMisc(e,r,this._useLogarithmicDepth,this.pointsCloud,this.fogEnabled,this._shouldTurnAlphaTestOn(e),n),p.MaterialHelper.PrepareDefinesForAttributes(e,n,!0,!0,!0),p.MaterialHelper.PrepareDefinesForFrameBoundValues(r,o,n,i),n.isDirty){n.markAsProcessed(),r.resetCachedMaterial();var s=new p.EffectFallbacks;n.REFLECTION&&s.addFallback(0,\"REFLECTION\"),n.SPECULAR&&s.addFallback(0,\"SPECULAR\"),n.BUMP&&s.addFallback(0,\"BUMP\"),n.PARALLAX&&s.addFallback(1,\"PARALLAX\"),n.PARALLAXOCCLUSION&&s.addFallback(0,\"PARALLAXOCCLUSION\"),n.SPECULAROVERALPHA&&s.addFallback(0,\"SPECULAROVERALPHA\"),n.FOG&&s.addFallback(1,\"FOG\"),n.POINTSIZE&&s.addFallback(0,\"POINTSIZE\"),n.LOGARITHMICDEPTH&&s.addFallback(0,\"LOGARITHMICDEPTH\"),p.MaterialHelper.HandleFallbacksForShadows(n,s,this._maxSimultaneousLights),n.SPECULARTERM&&s.addFallback(0,\"SPECULARTERM\"),n.DIFFUSEFRESNEL&&s.addFallback(1,\"DIFFUSEFRESNEL\"),n.OPACITYFRESNEL&&s.addFallback(2,\"OPACITYFRESNEL\"),n.REFLECTIONFRESNEL&&s.addFallback(3,\"REFLECTIONFRESNEL\"),n.EMISSIVEFRESNEL&&s.addFallback(4,\"EMISSIVEFRESNEL\"),n.FRESNEL&&s.addFallback(4,\"FRESNEL\");var a=[p.VertexBuffer.PositionKind];n.NORMAL&&a.push(p.VertexBuffer.NormalKind),n.UV1&&a.push(p.VertexBuffer.UVKind),n.UV2&&a.push(p.VertexBuffer.UV2Kind),n.VERTEXCOLOR&&a.push(p.VertexBuffer.ColorKind),p.MaterialHelper.PrepareAttributesForBones(a,e,n,s),p.MaterialHelper.PrepareAttributesForInstances(a,n),p.MaterialHelper.PrepareAttributesForMorphTargets(a,e,n);var l=\"default\",c=[\"world\",\"view\",\"viewProjection\",\"vEyePosition\",\"vLightsType\",\"vAmbientColor\",\"vDiffuseColor\",\"vSpecularColor\",\"vEmissiveColor\",\"vFogInfos\",\"vFogColor\",\"pointSize\",\"vDiffuseInfos\",\"vAmbientInfos\",\"vOpacityInfos\",\"vReflectionInfos\",\"vEmissiveInfos\",\"vSpecularInfos\",\"vBumpInfos\",\"vLightmapInfos\",\"vRefractionInfos\",\"mBones\",\"vClipPlane\",\"vClipPlane2\",\"vClipPlane3\",\"vClipPlane4\",\"diffuseMatrix\",\"ambientMatrix\",\"opacityMatrix\",\"reflectionMatrix\",\"emissiveMatrix\",\"specularMatrix\",\"bumpMatrix\",\"normalMatrix\",\"lightmapMatrix\",\"refractionMatrix\",\"diffuseLeftColor\",\"diffuseRightColor\",\"opacityParts\",\"reflectionLeftColor\",\"reflectionRightColor\",\"emissiveLeftColor\",\"emissiveRightColor\",\"refractionLeftColor\",\"refractionRightColor\",\"vReflectionPosition\",\"vReflectionSize\",\"logarithmicDepthConstant\",\"vTangentSpaceParams\",\"alphaCutOff\"],h=[\"diffuseSampler\",\"ambientSampler\",\"opacitySampler\",\"reflectionCubeSampler\",\"reflection2DSampler\",\"emissiveSampler\",\"specularSampler\",\"bumpSampler\",\"lightmapSampler\",\"refractionCubeSampler\",\"refraction2DSampler\"],u=[\"Material\",\"Scene\"];p.ImageProcessingConfiguration&&(p.ImageProcessingConfiguration.PrepareUniforms(c,n),p.ImageProcessingConfiguration.PrepareSamplers(h,n)),p.MaterialHelper.PrepareUniformsAndSamplersList({uniformsNames:c,uniformBuffersNames:u,samplers:h,defines:n,maxSimultaneousLights:this._maxSimultaneousLights}),this.customShaderNameResolve&&(l=this.customShaderNameResolve(l,c,u,h,n));var d=n.toString();t.setEffect(r.getEngine().createEffect(l,{attributes:a,uniformsNames:c,uniformBuffersNames:u,samplers:h,defines:d,fallbacks:s,onCompiled:this.onCompiled,onError:this.onError,indexParameters:{maxSimultaneousLights:this._maxSimultaneousLights,maxSimultaneousMorphTargets:n.NUM_MORPH_INFLUENCERS}},o),n),this.buildUniformLayout()}return!(!t.effect||!t.effect.isReady())&&(n._renderId=r.getRenderId(),this._wasPreviouslyReady=!0)},f.prototype.buildUniformLayout=function(){this._uniformBuffer.addUniform(\"diffuseLeftColor\",4),this._uniformBuffer.addUniform(\"diffuseRightColor\",4),this._uniformBuffer.addUniform(\"opacityParts\",4),this._uniformBuffer.addUniform(\"reflectionLeftColor\",4),this._uniformBuffer.addUniform(\"reflectionRightColor\",4),this._uniformBuffer.addUniform(\"refractionLeftColor\",4),this._uniformBuffer.addUniform(\"refractionRightColor\",4),this._uniformBuffer.addUniform(\"emissiveLeftColor\",4),this._uniformBuffer.addUniform(\"emissiveRightColor\",4),this._uniformBuffer.addUniform(\"vDiffuseInfos\",2),this._uniformBuffer.addUniform(\"vAmbientInfos\",2),this._uniformBuffer.addUniform(\"vOpacityInfos\",2),this._uniformBuffer.addUniform(\"vReflectionInfos\",2),this._uniformBuffer.addUniform(\"vReflectionPosition\",3),this._uniformBuffer.addUniform(\"vReflectionSize\",3),this._uniformBuffer.addUniform(\"vEmissiveInfos\",2),this._uniformBuffer.addUniform(\"vLightmapInfos\",2),this._uniformBuffer.addUniform(\"vSpecularInfos\",2),this._uniformBuffer.addUniform(\"vBumpInfos\",3),this._uniformBuffer.addUniform(\"diffuseMatrix\",16),this._uniformBuffer.addUniform(\"ambientMatrix\",16),this._uniformBuffer.addUniform(\"opacityMatrix\",16),this._uniformBuffer.addUniform(\"reflectionMatrix\",16),this._uniformBuffer.addUniform(\"emissiveMatrix\",16),this._uniformBuffer.addUniform(\"lightmapMatrix\",16),this._uniformBuffer.addUniform(\"specularMatrix\",16),this._uniformBuffer.addUniform(\"bumpMatrix\",16),this._uniformBuffer.addUniform(\"vTangentSpaceParams\",2),this._uniformBuffer.addUniform(\"refractionMatrix\",16),this._uniformBuffer.addUniform(\"vRefractionInfos\",4),this._uniformBuffer.addUniform(\"vSpecularColor\",4),this._uniformBuffer.addUniform(\"vEmissiveColor\",3),this._uniformBuffer.addUniform(\"vDiffuseColor\",4),this._uniformBuffer.addUniform(\"pointSize\",1),this._uniformBuffer.create()},f.prototype.unbind=function(){if(this._activeEffect){var e=!1;this._reflectionTexture&&this._reflectionTexture.isRenderTarget&&(this._activeEffect.setTexture(\"reflection2DSampler\",null),e=!0),this._refractionTexture&&this._refractionTexture.isRenderTarget&&(this._activeEffect.setTexture(\"refraction2DSampler\",null),e=!0),e&&this._markAllSubMeshesAsTexturesDirty()}r.prototype.unbind.call(this)},f.prototype.bindForSubMesh=function(e,t,i){var r=this.getScene(),n=i._materialDefines;if(n){var o=i.effect;if(o){this._activeEffect=o,this.bindOnlyWorldMatrix(e),n.OBJECTSPACE_NORMALMAP&&(e.toNormalMatrix(this._normalMatrix),this.bindOnlyNormalMatrix(this._normalMatrix));var s=this._mustRebind(r,o,t.visibility);if(p.MaterialHelper.BindBonesParameters(t,o),s){if(this._uniformBuffer.bindToEffect(o,\"Material\"),this.bindViewProjection(o),!this._uniformBuffer.useUbo||!this.isFrozen||!this._uniformBuffer.isSync){if(f.FresnelEnabled&&n.FRESNEL&&(this.diffuseFresnelParameters&&this.diffuseFresnelParameters.isEnabled&&(this._uniformBuffer.updateColor4(\"diffuseLeftColor\",this.diffuseFresnelParameters.leftColor,this.diffuseFresnelParameters.power),this._uniformBuffer.updateColor4(\"diffuseRightColor\",this.diffuseFresnelParameters.rightColor,this.diffuseFresnelParameters.bias)),this.opacityFresnelParameters&&this.opacityFresnelParameters.isEnabled&&this._uniformBuffer.updateColor4(\"opacityParts\",new p.Color3(this.opacityFresnelParameters.leftColor.toLuminance(),this.opacityFresnelParameters.rightColor.toLuminance(),this.opacityFresnelParameters.bias),this.opacityFresnelParameters.power),this.reflectionFresnelParameters&&this.reflectionFresnelParameters.isEnabled&&(this._uniformBuffer.updateColor4(\"reflectionLeftColor\",this.reflectionFresnelParameters.leftColor,this.reflectionFresnelParameters.power),this._uniformBuffer.updateColor4(\"reflectionRightColor\",this.reflectionFresnelParameters.rightColor,this.reflectionFresnelParameters.bias)),this.refractionFresnelParameters&&this.refractionFresnelParameters.isEnabled&&(this._uniformBuffer.updateColor4(\"refractionLeftColor\",this.refractionFresnelParameters.leftColor,this.refractionFresnelParameters.power),this._uniformBuffer.updateColor4(\"refractionRightColor\",this.refractionFresnelParameters.rightColor,this.refractionFresnelParameters.bias)),this.emissiveFresnelParameters&&this.emissiveFresnelParameters.isEnabled&&(this._uniformBuffer.updateColor4(\"emissiveLeftColor\",this.emissiveFresnelParameters.leftColor,this.emissiveFresnelParameters.power),this._uniformBuffer.updateColor4(\"emissiveRightColor\",this.emissiveFresnelParameters.rightColor,this.emissiveFresnelParameters.bias))),r.texturesEnabled){if(this._diffuseTexture&&f.DiffuseTextureEnabled&&(this._uniformBuffer.updateFloat2(\"vDiffuseInfos\",this._diffuseTexture.coordinatesIndex,this._diffuseTexture.level),p.MaterialHelper.BindTextureMatrix(this._diffuseTexture,this._uniformBuffer,\"diffuse\"),this._diffuseTexture.hasAlpha&&o.setFloat(\"alphaCutOff\",this.alphaCutOff)),this._ambientTexture&&f.AmbientTextureEnabled&&(this._uniformBuffer.updateFloat2(\"vAmbientInfos\",this._ambientTexture.coordinatesIndex,this._ambientTexture.level),p.MaterialHelper.BindTextureMatrix(this._ambientTexture,this._uniformBuffer,\"ambient\")),this._opacityTexture&&f.OpacityTextureEnabled&&(this._uniformBuffer.updateFloat2(\"vOpacityInfos\",this._opacityTexture.coordinatesIndex,this._opacityTexture.level),p.MaterialHelper.BindTextureMatrix(this._opacityTexture,this._uniformBuffer,\"opacity\")),this._reflectionTexture&&f.ReflectionTextureEnabled&&(this._uniformBuffer.updateFloat2(\"vReflectionInfos\",this._reflectionTexture.level,this.roughness),this._uniformBuffer.updateMatrix(\"reflectionMatrix\",this._reflectionTexture.getReflectionTextureMatrix()),this._reflectionTexture.boundingBoxSize)){var a=this._reflectionTexture;this._uniformBuffer.updateVector3(\"vReflectionPosition\",a.boundingBoxPosition),this._uniformBuffer.updateVector3(\"vReflectionSize\",a.boundingBoxSize)}if(this._emissiveTexture&&f.EmissiveTextureEnabled&&(this._uniformBuffer.updateFloat2(\"vEmissiveInfos\",this._emissiveTexture.coordinatesIndex,this._emissiveTexture.level),p.MaterialHelper.BindTextureMatrix(this._emissiveTexture,this._uniformBuffer,\"emissive\")),this._lightmapTexture&&f.LightmapTextureEnabled&&(this._uniformBuffer.updateFloat2(\"vLightmapInfos\",this._lightmapTexture.coordinatesIndex,this._lightmapTexture.level),p.MaterialHelper.BindTextureMatrix(this._lightmapTexture,this._uniformBuffer,\"lightmap\")),this._specularTexture&&f.SpecularTextureEnabled&&(this._uniformBuffer.updateFloat2(\"vSpecularInfos\",this._specularTexture.coordinatesIndex,this._specularTexture.level),p.MaterialHelper.BindTextureMatrix(this._specularTexture,this._uniformBuffer,\"specular\")),this._bumpTexture&&r.getEngine().getCaps().standardDerivatives&&f.BumpTextureEnabled&&(this._uniformBuffer.updateFloat3(\"vBumpInfos\",this._bumpTexture.coordinatesIndex,1/this._bumpTexture.level,this.parallaxScaleBias),p.MaterialHelper.BindTextureMatrix(this._bumpTexture,this._uniformBuffer,\"bump\"),r._mirroredCameraPosition?this._uniformBuffer.updateFloat2(\"vTangentSpaceParams\",this._invertNormalMapX?1:-1,this._invertNormalMapY?1:-1):this._uniformBuffer.updateFloat2(\"vTangentSpaceParams\",this._invertNormalMapX?-1:1,this._invertNormalMapY?-1:1)),this._refractionTexture&&f.RefractionTextureEnabled){var l=1;this._refractionTexture.isCube||(this._uniformBuffer.updateMatrix(\"refractionMatrix\",this._refractionTexture.getReflectionTextureMatrix()),this._refractionTexture.depth&&(l=this._refractionTexture.depth)),this._uniformBuffer.updateFloat4(\"vRefractionInfos\",this._refractionTexture.level,this.indexOfRefraction,l,this.invertRefractionY?-1:1)}}this.pointsCloud&&this._uniformBuffer.updateFloat(\"pointSize\",this.pointSize),n.SPECULARTERM&&this._uniformBuffer.updateColor4(\"vSpecularColor\",this.specularColor,this.specularPower),this._uniformBuffer.updateColor3(\"vEmissiveColor\",this.emissiveColor),this._uniformBuffer.updateColor4(\"vDiffuseColor\",this.diffuseColor,this.alpha*t.visibility)}if(r.texturesEnabled&&(this._diffuseTexture&&f.DiffuseTextureEnabled&&o.setTexture(\"diffuseSampler\",this._diffuseTexture),this._ambientTexture&&f.AmbientTextureEnabled&&o.setTexture(\"ambientSampler\",this._ambientTexture),this._opacityTexture&&f.OpacityTextureEnabled&&o.setTexture(\"opacitySampler\",this._opacityTexture),this._reflectionTexture&&f.ReflectionTextureEnabled&&(this._reflectionTexture.isCube?o.setTexture(\"reflectionCubeSampler\",this._reflectionTexture):o.setTexture(\"reflection2DSampler\",this._reflectionTexture)),this._emissiveTexture&&f.EmissiveTextureEnabled&&o.setTexture(\"emissiveSampler\",this._emissiveTexture),this._lightmapTexture&&f.LightmapTextureEnabled&&o.setTexture(\"lightmapSampler\",this._lightmapTexture),this._specularTexture&&f.SpecularTextureEnabled&&o.setTexture(\"specularSampler\",this._specularTexture),this._bumpTexture&&r.getEngine().getCaps().standardDerivatives&&f.BumpTextureEnabled&&o.setTexture(\"bumpSampler\",this._bumpTexture),this._refractionTexture&&f.RefractionTextureEnabled)){l=1;this._refractionTexture.isCube?o.setTexture(\"refractionCubeSampler\",this._refractionTexture):o.setTexture(\"refraction2DSampler\",this._refractionTexture)}p.MaterialHelper.BindClipPlane(o,r),r.ambientColor.multiplyToRef(this.ambientColor,this._globalAmbientColor),p.MaterialHelper.BindEyePosition(o,r),o.setColor3(\"vAmbientColor\",this._globalAmbientColor)}!s&&this.isFrozen||(r.lightsEnabled&&!this._disableLighting&&p.MaterialHelper.BindLights(r,t,o,n,this._maxSimultaneousLights),(r.fogEnabled&&t.applyFog&&r.fogMode!==p.Scene.FOGMODE_NONE||this._reflectionTexture||this._refractionTexture)&&this.bindView(o),p.MaterialHelper.BindFogParameters(r,t,o),n.NUM_MORPH_INFLUENCERS&&p.MaterialHelper.BindMorphTargetParameters(t,o),p.MaterialHelper.BindLogDepth(n,o,r),this._imageProcessingConfiguration&&!this._imageProcessingConfiguration.applyByPostProcess&&this._imageProcessingConfiguration.bind(this._activeEffect)),this._uniformBuffer.update(),this._afterBind(t,this._activeEffect)}}},f.prototype.getAnimatables=function(){var e=[];return this._diffuseTexture&&this._diffuseTexture.animations&&0<this._diffuseTexture.animations.length&&e.push(this._diffuseTexture),this._ambientTexture&&this._ambientTexture.animations&&0<this._ambientTexture.animations.length&&e.push(this._ambientTexture),this._opacityTexture&&this._opacityTexture.animations&&0<this._opacityTexture.animations.length&&e.push(this._opacityTexture),this._reflectionTexture&&this._reflectionTexture.animations&&0<this._reflectionTexture.animations.length&&e.push(this._reflectionTexture),this._emissiveTexture&&this._emissiveTexture.animations&&0<this._emissiveTexture.animations.length&&e.push(this._emissiveTexture),this._specularTexture&&this._specularTexture.animations&&0<this._specularTexture.animations.length&&e.push(this._specularTexture),this._bumpTexture&&this._bumpTexture.animations&&0<this._bumpTexture.animations.length&&e.push(this._bumpTexture),this._lightmapTexture&&this._lightmapTexture.animations&&0<this._lightmapTexture.animations.length&&e.push(this._lightmapTexture),this._refractionTexture&&this._refractionTexture.animations&&0<this._refractionTexture.animations.length&&e.push(this._refractionTexture),e},f.prototype.getActiveTextures=function(){var e=r.prototype.getActiveTextures.call(this);return this._diffuseTexture&&e.push(this._diffuseTexture),this._ambientTexture&&e.push(this._ambientTexture),this._opacityTexture&&e.push(this._opacityTexture),this._reflectionTexture&&e.push(this._reflectionTexture),this._emissiveTexture&&e.push(this._emissiveTexture),this._specularTexture&&e.push(this._specularTexture),this._bumpTexture&&e.push(this._bumpTexture),this._lightmapTexture&&e.push(this._lightmapTexture),this._refractionTexture&&e.push(this._refractionTexture),e},f.prototype.hasTexture=function(e){return!!r.prototype.hasTexture.call(this,e)||(this._diffuseTexture===e||(this._ambientTexture===e||(this._opacityTexture===e||(this._reflectionTexture===e||(this._emissiveTexture===e||(this._specularTexture===e||(this._bumpTexture===e||(this._lightmapTexture===e||this._refractionTexture===e))))))))},f.prototype.dispose=function(e,t){t&&(this._diffuseTexture&&this._diffuseTexture.dispose(),this._ambientTexture&&this._ambientTexture.dispose(),this._opacityTexture&&this._opacityTexture.dispose(),this._reflectionTexture&&this._reflectionTexture.dispose(),this._emissiveTexture&&this._emissiveTexture.dispose(),this._specularTexture&&this._specularTexture.dispose(),this._bumpTexture&&this._bumpTexture.dispose(),this._lightmapTexture&&this._lightmapTexture.dispose(),this._refractionTexture&&this._refractionTexture.dispose()),this._imageProcessingConfiguration&&this._imageProcessingObserver&&this._imageProcessingConfiguration.onUpdateParameters.remove(this._imageProcessingObserver),r.prototype.dispose.call(this,e,t)},f.prototype.clone=function(e){var t=this,i=p.SerializationHelper.Clone((function(){return new f(e,t.getScene())}),this);return i.name=e,i.id=e,i},f.prototype.serialize=function(){return p.SerializationHelper.Serialize(this)},f.Parse=function(e,t,i){return p.SerializationHelper.Parse((function(){return new f(e.name,t)}),e,t,i)},Object.defineProperty(f,\"DiffuseTextureEnabled\",{get:function(){return f._DiffuseTextureEnabled},set:function(e){f._DiffuseTextureEnabled!==e&&(f._DiffuseTextureEnabled=e,p.Engine.MarkAllMaterialsAsDirty(p.Material.TextureDirtyFlag))},enumerable:!0,configurable:!0}),Object.defineProperty(f,\"AmbientTextureEnabled\",{get:function(){return f._AmbientTextureEnabled},set:function(e){f._AmbientTextureEnabled!==e&&(f._AmbientTextureEnabled=e,p.Engine.MarkAllMaterialsAsDirty(p.Material.TextureDirtyFlag))},enumerable:!0,configurable:!0}),Object.defineProperty(f,\"OpacityTextureEnabled\",{get:function(){return f._OpacityTextureEnabled},set:function(e){f._OpacityTextureEnabled!==e&&(f._OpacityTextureEnabled=e,p.Engine.MarkAllMaterialsAsDirty(p.Material.TextureDirtyFlag))},enumerable:!0,configurable:!0}),Object.defineProperty(f,\"ReflectionTextureEnabled\",{get:function(){return f._ReflectionTextureEnabled},set:function(e){f._ReflectionTextureEnabled!==e&&(f._ReflectionTextureEnabled=e,p.Engine.MarkAllMaterialsAsDirty(p.Material.TextureDirtyFlag))},enumerable:!0,configurable:!0}),Object.defineProperty(f,\"EmissiveTextureEnabled\",{get:function(){return f._EmissiveTextureEnabled},set:function(e){f._EmissiveTextureEnabled!==e&&(f._EmissiveTextureEnabled=e,p.Engine.MarkAllMaterialsAsDirty(p.Material.TextureDirtyFlag))},enumerable:!0,configurable:!0}),Object.defineProperty(f,\"SpecularTextureEnabled\",{get:function(){return f._SpecularTextureEnabled},set:function(e){f._SpecularTextureEnabled!==e&&(f._SpecularTextureEnabled=e,p.Engine.MarkAllMaterialsAsDirty(p.Material.TextureDirtyFlag))},enumerable:!0,configurable:!0}),Object.defineProperty(f,\"BumpTextureEnabled\",{get:function(){return f._BumpTextureEnabled},set:function(e){f._BumpTextureEnabled!==e&&(f._BumpTextureEnabled=e,p.Engine.MarkAllMaterialsAsDirty(p.Material.TextureDirtyFlag))},enumerable:!0,configurable:!0}),Object.defineProperty(f,\"LightmapTextureEnabled\",{get:function(){return f._LightmapTextureEnabled},set:function(e){f._LightmapTextureEnabled!==e&&(f._LightmapTextureEnabled=e,p.Engine.MarkAllMaterialsAsDirty(p.Material.TextureDirtyFlag))},enumerable:!0,configurable:!0}),Object.defineProperty(f,\"RefractionTextureEnabled\",{get:function(){return f._RefractionTextureEnabled},set:function(e){f._RefractionTextureEnabled!==e&&(f._RefractionTextureEnabled=e,p.Engine.MarkAllMaterialsAsDirty(p.Material.TextureDirtyFlag))},enumerable:!0,configurable:!0}),Object.defineProperty(f,\"ColorGradingTextureEnabled\",{get:function(){return f._ColorGradingTextureEnabled},set:function(e){f._ColorGradingTextureEnabled!==e&&(f._ColorGradingTextureEnabled=e,p.Engine.MarkAllMaterialsAsDirty(p.Material.TextureDirtyFlag))},enumerable:!0,configurable:!0}),Object.defineProperty(f,\"FresnelEnabled\",{get:function(){return f._FresnelEnabled},set:function(e){f._FresnelEnabled!==e&&(f._FresnelEnabled=e,p.Engine.MarkAllMaterialsAsDirty(p.Material.FresnelDirtyFlag))},enumerable:!0,configurable:!0}),f._DiffuseTextureEnabled=!0,f._AmbientTextureEnabled=!0,f._OpacityTextureEnabled=!0,f._ReflectionTextureEnabled=!0,f._EmissiveTextureEnabled=!0,f._SpecularTextureEnabled=!0,f._BumpTextureEnabled=!0,f._LightmapTextureEnabled=!0,f._RefractionTextureEnabled=!0,f._ColorGradingTextureEnabled=!0,f._FresnelEnabled=!0,b([p.serializeAsTexture(\"diffuseTexture\")],f.prototype,\"_diffuseTexture\",void 0),b([p.expandToProperty(\"_markAllSubMeshesAsTexturesAndMiscDirty\")],f.prototype,\"diffuseTexture\",void 0),b([p.serializeAsTexture(\"ambientTexture\")],f.prototype,\"_ambientTexture\",void 0),b([p.expandToProperty(\"_markAllSubMeshesAsTexturesDirty\")],f.prototype,\"ambientTexture\",void 0),b([p.serializeAsTexture(\"opacityTexture\")],f.prototype,\"_opacityTexture\",void 0),b([p.expandToProperty(\"_markAllSubMeshesAsTexturesAndMiscDirty\")],f.prototype,\"opacityTexture\",void 0),b([p.serializeAsTexture(\"reflectionTexture\")],f.prototype,\"_reflectionTexture\",void 0),b([p.expandToProperty(\"_markAllSubMeshesAsTexturesDirty\")],f.prototype,\"reflectionTexture\",void 0),b([p.serializeAsTexture(\"emissiveTexture\")],f.prototype,\"_emissiveTexture\",void 0),b([p.expandToProperty(\"_markAllSubMeshesAsTexturesDirty\")],f.prototype,\"emissiveTexture\",void 0),b([p.serializeAsTexture(\"specularTexture\")],f.prototype,\"_specularTexture\",void 0),b([p.expandToProperty(\"_markAllSubMeshesAsTexturesDirty\")],f.prototype,\"specularTexture\",void 0),b([p.serializeAsTexture(\"bumpTexture\")],f.prototype,\"_bumpTexture\",void 0),b([p.expandToProperty(\"_markAllSubMeshesAsTexturesDirty\")],f.prototype,\"bumpTexture\",void 0),b([p.serializeAsTexture(\"lightmapTexture\")],f.prototype,\"_lightmapTexture\",void 0),b([p.expandToProperty(\"_markAllSubMeshesAsTexturesDirty\")],f.prototype,\"lightmapTexture\",void 0),b([p.serializeAsTexture(\"refractionTexture\")],f.prototype,\"_refractionTexture\",void 0),b([p.expandToProperty(\"_markAllSubMeshesAsTexturesDirty\")],f.prototype,\"refractionTexture\",void 0),b([p.serializeAsColor3(\"ambient\")],f.prototype,\"ambientColor\",void 0),b([p.serializeAsColor3(\"diffuse\")],f.prototype,\"diffuseColor\",void 0),b([p.serializeAsColor3(\"specular\")],f.prototype,\"specularColor\",void 0),b([p.serializeAsColor3(\"emissive\")],f.prototype,\"emissiveColor\",void 0),b([p.serialize()],f.prototype,\"specularPower\",void 0),b([p.serialize(\"useAlphaFromDiffuseTexture\")],f.prototype,\"_useAlphaFromDiffuseTexture\",void 0),b([p.expandToProperty(\"_markAllSubMeshesAsTexturesDirty\")],f.prototype,\"useAlphaFromDiffuseTexture\",void 0),b([p.serialize(\"useEmissiveAsIllumination\")],f.prototype,\"_useEmissiveAsIllumination\",void 0),b([p.expandToProperty(\"_markAllSubMeshesAsTexturesDirty\")],f.prototype,\"useEmissiveAsIllumination\",void 0),b([p.serialize(\"linkEmissiveWithDiffuse\")],f.prototype,\"_linkEmissiveWithDiffuse\",void 0),b([p.expandToProperty(\"_markAllSubMeshesAsTexturesDirty\")],f.prototype,\"linkEmissiveWithDiffuse\",void 0),b([p.serialize(\"useSpecularOverAlpha\")],f.prototype,\"_useSpecularOverAlpha\",void 0),b([p.expandToProperty(\"_markAllSubMeshesAsTexturesDirty\")],f.prototype,\"useSpecularOverAlpha\",void 0),b([p.serialize(\"useReflectionOverAlpha\")],f.prototype,\"_useReflectionOverAlpha\",void 0),b([p.expandToProperty(\"_markAllSubMeshesAsTexturesDirty\")],f.prototype,\"useReflectionOverAlpha\",void 0),b([p.serialize(\"disableLighting\")],f.prototype,\"_disableLighting\",void 0),b([p.expandToProperty(\"_markAllSubMeshesAsLightsDirty\")],f.prototype,\"disableLighting\",void 0),b([p.serialize(\"useObjectSpaceNormalMap\")],f.prototype,\"_useObjectSpaceNormalMap\",void 0),b([p.expandToProperty(\"_markAllSubMeshesAsTexturesDirty\")],f.prototype,\"useObjectSpaceNormalMap\",void 0),b([p.serialize(\"useParallax\")],f.prototype,\"_useParallax\",void 0),b([p.expandToProperty(\"_markAllSubMeshesAsTexturesDirty\")],f.prototype,\"useParallax\",void 0),b([p.serialize(\"useParallaxOcclusion\")],f.prototype,\"_useParallaxOcclusion\",void 0),b([p.expandToProperty(\"_markAllSubMeshesAsTexturesDirty\")],f.prototype,\"useParallaxOcclusion\",void 0),b([p.serialize()],f.prototype,\"parallaxScaleBias\",void 0),b([p.serialize(\"roughness\")],f.prototype,\"_roughness\",void 0),b([p.expandToProperty(\"_markAllSubMeshesAsTexturesDirty\")],f.prototype,\"roughness\",void 0),b([p.serialize()],f.prototype,\"indexOfRefraction\",void 0),b([p.serialize()],f.prototype,\"invertRefractionY\",void 0),b([p.serialize()],f.prototype,\"alphaCutOff\",void 0),b([p.serialize(\"useLightmapAsShadowmap\")],f.prototype,\"_useLightmapAsShadowmap\",void 0),b([p.expandToProperty(\"_markAllSubMeshesAsTexturesDirty\")],f.prototype,\"useLightmapAsShadowmap\",void 0),b([p.serializeAsFresnelParameters(\"diffuseFresnelParameters\")],f.prototype,\"_diffuseFresnelParameters\",void 0),b([p.expandToProperty(\"_markAllSubMeshesAsFresnelDirty\")],f.prototype,\"diffuseFresnelParameters\",void 0),b([p.serializeAsFresnelParameters(\"opacityFresnelParameters\")],f.prototype,\"_opacityFresnelParameters\",void 0),b([p.expandToProperty(\"_markAllSubMeshesAsFresnelAndMiscDirty\")],f.prototype,\"opacityFresnelParameters\",void 0),b([p.serializeAsFresnelParameters(\"reflectionFresnelParameters\")],f.prototype,\"_reflectionFresnelParameters\",void 0),b([p.expandToProperty(\"_markAllSubMeshesAsFresnelDirty\")],f.prototype,\"reflectionFresnelParameters\",void 0),b([p.serializeAsFresnelParameters(\"refractionFresnelParameters\")],f.prototype,\"_refractionFresnelParameters\",void 0),b([p.expandToProperty(\"_markAllSubMeshesAsFresnelDirty\")],f.prototype,\"refractionFresnelParameters\",void 0),b([p.serializeAsFresnelParameters(\"emissiveFresnelParameters\")],f.prototype,\"_emissiveFresnelParameters\",void 0),b([p.expandToProperty(\"_markAllSubMeshesAsFresnelDirty\")],f.prototype,\"emissiveFresnelParameters\",void 0),b([p.serialize(\"useReflectionFresnelFromSpecular\")],f.prototype,\"_useReflectionFresnelFromSpecular\",void 0),b([p.expandToProperty(\"_markAllSubMeshesAsFresnelDirty\")],f.prototype,\"useReflectionFresnelFromSpecular\",void 0),b([p.serialize(\"useGlossinessFromSpecularMapAlpha\")],f.prototype,\"_useGlossinessFromSpecularMapAlpha\",void 0),b([p.expandToProperty(\"_markAllSubMeshesAsTexturesDirty\")],f.prototype,\"useGlossinessFromSpecularMapAlpha\",void 0),b([p.serialize(\"maxSimultaneousLights\")],f.prototype,\"_maxSimultaneousLights\",void 0),b([p.expandToProperty(\"_markAllSubMeshesAsLightsDirty\")],f.prototype,\"maxSimultaneousLights\",void 0),b([p.serialize(\"invertNormalMapX\")],f.prototype,\"_invertNormalMapX\",void 0),b([p.expandToProperty(\"_markAllSubMeshesAsTexturesDirty\")],f.prototype,\"invertNormalMapX\",void 0),b([p.serialize(\"invertNormalMapY\")],f.prototype,\"_invertNormalMapY\",void 0),b([p.expandToProperty(\"_markAllSubMeshesAsTexturesDirty\")],f.prototype,\"invertNormalMapY\",void 0),b([p.serialize(\"twoSidedLighting\")],f.prototype,\"_twoSidedLighting\",void 0),b([p.expandToProperty(\"_markAllSubMeshesAsTexturesDirty\")],f.prototype,\"twoSidedLighting\",void 0),b([p.serialize()],f.prototype,\"useLogarithmicDepth\",null),f})(p.PushMaterial);p.StandardMaterial=e})($a||($a={})),(function(n){var e=(function(){function i(){this.x=n.Vector3.Zero(),this.y=n.Vector3.Zero(),this.z=n.Vector3.Zero(),this.xx=n.Vector3.Zero(),this.yy=n.Vector3.Zero(),this.zz=n.Vector3.Zero(),this.xy=n.Vector3.Zero(),this.yz=n.Vector3.Zero(),this.zx=n.Vector3.Zero()}return i.prototype.addAmbient=function(e){var t=new n.Vector3(e.r,e.g,e.b);this.xx=this.xx.add(t),this.yy=this.yy.add(t),this.zz=this.zz.add(t)},i.prototype.scale=function(e){this.x=this.x.scale(e),this.y=this.y.scale(e),this.z=this.z.scale(e),this.xx=this.xx.scale(e),this.yy=this.yy.scale(e),this.zz=this.zz.scale(e),this.yz=this.yz.scale(e),this.zx=this.zx.scale(e),this.xy=this.xy.scale(e)},i.FromHarmonics=function(e){var t=new i;return t.x=e.l11.scale(1.02333),t.y=e.l1_1.scale(1.02333),t.z=e.l10.scale(1.02333),t.xx=e.l00.scale(.886277).subtract(e.l20.scale(.247708)).add(e.lL22.scale(.429043)),t.yy=e.l00.scale(.886277).subtract(e.l20.scale(.247708)).subtract(e.lL22.scale(.429043)),t.zz=e.l00.scale(.886277).add(e.l20.scale(.495417)),t.yz=e.l2_1.scale(.858086),t.zx=e.l21.scale(.858086),t.xy=e.l2_2.scale(.858086),t.scale(1/Math.PI),t},i.FromArray=function(e){var t=new i;return n.Vector3.FromArrayToRef(e[0],0,t.x),n.Vector3.FromArrayToRef(e[1],0,t.y),n.Vector3.FromArrayToRef(e[2],0,t.z),n.Vector3.FromArrayToRef(e[3],0,t.xx),n.Vector3.FromArrayToRef(e[4],0,t.yy),n.Vector3.FromArrayToRef(e[5],0,t.zz),n.Vector3.FromArrayToRef(e[6],0,t.yz),n.Vector3.FromArrayToRef(e[7],0,t.zx),n.Vector3.FromArrayToRef(e[8],0,t.xy),t},i})();n.SphericalPolynomial=e;var t=(function(){function i(){this.l00=n.Vector3.Zero(),this.l1_1=n.Vector3.Zero(),this.l10=n.Vector3.Zero(),this.l11=n.Vector3.Zero(),this.l2_2=n.Vector3.Zero(),this.l2_1=n.Vector3.Zero(),this.l20=n.Vector3.Zero(),this.l21=n.Vector3.Zero(),this.lL22=n.Vector3.Zero()}return i.prototype.addLight=function(e,t,i){var r=new n.Vector3(t.r,t.g,t.b).scale(i);this.l00=this.l00.add(r.scale(.282095)),this.l1_1=this.l1_1.add(r.scale(.488603*e.y)),this.l10=this.l10.add(r.scale(.488603*e.z)),this.l11=this.l11.add(r.scale(.488603*e.x)),this.l2_2=this.l2_2.add(r.scale(1.092548*e.x*e.y)),this.l2_1=this.l2_1.add(r.scale(1.092548*e.y*e.z)),this.l21=this.l21.add(r.scale(1.092548*e.x*e.z)),this.l20=this.l20.add(r.scale(.315392*(3*e.z*e.z-1))),this.lL22=this.lL22.add(r.scale(.546274*(e.x*e.x-e.y*e.y)))},i.prototype.scale=function(e){this.l00=this.l00.scale(e),this.l1_1=this.l1_1.scale(e),this.l10=this.l10.scale(e),this.l11=this.l11.scale(e),this.l2_2=this.l2_2.scale(e),this.l2_1=this.l2_1.scale(e),this.l20=this.l20.scale(e),this.l21=this.l21.scale(e),this.lL22=this.lL22.scale(e)},i.prototype.convertIncidentRadianceToIrradiance=function(){this.l00=this.l00.scale(3.141593),this.l1_1=this.l1_1.scale(2.094395),this.l10=this.l10.scale(2.094395),this.l11=this.l11.scale(2.094395),this.l2_2=this.l2_2.scale(.785398),this.l2_1=this.l2_1.scale(.785398),this.l20=this.l20.scale(.785398),this.l21=this.l21.scale(.785398),this.lL22=this.lL22.scale(.785398)},i.prototype.convertIrradianceToLambertianRadiance=function(){this.scale(1/Math.PI)},i.FromPolynomial=function(e){var t=new i;return t.l00=e.xx.scale(.376127).add(e.yy.scale(.376127)).add(e.zz.scale(.376126)),t.l1_1=e.y.scale(.977204),t.l10=e.z.scale(.977204),t.l11=e.x.scale(.977204),t.l2_2=e.xy.scale(1.16538),t.l2_1=e.yz.scale(1.16538),t.l20=e.zz.scale(1.34567).subtract(e.xx.scale(.672834)).subtract(e.yy.scale(.672834)),t.l21=e.zx.scale(1.16538),t.lL22=e.xx.scale(1.16538).subtract(e.yy.scale(1.16538)),t.scale(Math.PI),t},i.FromArray=function(e){var t=new i;return n.Vector3.FromArrayToRef(e[0],0,t.l00),n.Vector3.FromArrayToRef(e[1],0,t.l1_1),n.Vector3.FromArrayToRef(e[2],0,t.l10),n.Vector3.FromArrayToRef(e[3],0,t.l11),n.Vector3.FromArrayToRef(e[4],0,t.l2_2),n.Vector3.FromArrayToRef(e[5],0,t.l2_1),n.Vector3.FromArrayToRef(e[6],0,t.l20),n.Vector3.FromArrayToRef(e[7],0,t.l21),n.Vector3.FromArrayToRef(e[8],0,t.lL22),t},i})();n.SphericalHarmonics=t})($a||($a={})),me=$a||($a={}),ge=function(e,t,i,r){this.name=e,this.worldAxisForNormal=t,this.worldAxisForFileX=i,this.worldAxisForFileY=r},ve=(function(){function e(){}return e.ConvertCubeMapTextureToSphericalPolynomial=function(e){if(!e.isCube)return null;var t,i,r=e.getSize().width,n=e.readPixels(0),o=e.readPixels(1);e.isRenderTarget?(t=e.readPixels(3),i=e.readPixels(2)):(t=e.readPixels(2),i=e.readPixels(3));var s=e.readPixels(4),a=e.readPixels(5),l=e.gammaSpace,c=me.Engine.TEXTUREFORMAT_RGBA,h=me.Engine.TEXTURETYPE_UNSIGNED_INT;e.textureType&&e.textureType!==me.Engine.TEXTURETYPE_UNSIGNED_INT&&(h=me.Engine.TEXTURETYPE_FLOAT);var u={size:r,right:n,left:o,up:t,down:i,front:s,back:a,format:c,type:h,gammaSpace:l};return this.ConvertCubeMapToSphericalPolynomial(u)},e.ConvertCubeMapToSphericalPolynomial=function(e){for(var t=new me.SphericalHarmonics,i=0,r=2/e.size,n=r,o=.5*r-1,s=0;s<6;s++)for(var a=this.FileFaces[s],l=e[a.name],c=o,h=e.format===me.Engine.TEXTUREFORMAT_RGBA?4:3,u=0;u<e.size;u++){for(var d=o,f=0;f<e.size;f++){var p=a.worldAxisForFileX.scale(d).add(a.worldAxisForFileY.scale(c)).add(a.worldAxisForNormal);p.normalize();var _=Math.pow(1+d*d+c*c,-1.5),m=l[u*e.size*h+f*h+0],g=l[u*e.size*h+f*h+1],v=l[u*e.size*h+f*h+2];e.type===me.Engine.TEXTURETYPE_UNSIGNED_INT&&(m/=255,g/=255,v/=255),e.gammaSpace&&(m=Math.pow(me.Scalar.Clamp(m),me.ToLinearSpace),g=Math.pow(me.Scalar.Clamp(g),me.ToLinearSpace),v=Math.pow(me.Scalar.Clamp(v),me.ToLinearSpace));var y=new me.Color3(m,g,v);t.addLight(p,y,_),i+=_,d+=r}c+=n}var b=6*(4*Math.PI)/6/i;return t.scale(b),t.convertIncidentRadianceToIrradiance(),t.convertIrradianceToLambertianRadiance(),me.SphericalPolynomial.FromHarmonics(t)},e.FileFaces=[new ge(\"right\",new me.Vector3(1,0,0),new me.Vector3(0,0,-1),new me.Vector3(0,-1,0)),new ge(\"left\",new me.Vector3(-1,0,0),new me.Vector3(0,0,1),new me.Vector3(0,-1,0)),new ge(\"up\",new me.Vector3(0,1,0),new me.Vector3(1,0,0),new me.Vector3(0,0,1)),new ge(\"down\",new me.Vector3(0,-1,0),new me.Vector3(1,0,0),new me.Vector3(0,0,-1)),new ge(\"front\",new me.Vector3(0,0,1),new me.Vector3(1,0,0),new me.Vector3(0,-1,0)),new ge(\"back\",new me.Vector3(0,0,-1),new me.Vector3(-1,0,0),new me.Vector3(0,-1,0))],e})(),me.CubeMapToSphericalPolynomialTools=ve,ye=$a||($a={}),be=(function(t){function e(){var e=t.call(this)||this;return e.PBR=!0,e.MAINUV1=!1,e.MAINUV2=!1,e.UV1=!1,e.UV2=!1,e.ALBEDO=!1,e.ALBEDODIRECTUV=0,e.VERTEXCOLOR=!1,e.AMBIENT=!1,e.AMBIENTDIRECTUV=0,e.AMBIENTINGRAYSCALE=!1,e.OPACITY=!1,e.VERTEXALPHA=!1,e.OPACITYDIRECTUV=0,e.OPACITYRGB=!1,e.ALPHATEST=!1,e.DEPTHPREPASS=!1,e.ALPHABLEND=!1,e.ALPHAFROMALBEDO=!1,e.ALPHATESTVALUE=\"0.5\",e.SPECULAROVERALPHA=!1,e.RADIANCEOVERALPHA=!1,e.ALPHAFRESNEL=!1,e.LINEARALPHAFRESNEL=!1,e.PREMULTIPLYALPHA=!1,e.EMISSIVE=!1,e.EMISSIVEDIRECTUV=0,e.REFLECTIVITY=!1,e.REFLECTIVITYDIRECTUV=0,e.SPECULARTERM=!1,e.MICROSURFACEFROMREFLECTIVITYMAP=!1,e.MICROSURFACEAUTOMATIC=!1,e.LODBASEDMICROSFURACE=!1,e.MICROSURFACEMAP=!1,e.MICROSURFACEMAPDIRECTUV=0,e.METALLICWORKFLOW=!1,e.ROUGHNESSSTOREINMETALMAPALPHA=!1,e.ROUGHNESSSTOREINMETALMAPGREEN=!1,e.METALLNESSSTOREINMETALMAPBLUE=!1,e.AOSTOREINMETALMAPRED=!1,e.ENVIRONMENTBRDF=!1,e.NORMAL=!1,e.TANGENT=!1,e.BUMP=!1,e.BUMPDIRECTUV=0,e.OBJECTSPACE_NORMALMAP=!1,e.PARALLAX=!1,e.PARALLAXOCCLUSION=!1,e.NORMALXYSCALE=!0,e.LIGHTMAP=!1,e.LIGHTMAPDIRECTUV=0,e.USELIGHTMAPASSHADOWMAP=!1,e.GAMMALIGHTMAP=!1,e.REFLECTION=!1,e.REFLECTIONMAP_3D=!1,e.REFLECTIONMAP_SPHERICAL=!1,e.REFLECTIONMAP_PLANAR=!1,e.REFLECTIONMAP_CUBIC=!1,e.USE_LOCAL_REFLECTIONMAP_CUBIC=!1,e.REFLECTIONMAP_PROJECTION=!1,e.REFLECTIONMAP_SKYBOX=!1,e.REFLECTIONMAP_SKYBOX_TRANSFORMED=!1,e.REFLECTIONMAP_EXPLICIT=!1,e.REFLECTIONMAP_EQUIRECTANGULAR=!1,e.REFLECTIONMAP_EQUIRECTANGULAR_FIXED=!1,e.REFLECTIONMAP_MIRROREDEQUIRECTANGULAR_FIXED=!1,e.INVERTCUBICMAP=!1,e.USESPHERICALFROMREFLECTIONMAP=!1,e.USESPHERICALINVERTEX=!1,e.REFLECTIONMAP_OPPOSITEZ=!1,e.LODINREFLECTIONALPHA=!1,e.GAMMAREFLECTION=!1,e.RGBDREFLECTION=!1,e.RADIANCEOCCLUSION=!1,e.HORIZONOCCLUSION=!1,e.REFRACTION=!1,e.REFRACTIONMAP_3D=!1,e.REFRACTIONMAP_OPPOSITEZ=!1,e.LODINREFRACTIONALPHA=!1,e.GAMMAREFRACTION=!1,e.RGBDREFRACTION=!1,e.LINKREFRACTIONTOTRANSPARENCY=!1,e.INSTANCES=!1,e.NUM_BONE_INFLUENCERS=0,e.BonesPerMesh=0,e.NONUNIFORMSCALING=!1,e.MORPHTARGETS=!1,e.MORPHTARGETS_NORMAL=!1,e.MORPHTARGETS_TANGENT=!1,e.NUM_MORPH_INFLUENCERS=0,e.IMAGEPROCESSING=!1,e.VIGNETTE=!1,e.VIGNETTEBLENDMODEMULTIPLY=!1,e.VIGNETTEBLENDMODEOPAQUE=!1,e.TONEMAPPING=!1,e.TONEMAPPING_ACES=!1,e.CONTRAST=!1,e.COLORCURVES=!1,e.COLORGRADING=!1,e.COLORGRADING3D=!1,e.SAMPLER3DGREENDEPTH=!1,e.SAMPLER3DBGRMAP=!1,e.IMAGEPROCESSINGPOSTPROCESS=!1,e.EXPOSURE=!1,e.USEPHYSICALLIGHTFALLOFF=!1,e.USEGLTFLIGHTFALLOFF=!1,e.TWOSIDEDLIGHTING=!1,e.SHADOWFLOAT=!1,e.CLIPPLANE=!1,e.CLIPPLANE2=!1,e.CLIPPLANE3=!1,e.CLIPPLANE4=!1,e.POINTSIZE=!1,e.FOG=!1,e.LOGARITHMICDEPTH=!1,e.FORCENORMALFORWARD=!1,e.SPECULARAA=!1,e.UNLIT=!1,e.rebuild(),e}return T(e,t),e.prototype.reset=function(){t.prototype.reset.call(this),this.ALPHATESTVALUE=\"0.5\",this.PBR=!0},e})(ye.MaterialDefines),Te=(function(r){function p(e,t){var i=r.call(this,e,t)||this;return i._directIntensity=1,i._emissiveIntensity=1,i._environmentIntensity=1,i._specularIntensity=1,i._lightingInfos=new ye.Vector4(i._directIntensity,i._emissiveIntensity,i._environmentIntensity,i._specularIntensity),i._disableBumpMap=!1,i._ambientTextureStrength=1,i._ambientTextureImpactOnAnalyticalLights=ye.PBRMaterial.DEFAULT_AO_ON_ANALYTICAL_LIGHTS,i._ambientColor=new ye.Color3(0,0,0),i._albedoColor=new ye.Color3(1,1,1),i._reflectivityColor=new ye.Color3(1,1,1),i._reflectionColor=new ye.Color3(1,1,1),i._emissiveColor=new ye.Color3(0,0,0),i._microSurface=.9,i._indexOfRefraction=.66,i._invertRefractionY=!1,i._linkRefractionWithTransparency=!1,i._useLightmapAsShadowmap=!1,i._useHorizonOcclusion=!0,i._useRadianceOcclusion=!0,i._useAlphaFromAlbedoTexture=!1,i._useSpecularOverAlpha=!0,i._useMicroSurfaceFromReflectivityMapAlpha=!1,i._useRoughnessFromMetallicTextureAlpha=!0,i._useRoughnessFromMetallicTextureGreen=!1,i._useMetallnessFromMetallicTextureBlue=!1,i._useAmbientOcclusionFromMetallicTextureRed=!1,i._useAmbientInGrayScale=!1,i._useAutoMicroSurfaceFromReflectivityMap=!1,i._lightFalloff=p.LIGHTFALLOFF_PHYSICAL,i._useRadianceOverAlpha=!0,i._useObjectSpaceNormalMap=!1,i._useParallax=!1,i._useParallaxOcclusion=!1,i._parallaxScaleBias=.05,i._disableLighting=!1,i._maxSimultaneousLights=4,i._invertNormalMapX=!1,i._invertNormalMapY=!1,i._twoSidedLighting=!1,i._alphaCutOff=.4,i._forceAlphaTest=!1,i._useAlphaFresnel=!1,i._useLinearAlphaFresnel=!1,i._transparencyMode=null,i._environmentBRDFTexture=null,i._forceIrradianceInFragment=!1,i._forceNormalForward=!1,i._enableSpecularAntiAliasing=!1,i._renderTargets=new ye.SmartArray(16),i._globalAmbientColor=new ye.Color3(0,0,0),i._unlit=!1,i._attachImageProcessingConfiguration(null),i.getRenderTargetTextures=function(){return i._renderTargets.reset(),ye.StandardMaterial.ReflectionTextureEnabled&&i._reflectionTexture&&i._reflectionTexture.isRenderTarget&&i._renderTargets.push(i._reflectionTexture),ye.StandardMaterial.RefractionTextureEnabled&&i._refractionTexture&&i._refractionTexture.isRenderTarget&&i._renderTargets.push(i._refractionTexture),i._renderTargets},i._environmentBRDFTexture=ye.TextureTools.GetEnvironmentBRDFTexture(t),i}return T(p,r),p.prototype._attachImageProcessingConfiguration=function(e){var t=this;e!==this._imageProcessingConfiguration&&(this._imageProcessingConfiguration&&this._imageProcessingObserver&&this._imageProcessingConfiguration.onUpdateParameters.remove(this._imageProcessingObserver),this._imageProcessingConfiguration=e||this.getScene().imageProcessingConfiguration,this._imageProcessingConfiguration&&(this._imageProcessingObserver=this._imageProcessingConfiguration.onUpdateParameters.add((function(e){t._markAllSubMeshesAsImageProcessingDirty()}))))},Object.defineProperty(p.prototype,\"hasRenderTargetTextures\",{get:function(){return!!(ye.StandardMaterial.ReflectionTextureEnabled&&this._reflectionTexture&&this._reflectionTexture.isRenderTarget)||!!(ye.StandardMaterial.RefractionTextureEnabled&&this._refractionTexture&&this._refractionTexture.isRenderTarget)},enumerable:!0,configurable:!0}),p.prototype.getClassName=function(){return\"PBRBaseMaterial\"},Object.defineProperty(p.prototype,\"useLogarithmicDepth\",{get:function(){return this._useLogarithmicDepth},set:function(e){this._useLogarithmicDepth=e&&this.getScene().getEngine().getCaps().fragmentDepthSupported},enumerable:!0,configurable:!0}),Object.defineProperty(p.prototype,\"transparencyMode\",{get:function(){return this._transparencyMode},set:function(e){this._transparencyMode!==e&&(this._transparencyMode=e,this._forceAlphaTest=e===ye.PBRMaterial.PBRMATERIAL_ALPHATESTANDBLEND,this._markAllSubMeshesAsTexturesAndMiscDirty())},enumerable:!0,configurable:!0}),Object.defineProperty(p.prototype,\"_disableAlphaBlending\",{get:function(){return this._linkRefractionWithTransparency||this._transparencyMode===ye.PBRMaterial.PBRMATERIAL_OPAQUE||this._transparencyMode===ye.PBRMaterial.PBRMATERIAL_ALPHATEST},enumerable:!0,configurable:!0}),p.prototype.needAlphaBlending=function(){return!this._disableAlphaBlending&&(this.alpha<1||null!=this._opacityTexture||this._shouldUseAlphaFromAlbedoTexture())},p.prototype.needAlphaBlendingForMesh=function(e){return!this._disableAlphaBlending&&r.prototype.needAlphaBlendingForMesh.call(this,e)},p.prototype.needAlphaTesting=function(){return!!this._forceAlphaTest||!this._linkRefractionWithTransparency&&(null!=this._albedoTexture&&this._albedoTexture.hasAlpha&&(null==this._transparencyMode||this._transparencyMode===ye.PBRMaterial.PBRMATERIAL_ALPHATEST))},p.prototype._shouldUseAlphaFromAlbedoTexture=function(){return null!=this._albedoTexture&&this._albedoTexture.hasAlpha&&this._useAlphaFromAlbedoTexture&&this._transparencyMode!==ye.PBRMaterial.PBRMATERIAL_OPAQUE},p.prototype.getAlphaTestTexture=function(){return this._albedoTexture},p.prototype.isReadyForSubMesh=function(e,t,i){if(t.effect&&this.isFrozen&&this._wasPreviouslyReady)return!0;t._materialDefines||(t._materialDefines=new be);var r=t._materialDefines;if(!this.checkReadyOnEveryCall&&t.effect&&r._renderId===this.getScene().getRenderId())return!0;var n=this.getScene(),o=n.getEngine();if(r._areTexturesDirty&&n.texturesEnabled){if(this._albedoTexture&&ye.StandardMaterial.DiffuseTextureEnabled&&!this._albedoTexture.isReadyOrNotBlocking())return!1;if(this._ambientTexture&&ye.StandardMaterial.AmbientTextureEnabled&&!this._ambientTexture.isReadyOrNotBlocking())return!1;if(this._opacityTexture&&ye.StandardMaterial.OpacityTextureEnabled&&!this._opacityTexture.isReadyOrNotBlocking())return!1;var s=this._getReflectionTexture();if(s&&ye.StandardMaterial.ReflectionTextureEnabled&&!s.isReadyOrNotBlocking())return!1;if(this._lightmapTexture&&ye.StandardMaterial.LightmapTextureEnabled&&!this._lightmapTexture.isReadyOrNotBlocking())return!1;if(this._emissiveTexture&&ye.StandardMaterial.EmissiveTextureEnabled&&!this._emissiveTexture.isReadyOrNotBlocking())return!1;if(ye.StandardMaterial.SpecularTextureEnabled){if(this._metallicTexture){if(!this._metallicTexture.isReadyOrNotBlocking())return!1}else if(this._reflectivityTexture&&!this._reflectivityTexture.isReadyOrNotBlocking())return!1;if(this._microSurfaceTexture&&!this._microSurfaceTexture.isReadyOrNotBlocking())return!1}if(o.getCaps().standardDerivatives&&this._bumpTexture&&ye.StandardMaterial.BumpTextureEnabled&&!this._disableBumpMap&&!this._bumpTexture.isReady())return!1;var a=this._getRefractionTexture();if(a&&ye.StandardMaterial.RefractionTextureEnabled&&!a.isReadyOrNotBlocking())return!1;if(this._environmentBRDFTexture&&ye.StandardMaterial.ReflectionTextureEnabled&&!this._environmentBRDFTexture.isReady())return!1}if(r._areImageProcessingDirty&&this._imageProcessingConfiguration&&!this._imageProcessingConfiguration.isReady())return!1;o.getCaps().standardDerivatives||e.isVerticesDataPresent(ye.VertexBuffer.NormalKind)||(e.createNormals(!0),ye.Tools.Warn(\"PBRMaterial: Normals have been created for the mesh: \"+e.name));var l=this._prepareEffect(e,r,this.onCompiled,this.onError,i);return l&&(n.resetCachedMaterial(),t.setEffect(l,r),this.buildUniformLayout()),!(!t.effect||!t.effect.isReady())&&(r._renderId=n.getRenderId(),this._wasPreviouslyReady=!0)},p.prototype.isMetallicWorkflow=function(){return!(null==this._metallic&&null==this._roughness&&!this._metallicTexture)},p.prototype._prepareEffect=function(e,t,i,r,n,o){if(void 0===i&&(i=null),void 0===r&&(r=null),void 0===n&&(n=null),void 0===o&&(o=null),this._prepareDefines(e,t,n,o),!t.isDirty)return null;t.markAsProcessed();var s=this.getScene().getEngine(),a=new ye.EffectFallbacks,l=0;t.USESPHERICALINVERTEX&&a.addFallback(l++,\"USESPHERICALINVERTEX\"),t.FOG&&a.addFallback(l,\"FOG\"),t.SPECULARAA&&a.addFallback(l,\"SPECULARAA\"),t.POINTSIZE&&a.addFallback(l,\"POINTSIZE\"),t.LOGARITHMICDEPTH&&a.addFallback(l,\"LOGARITHMICDEPTH\"),t.PARALLAX&&a.addFallback(l,\"PARALLAX\"),t.PARALLAXOCCLUSION&&a.addFallback(l++,\"PARALLAXOCCLUSION\"),t.ENVIRONMENTBRDF&&a.addFallback(l++,\"ENVIRONMENTBRDF\"),t.TANGENT&&a.addFallback(l++,\"TANGENT\"),t.BUMP&&a.addFallback(l++,\"BUMP\"),l=ye.MaterialHelper.HandleFallbacksForShadows(t,a,this._maxSimultaneousLights,l++),t.SPECULARTERM&&a.addFallback(l++,\"SPECULARTERM\"),t.USESPHERICALFROMREFLECTIONMAP&&a.addFallback(l++,\"USESPHERICALFROMREFLECTIONMAP\"),t.LIGHTMAP&&a.addFallback(l++,\"LIGHTMAP\"),t.NORMAL&&a.addFallback(l++,\"NORMAL\"),t.AMBIENT&&a.addFallback(l++,\"AMBIENT\"),t.EMISSIVE&&a.addFallback(l++,\"EMISSIVE\"),t.VERTEXCOLOR&&a.addFallback(l++,\"VERTEXCOLOR\"),0<t.NUM_BONE_INFLUENCERS&&a.addCPUSkinningFallback(l++,e),t.MORPHTARGETS&&a.addFallback(l++,\"MORPHTARGETS\");var c=[ye.VertexBuffer.PositionKind];t.NORMAL&&c.push(ye.VertexBuffer.NormalKind),t.TANGENT&&c.push(ye.VertexBuffer.TangentKind),t.UV1&&c.push(ye.VertexBuffer.UVKind),t.UV2&&c.push(ye.VertexBuffer.UV2Kind),t.VERTEXCOLOR&&c.push(ye.VertexBuffer.ColorKind),ye.MaterialHelper.PrepareAttributesForBones(c,e,t,a),ye.MaterialHelper.PrepareAttributesForInstances(c,t),ye.MaterialHelper.PrepareAttributesForMorphTargets(c,e,t);var h=[\"world\",\"view\",\"viewProjection\",\"vEyePosition\",\"vLightsType\",\"vAmbientColor\",\"vAlbedoColor\",\"vReflectivityColor\",\"vEmissiveColor\",\"vReflectionColor\",\"vFogInfos\",\"vFogColor\",\"pointSize\",\"vAlbedoInfos\",\"vAmbientInfos\",\"vOpacityInfos\",\"vReflectionInfos\",\"vReflectionPosition\",\"vReflectionSize\",\"vEmissiveInfos\",\"vReflectivityInfos\",\"vMicroSurfaceSamplerInfos\",\"vBumpInfos\",\"vLightmapInfos\",\"vRefractionInfos\",\"mBones\",\"vClipPlane\",\"vClipPlane2\",\"vClipPlane3\",\"vClipPlane4\",\"albedoMatrix\",\"ambientMatrix\",\"opacityMatrix\",\"reflectionMatrix\",\"emissiveMatrix\",\"reflectivityMatrix\",\"normalMatrix\",\"microSurfaceSamplerMatrix\",\"bumpMatrix\",\"lightmapMatrix\",\"refractionMatrix\",\"vLightingIntensity\",\"logarithmicDepthConstant\",\"vSphericalX\",\"vSphericalY\",\"vSphericalZ\",\"vSphericalXX\",\"vSphericalYY\",\"vSphericalZZ\",\"vSphericalXY\",\"vSphericalYZ\",\"vSphericalZX\",\"vReflectionMicrosurfaceInfos\",\"vRefractionMicrosurfaceInfos\",\"vTangentSpaceParams\"],u=[\"albedoSampler\",\"reflectivitySampler\",\"ambientSampler\",\"emissiveSampler\",\"bumpSampler\",\"lightmapSampler\",\"opacitySampler\",\"refractionSampler\",\"refractionSamplerLow\",\"refractionSamplerHigh\",\"reflectionSampler\",\"reflectionSamplerLow\",\"reflectionSamplerHigh\",\"microSurfaceSampler\",\"environmentBrdfSampler\"],d=[\"Material\",\"Scene\"];ye.ImageProcessingConfiguration&&(ye.ImageProcessingConfiguration.PrepareUniforms(h,t),ye.ImageProcessingConfiguration.PrepareSamplers(u,t)),ye.MaterialHelper.PrepareUniformsAndSamplersList({uniformsNames:h,uniformBuffersNames:d,samplers:u,defines:t,maxSimultaneousLights:this._maxSimultaneousLights});var f=t.toString();return s.createEffect(\"pbr\",{attributes:c,uniformsNames:h,uniformBuffersNames:d,samplers:u,defines:f,fallbacks:a,onCompiled:i,onError:r,indexParameters:{maxSimultaneousLights:this._maxSimultaneousLights,maxSimultaneousMorphTargets:t.NUM_MORPH_INFLUENCERS}},s)},p.prototype._prepareDefines=function(e,t,i,r){void 0===i&&(i=null),void 0===r&&(r=null);var n=this.getScene(),o=n.getEngine();if(ye.MaterialHelper.PrepareDefinesForLights(n,e,t,!0,this._maxSimultaneousLights,this._disableLighting),t._needNormals=!0,t.METALLICWORKFLOW=this.isMetallicWorkflow(),t._areTexturesDirty){if(t._needUVs=!1,n.texturesEnabled){n.getEngine().getCaps().textureLOD&&(t.LODBASEDMICROSFURACE=!0),this._albedoTexture&&ye.StandardMaterial.DiffuseTextureEnabled?ye.MaterialHelper.PrepareDefinesForMergedUV(this._albedoTexture,t,\"ALBEDO\"):t.ALBEDO=!1,this._ambientTexture&&ye.StandardMaterial.AmbientTextureEnabled?(ye.MaterialHelper.PrepareDefinesForMergedUV(this._ambientTexture,t,\"AMBIENT\"),t.AMBIENTINGRAYSCALE=this._useAmbientInGrayScale):t.AMBIENT=!1,this._opacityTexture&&ye.StandardMaterial.OpacityTextureEnabled?(ye.MaterialHelper.PrepareDefinesForMergedUV(this._opacityTexture,t,\"OPACITY\"),t.OPACITYRGB=this._opacityTexture.getAlphaFromRGB):t.OPACITY=!1;var s=this._getReflectionTexture();if(s&&ye.StandardMaterial.ReflectionTextureEnabled){switch(t.REFLECTION=!0,t.GAMMAREFLECTION=s.gammaSpace,t.RGBDREFLECTION=s.isRGBD,t.REFLECTIONMAP_OPPOSITEZ=this.getScene().useRightHandedSystem?!s.invertZ:s.invertZ,t.LODINREFLECTIONALPHA=s.lodLevelInAlpha,s.coordinatesMode===ye.Texture.INVCUBIC_MODE&&(t.INVERTCUBICMAP=!0),t.REFLECTIONMAP_3D=s.isCube,s.coordinatesMode){case ye.Texture.EXPLICIT_MODE:t.REFLECTIONMAP_EXPLICIT=!0;break;case ye.Texture.PLANAR_MODE:t.REFLECTIONMAP_PLANAR=!0;break;case ye.Texture.PROJECTION_MODE:t.REFLECTIONMAP_PROJECTION=!0;break;case ye.Texture.SKYBOX_MODE:t.REFLECTIONMAP_SKYBOX=!0;break;case ye.Texture.SPHERICAL_MODE:t.REFLECTIONMAP_SPHERICAL=!0;break;case ye.Texture.EQUIRECTANGULAR_MODE:t.REFLECTIONMAP_EQUIRECTANGULAR=!0;break;case ye.Texture.FIXED_EQUIRECTANGULAR_MODE:t.REFLECTIONMAP_EQUIRECTANGULAR_FIXED=!0;break;case ye.Texture.FIXED_EQUIRECTANGULAR_MIRRORED_MODE:t.REFLECTIONMAP_MIRROREDEQUIRECTANGULAR_FIXED=!0;break;case ye.Texture.CUBIC_MODE:case ye.Texture.INVCUBIC_MODE:default:t.REFLECTIONMAP_CUBIC=!0,t.USE_LOCAL_REFLECTIONMAP_CUBIC=!!s.boundingBoxSize}s.coordinatesMode!==ye.Texture.SKYBOX_MODE?s.sphericalPolynomial&&(t.USESPHERICALFROMREFLECTIONMAP=!0,this._forceIrradianceInFragment||n.getEngine().getCaps().maxVaryingVectors<=8?t.USESPHERICALINVERTEX=!1:t.USESPHERICALINVERTEX=!0):t.REFLECTIONMAP_SKYBOX_TRANSFORMED=!s.getReflectionTextureMatrix().isIdentity()}else t.REFLECTION=!1,t.REFLECTIONMAP_3D=!1,t.REFLECTIONMAP_SPHERICAL=!1,t.REFLECTIONMAP_PLANAR=!1,t.REFLECTIONMAP_CUBIC=!1,t.USE_LOCAL_REFLECTIONMAP_CUBIC=!1,t.REFLECTIONMAP_PROJECTION=!1,t.REFLECTIONMAP_SKYBOX=!1,t.REFLECTIONMAP_SKYBOX_TRANSFORMED=!1,t.REFLECTIONMAP_EXPLICIT=!1,t.REFLECTIONMAP_EQUIRECTANGULAR=!1,t.REFLECTIONMAP_EQUIRECTANGULAR_FIXED=!1,t.REFLECTIONMAP_MIRROREDEQUIRECTANGULAR_FIXED=!1,t.INVERTCUBICMAP=!1,t.USESPHERICALFROMREFLECTIONMAP=!1,t.USESPHERICALINVERTEX=!1,t.REFLECTIONMAP_OPPOSITEZ=!1,t.LODINREFLECTIONALPHA=!1,t.GAMMAREFLECTION=!1,t.RGBDREFLECTION=!1;this._lightmapTexture&&ye.StandardMaterial.LightmapTextureEnabled?(ye.MaterialHelper.PrepareDefinesForMergedUV(this._lightmapTexture,t,\"LIGHTMAP\"),t.USELIGHTMAPASSHADOWMAP=this._useLightmapAsShadowmap,t.GAMMALIGHTMAP=this._lightmapTexture.gammaSpace):t.LIGHTMAP=!1,this._emissiveTexture&&ye.StandardMaterial.EmissiveTextureEnabled?ye.MaterialHelper.PrepareDefinesForMergedUV(this._emissiveTexture,t,\"EMISSIVE\"):t.EMISSIVE=!1,ye.StandardMaterial.SpecularTextureEnabled?(this._metallicTexture?(ye.MaterialHelper.PrepareDefinesForMergedUV(this._metallicTexture,t,\"REFLECTIVITY\"),t.ROUGHNESSSTOREINMETALMAPALPHA=this._useRoughnessFromMetallicTextureAlpha,t.ROUGHNESSSTOREINMETALMAPGREEN=!this._useRoughnessFromMetallicTextureAlpha&&this._useRoughnessFromMetallicTextureGreen,t.METALLNESSSTOREINMETALMAPBLUE=this._useMetallnessFromMetallicTextureBlue,t.AOSTOREINMETALMAPRED=this._useAmbientOcclusionFromMetallicTextureRed):this._reflectivityTexture?(ye.MaterialHelper.PrepareDefinesForMergedUV(this._reflectivityTexture,t,\"REFLECTIVITY\"),t.MICROSURFACEFROMREFLECTIVITYMAP=this._useMicroSurfaceFromReflectivityMapAlpha,t.MICROSURFACEAUTOMATIC=this._useAutoMicroSurfaceFromReflectivityMap):t.REFLECTIVITY=!1,this._microSurfaceTexture?ye.MaterialHelper.PrepareDefinesForMergedUV(this._microSurfaceTexture,t,\"MICROSURFACEMAP\"):t.MICROSURFACEMAP=!1):(t.REFLECTIVITY=!1,t.MICROSURFACEMAP=!1),n.getEngine().getCaps().standardDerivatives&&this._bumpTexture&&ye.StandardMaterial.BumpTextureEnabled&&!this._disableBumpMap?(ye.MaterialHelper.PrepareDefinesForMergedUV(this._bumpTexture,t,\"BUMP\"),this._useParallax&&this._albedoTexture&&ye.StandardMaterial.DiffuseTextureEnabled?(t.PARALLAX=!0,t.PARALLAXOCCLUSION=!!this._useParallaxOcclusion):t.PARALLAX=!1,t.OBJECTSPACE_NORMALMAP=this._useObjectSpaceNormalMap):t.BUMP=!1;var a=this._getRefractionTexture();a&&ye.StandardMaterial.RefractionTextureEnabled?(t.REFRACTION=!0,t.REFRACTIONMAP_3D=a.isCube,t.GAMMAREFRACTION=a.gammaSpace,t.RGBDREFRACTION=a.isRGBD,t.REFRACTIONMAP_OPPOSITEZ=a.invertZ,t.LODINREFRACTIONALPHA=a.lodLevelInAlpha,this._linkRefractionWithTransparency&&(t.LINKREFRACTIONTOTRANSPARENCY=!0)):t.REFRACTION=!1,this._environmentBRDFTexture&&ye.StandardMaterial.ReflectionTextureEnabled?t.ENVIRONMENTBRDF=!0:t.ENVIRONMENTBRDF=!1,this._shouldUseAlphaFromAlbedoTexture()?t.ALPHAFROMALBEDO=!0:t.ALPHAFROMALBEDO=!1}t.SPECULAROVERALPHA=this._useSpecularOverAlpha,this._lightFalloff===p.LIGHTFALLOFF_STANDARD?(t.USEPHYSICALLIGHTFALLOFF=!1,t.USEGLTFLIGHTFALLOFF=!1):this._lightFalloff===p.LIGHTFALLOFF_GLTF?(t.USEPHYSICALLIGHTFALLOFF=!1,t.USEGLTFLIGHTFALLOFF=!0):(t.USEPHYSICALLIGHTFALLOFF=!0,t.USEGLTFLIGHTFALLOFF=!1),t.RADIANCEOVERALPHA=this._useRadianceOverAlpha,!this.backFaceCulling&&this._twoSidedLighting?t.TWOSIDEDLIGHTING=!0:t.TWOSIDEDLIGHTING=!1,t.ALPHATESTVALUE=this._alphaCutOff+(this._alphaCutOff%1==0?\".\":\"\"),t.PREMULTIPLYALPHA=this.alphaMode===ye.Engine.ALPHA_PREMULTIPLIED||this.alphaMode===ye.Engine.ALPHA_PREMULTIPLIED_PORTERDUFF,t.ALPHABLEND=this.needAlphaBlendingForMesh(e),t.ALPHAFRESNEL=this._useAlphaFresnel||this._useLinearAlphaFresnel,t.LINEARALPHAFRESNEL=this._useLinearAlphaFresnel,t.SPECULARAA=n.getEngine().getCaps().standardDerivatives&&this._enableSpecularAntiAliasing}t._areImageProcessingDirty&&this._imageProcessingConfiguration&&this._imageProcessingConfiguration.prepareDefines(t),t.FORCENORMALFORWARD=this._forceNormalForward,t.RADIANCEOCCLUSION=this._useRadianceOcclusion,t.HORIZONOCCLUSION=this._useHorizonOcclusion,t._areMiscDirty&&(ye.MaterialHelper.PrepareDefinesForMisc(e,n,this._useLogarithmicDepth,this.pointsCloud,this.fogEnabled,this._shouldTurnAlphaTestOn(e)||this._forceAlphaTest,t),t.UNLIT=this._unlit||(this.pointsCloud||this.wireframe)&&!e.isVerticesDataPresent(ye.VertexBuffer.NormalKind)),ye.MaterialHelper.PrepareDefinesForFrameBoundValues(n,o,t,!!i,r),ye.MaterialHelper.PrepareDefinesForAttributes(e,t,!0,!0,!0,this._transparencyMode!==ye.PBRMaterial.PBRMATERIAL_OPAQUE)},p.prototype.forceCompilation=function(e,t,i){var r=this,n=ae({clipPlane:!1},i),o=new be,s=this._prepareEffect(e,o,void 0,void 0,void 0,n.clipPlane);s.isReady()?t&&t(this):s.onCompileObservable.add((function(){t&&t(r)}))},p.prototype.buildUniformLayout=function(){this._uniformBuffer.addUniform(\"vAlbedoInfos\",2),this._uniformBuffer.addUniform(\"vAmbientInfos\",4),this._uniformBuffer.addUniform(\"vOpacityInfos\",2),this._uniformBuffer.addUniform(\"vEmissiveInfos\",2),this._uniformBuffer.addUniform(\"vLightmapInfos\",2),this._uniformBuffer.addUniform(\"vReflectivityInfos\",3),this._uniformBuffer.addUniform(\"vMicroSurfaceSamplerInfos\",2),this._uniformBuffer.addUniform(\"vRefractionInfos\",4),this._uniformBuffer.addUniform(\"vReflectionInfos\",2),this._uniformBuffer.addUniform(\"vReflectionPosition\",3),this._uniformBuffer.addUniform(\"vReflectionSize\",3),this._uniformBuffer.addUniform(\"vBumpInfos\",3),this._uniformBuffer.addUniform(\"albedoMatrix\",16),this._uniformBuffer.addUniform(\"ambientMatrix\",16),this._uniformBuffer.addUniform(\"opacityMatrix\",16),this._uniformBuffer.addUniform(\"emissiveMatrix\",16),this._uniformBuffer.addUniform(\"lightmapMatrix\",16),this._uniformBuffer.addUniform(\"reflectivityMatrix\",16),this._uniformBuffer.addUniform(\"microSurfaceSamplerMatrix\",16),this._uniformBuffer.addUniform(\"bumpMatrix\",16),this._uniformBuffer.addUniform(\"vTangentSpaceParams\",2),this._uniformBuffer.addUniform(\"refractionMatrix\",16),this._uniformBuffer.addUniform(\"reflectionMatrix\",16),this._uniformBuffer.addUniform(\"vReflectionColor\",3),this._uniformBuffer.addUniform(\"vAlbedoColor\",4),this._uniformBuffer.addUniform(\"vLightingIntensity\",4),this._uniformBuffer.addUniform(\"vRefractionMicrosurfaceInfos\",3),this._uniformBuffer.addUniform(\"vReflectionMicrosurfaceInfos\",3),this._uniformBuffer.addUniform(\"vReflectivityColor\",4),this._uniformBuffer.addUniform(\"vEmissiveColor\",3),this._uniformBuffer.addUniform(\"pointSize\",1),this._uniformBuffer.create()},p.prototype.unbind=function(){this._reflectionTexture&&this._reflectionTexture.isRenderTarget&&this._uniformBuffer.setTexture(\"reflectionSampler\",null),this._refractionTexture&&this._refractionTexture.isRenderTarget&&this._uniformBuffer.setTexture(\"refractionSampler\",null),r.prototype.unbind.call(this)},p.prototype.bindForSubMesh=function(e,t,i){var r=this.getScene(),n=i._materialDefines;if(n){var o=i.effect;if(o){this._activeEffect=o,this.bindOnlyWorldMatrix(e),n.OBJECTSPACE_NORMALMAP&&(e.toNormalMatrix(this._normalMatrix),this.bindOnlyNormalMatrix(this._normalMatrix));var s=this._mustRebind(r,o,t.visibility);ye.MaterialHelper.BindBonesParameters(t,this._activeEffect);var a=null;if(s){this._uniformBuffer.bindToEffect(o,\"Material\"),this.bindViewProjection(o),a=this._getReflectionTexture();var l=this._getRefractionTexture();if(!this._uniformBuffer.useUbo||!this.isFrozen||!this._uniformBuffer.isSync){if(r.texturesEnabled){if(this._albedoTexture&&ye.StandardMaterial.DiffuseTextureEnabled&&(this._uniformBuffer.updateFloat2(\"vAlbedoInfos\",this._albedoTexture.coordinatesIndex,this._albedoTexture.level),ye.MaterialHelper.BindTextureMatrix(this._albedoTexture,this._uniformBuffer,\"albedo\")),this._ambientTexture&&ye.StandardMaterial.AmbientTextureEnabled&&(this._uniformBuffer.updateFloat4(\"vAmbientInfos\",this._ambientTexture.coordinatesIndex,this._ambientTexture.level,this._ambientTextureStrength,this._ambientTextureImpactOnAnalyticalLights),ye.MaterialHelper.BindTextureMatrix(this._ambientTexture,this._uniformBuffer,\"ambient\")),this._opacityTexture&&ye.StandardMaterial.OpacityTextureEnabled&&(this._uniformBuffer.updateFloat2(\"vOpacityInfos\",this._opacityTexture.coordinatesIndex,this._opacityTexture.level),ye.MaterialHelper.BindTextureMatrix(this._opacityTexture,this._uniformBuffer,\"opacity\")),a&&ye.StandardMaterial.ReflectionTextureEnabled){if(this._uniformBuffer.updateMatrix(\"reflectionMatrix\",a.getReflectionTextureMatrix()),this._uniformBuffer.updateFloat2(\"vReflectionInfos\",a.level,0),a.boundingBoxSize){var c=a;this._uniformBuffer.updateVector3(\"vReflectionPosition\",c.boundingBoxPosition),this._uniformBuffer.updateVector3(\"vReflectionSize\",c.boundingBoxSize)}var h=a.sphericalPolynomial;n.USESPHERICALFROMREFLECTIONMAP&&h&&(this._activeEffect.setFloat3(\"vSphericalX\",h.x.x,h.x.y,h.x.z),this._activeEffect.setFloat3(\"vSphericalY\",h.y.x,h.y.y,h.y.z),this._activeEffect.setFloat3(\"vSphericalZ\",h.z.x,h.z.y,h.z.z),this._activeEffect.setFloat3(\"vSphericalXX_ZZ\",h.xx.x-h.zz.x,h.xx.y-h.zz.y,h.xx.z-h.zz.z),this._activeEffect.setFloat3(\"vSphericalYY_ZZ\",h.yy.x-h.zz.x,h.yy.y-h.zz.y,h.yy.z-h.zz.z),this._activeEffect.setFloat3(\"vSphericalZZ\",h.zz.x,h.zz.y,h.zz.z),this._activeEffect.setFloat3(\"vSphericalXY\",h.xy.x,h.xy.y,h.xy.z),this._activeEffect.setFloat3(\"vSphericalYZ\",h.yz.x,h.yz.y,h.yz.z),this._activeEffect.setFloat3(\"vSphericalZX\",h.zx.x,h.zx.y,h.zx.z)),this._uniformBuffer.updateFloat3(\"vReflectionMicrosurfaceInfos\",a.getSize().width,a.lodGenerationScale,a.lodGenerationOffset)}if(this._emissiveTexture&&ye.StandardMaterial.EmissiveTextureEnabled&&(this._uniformBuffer.updateFloat2(\"vEmissiveInfos\",this._emissiveTexture.coordinatesIndex,this._emissiveTexture.level),ye.MaterialHelper.BindTextureMatrix(this._emissiveTexture,this._uniformBuffer,\"emissive\")),this._lightmapTexture&&ye.StandardMaterial.LightmapTextureEnabled&&(this._uniformBuffer.updateFloat2(\"vLightmapInfos\",this._lightmapTexture.coordinatesIndex,this._lightmapTexture.level),ye.MaterialHelper.BindTextureMatrix(this._lightmapTexture,this._uniformBuffer,\"lightmap\")),ye.StandardMaterial.SpecularTextureEnabled&&(this._metallicTexture?(this._uniformBuffer.updateFloat3(\"vReflectivityInfos\",this._metallicTexture.coordinatesIndex,this._metallicTexture.level,this._ambientTextureStrength),ye.MaterialHelper.BindTextureMatrix(this._metallicTexture,this._uniformBuffer,\"reflectivity\")):this._reflectivityTexture&&(this._uniformBuffer.updateFloat3(\"vReflectivityInfos\",this._reflectivityTexture.coordinatesIndex,this._reflectivityTexture.level,1),ye.MaterialHelper.BindTextureMatrix(this._reflectivityTexture,this._uniformBuffer,\"reflectivity\")),this._microSurfaceTexture&&(this._uniformBuffer.updateFloat2(\"vMicroSurfaceSamplerInfos\",this._microSurfaceTexture.coordinatesIndex,this._microSurfaceTexture.level),ye.MaterialHelper.BindTextureMatrix(this._microSurfaceTexture,this._uniformBuffer,\"microSurfaceSampler\"))),this._bumpTexture&&r.getEngine().getCaps().standardDerivatives&&ye.StandardMaterial.BumpTextureEnabled&&!this._disableBumpMap&&(this._uniformBuffer.updateFloat3(\"vBumpInfos\",this._bumpTexture.coordinatesIndex,this._bumpTexture.level,this._parallaxScaleBias),ye.MaterialHelper.BindTextureMatrix(this._bumpTexture,this._uniformBuffer,\"bump\"),r._mirroredCameraPosition?this._uniformBuffer.updateFloat2(\"vTangentSpaceParams\",this._invertNormalMapX?1:-1,this._invertNormalMapY?1:-1):this._uniformBuffer.updateFloat2(\"vTangentSpaceParams\",this._invertNormalMapX?-1:1,this._invertNormalMapY?-1:1)),l&&ye.StandardMaterial.RefractionTextureEnabled){this._uniformBuffer.updateMatrix(\"refractionMatrix\",l.getReflectionTextureMatrix());var u=1;l.isCube||l.depth&&(u=l.depth),this._uniformBuffer.updateFloat4(\"vRefractionInfos\",l.level,this._indexOfRefraction,u,this._invertRefractionY?-1:1),this._uniformBuffer.updateFloat3(\"vRefractionMicrosurfaceInfos\",l.getSize().width,l.lodGenerationScale,l.lodGenerationOffset)}}this.pointsCloud&&this._uniformBuffer.updateFloat(\"pointSize\",this.pointSize),n.METALLICWORKFLOW?(ye.PBRMaterial._scaledReflectivity.r=void 0===this._metallic||null===this._metallic?1:this._metallic,ye.PBRMaterial._scaledReflectivity.g=void 0===this._roughness||null===this._roughness?1:this._roughness,this._uniformBuffer.updateColor4(\"vReflectivityColor\",ye.PBRMaterial._scaledReflectivity,0)):this._uniformBuffer.updateColor4(\"vReflectivityColor\",this._reflectivityColor,this._microSurface),this._uniformBuffer.updateColor3(\"vEmissiveColor\",this._emissiveColor),this._uniformBuffer.updateColor3(\"vReflectionColor\",this._reflectionColor),this._uniformBuffer.updateColor4(\"vAlbedoColor\",this._albedoColor,this.alpha*t.visibility),this._lightingInfos.x=this._directIntensity,this._lightingInfos.y=this._emissiveIntensity,this._lightingInfos.z=this._environmentIntensity,this._lightingInfos.w=this._specularIntensity,this._uniformBuffer.updateVector4(\"vLightingIntensity\",this._lightingInfos)}r.texturesEnabled&&(this._albedoTexture&&ye.StandardMaterial.DiffuseTextureEnabled&&this._uniformBuffer.setTexture(\"albedoSampler\",this._albedoTexture),this._ambientTexture&&ye.StandardMaterial.AmbientTextureEnabled&&this._uniformBuffer.setTexture(\"ambientSampler\",this._ambientTexture),this._opacityTexture&&ye.StandardMaterial.OpacityTextureEnabled&&this._uniformBuffer.setTexture(\"opacitySampler\",this._opacityTexture),a&&ye.StandardMaterial.ReflectionTextureEnabled&&(n.LODBASEDMICROSFURACE?this._uniformBuffer.setTexture(\"reflectionSampler\",a):(this._uniformBuffer.setTexture(\"reflectionSampler\",a._lodTextureMid||a),this._uniformBuffer.setTexture(\"reflectionSamplerLow\",a._lodTextureLow||a),this._uniformBuffer.setTexture(\"reflectionSamplerHigh\",a._lodTextureHigh||a))),n.ENVIRONMENTBRDF&&this._uniformBuffer.setTexture(\"environmentBrdfSampler\",this._environmentBRDFTexture),l&&ye.StandardMaterial.RefractionTextureEnabled&&(n.LODBASEDMICROSFURACE?this._uniformBuffer.setTexture(\"refractionSampler\",l):(this._uniformBuffer.setTexture(\"refractionSampler\",l._lodTextureMid||l),this._uniformBuffer.setTexture(\"refractionSamplerLow\",l._lodTextureLow||l),this._uniformBuffer.setTexture(\"refractionSamplerHigh\",l._lodTextureHigh||l))),this._emissiveTexture&&ye.StandardMaterial.EmissiveTextureEnabled&&this._uniformBuffer.setTexture(\"emissiveSampler\",this._emissiveTexture),this._lightmapTexture&&ye.StandardMaterial.LightmapTextureEnabled&&this._uniformBuffer.setTexture(\"lightmapSampler\",this._lightmapTexture),ye.StandardMaterial.SpecularTextureEnabled&&(this._metallicTexture?this._uniformBuffer.setTexture(\"reflectivitySampler\",this._metallicTexture):this._reflectivityTexture&&this._uniformBuffer.setTexture(\"reflectivitySampler\",this._reflectivityTexture),this._microSurfaceTexture&&this._uniformBuffer.setTexture(\"microSurfaceSampler\",this._microSurfaceTexture)),this._bumpTexture&&r.getEngine().getCaps().standardDerivatives&&ye.StandardMaterial.BumpTextureEnabled&&!this._disableBumpMap&&this._uniformBuffer.setTexture(\"bumpSampler\",this._bumpTexture)),ye.MaterialHelper.BindClipPlane(this._activeEffect,r),r.ambientColor.multiplyToRef(this._ambientColor,this._globalAmbientColor);var d=r._forcedViewPosition?r._forcedViewPosition:r._mirroredCameraPosition?r._mirroredCameraPosition:r.activeCamera.globalPosition,f=r.useRightHandedSystem===(null!=r._mirroredCameraPosition);o.setFloat4(\"vEyePosition\",d.x,d.y,d.z,f?-1:1),o.setColor3(\"vAmbientColor\",this._globalAmbientColor)}!s&&this.isFrozen||(r.lightsEnabled&&!this._disableLighting&&ye.MaterialHelper.BindLights(r,t,this._activeEffect,n,this._maxSimultaneousLights,this._lightFalloff!==p.LIGHTFALLOFF_STANDARD),(r.fogEnabled&&t.applyFog&&r.fogMode!==ye.Scene.FOGMODE_NONE||a)&&this.bindView(o),ye.MaterialHelper.BindFogParameters(r,t,this._activeEffect,!0),n.NUM_MORPH_INFLUENCERS&&ye.MaterialHelper.BindMorphTargetParameters(t,this._activeEffect),this._imageProcessingConfiguration.bind(this._activeEffect),ye.MaterialHelper.BindLogDepth(n,this._activeEffect,r)),this._uniformBuffer.update(),this._afterBind(t,this._activeEffect)}}},p.prototype.getAnimatables=function(){var e=[];return this._albedoTexture&&this._albedoTexture.animations&&0<this._albedoTexture.animations.length&&e.push(this._albedoTexture),this._ambientTexture&&this._ambientTexture.animations&&0<this._ambientTexture.animations.length&&e.push(this._ambientTexture),this._opacityTexture&&this._opacityTexture.animations&&0<this._opacityTexture.animations.length&&e.push(this._opacityTexture),this._reflectionTexture&&this._reflectionTexture.animations&&0<this._reflectionTexture.animations.length&&e.push(this._reflectionTexture),this._emissiveTexture&&this._emissiveTexture.animations&&0<this._emissiveTexture.animations.length&&e.push(this._emissiveTexture),this._metallicTexture&&this._metallicTexture.animations&&0<this._metallicTexture.animations.length?e.push(this._metallicTexture):this._reflectivityTexture&&this._reflectivityTexture.animations&&0<this._reflectivityTexture.animations.length&&e.push(this._reflectivityTexture),this._bumpTexture&&this._bumpTexture.animations&&0<this._bumpTexture.animations.length&&e.push(this._bumpTexture),this._lightmapTexture&&this._lightmapTexture.animations&&0<this._lightmapTexture.animations.length&&e.push(this._lightmapTexture),this._refractionTexture&&this._refractionTexture.animations&&0<this._refractionTexture.animations.length&&e.push(this._refractionTexture),e},p.prototype._getReflectionTexture=function(){return this._reflectionTexture?this._reflectionTexture:this.getScene().environmentTexture},p.prototype._getRefractionTexture=function(){return this._refractionTexture?this._refractionTexture:this._linkRefractionWithTransparency?this.getScene().environmentTexture:null},p.prototype.dispose=function(e,t){t&&(this._albedoTexture&&this._albedoTexture.dispose(),this._ambientTexture&&this._ambientTexture.dispose(),this._opacityTexture&&this._opacityTexture.dispose(),this._reflectionTexture&&this._reflectionTexture.dispose(),this._environmentBRDFTexture&&this.getScene()._environmentBRDFTexture!==this._environmentBRDFTexture&&this._environmentBRDFTexture.dispose(),this._emissiveTexture&&this._emissiveTexture.dispose(),this._metallicTexture&&this._metallicTexture.dispose(),this._reflectivityTexture&&this._reflectivityTexture.dispose(),this._bumpTexture&&this._bumpTexture.dispose(),this._lightmapTexture&&this._lightmapTexture.dispose(),this._refractionTexture&&this._refractionTexture.dispose()),this._renderTargets.dispose(),this._imageProcessingConfiguration&&this._imageProcessingObserver&&this._imageProcessingConfiguration.onUpdateParameters.remove(this._imageProcessingObserver),r.prototype.dispose.call(this,e,t)},p.LIGHTFALLOFF_PHYSICAL=0,p.LIGHTFALLOFF_GLTF=1,p.LIGHTFALLOFF_STANDARD=2,p._scaledReflectivity=new ye.Color3,b([ye.serializeAsImageProcessingConfiguration()],p.prototype,\"_imageProcessingConfiguration\",void 0),b([ye.serialize()],p.prototype,\"useLogarithmicDepth\",null),b([ye.serialize()],p.prototype,\"transparencyMode\",null),p})(ye.PushMaterial),ye.PBRBaseMaterial=Te,Ee=$a||($a={}),xe=(function(r){function e(e,t){var i=r.call(this,e,t)||this;return i.maxSimultaneousLights=4,i.disableLighting=!1,i.invertNormalMapX=!1,i.invertNormalMapY=!1,i.emissiveColor=new Ee.Color3(0,0,0),i.occlusionStrength=1,i.useLightmapAsShadowmap=!1,i._useAlphaFromAlbedoTexture=!0,i._useAmbientInGrayScale=!0,i}return T(e,r),Object.defineProperty(e.prototype,\"doubleSided\",{get:function(){return this._twoSidedLighting},set:function(e){this._twoSidedLighting!==e&&(this._twoSidedLighting=e,this.backFaceCulling=!e,this._markAllSubMeshesAsTexturesDirty())},enumerable:!0,configurable:!0}),e.prototype.getActiveTextures=function(){var e=r.prototype.getActiveTextures.call(this);return this.environmentTexture&&e.push(this.environmentTexture),this.normalTexture&&e.push(this.normalTexture),this.emissiveTexture&&e.push(this.emissiveTexture),this.occlusionTexture&&e.push(this.occlusionTexture),this.lightmapTexture&&e.push(this.lightmapTexture),e},e.prototype.hasTexture=function(e){return!!r.prototype.hasTexture.call(this,e)||this.lightmapTexture===e},e.prototype.getClassName=function(){return\"PBRBaseSimpleMaterial\"},b([Ee.serialize(),Ee.expandToProperty(\"_markAllSubMeshesAsLightsDirty\")],e.prototype,\"maxSimultaneousLights\",void 0),b([Ee.serialize(),Ee.expandToProperty(\"_markAllSubMeshesAsLightsDirty\")],e.prototype,\"disableLighting\",void 0),b([Ee.serializeAsTexture(),Ee.expandToProperty(\"_markAllSubMeshesAsTexturesDirty\",\"_reflectionTexture\")],e.prototype,\"environmentTexture\",void 0),b([Ee.serialize(),Ee.expandToProperty(\"_markAllSubMeshesAsTexturesDirty\")],e.prototype,\"invertNormalMapX\",void 0),b([Ee.serialize(),Ee.expandToProperty(\"_markAllSubMeshesAsTexturesDirty\")],e.prototype,\"invertNormalMapY\",void 0),b([Ee.serializeAsTexture(),Ee.expandToProperty(\"_markAllSubMeshesAsTexturesDirty\",\"_bumpTexture\")],e.prototype,\"normalTexture\",void 0),b([Ee.serializeAsColor3(\"emissive\"),Ee.expandToProperty(\"_markAllSubMeshesAsTexturesDirty\")],e.prototype,\"emissiveColor\",void 0),b([Ee.serializeAsTexture(),Ee.expandToProperty(\"_markAllSubMeshesAsTexturesDirty\")],e.prototype,\"emissiveTexture\",void 0),b([Ee.serialize(),Ee.expandToProperty(\"_markAllSubMeshesAsTexturesDirty\",\"_ambientTextureStrength\")],e.prototype,\"occlusionStrength\",void 0),b([Ee.serializeAsTexture(),Ee.expandToProperty(\"_markAllSubMeshesAsTexturesDirty\",\"_ambientTexture\")],e.prototype,\"occlusionTexture\",void 0),b([Ee.serialize(),Ee.expandToProperty(\"_markAllSubMeshesAsTexturesDirty\",\"_alphaCutOff\")],e.prototype,\"alphaCutOff\",void 0),b([Ee.serialize()],e.prototype,\"doubleSided\",null),b([Ee.serializeAsTexture(),Ee.expandToProperty(\"_markAllSubMeshesAsTexturesDirty\",null)],e.prototype,\"lightmapTexture\",void 0),b([Ee.serialize(),Ee.expandToProperty(\"_markAllSubMeshesAsTexturesDirty\")],e.prototype,\"useLightmapAsShadowmap\",void 0),e})(Ee.PBRBaseMaterial),Ee.PBRBaseSimpleMaterial=xe,Pe=$a||($a={}),Ae=(function(r){function n(e,t){var i=r.call(this,e,t)||this;return i.directIntensity=1,i.emissiveIntensity=1,i.environmentIntensity=1,i.specularIntensity=1,i.disableBumpMap=!1,i.ambientTextureStrength=1,i.ambientTextureImpactOnAnalyticalLights=n.DEFAULT_AO_ON_ANALYTICAL_LIGHTS,i.ambientColor=new Pe.Color3(0,0,0),i.albedoColor=new Pe.Color3(1,1,1),i.reflectivityColor=new Pe.Color3(1,1,1),i.reflectionColor=new Pe.Color3(1,1,1),i.emissiveColor=new Pe.Color3(0,0,0),i.microSurface=1,i.indexOfRefraction=.66,i.invertRefractionY=!1,i.linkRefractionWithTransparency=!1,i.useLightmapAsShadowmap=!1,i.useAlphaFromAlbedoTexture=!1,i.forceAlphaTest=!1,i.alphaCutOff=.4,i.useSpecularOverAlpha=!0,i.useMicroSurfaceFromReflectivityMapAlpha=!1,i.useRoughnessFromMetallicTextureAlpha=!0,i.useRoughnessFromMetallicTextureGreen=!1,i.useMetallnessFromMetallicTextureBlue=!1,i.useAmbientOcclusionFromMetallicTextureRed=!1,i.useAmbientInGrayScale=!1,i.useAutoMicroSurfaceFromReflectivityMap=!1,i.useRadianceOverAlpha=!0,i.useObjectSpaceNormalMap=!1,i.useParallax=!1,i.useParallaxOcclusion=!1,i.parallaxScaleBias=.05,i.disableLighting=!1,i.forceIrradianceInFragment=!1,i.maxSimultaneousLights=4,i.invertNormalMapX=!1,i.invertNormalMapY=!1,i.twoSidedLighting=!1,i.useAlphaFresnel=!1,i.useLinearAlphaFresnel=!1,i.environmentBRDFTexture=null,i.forceNormalForward=!1,i.enableSpecularAntiAliasing=!1,i.useHorizonOcclusion=!0,i.useRadianceOcclusion=!0,i.unlit=!1,i._environmentBRDFTexture=Pe.TextureTools.GetEnvironmentBRDFTexture(t),i}return T(n,r),Object.defineProperty(n.prototype,\"usePhysicalLightFalloff\",{get:function(){return this._lightFalloff===Pe.PBRBaseMaterial.LIGHTFALLOFF_PHYSICAL},set:function(e){e!==this.usePhysicalLightFalloff&&(this._markAllSubMeshesAsTexturesDirty(),this._lightFalloff=e?Pe.PBRBaseMaterial.LIGHTFALLOFF_PHYSICAL:Pe.PBRBaseMaterial.LIGHTFALLOFF_STANDARD)},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,\"useGLTFLightFalloff\",{get:function(){return this._lightFalloff===Pe.PBRBaseMaterial.LIGHTFALLOFF_GLTF},set:function(e){e!==this.useGLTFLightFalloff&&(this._markAllSubMeshesAsTexturesDirty(),this._lightFalloff=e?Pe.PBRBaseMaterial.LIGHTFALLOFF_GLTF:Pe.PBRBaseMaterial.LIGHTFALLOFF_STANDARD)},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,\"imageProcessingConfiguration\",{get:function(){return this._imageProcessingConfiguration},set:function(e){this._attachImageProcessingConfiguration(e),this._markAllSubMeshesAsTexturesDirty()},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,\"cameraColorCurvesEnabled\",{get:function(){return this.imageProcessingConfiguration.colorCurvesEnabled},set:function(e){this.imageProcessingConfiguration.colorCurvesEnabled=e},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,\"cameraColorGradingEnabled\",{get:function(){return this.imageProcessingConfiguration.colorGradingEnabled},set:function(e){this.imageProcessingConfiguration.colorGradingEnabled=e},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,\"cameraToneMappingEnabled\",{get:function(){return this._imageProcessingConfiguration.toneMappingEnabled},set:function(e){this._imageProcessingConfiguration.toneMappingEnabled=e},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,\"cameraExposure\",{get:function(){return this._imageProcessingConfiguration.exposure},set:function(e){this._imageProcessingConfiguration.exposure=e},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,\"cameraContrast\",{get:function(){return this._imageProcessingConfiguration.contrast},set:function(e){this._imageProcessingConfiguration.contrast=e},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,\"cameraColorGradingTexture\",{get:function(){return this._imageProcessingConfiguration.colorGradingTexture},set:function(e){this._imageProcessingConfiguration.colorGradingTexture=e},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,\"cameraColorCurves\",{get:function(){return this._imageProcessingConfiguration.colorCurves},set:function(e){this._imageProcessingConfiguration.colorCurves=e},enumerable:!0,configurable:!0}),n.prototype.getClassName=function(){return\"PBRMaterial\"},n.prototype.getActiveTextures=function(){var e=r.prototype.getActiveTextures.call(this);return this._albedoTexture&&e.push(this._albedoTexture),this._ambientTexture&&e.push(this._ambientTexture),this._opacityTexture&&e.push(this._opacityTexture),this._reflectionTexture&&e.push(this._reflectionTexture),this._emissiveTexture&&e.push(this._emissiveTexture),this._reflectivityTexture&&e.push(this._reflectivityTexture),this._metallicTexture&&e.push(this._metallicTexture),this._microSurfaceTexture&&e.push(this._microSurfaceTexture),this._bumpTexture&&e.push(this._bumpTexture),this._lightmapTexture&&e.push(this._lightmapTexture),this._refractionTexture&&e.push(this._refractionTexture),e},n.prototype.hasTexture=function(e){return!!r.prototype.hasTexture.call(this,e)||(this._albedoTexture===e||(this._ambientTexture===e||(this._opacityTexture===e||(this._reflectionTexture===e||(this._reflectivityTexture===e||(this._metallicTexture===e||(this._microSurfaceTexture===e||(this._bumpTexture===e||(this._lightmapTexture===e||this._refractionTexture===e)))))))))},n.prototype.clone=function(e){var t=this,i=Pe.SerializationHelper.Clone((function(){return new n(e,t.getScene())}),this);return i.id=e,i.name=e,i},n.prototype.serialize=function(){var e=Pe.SerializationHelper.Serialize(this);return e.customType=\"BABYLON.PBRMaterial\",e},n.Parse=function(e,t,i){return Pe.SerializationHelper.Parse((function(){return new n(e.name,t)}),e,t,i)},n.PBRMATERIAL_OPAQUE=0,n.PBRMATERIAL_ALPHATEST=1,n.PBRMATERIAL_ALPHABLEND=2,n.PBRMATERIAL_ALPHATESTANDBLEND=3,n.DEFAULT_AO_ON_ANALYTICAL_LIGHTS=1,b([Pe.serialize(),Pe.expandToProperty(\"_markAllSubMeshesAsTexturesDirty\")],n.prototype,\"directIntensity\",void 0),b([Pe.serialize(),Pe.expandToProperty(\"_markAllSubMeshesAsTexturesDirty\")],n.prototype,\"emissiveIntensity\",void 0),b([Pe.serialize(),Pe.expandToProperty(\"_markAllSubMeshesAsTexturesDirty\")],n.prototype,\"environmentIntensity\",void 0),b([Pe.serialize(),Pe.expandToProperty(\"_markAllSubMeshesAsTexturesDirty\")],n.prototype,\"specularIntensity\",void 0),b([Pe.serialize(),Pe.expandToProperty(\"_markAllSubMeshesAsTexturesDirty\")],n.prototype,\"disableBumpMap\",void 0),b([Pe.serializeAsTexture(),Pe.expandToProperty(\"_markAllSubMeshesAsTexturesDirty\")],n.prototype,\"albedoTexture\",void 0),b([Pe.serializeAsTexture(),Pe.expandToProperty(\"_markAllSubMeshesAsTexturesDirty\")],n.prototype,\"ambientTexture\",void 0),b([Pe.serialize(),Pe.expandToProperty(\"_markAllSubMeshesAsTexturesDirty\")],n.prototype,\"ambientTextureStrength\",void 0),b([Pe.serialize(),Pe.expandToProperty(\"_markAllSubMeshesAsTexturesDirty\")],n.prototype,\"ambientTextureImpactOnAnalyticalLights\",void 0),b([Pe.serializeAsTexture(),Pe.expandToProperty(\"_markAllSubMeshesAsTexturesAndMiscDirty\")],n.prototype,\"opacityTexture\",void 0),b([Pe.serializeAsTexture(),Pe.expandToProperty(\"_markAllSubMeshesAsTexturesDirty\")],n.prototype,\"reflectionTexture\",void 0),b([Pe.serializeAsTexture(),Pe.expandToProperty(\"_markAllSubMeshesAsTexturesDirty\")],n.prototype,\"emissiveTexture\",void 0),b([Pe.serializeAsTexture(),Pe.expandToProperty(\"_markAllSubMeshesAsTexturesDirty\")],n.prototype,\"reflectivityTexture\",void 0),b([Pe.serializeAsTexture(),Pe.expandToProperty(\"_markAllSubMeshesAsTexturesDirty\")],n.prototype,\"metallicTexture\",void 0),b([Pe.serialize(),Pe.expandToProperty(\"_markAllSubMeshesAsTexturesDirty\")],n.prototype,\"metallic\",void 0),b([Pe.serialize(),Pe.expandToProperty(\"_markAllSubMeshesAsTexturesDirty\")],n.prototype,\"roughness\",void 0),b([Pe.serializeAsTexture(),Pe.expandToProperty(\"_markAllSubMeshesAsTexturesDirty\")],n.prototype,\"microSurfaceTexture\",void 0),b([Pe.serializeAsTexture(),Pe.expandToProperty(\"_markAllSubMeshesAsTexturesDirty\")],n.prototype,\"bumpTexture\",void 0),b([Pe.serializeAsTexture(),Pe.expandToProperty(\"_markAllSubMeshesAsTexturesDirty\",null)],n.prototype,\"lightmapTexture\",void 0),b([Pe.serializeAsTexture(),Pe.expandToProperty(\"_markAllSubMeshesAsTexturesDirty\")],n.prototype,\"refractionTexture\",void 0),b([Pe.serializeAsColor3(\"ambient\"),Pe.expandToProperty(\"_markAllSubMeshesAsTexturesDirty\")],n.prototype,\"ambientColor\",void 0),b([Pe.serializeAsColor3(\"albedo\"),Pe.expandToProperty(\"_markAllSubMeshesAsTexturesDirty\")],n.prototype,\"albedoColor\",void 0),b([Pe.serializeAsColor3(\"reflectivity\"),Pe.expandToProperty(\"_markAllSubMeshesAsTexturesDirty\")],n.prototype,\"reflectivityColor\",void 0),b([Pe.serializeAsColor3(\"reflection\"),Pe.expandToProperty(\"_markAllSubMeshesAsTexturesDirty\")],n.prototype,\"reflectionColor\",void 0),b([Pe.serializeAsColor3(\"emissive\"),Pe.expandToProperty(\"_markAllSubMeshesAsTexturesDirty\")],n.prototype,\"emissiveColor\",void 0),b([Pe.serialize(),Pe.expandToProperty(\"_markAllSubMeshesAsTexturesDirty\")],n.prototype,\"microSurface\",void 0),b([Pe.serialize(),Pe.expandToProperty(\"_markAllSubMeshesAsTexturesDirty\")],n.prototype,\"indexOfRefraction\",void 0),b([Pe.serialize(),Pe.expandToProperty(\"_markAllSubMeshesAsTexturesDirty\")],n.prototype,\"invertRefractionY\",void 0),b([Pe.serialize(),Pe.expandToProperty(\"_markAllSubMeshesAsTexturesDirty\")],n.prototype,\"linkRefractionWithTransparency\",void 0),b([Pe.serialize(),Pe.expandToProperty(\"_markAllSubMeshesAsTexturesDirty\")],n.prototype,\"useLightmapAsShadowmap\",void 0),b([Pe.serialize(),Pe.expandToProperty(\"_markAllSubMeshesAsTexturesAndMiscDirty\")],n.prototype,\"useAlphaFromAlbedoTexture\",void 0),b([Pe.serialize(),Pe.expandToProperty(\"_markAllSubMeshesAsTexturesAndMiscDirty\")],n.prototype,\"forceAlphaTest\",void 0),b([Pe.serialize(),Pe.expandToProperty(\"_markAllSubMeshesAsTexturesAndMiscDirty\")],n.prototype,\"alphaCutOff\",void 0),b([Pe.serialize(),Pe.expandToProperty(\"_markAllSubMeshesAsTexturesDirty\")],n.prototype,\"useSpecularOverAlpha\",void 0),b([Pe.serialize(),Pe.expandToProperty(\"_markAllSubMeshesAsTexturesDirty\")],n.prototype,\"useMicroSurfaceFromReflectivityMapAlpha\",void 0),b([Pe.serialize(),Pe.expandToProperty(\"_markAllSubMeshesAsTexturesDirty\")],n.prototype,\"useRoughnessFromMetallicTextureAlpha\",void 0),b([Pe.serialize(),Pe.expandToProperty(\"_markAllSubMeshesAsTexturesDirty\")],n.prototype,\"useRoughnessFromMetallicTextureGreen\",void 0),b([Pe.serialize(),Pe.expandToProperty(\"_markAllSubMeshesAsTexturesDirty\")],n.prototype,\"useMetallnessFromMetallicTextureBlue\",void 0),b([Pe.serialize(),Pe.expandToProperty(\"_markAllSubMeshesAsTexturesDirty\")],n.prototype,\"useAmbientOcclusionFromMetallicTextureRed\",void 0),b([Pe.serialize(),Pe.expandToProperty(\"_markAllSubMeshesAsTexturesDirty\")],n.prototype,\"useAmbientInGrayScale\",void 0),b([Pe.serialize(),Pe.expandToProperty(\"_markAllSubMeshesAsTexturesDirty\")],n.prototype,\"useAutoMicroSurfaceFromReflectivityMap\",void 0),b([Pe.serialize()],n.prototype,\"usePhysicalLightFalloff\",null),b([Pe.serialize()],n.prototype,\"useGLTFLightFalloff\",null),b([Pe.serialize(),Pe.expandToProperty(\"_markAllSubMeshesAsTexturesDirty\")],n.prototype,\"useRadianceOverAlpha\",void 0),b([Pe.serialize(),Pe.expandToProperty(\"_markAllSubMeshesAsTexturesDirty\")],n.prototype,\"useObjectSpaceNormalMap\",void 0),b([Pe.serialize(),Pe.expandToProperty(\"_markAllSubMeshesAsTexturesDirty\")],n.prototype,\"useParallax\",void 0),b([Pe.serialize(),Pe.expandToProperty(\"_markAllSubMeshesAsTexturesDirty\")],n.prototype,\"useParallaxOcclusion\",void 0),b([Pe.serialize(),Pe.expandToProperty(\"_markAllSubMeshesAsTexturesDirty\")],n.prototype,\"parallaxScaleBias\",void 0),b([Pe.serialize(),Pe.expandToProperty(\"_markAllSubMeshesAsLightsDirty\")],n.prototype,\"disableLighting\",void 0),b([Pe.serialize(),Pe.expandToProperty(\"_markAllSubMeshesAsTexturesDirty\")],n.prototype,\"forceIrradianceInFragment\",void 0),b([Pe.serialize(),Pe.expandToProperty(\"_markAllSubMeshesAsLightsDirty\")],n.prototype,\"maxSimultaneousLights\",void 0),b([Pe.serialize(),Pe.expandToProperty(\"_markAllSubMeshesAsTexturesDirty\")],n.prototype,\"invertNormalMapX\",void 0),b([Pe.serialize(),Pe.expandToProperty(\"_markAllSubMeshesAsTexturesDirty\")],n.prototype,\"invertNormalMapY\",void 0),b([Pe.serialize(),Pe.expandToProperty(\"_markAllSubMeshesAsTexturesDirty\")],n.prototype,\"twoSidedLighting\",void 0),b([Pe.serialize(),Pe.expandToProperty(\"_markAllSubMeshesAsTexturesDirty\")],n.prototype,\"useAlphaFresnel\",void 0),b([Pe.serialize(),Pe.expandToProperty(\"_markAllSubMeshesAsTexturesDirty\")],n.prototype,\"useLinearAlphaFresnel\",void 0),b([Pe.serializeAsTexture(),Pe.expandToProperty(\"_markAllSubMeshesAsTexturesDirty\")],n.prototype,\"environmentBRDFTexture\",void 0),b([Pe.serialize(),Pe.expandToProperty(\"_markAllSubMeshesAsTexturesDirty\")],n.prototype,\"forceNormalForward\",void 0),b([Pe.serialize(),Pe.expandToProperty(\"_markAllSubMeshesAsTexturesDirty\")],n.prototype,\"enableSpecularAntiAliasing\",void 0),b([Pe.serialize(),Pe.expandToProperty(\"_markAllSubMeshesAsTexturesDirty\")],n.prototype,\"useHorizonOcclusion\",void 0),b([Pe.serialize(),Pe.expandToProperty(\"_markAllSubMeshesAsTexturesDirty\")],n.prototype,\"useRadianceOcclusion\",void 0),b([Pe.serialize(),Pe.expandToProperty(\"_markAllSubMeshesAsMiscDirty\")],n.prototype,\"unlit\",void 0),n})(Pe.PBRBaseMaterial),Pe.PBRMaterial=Ae,Se=$a||($a={}),Me=(function(r){function n(e,t){var i=r.call(this,e,t)||this;return i._useRoughnessFromMetallicTextureAlpha=!1,i._useRoughnessFromMetallicTextureGreen=!0,i._useMetallnessFromMetallicTextureBlue=!0,i.metallic=1,i.roughness=1,i}return T(n,r),n.prototype.getClassName=function(){return\"PBRMetallicRoughnessMaterial\"},n.prototype.getActiveTextures=function(){var e=r.prototype.getActiveTextures.call(this);return this.baseTexture&&e.push(this.baseTexture),this.metallicRoughnessTexture&&e.push(this.metallicRoughnessTexture),e},n.prototype.hasTexture=function(e){return!!r.prototype.hasTexture.call(this,e)||(this.baseTexture===e||this.metallicRoughnessTexture===e)},n.prototype.clone=function(e){var t=this,i=Se.SerializationHelper.Clone((function(){return new n(e,t.getScene())}),this);return i.id=e,i.name=e,i},n.prototype.serialize=function(){var e=Se.SerializationHelper.Serialize(this);return e.customType=\"BABYLON.PBRMetallicRoughnessMaterial\",e},n.Parse=function(e,t,i){return Se.SerializationHelper.Parse((function(){return new n(e.name,t)}),e,t,i)},b([Se.serializeAsColor3(),Se.expandToProperty(\"_markAllSubMeshesAsTexturesDirty\",\"_albedoColor\")],n.prototype,\"baseColor\",void 0),b([Se.serializeAsTexture(),Se.expandToProperty(\"_markAllSubMeshesAsTexturesDirty\",\"_albedoTexture\")],n.prototype,\"baseTexture\",void 0),b([Se.serialize(),Se.expandToProperty(\"_markAllSubMeshesAsTexturesDirty\")],n.prototype,\"metallic\",void 0),b([Se.serialize(),Se.expandToProperty(\"_markAllSubMeshesAsTexturesDirty\")],n.prototype,\"roughness\",void 0),b([Se.serializeAsTexture(),Se.expandToProperty(\"_markAllSubMeshesAsTexturesDirty\",\"_metallicTexture\")],n.prototype,\"metallicRoughnessTexture\",void 0),n})(Se.PBRBaseSimpleMaterial),Se.PBRMetallicRoughnessMaterial=Me,Re=$a||($a={}),Ce=(function(r){function n(e,t){var i=r.call(this,e,t)||this;return i._useMicroSurfaceFromReflectivityMapAlpha=!0,i}return T(n,r),n.prototype.getClassName=function(){return\"PBRSpecularGlossinessMaterial\"},n.prototype.getActiveTextures=function(){var e=r.prototype.getActiveTextures.call(this);return this.diffuseTexture&&e.push(this.diffuseTexture),this.specularGlossinessTexture&&e.push(this.specularGlossinessTexture),e},n.prototype.hasTexture=function(e){return!!r.prototype.hasTexture.call(this,e)||(this.diffuseTexture===e||this.specularGlossinessTexture===e)},n.prototype.clone=function(e){var t=this,i=Re.SerializationHelper.Clone((function(){return new n(e,t.getScene())}),this);return i.id=e,i.name=e,i},n.prototype.serialize=function(){var e=Re.SerializationHelper.Serialize(this);return e.customType=\"BABYLON.PBRSpecularGlossinessMaterial\",e},n.Parse=function(e,t,i){return Re.SerializationHelper.Parse((function(){return new n(e.name,t)}),e,t,i)},b([Re.serializeAsColor3(\"diffuse\"),Re.expandToProperty(\"_markAllSubMeshesAsTexturesDirty\",\"_albedoColor\")],n.prototype,\"diffuseColor\",void 0),b([Re.serializeAsTexture(),Re.expandToProperty(\"_markAllSubMeshesAsTexturesDirty\",\"_albedoTexture\")],n.prototype,\"diffuseTexture\",void 0),b([Re.serializeAsColor3(\"specular\"),Re.expandToProperty(\"_markAllSubMeshesAsTexturesDirty\",\"_reflectivityColor\")],n.prototype,\"specularColor\",void 0),b([Re.serialize(),Re.expandToProperty(\"_markAllSubMeshesAsTexturesDirty\",\"_microSurface\")],n.prototype,\"glossiness\",void 0),b([Re.serializeAsTexture(),Re.expandToProperty(\"_markAllSubMeshesAsTexturesDirty\",\"_reflectivityTexture\")],n.prototype,\"specularGlossinessTexture\",void 0),n})(Re.PBRBaseSimpleMaterial),Re.PBRSpecularGlossinessMaterial=Ce,(function(s){s.CameraInputTypes={};var e=(function(){function e(e){this.attached={},this.camera=e,this.checkInputs=function(){}}return e.prototype.add=function(e){var t=e.getSimpleName();this.attached[t]?s.Tools.Warn(\"camera input of type \"+t+\" already exists on camera\"):((this.attached[t]=e).camera=this.camera,e.checkInputs&&(this.checkInputs=this._addCheckInputs(e.checkInputs.bind(e))),this.attachedElement&&e.attachControl(this.attachedElement))},e.prototype.remove=function(e){for(var t in this.attached){var i=this.attached[t];i===e&&(i.detachControl(this.attachedElement),i.camera=null,delete this.attached[t],this.rebuildInputCheck())}},e.prototype.removeByType=function(e){for(var t in this.attached){var i=this.attached[t];i.getClassName()===e&&(i.detachControl(this.attachedElement),i.camera=null,delete this.attached[t],this.rebuildInputCheck())}},e.prototype._addCheckInputs=function(e){var t=this.checkInputs;return function(){t(),e()}},e.prototype.attachInput=function(e){this.attachedElement&&e.attachControl(this.attachedElement,this.noPreventDefault)},e.prototype.attachElement=function(e,t){if(void 0===t&&(t=!1),!this.attachedElement)for(var i in t=!s.Camera.ForceAttachControlToAlwaysPreventDefault&&t,this.attachedElement=e,this.noPreventDefault=t,this.attached)this.attached[i].attachControl(e,t)},e.prototype.detachElement=function(e,t){if(void 0===t&&(t=!1),this.attachedElement===e){for(var i in this.attached)this.attached[i].detachControl(e),t&&(this.attached[i].camera=null);this.attachedElement=null}},e.prototype.rebuildInputCheck=function(){for(var e in this.checkInputs=function(){},this.attached){var t=this.attached[e];t.checkInputs&&(this.checkInputs=this._addCheckInputs(t.checkInputs.bind(t)))}},e.prototype.clear=function(){this.attachedElement&&this.detachElement(this.attachedElement,!0),this.attached={},this.attachedElement=null,this.checkInputs=function(){}},e.prototype.serialize=function(e){var t={};for(var i in this.attached){var r=this.attached[i],n=s.SerializationHelper.Serialize(r);t[r.getClassName()]=n}e.inputsmgr=t},e.prototype.parse=function(e){var t=e.inputsmgr;if(t)for(var i in this.clear(),t){if(o=s.CameraInputTypes[i]){var r=t[i],n=s.SerializationHelper.Parse((function(){return new o}),r,null);this.add(n)}}else for(var i in this.attached){var o;if(o=s.CameraInputTypes[this.attached[i].getClassName()]){n=s.SerializationHelper.Parse((function(){return new o}),e,null);this.remove(this.attached[i]),this.add(n)}}},e})();s.CameraInputsManager=e})($a||($a={})),Oe=$a||($a={}),De=(function(o){function r(e,t,i,r){void 0===r&&(r=!0);var n=o.call(this,e,t,i,r)||this;return n.cameraDirection=new Oe.Vector3(0,0,0),n.cameraRotation=new Oe.Vector2(0,0),n.rotation=new Oe.Vector3(0,0,0),n.speed=2,n.noRotationConstraint=!1,n.lockedTarget=null,n._currentTarget=Oe.Vector3.Zero(),n._viewMatrix=Oe.Matrix.Zero(),n._camMatrix=Oe.Matrix.Zero(),n._cameraTransformMatrix=Oe.Matrix.Zero(),n._cameraRotationMatrix=Oe.Matrix.Zero(),n._referencePoint=new Oe.Vector3(0,0,1),n._transformedReferencePoint=Oe.Vector3.Zero(),n._globalCurrentTarget=Oe.Vector3.Zero(),n._globalCurrentUpVector=Oe.Vector3.Zero(),n._defaultUp=Oe.Vector3.Up(),n._cachedRotationZ=0,n._cachedQuaternionRotationZ=0,n}return T(r,o),r.prototype.getFrontPosition=function(e){this.getWorldMatrix();var t=this.getTarget().subtract(this.position);return t.normalize(),t.scaleInPlace(e),this.globalPosition.add(t)},r.prototype._getLockedTargetPosition=function(){return this.lockedTarget?(this.lockedTarget.absolutePosition&&this.lockedTarget.computeWorldMatrix(),this.lockedTarget.absolutePosition||this.lockedTarget):null},r.prototype.storeState=function(){return this._storedPosition=this.position.clone(),this._storedRotation=this.rotation.clone(),this.rotationQuaternion&&(this._storedRotationQuaternion=this.rotationQuaternion.clone()),o.prototype.storeState.call(this)},r.prototype._restoreStateValues=function(){return!!o.prototype._restoreStateValues.call(this)&&(this.position=this._storedPosition.clone(),this.rotation=this._storedRotation.clone(),this.rotationQuaternion&&(this.rotationQuaternion=this._storedRotationQuaternion.clone()),this.cameraDirection.copyFromFloats(0,0,0),this.cameraRotation.copyFromFloats(0,0),!0)},r.prototype._initCache=function(){o.prototype._initCache.call(this),this._cache.lockedTarget=new Oe.Vector3(Number.MAX_VALUE,Number.MAX_VALUE,Number.MAX_VALUE),this._cache.rotation=new Oe.Vector3(Number.MAX_VALUE,Number.MAX_VALUE,Number.MAX_VALUE),this._cache.rotationQuaternion=new Oe.Quaternion(Number.MAX_VALUE,Number.MAX_VALUE,Number.MAX_VALUE,Number.MAX_VALUE)},r.prototype._updateCache=function(e){e||o.prototype._updateCache.call(this);var t=this._getLockedTargetPosition();t?this._cache.lockedTarget?this._cache.lockedTarget.copyFrom(t):this._cache.lockedTarget=t.clone():this._cache.lockedTarget=null,this._cache.rotation.copyFrom(this.rotation),this.rotationQuaternion&&this._cache.rotationQuaternion.copyFrom(this.rotationQuaternion)},r.prototype._isSynchronizedViewMatrix=function(){if(!o.prototype._isSynchronizedViewMatrix.call(this))return!1;var e=this._getLockedTargetPosition();return(this._cache.lockedTarget?this._cache.lockedTarget.equals(e):!e)&&(this.rotationQuaternion?this.rotationQuaternion.equals(this._cache.rotationQuaternion):this._cache.rotation.equals(this.rotation))},r.prototype._computeLocalCameraSpeed=function(){var e=this.getEngine();return this.speed*Math.sqrt(e.getDeltaTime()/(100*e.getFps()))},r.prototype.setTarget=function(e){this.upVector.normalize(),this.position.z===e.z&&(this.position.z+=Oe.Epsilon),Oe.Matrix.LookAtLHToRef(this.position,e,this._defaultUp,this._camMatrix),this._camMatrix.invert(),this.rotation.x=Math.atan(this._camMatrix.m[6]/this._camMatrix.m[10]);var t=e.subtract(this.position);0<=t.x?this.rotation.y=-Math.atan(t.z/t.x)+Math.PI/2:this.rotation.y=-Math.atan(t.z/t.x)-Math.PI/2,this.rotation.z=0,isNaN(this.rotation.x)&&(this.rotation.x=0),isNaN(this.rotation.y)&&(this.rotation.y=0),isNaN(this.rotation.z)&&(this.rotation.z=0),this.rotationQuaternion&&Oe.Quaternion.RotationYawPitchRollToRef(this.rotation.y,this.rotation.x,this.rotation.z,this.rotationQuaternion)},r.prototype.getTarget=function(){return this._currentTarget},r.prototype._decideIfNeedsToMove=function(){return 0<Math.abs(this.cameraDirection.x)||0<Math.abs(this.cameraDirection.y)||0<Math.abs(this.cameraDirection.z)},r.prototype._updatePosition=function(){if(this.parent)return this.parent.getWorldMatrix().invertToRef(Oe.Tmp.Matrix[0]),Oe.Vector3.TransformNormalToRef(this.cameraDirection,Oe.Tmp.Matrix[0],Oe.Tmp.Vector3[0]),void this.position.addInPlace(Oe.Tmp.Vector3[0]);this.position.addInPlace(this.cameraDirection)},r.prototype._checkInputs=function(){var e=this._decideIfNeedsToMove(),t=0<Math.abs(this.cameraRotation.x)||0<Math.abs(this.cameraRotation.y);if(e&&this._updatePosition(),t){if(this.rotation.x+=this.cameraRotation.x,this.rotation.y+=this.cameraRotation.y,this.rotationQuaternion)this.rotation.lengthSquared()&&Oe.Quaternion.RotationYawPitchRollToRef(this.rotation.y,this.rotation.x,this.rotation.z,this.rotationQuaternion);if(!this.noRotationConstraint){var i=Math.PI/2*.95;this.rotation.x>i&&(this.rotation.x=i),this.rotation.x<-i&&(this.rotation.x=-i)}}e&&(Math.abs(this.cameraDirection.x)<this.speed*Oe.Epsilon&&(this.cameraDirection.x=0),Math.abs(this.cameraDirection.y)<this.speed*Oe.Epsilon&&(this.cameraDirection.y=0),Math.abs(this.cameraDirection.z)<this.speed*Oe.Epsilon&&(this.cameraDirection.z=0),this.cameraDirection.scaleInPlace(this.inertia)),t&&(Math.abs(this.cameraRotation.x)<this.speed*Oe.Epsilon&&(this.cameraRotation.x=0),Math.abs(this.cameraRotation.y)<this.speed*Oe.Epsilon&&(this.cameraRotation.y=0),this.cameraRotation.scaleInPlace(this.inertia)),o.prototype._checkInputs.call(this)},r.prototype._updateCameraRotationMatrix=function(){this.rotationQuaternion?this.rotationQuaternion.toRotationMatrix(this._cameraRotationMatrix):Oe.Matrix.RotationYawPitchRollToRef(this.rotation.y,this.rotation.x,this.rotation.z,this._cameraRotationMatrix)},r.prototype._rotateUpVectorWithCameraRotationMatrix=function(){return Oe.Vector3.TransformNormalToRef(this._defaultUp,this._cameraRotationMatrix,this.upVector),this},r.prototype._getViewMatrix=function(){return this.lockedTarget&&this.setTarget(this._getLockedTargetPosition()),this._updateCameraRotationMatrix(),this.rotationQuaternion&&this._cachedQuaternionRotationZ!=this.rotationQuaternion.z?(this._rotateUpVectorWithCameraRotationMatrix(),this._cachedQuaternionRotationZ=this.rotationQuaternion.z):this._cachedRotationZ!=this.rotation.z&&(this._rotateUpVectorWithCameraRotationMatrix(),this._cachedRotationZ=this.rotation.z),Oe.Vector3.TransformCoordinatesToRef(this._referencePoint,this._cameraRotationMatrix,this._transformedReferencePoint),this.position.addToRef(this._transformedReferencePoint,this._currentTarget),this._computeViewMatrix(this.position,this._currentTarget,this.upVector),this._viewMatrix},r.prototype._computeViewMatrix=function(e,t,i){if(this.parent){var r=this.parent.getWorldMatrix();Oe.Vector3.TransformCoordinatesToRef(e,r,this._globalPosition),Oe.Vector3.TransformCoordinatesToRef(t,r,this._globalCurrentTarget),Oe.Vector3.TransformNormalToRef(i,r,this._globalCurrentUpVector),this._markSyncedWithParent()}else this._globalPosition.copyFrom(e),this._globalCurrentTarget.copyFrom(t),this._globalCurrentUpVector.copyFrom(i);this.getScene().useRightHandedSystem?Oe.Matrix.LookAtRHToRef(this._globalPosition,this._globalCurrentTarget,this._globalCurrentUpVector,this._viewMatrix):Oe.Matrix.LookAtLHToRef(this._globalPosition,this._globalCurrentTarget,this._globalCurrentUpVector,this._viewMatrix)},r.prototype.createRigCamera=function(e,t){if(this.cameraRigMode!==Oe.Camera.RIG_MODE_NONE){var i=new r(e,this.position.clone(),this.getScene());return this.cameraRigMode!==Oe.Camera.RIG_MODE_VR&&this.cameraRigMode!==Oe.Camera.RIG_MODE_WEBVR||(this.rotationQuaternion||(this.rotationQuaternion=new Oe.Quaternion),i._cameraRigParams={},i.rotationQuaternion=new Oe.Quaternion),i}return null},r.prototype._updateRigCameras=function(){var e=this._rigCameras[0],t=this._rigCameras[1];switch(this.cameraRigMode){case Oe.Camera.RIG_MODE_STEREOSCOPIC_ANAGLYPH:case Oe.Camera.RIG_MODE_STEREOSCOPIC_SIDEBYSIDE_PARALLEL:case Oe.Camera.RIG_MODE_STEREOSCOPIC_SIDEBYSIDE_CROSSEYED:case Oe.Camera.RIG_MODE_STEREOSCOPIC_OVERUNDER:var i=this.cameraRigMode===Oe.Camera.RIG_MODE_STEREOSCOPIC_SIDEBYSIDE_CROSSEYED?1:-1,r=this.cameraRigMode===Oe.Camera.RIG_MODE_STEREOSCOPIC_SIDEBYSIDE_CROSSEYED?-1:1;this._getRigCamPosition(this._cameraRigParams.stereoHalfAngle*i,e.position),this._getRigCamPosition(this._cameraRigParams.stereoHalfAngle*r,t.position),e.setTarget(this.getTarget()),t.setTarget(this.getTarget());break;case Oe.Camera.RIG_MODE_VR:e.rotationQuaternion?(e.rotationQuaternion.copyFrom(this.rotationQuaternion),t.rotationQuaternion.copyFrom(this.rotationQuaternion)):(e.rotation.copyFrom(this.rotation),t.rotation.copyFrom(this.rotation)),e.position.copyFrom(this.position),t.position.copyFrom(this.position)}o.prototype._updateRigCameras.call(this)},r.prototype._getRigCamPosition=function(e,t){this._rigCamTransformMatrix||(this._rigCamTransformMatrix=new Oe.Matrix);var i=this.getTarget();Oe.Matrix.Translation(-i.x,-i.y,-i.z).multiplyToRef(Oe.Matrix.RotationY(e),this._rigCamTransformMatrix),this._rigCamTransformMatrix=this._rigCamTransformMatrix.multiply(Oe.Matrix.Translation(i.x,i.y,i.z)),Oe.Vector3.TransformCoordinatesToRef(this.position,this._rigCamTransformMatrix,t)},r.prototype.getClassName=function(){return\"TargetCamera\"},b([Oe.serializeAsVector3()],r.prototype,\"rotation\",void 0),b([Oe.serialize()],r.prototype,\"speed\",void 0),b([Oe.serializeAsMeshReference(\"lockedTargetId\")],r.prototype,\"lockedTarget\",void 0),r})(Oe.Camera),Oe.TargetCamera=De,Ie=$a||($a={}),we=(function(){function e(e){void 0===e&&(e=!0),this.touchEnabled=e,this.buttons=[0,1,2],this.angularSensibility=2e3,this.previousPosition=null}return e.prototype.attachControl=function(s,a){var l=this,c=this.camera.getEngine();this._pointerInput||(this._pointerInput=function(e,t){var i=e.event;if(!c.isInVRExclusivePointerMode&&(l.touchEnabled||\"touch\"!==i.pointerType)&&(e.type===Ie.PointerEventTypes.POINTERMOVE||-1!==l.buttons.indexOf(i.button))){var r=i.srcElement||i.target;if(e.type===Ie.PointerEventTypes.POINTERDOWN&&r){try{r.setPointerCapture(i.pointerId)}catch(e){}l.previousPosition={x:i.clientX,y:i.clientY},a||(i.preventDefault(),s.focus())}else if(e.type===Ie.PointerEventTypes.POINTERUP&&r){try{r.releasePointerCapture(i.pointerId)}catch(e){}l.previousPosition=null,a||i.preventDefault()}else if(e.type===Ie.PointerEventTypes.POINTERMOVE){if(!l.previousPosition||c.isPointerLock)return;var n=i.clientX-l.previousPosition.x;l.camera.getScene().useRightHandedSystem&&(n*=-1),l.camera.parent&&l.camera.parent._getWorldMatrixDeterminant()<0&&(n*=-1),l.camera.cameraRotation.y+=n/l.angularSensibility;var o=i.clientY-l.previousPosition.y;l.camera.cameraRotation.x+=o/l.angularSensibility,l.previousPosition={x:i.clientX,y:i.clientY},a||i.preventDefault()}}}),this._onMouseMove=function(e){if(c.isPointerLock&&!c.isInVRExclusivePointerMode){var t=e.movementX||e.mozMovementX||e.webkitMovementX||e.msMovementX||0;l.camera.getScene().useRightHandedSystem&&(t*=-1),l.camera.parent&&l.camera.parent._getWorldMatrixDeterminant()<0&&(t*=-1),l.camera.cameraRotation.y+=t/l.angularSensibility;var i=e.movementY||e.mozMovementY||e.webkitMovementY||e.msMovementY||0;l.camera.cameraRotation.x+=i/l.angularSensibility,l.previousPosition=null,a||e.preventDefault()}},this._observer=this.camera.getScene().onPointerObservable.add(this._pointerInput,Ie.PointerEventTypes.POINTERDOWN|Ie.PointerEventTypes.POINTERUP|Ie.PointerEventTypes.POINTERMOVE),s.addEventListener(\"mousemove\",this._onMouseMove,!1)},e.prototype.detachControl=function(e){this._observer&&e&&(this.camera.getScene().onPointerObservable.remove(this._observer),this._onMouseMove&&e.removeEventListener(\"mousemove\",this._onMouseMove),this._observer=null,this._onMouseMove=null,this.previousPosition=null)},e.prototype.getClassName=function(){return\"FreeCameraMouseInput\"},e.prototype.getSimpleName=function(){return\"mouse\"},b([Ie.serialize()],e.prototype,\"buttons\",void 0),b([Ie.serialize()],e.prototype,\"angularSensibility\",void 0),e})(),Ie.FreeCameraMouseInput=we,Ie.CameraInputTypes.FreeCameraMouseInput=we,Le=$a||($a={}),Fe=(function(){function e(){this.keysUp=[38],this.keysDown=[40],this.keysLeft=[37],this.keysRight=[39],this._keys=new Array}return e.prototype.attachControl=function(e,r){var n=this;this._onCanvasBlurObserver||(this._scene=this.camera.getScene(),this._engine=this._scene.getEngine(),this._onCanvasBlurObserver=this._engine.onCanvasBlurObservable.add((function(){n._keys=[]})),this._onKeyboardObserver=this._scene.onKeyboardObservable.add((function(e){var t,i=e.event;e.type===Le.KeyboardEventTypes.KEYDOWN?-1===n.keysUp.indexOf(i.keyCode)&&-1===n.keysDown.indexOf(i.keyCode)&&-1===n.keysLeft.indexOf(i.keyCode)&&-1===n.keysRight.indexOf(i.keyCode)||(-1===(t=n._keys.indexOf(i.keyCode))&&n._keys.push(i.keyCode),r||i.preventDefault()):-1===n.keysUp.indexOf(i.keyCode)&&-1===n.keysDown.indexOf(i.keyCode)&&-1===n.keysLeft.indexOf(i.keyCode)&&-1===n.keysRight.indexOf(i.keyCode)||(0<=(t=n._keys.indexOf(i.keyCode))&&n._keys.splice(t,1),r||i.preventDefault())})))},e.prototype.detachControl=function(e){this._scene&&(this._onKeyboardObserver&&this._scene.onKeyboardObservable.remove(this._onKeyboardObserver),this._onCanvasBlurObserver&&this._engine.onCanvasBlurObservable.remove(this._onCanvasBlurObserver),this._onKeyboardObserver=null,this._onCanvasBlurObserver=null),this._keys=[]},e.prototype.checkInputs=function(){if(this._onKeyboardObserver)for(var e=this.camera,t=0;t<this._keys.length;t++){var i=this._keys[t],r=e._computeLocalCameraSpeed();-1!==this.keysLeft.indexOf(i)?e._localDirection.copyFromFloats(-r,0,0):-1!==this.keysUp.indexOf(i)?e._localDirection.copyFromFloats(0,0,r):-1!==this.keysRight.indexOf(i)?e._localDirection.copyFromFloats(r,0,0):-1!==this.keysDown.indexOf(i)&&e._localDirection.copyFromFloats(0,0,-r),e.getScene().useRightHandedSystem&&(e._localDirection.z*=-1),e.getViewMatrix().invertToRef(e._cameraTransformMatrix),Le.Vector3.TransformNormalToRef(e._localDirection,e._cameraTransformMatrix,e._transformedDirection),e.cameraDirection.addInPlace(e._transformedDirection)}},e.prototype.getClassName=function(){return\"FreeCameraKeyboardMoveInput\"},e.prototype._onLostFocus=function(e){this._keys=[]},e.prototype.getSimpleName=function(){return\"keyboard\"},b([Le.serialize()],e.prototype,\"keysUp\",void 0),b([Le.serialize()],e.prototype,\"keysDown\",void 0),b([Le.serialize()],e.prototype,\"keysLeft\",void 0),b([Le.serialize()],e.prototype,\"keysRight\",void 0),e})(),Le.FreeCameraKeyboardMoveInput=Fe,Le.CameraInputTypes.FreeCameraKeyboardMoveInput=Fe,Be=$a||($a={}),Ne=(function(t){function e(e){return t.call(this,e)||this}return T(e,t),e.prototype.addKeyboard=function(){return this.add(new Be.FreeCameraKeyboardMoveInput),this},e.prototype.addMouse=function(e){return void 0===e&&(e=!0),this.add(new Be.FreeCameraMouseInput(e)),this},e.prototype.addDeviceOrientation=function(){return this.add(new Be.FreeCameraDeviceOrientationInput),this},e.prototype.addTouch=function(){return this.add(new Be.FreeCameraTouchInput),this},e.prototype.addVirtualJoystick=function(){return this.add(new Be.FreeCameraVirtualJoystickInput),this},e})(Be.CameraInputsManager),Be.FreeCameraInputsManager=Ne,(function(s){s.Node.AddNodeConstructor(\"FreeCamera\",(function(e,t){return function(){return new s.UniversalCamera(e,s.Vector3.Zero(),t)}}));var e=(function(o){function e(e,t,i,r){void 0===r&&(r=!0);var n=o.call(this,e,t,i,r)||this;return n.ellipsoid=new s.Vector3(.5,1,.5),n.ellipsoidOffset=new s.Vector3(0,0,0),n.checkCollisions=!1,n.applyGravity=!1,n._needMoveForGravity=!1,n._oldPosition=s.Vector3.Zero(),n._diffPosition=s.Vector3.Zero(),n._newPosition=s.Vector3.Zero(),n._collisionMask=-1,n._onCollisionPositionChange=function(e,t,i){void 0===i&&(i=null),n.getScene().workerCollisions&&t.multiplyInPlace(n._collider._radius);var r;r=t,n._newPosition.copyFrom(r),n._newPosition.subtractToRef(n._oldPosition,n._diffPosition),n._diffPosition.length()>s.Engine.CollisionsEpsilon&&(n.position.addInPlace(n._diffPosition),n.onCollide&&i&&n.onCollide(i))},n.inputs=new s.FreeCameraInputsManager(n),n.inputs.addKeyboard().addMouse(),n}return T(e,o),Object.defineProperty(e.prototype,\"angularSensibility\",{get:function(){var e=this.inputs.attached.mouse;return e?e.angularSensibility:0},set:function(e){var t=this.inputs.attached.mouse;t&&(t.angularSensibility=e)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,\"keysUp\",{get:function(){var e=this.inputs.attached.keyboard;return e?e.keysUp:[]},set:function(e){var t=this.inputs.attached.keyboard;t&&(t.keysUp=e)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,\"keysDown\",{get:function(){var e=this.inputs.attached.keyboard;return e?e.keysDown:[]},set:function(e){var t=this.inputs.attached.keyboard;t&&(t.keysDown=e)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,\"keysLeft\",{get:function(){var e=this.inputs.attached.keyboard;return e?e.keysLeft:[]},set:function(e){var t=this.inputs.attached.keyboard;t&&(t.keysLeft=e)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,\"keysRight\",{get:function(){var e=this.inputs.attached.keyboard;return e?e.keysRight:[]},set:function(e){var t=this.inputs.attached.keyboard;t&&(t.keysRight=e)},enumerable:!0,configurable:!0}),e.prototype.attachControl=function(e,t){this.inputs.attachElement(e,t)},e.prototype.detachControl=function(e){this.inputs.detachElement(e),this.cameraDirection=new s.Vector3(0,0,0),this.cameraRotation=new s.Vector2(0,0)},Object.defineProperty(e.prototype,\"collisionMask\",{get:function(){return this._collisionMask},set:function(e){this._collisionMask=isNaN(e)?-1:e},enumerable:!0,configurable:!0}),e.prototype._collideWithWorld=function(e){(this.parent?s.Vector3.TransformCoordinates(this.position,this.parent.getWorldMatrix()):this.position).subtractFromFloatsToRef(0,this.ellipsoid.y,0,this._oldPosition),this._oldPosition.addInPlace(this.ellipsoidOffset),this._collider||(this._collider=new s.Collider),this._collider._radius=this.ellipsoid,this._collider.collisionMask=this._collisionMask;var t=e;this.applyGravity&&(t=e.add(this.getScene().gravity)),this.getScene().collisionCoordinator.getNewPosition(this._oldPosition,t,this._collider,3,null,this._onCollisionPositionChange,this.uniqueId)},e.prototype._checkInputs=function(){this._localDirection||(this._localDirection=s.Vector3.Zero(),this._transformedDirection=s.Vector3.Zero()),this.inputs.checkInputs(),o.prototype._checkInputs.call(this)},e.prototype._decideIfNeedsToMove=function(){return this._needMoveForGravity||0<Math.abs(this.cameraDirection.x)||0<Math.abs(this.cameraDirection.y)||0<Math.abs(this.cameraDirection.z)},e.prototype._updatePosition=function(){this.checkCollisions&&this.getScene().collisionsEnabled?this._collideWithWorld(this.cameraDirection):o.prototype._updatePosition.call(this)},e.prototype.dispose=function(){this.inputs.clear(),o.prototype.dispose.call(this)},e.prototype.getClassName=function(){return\"FreeCamera\"},b([s.serializeAsVector3()],e.prototype,\"ellipsoid\",void 0),b([s.serializeAsVector3()],e.prototype,\"ellipsoidOffset\",void 0),b([s.serialize()],e.prototype,\"checkCollisions\",void 0),b([s.serialize()],e.prototype,\"applyGravity\",void 0),e})(s.TargetCamera);s.FreeCamera=e})($a||($a={})),Ve=$a||($a={}),Ue=(function(){function e(){this.keysUp=[38],this.keysDown=[40],this.keysLeft=[37],this.keysRight=[39],this.keysReset=[220],this.panningSensibility=50,this.zoomingSensibility=25,this.useAltToZoom=!0,this.angularSpeed=.01,this._keys=new Array}return e.prototype.attachControl=function(e,r){var n=this;this._onCanvasBlurObserver||(this._scene=this.camera.getScene(),this._engine=this._scene.getEngine(),this._onCanvasBlurObserver=this._engine.onCanvasBlurObservable.add((function(){n._keys=[]})),this._onKeyboardObserver=this._scene.onKeyboardObservable.add((function(e){var t,i=e.event;e.type===Ve.KeyboardEventTypes.KEYDOWN?(n._ctrlPressed=i.ctrlKey,n._altPressed=i.altKey,(-1!==n.keysUp.indexOf(i.keyCode)||-1!==n.keysDown.indexOf(i.keyCode)||-1!==n.keysLeft.indexOf(i.keyCode)||-1!==n.keysRight.indexOf(i.keyCode)||-1!==n.keysReset.indexOf(i.keyCode))&&(-1===(t=n._keys.indexOf(i.keyCode))&&n._keys.push(i.keyCode),i.preventDefault&&(r||i.preventDefault()))):-1===n.keysUp.indexOf(i.keyCode)&&-1===n.keysDown.indexOf(i.keyCode)&&-1===n.keysLeft.indexOf(i.keyCode)&&-1===n.keysRight.indexOf(i.keyCode)&&-1===n.keysReset.indexOf(i.keyCode)||(0<=(t=n._keys.indexOf(i.keyCode))&&n._keys.splice(t,1),i.preventDefault&&(r||i.preventDefault()))})))},e.prototype.detachControl=function(e){this._scene&&(this._onKeyboardObserver&&this._scene.onKeyboardObservable.remove(this._onKeyboardObserver),this._onCanvasBlurObserver&&this._engine.onCanvasBlurObservable.remove(this._onCanvasBlurObserver),this._onKeyboardObserver=null,this._onCanvasBlurObserver=null),this._keys=[]},e.prototype.checkInputs=function(){if(this._onKeyboardObserver)for(var e=this.camera,t=0;t<this._keys.length;t++){var i=this._keys[t];-1!==this.keysLeft.indexOf(i)?this._ctrlPressed&&this.camera._useCtrlForPanning?e.inertialPanningX-=1/this.panningSensibility:e.inertialAlphaOffset-=this.angularSpeed:-1!==this.keysUp.indexOf(i)?this._ctrlPressed&&this.camera._useCtrlForPanning?e.inertialPanningY+=1/this.panningSensibility:this._altPressed&&this.useAltToZoom?e.inertialRadiusOffset+=1/this.zoomingSensibility:e.inertialBetaOffset-=this.angularSpeed:-1!==this.keysRight.indexOf(i)?this._ctrlPressed&&this.camera._useCtrlForPanning?e.inertialPanningX+=1/this.panningSensibility:e.inertialAlphaOffset+=this.angularSpeed:-1!==this.keysDown.indexOf(i)?this._ctrlPressed&&this.camera._useCtrlForPanning?e.inertialPanningY-=1/this.panningSensibility:this._altPressed&&this.useAltToZoom?e.inertialRadiusOffset-=1/this.zoomingSensibility:e.inertialBetaOffset+=this.angularSpeed:-1!==this.keysReset.indexOf(i)&&e.useInputToRestoreState&&e.restoreState()}},e.prototype.getClassName=function(){return\"ArcRotateCameraKeyboardMoveInput\"},e.prototype.getSimpleName=function(){return\"keyboard\"},b([Ve.serialize()],e.prototype,\"keysUp\",void 0),b([Ve.serialize()],e.prototype,\"keysDown\",void 0),b([Ve.serialize()],e.prototype,\"keysLeft\",void 0),b([Ve.serialize()],e.prototype,\"keysRight\",void 0),b([Ve.serialize()],e.prototype,\"keysReset\",void 0),b([Ve.serialize()],e.prototype,\"panningSensibility\",void 0),b([Ve.serialize()],e.prototype,\"zoomingSensibility\",void 0),b([Ve.serialize()],e.prototype,\"useAltToZoom\",void 0),b([Ve.serialize()],e.prototype,\"angularSpeed\",void 0),e})(),Ve.ArcRotateCameraKeyboardMoveInput=Ue,Ve.CameraInputTypes.ArcRotateCameraKeyboardMoveInput=Ue,ze=$a||($a={}),Ge=(function(){function e(){this.wheelPrecision=3,this.wheelDeltaPercentage=0}return e.prototype.attachControl=function(e,o){var s=this;this._wheel=function(e,t){if(e.type===ze.PointerEventTypes.POINTERWHEEL){var i=e.event,r=0;if(i.wheelDelta)if(s.wheelDeltaPercentage){var n=.01*i.wheelDelta*s.wheelDeltaPercentage*s.camera.radius;r=0<i.wheelDelta?n/(1+s.wheelDeltaPercentage):n*(1+s.wheelDeltaPercentage)}else r=i.wheelDelta/(40*s.wheelPrecision);else i.detail&&(r=-i.detail/s.wheelPrecision);r&&(s.camera.inertialRadiusOffset+=r),i.preventDefault&&(o||i.preventDefault())}},this._observer=this.camera.getScene().onPointerObservable.add(this._wheel,ze.PointerEventTypes.POINTERWHEEL)},e.prototype.detachControl=function(e){this._observer&&e&&(this.camera.getScene().onPointerObservable.remove(this._observer),this._observer=null,this._wheel=null)},e.prototype.getClassName=function(){return\"ArcRotateCameraMouseWheelInput\"},e.prototype.getSimpleName=function(){return\"mousewheel\"},b([ze.serialize()],e.prototype,\"wheelPrecision\",void 0),b([ze.serialize()],e.prototype,\"wheelDeltaPercentage\",void 0),e})(),ze.ArcRotateCameraMouseWheelInput=Ge,ze.CameraInputTypes.ArcRotateCameraMouseWheelInput=Ge,ke=$a||($a={}),We=(function(){function e(){this.buttons=[0,1,2],this.angularSensibilityX=1e3,this.angularSensibilityY=1e3,this.pinchPrecision=12,this.pinchDeltaPercentage=0,this.panningSensibility=1e3,this.multiTouchPanning=!0,this.multiTouchPanAndZoom=!0,this.pinchInwards=!0,this._isPanClick=!1}return e.prototype.attachControl=function(g,v){var y,b=this,T=this.camera.getEngine(),E=null,x=null,P=0,A=0,S=0,M={x:0,y:0,isPaning:!1,isPinching:!1};this._pointerInput=function(e,t){var i=e.event,r=\"touch\"===e.event.pointerType;if(!T.isInVRExclusivePointerMode&&(e.type===ke.PointerEventTypes.POINTERMOVE||-1!==b.buttons.indexOf(i.button))){var n=i.srcElement||i.target;if(e.type===ke.PointerEventTypes.POINTERDOWN&&n){try{n.setPointerCapture(i.pointerId)}catch(e){}b._isPanClick=i.button===b.camera._panningMouseButton,y={x:i.clientX,y:i.clientY,pointerId:i.pointerId,type:i.pointerType},null===E?E=y:null===x&&(x=y),v||(i.preventDefault(),g.focus())}else if(e.type===ke.PointerEventTypes.POINTERDOUBLETAP)b.camera.useInputToRestoreState&&b.camera.restoreState();else if(e.type===ke.PointerEventTypes.POINTERUP&&n){try{n.releasePointerCapture(i.pointerId)}catch(e){}y=null,P=0,M.isPaning=!1,M.isPinching=!1,A=S=0,r||(x=null),T._badOS?E=x=null:x&&E&&E.pointerId==i.pointerId?(E=x,x=null,y={x:E.x,y:E.y,pointerId:E.pointerId,type:i.pointerType}):E&&x&&x.pointerId==i.pointerId?(x=null,y={x:E.x,y:E.y,pointerId:E.pointerId,type:i.pointerType}):E=x=null,v||i.preventDefault()}else if(e.type===ke.PointerEventTypes.POINTERMOVE)if(v||i.preventDefault(),E&&null===x&&y){if(0!==b.panningSensibility&&(i.ctrlKey&&b.camera._useCtrlForPanning||b._isPanClick))b.camera.inertialPanningX+=-(i.clientX-y.x)/b.panningSensibility,b.camera.inertialPanningY+=(i.clientY-y.y)/b.panningSensibility;else{var o=i.clientX-y.x,s=i.clientY-y.y;b.camera.inertialAlphaOffset-=o/b.angularSensibilityX,b.camera.inertialBetaOffset-=s/b.angularSensibilityY}y.x=i.clientX,y.y=i.clientY}else if(E&&x){var a=E.pointerId===i.pointerId?E:x;a.x=i.clientX,a.y=i.clientY;var l=b.pinchInwards?1:-1,c=E.x-x.x,h=E.y-x.y,u=c*c+h*h,d=Math.sqrt(u);if(0===P)return A=d,P=u,M.x=(E.x+x.x)/2,void(M.y=(E.y+x.y)/2);if(b.multiTouchPanAndZoom){if(b.pinchDeltaPercentage?b.camera.inertialRadiusOffset+=.001*(u-P)*b.camera.radius*b.pinchDeltaPercentage:b.camera.inertialRadiusOffset+=(u-P)/(b.pinchPrecision*((b.angularSensibilityX+b.angularSensibilityY)/2)*l),0!==b.panningSensibility){var f=(E.x+x.x)/2,p=(E.y+x.y)/2,_=f-M.x,m=p-M.y;M.x=f,M.y=p,b.camera.inertialPanningX+=-_/b.panningSensibility,b.camera.inertialPanningY+=m/b.panningSensibility}}else{if(S++,M.isPinching||S<20&&Math.abs(d-A)>b.camera.pinchToPanMaxDistance)b.pinchDeltaPercentage?b.camera.inertialRadiusOffset+=.001*(u-P)*b.camera.radius*b.pinchDeltaPercentage:b.camera.inertialRadiusOffset+=(u-P)/(b.pinchPrecision*((b.angularSensibilityX+b.angularSensibilityY)/2)*l),M.isPaning=!1,M.isPinching=!0;else if(y&&y.pointerId===a.pointerId&&0!==b.panningSensibility&&b.multiTouchPanning){if(!M.isPaning)return M.isPaning=!0,M.isPinching=!1,M.x=a.x,void(M.y=a.y);b.camera.inertialPanningX+=-(a.x-M.x)/b.panningSensibility,b.camera.inertialPanningY+=(a.y-M.y)/b.panningSensibility}y&&y.pointerId===i.pointerId&&(M.x=a.x,M.y=a.y)}P=u}}},this._observer=this.camera.getScene().onPointerObservable.add(this._pointerInput,ke.PointerEventTypes.POINTERDOWN|ke.PointerEventTypes.POINTERUP|ke.PointerEventTypes.POINTERMOVE|ke.PointerEventTypes.POINTERDOUBLETAP),this._onContextMenu=function(e){e.preventDefault()},this.camera._useCtrlForPanning||g.addEventListener(\"contextmenu\",this._onContextMenu,!1),this._onLostFocus=function(){E=x=null,P=0,M.isPaning=!1,M.isPinching=!1,y=null,A=S=0},this._onMouseMove=function(e){if(T.isPointerLock){var t=e.movementX||e.mozMovementX||e.webkitMovementX||e.msMovementX||0,i=e.movementY||e.mozMovementY||e.webkitMovementY||e.msMovementY||0;b.camera.inertialAlphaOffset-=t/b.angularSensibilityX,b.camera.inertialBetaOffset-=i/b.angularSensibilityY,v||e.preventDefault()}},this._onGestureStart=function(e){void 0!==window.MSGesture&&(b._MSGestureHandler||(b._MSGestureHandler=new MSGesture,b._MSGestureHandler.target=g),b._MSGestureHandler.addPointer(e.pointerId))},this._onGesture=function(e){b.camera.radius*=e.scale,e.preventDefault&&(v||(e.stopPropagation(),e.preventDefault()))},g.addEventListener(\"mousemove\",this._onMouseMove,!1),g.addEventListener(\"MSPointerDown\",this._onGestureStart,!1),g.addEventListener(\"MSGestureChange\",this._onGesture,!1),ke.Tools.RegisterTopRootEvents([{name:\"blur\",handler:this._onLostFocus}])},e.prototype.detachControl=function(e){this._onLostFocus&&ke.Tools.UnregisterTopRootEvents([{name:\"blur\",handler:this._onLostFocus}]),e&&this._observer&&(this.camera.getScene().onPointerObservable.remove(this._observer),this._observer=null,this._onContextMenu&&e.removeEventListener(\"contextmenu\",this._onContextMenu),this._onMouseMove&&e.removeEventListener(\"mousemove\",this._onMouseMove),this._onGestureStart&&e.removeEventListener(\"MSPointerDown\",this._onGestureStart),this._onGesture&&e.removeEventListener(\"MSGestureChange\",this._onGesture),this._isPanClick=!1,this.pinchInwards=!0,this._onMouseMove=null,this._onGestureStart=null,this._onGesture=null,this._MSGestureHandler=null,this._onLostFocus=null,this._onContextMenu=null)},e.prototype.getClassName=function(){return\"ArcRotateCameraPointersInput\"},e.prototype.getSimpleName=function(){return\"pointers\"},b([ke.serialize()],e.prototype,\"buttons\",void 0),b([ke.serialize()],e.prototype,\"angularSensibilityX\",void 0),b([ke.serialize()],e.prototype,\"angularSensibilityY\",void 0),b([ke.serialize()],e.prototype,\"pinchPrecision\",void 0),b([ke.serialize()],e.prototype,\"pinchDeltaPercentage\",void 0),b([ke.serialize()],e.prototype,\"panningSensibility\",void 0),b([ke.serialize()],e.prototype,\"multiTouchPanning\",void 0),b([ke.serialize()],e.prototype,\"multiTouchPanAndZoom\",void 0),e})(),ke.ArcRotateCameraPointersInput=We,ke.CameraInputTypes.ArcRotateCameraPointersInput=We,He=$a||($a={}),Xe=(function(t){function e(e){return t.call(this,e)||this}return T(e,t),e.prototype.addMouseWheel=function(){return this.add(new He.ArcRotateCameraMouseWheelInput),this},e.prototype.addPointers=function(){return this.add(new He.ArcRotateCameraPointersInput),this},e.prototype.addKeyboard=function(){return this.add(new He.ArcRotateCameraKeyboardMoveInput),this},e.prototype.addVRDeviceOrientation=function(){return this.add(new He.ArcRotateCameraVRDeviceOrientationInput),this},e})(He.CameraInputsManager),He.ArcRotateCameraInputsManager=Xe,(function(l){l.Node.AddNodeConstructor(\"ArcRotateCamera\",(function(e,t){return function(){return new i(e,0,0,1,l.Vector3.Zero(),t)}}));var i=(function(a){function n(e,t,i,r,n,o,s){void 0===s&&(s=!0);var c=a.call(this,e,l.Vector3.Zero(),o,s)||this;return c.inertialAlphaOffset=0,c.inertialBetaOffset=0,c.inertialRadiusOffset=0,c.lowerAlphaLimit=null,c.upperAlphaLimit=null,c.lowerBetaLimit=.01,c.upperBetaLimit=Math.PI,c.lowerRadiusLimit=null,c.upperRadiusLimit=null,c.inertialPanningX=0,c.inertialPanningY=0,c.pinchToPanMaxDistance=20,c.panningDistanceLimit=null,c.panningOriginTarget=l.Vector3.Zero(),c.panningInertia=.9,c.zoomOnFactor=1,c.targetScreenOffset=l.Vector2.Zero(),c.allowUpsideDown=!0,c.useInputToRestoreState=!0,c._viewMatrix=new l.Matrix,c.panningAxis=new l.Vector3(1,1,0),c.onMeshTargetChangedObservable=new l.Observable,c.checkCollisions=!1,c.collisionRadius=new l.Vector3(.5,.5,.5),c._previousPosition=l.Vector3.Zero(),c._collisionVelocity=l.Vector3.Zero(),c._newPosition=l.Vector3.Zero(),c._computationVector=l.Vector3.Zero(),c._onCollisionPositionChange=function(e,t,i){void 0===i&&(i=null),c.getScene().workerCollisions&&c.checkCollisions&&t.multiplyInPlace(c._collider._radius),i?(c.setPosition(t),c.onCollide&&c.onCollide(i)):c._previousPosition.copyFrom(c.position);var r=Math.cos(c.alpha),n=Math.sin(c.alpha),o=Math.cos(c.beta),s=Math.sin(c.beta);0===s&&(s=1e-4);var a=c._getTargetPosition();c._computationVector.copyFromFloats(c.radius*r*s,c.radius*o,c.radius*n*s),a.addToRef(c._computationVector,c._newPosition),c.position.copyFrom(c._newPosition);var l=c.upVector;c.allowUpsideDown&&c.beta<0&&(l=(l=l.clone()).negate()),c._computeViewMatrix(c.position,a,l),c._viewMatrix.m[12]+=c.targetScreenOffset.x,c._viewMatrix.m[13]+=c.targetScreenOffset.y,c._collisionTriggered=!1},c._target=l.Vector3.Zero(),n&&c.setTarget(n),c.alpha=t,c.beta=i,c.radius=r,c.getViewMatrix(),c.inputs=new l.ArcRotateCameraInputsManager(c),c.inputs.addKeyboard().addMouseWheel().addPointers(),c}return T(n,a),Object.defineProperty(n.prototype,\"target\",{get:function(){return this._target},set:function(e){this.setTarget(e)},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,\"angularSensibilityX\",{get:function(){var e=this.inputs.attached.pointers;return e?e.angularSensibilityX:0},set:function(e){var t=this.inputs.attached.pointers;t&&(t.angularSensibilityX=e)},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,\"angularSensibilityY\",{get:function(){var e=this.inputs.attached.pointers;return e?e.angularSensibilityY:0},set:function(e){var t=this.inputs.attached.pointers;t&&(t.angularSensibilityY=e)},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,\"pinchPrecision\",{get:function(){var e=this.inputs.attached.pointers;return e?e.pinchPrecision:0},set:function(e){var t=this.inputs.attached.pointers;t&&(t.pinchPrecision=e)},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,\"pinchDeltaPercentage\",{get:function(){var e=this.inputs.attached.pointers;return e?e.pinchDeltaPercentage:0},set:function(e){var t=this.inputs.attached.pointers;t&&(t.pinchDeltaPercentage=e)},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,\"panningSensibility\",{get:function(){var e=this.inputs.attached.pointers;return e?e.panningSensibility:0},set:function(e){var t=this.inputs.attached.pointers;t&&(t.panningSensibility=e)},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,\"keysUp\",{get:function(){var e=this.inputs.attached.keyboard;return e?e.keysUp:[]},set:function(e){var t=this.inputs.attached.keyboard;t&&(t.keysUp=e)},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,\"keysDown\",{get:function(){var e=this.inputs.attached.keyboard;return e?e.keysDown:[]},set:function(e){var t=this.inputs.attached.keyboard;t&&(t.keysDown=e)},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,\"keysLeft\",{get:function(){var e=this.inputs.attached.keyboard;return e?e.keysLeft:[]},set:function(e){var t=this.inputs.attached.keyboard;t&&(t.keysLeft=e)},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,\"keysRight\",{get:function(){var e=this.inputs.attached.keyboard;return e?e.keysRight:[]},set:function(e){var t=this.inputs.attached.keyboard;t&&(t.keysRight=e)},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,\"wheelPrecision\",{get:function(){var e=this.inputs.attached.mousewheel;return e?e.wheelPrecision:0},set:function(e){var t=this.inputs.attached.mousewheel;t&&(t.wheelPrecision=e)},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,\"wheelDeltaPercentage\",{get:function(){var e=this.inputs.attached.mousewheel;return e?e.wheelDeltaPercentage:0},set:function(e){var t=this.inputs.attached.mousewheel;t&&(t.wheelDeltaPercentage=e)},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,\"bouncingBehavior\",{get:function(){return this._bouncingBehavior},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,\"useBouncingBehavior\",{get:function(){return null!=this._bouncingBehavior},set:function(e){e!==this.useBouncingBehavior&&(e?(this._bouncingBehavior=new l.BouncingBehavior,this.addBehavior(this._bouncingBehavior)):this._bouncingBehavior&&(this.removeBehavior(this._bouncingBehavior),this._bouncingBehavior=null))},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,\"framingBehavior\",{get:function(){return this._framingBehavior},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,\"useFramingBehavior\",{get:function(){return null!=this._framingBehavior},set:function(e){e!==this.useFramingBehavior&&(e?(this._framingBehavior=new l.FramingBehavior,this.addBehavior(this._framingBehavior)):this._framingBehavior&&(this.removeBehavior(this._framingBehavior),this._framingBehavior=null))},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,\"autoRotationBehavior\",{get:function(){return this._autoRotationBehavior},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,\"useAutoRotationBehavior\",{get:function(){return null!=this._autoRotationBehavior},set:function(e){e!==this.useAutoRotationBehavior&&(e?(this._autoRotationBehavior=new l.AutoRotationBehavior,this.addBehavior(this._autoRotationBehavior)):this._autoRotationBehavior&&(this.removeBehavior(this._autoRotationBehavior),this._autoRotationBehavior=null))},enumerable:!0,configurable:!0}),n.prototype._initCache=function(){a.prototype._initCache.call(this),this._cache._target=new l.Vector3(Number.MAX_VALUE,Number.MAX_VALUE,Number.MAX_VALUE),this._cache.alpha=void 0,this._cache.beta=void 0,this._cache.radius=void 0,this._cache.targetScreenOffset=l.Vector2.Zero()},n.prototype._updateCache=function(e){e||a.prototype._updateCache.call(this),this._cache._target.copyFrom(this._getTargetPosition()),this._cache.alpha=this.alpha,this._cache.beta=this.beta,this._cache.radius=this.radius,this._cache.targetScreenOffset.copyFrom(this.targetScreenOffset)},n.prototype._getTargetPosition=function(){if(this._targetHost&&this._targetHost.getAbsolutePosition){var e=this._targetHost.getAbsolutePosition();this._targetBoundingCenter?e.addToRef(this._targetBoundingCenter,this._target):this._target.copyFrom(e)}var t=this._getLockedTargetPosition();return t||this._target},n.prototype.storeState=function(){return this._storedAlpha=this.alpha,this._storedBeta=this.beta,this._storedRadius=this.radius,this._storedTarget=this._getTargetPosition().clone(),a.prototype.storeState.call(this)},n.prototype._restoreStateValues=function(){return!!a.prototype._restoreStateValues.call(this)&&(this.alpha=this._storedAlpha,this.beta=this._storedBeta,this.radius=this._storedRadius,this.setTarget(this._storedTarget.clone()),this.inertialAlphaOffset=0,this.inertialBetaOffset=0,this.inertialRadiusOffset=0,this.inertialPanningX=0,!(this.inertialPanningY=0))},n.prototype._isSynchronizedViewMatrix=function(){return!!a.prototype._isSynchronizedViewMatrix.call(this)&&(this._cache._target.equals(this._getTargetPosition())&&this._cache.alpha===this.alpha&&this._cache.beta===this.beta&&this._cache.radius===this.radius&&this._cache.targetScreenOffset.equals(this.targetScreenOffset))},n.prototype.attachControl=function(e,t,i,r){var n=this;void 0===i&&(i=!0),void 0===r&&(r=2),this._useCtrlForPanning=i,this._panningMouseButton=r,this.inputs.attachElement(e,t),this._reset=function(){n.inertialAlphaOffset=0,n.inertialBetaOffset=0,n.inertialRadiusOffset=0,n.inertialPanningX=0,n.inertialPanningY=0}},n.prototype.detachControl=function(e){this.inputs.detachElement(e),this._reset&&this._reset()},n.prototype._checkInputs=function(){if(!this._collisionTriggered){if(this.inputs.checkInputs(),0!==this.inertialAlphaOffset||0!==this.inertialBetaOffset||0!==this.inertialRadiusOffset){var e=this.inertialAlphaOffset;this.beta<=0&&(e*=-1),this.getScene().useRightHandedSystem&&(e*=-1),this.parent&&this.parent._getWorldMatrixDeterminant()<0&&(e*=-1),this.alpha+=e,this.beta+=this.inertialBetaOffset,this.radius-=this.inertialRadiusOffset,this.inertialAlphaOffset*=this.inertia,this.inertialBetaOffset*=this.inertia,this.inertialRadiusOffset*=this.inertia,Math.abs(this.inertialAlphaOffset)<l.Epsilon&&(this.inertialAlphaOffset=0),Math.abs(this.inertialBetaOffset)<l.Epsilon&&(this.inertialBetaOffset=0),Math.abs(this.inertialRadiusOffset)<this.speed*l.Epsilon&&(this.inertialRadiusOffset=0)}if(0!==this.inertialPanningX||0!==this.inertialPanningY){if(this._localDirection||(this._localDirection=l.Vector3.Zero(),this._transformedDirection=l.Vector3.Zero()),this._localDirection.copyFromFloats(this.inertialPanningX,this.inertialPanningY,this.inertialPanningY),this._localDirection.multiplyInPlace(this.panningAxis),this._viewMatrix.invertToRef(this._cameraTransformMatrix),l.Vector3.TransformNormalToRef(this._localDirection,this._cameraTransformMatrix,this._transformedDirection),this.panningAxis.y||(this._transformedDirection.y=0),!this._targetHost)if(this.panningDistanceLimit)this._transformedDirection.addInPlace(this._target),l.Vector3.DistanceSquared(this._transformedDirection,this.panningOriginTarget)<=this.panningDistanceLimit*this.panningDistanceLimit&&this._target.copyFrom(this._transformedDirection);else this._target.addInPlace(this._transformedDirection);this.inertialPanningX*=this.panningInertia,this.inertialPanningY*=this.panningInertia,Math.abs(this.inertialPanningX)<this.speed*l.Epsilon&&(this.inertialPanningX=0),Math.abs(this.inertialPanningY)<this.speed*l.Epsilon&&(this.inertialPanningY=0)}this._checkLimits(),a.prototype._checkInputs.call(this)}},n.prototype._checkLimits=function(){null===this.lowerBetaLimit||void 0===this.lowerBetaLimit?this.allowUpsideDown&&this.beta>Math.PI&&(this.beta=this.beta-2*Math.PI):this.beta<this.lowerBetaLimit&&(this.beta=this.lowerBetaLimit),null===this.upperBetaLimit||void 0===this.upperBetaLimit?this.allowUpsideDown&&this.beta<-Math.PI&&(this.beta=this.beta+2*Math.PI):this.beta>this.upperBetaLimit&&(this.beta=this.upperBetaLimit),null!==this.lowerAlphaLimit&&this.alpha<this.lowerAlphaLimit&&(this.alpha=this.lowerAlphaLimit),null!==this.upperAlphaLimit&&this.alpha>this.upperAlphaLimit&&(this.alpha=this.upperAlphaLimit),null!==this.lowerRadiusLimit&&this.radius<this.lowerRadiusLimit&&(this.radius=this.lowerRadiusLimit),null!==this.upperRadiusLimit&&this.radius>this.upperRadiusLimit&&(this.radius=this.upperRadiusLimit)},n.prototype.rebuildAnglesAndRadius=function(){this.position.subtractToRef(this._getTargetPosition(),this._computationVector),this.radius=this._computationVector.length(),0===this.radius&&(this.radius=1e-4),this.alpha=Math.acos(this._computationVector.x/Math.sqrt(Math.pow(this._computationVector.x,2)+Math.pow(this._computationVector.z,2))),this._computationVector.z<0&&(this.alpha=2*Math.PI-this.alpha),this.beta=Math.acos(this._computationVector.y/this.radius),this._checkLimits()},n.prototype.setPosition=function(e){this.position.equals(e)||(this.position.copyFrom(e),this.rebuildAnglesAndRadius())},n.prototype.setTarget=function(e,t,i){if(void 0===t&&(t=!1),void 0===i&&(i=!1),e.getBoundingInfo)this._targetBoundingCenter=t?e.getBoundingInfo().boundingBox.centerWorld.clone():null,this._targetHost=e,this._target=this._getTargetPosition(),this.onMeshTargetChangedObservable.notifyObservers(this._targetHost);else{var r=e,n=this._getTargetPosition();if(n&&!i&&n.equals(r))return;this._targetHost=null,this._target=r,this._targetBoundingCenter=null,this.onMeshTargetChangedObservable.notifyObservers(null)}this.rebuildAnglesAndRadius()},n.prototype._getViewMatrix=function(){var e=Math.cos(this.alpha),t=Math.sin(this.alpha),i=Math.cos(this.beta),r=Math.sin(this.beta);0===r&&(r=1e-4);var n=this._getTargetPosition();if(this._computationVector.copyFromFloats(this.radius*e*r,this.radius*i,this.radius*t*r),n.addToRef(this._computationVector,this._newPosition),this.getScene().collisionsEnabled&&this.checkCollisions)this._collider||(this._collider=new l.Collider),this._collider._radius=this.collisionRadius,this._newPosition.subtractToRef(this.position,this._collisionVelocity),this._collisionTriggered=!0,this.getScene().collisionCoordinator.getNewPosition(this.position,this._collisionVelocity,this._collider,3,null,this._onCollisionPositionChange,this.uniqueId);else{this.position.copyFrom(this._newPosition);var o=this.upVector;this.allowUpsideDown&&r<0&&(o=(o=o.clone()).negate()),this._computeViewMatrix(this.position,n,o),this._viewMatrix.m[12]+=this.targetScreenOffset.x,this._viewMatrix.m[13]+=this.targetScreenOffset.y}return this._currentTarget=n,this._viewMatrix},n.prototype.zoomOn=function(e,t){void 0===t&&(t=!1),e=e||this.getScene().meshes;var i=l.Mesh.MinMax(e),r=l.Vector3.Distance(i.min,i.max);this.radius=r*this.zoomOnFactor,this.focusOn({min:i.min,max:i.max,distance:r},t)},n.prototype.focusOn=function(e,t){var i,r;if(void 0===t&&(t=!1),void 0===e.min){var n=e||this.getScene().meshes;i=l.Mesh.MinMax(n),r=l.Vector3.Distance(i.min,i.max)}else{var o=e;r=(i=o).distance}this._target=l.Mesh.Center(i),t||(this.maxZ=2*r)},n.prototype.createRigCamera=function(e,t){var i=0;switch(this.cameraRigMode){case l.Camera.RIG_MODE_STEREOSCOPIC_ANAGLYPH:case l.Camera.RIG_MODE_STEREOSCOPIC_SIDEBYSIDE_PARALLEL:case l.Camera.RIG_MODE_STEREOSCOPIC_OVERUNDER:case l.Camera.RIG_MODE_VR:i=this._cameraRigParams.stereoHalfAngle*(0===t?1:-1);break;case l.Camera.RIG_MODE_STEREOSCOPIC_SIDEBYSIDE_CROSSEYED:i=this._cameraRigParams.stereoHalfAngle*(0===t?-1:1)}var r=new n(e,this.alpha+i,this.beta,this.radius,this._target,this.getScene());return r._cameraRigParams={},r},n.prototype._updateRigCameras=function(){var e=this._rigCameras[0],t=this._rigCameras[1];switch(e.beta=t.beta=this.beta,e.radius=t.radius=this.radius,this.cameraRigMode){case l.Camera.RIG_MODE_STEREOSCOPIC_ANAGLYPH:case l.Camera.RIG_MODE_STEREOSCOPIC_SIDEBYSIDE_PARALLEL:case l.Camera.RIG_MODE_STEREOSCOPIC_OVERUNDER:case l.Camera.RIG_MODE_VR:e.alpha=this.alpha-this._cameraRigParams.stereoHalfAngle,t.alpha=this.alpha+this._cameraRigParams.stereoHalfAngle;break;case l.Camera.RIG_MODE_STEREOSCOPIC_SIDEBYSIDE_CROSSEYED:e.alpha=this.alpha+this._cameraRigParams.stereoHalfAngle,t.alpha=this.alpha-this._cameraRigParams.stereoHalfAngle}a.prototype._updateRigCameras.call(this)},n.prototype.dispose=function(){this.inputs.clear(),a.prototype.dispose.call(this)},n.prototype.getClassName=function(){return\"ArcRotateCamera\"},b([l.serialize()],n.prototype,\"alpha\",void 0),b([l.serialize()],n.prototype,\"beta\",void 0),b([l.serialize()],n.prototype,\"radius\",void 0),b([l.serializeAsVector3(\"target\")],n.prototype,\"_target\",void 0),b([l.serialize()],n.prototype,\"inertialAlphaOffset\",void 0),b([l.serialize()],n.prototype,\"inertialBetaOffset\",void 0),b([l.serialize()],n.prototype,\"inertialRadiusOffset\",void 0),b([l.serialize()],n.prototype,\"lowerAlphaLimit\",void 0),b([l.serialize()],n.prototype,\"upperAlphaLimit\",void 0),b([l.serialize()],n.prototype,\"lowerBetaLimit\",void 0),b([l.serialize()],n.prototype,\"upperBetaLimit\",void 0),b([l.serialize()],n.prototype,\"lowerRadiusLimit\",void 0),b([l.serialize()],n.prototype,\"upperRadiusLimit\",void 0),b([l.serialize()],n.prototype,\"inertialPanningX\",void 0),b([l.serialize()],n.prototype,\"inertialPanningY\",void 0),b([l.serialize()],n.prototype,\"pinchToPanMaxDistance\",void 0),b([l.serialize()],n.prototype,\"panningDistanceLimit\",void 0),b([l.serializeAsVector3()],n.prototype,\"panningOriginTarget\",void 0),b([l.serialize()],n.prototype,\"panningInertia\",void 0),b([l.serialize()],n.prototype,\"zoomOnFactor\",void 0),b([l.serialize()],n.prototype,\"targetScreenOffset\",void 0),b([l.serialize()],n.prototype,\"allowUpsideDown\",void 0),b([l.serialize()],n.prototype,\"useInputToRestoreState\",void 0),n})(l.TargetCamera);l.ArcRotateCamera=i})($a||($a={})),(function(o){o.Node.AddNodeConstructor(\"Light_Type_3\",(function(e,t){return function(){return new i(e,o.Vector3.Zero(),t)}}));var i=(function(n){function e(e,t,i){var r=n.call(this,e,i)||this;return r.groundColor=new o.Color3(0,0,0),r.direction=t||o.Vector3.Up(),r}return T(e,n),e.prototype._buildUniformLayout=function(){this._uniformBuffer.addUniform(\"vLightData\",4),this._uniformBuffer.addUniform(\"vLightDiffuse\",4),this._uniformBuffer.addUniform(\"vLightSpecular\",3),this._uniformBuffer.addUniform(\"vLightGround\",3),this._uniformBuffer.addUniform(\"shadowsInfo\",3),this._uniformBuffer.addUniform(\"depthValues\",2),this._uniformBuffer.create()},e.prototype.getClassName=function(){return\"HemisphericLight\"},e.prototype.setDirectionToTarget=function(e){return this.direction=o.Vector3.Normalize(e.subtract(o.Vector3.Zero())),this.direction},e.prototype.getShadowGenerator=function(){return null},e.prototype.transferToEffect=function(e,t){var i=o.Vector3.Normalize(this.direction);return this._uniformBuffer.updateFloat4(\"vLightData\",i.x,i.y,i.z,0,t),this._uniformBuffer.updateColor3(\"vLightGround\",this.groundColor.scale(this.intensity),t),this},e.prototype.computeWorldMatrix=function(e,t){return this._worldMatrix||(this._worldMatrix=o.Matrix.Identity()),this._worldMatrix},e.prototype.getTypeID=function(){return o.Light.LIGHTTYPEID_HEMISPHERICLIGHT},e.prototype.prepareLightSpecificDefines=function(e,t){e[\"HEMILIGHT\"+t]=!0},b([o.serializeAsColor3()],e.prototype,\"groundColor\",void 0),b([o.serializeAsVector3()],e.prototype,\"direction\",void 0),e})(o.Light);o.HemisphericLight=i})($a||($a={})),je=$a||($a={}),Ye=(function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e._needProjectionMatrixCompute=!0,e}return T(e,t),e.prototype._setPosition=function(e){this._position=e},Object.defineProperty(e.prototype,\"position\",{get:function(){return this._position},set:function(e){this._setPosition(e)},enumerable:!0,configurable:!0}),e.prototype._setDirection=function(e){this._direction=e},Object.defineProperty(e.prototype,\"direction\",{get:function(){return this._direction},set:function(e){this._setDirection(e)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,\"shadowMinZ\",{get:function(){return this._shadowMinZ},set:function(e){this._shadowMinZ=e,this.forceProjectionMatrixCompute()},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,\"shadowMaxZ\",{get:function(){return this._shadowMaxZ},set:function(e){this._shadowMaxZ=e,this.forceProjectionMatrixCompute()},enumerable:!0,configurable:!0}),e.prototype.computeTransformedInformation=function(){return!(!this.parent||!this.parent.getWorldMatrix)&&(this.transformedPosition||(this.transformedPosition=je.Vector3.Zero()),je.Vector3.TransformCoordinatesToRef(this.position,this.parent.getWorldMatrix(),this.transformedPosition),this.direction&&(this.transformedDirection||(this.transformedDirection=je.Vector3.Zero()),je.Vector3.TransformNormalToRef(this.direction,this.parent.getWorldMatrix(),this.transformedDirection)),!0)},e.prototype.getDepthScale=function(){return 50},e.prototype.getShadowDirection=function(e){return this.transformedDirection?this.transformedDirection:this.direction},e.prototype.getAbsolutePosition=function(){return this.transformedPosition?this.transformedPosition:this.position},e.prototype.setDirectionToTarget=function(e){return this.direction=je.Vector3.Normalize(e.subtract(this.position)),this.direction},e.prototype.getRotation=function(){this.direction.normalize();var e=je.Vector3.Cross(this.direction,je.Axis.Y),t=je.Vector3.Cross(e,this.direction);return je.Vector3.RotationFromAxis(e,t,this.direction)},e.prototype.needCube=function(){return!1},e.prototype.needProjectionMatrixCompute=function(){return this._needProjectionMatrixCompute},e.prototype.forceProjectionMatrixCompute=function(){this._needProjectionMatrixCompute=!0},e.prototype._initCache=function(){t.prototype._initCache.call(this),this._cache.position=je.Vector3.Zero()},e.prototype._isSynchronized=function(){return!!this._cache.position.equals(this.position)},e.prototype.computeWorldMatrix=function(e){return!e&&this.isSynchronized()?this._currentRenderId=this.getScene().getRenderId():(this._updateCache(),this._cache.position.copyFrom(this.position),this._worldMatrix||(this._worldMatrix=je.Matrix.Identity()),je.Matrix.TranslationToRef(this.position.x,this.position.y,this.position.z,this._worldMatrix),this.parent&&this.parent.getWorldMatrix&&(this._worldMatrix.multiplyToRef(this.parent.getWorldMatrix(),this._worldMatrix),this._markSyncedWithParent()),this._worldMatrixDeterminant=this._worldMatrix.determinant()),this._worldMatrix},e.prototype.getDepthMinZ=function(e){return void 0!==this.shadowMinZ?this.shadowMinZ:e.minZ},e.prototype.getDepthMaxZ=function(e){return void 0!==this.shadowMaxZ?this.shadowMaxZ:e.maxZ},e.prototype.setShadowProjectionMatrix=function(e,t,i){return this.customProjectionMatrixBuilder?this.customProjectionMatrixBuilder(t,i,e):this._setDefaultShadowProjectionMatrix(e,t,i),this},b([je.serializeAsVector3()],e.prototype,\"position\",null),b([je.serializeAsVector3()],e.prototype,\"direction\",null),b([je.serialize()],e.prototype,\"shadowMinZ\",null),b([je.serialize()],e.prototype,\"shadowMaxZ\",null),e})(je.Light),je.ShadowLight=Ye,(function(o){o.Node.AddNodeConstructor(\"Light_Type_0\",(function(e,t){return function(){return new i(e,o.Vector3.Zero(),t)}}));var i=(function(n){function e(e,t,i){var r=n.call(this,e,i)||this;return r._shadowAngle=Math.PI/2,r.position=t,r}return T(e,n),Object.defineProperty(e.prototype,\"shadowAngle\",{get:function(){return this._shadowAngle},set:function(e){this._shadowAngle=e,this.forceProjectionMatrixCompute()},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,\"direction\",{get:function(){return this._direction},set:function(e){var t=this.needCube();this._direction=e,this.needCube()!==t&&this._shadowGenerator&&this._shadowGenerator.recreateShadowMap()},enumerable:!0,configurable:!0}),e.prototype.getClassName=function(){return\"PointLight\"},e.prototype.getTypeID=function(){return o.Light.LIGHTTYPEID_POINTLIGHT},e.prototype.needCube=function(){return!this.direction},e.prototype.getShadowDirection=function(e){if(this.direction)return n.prototype.getShadowDirection.call(this,e);switch(e){case 0:return new o.Vector3(1,0,0);case 1:return new o.Vector3(-1,0,0);case 2:return new o.Vector3(0,-1,0);case 3:return new o.Vector3(0,1,0);case 4:return new o.Vector3(0,0,1);case 5:return new o.Vector3(0,0,-1)}return o.Vector3.Zero()},e.prototype._setDefaultShadowProjectionMatrix=function(e,t,i){var r=this.getScene().activeCamera;r&&o.Matrix.PerspectiveFovLHToRef(this.shadowAngle,1,this.getDepthMinZ(r),this.getDepthMaxZ(r),e)},e.prototype._buildUniformLayout=function(){this._uniformBuffer.addUniform(\"vLightData\",4),this._uniformBuffer.addUniform(\"vLightDiffuse\",4),this._uniformBuffer.addUniform(\"vLightSpecular\",3),this._uniformBuffer.addUniform(\"vLightFalloff\",4),this._uniformBuffer.addUniform(\"shadowsInfo\",3),this._uniformBuffer.addUniform(\"depthValues\",2),this._uniformBuffer.create()},e.prototype.transferToEffect=function(e,t){return this.computeTransformedInformation()?this._uniformBuffer.updateFloat4(\"vLightData\",this.transformedPosition.x,this.transformedPosition.y,this.transformedPosition.z,0,t):this._uniformBuffer.updateFloat4(\"vLightData\",this.position.x,this.position.y,this.position.z,0,t),this._uniformBuffer.updateFloat4(\"vLightFalloff\",this.range,this._inverseSquaredRange,0,0,t),this},e.prototype.prepareLightSpecificDefines=function(e,t){e[\"POINTLIGHT\"+t]=!0},b([o.serialize()],e.prototype,\"shadowAngle\",null),e})(o.ShadowLight);o.PointLight=i})($a||($a={})),(function(u){u.Node.AddNodeConstructor(\"Light_Type_1\",(function(e,t){return function(){return new i(e,u.Vector3.Zero(),t)}}));var i=(function(n){function e(e,t,i){var r=n.call(this,e,i)||this;return r._shadowFrustumSize=0,r._shadowOrthoScale=.1,r.autoUpdateExtends=!0,r._orthoLeft=Number.MAX_VALUE,r._orthoRight=Number.MIN_VALUE,r._orthoTop=Number.MIN_VALUE,r._orthoBottom=Number.MAX_VALUE,r.position=t.scale(-1),r.direction=t,r}return T(e,n),Object.defineProperty(e.prototype,\"shadowFrustumSize\",{get:function(){return this._shadowFrustumSize},set:function(e){this._shadowFrustumSize=e,this.forceProjectionMatrixCompute()},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,\"shadowOrthoScale\",{get:function(){return this._shadowOrthoScale},set:function(e){this._shadowOrthoScale=e,this.forceProjectionMatrixCompute()},enumerable:!0,configurable:!0}),e.prototype.getClassName=function(){return\"DirectionalLight\"},e.prototype.getTypeID=function(){return u.Light.LIGHTTYPEID_DIRECTIONALLIGHT},e.prototype._setDefaultShadowProjectionMatrix=function(e,t,i){0<this.shadowFrustumSize?this._setDefaultFixedFrustumShadowProjectionMatrix(e,t):this._setDefaultAutoExtendShadowProjectionMatrix(e,t,i)},e.prototype._setDefaultFixedFrustumShadowProjectionMatrix=function(e,t){var i=this.getScene().activeCamera;i&&u.Matrix.OrthoLHToRef(this.shadowFrustumSize,this.shadowFrustumSize,void 0!==this.shadowMinZ?this.shadowMinZ:i.minZ,void 0!==this.shadowMaxZ?this.shadowMaxZ:i.maxZ,e)},e.prototype._setDefaultAutoExtendShadowProjectionMatrix=function(e,t,i){var r=this.getScene().activeCamera;if(r){if(this.autoUpdateExtends||this._orthoLeft===Number.MAX_VALUE){var n=u.Vector3.Zero();this._orthoLeft=Number.MAX_VALUE,this._orthoRight=Number.MIN_VALUE,this._orthoTop=Number.MIN_VALUE,this._orthoBottom=Number.MAX_VALUE;for(var o=0;o<i.length;o++){var s=i[o];if(s)for(var a=s.getBoundingInfo().boundingBox,l=0;l<a.vectorsWorld.length;l++)u.Vector3.TransformCoordinatesToRef(a.vectorsWorld[l],t,n),n.x<this._orthoLeft&&(this._orthoLeft=n.x),n.y<this._orthoBottom&&(this._orthoBottom=n.y),n.x>this._orthoRight&&(this._orthoRight=n.x),n.y>this._orthoTop&&(this._orthoTop=n.y)}}var c=this._orthoRight-this._orthoLeft,h=this._orthoTop-this._orthoBottom;u.Matrix.OrthoOffCenterLHToRef(this._orthoLeft-c*this.shadowOrthoScale,this._orthoRight+c*this.shadowOrthoScale,this._orthoBottom-h*this.shadowOrthoScale,this._orthoTop+h*this.shadowOrthoScale,void 0!==this.shadowMinZ?this.shadowMinZ:r.minZ,void 0!==this.shadowMaxZ?this.shadowMaxZ:r.maxZ,e)}},e.prototype._buildUniformLayout=function(){this._uniformBuffer.addUniform(\"vLightData\",4),this._uniformBuffer.addUniform(\"vLightDiffuse\",4),this._uniformBuffer.addUniform(\"vLightSpecular\",3),this._uniformBuffer.addUniform(\"shadowsInfo\",3),this._uniformBuffer.addUniform(\"depthValues\",2),this._uniformBuffer.create()},e.prototype.transferToEffect=function(e,t){return this.computeTransformedInformation()?this._uniformBuffer.updateFloat4(\"vLightData\",this.transformedDirection.x,this.transformedDirection.y,this.transformedDirection.z,1,t):this._uniformBuffer.updateFloat4(\"vLightData\",this.direction.x,this.direction.y,this.direction.z,1,t),this},e.prototype.getDepthMinZ=function(e){return 1},e.prototype.getDepthMaxZ=function(e){return 1},e.prototype.prepareLightSpecificDefines=function(e,t){e[\"DIRLIGHT\"+t]=!0},b([u.serialize()],e.prototype,\"shadowFrustumSize\",null),b([u.serialize()],e.prototype,\"shadowOrthoScale\",null),b([u.serialize()],e.prototype,\"autoUpdateExtends\",void 0),e})(u.ShadowLight);u.DirectionalLight=i})($a||($a={})),(function(l){l.Node.AddNodeConstructor(\"Light_Type_2\",(function(e,t){return function(){return new i(e,l.Vector3.Zero(),l.Vector3.Zero(),0,0,t)}}));var i=(function(a){function e(e,t,i,r,n,o){var s=a.call(this,e,o)||this;return s._innerAngle=0,s._projectionTextureMatrix=l.Matrix.Zero(),s._projectionTextureLightNear=1e-6,s._projectionTextureLightFar=1e3,s._projectionTextureUpDirection=l.Vector3.Up(),s._projectionTextureViewLightDirty=!0,s._projectionTextureProjectionLightDirty=!0,s._projectionTextureDirty=!0,s._projectionTextureViewTargetVector=l.Vector3.Zero(),s._projectionTextureViewLightMatrix=l.Matrix.Zero(),s._projectionTextureProjectionLightMatrix=l.Matrix.Zero(),s._projectionTextureScalingMatrix=l.Matrix.FromValues(.5,0,0,0,0,.5,0,0,0,0,.5,0,.5,.5,.5,1),s.position=t,s.direction=i,s.angle=r,s.exponent=n,s}return T(e,a),Object.defineProperty(e.prototype,\"angle\",{get:function(){return this._angle},set:function(e){this._angle=e,this._cosHalfAngle=Math.cos(.5*e),this._projectionTextureProjectionLightDirty=!0,this.forceProjectionMatrixCompute(),this._computeAngleValues()},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,\"innerAngle\",{get:function(){return this._innerAngle},set:function(e){this._innerAngle=e,this._computeAngleValues()},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,\"shadowAngleScale\",{get:function(){return this._shadowAngleScale},set:function(e){this._shadowAngleScale=e,this.forceProjectionMatrixCompute()},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,\"projectionTextureMatrix\",{get:function(){return this._projectionTextureMatrix},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,\"projectionTextureLightNear\",{get:function(){return this._projectionTextureLightNear},set:function(e){this._projectionTextureLightNear=e,this._projectionTextureProjectionLightDirty=!0},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,\"projectionTextureLightFar\",{get:function(){return this._projectionTextureLightFar},set:function(e){this._projectionTextureLightFar=e,this._projectionTextureProjectionLightDirty=!0},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,\"projectionTextureUpDirection\",{get:function(){return this._projectionTextureUpDirection},set:function(e){this._projectionTextureUpDirection=e,this._projectionTextureProjectionLightDirty=!0},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,\"projectionTexture\",{get:function(){return this._projectionTexture},set:function(e){this._projectionTexture=e,this._projectionTextureDirty=!0},enumerable:!0,configurable:!0}),e.prototype.getClassName=function(){return\"SpotLight\"},e.prototype.getTypeID=function(){return l.Light.LIGHTTYPEID_SPOTLIGHT},e.prototype._setDirection=function(e){a.prototype._setDirection.call(this,e),this._projectionTextureViewLightDirty=!0},e.prototype._setPosition=function(e){a.prototype._setPosition.call(this,e),this._projectionTextureViewLightDirty=!0},e.prototype._setDefaultShadowProjectionMatrix=function(e,t,i){var r=this.getScene().activeCamera;if(r){this._shadowAngleScale=this._shadowAngleScale||1;var n=this._shadowAngleScale*this._angle;l.Matrix.PerspectiveFovLHToRef(n,1,this.getDepthMinZ(r),this.getDepthMaxZ(r),e)}},e.prototype._computeProjectionTextureViewLightMatrix=function(){this._projectionTextureViewLightDirty=!1,this._projectionTextureDirty=!0,this.position.addToRef(this.direction,this._projectionTextureViewTargetVector),l.Matrix.LookAtLHToRef(this.position,this._projectionTextureViewTargetVector,this._projectionTextureUpDirection,this._projectionTextureViewLightMatrix)},e.prototype._computeProjectionTextureProjectionLightMatrix=function(){this._projectionTextureProjectionLightDirty=!1,this._projectionTextureDirty=!0;var e=this.projectionTextureLightFar,t=this.projectionTextureLightNear,i=e/(e-t),r=-i*t,n=1/Math.tan(this._angle/2);l.Matrix.FromValuesToRef(n/1,0,0,0,0,n,0,0,0,0,i,1,0,0,r,0,this._projectionTextureProjectionLightMatrix)},e.prototype._computeProjectionTextureMatrix=function(){this._projectionTextureDirty=!1,this._projectionTextureViewLightMatrix.multiplyToRef(this._projectionTextureProjectionLightMatrix,this._projectionTextureMatrix),this._projectionTextureMatrix.multiplyToRef(this._projectionTextureScalingMatrix,this._projectionTextureMatrix)},e.prototype._buildUniformLayout=function(){this._uniformBuffer.addUniform(\"vLightData\",4),this._uniformBuffer.addUniform(\"vLightDiffuse\",4),this._uniformBuffer.addUniform(\"vLightSpecular\",3),this._uniformBuffer.addUniform(\"vLightDirection\",3),this._uniformBuffer.addUniform(\"vLightFalloff\",4),this._uniformBuffer.addUniform(\"shadowsInfo\",3),this._uniformBuffer.addUniform(\"depthValues\",2),this._uniformBuffer.create()},e.prototype._computeAngleValues=function(){this._lightAngleScale=1/Math.max(.001,Math.cos(.5*this._innerAngle)-this._cosHalfAngle),this._lightAngleOffset=-this._cosHalfAngle*this._lightAngleScale},e.prototype.transferToEffect=function(e,t){var i;return this.computeTransformedInformation()?(this._uniformBuffer.updateFloat4(\"vLightData\",this.transformedPosition.x,this.transformedPosition.y,this.transformedPosition.z,this.exponent,t),i=l.Vector3.Normalize(this.transformedDirection)):(this._uniformBuffer.updateFloat4(\"vLightData\",this.position.x,this.position.y,this.position.z,this.exponent,t),i=l.Vector3.Normalize(this.direction)),this._uniformBuffer.updateFloat4(\"vLightDirection\",i.x,i.y,i.z,this._cosHalfAngle,t),this._uniformBuffer.updateFloat4(\"vLightFalloff\",this.range,this._inverseSquaredRange,this._lightAngleScale,this._lightAngleOffset,t),this.projectionTexture&&this.projectionTexture.isReady()&&(this._projectionTextureViewLightDirty&&this._computeProjectionTextureViewLightMatrix(),this._projectionTextureProjectionLightDirty&&this._computeProjectionTextureProjectionLightMatrix(),this._projectionTextureDirty&&this._computeProjectionTextureMatrix(),e.setMatrix(\"textureProjectionMatrix\"+t,this._projectionTextureMatrix),e.setTexture(\"projectionLightSampler\"+t,this.projectionTexture)),this},e.prototype.dispose=function(){a.prototype.dispose.call(this),this._projectionTexture&&this._projectionTexture.dispose()},e.prototype.prepareLightSpecificDefines=function(e,t){e[\"SPOTLIGHT\"+t]=!0,e[\"PROJECTEDLIGHTTEXTURE\"+t]=!!this.projectionTexture},b([l.serialize()],e.prototype,\"angle\",null),b([l.serialize()],e.prototype,\"innerAngle\",null),b([l.serialize()],e.prototype,\"shadowAngleScale\",null),b([l.serialize()],e.prototype,\"exponent\",void 0),b([l.serialize()],e.prototype,\"projectionTextureLightNear\",null),b([l.serialize()],e.prototype,\"projectionTextureLightFar\",null),b([l.serialize()],e.prototype,\"projectionTextureUpDirection\",null),b([l.serializeAsTexture(\"projectedLightTexture\")],e.prototype,\"_projectionTexture\",void 0),e})(l.ShadowLight);l.SpotLight=i})($a||($a={})),Ke=$a||($a={}),Qe=function(){this.enableBlending=!1,this.blendingSpeed=.01,this.loopMode=Ke.Animation.ANIMATIONLOOPMODE_CYCLE},Ke.AnimationPropertiesOverride=Qe,(function(d){var r=(function(){function e(e,t,i){this.name=e,this.from=t,this.to=i}return e.prototype.clone=function(){return new e(this.name,this.from,this.to)},e})();d.AnimationRange=r;var e=(function(){function e(e,t,i){this.frame=e,this.action=t,this.onlyOnce=i,this.isDone=!1}return e.prototype._clone=function(){return new e(this.frame,this.action,this.onlyOnce)},e})();d.AnimationEvent=e;var E,t,i=(function(){function e(e){this.path=e,this._onchange=new Array,this.value=0,this.animations=new Array}return e.prototype.getPoint=function(){var e=this.path.getPointAtLengthPosition(this.value);return new d.Vector3(e.x,0,e.y)},e.prototype.moveAhead=function(e){return void 0===e&&(e=.002),this.move(e),this},e.prototype.moveBack=function(e){return void 0===e&&(e=.002),this.move(-e),this},e.prototype.move=function(e){if(1<Math.abs(e))throw\"step size should be less than 1.\";return this.value+=e,this.ensureLimits(),this.raiseOnChange(),this},e.prototype.ensureLimits=function(){for(;1<this.value;)this.value-=1;for(;this.value<0;)this.value+=1;return this},e.prototype.raiseOnChange=function(){var t=this;return this._onchange.forEach((function(e){return e(t)})),this},e.prototype.onchange=function(e){return this._onchange.push(e),this},e})();d.PathCursor=i,(t=E=d.AnimationKeyInterpolation||(d.AnimationKeyInterpolation={}))[t.STEP=1]=\"STEP\";var n=(function(){function T(e,t,i,r,n,o){this.name=e,this.targetProperty=t,this.framePerSecond=i,this.dataType=r,this.loopMode=n,this.enableBlending=o,this._runtimeAnimations=new Array,this._events=new Array,this.blendingSpeed=.01,this._ranges={},this.targetPropertyPath=t.split(\".\"),this.dataType=r,this.loopMode=void 0===n?T.ANIMATIONLOOPMODE_CYCLE:n}return T._PrepareAnimation=function(e,t,i,r,n,o,s,a){var l=void 0;if(!isNaN(parseFloat(n))&&isFinite(n)?l=T.ANIMATIONTYPE_FLOAT:n instanceof d.Quaternion?l=T.ANIMATIONTYPE_QUATERNION:n instanceof d.Vector3?l=T.ANIMATIONTYPE_VECTOR3:n instanceof d.Vector2?l=T.ANIMATIONTYPE_VECTOR2:n instanceof d.Color3?l=T.ANIMATIONTYPE_COLOR3:n instanceof d.Size&&(l=T.ANIMATIONTYPE_SIZE),null==l)return null;var c=new T(e,t,i,l,s),h=[{frame:0,value:n},{frame:r,value:o}];return c.setKeys(h),void 0!==a&&c.setEasingFunction(a),c},T.CreateAnimation=function(e,t,i,r){var n=new T(e+\"Animation\",e,i,t,T.ANIMATIONLOOPMODE_CONSTANT);return n.setEasingFunction(r),n},T.CreateAndStartAnimation=function(e,t,i,r,n,o,s,a,l,c){var h=T._PrepareAnimation(e,i,r,n,o,s,a,l);return h?t.getScene().beginDirectAnimation(t,[h],0,n,1===h.loopMode,1,c):null},T.CreateAndStartHierarchyAnimation=function(e,t,i,r,n,o,s,a,l,c,h){var u=T._PrepareAnimation(e,r,n,o,s,a,l,c);return u?t.getScene().beginDirectHierarchyAnimation(t,i,[u],0,o,1===u.loopMode,1,h):null},T.CreateMergeAndStartAnimation=function(e,t,i,r,n,o,s,a,l,c){var h=T._PrepareAnimation(e,i,r,n,o,s,a,l);return h?(t.animations.push(h),t.getScene().beginAnimation(t,0,n,1===h.loopMode,1,c)):null},T.TransitionTo=function(e,t,i,r,n,o,s,a){if(void 0===a&&(a=null),s<=0)return i[e]=t,a&&a(),null;var l=n*(s/1e3);o.setKeys([{frame:0,value:i[e].clone?i[e].clone():i[e]},{frame:l,value:t}]),i.animations||(i.animations=[]),i.animations.push(o);var c=r.beginAnimation(i,0,l,!1);return c.onAnimationEnd=a,c},Object.defineProperty(T.prototype,\"runtimeAnimations\",{get:function(){return this._runtimeAnimations},enumerable:!0,configurable:!0}),Object.defineProperty(T.prototype,\"hasRunningRuntimeAnimations\",{get:function(){for(var e=0,t=this._runtimeAnimations;e<t.length;e++){if(!t[e].isStopped)return!0}return!1},enumerable:!0,configurable:!0}),T.prototype.toString=function(e){var t=\"Name: \"+this.name+\", property: \"+this.targetProperty;if(t+=\", datatype: \"+[\"Float\",\"Vector3\",\"Quaternion\",\"Matrix\",\"Color3\",\"Vector2\"][this.dataType],t+=\", nKeys: \"+(this._keys?this._keys.length:\"none\"),t+=\", nRanges: \"+(this._ranges?Object.keys(this._ranges).length:\"none\"),e){t+=\", Ranges: {\";var i=!0;for(var r in this._ranges)i&&(t+=\", \",i=!1),t+=r;t+=\"}\"}return t},T.prototype.addEvent=function(e){this._events.push(e)},T.prototype.removeEvents=function(e){for(var t=0;t<this._events.length;t++)this._events[t].frame===e&&(this._events.splice(t,1),t--)},T.prototype.getEvents=function(){return this._events},T.prototype.createRange=function(e,t,i){this._ranges[e]||(this._ranges[e]=new r(e,t,i))},T.prototype.deleteRange=function(e,t){void 0===t&&(t=!0);var i=this._ranges[e];if(i){if(t)for(var r=i.from,n=i.to,o=this._keys.length-1;0<=o;o--)this._keys[o].frame>=r&&this._keys[o].frame<=n&&this._keys.splice(o,1);this._ranges[e]=null}},T.prototype.getRange=function(e){return this._ranges[e]},T.prototype.getKeys=function(){return this._keys},T.prototype.getHighestFrame=function(){for(var e=0,t=0,i=this._keys.length;t<i;t++)e<this._keys[t].frame&&(e=this._keys[t].frame);return e},T.prototype.getEasingFunction=function(){return this._easingFunction},T.prototype.setEasingFunction=function(e){this._easingFunction=e},T.prototype.floatInterpolateFunction=function(e,t,i){return d.Scalar.Lerp(e,t,i)},T.prototype.floatInterpolateFunctionWithTangents=function(e,t,i,r,n){return d.Scalar.Hermite(e,t,i,r,n)},T.prototype.quaternionInterpolateFunction=function(e,t,i){return d.Quaternion.Slerp(e,t,i)},T.prototype.quaternionInterpolateFunctionWithTangents=function(e,t,i,r,n){return d.Quaternion.Hermite(e,t,i,r,n).normalize()},T.prototype.vector3InterpolateFunction=function(e,t,i){return d.Vector3.Lerp(e,t,i)},T.prototype.vector3InterpolateFunctionWithTangents=function(e,t,i,r,n){return d.Vector3.Hermite(e,t,i,r,n)},T.prototype.vector2InterpolateFunction=function(e,t,i){return d.Vector2.Lerp(e,t,i)},T.prototype.vector2InterpolateFunctionWithTangents=function(e,t,i,r,n){return d.Vector2.Hermite(e,t,i,r,n)},T.prototype.sizeInterpolateFunction=function(e,t,i){return d.Size.Lerp(e,t,i)},T.prototype.color3InterpolateFunction=function(e,t,i){return d.Color3.Lerp(e,t,i)},T.prototype._getKeyValue=function(e){return\"function\"==typeof e?e():e},T.prototype._interpolate=function(e,t,i,r,n,o){if(r===T.ANIMATIONLOOPMODE_CONSTANT&&0<t)return o.clone?o.clone():o;var s=this.getKeys(),a=Math.max(0,Math.min(s.length-1,Math.floor(s.length*(e-s[0].frame)/(s[s.length-1].frame-s[0].frame))-1));if(s[a].frame>=e)for(;0<=a-1&&s[a].frame>=e;)a--;for(var l=a;l<s.length;l++){var c=s[l+1];if(c.frame>=e){var h=s[l],u=this._getKeyValue(h.value);if(h.interpolation===E.STEP)return u;var d=this._getKeyValue(c.value),f=void 0!==h.outTangent&&void 0!==c.inTangent,p=c.frame-h.frame,_=(e-h.frame)/p,m=this.getEasingFunction();switch(null!=m&&(_=m.ease(_)),this.dataType){case T.ANIMATIONTYPE_FLOAT:var g=f?this.floatInterpolateFunctionWithTangents(u,h.outTangent*p,d,c.inTangent*p,_):this.floatInterpolateFunction(u,d,_);switch(r){case T.ANIMATIONLOOPMODE_CYCLE:case T.ANIMATIONLOOPMODE_CONSTANT:return g;case T.ANIMATIONLOOPMODE_RELATIVE:return n*t+g}break;case T.ANIMATIONTYPE_QUATERNION:var v=f?this.quaternionInterpolateFunctionWithTangents(u,h.outTangent.scale(p),d,c.inTangent.scale(p),_):this.quaternionInterpolateFunction(u,d,_);switch(r){case T.ANIMATIONLOOPMODE_CYCLE:case T.ANIMATIONLOOPMODE_CONSTANT:return v;case T.ANIMATIONLOOPMODE_RELATIVE:return v.addInPlace(n.scale(t))}return v;case T.ANIMATIONTYPE_VECTOR3:var y=f?this.vector3InterpolateFunctionWithTangents(u,h.outTangent.scale(p),d,c.inTangent.scale(p),_):this.vector3InterpolateFunction(u,d,_);switch(r){case T.ANIMATIONLOOPMODE_CYCLE:case T.ANIMATIONLOOPMODE_CONSTANT:return y;case T.ANIMATIONLOOPMODE_RELATIVE:return y.add(n.scale(t))}case T.ANIMATIONTYPE_VECTOR2:var b=f?this.vector2InterpolateFunctionWithTangents(u,h.outTangent.scale(p),d,c.inTangent.scale(p),_):this.vector2InterpolateFunction(u,d,_);switch(r){case T.ANIMATIONLOOPMODE_CYCLE:case T.ANIMATIONLOOPMODE_CONSTANT:return b;case T.ANIMATIONLOOPMODE_RELATIVE:return b.add(n.scale(t))}case T.ANIMATIONTYPE_SIZE:switch(r){case T.ANIMATIONLOOPMODE_CYCLE:case T.ANIMATIONLOOPMODE_CONSTANT:return this.sizeInterpolateFunction(u,d,_);case T.ANIMATIONLOOPMODE_RELATIVE:return this.sizeInterpolateFunction(u,d,_).add(n.scale(t))}case T.ANIMATIONTYPE_COLOR3:switch(r){case T.ANIMATIONLOOPMODE_CYCLE:case T.ANIMATIONLOOPMODE_CONSTANT:return this.color3InterpolateFunction(u,d,_);case T.ANIMATIONLOOPMODE_RELATIVE:return this.color3InterpolateFunction(u,d,_).add(n.scale(t))}case T.ANIMATIONTYPE_MATRIX:switch(r){case T.ANIMATIONLOOPMODE_CYCLE:case T.ANIMATIONLOOPMODE_CONSTANT:if(T.AllowMatricesInterpolation)return this.matrixInterpolateFunction(u,d,_,i);case T.ANIMATIONLOOPMODE_RELATIVE:return u}}break}}return this._getKeyValue(s[s.length-1].value)},T.prototype.matrixInterpolateFunction=function(e,t,i,r){return T.AllowMatrixDecomposeForInterpolation?r?(d.Matrix.DecomposeLerpToRef(e,t,i,r),r):d.Matrix.DecomposeLerp(e,t,i):r?(d.Matrix.LerpToRef(e,t,i,r),r):d.Matrix.Lerp(e,t,i)},T.prototype.clone=function(){var e=new T(this.name,this.targetPropertyPath.join(\".\"),this.framePerSecond,this.dataType,this.loopMode);if(e.enableBlending=this.enableBlending,e.blendingSpeed=this.blendingSpeed,this._keys&&e.setKeys(this._keys),this._ranges)for(var t in e._ranges={},this._ranges){var i=this._ranges[t];i&&(e._ranges[t]=i.clone())}return e},T.prototype.setKeys=function(e){this._keys=e.slice(0)},T.prototype.serialize=function(){var e={};e.name=this.name,e.property=this.targetProperty,e.framePerSecond=this.framePerSecond,e.dataType=this.dataType,e.loopBehavior=this.loopMode,e.enableBlending=this.enableBlending,e.blendingSpeed=this.blendingSpeed;var t=this.dataType;e.keys=[];for(var i=this.getKeys(),r=0;r<i.length;r++){var n=i[r],o={};switch(o.frame=n.frame,t){case T.ANIMATIONTYPE_FLOAT:o.values=[n.value];break;case T.ANIMATIONTYPE_QUATERNION:case T.ANIMATIONTYPE_MATRIX:case T.ANIMATIONTYPE_VECTOR3:case T.ANIMATIONTYPE_COLOR3:o.values=n.value.asArray()}e.keys.push(o)}for(var s in e.ranges=[],this._ranges){var a=this._ranges[s];if(a){var l={};l.name=s,l.from=a.from,l.to=a.to,e.ranges.push(l)}}return e},Object.defineProperty(T,\"ANIMATIONTYPE_FLOAT\",{get:function(){return T._ANIMATIONTYPE_FLOAT},enumerable:!0,configurable:!0}),Object.defineProperty(T,\"ANIMATIONTYPE_VECTOR3\",{get:function(){return T._ANIMATIONTYPE_VECTOR3},enumerable:!0,configurable:!0}),Object.defineProperty(T,\"ANIMATIONTYPE_VECTOR2\",{get:function(){return T._ANIMATIONTYPE_VECTOR2},enumerable:!0,configurable:!0}),Object.defineProperty(T,\"ANIMATIONTYPE_SIZE\",{get:function(){return T._ANIMATIONTYPE_SIZE},enumerable:!0,configurable:!0}),Object.defineProperty(T,\"ANIMATIONTYPE_QUATERNION\",{get:function(){return T._ANIMATIONTYPE_QUATERNION},enumerable:!0,configurable:!0}),Object.defineProperty(T,\"ANIMATIONTYPE_MATRIX\",{get:function(){return T._ANIMATIONTYPE_MATRIX},enumerable:!0,configurable:!0}),Object.defineProperty(T,\"ANIMATIONTYPE_COLOR3\",{get:function(){return T._ANIMATIONTYPE_COLOR3},enumerable:!0,configurable:!0}),Object.defineProperty(T,\"ANIMATIONLOOPMODE_RELATIVE\",{get:function(){return T._ANIMATIONLOOPMODE_RELATIVE},enumerable:!0,configurable:!0}),Object.defineProperty(T,\"ANIMATIONLOOPMODE_CYCLE\",{get:function(){return T._ANIMATIONLOOPMODE_CYCLE},enumerable:!0,configurable:!0}),Object.defineProperty(T,\"ANIMATIONLOOPMODE_CONSTANT\",{get:function(){return T._ANIMATIONLOOPMODE_CONSTANT},enumerable:!0,configurable:!0}),T._UniversalLerp=function(e,t,i){var r=e.constructor;return r.Lerp?r.Lerp(e,t,i):r.Slerp?r.Slerp(e,t,i):e.toFixed?e*(1-i)+i*t:t},T.Parse=function(e){var t,i,r=new T(e.name,e.property,e.framePerSecond,e.dataType,e.loopBehavior),n=e.dataType,o=[];for(e.enableBlending&&(r.enableBlending=e.enableBlending),e.blendingSpeed&&(r.blendingSpeed=e.blendingSpeed),i=0;i<e.keys.length;i++){var s,a,l=e.keys[i];switch(n){case T.ANIMATIONTYPE_FLOAT:t=l.values[0],1<=l.values.length&&(s=l.values[1]),2<=l.values.length&&(a=l.values[2]);break;case T.ANIMATIONTYPE_QUATERNION:if(t=d.Quaternion.FromArray(l.values),8<=l.values.length){var c=d.Quaternion.FromArray(l.values.slice(4,8));c.equals(d.Quaternion.Zero())||(s=c)}if(12<=l.values.length){var h=d.Quaternion.FromArray(l.values.slice(8,12));h.equals(d.Quaternion.Zero())||(a=h)}break;case T.ANIMATIONTYPE_MATRIX:t=d.Matrix.FromArray(l.values);break;case T.ANIMATIONTYPE_COLOR3:t=d.Color3.FromArray(l.values);break;case T.ANIMATIONTYPE_VECTOR3:default:t=d.Vector3.FromArray(l.values)}var u={};u.frame=l.frame,u.value=t,null!=s&&(u.inTangent=s),null!=a&&(u.outTangent=a),o.push(u)}if(r.setKeys(o),e.ranges)for(i=0;i<e.ranges.length;i++)t=e.ranges[i],r.createRange(t.name,t.from,t.to);return r},T.AppendSerializedAnimations=function(e,t){if(e.animations){t.animations=[];for(var i=0;i<e.animations.length;i++){var r=e.animations[i];t.animations.push(r.serialize())}}},T.AllowMatricesInterpolation=!1,T.AllowMatrixDecomposeForInterpolation=!0,T._ANIMATIONTYPE_FLOAT=0,T._ANIMATIONTYPE_VECTOR3=1,T._ANIMATIONTYPE_QUATERNION=2,T._ANIMATIONTYPE_MATRIX=3,T._ANIMATIONTYPE_COLOR3=4,T._ANIMATIONTYPE_VECTOR2=5,T._ANIMATIONTYPE_SIZE=6,T._ANIMATIONLOOPMODE_RELATIVE=0,T._ANIMATIONLOOPMODE_CYCLE=1,T._ANIMATIONLOOPMODE_CONSTANT=2,T})();d.Animation=n})($a||($a={})),(function(l){var e=function(){};l.TargetedAnimation=e;var t=(function(){function e(e,t){void 0===t&&(t=null),this.name=e,this._targetedAnimations=new Array,this._animatables=new Array,this._from=Number.MAX_VALUE,this._to=-Number.MAX_VALUE,this._speedRatio=1,this.onAnimationEndObservable=new l.Observable,this.onAnimationGroupEndObservable=new l.Observable,this.onAnimationGroupPauseObservable=new l.Observable,this._scene=t||l.Engine.LastCreatedScene,this._scene.animationGroups.push(this)}return Object.defineProperty(e.prototype,\"from\",{get:function(){return this._from},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,\"to\",{get:function(){return this._to},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,\"isStarted\",{get:function(){return this._isStarted},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,\"speedRatio\",{get:function(){return this._speedRatio},set:function(e){if(this._speedRatio!==e){this._speedRatio=e;for(var t=0;t<this._animatables.length;t++){this._animatables[t].speedRatio=this._speedRatio}}},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,\"targetedAnimations\",{get:function(){return this._targetedAnimations},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,\"animatables\",{get:function(){return this._animatables},enumerable:!0,configurable:!0}),e.prototype.addTargetedAnimation=function(e,t){var i={animation:e,target:t},r=e.getKeys();return this._from>r[0].frame&&(this._from=r[0].frame),this._to<r[r.length-1].frame&&(this._to=r[r.length-1].frame),this._targetedAnimations.push(i),i},e.prototype.normalize=function(e,t){void 0===e&&(e=null),void 0===t&&(t=null),null==e&&(e=this._from),null==t&&(t=this._to);for(var i=0;i<this._targetedAnimations.length;i++){var r=this._targetedAnimations[i].animation.getKeys(),n=r[0],o=r[r.length-1];if(n.frame>e){var s={frame:e,value:n.value,inTangent:n.inTangent,outTangent:n.outTangent,interpolation:n.interpolation};r.splice(0,0,s)}if(o.frame<t){s={frame:t,value:o.value,inTangent:o.outTangent,outTangent:o.outTangent,interpolation:o.interpolation};r.push(s)}}return this._from=e,this._to=t,this},e.prototype.start=function(i,r,n,o){var s=this;if(void 0===i&&(i=!1),void 0===r&&(r=1),this._isStarted||0===this._targetedAnimations.length)return this;for(var e=function(e){var t=a._scene.beginDirectAnimation(e.target,[e.animation],void 0!==n?n:a._from,void 0!==o?o:a._to,i,r);t.onAnimationEnd=function(){s.onAnimationEndObservable.notifyObservers(e),s._checkAnimationGroupEnded(t)},a._animatables.push(t)},a=this,t=0,l=this._targetedAnimations;t<l.length;t++){e(l[t])}return this._speedRatio=r,this._isStarted=!0,this},e.prototype.pause=function(){if(!this._isStarted)return this;for(var e=0;e<this._animatables.length;e++){this._animatables[e].pause()}return this.onAnimationGroupPauseObservable.notifyObservers(this),this},e.prototype.play=function(e){if(this.isStarted&&this._animatables.length===this._targetedAnimations.length){if(void 0!==e)for(var t=0;t<this._animatables.length;t++){this._animatables[t].loopAnimation=e}this.restart()}else this.stop(),this.start(e,this._speedRatio);return this},e.prototype.reset=function(){if(!this._isStarted)return this;for(var e=0;e<this._animatables.length;e++){this._animatables[e].reset()}return this},e.prototype.restart=function(){if(!this._isStarted)return this;for(var e=0;e<this._animatables.length;e++){this._animatables[e].restart()}return this},e.prototype.stop=function(){if(!this._isStarted)return this;for(var e=this._animatables.slice(),t=0;t<e.length;t++)e[t].stop();return this._isStarted=!1,this},e.prototype.setWeightForAllAnimatables=function(e){for(var t=0;t<this._animatables.length;t++){this._animatables[t].weight=e}return this},e.prototype.syncAllAnimationsWith=function(e){for(var t=0;t<this._animatables.length;t++){this._animatables[t].syncWith(e)}return this},e.prototype.goToFrame=function(e){if(!this._isStarted)return this;for(var t=0;t<this._animatables.length;t++){this._animatables[t].goToFrame(e)}return this},e.prototype.dispose=function(){this._targetedAnimations=[],this._animatables=[];var e=this._scene.animationGroups.indexOf(this);-1<e&&this._scene.animationGroups.splice(e,1)},e.prototype._checkAnimationGroupEnded=function(e){var t=this._animatables.indexOf(e);-1<t&&this._animatables.splice(t,1),0===this._animatables.length&&(this._isStarted=!1,this.onAnimationGroupEndObservable.notifyObservers(this))},e.Parse=function(e,t){for(var i=new l.AnimationGroup(e.name,t),r=0;r<e.targetedAnimations.length;r++){var n=e.targetedAnimations[r],o=l.Animation.Parse(n.animation),s=n.targetId,a=t.getNodeByID(s);null!=a&&i.addTargetedAnimation(o,a)}return null!==e.from&&null!==e.from&&i.normalize(e.from,e.to),i},e.prototype.getClassName=function(){return\"AnimationGroup\"},e.prototype.toString=function(e){var t=\"Name: \"+this.name;return t+=\", type: \"+this.getClassName(),e&&(t+=\", from: \"+this._from,t+=\", to: \"+this._to,t+=\", isStarted: \"+this._isStarted,t+=\", speedRatio: \"+this._speedRatio,t+=\", targetedAnimations length: \"+this._targetedAnimations.length,t+=\", animatables length: \"+this._animatables),t},e})();l.AnimationGroup=t})($a||($a={})),Ze=$a||($a={}),qe=Object.freeze(new Ze.Quaternion(0,0,0,0)),Je=Object.freeze(Ze.Vector3.Zero()),$e=Object.freeze(Ze.Vector2.Zero()),et=Object.freeze(Ze.Size.Zero()),tt=Object.freeze(Ze.Color3.Black()),it=(function(){function e(e,t,i,r){var n=this;this._events=new Array,this._currentFrame=0,this._originalValue=new Array,this._offsetsCache={},this._highLimitsCache={},this._stopped=!1,this._blendingFactor=0,this._targetPath=\"\",this._weight=1,this._ratioOffset=0,this._previousDelay=0,this._previousRatio=0,this._animation=t,this._target=e,this._scene=i,this._host=r,t._runtimeAnimations.push(this);var o=t.getEvents();o&&0<o.length&&o.forEach((function(e){n._events.push(e._clone())}))}return Object.defineProperty(e.prototype,\"currentFrame\",{get:function(){return this._currentFrame},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,\"weight\",{get:function(){return this._weight},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,\"currentValue\",{get:function(){return this._currentValue},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,\"targetPath\",{get:function(){return this._targetPath},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,\"target\",{get:function(){return this._activeTarget},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,\"animation\",{get:function(){return this._animation},enumerable:!0,configurable:!0}),e.prototype.reset=function(e){if(void 0===e&&(e=!1),e)if(this._target instanceof Array)for(var t=0,i=0,r=this._target;i<r.length;i++){var n=r[i];void 0!==this._originalValue[t]&&this._setValue(n,this._originalValue[t],-1),t++}else void 0!==this._originalValue[0]&&this._setValue(this._target,this._originalValue[0],-1);this._offsetsCache={},this._highLimitsCache={},this._currentFrame=0,this._blendingFactor=0,this._originalValue=new Array;for(t=0;t<this._events.length;t++)this._events[t].isDone=!1},e.prototype.isStopped=function(){return this._stopped},e.prototype.dispose=function(){var e=this._animation.runtimeAnimations.indexOf(this);-1<e&&this._animation.runtimeAnimations.splice(e,1)},e.prototype._interpolate=function(e,t,i,r,n){return this._currentFrame=e,this._animation.dataType!==Ze.Animation.ANIMATIONTYPE_MATRIX||this._workValue||(this._workValue=Ze.Matrix.Zero()),this._animation._interpolate(e,t,this._workValue,i,r,n)},e.prototype.setValue=function(e,t){if(void 0===t&&(t=1),this._target instanceof Array)for(var i=0,r=0,n=this._target;r<n.length;r++){var o=n[r];this._setValue(o,e,t,i),i++}else this._setValue(this._target,e,t)},e.prototype._setValue=function(e,t,i,r){var n,o;void 0===r&&(r=0);var s=this._animation.targetPropertyPath;if(1<s.length){for(var a=e[s[0]],l=1;l<s.length-1;l++)a=a[s[l]];n=s[s.length-1],o=a}else n=s[0],o=e;if(this._targetPath=n,this._activeTarget=o,this._weight=i,void 0===this._originalValue[r]){var c=void 0;(c=o.getRestPose&&\"_matrix\"===n?o.getRestPose():o[n])&&c.clone?this._originalValue[r]=c.clone():this._originalValue[r]=c}if((e&&e.animationPropertiesOverride?e.animationPropertiesOverride.enableBlending:this._animation.enableBlending)&&this._blendingFactor<=1){if(!this._originalBlendValue)(c=o[n]).clone?this._originalBlendValue=c.clone():this._originalBlendValue=c;this._originalBlendValue.m?Ze.Animation.AllowMatrixDecomposeForInterpolation?this._currentValue?Ze.Matrix.DecomposeLerpToRef(this._originalBlendValue,t,this._blendingFactor,this._currentValue):this._currentValue=Ze.Matrix.DecomposeLerp(this._originalBlendValue,t,this._blendingFactor):this._currentValue?Ze.Matrix.LerpToRef(this._originalBlendValue,t,this._blendingFactor,this._currentValue):this._currentValue=Ze.Matrix.Lerp(this._originalBlendValue,t,this._blendingFactor):this._currentValue=Ze.Animation._UniversalLerp(this._originalBlendValue,t,this._blendingFactor);var h=e&&e.animationPropertiesOverride?e.animationPropertiesOverride.blendingSpeed:this._animation.blendingSpeed;this._blendingFactor+=h}else this._currentValue=t;-1!==i?this._scene._registerTargetForLateAnimationBinding(this,this._originalValue[r]):o[n]=this._currentValue,e.markAsDirty&&e.markAsDirty(this._animation.targetProperty)},e.prototype._getCorrectLoopMode=function(){return this._target&&this._target.animationPropertiesOverride?this._target.animationPropertiesOverride.loopMode:this._animation.loopMode},e.prototype.goToFrame=function(e){var t=this._animation.getKeys();e<t[0].frame?e=t[0].frame:e>t[t.length-1].frame&&(e=t[t.length-1].frame);var i=this._interpolate(e,0,this._getCorrectLoopMode());this.setValue(i,-1)},e.prototype._prepareForSpeedRatioChange=function(e){var t=this._previousDelay*(this._animation.framePerSecond*e)/1e3;this._ratioOffset=this._previousRatio-t},e.prototype.animate=function(e,t,i,r,n,o){void 0===o&&(o=-1);var s=this._animation.targetPropertyPath;if(!s||s.length<1)return!(this._stopped=!0);var a=!0,l=this._animation.getKeys();if(0!==l[0].frame){var c={frame:0,value:l[0].value};l.splice(0,0,c)}else if(1===l.length){c={frame:.001,value:l[0].value};l.push(c)}(t<l[0].frame||t>l[l.length-1].frame)&&(t=l[0].frame),(i<l[0].frame||i>l[l.length-1].frame)&&(i=l[l.length-1].frame),t===i&&(t>l[0].frame?t--:i<l[l.length-1].frame&&i++);var h,u=i-t,d=e*(this._animation.framePerSecond*n)/1e3+this._ratioOffset,f=0;if(this._previousDelay=e,this._previousRatio=d,(t<i&&u<=d||i<t&&d<=u)&&!r)a=!1,f=this._animation._getKeyValue(l[l.length-1].value);else if(this._getCorrectLoopMode()!==Ze.Animation.ANIMATIONLOOPMODE_CYCLE){var p=i.toString()+t.toString();if(!this._offsetsCache[p]){var _=this._interpolate(t,0,Ze.Animation.ANIMATIONLOOPMODE_CYCLE),m=this._interpolate(i,0,Ze.Animation.ANIMATIONLOOPMODE_CYCLE);switch(this._animation.dataType){case Ze.Animation.ANIMATIONTYPE_FLOAT:this._offsetsCache[p]=m-_;break;case Ze.Animation.ANIMATIONTYPE_QUATERNION:this._offsetsCache[p]=m.subtract(_);break;case Ze.Animation.ANIMATIONTYPE_VECTOR3:this._offsetsCache[p]=m.subtract(_);case Ze.Animation.ANIMATIONTYPE_VECTOR2:this._offsetsCache[p]=m.subtract(_);case Ze.Animation.ANIMATIONTYPE_SIZE:this._offsetsCache[p]=m.subtract(_);case Ze.Animation.ANIMATIONTYPE_COLOR3:this._offsetsCache[p]=m.subtract(_)}this._highLimitsCache[p]=m}f=this._highLimitsCache[p],h=this._offsetsCache[p]}if(void 0===h)switch(this._animation.dataType){case Ze.Animation.ANIMATIONTYPE_FLOAT:h=0;break;case Ze.Animation.ANIMATIONTYPE_QUATERNION:h=qe;break;case Ze.Animation.ANIMATIONTYPE_VECTOR3:h=Je;break;case Ze.Animation.ANIMATIONTYPE_VECTOR2:h=$e;break;case Ze.Animation.ANIMATIONTYPE_SIZE:h=et;break;case Ze.Animation.ANIMATIONTYPE_COLOR3:h=tt}var g=d/u>>0,v=a?t+d%u:i;if(this._host&&this._host.syncRoot){var y=this._host.syncRoot;v=t+(i-t)*((y.masterFrame-y.fromFrame)/(y.toFrame-y.fromFrame))}var b=this._events;if(0<u&&this.currentFrame>v||u<0&&this.currentFrame<v)for(var T=0;T<b.length;T++)b[T].onlyOnce||(b[T].isDone=!1);var E=this._interpolate(v,g,this._getCorrectLoopMode(),h,f);this.setValue(E,o);for(T=0;T<b.length;T++)if(0<u&&v>=b[T].frame&&b[T].frame>=t||u<0&&v<=b[T].frame&&b[T].frame<=t){var x=b[T];x.isDone||(x.onlyOnce&&(b.splice(T,1),T--),x.isDone=!0,x.action(v))}return a||(this._stopped=!0),a},e})(),Ze.RuntimeAnimation=it,rt=$a||($a={}),nt=(function(){function e(e,t,i,r,n,o,s,a){void 0===i&&(i=0),void 0===r&&(r=100),void 0===n&&(n=!1),void 0===o&&(o=1),this.target=t,this.fromFrame=i,this.toFrame=r,this.loopAnimation=n,this.onAnimationEnd=s,this._localDelayOffset=null,this._pausedDelay=null,this._runtimeAnimations=new Array,this._paused=!1,this._speedRatio=1,this._weight=-1,this.disposeOnEnd=!0,this.animationStarted=!1,this.onAnimationEndObservable=new rt.Observable,this._scene=e,a&&this.appendAnimations(t,a),this._speedRatio=o,e._activeAnimatables.push(this)}return Object.defineProperty(e.prototype,\"syncRoot\",{get:function(){return this._syncRoot},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,\"masterFrame\",{get:function(){return 0===this._runtimeAnimations.length?0:this._runtimeAnimations[0].currentFrame},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,\"weight\",{get:function(){return this._weight},set:function(e){this._weight=-1!==e?Math.min(Math.max(e,0),1):-1},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,\"speedRatio\",{get:function(){return this._speedRatio},set:function(e){for(var t=0;t<this._runtimeAnimations.length;t++){this._runtimeAnimations[t]._prepareForSpeedRatioChange(e)}this._speedRatio=e},enumerable:!0,configurable:!0}),e.prototype.syncWith=function(e){if(this._syncRoot=e){var t=this._scene._activeAnimatables.indexOf(this);-1<t&&(this._scene._activeAnimatables.splice(t,1),this._scene._activeAnimatables.push(this))}return this},e.prototype.getAnimations=function(){return this._runtimeAnimations},e.prototype.appendAnimations=function(e,t){for(var i=0;i<t.length;i++){var r=t[i];this._runtimeAnimations.push(new rt.RuntimeAnimation(e,r,this._scene,this))}},e.prototype.getAnimationByTargetProperty=function(e){for(var t=this._runtimeAnimations,i=0;i<t.length;i++)if(t[i].animation.targetProperty===e)return t[i].animation;return null},e.prototype.getRuntimeAnimationByTargetProperty=function(e){for(var t=this._runtimeAnimations,i=0;i<t.length;i++)if(t[i].animation.targetProperty===e)return t[i];return null},e.prototype.reset=function(){for(var e=this._runtimeAnimations,t=0;t<e.length;t++)e[t].reset(!0);this._localDelayOffset=null,this._pausedDelay=null},e.prototype.enableBlending=function(e){for(var t=this._runtimeAnimations,i=0;i<t.length;i++)t[i].animation.enableBlending=!0,t[i].animation.blendingSpeed=e},e.prototype.disableBlending=function(){for(var e=this._runtimeAnimations,t=0;t<e.length;t++)e[t].animation.enableBlending=!1},e.prototype.goToFrame=function(e){var t=this._runtimeAnimations;if(t[0]){var i=t[0].animation.framePerSecond,r=1e3*(e-t[0].currentFrame)/(i*this.speedRatio);null===this._localDelayOffset&&(this._localDelayOffset=0),this._localDelayOffset-=r}for(var n=0;n<t.length;n++)t[n].goToFrame(e)},e.prototype.pause=function(){this._paused||(this._paused=!0)},e.prototype.restart=function(){this._paused=!1},e.prototype._raiseOnAnimationEnd=function(){this.onAnimationEnd&&this.onAnimationEnd(),this.onAnimationEndObservable.notifyObservers(this)},e.prototype.stop=function(e,t){if(e||t){var i=this._scene._activeAnimatables.indexOf(this);if(-1<i){for(var r=(o=this._runtimeAnimations).length-1;0<=r;r--){var n=o[r];e&&n.animation.name!=e||(t&&!t(n.target)||(n.dispose(),o.splice(r,1)))}0==o.length&&(this._scene._activeAnimatables.splice(i,1),this._raiseOnAnimationEnd())}}else{if(-1<(r=this._scene._activeAnimatables.indexOf(this))){this._scene._activeAnimatables.splice(r,1);var o=this._runtimeAnimations;for(r=0;r<o.length;r++)o[r].dispose();this._raiseOnAnimationEnd()}}},e.prototype.waitAsync=function(){var i=this;return new Promise(function(e,t){i.onAnimationEndObservable.add((function(){e(i)}),void 0,void 0,i,!0)})},e.prototype._animate=function(e){if(this._paused)return this.animationStarted=!1,null===this._pausedDelay&&(this._pausedDelay=e),!0;if(null===this._localDelayOffset?(this._localDelayOffset=e,this._pausedDelay=null):null!==this._pausedDelay&&(this._localDelayOffset+=e-this._pausedDelay,this._pausedDelay=null),0===this._weight)return!0;var t,i=!1,r=this._runtimeAnimations;for(t=0;t<r.length;t++){var n=r[t].animate(e-this._localDelayOffset,this.fromFrame,this.toFrame,this.loopAnimation,this._speedRatio,this._weight);i=i||n}if(!(this.animationStarted=i)){if(this.disposeOnEnd)for(t=this._scene._activeAnimatables.indexOf(this),this._scene._activeAnimatables.splice(t,1),t=0;t<r.length;t++)r[t].dispose();this._raiseOnAnimationEnd(),this.disposeOnEnd&&(this.onAnimationEnd=null,this.onAnimationEndObservable.clear())}return i},e})(),rt.Animatable=nt,(function(t){var e=(function(){function t(){this._easingMode=t.EASINGMODE_EASEIN}return t.prototype.setEasingMode=function(e){var t=Math.min(Math.max(e,0),2);this._easingMode=t},t.prototype.getEasingMode=function(){return this._easingMode},t.prototype.easeInCore=function(e){throw new Error(\"You must implement this method\")},t.prototype.ease=function(e){switch(this._easingMode){case t.EASINGMODE_EASEIN:return this.easeInCore(e);case t.EASINGMODE_EASEOUT:return 1-this.easeInCore(1-e)}return.5<=e?.5*(1-this.easeInCore(2*(1-e)))+.5:.5*this.easeInCore(2*e)},t.EASINGMODE_EASEIN=0,t.EASINGMODE_EASEOUT=1,t.EASINGMODE_EASEINOUT=2,t})(),i=(function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return T(t,e),t.prototype.easeInCore=function(e){return e=Math.max(0,Math.min(1,e)),1-Math.sqrt(1-e*e)},t})(t.EasingFunction=e);t.CircleEase=i;var r=(function(i){function e(e){void 0===e&&(e=1);var t=i.call(this)||this;return t.amplitude=e,t}return T(e,i),e.prototype.easeInCore=function(e){var t=Math.max(0,this.amplitude);return Math.pow(e,3)-e*t*Math.sin(3.141592653589793*e)},e})(e);t.BackEase=r;var n=(function(r){function e(e,t){void 0===e&&(e=3),void 0===t&&(t=2);var i=r.call(this)||this;return i.bounces=e,i.bounciness=t,i}return T(e,r),e.prototype.easeInCore=function(e){var t=Math.max(0,this.bounces),i=this.bounciness;i<=1&&(i=1.001);var r=Math.pow(i,t),n=1-i,o=(1-r)/n+.5*r,s=e*o,a=Math.log(-s*(1-i)+1)/Math.log(i),l=Math.floor(a),c=l+1,h=(1-Math.pow(i,l))/(n*o),u=.5*(h+(1-Math.pow(i,c))/(n*o)),d=e-u,f=u-h;return-Math.pow(1/i,t-l)/(f*f)*(d-f)*(d+f)},e})(e);t.BounceEase=n;var o=(function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return T(t,e),t.prototype.easeInCore=function(e){return e*e*e},t})(e);t.CubicEase=o;var s=(function(r){function e(e,t){void 0===e&&(e=3),void 0===t&&(t=3);var i=r.call(this)||this;return i.oscillations=e,i.springiness=t,i}return T(e,r),e.prototype.easeInCore=function(e){var t=Math.max(0,this.oscillations),i=Math.max(0,this.springiness);return(0==i?e:(Math.exp(i*e)-1)/(Math.exp(i)-1))*Math.sin((6.283185307179586*t+1.5707963267948966)*e)},e})(e);t.ElasticEase=s;var a=(function(i){function e(e){void 0===e&&(e=2);var t=i.call(this)||this;return t.exponent=e,t}return T(e,i),e.prototype.easeInCore=function(e){return this.exponent<=0?e:(Math.exp(this.exponent*e)-1)/(Math.exp(this.exponent)-1)},e})(e);t.ExponentialEase=a;var l=(function(i){function e(e){void 0===e&&(e=2);var t=i.call(this)||this;return t.power=e,t}return T(e,i),e.prototype.easeInCore=function(e){var t=Math.max(0,this.power);return Math.pow(e,t)},e})(e);t.PowerEase=l;var c=(function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return T(t,e),t.prototype.easeInCore=function(e){return e*e},t})(e);t.QuadraticEase=c;var h=(function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return T(t,e),t.prototype.easeInCore=function(e){return e*e*e*e},t})(e);t.QuarticEase=h;var u=(function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return T(t,e),t.prototype.easeInCore=function(e){return e*e*e*e*e},t})(e);t.QuinticEase=u;var d=(function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return T(t,e),t.prototype.easeInCore=function(e){return 1-Math.sin(1.5707963267948966*(1-e))},t})(e);t.SineEase=d;var f=(function(o){function e(e,t,i,r){void 0===e&&(e=0),void 0===t&&(t=0),void 0===i&&(i=1),void 0===r&&(r=1);var n=o.call(this)||this;return n.x1=e,n.y1=t,n.x2=i,n.y2=r,n}return T(e,o),e.prototype.easeInCore=function(e){return t.BezierCurve.Interpolate(e,this.x1,this.y1,this.x2,this.y2)},e})(e);t.BezierCurveEase=f})($a||($a={})),(function(t){var e=(function(){function e(e){this._actionManager=e}return e.prototype.isValid=function(){return!0},e.prototype._getProperty=function(e){return this._actionManager._getProperty(e)},e.prototype._getEffectiveTarget=function(e,t){return this._actionManager._getEffectiveTarget(e,t)},e.prototype.serialize=function(){},e.prototype._serialize=function(e){return{type:2,children:[],name:e.name,properties:e.properties}},e})(),i=(function(s){function a(e,t,i,r,n){void 0===n&&(n=a.IsEqual);var o=s.call(this,e)||this;return o.propertyPath=i,o.value=r,o.operator=n,o._target=t,o._effectiveTarget=o._getEffectiveTarget(t,o.propertyPath),o._property=o._getProperty(o.propertyPath),o}return T(a,s),Object.defineProperty(a,\"IsEqual\",{get:function(){return a._IsEqual},enumerable:!0,configurable:!0}),Object.defineProperty(a,\"IsDifferent\",{get:function(){return a._IsDifferent},enumerable:!0,configurable:!0}),Object.defineProperty(a,\"IsGreater\",{get:function(){return a._IsGreater},enumerable:!0,configurable:!0}),Object.defineProperty(a,\"IsLesser\",{get:function(){return a._IsLesser},enumerable:!0,configurable:!0}),a.prototype.isValid=function(){switch(this.operator){case a.IsGreater:return this._effectiveTarget[this._property]>this.value;case a.IsLesser:return this._effectiveTarget[this._property]<this.value;case a.IsEqual:case a.IsDifferent:var e;return e=this.value.equals?this.value.equals(this._effectiveTarget[this._property]):this.value===this._effectiveTarget[this._property],this.operator===a.IsEqual?e:!e}return!1},a.prototype.serialize=function(){return this._serialize({name:\"ValueCondition\",properties:[t.Action._GetTargetProperty(this._target),{name:\"propertyPath\",value:this.propertyPath},{name:\"value\",value:t.Action._SerializeValueAsString(this.value)},{name:\"operator\",value:a.GetOperatorName(this.operator)}]})},a.GetOperatorName=function(e){switch(e){case a._IsEqual:return\"IsEqual\";case a._IsDifferent:return\"IsDifferent\";case a._IsGreater:return\"IsGreater\";case a._IsLesser:return\"IsLesser\";default:return\"\"}},a._IsEqual=0,a._IsDifferent=1,a._IsGreater=2,a._IsLesser=3,a})(t.Condition=e);t.ValueCondition=i;var r=(function(r){function e(e,t){var i=r.call(this,e)||this;return i.predicate=t,i}return T(e,r),e.prototype.isValid=function(){return this.predicate()},e})(e);t.PredicateCondition=r;var n=(function(n){function e(e,t,i){var r=n.call(this,e)||this;return r.value=i,r._target=t,r}return T(e,n),e.prototype.isValid=function(){return this._target.state===this.value},e.prototype.serialize=function(){return this._serialize({name:\"StateCondition\",properties:[t.Action._GetTargetProperty(this._target),{name:\"value\",value:this.value}]})},e})(e);t.StateCondition=n})($a||($a={})),ot=$a||($a={}),st=(function(){function e(e,t){this.triggerOptions=e,this.onBeforeExecuteObservable=new ot.Observable,e.parameter?(this.trigger=e.trigger,this._triggerParameter=e.parameter):e.trigger?this.trigger=e.trigger:this.trigger=e,(this._nextActiveAction=this)._condition=t}return e.prototype._prepare=function(){},e.prototype.getTriggerParameter=function(){return this._triggerParameter},e.prototype._executeCurrent=function(e){if(this._nextActiveAction._condition){var t=this._nextActiveAction._condition,i=this._actionManager.getScene().getRenderId();if(t._evaluationId===i){if(!t._currentResult)return}else{if(t._evaluationId=i,!t.isValid())return void(t._currentResult=!1);t._currentResult=!0}}this.onBeforeExecuteObservable.notifyObservers(this),this._nextActiveAction.execute(e),this.skipToNextActiveAction()},e.prototype.execute=function(e){},e.prototype.skipToNextActiveAction=function(){this._nextActiveAction._child?(this._nextActiveAction._child._actionManager||(this._nextActiveAction._child._actionManager=this._actionManager),this._nextActiveAction=this._nextActiveAction._child):this._nextActiveAction=this},e.prototype.then=function(e){return(this._child=e)._actionManager=this._actionManager,e._prepare(),e},e.prototype._getProperty=function(e){return this._actionManager._getProperty(e)},e.prototype._getEffectiveTarget=function(e,t){return this._actionManager._getEffectiveTarget(e,t)},e.prototype.serialize=function(e){},e.prototype._serialize=function(e,t){var i={type:1,children:[],name:e.name,properties:e.properties||[]};if(this._child&&this._child.serialize(i),this._condition){var r=this._condition.serialize();return r.children.push(i),t&&t.children.push(r),r}return t&&t.children.push(i),i},e._SerializeValueAsString=function(e){return\"number\"==typeof e?e.toString():\"boolean\"==typeof e?e?\"true\":\"false\":e instanceof ot.Vector2?e.x+\", \"+e.y:e instanceof ot.Vector3?e.x+\", \"+e.y+\", \"+e.z:e instanceof ot.Color3?e.r+\", \"+e.g+\", \"+e.b:e instanceof ot.Color4?e.r+\", \"+e.g+\", \"+e.b+\", \"+e.a:e},e._GetTargetProperty=function(e){return{name:\"target\",targetType:e instanceof ot.Mesh?\"MeshProperties\":e instanceof ot.Light?\"LightProperties\":e instanceof ot.Camera?\"CameraProperties\":\"SceneProperties\",value:e instanceof ot.Scene?\"Scene\":e.name}},e})(),ot.Action=st,(function(S){var e=(function(){function n(e,t,i,r,n,o){this.source=e,this.pointerX=t,this.pointerY=i,this.meshUnderPointer=r,this.sourceEvent=n,this.additionalData=o}return n.CreateNew=function(e,t,i){var r=e.getScene();return new n(e,r.pointerX,r.pointerY,r.meshUnderPointer,t,i)},n.CreateNewFromSprite=function(e,t,i,r){return new n(e,t.pointerX,t.pointerY,t.meshUnderPointer,i,r)},n.CreateNewFromScene=function(e,t){return new n(null,e.pointerX,e.pointerY,e.meshUnderPointer,t)},n.CreateNewFromPrimitive=function(e,t,i,r){return new n(e,t.x,t.y,null,i,r)},n})();S.ActionEvent=e;var t=(function(){function A(e){this.actions=new Array,this.hoverCursor=\"\",this._scene=e||S.Engine.LastCreatedScene,e.actionManagers.push(this)}return A.prototype.dispose=function(){for(var e=this._scene.actionManagers.indexOf(this),t=0;t<this.actions.length;t++){var i=this.actions[t];A.Triggers[i.trigger]--,0===A.Triggers[i.trigger]&&delete A.Triggers[i.trigger]}-1<e&&this._scene.actionManagers.splice(e,1)},A.prototype.getScene=function(){return this._scene},A.prototype.hasSpecificTriggers=function(e){for(var t=0;t<this.actions.length;t++){var i=this.actions[t];if(-1<e.indexOf(i.trigger))return!0}return!1},A.prototype.hasSpecificTriggers2=function(e,t){for(var i=0;i<this.actions.length;i++){var r=this.actions[i];if(e==r.trigger||t==r.trigger)return!0}return!1},A.prototype.hasSpecificTrigger=function(e,t){for(var i=0;i<this.actions.length;i++){var r=this.actions[i];if(r.trigger===e){if(!t)return!0;if(t(r.getTriggerParameter()))return!0}}return!1},Object.defineProperty(A.prototype,\"hasPointerTriggers\",{get:function(){for(var e=0;e<this.actions.length;e++){var t=this.actions[e];if(t.trigger>=A.OnPickTrigger&&t.trigger<=A.OnPointerOutTrigger)return!0}return!1},enumerable:!0,configurable:!0}),Object.defineProperty(A.prototype,\"hasPickTriggers\",{get:function(){for(var e=0;e<this.actions.length;e++){var t=this.actions[e];if(t.trigger>=A.OnPickTrigger&&t.trigger<=A.OnPickUpTrigger)return!0}return!1},enumerable:!0,configurable:!0}),Object.defineProperty(A,\"HasTriggers\",{get:function(){for(var e in A.Triggers)if(A.Triggers.hasOwnProperty(e))return!0;return!1},enumerable:!0,configurable:!0}),Object.defineProperty(A,\"HasPickTriggers\",{get:function(){for(var e in A.Triggers)if(A.Triggers.hasOwnProperty(e)){var t=parseInt(e);if(A.OnPickTrigger<=t&&t<=A.OnPickUpTrigger)return!0}return!1},enumerable:!0,configurable:!0}),A.HasSpecificTrigger=function(e){for(var t in A.Triggers){if(A.Triggers.hasOwnProperty(t))if(parseInt(t)===e)return!0}return!1},A.prototype.registerAction=function(e){return e.trigger===A.OnEveryFrameTrigger&&this.getScene().actionManager!==this?(S.Tools.Warn(\"OnEveryFrameTrigger can only be used with scene.actionManager\"),null):(this.actions.push(e),A.Triggers[e.trigger]?A.Triggers[e.trigger]++:A.Triggers[e.trigger]=1,e._actionManager=this,e._prepare(),e)},A.prototype.unregisterAction=function(e){var t=this.actions.indexOf(e);return-1!==t&&(this.actions.splice(t,1),A.Triggers[e.trigger]-=1,0===A.Triggers[e.trigger]&&delete A.Triggers[e.trigger],delete e._actionManager,!0)},A.prototype.processTrigger=function(e,t){for(var i=0;i<this.actions.length;i++){var r=this.actions[i];if(r.trigger===e){if(t&&(e===A.OnKeyUpTrigger||e===A.OnKeyDownTrigger)){var n=r.getTriggerParameter();if(n&&n!==t.sourceEvent.keyCode){if(!n.toLowerCase)continue;var o=n.toLowerCase();if(o!==t.sourceEvent.key){var s=t.sourceEvent.charCode?t.sourceEvent.charCode:t.sourceEvent.keyCode;if(String.fromCharCode(s).toLowerCase()!==o)continue}}}r._executeCurrent(t)}}},A.prototype._getEffectiveTarget=function(e,t){for(var i=t.split(\".\"),r=0;r<i.length-1;r++)e=e[i[r]];return e},A.prototype._getProperty=function(e){var t=e.split(\".\");return t[t.length-1]},A.prototype.serialize=function(e){for(var t={children:new Array,name:e,type:3,properties:new Array},i=0;i<this.actions.length;i++){var r={type:0,children:new Array,name:A.GetTriggerName(this.actions[i].trigger),properties:new Array},n=this.actions[i].triggerOptions;if(n&&\"number\"!=typeof n)if(n.parameter instanceof S.Node)r.properties.push(S.Action._GetTargetProperty(n.parameter));else{var o={};S.Tools.DeepCopy(n.parameter,o,[\"mesh\"]),n.parameter&&n.parameter.mesh&&(o._meshId=n.parameter.mesh.id),r.properties.push({name:\"parameter\",targetType:null,value:o})}this.actions[i].serialize(r),t.children.push(r)}return t},A.Parse=function(e,t,T){var E=new A(T);null===t?T.actionManager=E:t.actionManager=E;for(var x=function(e,t,i,r){if(null===r){var n=parseFloat(t);return\"true\"===t||\"false\"===t?\"true\"===t:isNaN(n)?t:n}for(var o=r.split(\".\"),s=t.split(\",\"),a=0;a<o.length;a++)i=i[o[a]];if(\"boolean\"==typeof i)return\"true\"===s[0];if(\"string\"==typeof i)return s[0];var l=new Array;for(a=0;a<s.length;a++)l.push(parseFloat(s[a]));return i instanceof S.Vector3?S.Vector3.FromArray(l):i instanceof S.Vector4?S.Vector4.FromArray(l):i instanceof S.Color3?S.Color3.FromArray(l):i instanceof S.Color4?S.Color4.FromArray(l):parseFloat(s[0])},P=function(e,t,i,r,n){if(void 0===n&&(n=null),!e.detached){var o=new Array,s=null,a=null,l=e.combine&&0<e.combine.length;if(2===e.type?o.push(E):o.push(t),l){for(var c=new Array,h=0;h<e.combine.length;h++)P(e.combine[h],A.NothingTrigger,i,r,c);o.push(c)}else for(var u=0;u<e.properties.length;u++){var d=e.properties[u].value,f=e.properties[u].name,p=e.properties[u].targetType;\"target\"===f?d=s=null!==p&&\"SceneProperties\"===p?T:T.getNodeByName(d):\"parent\"===f?d=T.getNodeByName(d):\"sound\"===f?T.getSoundByName&&(d=T.getSoundByName(d)):\"propertyPath\"!==f?d=2===e.type&&\"operator\"===f?S.ValueCondition[d]:x(0,d,s,\"value\"===f?a:null):a=d,o.push(d)}if(null===n?o.push(i):o.push(null),\"InterpolateValueAction\"===e.name){var _=o[o.length-2];o[o.length-1]=_,o[o.length-2]=i}var m,g,v,y=(m=e.name,g=o,(v=Object.create(S.Tools.Instantiate(\"BABYLON.\"+m).prototype)).constructor.apply(v,g),v);if(y instanceof S.Condition&&null!==i){var b=new S.DoNothingAction(t,i);r?r.then(b):E.registerAction(b),r=b}null===n?y instanceof S.Condition?(i=y,y=r):(i=null,r?r.then(y):E.registerAction(y)):n.push(y);for(u=0;u<e.children.length;u++)P(e.children[u],t,i,y,null)}},i=0;i<e.children.length;i++){var r,n=e.children[i];if(0<n.properties.length){var o=n.properties[0].value,s=null===n.properties[0].targetType?o:T.getMeshByName(o);s._meshId&&(s.mesh=T.getMeshByID(s._meshId)),r={trigger:A[n.name],parameter:s}}else r=A[n.name];for(var a=0;a<n.children.length;a++)n.detached||P(n.children[a],r,null,null)}},A.GetTriggerName=function(e){switch(e){case 0:return\"NothingTrigger\";case 1:return\"OnPickTrigger\";case 2:return\"OnLeftPickTrigger\";case 3:return\"OnRightPickTrigger\";case 4:return\"OnCenterPickTrigger\";case 5:return\"OnPickDownTrigger\";case 6:return\"OnPickUpTrigger\";case 7:return\"OnLongPressTrigger\";case 8:return\"OnPointerOverTrigger\";case 9:return\"OnPointerOutTrigger\";case 10:return\"OnEveryFrameTrigger\";case 11:return\"OnIntersectionEnterTrigger\";case 12:return\"OnIntersectionExitTrigger\";case 13:return\"OnKeyDownTrigger\";case 14:return\"OnKeyUpTrigger\";case 15:return\"OnPickOutTrigger\";default:return\"\"}},A.NothingTrigger=0,A.OnPickTrigger=1,A.OnLeftPickTrigger=2,A.OnRightPickTrigger=3,A.OnCenterPickTrigger=4,A.OnPickDownTrigger=5,A.OnDoublePickTrigger=6,A.OnPickUpTrigger=7,A.OnPickOutTrigger=16,A.OnLongPressTrigger=8,A.OnPointerOverTrigger=9,A.OnPointerOutTrigger=10,A.OnEveryFrameTrigger=11,A.OnIntersectionEnterTrigger=12,A.OnIntersectionExitTrigger=13,A.OnKeyDownTrigger=14,A.OnKeyUpTrigger=15,A.Triggers={},A})();S.ActionManager=t})($a||($a={})),at=$a||($a={}),lt=(function(c){function e(e,t,i,r,n,o,s,a){void 0===n&&(n=1e3);var l=c.call(this,e,o)||this;return l.duration=1e3,l.onInterpolationDoneObservable=new at.Observable,l.propertyPath=i,l.value=r,l.duration=n,l.stopOtherAnimations=s,l.onInterpolationDone=a,l._target=l._effectiveTarget=t,l}return T(e,c),e.prototype._prepare=function(){this._effectiveTarget=this._getEffectiveTarget(this._effectiveTarget,this.propertyPath),this._property=this._getProperty(this.propertyPath)},e.prototype.execute=function(){var e,t=this,i=this._actionManager.getScene(),r=[{frame:0,value:this._effectiveTarget[this._property]},{frame:100,value:this.value}];if(\"number\"==typeof this.value)e=at.Animation.ANIMATIONTYPE_FLOAT;else if(this.value instanceof at.Color3)e=at.Animation.ANIMATIONTYPE_COLOR3;else if(this.value instanceof at.Vector3)e=at.Animation.ANIMATIONTYPE_VECTOR3;else if(this.value instanceof at.Matrix)e=at.Animation.ANIMATIONTYPE_MATRIX;else{if(!(this.value instanceof at.Quaternion))return void at.Tools.Warn(\"InterpolateValueAction: Unsupported type (\"+typeof this.value+\")\");e=at.Animation.ANIMATIONTYPE_QUATERNION}var n=new at.Animation(\"InterpolateValueAction\",this._property,1e3/this.duration*100,e,at.Animation.ANIMATIONLOOPMODE_CONSTANT);n.setKeys(r),this.stopOtherAnimations&&i.stopAnimation(this._effectiveTarget);i.beginDirectAnimation(this._effectiveTarget,[n],0,100,!1,1,(function(){t.onInterpolationDoneObservable.notifyObservers(t),t.onInterpolationDone&&t.onInterpolationDone()}))},e.prototype.serialize=function(e){return c.prototype._serialize.call(this,{name:\"InterpolateValueAction\",properties:[at.Action._GetTargetProperty(this._target),{name:\"propertyPath\",value:this.propertyPath},{name:\"value\",value:at.Action._SerializeValueAsString(this.value)},{name:\"duration\",value:at.Action._SerializeValueAsString(this.duration)},{name:\"stopOtherAnimations\",value:at.Action._SerializeValueAsString(this.stopOtherAnimations)||!1}]},e)},e})(at.Action),at.InterpolateValueAction=lt,(function(r){var e=(function(o){function e(e,t,i,r){var n=o.call(this,e,r)||this;return n.propertyPath=i,n._target=n._effectiveTarget=t,n}return T(e,o),e.prototype._prepare=function(){this._effectiveTarget=this._getEffectiveTarget(this._effectiveTarget,this.propertyPath),this._property=this._getProperty(this.propertyPath)},e.prototype.execute=function(){this._effectiveTarget[this._property]=!this._effectiveTarget[this._property]},e.prototype.serialize=function(e){return o.prototype._serialize.call(this,{name:\"SwitchBooleanAction\",properties:[r.Action._GetTargetProperty(this._target),{name:\"propertyPath\",value:this.propertyPath}]},e)},e})(r.Action);r.SwitchBooleanAction=e;var t=(function(o){function e(e,t,i,r){var n=o.call(this,e,r)||this;return n.value=i,n._target=t,n}return T(e,o),e.prototype.execute=function(){this._target.state=this.value},e.prototype.serialize=function(e){return o.prototype._serialize.call(this,{name:\"SetStateAction\",properties:[r.Action._GetTargetProperty(this._target),{name:\"value\",value:this.value}]},e)},e})(r.Action);r.SetStateAction=t;var i=(function(s){function e(e,t,i,r,n){var o=s.call(this,e,n)||this;return o.propertyPath=i,o.value=r,o._target=o._effectiveTarget=t,o}return T(e,s),e.prototype._prepare=function(){this._effectiveTarget=this._getEffectiveTarget(this._effectiveTarget,this.propertyPath),this._property=this._getProperty(this.propertyPath)},e.prototype.execute=function(){this._effectiveTarget[this._property]=this.value,this._target.markAsDirty&&this._target.markAsDirty(this._property)},e.prototype.serialize=function(e){return s.prototype._serialize.call(this,{name:\"SetValueAction\",properties:[r.Action._GetTargetProperty(this._target),{name:\"propertyPath\",value:this.propertyPath},{name:\"value\",value:r.Action._SerializeValueAsString(this.value)}]},e)},e})(r.Action);r.SetValueAction=i;var n=(function(s){function e(e,t,i,r,n){var o=s.call(this,e,n)||this;return o.propertyPath=i,o.value=r,o._target=o._effectiveTarget=t,o}return T(e,s),e.prototype._prepare=function(){this._effectiveTarget=this._getEffectiveTarget(this._effectiveTarget,this.propertyPath),this._property=this._getProperty(this.propertyPath),\"number\"!=typeof this._effectiveTarget[this._property]&&r.Tools.Warn(\"Warning: IncrementValueAction can only be used with number values\")},e.prototype.execute=function(){this._effectiveTarget[this._property]+=this.value,this._target.markAsDirty&&this._target.markAsDirty(this._property)},e.prototype.serialize=function(e){return s.prototype._serialize.call(this,{name:\"IncrementValueAction\",properties:[r.Action._GetTargetProperty(this._target),{name:\"propertyPath\",value:this.propertyPath},{name:\"value\",value:r.Action._SerializeValueAsString(this.value)}]},e)},e})(r.Action);r.IncrementValueAction=n;var o=(function(a){function e(e,t,i,r,n,o){var s=a.call(this,e,o)||this;return s.from=i,s.to=r,s.loop=n,s._target=t,s}return T(e,a),e.prototype._prepare=function(){},e.prototype.execute=function(){this._actionManager.getScene().beginAnimation(this._target,this.from,this.to,this.loop)},e.prototype.serialize=function(e){return a.prototype._serialize.call(this,{name:\"PlayAnimationAction\",properties:[r.Action._GetTargetProperty(this._target),{name:\"from\",value:String(this.from)},{name:\"to\",value:String(this.to)},{name:\"loop\",value:r.Action._SerializeValueAsString(this.loop)||!1}]},e)},e})(r.Action);r.PlayAnimationAction=o;var s=(function(n){function e(e,t,i){var r=n.call(this,e,i)||this;return r._target=t,r}return T(e,n),e.prototype._prepare=function(){},e.prototype.execute=function(){this._actionManager.getScene().stopAnimation(this._target)},e.prototype.serialize=function(e){return n.prototype._serialize.call(this,{name:\"StopAnimationAction\",properties:[r.Action._GetTargetProperty(this._target)]},e)},e})(r.Action);r.StopAnimationAction=s;var a=(function(i){function e(e,t){return void 0===e&&(e=r.ActionManager.NothingTrigger),i.call(this,e,t)||this}return T(e,i),e.prototype.execute=function(){},e.prototype.serialize=function(e){return i.prototype._serialize.call(this,{name:\"DoNothingAction\",properties:[]},e)},e})(r.Action);r.DoNothingAction=a;var l=(function(n){function e(e,t,i){var r=n.call(this,e,i)||this;return r.children=t,r}return T(e,n),e.prototype._prepare=function(){for(var e=0;e<this.children.length;e++)this.children[e]._actionManager=this._actionManager,this.children[e]._prepare()},e.prototype.execute=function(e){for(var t=0;t<this.children.length;t++)this.children[t].execute(e)},e.prototype.serialize=function(e){for(var t=n.prototype._serialize.call(this,{name:\"CombineAction\",properties:[],combine:[]},e),i=0;i<this.children.length;i++)t.combine.push(this.children[i].serialize(null));return t},e})(r.Action);r.CombineAction=l;var c=(function(n){function e(e,t,i){var r=n.call(this,e,i)||this;return r.func=t,r}return T(e,n),e.prototype.execute=function(e){this.func(e)},e})(r.Action);r.ExecuteCodeAction=c;var h=(function(o){function e(e,t,i,r){var n=o.call(this,e,r)||this;return n._target=t,n._parent=i,n}return T(e,o),e.prototype._prepare=function(){},e.prototype.execute=function(){if(this._target.parent!==this._parent){var e=this._parent.getWorldMatrix().clone();e.invert(),this._target.position=r.Vector3.TransformCoordinates(this._target.position,e),this._target.parent=this._parent}},e.prototype.serialize=function(e){return o.prototype._serialize.call(this,{name:\"SetParentAction\",properties:[r.Action._GetTargetProperty(this._target),r.Action._GetTargetProperty(this._parent)]},e)},e})(r.Action);r.SetParentAction=h})($a||($a={})),ct=$a||($a={}),ht=(function(){function e(e,t,i,r,n,o,s){if(void 0===o&&(o=.01),void 0===s&&(s=ct.Texture.TRILINEAR_SAMPLINGMODE),this.name=e,this.sprites=new Array,this.renderingGroupId=0,this.layerMask=268435455,this.fogEnabled=!0,this.isPickable=!1,this.onDisposeObservable=new ct.Observable,this._vertexBuffers={},n._getComponent(ct.SceneComponentConstants.NAME_SPRITE)||n._addComponent(new ct.SpriteSceneComponent(n)),this._capacity=i,this._spriteTexture=new ct.Texture(t,n,!0,!1,s),this._spriteTexture.wrapU=ct.Texture.CLAMP_ADDRESSMODE,this._spriteTexture.wrapV=ct.Texture.CLAMP_ADDRESSMODE,r.width&&r.height)this.cellWidth=r.width,this.cellHeight=r.height;else{if(void 0===r)return;this.cellWidth=r,this.cellHeight=r}this._epsilon=o,this._scene=n,this._scene.spriteManagers.push(this);for(var a=[],l=0,c=0;c<i;c++)a.push(l),a.push(l+1),a.push(l+2),a.push(l),a.push(l+2),a.push(l+3),l+=4;this._indexBuffer=n.getEngine().createIndexBuffer(a),this._vertexData=new Float32Array(16*i*4),this._buffer=new ct.Buffer(n.getEngine(),this._vertexData,!0,16);var h=this._buffer.createVertexBuffer(ct.VertexBuffer.PositionKind,0,4),u=this._buffer.createVertexBuffer(\"options\",4,4),d=this._buffer.createVertexBuffer(\"cellInfo\",8,4),f=this._buffer.createVertexBuffer(ct.VertexBuffer.ColorKind,12,4);this._vertexBuffers[ct.VertexBuffer.PositionKind]=h,this._vertexBuffers.options=u,this._vertexBuffers.cellInfo=d,this._vertexBuffers[ct.VertexBuffer.ColorKind]=f,this._effectBase=this._scene.getEngine().createEffect(\"sprites\",[ct.VertexBuffer.PositionKind,\"options\",\"cellInfo\",ct.VertexBuffer.ColorKind],[\"view\",\"projection\",\"textureInfos\",\"alphaTest\"],[\"diffuseSampler\"],\"\"),this._effectFog=this._scene.getEngine().createEffect(\"sprites\",[ct.VertexBuffer.PositionKind,\"options\",\"cellInfo\",ct.VertexBuffer.ColorKind],[\"view\",\"projection\",\"textureInfos\",\"alphaTest\",\"vFogInfos\",\"vFogColor\"],[\"diffuseSampler\"],\"#define FOG\")}return Object.defineProperty(e.prototype,\"onDispose\",{set:function(e){this._onDisposeObserver&&this.onDisposeObservable.remove(this._onDisposeObserver),this._onDisposeObserver=this.onDisposeObservable.add(e)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,\"texture\",{get:function(){return this._spriteTexture},set:function(e){this._spriteTexture=e},enumerable:!0,configurable:!0}),e.prototype._appendSpriteVertex=function(e,t,i,r,n){var o=16*e;0===i?i=this._epsilon:1===i&&(i=1-this._epsilon),0===r?r=this._epsilon:1===r&&(r=1-this._epsilon),this._vertexData[o]=t.position.x,this._vertexData[o+1]=t.position.y,this._vertexData[o+2]=t.position.z,this._vertexData[o+3]=t.angle,this._vertexData[o+4]=t.width,this._vertexData[o+5]=t.height,this._vertexData[o+6]=i,this._vertexData[o+7]=r,this._vertexData[o+8]=t.invertU?1:0,this._vertexData[o+9]=t.invertV?1:0;var s=t.cellIndex/n>>0;this._vertexData[o+10]=t.cellIndex-s*n,this._vertexData[o+11]=s,this._vertexData[o+12]=t.color.r,this._vertexData[o+13]=t.color.g,this._vertexData[o+14]=t.color.b,this._vertexData[o+15]=t.color.a},e.prototype.intersects=function(e,t,i,r){for(var n=Math.min(this._capacity,this.sprites.length),o=ct.Vector3.Zero(),s=ct.Vector3.Zero(),a=Number.MAX_VALUE,l=null,c=ct.Vector3.Zero(),h=t.getViewMatrix(),u=0;u<n;u++){var d=this.sprites[u];if(d){if(i){if(!i(d))continue}else if(!d.isPickable)continue;if(ct.Vector3.TransformCoordinatesToRef(d.position,h,c),o.copyFromFloats(c.x-d.width/2,c.y-d.height/2,c.z),s.copyFromFloats(c.x+d.width/2,c.y+d.height/2,c.z),e.intersectsBoxMinMax(o,s)){var f=ct.Vector3.Distance(c,e.origin);if(f<a&&(a=f,l=d,r))break}}}if(l){var p=new ct.PickingInfo;return p.hit=!0,p.pickedSprite=l,p.distance=a,p}return null},e.prototype.render=function(){if(this._effectBase.isReady()&&this._effectFog.isReady()&&this._spriteTexture&&this._spriteTexture.isReady()){for(var e=this._scene.getEngine(),t=this._spriteTexture.getBaseSize(),i=e.getDeltaTime(),r=Math.min(this._capacity,this.sprites.length),n=t.width/this.cellWidth,o=0,s=0;s<r;s++){var a=this.sprites[s];a&&a.isVisible&&(a._animate(i),this._appendSpriteVertex(o++,a,0,0,n),this._appendSpriteVertex(o++,a,1,0,n),this._appendSpriteVertex(o++,a,1,1,n),this._appendSpriteVertex(o++,a,0,1,n))}this._buffer.update(this._vertexData);var l=this._effectBase;this._scene.fogEnabled&&this._scene.fogMode!==ct.Scene.FOGMODE_NONE&&this.fogEnabled&&(l=this._effectFog),e.enableEffect(l);var c=this._scene.getViewMatrix();l.setTexture(\"diffuseSampler\",this._spriteTexture),l.setMatrix(\"view\",c),l.setMatrix(\"projection\",this._scene.getProjectionMatrix()),l.setFloat2(\"textureInfos\",this.cellWidth/t.width,this.cellHeight/t.height),this._scene.fogEnabled&&this._scene.fogMode!==ct.Scene.FOGMODE_NONE&&this.fogEnabled&&(l.setFloat4(\"vFogInfos\",this._scene.fogMode,this._scene.fogStart,this._scene.fogEnd,this._scene.fogDensity),l.setColor3(\"vFogColor\",this._scene.fogColor)),e.bindBuffers(this._vertexBuffers,this._indexBuffer,l),e.setDepthFunctionToLessOrEqual(),l.setBool(\"alphaTest\",!0),e.setColorWrite(!1),e.drawElementsType(ct.Material.TriangleFillMode,0,o/4*6),e.setColorWrite(!0),l.setBool(\"alphaTest\",!1),e.setAlphaMode(ct.Engine.ALPHA_COMBINE),e.drawElementsType(ct.Material.TriangleFillMode,0,o/4*6),e.setAlphaMode(ct.Engine.ALPHA_DISABLE)}},e.prototype.dispose=function(){this._buffer&&(this._buffer.dispose(),this._buffer=null),this._indexBuffer&&(this._scene.getEngine()._releaseBuffer(this._indexBuffer),this._indexBuffer=null),this._spriteTexture&&(this._spriteTexture.dispose(),this._spriteTexture=null);var e=this._scene.spriteManagers.indexOf(this);this._scene.spriteManagers.splice(e,1),this.onDisposeObservable.notifyObservers(this),this.onDisposeObservable.clear()},e})(),ct.SpriteManager=ht,ut=$a||($a={}),dt=(function(){function e(e,t){this.name=e,this.color=new ut.Color4(1,1,1,1),this.width=1,this.height=1,this.angle=0,this.cellIndex=0,this.invertU=0,this.invertV=0,this.animations=new Array,this.isPickable=!1,this._animationStarted=!1,this._loopAnimation=!1,this._fromIndex=0,this._toIndex=0,this._delay=0,this._direction=1,this._time=0,this.isVisible=!0,this._manager=t,this._manager.sprites.push(this),this.position=ut.Vector3.Zero()}return Object.defineProperty(e.prototype,\"size\",{get:function(){return this.width},set:function(e){this.width=e,this.height=e},enumerable:!0,configurable:!0}),e.prototype.playAnimation=function(e,t,i,r,n){this._fromIndex=e,this._toIndex=t,this._loopAnimation=i,this._delay=r,this._animationStarted=!0,this._direction=e<t?1:-1,this.cellIndex=e,this._time=0,this._onAnimationEnd=n},e.prototype.stopAnimation=function(){this._animationStarted=!1},e.prototype._animate=function(e){this._animationStarted&&(this._time+=e,this._time>this._delay&&(this._time=this._time%this._delay,this.cellIndex+=this._direction,this.cellIndex>this._toIndex&&(this._loopAnimation?this.cellIndex=this._fromIndex:(this.cellIndex=this._toIndex,this._animationStarted=!1,this._onAnimationEnd&&this._onAnimationEnd(),this.disposeWhenFinishedAnimating&&this.dispose()))))},e.prototype.dispose=function(){for(var e=0;e<this._manager.sprites.length;e++)this._manager.sprites[e]==this&&this._manager.sprites.splice(e,1)},e})(),ut.Sprite=dt,(function(l){l.Scene.prototype._internalPickSprites=function(e,t,i,r){if(!l.PickingInfo)return null;var n=null;if(!r){if(!this.activeCamera)return null;r=this.activeCamera}if(0<this.spriteManagers.length)for(var o=0;o<this.spriteManagers.length;o++){var s=this.spriteManagers[o];if(s.isPickable){var a=s.intersects(e,r,t,i);if(a&&a.hit&&(i||null==n||!(a.distance>=n.distance))&&(n=a,i))break}}return n||new l.PickingInfo},l.Scene.prototype.pickSprite=function(e,t,i,r,n){return this.createPickingRayInCameraSpaceToRef(e,t,this._tempSpritePickingRay,n),this._internalPickSprites(this._tempSpritePickingRay,i,r,n)},l.Scene.prototype.pickSpriteWithRay=function(e,t,i,r){if(!this._tempSpritePickingRay)return null;if(!r){if(!this.activeCamera)return null;r=this.activeCamera}return l.Ray.TransformToRef(e,r.getViewMatrix(),this._tempSpritePickingRay),this._internalPickSprites(this._tempSpritePickingRay,t,i,r)},l.Scene.prototype.setPointerOverSprite=function(e){this._pointerOverSprite!==e&&(this._pointerOverSprite&&this._pointerOverSprite.actionManager&&this._pointerOverSprite.actionManager.processTrigger(l.ActionManager.OnPointerOutTrigger,l.ActionEvent.CreateNewFromSprite(this._pointerOverSprite,this)),this._pointerOverSprite=e,this._pointerOverSprite&&this._pointerOverSprite.actionManager&&this._pointerOverSprite.actionManager.processTrigger(l.ActionManager.OnPointerOverTrigger,l.ActionEvent.CreateNewFromSprite(this._pointerOverSprite,this)))},l.Scene.prototype.getPointerOverSprite=function(){return this._pointerOverSprite};var e=(function(){function e(e){this.name=l.SceneComponentConstants.NAME_SPRITE,this.scene=e,this.scene.spriteManagers=new Array,this.scene._tempSpritePickingRay=l.Ray?l.Ray.Zero():null,this.scene.onBeforeSpritesRenderingObservable=new l.Observable,this.scene.onAfterSpritesRenderingObservable=new l.Observable,this._spritePredicate=function(e){return!!e.actionManager&&(e.isPickable&&e.actionManager.hasPointerTriggers)}}return e.prototype.register=function(){this.scene._pointerMoveStage.registerStep(l.SceneComponentConstants.STEP_POINTERMOVE_SPRITE,this,this._pointerMove),this.scene._pointerDownStage.registerStep(l.SceneComponentConstants.STEP_POINTERDOWN_SPRITE,this,this._pointerDown),this.scene._pointerUpStage.registerStep(l.SceneComponentConstants.STEP_POINTERUP_SPRITE,this,this._pointerUp)},e.prototype.rebuild=function(){},e.prototype.dispose=function(){this.scene.onBeforeSpritesRenderingObservable.clear(),this.scene.onAfterSpritesRenderingObservable.clear();for(var e=this.scene.spriteManagers;e.length;)e[0].dispose()},e.prototype._pickSpriteButKeepRay=function(e,t,i,r,n){var o=this.scene.pickSprite(t,i,this._spritePredicate,r,n);return o&&(o.ray=e?e.ray:null),o},e.prototype._pointerMove=function(e,t,i,r,n){var o=this.scene;return r?o.setPointerOverSprite(null):(i=this._pickSpriteButKeepRay(i,e,t,!1,o.cameraToUseForPointers||void 0))&&i.hit&&i.pickedSprite?(o.setPointerOverSprite(i.pickedSprite),o._pointerOverSprite&&o._pointerOverSprite.actionManager&&o._pointerOverSprite.actionManager.hoverCursor?n.style.cursor=o._pointerOverSprite.actionManager.hoverCursor:n.style.cursor=o.hoverCursor):o.setPointerOverSprite(null),i},e.prototype._pointerDown=function(e,t,i,r){var n=this.scene;if(n._pickedDownSprite=null,0<n.spriteManagers.length&&(i=n.pickSprite(e,t,this._spritePredicate,!1,n.cameraToUseForPointers||void 0))&&i.hit&&i.pickedSprite&&i.pickedSprite.actionManager){switch(n._pickedDownSprite=i.pickedSprite,r.button){case 0:i.pickedSprite.actionManager.processTrigger(l.ActionManager.OnLeftPickTrigger,l.ActionEvent.CreateNewFromSprite(i.pickedSprite,n,r));break;case 1:i.pickedSprite.actionManager.processTrigger(l.ActionManager.OnCenterPickTrigger,l.ActionEvent.CreateNewFromSprite(i.pickedSprite,n,r));break;case 2:i.pickedSprite.actionManager.processTrigger(l.ActionManager.OnRightPickTrigger,l.ActionEvent.CreateNewFromSprite(i.pickedSprite,n,r))}i.pickedSprite.actionManager&&i.pickedSprite.actionManager.processTrigger(l.ActionManager.OnPickDownTrigger,l.ActionEvent.CreateNewFromSprite(i.pickedSprite,n,r))}return i},e.prototype._pointerUp=function(e,t,i,r){var n=this.scene;if(0<n.spriteManagers.length){var o=n.pickSprite(e,t,this._spritePredicate,!1,n.cameraToUseForPointers||void 0);o&&(o.hit&&o.pickedSprite&&o.pickedSprite.actionManager&&(o.pickedSprite.actionManager.processTrigger(l.ActionManager.OnPickUpTrigger,l.ActionEvent.CreateNewFromSprite(o.pickedSprite,n,r)),o.pickedSprite.actionManager&&(this.scene._isPointerSwiping()||o.pickedSprite.actionManager.processTrigger(l.ActionManager.OnPickTrigger,l.ActionEvent.CreateNewFromSprite(o.pickedSprite,n,r)))),n._pickedDownSprite&&n._pickedDownSprite.actionManager&&n._pickedDownSprite!==o.pickedSprite&&n._pickedDownSprite.actionManager.processTrigger(l.ActionManager.OnPickOutTrigger,l.ActionEvent.CreateNewFromSprite(n._pickedDownSprite,n,r)))}return i},e})();l.SpriteSceneComponent=e})($a||($a={})),(function(_){var e=function(e,t,i){this.bu=e,this.bv=t,this.distance=i,this.faceId=0,this.subMeshId=0};_.IntersectionInfo=e;var t=(function(){function e(){this.hit=!1,this.distance=0,this.pickedPoint=null,this.pickedMesh=null,this.bu=0,this.bv=0,this.faceId=-1,this.subMeshId=0,this.pickedSprite=null,this.originMesh=null,this.ray=null}return e.prototype.getNormal=function(e,t){if(void 0===e&&(e=!1),void 0===t&&(t=!0),!this.pickedMesh||!this.pickedMesh.isVerticesDataPresent(_.VertexBuffer.NormalKind))return null;var i,r=this.pickedMesh.getIndices();if(!r)return null;if(t){var n=this.pickedMesh.getVerticesData(_.VertexBuffer.NormalKind),o=_.Vector3.FromArray(n,3*r[3*this.faceId]),s=_.Vector3.FromArray(n,3*r[3*this.faceId+1]),a=_.Vector3.FromArray(n,3*r[3*this.faceId+2]);o=o.scale(this.bu),s=s.scale(this.bv),a=a.scale(1-this.bu-this.bv),i=new _.Vector3(o.x+s.x+a.x,o.y+s.y+a.y,o.z+s.z+a.z)}else{var l=this.pickedMesh.getVerticesData(_.VertexBuffer.PositionKind),c=_.Vector3.FromArray(l,3*r[3*this.faceId]),h=_.Vector3.FromArray(l,3*r[3*this.faceId+1]),u=_.Vector3.FromArray(l,3*r[3*this.faceId+2]),d=c.subtract(h),f=u.subtract(h);i=_.Vector3.Cross(d,f)}if(e){var p=this.pickedMesh.getWorldMatrix();this.pickedMesh.nonUniformScaling&&(_.Tmp.Matrix[0].copyFrom(p),(p=_.Tmp.Matrix[0]).setTranslationFromFloats(0,0,0),p.invert(),p.transposeToRef(_.Tmp.Matrix[1]),p=_.Tmp.Matrix[1]),i=_.Vector3.TransformNormal(i,p)}return i.normalize(),i},e.prototype.getTextureCoordinates=function(){if(!this.pickedMesh||!this.pickedMesh.isVerticesDataPresent(_.VertexBuffer.UVKind))return null;var e=this.pickedMesh.getIndices();if(!e)return null;var t=this.pickedMesh.getVerticesData(_.VertexBuffer.UVKind);if(!t)return null;var i=_.Vector2.FromArray(t,2*e[3*this.faceId]),r=_.Vector2.FromArray(t,2*e[3*this.faceId+1]),n=_.Vector2.FromArray(t,2*e[3*this.faceId+2]);return i=i.scale(1-this.bu-this.bv),r=r.scale(this.bu),n=n.scale(this.bv),new _.Vector2(i.x+r.x+n.x,i.y+r.y+n.y)},e})();_.PickingInfo=t})($a||($a={})),ft=$a||($a={}),pt=(function(){function T(e,t,i){void 0===i&&(i=Number.MAX_VALUE),this.origin=e,this.direction=t,this.length=i}return T.prototype.intersectsBoxMinMax=function(e,t){var i,r,n,o,s=0,a=Number.MAX_VALUE;if(Math.abs(this.direction.x)<1e-7){if(this.origin.x<e.x||this.origin.x>t.x)return!1}else if(i=1/this.direction.x,r=(e.x-this.origin.x)*i,(n=(t.x-this.origin.x)*i)===-1/0&&(n=1/0),n<r&&(o=r,r=n,n=o),s=Math.max(r,s),(a=Math.min(n,a))<s)return!1;if(Math.abs(this.direction.y)<1e-7){if(this.origin.y<e.y||this.origin.y>t.y)return!1}else if(i=1/this.direction.y,r=(e.y-this.origin.y)*i,(n=(t.y-this.origin.y)*i)===-1/0&&(n=1/0),n<r&&(o=r,r=n,n=o),s=Math.max(r,s),(a=Math.min(n,a))<s)return!1;if(Math.abs(this.direction.z)<1e-7){if(this.origin.z<e.z||this.origin.z>t.z)return!1}else if(i=1/this.direction.z,r=(e.z-this.origin.z)*i,(n=(t.z-this.origin.z)*i)===-1/0&&(n=1/0),n<r&&(o=r,r=n,n=o),s=Math.max(r,s),(a=Math.min(n,a))<s)return!1;return!0},T.prototype.intersectsBox=function(e){return this.intersectsBoxMinMax(e.minimum,e.maximum)},T.prototype.intersectsSphere=function(e){var t=e.center.x-this.origin.x,i=e.center.y-this.origin.y,r=e.center.z-this.origin.z,n=t*t+i*i+r*r,o=e.radius*e.radius;if(n<=o)return!0;var s=t*this.direction.x+i*this.direction.y+r*this.direction.z;return!(s<0)&&n-s*s<=o},T.prototype.intersectsTriangle=function(e,t,i){this._edge1||(this._edge1=ft.Vector3.Zero(),this._edge2=ft.Vector3.Zero(),this._pvec=ft.Vector3.Zero(),this._tvec=ft.Vector3.Zero(),this._qvec=ft.Vector3.Zero()),t.subtractToRef(e,this._edge1),i.subtractToRef(e,this._edge2),ft.Vector3.CrossToRef(this.direction,this._edge2,this._pvec);var r=ft.Vector3.Dot(this._edge1,this._pvec);if(0===r)return null;var n=1/r;this.origin.subtractToRef(e,this._tvec);var o=ft.Vector3.Dot(this._tvec,this._pvec)*n;if(o<0||1<o)return null;ft.Vector3.CrossToRef(this._tvec,this._edge1,this._qvec);var s=ft.Vector3.Dot(this.direction,this._qvec)*n;if(s<0||1<o+s)return null;var a=ft.Vector3.Dot(this._edge2,this._qvec)*n;return a>this.length?null:new ft.IntersectionInfo(o,s,a)},T.prototype.intersectsPlane=function(e){var t,i=ft.Vector3.Dot(e.normal,this.direction);if(Math.abs(i)<9.99999997475243e-7)return null;var r=ft.Vector3.Dot(e.normal,this.origin);return(t=(-e.d-r)/i)<0?t<-9.99999997475243e-7?null:0:t},T.prototype.intersectsMesh=function(e,t){var i=ft.Tmp.Matrix[0];return e.getWorldMatrix().invertToRef(i),this._tmpRay?T.TransformToRef(this,i,this._tmpRay):this._tmpRay=T.Transform(this,i),e.intersects(this._tmpRay,t)},T.prototype.intersectsMeshes=function(e,t,i){i?i.length=0:i=[];for(var r=0;r<e.length;r++){var n=this.intersectsMesh(e[r],t);n.hit&&i.push(n)}return i.sort(this._comparePickingInfo),i},T.prototype._comparePickingInfo=function(e,t){return e.distance<t.distance?-1:e.distance>t.distance?1:0},T.prototype.intersectionSegment=function(e,t,i){var r,n,o,s,a=this.origin.add(this.direction.multiplyByFloats(T.rayl,T.rayl,T.rayl)),l=t.subtract(e),c=a.subtract(this.origin),h=e.subtract(this.origin),u=ft.Vector3.Dot(l,l),d=ft.Vector3.Dot(l,c),f=ft.Vector3.Dot(c,c),p=ft.Vector3.Dot(l,h),_=ft.Vector3.Dot(c,h),m=u*f-d*d,g=m,v=m;m<T.smallnum?(n=0,g=1,s=_,v=f):(s=u*_-d*p,(n=d*_-f*p)<0?(n=0,s=_,v=f):g<n&&(n=g,s=_+d,v=f)),s<0?-p<(s=0)?n=0:u<-p?n=g:(n=-p,g=u):v<s&&(s=v,-p+d<0?n=0:u<-p+d?n=g:(n=-p+d,g=u)),r=Math.abs(n)<T.smallnum?0:n/g,o=Math.abs(s)<T.smallnum?0:s/v;var y=c.multiplyByFloats(o,o,o),b=h.add(l.multiplyByFloats(r,r,r)).subtract(y);return 0<o&&o<=this.length&&b.lengthSquared()<i*i?y.length():-1},T.prototype.update=function(e,t,i,r,n,o,s){return ft.Vector3.UnprojectFloatsToRef(e,t,0,i,r,n,o,s,this.origin),ft.Vector3.UnprojectFloatsToRef(e,t,1,i,r,n,o,s,ft.Tmp.Vector3[0]),ft.Tmp.Vector3[0].subtractToRef(this.origin,this.direction),this.direction.normalize(),this},T.Zero=function(){return new T(ft.Vector3.Zero(),ft.Vector3.Zero())},T.CreateNew=function(e,t,i,r,n,o,s){return T.Zero().update(e,t,i,r,n,o,s)},T.CreateNewFromTo=function(e,t,i){void 0===i&&(i=ft.Matrix.Identity());var r=t.subtract(e),n=Math.sqrt(r.x*r.x+r.y*r.y+r.z*r.z);return r.normalize(),T.Transform(new T(e,r,n),i)},T.Transform=function(e,t){var i=new T(new ft.Vector3(0,0,0),new ft.Vector3(0,0,0));return T.TransformToRef(e,t,i),i},T.TransformToRef=function(e,t,i){ft.Vector3.TransformCoordinatesToRef(e.origin,t,i.origin),ft.Vector3.TransformNormalToRef(e.direction,t,i.direction),i.length=e.length;var r=i.direction,n=r.length();if(0!==n&&1!==n){var o=1/n;r.x*=o,r.y*=o,r.z*=o,i.length*=n}},T.smallnum=1e-8,T.rayl=1e9,T})(),ft.Ray=pt,_t=$a||($a={}),mt={root:0,found:!1},gt=function(e,t,i,r){mt.root=0,mt.found=!1;var n=t*t-4*e*i;if(n<0)return mt;var o=Math.sqrt(n),s=(-t-o)/(2*e),a=(-t+o)/(2*e);if(a<s){var l=a;a=s,s=l}return 0<s&&s<r?(mt.root=s,mt.found=!0):0<a&&a<r&&(mt.root=a,mt.found=!0),mt},vt=(function(){function e(){this._collisionPoint=_t.Vector3.Zero(),this._planeIntersectionPoint=_t.Vector3.Zero(),this._tempVector=_t.Vector3.Zero(),this._tempVector2=_t.Vector3.Zero(),this._tempVector3=_t.Vector3.Zero(),this._tempVector4=_t.Vector3.Zero(),this._edge=_t.Vector3.Zero(),this._baseToVertex=_t.Vector3.Zero(),this._destinationPoint=_t.Vector3.Zero(),this._slidePlaneNormal=_t.Vector3.Zero(),this._displacementVector=_t.Vector3.Zero(),this._radius=_t.Vector3.One(),this._retry=0,this._basePointWorld=_t.Vector3.Zero(),this._velocityWorld=_t.Vector3.Zero(),this._normalizedVelocity=_t.Vector3.Zero(),this._collisionMask=-1}return Object.defineProperty(e.prototype,\"collisionMask\",{get:function(){return this._collisionMask},set:function(e){this._collisionMask=isNaN(e)?-1:e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,\"slidePlaneNormal\",{get:function(){return this._slidePlaneNormal},enumerable:!0,configurable:!0}),e.prototype._initialize=function(e,t,i){this._velocity=t,_t.Vector3.NormalizeToRef(t,this._normalizedVelocity),(this._basePoint=e).multiplyToRef(this._radius,this._basePointWorld),t.multiplyToRef(this._radius,this._velocityWorld),this._velocityWorldLength=this._velocityWorld.length(),this._epsilon=i,this.collisionFound=!1},e.prototype._checkPointInTriangle=function(e,t,i,r,n){t.subtractToRef(e,this._tempVector),i.subtractToRef(e,this._tempVector2),_t.Vector3.CrossToRef(this._tempVector,this._tempVector2,this._tempVector4);var o=_t.Vector3.Dot(this._tempVector4,n);return!(o<0)&&(r.subtractToRef(e,this._tempVector3),_t.Vector3.CrossToRef(this._tempVector2,this._tempVector3,this._tempVector4),!((o=_t.Vector3.Dot(this._tempVector4,n))<0)&&(_t.Vector3.CrossToRef(this._tempVector3,this._tempVector,this._tempVector4),0<=(o=_t.Vector3.Dot(this._tempVector4,n))))},e.prototype._canDoCollision=function(e,t,i,r){var n,o,s,a,l=_t.Vector3.Distance(this._basePointWorld,e),c=Math.max(this._radius.x,this._radius.y,this._radius.z);return!(l>this._velocityWorldLength+c+t)&&(n=i,o=r,s=this._basePointWorld,a=this._velocityWorldLength+c,!(n.x>s.x+a||s.x-a>o.x||n.y>s.y+a||s.y-a>o.y||n.z>s.z+a||s.z-a>o.z))},e.prototype._testTriangle=function(e,t,i,r,n,o){var s,a=!1;t||(t=[]),t[e]||(t[e]=new _t.Plane(0,0,0,0),t[e].copyFromPoints(i,r,n));var l=t[e];if(o||l.isFrontFacingTo(this._normalizedVelocity,0)){var c=l.signedDistanceTo(this._basePoint),h=_t.Vector3.Dot(l.normal,this._velocity);if(0==h){if(1<=Math.abs(c))return;a=!0,s=0}else{var u=(1-c)/h;if(u<(s=(-1-c)/h)){var d=u;u=s,s=d}if(1<s||u<0)return;s<0&&(s=0),1<s&&(s=1)}this._collisionPoint.copyFromFloats(0,0,0);var f=!1,p=1;if(a||(this._basePoint.subtractToRef(l.normal,this._planeIntersectionPoint),this._velocity.scaleToRef(s,this._tempVector),this._planeIntersectionPoint.addInPlace(this._tempVector),this._checkPointInTriangle(this._planeIntersectionPoint,i,r,n,l.normal)&&(f=!0,p=s,this._collisionPoint.copyFrom(this._planeIntersectionPoint))),!f){var _=this._velocity.lengthSquared(),m=_;this._basePoint.subtractToRef(i,this._tempVector);var g=2*_t.Vector3.Dot(this._velocity,this._tempVector),v=this._tempVector.lengthSquared()-1,y=gt(m,g,v,p);y.found&&(p=y.root,f=!0,this._collisionPoint.copyFrom(i)),this._basePoint.subtractToRef(r,this._tempVector),g=2*_t.Vector3.Dot(this._velocity,this._tempVector),v=this._tempVector.lengthSquared()-1,(y=gt(m,g,v,p)).found&&(p=y.root,f=!0,this._collisionPoint.copyFrom(r)),this._basePoint.subtractToRef(n,this._tempVector),g=2*_t.Vector3.Dot(this._velocity,this._tempVector),v=this._tempVector.lengthSquared()-1,(y=gt(m,g,v,p)).found&&(p=y.root,f=!0,this._collisionPoint.copyFrom(n)),r.subtractToRef(i,this._edge),i.subtractToRef(this._basePoint,this._baseToVertex);var b=this._edge.lengthSquared(),T=_t.Vector3.Dot(this._edge,this._velocity),E=_t.Vector3.Dot(this._edge,this._baseToVertex);if(m=b*-_+T*T,g=b*(2*_t.Vector3.Dot(this._velocity,this._baseToVertex))-2*T*E,v=b*(1-this._baseToVertex.lengthSquared())+E*E,(y=gt(m,g,v,p)).found){var x=(T*y.root-E)/b;0<=x&&x<=1&&(p=y.root,f=!0,this._edge.scaleInPlace(x),i.addToRef(this._edge,this._collisionPoint))}n.subtractToRef(r,this._edge),r.subtractToRef(this._basePoint,this._baseToVertex),b=this._edge.lengthSquared(),T=_t.Vector3.Dot(this._edge,this._velocity),E=_t.Vector3.Dot(this._edge,this._baseToVertex),m=b*-_+T*T,g=b*(2*_t.Vector3.Dot(this._velocity,this._baseToVertex))-2*T*E,v=b*(1-this._baseToVertex.lengthSquared())+E*E,(y=gt(m,g,v,p)).found&&0<=(x=(T*y.root-E)/b)&&x<=1&&(p=y.root,f=!0,this._edge.scaleInPlace(x),r.addToRef(this._edge,this._collisionPoint)),i.subtractToRef(n,this._edge),n.subtractToRef(this._basePoint,this._baseToVertex),b=this._edge.lengthSquared(),T=_t.Vector3.Dot(this._edge,this._velocity),E=_t.Vector3.Dot(this._edge,this._baseToVertex),m=b*-_+T*T,g=b*(2*_t.Vector3.Dot(this._velocity,this._baseToVertex))-2*T*E,v=b*(1-this._baseToVertex.lengthSquared())+E*E,(y=gt(m,g,v,p)).found&&0<=(x=(T*y.root-E)/b)&&x<=1&&(p=y.root,f=!0,this._edge.scaleInPlace(x),n.addToRef(this._edge,this._collisionPoint))}if(f){var P=p*this._velocity.length();(!this.collisionFound||P<this._nearestDistance)&&(this.intersectionPoint?this.intersectionPoint.copyFrom(this._collisionPoint):this.intersectionPoint=this._collisionPoint.clone(),this._nearestDistance=P,this.collisionFound=!0)}}},e.prototype._collide=function(e,t,i,r,n,o,s){for(var a=r;a<n;a+=3){var l=t[i[a]-o],c=t[i[a+1]-o],h=t[i[a+2]-o];this._testTriangle(a,e,h,c,l,s)}},e.prototype._getResponse=function(e,t){e.addToRef(t,this._destinationPoint),t.scaleInPlace(this._nearestDistance/t.length()),this._basePoint.addToRef(t,e),e.subtractToRef(this.intersectionPoint,this._slidePlaneNormal),this._slidePlaneNormal.normalize(),this._slidePlaneNormal.scaleToRef(this._epsilon,this._displacementVector),e.addInPlace(this._displacementVector),this.intersectionPoint.addInPlace(this._displacementVector),this._slidePlaneNormal.scaleInPlace(_t.Plane.SignedDistanceToPlaneFromPositionAndNormal(this.intersectionPoint,this._slidePlaneNormal,this._destinationPoint)),this._destinationPoint.subtractInPlace(this._slidePlaneNormal),this._destinationPoint.subtractToRef(this.intersectionPoint,t)},e})(),_t.Collider=vt,(function(h){var l,e,s,t;h.CollisionWorker=\"\",(e=l=h.WorkerTaskType||(h.WorkerTaskType={}))[e.INIT=0]=\"INIT\",e[e.UPDATE=1]=\"UPDATE\",e[e.COLLIDE=2]=\"COLLIDE\",(t=s=h.WorkerReplyType||(h.WorkerReplyType={}))[t.SUCCESS=0]=\"SUCCESS\",t[t.UNKNOWN_ERROR=1]=\"UNKNOWN_ERROR\";var i=(function(){function t(){var o=this;this._scaledPosition=h.Vector3.Zero(),this._scaledVelocity=h.Vector3.Zero(),this.onMeshUpdated=function(e){o._addUpdateMeshesList[e.uniqueId]=t.SerializeMesh(e)},this.onGeometryUpdated=function(e){o._addUpdateGeometriesList[e.id]=t.SerializeGeometry(e)},this._afterRender=function(){if(o._init&&!(0==o._toRemoveGeometryArray.length&&0==o._toRemoveMeshesArray.length&&0==Object.keys(o._addUpdateGeometriesList).length&&0==Object.keys(o._addUpdateMeshesList).length||4<o._runningUpdated)){++o._runningUpdated;var e={updatedMeshes:o._addUpdateMeshesList,updatedGeometries:o._addUpdateGeometriesList,removedGeometries:o._toRemoveGeometryArray,removedMeshes:o._toRemoveMeshesArray},t={payload:e,taskType:l.UPDATE},i=[];for(var r in e.updatedGeometries)e.updatedGeometries.hasOwnProperty(r)&&(i.push(t.payload.updatedGeometries[r].indices.buffer),i.push(t.payload.updatedGeometries[r].normals.buffer),i.push(t.payload.updatedGeometries[r].positions.buffer));o._worker.postMessage(t,i),o._addUpdateMeshesList={},o._addUpdateGeometriesList={},o._toRemoveGeometryArray=[],o._toRemoveMeshesArray=[]}},this._onMessageFromWorker=function(e){var t=e.data;if(t.error==s.SUCCESS)switch(t.taskType){case l.INIT:o._init=!0,o._scene.meshes.forEach((function(e){o.onMeshAdded(e)})),o._scene.getGeometries().forEach((function(e){o.onGeometryAdded(e)}));break;case l.UPDATE:o._runningUpdated--;break;case l.COLLIDE:var i=t.payload;if(!o._collisionsCallbackArray[i.collisionId])return;var r=o._collisionsCallbackArray[i.collisionId];if(r){var n=o._scene.getMeshByUniqueID(i.collidedMeshUniqueId);n&&r(i.collisionId,h.Vector3.FromArray(i.newPosition),n)}o._collisionsCallbackArray[i.collisionId]=null}else h.Tools.Warn(\"error returned from worker!\")},this._collisionsCallbackArray=[],this._init=!1,this._runningUpdated=0,this._addUpdateMeshesList={},this._addUpdateGeometriesList={},this._toRemoveGeometryArray=[],this._toRemoveMeshesArray=[]}return t.prototype.getNewPosition=function(e,t,i,r,n,o,s){if(this._init&&!this._collisionsCallbackArray[s]&&!this._collisionsCallbackArray[s+1e5]){e.divideToRef(i._radius,this._scaledPosition),t.divideToRef(i._radius,this._scaledVelocity),this._collisionsCallbackArray[s]=o;var a={payload:{collider:{position:this._scaledPosition.asArray(),velocity:this._scaledVelocity.asArray(),radius:i._radius.asArray()},collisionId:s,excludedMeshUniqueId:n?n.uniqueId:null,maximumRetry:r},taskType:l.COLLIDE};this._worker.postMessage(a)}},t.prototype.init=function(e){this._scene=e,this._scene.registerAfterRender(this._afterRender);var t=h.WorkerIncluded?h.Engine.CodeRepository+\"Collisions/babylon.collisionWorker.js\":URL.createObjectURL(new Blob([h.CollisionWorker],{type:\"application/javascript\"}));this._worker=new Worker(t),this._worker.onmessage=this._onMessageFromWorker;var i={payload:{},taskType:l.INIT};this._worker.postMessage(i)},t.prototype.destroy=function(){this._scene.unregisterAfterRender(this._afterRender),this._worker.terminate()},t.prototype.onMeshAdded=function(e){e.registerAfterWorldMatrixUpdate(this.onMeshUpdated),this.onMeshUpdated(e)},t.prototype.onMeshRemoved=function(e){this._toRemoveMeshesArray.push(e.uniqueId)},t.prototype.onGeometryAdded=function(e){e.onGeometryUpdated=this.onGeometryUpdated,this.onGeometryUpdated(e)},t.prototype.onGeometryDeleted=function(e){this._toRemoveGeometryArray.push(e.id)},t.SerializeMesh=function(e){var t=[];e.subMeshes&&(t=e.subMeshes.map((function(e,t){var i=e.getBoundingInfo();return{position:t,verticesStart:e.verticesStart,verticesCount:e.verticesCount,indexStart:e.indexStart,indexCount:e.indexCount,hasMaterial:!!e.getMaterial(),sphereCenter:i.boundingSphere.centerWorld.asArray(),sphereRadius:i.boundingSphere.radiusWorld,boxMinimum:i.boundingBox.minimumWorld.asArray(),boxMaximum:i.boundingBox.maximumWorld.asArray()}})));var i=null;if(e instanceof h.Mesh)i=(r=e.geometry)?r.id:null;else if(e instanceof h.InstancedMesh){var r;i=(r=e.sourceMesh&&e.sourceMesh.geometry)?r.id:null}var n=e.getBoundingInfo();return{uniqueId:e.uniqueId,id:e.id,name:e.name,geometryId:i,sphereCenter:n.boundingSphere.centerWorld.asArray(),sphereRadius:n.boundingSphere.radiusWorld,boxMinimum:n.boundingBox.minimumWorld.asArray(),boxMaximum:n.boundingBox.maximumWorld.asArray(),worldMatrixFromCache:e.worldMatrixFromCache.asArray(),subMeshes:t,checkCollisions:e.checkCollisions}},t.SerializeGeometry=function(e){return{id:e.id,positions:new Float32Array(e.getVerticesData(h.VertexBuffer.PositionKind)||[]),normals:new Float32Array(e.getVerticesData(h.VertexBuffer.NormalKind)||[]),indices:new Uint32Array(e.getIndices()||[])}},t})();h.CollisionCoordinatorWorker=i;var r=(function(){function e(){this._scaledPosition=h.Vector3.Zero(),this._scaledVelocity=h.Vector3.Zero(),this._finalPosition=h.Vector3.Zero()}return e.prototype.getNewPosition=function(e,t,i,r,n,o,s){e.divideToRef(i._radius,this._scaledPosition),t.divideToRef(i._radius,this._scaledVelocity),i.collidedMesh=null,i._retry=0,i._initialVelocity=this._scaledVelocity,i._initialPosition=this._scaledPosition,this._collideWithWorld(this._scaledPosition,this._scaledVelocity,i,r,this._finalPosition,n),this._finalPosition.multiplyInPlace(i._radius),o(s,this._finalPosition,i.collidedMesh)},e.prototype.init=function(e){this._scene=e},e.prototype.destroy=function(){},e.prototype.onMeshAdded=function(e){},e.prototype.onMeshUpdated=function(e){},e.prototype.onMeshRemoved=function(e){},e.prototype.onGeometryAdded=function(e){},e.prototype.onGeometryUpdated=function(e){},e.prototype.onGeometryDeleted=function(e){},e.prototype._collideWithWorld=function(e,t,i,r,n,o){void 0===o&&(o=null);var s=10*h.Engine.CollisionsEpsilon;if(i._retry>=r)n.copyFrom(e);else{var a=o?o.collisionMask:i.collisionMask;i._initialize(e,t,s);for(var l=0;l<this._scene.meshes.length;l++){var c=this._scene.meshes[l];c.isEnabled()&&c.checkCollisions&&c.subMeshes&&c!==o&&0!=(a&c.collisionGroup)&&c._checkCollision(i)}i.collisionFound?(0===t.x&&0===t.y&&0===t.z||i._getResponse(e,t),t.length()<=s?n.copyFrom(e):(i._retry++,this._collideWithWorld(e,t,i,r,n,o))):e.addToRef(t,n)}},e})();h.CollisionCoordinatorLegacy=r})($a||($a={})),yt=$a||($a={}),bt=(function(){function t(e){this.particleSystem=e,this.position=yt.Vector3.Zero(),this.direction=yt.Vector3.Zero(),this.color=new yt.Color4(0,0,0,0),this.colorStep=new yt.Color4(0,0,0,0),this.lifeTime=1,this.age=0,this.size=0,this.scale=new yt.Vector2(1,1),this.angle=0,this.angularSpeed=0,this.cellIndex=0,this._attachedSubEmitters=null,this._currentColor1=new yt.Color4(0,0,0,0),this._currentColor2=new yt.Color4(0,0,0,0),this._currentSize1=0,this._currentSize2=0,this._currentAngularSpeed1=0,this._currentAngularSpeed2=0,this._currentVelocity1=0,this._currentVelocity2=0,this._currentLimitVelocity1=0,this._currentLimitVelocity2=0,this._currentDrag1=0,this._currentDrag2=0,this.id=t._Count++,this.particleSystem.isAnimationSheetEnabled&&this.updateCellInfoFromSystem()}return t.prototype.updateCellInfoFromSystem=function(){this.cellIndex=this.particleSystem.startSpriteCellID},t.prototype.updateCellIndex=function(){var e=this.age,t=this.particleSystem.spriteCellChangeSpeed;this.particleSystem.spriteRandomStartCell&&(void 0===this._randomCellOffset&&(this._randomCellOffset=Math.random()*this.lifeTime),0===t?(t=1,e=this._randomCellOffset):e+=this._randomCellOffset);var i=this._initialEndSpriteCellID-this._initialStartSpriteCellID,r=yt.Scalar.Clamp(e*t%this.lifeTime/this.lifeTime);this.cellIndex=this._initialStartSpriteCellID+r*i|0},t.prototype._inheritParticleInfoToSubEmitter=function(e){if(e.particleSystem.emitter.position){var t=e.particleSystem.emitter;t.position.copyFrom(this.position),e.inheritDirection&&(t.position.subtractToRef(this.direction,yt.Tmp.Vector3[0]),t.lookAt(yt.Tmp.Vector3[0],0,Math.PI/2))}else{e.particleSystem.emitter.copyFrom(this.position)}this.direction.scaleToRef(e.inheritedVelocityAmount/2,yt.Tmp.Vector3[0]),e.particleSystem._inheritedVelocityOffset.copyFrom(yt.Tmp.Vector3[0])},t.prototype._inheritParticleInfoToSubEmitters=function(){var t=this;this._attachedSubEmitters&&0<this._attachedSubEmitters.length&&this._attachedSubEmitters.forEach((function(e){t._inheritParticleInfoToSubEmitter(e)}))},t.prototype._reset=function(){this.age=0,this._currentColorGradient=null,this._currentSizeGradient=null,this._currentAngularSpeedGradient=null,this._currentVelocityGradient=null,this._currentLimitVelocityGradient=null,this._currentDragGradient=null,this.cellIndex=this.particleSystem.startSpriteCellID,this._randomCellOffset=void 0},t.prototype.copyTo=function(e){e.position.copyFrom(this.position),this._initialDirection?e._initialDirection?e._initialDirection.copyFrom(this._initialDirection):e._initialDirection=this._initialDirection.clone():e._initialDirection=null,e.direction.copyFrom(this.direction),e.color.copyFrom(this.color),e.colorStep.copyFrom(this.colorStep),e.lifeTime=this.lifeTime,e.age=this.age,e._randomCellOffset=this._randomCellOffset,e.size=this.size,e.scale.copyFrom(this.scale),e.angle=this.angle,e.angularSpeed=this.angularSpeed,e.particleSystem=this.particleSystem,e.cellIndex=this.cellIndex,e.id=this.id,e._attachedSubEmitters=this._attachedSubEmitters,this._currentColorGradient&&(e._currentColorGradient=this._currentColorGradient,e._currentColor1.copyFrom(this._currentColor1),e._currentColor2.copyFrom(this._currentColor2)),this._currentSizeGradient&&(e._currentSizeGradient=this._currentSizeGradient,e._currentSize1=this._currentSize1,e._currentSize2=this._currentSize2),this._currentAngularSpeedGradient&&(e._currentAngularSpeedGradient=this._currentAngularSpeedGradient,e._currentAngularSpeed1=this._currentAngularSpeed1,e._currentAngularSpeed2=this._currentAngularSpeed2),this._currentVelocityGradient&&(e._currentVelocityGradient=this._currentVelocityGradient,e._currentVelocity1=this._currentVelocity1,e._currentVelocity2=this._currentVelocity2),this._currentLimitVelocityGradient&&(e._currentLimitVelocityGradient=this._currentLimitVelocityGradient,e._currentLimitVelocity1=this._currentLimitVelocity1,e._currentLimitVelocity2=this._currentLimitVelocity2),this._currentDragGradient&&(e._currentDragGradient=this._currentDragGradient,e._currentDrag1=this._currentDrag1,e._currentDrag2=this._currentDrag2),this.particleSystem.isAnimationSheetEnabled&&(e._initialStartSpriteCellID=this._initialStartSpriteCellID,e._initialEndSpriteCellID=this._initialEndSpriteCellID),this.particleSystem.useRampGradients&&e.remapData.copyFrom(this.remapData),this._randomNoiseCoordinates1&&(e._randomNoiseCoordinates1?(e._randomNoiseCoordinates1.copyFrom(this._randomNoiseCoordinates1),e._randomNoiseCoordinates2.copyFrom(this._randomNoiseCoordinates2)):(e._randomNoiseCoordinates1=this._randomNoiseCoordinates1.clone(),e._randomNoiseCoordinates2=this._randomNoiseCoordinates2.clone()))},t._Count=0,t})(),yt.Particle=bt,Tt=$a||($a={}),Et=(function(){function e(e){this.animations=[],this.renderingGroupId=0,this.emitter=null,this.emitRate=10,this.manualEmitCount=-1,this.updateSpeed=.01,this.targetStopDuration=0,this.disposeOnStop=!1,this.minEmitPower=1,this.maxEmitPower=1,this.minLifeTime=1,this.maxLifeTime=1,this.minSize=1,this.maxSize=1,this.minScaleX=1,this.maxScaleX=1,this.minScaleY=1,this.maxScaleY=1,this.minInitialRotation=0,this.maxInitialRotation=0,this.minAngularSpeed=0,this.maxAngularSpeed=0,this.layerMask=268435455,this.customShader=null,this.preventAutoStart=!1,this.noiseStrength=new Tt.Vector3(10,10,10),this.onAnimationEnd=null,this.blendMode=Tt.ParticleSystem.BLENDMODE_ONEONE,this.forceDepthWrite=!1,this.preWarmCycles=0,this.preWarmStepOffset=1,this.spriteCellChangeSpeed=1,this.startSpriteCellID=0,this.endSpriteCellID=0,this.spriteCellWidth=0,this.spriteCellHeight=0,this.spriteRandomStartCell=!1,this.translationPivot=new Tt.Vector2(0,0),this.beginAnimationOnStart=!1,this.beginAnimationFrom=0,this.beginAnimationTo=60,this.beginAnimationLoop=!1,this.gravity=Tt.Vector3.Zero(),this._colorGradients=null,this._sizeGradients=null,this._lifeTimeGradients=null,this._angularSpeedGradients=null,this._velocityGradients=null,this._limitVelocityGradients=null,this._dragGradients=null,this._emitRateGradients=null,this._startSizeGradients=null,this._rampGradients=null,this._colorRemapGradients=null,this._alphaRemapGradients=null,this.startDelay=0,this.limitVelocityDamping=.4,this.color1=new Tt.Color4(1,1,1,1),this.color2=new Tt.Color4(1,1,1,1),this.colorDead=new Tt.Color4(0,0,0,1),this.textureMask=new Tt.Color4(1,1,1,1),this._isSubEmitter=!1,this.billboardMode=Tt.ParticleSystem.BILLBOARDMODE_ALL,this._isBillboardBased=!0,this._imageProcessingConfigurationDefines=new Tt.ImageProcessingConfigurationDefines,this.id=e,this.name=e}return Object.defineProperty(e.prototype,\"isAnimationSheetEnabled\",{get:function(){return this._isAnimationSheetEnabled},set:function(e){this._isAnimationSheetEnabled!=e&&(this._isAnimationSheetEnabled=e,this._reset())},enumerable:!0,configurable:!0}),e.prototype.getScene=function(){return this._scene},e.prototype._hasTargetStopDurationDependantGradient=function(){return this._startSizeGradients&&0<this._startSizeGradients.length||this._emitRateGradients&&0<this._emitRateGradients.length||this._lifeTimeGradients&&0<this._lifeTimeGradients.length},e.prototype.getDragGradients=function(){return this._dragGradients},e.prototype.getLimitVelocityGradients=function(){return this._limitVelocityGradients},e.prototype.getColorGradients=function(){return this._colorGradients},e.prototype.getSizeGradients=function(){return this._sizeGradients},e.prototype.getColorRemapGradients=function(){return this._colorRemapGradients},e.prototype.getAlphaRemapGradients=function(){return this._alphaRemapGradients},e.prototype.getLifeTimeGradients=function(){return this._lifeTimeGradients},e.prototype.getAngularSpeedGradients=function(){return this._angularSpeedGradients},e.prototype.getVelocityGradients=function(){return this._velocityGradients},e.prototype.getStartSizeGradients=function(){return this._startSizeGradients},e.prototype.getEmitRateGradients=function(){return this._emitRateGradients},Object.defineProperty(e.prototype,\"direction1\",{get:function(){return this.particleEmitterType.direction1?this.particleEmitterType.direction1:Tt.Vector3.Zero()},set:function(e){this.particleEmitterType.direction1&&(this.particleEmitterType.direction1=e)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,\"direction2\",{get:function(){return this.particleEmitterType.direction2?this.particleEmitterType.direction2:Tt.Vector3.Zero()},set:function(e){this.particleEmitterType.direction2&&(this.particleEmitterType.direction2=e)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,\"minEmitBox\",{get:function(){return this.particleEmitterType.minEmitBox?this.particleEmitterType.minEmitBox:Tt.Vector3.Zero()},set:function(e){this.particleEmitterType.minEmitBox&&(this.particleEmitterType.minEmitBox=e)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,\"maxEmitBox\",{get:function(){return this.particleEmitterType.maxEmitBox?this.particleEmitterType.maxEmitBox:Tt.Vector3.Zero()},set:function(e){this.particleEmitterType.maxEmitBox&&(this.particleEmitterType.maxEmitBox=e)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,\"isBillboardBased\",{get:function(){return this._isBillboardBased},set:function(e){this._isBillboardBased!==e&&(this._isBillboardBased=e,this._reset())},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,\"imageProcessingConfiguration\",{get:function(){return this._imageProcessingConfiguration},set:function(e){this._attachImageProcessingConfiguration(e)},enumerable:!0,configurable:!0}),e.prototype._attachImageProcessingConfiguration=function(e){e!==this._imageProcessingConfiguration&&(this._imageProcessingConfiguration=e||this._scene.imageProcessingConfiguration)},e.prototype._reset=function(){},e.prototype._removeGradientAndTexture=function(e,t,i){if(!t)return this;for(var r=0,n=0,o=t;n<o.length;n++){if(o[n].gradient===e){t.splice(r,1);break}r++}return i&&i.dispose(),this},e.prototype.createPointEmitter=function(e,t){var i=new Tt.PointParticleEmitter;return i.direction1=e,i.direction2=t,this.particleEmitterType=i},e.prototype.createHemisphericEmitter=function(e,t){void 0===e&&(e=1),void 0===t&&(t=1);var i=new Tt.HemisphericParticleEmitter(e,t);return this.particleEmitterType=i},e.prototype.createSphereEmitter=function(e,t){void 0===e&&(e=1),void 0===t&&(t=1);var i=new Tt.SphereParticleEmitter(e,t);return this.particleEmitterType=i},e.prototype.createDirectedSphereEmitter=function(e,t,i){void 0===e&&(e=1),void 0===t&&(t=new Tt.Vector3(0,1,0)),void 0===i&&(i=new Tt.Vector3(0,1,0));var r=new Tt.SphereDirectedParticleEmitter(e,t,i);return this.particleEmitterType=r},e.prototype.createCylinderEmitter=function(e,t,i,r){void 0===e&&(e=1),void 0===t&&(t=1),void 0===i&&(i=1),void 0===r&&(r=0);var n=new Tt.CylinderParticleEmitter(e,t,i,r);return this.particleEmitterType=n},e.prototype.createDirectedCylinderEmitter=function(e,t,i,r,n){void 0===e&&(e=1),void 0===t&&(t=1),void 0===i&&(i=1),void 0===r&&(r=new Tt.Vector3(0,1,0)),void 0===n&&(n=new Tt.Vector3(0,1,0));var o=new Tt.CylinderDirectedParticleEmitter(e,t,i,r,n);return this.particleEmitterType=o},e.prototype.createConeEmitter=function(e,t){void 0===e&&(e=1),void 0===t&&(t=Math.PI/4);var i=new Tt.ConeParticleEmitter(e,t);return this.particleEmitterType=i},e.prototype.createBoxEmitter=function(e,t,i,r){var n=new Tt.BoxParticleEmitter;return this.particleEmitterType=n,this.direction1=e,this.direction2=t,this.minEmitBox=i,this.maxEmitBox=r,n},e.BLENDMODE_ONEONE=0,e.BLENDMODE_STANDARD=1,e.BLENDMODE_ADD=2,e.BLENDMODE_MULTIPLY=3,e.BLENDMODE_MULTIPLYADD=4,e})(),Tt.BaseParticleSystem=Et,xt=$a||($a={}),Pt=(function(s){function _(e,t,i,r,n,o){void 0===r&&(r=null),void 0===n&&(n=!1),void 0===o&&(o=.01);var _=s.call(this,e)||this;return _._inheritedVelocityOffset=new xt.Vector3,_.onDisposeObservable=new xt.Observable,_._particles=new Array,_._stockParticles=new Array,_._newPartsExcess=0,_._vertexBuffers={},_._scaledColorStep=new xt.Color4(0,0,0,0),_._colorDiff=new xt.Color4(0,0,0,0),_._scaledDirection=xt.Vector3.Zero(),_._scaledGravity=xt.Vector3.Zero(),_._currentRenderId=-1,_._useInstancing=!1,_._started=!1,_._stopped=!1,_._actualFrame=0,_._currentEmitRate1=0,_._currentEmitRate2=0,_._currentStartSize1=0,_._currentStartSize2=0,_._rawTextureWidth=256,_._useRampGradients=!1,_._disposeEmitterOnDispose=!1,_.recycleParticle=function(e){var t=_._particles.pop();t!==e&&t.copyTo(e),_._stockParticles.push(t)},_._createParticle=function(){var i;if(0!==_._stockParticles.length?(i=_._stockParticles.pop())._reset():i=new xt.Particle(_),_._subEmitters&&0<_._subEmitters.length){var e=_._subEmitters[Math.floor(Math.random()*_._subEmitters.length)];i._attachedSubEmitters=[],e.forEach((function(e){if(e.type===xt.SubEmitterType.ATTACHED){var t=e.clone();i._attachedSubEmitters.push(t),t.particleSystem.start()}}))}return i},_._emitFromParticle=function(i){if(_._subEmitters&&0!==_._subEmitters.length){var e=Math.floor(Math.random()*_._subEmitters.length);_._subEmitters[e].forEach((function(e){if(e.type===xt.SubEmitterType.END){var t=e.clone();i._inheritParticleInfoToSubEmitter(t),(t.particleSystem._rootParticleSystem=_).activeSubSystems.push(t.particleSystem),t.particleSystem.start()}}))}},_._capacity=t,_._epsilon=o,_._isAnimationSheetEnabled=n,_._scene=i||xt.Engine.LastCreatedScene,_._attachImageProcessingConfiguration(null),_._customEffect=r,_._scene.particleSystems.push(_),_._useInstancing=_._scene.getEngine().getCaps().instancedArrays,_._createIndexBuffer(),_._createVertexBuffers(),_.particleEmitterType=new xt.BoxParticleEmitter,_.updateFunction=function(h){var u=null,d=null;_.noiseTexture&&(u=_.noiseTexture.getSize(),d=_.noiseTexture.getContent());for(var f,e=function(){f=h[p];var e=_._scaledUpdateSpeed,t=f.age;if(f.age+=e,f.age>f.lifeTime){var i=f.age-t;e=(f.lifeTime-t)*e/i,f.age=f.lifeTime}var r=f.age/f.lifeTime;_._colorGradients&&0<_._colorGradients.length?xt.Tools.GetCurrentGradient(r,_._colorGradients,(function(e,t,i){e!==f._currentColorGradient&&(f._currentColor1.copyFrom(f._currentColor2),t.getColorToRef(f._currentColor2),f._currentColorGradient=e),xt.Color4.LerpToRef(f._currentColor1,f._currentColor2,i,f.color)})):(f.colorStep.scaleToRef(e,_._scaledColorStep),f.color.addInPlace(_._scaledColorStep),f.color.a<0&&(f.color.a=0)),_._angularSpeedGradients&&0<_._angularSpeedGradients.length&&xt.Tools.GetCurrentGradient(r,_._angularSpeedGradients,(function(e,t,i){e!==f._currentAngularSpeedGradient&&(f._currentAngularSpeed1=f._currentAngularSpeed2,f._currentAngularSpeed2=t.getFactor(),f._currentAngularSpeedGradient=e),f.angularSpeed=xt.Scalar.Lerp(f._currentAngularSpeed1,f._currentAngularSpeed2,i)})),f.angle+=f.angularSpeed*e;var n=e;if(_._velocityGradients&&0<_._velocityGradients.length&&xt.Tools.GetCurrentGradient(r,_._velocityGradients,(function(e,t,i){e!==f._currentVelocityGradient&&(f._currentVelocity1=f._currentVelocity2,f._currentVelocity2=t.getFactor(),f._currentVelocityGradient=e),n*=xt.Scalar.Lerp(f._currentVelocity1,f._currentVelocity2,i)})),f.direction.scaleToRef(n,_._scaledDirection),_._limitVelocityGradients&&0<_._limitVelocityGradients.length&&xt.Tools.GetCurrentGradient(r,_._limitVelocityGradients,(function(e,t,i){e!==f._currentLimitVelocityGradient&&(f._currentLimitVelocity1=f._currentLimitVelocity2,f._currentLimitVelocity2=t.getFactor(),f._currentLimitVelocityGradient=e),xt.Scalar.Lerp(f._currentLimitVelocity1,f._currentLimitVelocity2,i)<f.direction.length()&&f.direction.scaleInPlace(_.limitVelocityDamping)})),_._dragGradients&&0<_._dragGradients.length&&xt.Tools.GetCurrentGradient(r,_._dragGradients,(function(e,t,i){e!==f._currentDragGradient&&(f._currentDrag1=f._currentDrag2,f._currentDrag2=t.getFactor(),f._currentDragGradient=e);var r=xt.Scalar.Lerp(f._currentDrag1,f._currentDrag2,i);_._scaledDirection.scaleInPlace(1-r)})),f.position.addInPlace(_._scaledDirection),d&&u){var o=_._fetchR(f._randomNoiseCoordinates1.x,f._randomNoiseCoordinates1.y,u.width,u.height,d),s=_._fetchR(f._randomNoiseCoordinates1.z,f._randomNoiseCoordinates2.x,u.width,u.height,d),a=_._fetchR(f._randomNoiseCoordinates2.y,f._randomNoiseCoordinates2.z,u.width,u.height,d),l=xt.Tmp.Vector3[0],c=xt.Tmp.Vector3[1];l.copyFromFloats((2*o-1)*_.noiseStrength.x,(2*s-1)*_.noiseStrength.y,(2*a-1)*_.noiseStrength.z),l.scaleToRef(e,c),f.direction.addInPlace(c)}if(_.gravity.scaleToRef(e,_._scaledGravity),f.direction.addInPlace(_._scaledGravity),_._sizeGradients&&0<_._sizeGradients.length&&xt.Tools.GetCurrentGradient(r,_._sizeGradients,(function(e,t,i){e!==f._currentSizeGradient&&(f._currentSize1=f._currentSize2,f._currentSize2=t.getFactor(),f._currentSizeGradient=e),f.size=xt.Scalar.Lerp(f._currentSize1,f._currentSize2,i)})),_._useRampGradients&&(_._colorRemapGradients&&0<_._colorRemapGradients.length&&xt.Tools.GetCurrentGradient(r,_._colorRemapGradients,(function(e,t,i){var r=xt.Scalar.Lerp(e.factor1,t.factor1,i),n=xt.Scalar.Lerp(e.factor2,t.factor2,i);f.remapData.x=r,f.remapData.y=n-r})),_._alphaRemapGradients&&0<_._alphaRemapGradients.length&&xt.Tools.GetCurrentGradient(r,_._alphaRemapGradients,(function(e,t,i){var r=xt.Scalar.Lerp(e.factor1,t.factor1,i),n=xt.Scalar.Lerp(e.factor2,t.factor2,i);f.remapData.z=r,f.remapData.w=n-r}))),_._isAnimationSheetEnabled&&f.updateCellIndex(),f._inheritParticleInfoToSubEmitters(),f.age>=f.lifeTime)return _._emitFromParticle(f),f._attachedSubEmitters&&(f._attachedSubEmitters.forEach((function(e){e.particleSystem.disposeOnStop=!0,e.particleSystem.stop()})),f._attachedSubEmitters=null),_.recycleParticle(f),p--,\"continue\"},p=0;p<h.length;p++)e()},_}return T(_,s),Object.defineProperty(_.prototype,\"onDispose\",{set:function(e){this._onDisposeObserver&&this.onDisposeObservable.remove(this._onDisposeObserver),this._onDisposeObserver=this.onDisposeObservable.add(e)},enumerable:!0,configurable:!0}),Object.defineProperty(_.prototype,\"useRampGradients\",{get:function(){return this._useRampGradients},set:function(e){this._useRampGradients!==e&&(this._useRampGradients=e,this._resetEffect())},enumerable:!0,configurable:!0}),Object.defineProperty(_.prototype,\"particles\",{get:function(){return this._particles},enumerable:!0,configurable:!0}),_.prototype.getClassName=function(){return\"ParticleSystem\"},_.prototype._addFactorGradient=function(e,t,i,r){var n=new xt.FactorGradient;n.gradient=t,n.factor1=i,n.factor2=r,e.push(n),e.sort((function(e,t){return e.gradient<t.gradient?-1:e.gradient>t.gradient?1:0}))},_.prototype._removeFactorGradient=function(e,t){if(e)for(var i=0,r=0,n=e;r<n.length;r++){if(n[r].gradient===t){e.splice(i,1);break}i++}},_.prototype.addLifeTimeGradient=function(e,t,i){return this._lifeTimeGradients||(this._lifeTimeGradients=[]),this._addFactorGradient(this._lifeTimeGradients,e,t,i),this},_.prototype.removeLifeTimeGradient=function(e){return this._removeFactorGradient(this._lifeTimeGradients,e),this},_.prototype.addSizeGradient=function(e,t,i){return this._sizeGradients||(this._sizeGradients=[]),this._addFactorGradient(this._sizeGradients,e,t,i),this},_.prototype.removeSizeGradient=function(e){return this._removeFactorGradient(this._sizeGradients,e),this},_.prototype.addColorRemapGradient=function(e,t,i){return this._colorRemapGradients||(this._colorRemapGradients=[]),this._addFactorGradient(this._colorRemapGradients,e,t,i),this},_.prototype.removeColorRemapGradient=function(e){return this._removeFactorGradient(this._colorRemapGradients,e),this},_.prototype.addAlphaRemapGradient=function(e,t,i){return this._alphaRemapGradients||(this._alphaRemapGradients=[]),this._addFactorGradient(this._alphaRemapGradients,e,t,i),this},_.prototype.removeAlphaRemapGradient=function(e){return this._removeFactorGradient(this._alphaRemapGradients,e),this},_.prototype.addAngularSpeedGradient=function(e,t,i){return this._angularSpeedGradients||(this._angularSpeedGradients=[]),this._addFactorGradient(this._angularSpeedGradients,e,t,i),this},_.prototype.removeAngularSpeedGradient=function(e){return this._removeFactorGradient(this._angularSpeedGradients,e),this},_.prototype.addVelocityGradient=function(e,t,i){return this._velocityGradients||(this._velocityGradients=[]),this._addFactorGradient(this._velocityGradients,e,t,i),this},_.prototype.removeVelocityGradient=function(e){return this._removeFactorGradient(this._velocityGradients,e),this},_.prototype.addLimitVelocityGradient=function(e,t,i){return this._limitVelocityGradients||(this._limitVelocityGradients=[]),this._addFactorGradient(this._limitVelocityGradients,e,t,i),this},_.prototype.removeLimitVelocityGradient=function(e){return this._removeFactorGradient(this._limitVelocityGradients,e),this},_.prototype.addDragGradient=function(e,t,i){return this._dragGradients||(this._dragGradients=[]),this._addFactorGradient(this._dragGradients,e,t,i),this},_.prototype.removeDragGradient=function(e){return this._removeFactorGradient(this._dragGradients,e),this},_.prototype.addEmitRateGradient=function(e,t,i){return this._emitRateGradients||(this._emitRateGradients=[]),this._addFactorGradient(this._emitRateGradients,e,t,i),this},_.prototype.removeEmitRateGradient=function(e){return this._removeFactorGradient(this._emitRateGradients,e),this},_.prototype.addStartSizeGradient=function(e,t,i){return this._startSizeGradients||(this._startSizeGradients=[]),this._addFactorGradient(this._startSizeGradients,e,t,i),this},_.prototype.removeStartSizeGradient=function(e){return this._removeFactorGradient(this._emitRateGradients,e),this},_.prototype._createRampGradientTexture=function(){if(this._rampGradients&&this._rampGradients.length&&!this._rampGradientsTexture){for(var r=new Uint8Array(4*this._rawTextureWidth),n=xt.Tmp.Color3[0],o=0;o<this._rawTextureWidth;o++){var e=o/this._rawTextureWidth;xt.Tools.GetCurrentGradient(e,this._rampGradients,(function(e,t,i){xt.Color3.LerpToRef(e.color,t.color,i,n),r[4*o]=255*n.r,r[4*o+1]=255*n.g,r[4*o+2]=255*n.b,r[4*o+3]=255}))}this._rampGradientsTexture=xt.RawTexture.CreateRGBATexture(r,this._rawTextureWidth,1,this._scene,!1,!1,xt.Texture.NEAREST_SAMPLINGMODE)}},_.prototype.getRampGradients=function(){return this._rampGradients},_.prototype.addRampGradient=function(e,t){this._rampGradients||(this._rampGradients=[]);var i=new xt.Color3Gradient;return i.gradient=e,i.color=t,this._rampGradients.push(i),this._rampGradients.sort((function(e,t){return e.gradient<t.gradient?-1:e.gradient>t.gradient?1:0})),this._rampGradientsTexture&&(this._rampGradientsTexture.dispose(),this._rampGradientsTexture=null),this._createRampGradientTexture(),this},_.prototype.removeRampGradient=function(e){return this._removeGradientAndTexture(e,this._rampGradients,this._rampGradientsTexture),this._rampGradientsTexture=null,this._rampGradients&&0<this._rampGradients.length&&this._createRampGradientTexture(),this},_.prototype.addColorGradient=function(e,t,i){this._colorGradients||(this._colorGradients=[]);var r=new xt.ColorGradient;return r.gradient=e,r.color1=t,r.color2=i,this._colorGradients.push(r),this._colorGradients.sort((function(e,t){return e.gradient<t.gradient?-1:e.gradient>t.gradient?1:0})),this},_.prototype.removeColorGradient=function(e){if(!this._colorGradients)return this;for(var t=0,i=0,r=this._colorGradients;i<r.length;i++){if(r[i].gradient===e){this._colorGradients.splice(t,1);break}t++}return this},_.prototype._fetchR=function(e,t,i,r,n){return n[4*(((e=.5*Math.abs(e)+.5)*i%i|0)+((t=.5*Math.abs(t)+.5)*r%r|0)*i)]/255},_.prototype._reset=function(){this._resetEffect()},_.prototype._resetEffect=function(){this._vertexBuffer&&(this._vertexBuffer.dispose(),this._vertexBuffer=null),this._spriteBuffer&&(this._spriteBuffer.dispose(),this._spriteBuffer=null),this._createVertexBuffers()},_.prototype._createVertexBuffers=function(){this._vertexBufferSize=this._useInstancing?10:12,this._isAnimationSheetEnabled&&(this._vertexBufferSize+=1),this._isBillboardBased&&this.billboardMode!==_.BILLBOARDMODE_STRETCHED||(this._vertexBufferSize+=3),this._useRampGradients&&(this._vertexBufferSize+=4);var e=this._scene.getEngine();this._vertexData=new Float32Array(this._capacity*this._vertexBufferSize*(this._useInstancing?1:4)),this._vertexBuffer=new xt.Buffer(e,this._vertexData,!0,this._vertexBufferSize);var t=0,i=this._vertexBuffer.createVertexBuffer(xt.VertexBuffer.PositionKind,t,3,this._vertexBufferSize,this._useInstancing);this._vertexBuffers[xt.VertexBuffer.PositionKind]=i,t+=3;var r=this._vertexBuffer.createVertexBuffer(xt.VertexBuffer.ColorKind,t,4,this._vertexBufferSize,this._useInstancing);this._vertexBuffers[xt.VertexBuffer.ColorKind]=r,t+=4;var n=this._vertexBuffer.createVertexBuffer(\"angle\",t,1,this._vertexBufferSize,this._useInstancing);this._vertexBuffers.angle=n,t+=1;var o,s=this._vertexBuffer.createVertexBuffer(\"size\",t,2,this._vertexBufferSize,this._useInstancing);if(this._vertexBuffers.size=s,t+=2,this._isAnimationSheetEnabled){var a=this._vertexBuffer.createVertexBuffer(\"cellIndex\",t,1,this._vertexBufferSize,this._useInstancing);this._vertexBuffers.cellIndex=a,t+=1}if(!this._isBillboardBased||this.billboardMode===_.BILLBOARDMODE_STRETCHED){var l=this._vertexBuffer.createVertexBuffer(\"direction\",t,3,this._vertexBufferSize,this._useInstancing);this._vertexBuffers.direction=l,t+=3}if(this._useRampGradients){var c=this._vertexBuffer.createVertexBuffer(\"remapData\",t,4,this._vertexBufferSize,this._useInstancing);this._vertexBuffers.remapData=c,t+=4}if(this._useInstancing){var h=new Float32Array([0,0,1,0,1,1,0,1]);this._spriteBuffer=new xt.Buffer(e,h,!1,2),o=this._spriteBuffer.createVertexBuffer(\"offset\",0,2)}else o=this._vertexBuffer.createVertexBuffer(\"offset\",t,2,this._vertexBufferSize,this._useInstancing),t+=2;this._vertexBuffers.offset=o},_.prototype._createIndexBuffer=function(){if(!this._useInstancing){for(var e=[],t=0,i=0;i<this._capacity;i++)e.push(t),e.push(t+1),e.push(t+2),e.push(t),e.push(t+2),e.push(t+3),t+=4;this._indexBuffer=this._scene.getEngine().createIndexBuffer(e)}},_.prototype.getCapacity=function(){return this._capacity},_.prototype.isAlive=function(){return this._alive},_.prototype.isStarted=function(){return this._started},_.prototype._prepareSubEmitterInternalArray=function(){var t=this;this._subEmitters=new Array,this.subEmitters&&this.subEmitters.forEach((function(e){e instanceof _?t._subEmitters.push([new xt.SubEmitter(e)]):e instanceof xt.SubEmitter?t._subEmitters.push([e]):e instanceof Array&&t._subEmitters.push(e)}))},_.prototype.start=function(e){var t=this;if(void 0===e&&(e=this.startDelay),!this.targetStopDuration&&this._hasTargetStopDurationDependantGradient())throw\"Particle system started with a targetStopDuration dependant gradient (eg. startSizeGradients) but no targetStopDuration set\";if(e)setTimeout((function(){t.start(0)}),e);else{if(this._prepareSubEmitterInternalArray(),this._started=!0,this._stopped=!1,this._actualFrame=0,this._subEmitters&&0!=this._subEmitters.length&&(this.activeSubSystems=new Array),this._emitRateGradients&&(0<this._emitRateGradients.length&&(this._currentEmitRateGradient=this._emitRateGradients[0],this._currentEmitRate1=this._currentEmitRateGradient.getFactor(),this._currentEmitRate2=this._currentEmitRate1),1<this._emitRateGradients.length&&(this._currentEmitRate2=this._emitRateGradients[1].getFactor())),this._startSizeGradients&&(0<this._startSizeGradients.length&&(this._currentStartSizeGradient=this._startSizeGradients[0],this._currentStartSize1=this._currentStartSizeGradient.getFactor(),this._currentStartSize2=this._currentStartSize1),1<this._startSizeGradients.length&&(this._currentStartSize2=this._startSizeGradients[1].getFactor())),this.preWarmCycles){this.emitter instanceof xt.AbstractMesh&&this.emitter.computeWorldMatrix(!0);var i=this.noiseTexture;if(i&&i.onGeneratedObservable)i.onGeneratedObservable.addOnce((function(){setTimeout((function(){for(var e=0;e<t.preWarmCycles;e++)t.animate(!0),i.render()}))}));else for(var r=0;r<this.preWarmCycles;r++)this.animate(!0)}this.beginAnimationOnStart&&this.animations&&0<this.animations.length&&this.getScene().beginAnimation(this,this.beginAnimationFrom,this.beginAnimationTo,this.beginAnimationLoop)}},_.prototype.stop=function(e){void 0===e&&(e=!0),this._stopped=!0,e&&this._stopSubEmitters()},_.prototype.reset=function(){this._stockParticles=[],this._particles=[]},_.prototype._appendParticleVertex=function(e,t,i,r){var n=e*this._vertexBufferSize;this._vertexData[n++]=t.position.x,this._vertexData[n++]=t.position.y,this._vertexData[n++]=t.position.z,this._vertexData[n++]=t.color.r,this._vertexData[n++]=t.color.g,this._vertexData[n++]=t.color.b,this._vertexData[n++]=t.color.a,this._vertexData[n++]=t.angle,this._vertexData[n++]=t.scale.x*t.size,this._vertexData[n++]=t.scale.y*t.size,this._isAnimationSheetEnabled&&(this._vertexData[n++]=t.cellIndex),this._isBillboardBased?this.billboardMode===_.BILLBOARDMODE_STRETCHED&&(this._vertexData[n++]=t.direction.x,this._vertexData[n++]=t.direction.y,this._vertexData[n++]=t.direction.z):t._initialDirection?(this._vertexData[n++]=t._initialDirection.x,this._vertexData[n++]=t._initialDirection.y,this._vertexData[n++]=t._initialDirection.z):(this._vertexData[n++]=t.direction.x,this._vertexData[n++]=t.direction.y,this._vertexData[n++]=t.direction.z),this._useRampGradients&&(this._vertexData[n++]=t.remapData.x,this._vertexData[n++]=t.remapData.y,this._vertexData[n++]=t.remapData.z,this._vertexData[n++]=t.remapData.w),this._useInstancing||(this._isAnimationSheetEnabled&&(0===i?i=this._epsilon:1===i&&(i=1-this._epsilon),0===r?r=this._epsilon:1===r&&(r=1-this._epsilon)),this._vertexData[n++]=i,this._vertexData[n++]=r)},_.prototype._stopSubEmitters=function(){this.activeSubSystems&&(this.activeSubSystems.forEach((function(e){e.stop(!0)})),this.activeSubSystems=new Array)},_.prototype._removeFromRoot=function(){if(this._rootParticleSystem){var e=this._rootParticleSystem.activeSubSystems.indexOf(this);-1!==e&&this._rootParticleSystem.activeSubSystems.splice(e,1),this._rootParticleSystem=null}},_.prototype._update=function(e){var c,n=this;if(this._alive=0<this._particles.length,this.emitter.position){var t=this.emitter;this._emitterWorldMatrix=t.getWorldMatrix()}else{var i=this.emitter;this._emitterWorldMatrix=xt.Matrix.Translation(i.x,i.y,i.z)}this.updateFunction(this._particles);for(var r,o=function(){if(s._particles.length===s._capacity)return\"break\";c=s._createParticle(),s._particles.push(c);var e=xt.Scalar.RandomRange(s.minEmitPower,s.maxEmitPower);if(s.startPositionFunction?s.startPositionFunction(s._emitterWorldMatrix,c.position,c):s.particleEmitterType.startPositionFunction(s._emitterWorldMatrix,c.position,c),s.startDirectionFunction?s.startDirectionFunction(s._emitterWorldMatrix,c.direction,c):s.particleEmitterType.startDirectionFunction(s._emitterWorldMatrix,c.direction,c),0===e?c._initialDirection?c._initialDirection.copyFrom(c.direction):c._initialDirection=c.direction.clone():c._initialDirection=null,c.direction.scaleInPlace(e),s.targetStopDuration&&s._lifeTimeGradients&&0<s._lifeTimeGradients.length){var l=xt.Scalar.Clamp(s._actualFrame/s.targetStopDuration);xt.Tools.GetCurrentGradient(l,s._lifeTimeGradients,(function(e,t,i){var r=e,n=t,o=r.getFactor(),s=n.getFactor(),a=(l-r.gradient)/(n.gradient-r.gradient);c.lifeTime=xt.Scalar.Lerp(o,s,a)}))}else c.lifeTime=xt.Scalar.RandomRange(s.minLifeTime,s.maxLifeTime);if(s._sizeGradients&&0!==s._sizeGradients.length?(c._currentSizeGradient=s._sizeGradients[0],c._currentSize1=c._currentSizeGradient.getFactor(),c.size=c._currentSize1,1<s._sizeGradients.length?c._currentSize2=s._sizeGradients[1].getFactor():c._currentSize2=c._currentSize1):c.size=xt.Scalar.RandomRange(s.minSize,s.maxSize),c.scale.copyFromFloats(xt.Scalar.RandomRange(s.minScaleX,s.maxScaleX),xt.Scalar.RandomRange(s.minScaleY,s.maxScaleY)),s._startSizeGradients&&s._startSizeGradients[0]&&s.targetStopDuration){var t=s._actualFrame/s.targetStopDuration;xt.Tools.GetCurrentGradient(t,s._startSizeGradients,(function(e,t,i){e!==n._currentStartSizeGradient&&(n._currentStartSize1=n._currentStartSize2,n._currentStartSize2=t.getFactor(),n._currentStartSizeGradient=e);var r=xt.Scalar.Lerp(n._currentStartSize1,n._currentStartSize2,i);c.scale.scaleInPlace(r)}))}s._angularSpeedGradients&&0!==s._angularSpeedGradients.length?(c._currentAngularSpeedGradient=s._angularSpeedGradients[0],c.angularSpeed=c._currentAngularSpeedGradient.getFactor(),c._currentAngularSpeed1=c.angularSpeed,1<s._angularSpeedGradients.length?c._currentAngularSpeed2=s._angularSpeedGradients[1].getFactor():c._currentAngularSpeed2=c._currentAngularSpeed1):c.angularSpeed=xt.Scalar.RandomRange(s.minAngularSpeed,s.maxAngularSpeed),c.angle=xt.Scalar.RandomRange(s.minInitialRotation,s.maxInitialRotation),s._velocityGradients&&0<s._velocityGradients.length&&(c._currentVelocityGradient=s._velocityGradients[0],c._currentVelocity1=c._currentVelocityGradient.getFactor(),1<s._velocityGradients.length?c._currentVelocity2=s._velocityGradients[1].getFactor():c._currentVelocity2=c._currentVelocity1),s._limitVelocityGradients&&0<s._limitVelocityGradients.length&&(c._currentLimitVelocityGradient=s._limitVelocityGradients[0],c._currentLimitVelocity1=c._currentLimitVelocityGradient.getFactor(),1<s._limitVelocityGradients.length?c._currentLimitVelocity2=s._limitVelocityGradients[1].getFactor():c._currentLimitVelocity2=c._currentLimitVelocity1),s._dragGradients&&0<s._dragGradients.length&&(c._currentDragGradient=s._dragGradients[0],c._currentDrag1=c._currentDragGradient.getFactor(),1<s._dragGradients.length?c._currentDrag2=s._dragGradients[1].getFactor():c._currentDrag2=c._currentDrag1),s._colorGradients&&0!==s._colorGradients.length?(c._currentColorGradient=s._colorGradients[0],c._currentColorGradient.getColorToRef(c.color),c._currentColor1.copyFrom(c.color),1<s._colorGradients.length?s._colorGradients[1].getColorToRef(c._currentColor2):c._currentColor2.copyFrom(c.color)):(r=xt.Scalar.RandomRange(0,1),xt.Color4.LerpToRef(s.color1,s.color2,r,c.color),s.colorDead.subtractToRef(c.color,s._colorDiff),s._colorDiff.scaleToRef(1/c.lifeTime,c.colorStep)),s._isAnimationSheetEnabled&&(c._initialStartSpriteCellID=s.startSpriteCellID,c._initialEndSpriteCellID=s.endSpriteCellID),c.direction.addInPlace(s._inheritedVelocityOffset),s._useRampGradients&&(c.remapData=new xt.Vector4(0,1,0,1)),s.noiseTexture&&(c._randomNoiseCoordinates1?(c._randomNoiseCoordinates1.copyFromFloats(Math.random(),Math.random(),Math.random()),c._randomNoiseCoordinates2.copyFromFloats(Math.random(),Math.random(),Math.random())):(c._randomNoiseCoordinates1=new xt.Vector3(Math.random(),Math.random(),Math.random()),c._randomNoiseCoordinates2=new xt.Vector3(Math.random(),Math.random(),Math.random()))),c._inheritParticleInfoToSubEmitters()},s=this,a=0;a<e;a++){if(\"break\"===o())break}},_._GetAttributeNamesOrOptions=function(e,t,i){void 0===e&&(e=!1),void 0===t&&(t=!1),void 0===i&&(i=!1);var r=[xt.VertexBuffer.PositionKind,xt.VertexBuffer.ColorKind,\"angle\",\"offset\",\"size\"];return e&&r.push(\"cellIndex\"),t||r.push(\"direction\"),i&&r.push(\"remapData\"),r},_._GetEffectCreationOptions=function(e){void 0===e&&(e=!1);var t=[\"invView\",\"view\",\"projection\",\"vClipPlane\",\"vClipPlane2\",\"vClipPlane3\",\"vClipPlane4\",\"textureMask\",\"translationPivot\",\"eyePosition\"];return e&&t.push(\"particlesInfos\"),t},_.prototype._getEffect=function(e){if(this._customEffect)return this._customEffect;var t=[];if(this._scene.clipPlane&&t.push(\"#define CLIPPLANE\"),this._scene.clipPlane2&&t.push(\"#define CLIPPLANE2\"),this._scene.clipPlane3&&t.push(\"#define CLIPPLANE3\"),this._scene.clipPlane4&&t.push(\"#define CLIPPLANE4\"),this._isAnimationSheetEnabled&&t.push(\"#define ANIMATESHEET\"),e===_.BLENDMODE_MULTIPLY&&t.push(\"#define BLENDMULTIPLYMODE\"),this._useRampGradients&&t.push(\"#define RAMPGRADIENT\"),this._isBillboardBased)switch(t.push(\"#define BILLBOARD\"),this.billboardMode){case _.BILLBOARDMODE_Y:t.push(\"#define BILLBOARDY\");break;case _.BILLBOARDMODE_STRETCHED:t.push(\"#define BILLBOARDSTRETCHED\")}this._imageProcessingConfiguration&&(this._imageProcessingConfiguration.prepareDefines(this._imageProcessingConfigurationDefines),t.push(this._imageProcessingConfigurationDefines.toString()));var i=t.join(\"\\n\");if(this._cachedDefines!==i){this._cachedDefines=i;var r=_._GetAttributeNamesOrOptions(this._isAnimationSheetEnabled,this._isBillboardBased&&this.billboardMode!==_.BILLBOARDMODE_STRETCHED,this._useRampGradients),n=_._GetEffectCreationOptions(this._isAnimationSheetEnabled),o=[\"diffuseSampler\",\"rampSampler\"];xt.ImageProcessingConfiguration&&(xt.ImageProcessingConfiguration.PrepareUniforms(n,this._imageProcessingConfigurationDefines),xt.ImageProcessingConfiguration.PrepareSamplers(o,this._imageProcessingConfigurationDefines)),this._effect=this._scene.getEngine().createEffect(\"particles\",r,n,o,i)}return this._effect},_.prototype.animate=function(e){var r=this;if(void 0===e&&(e=!1),this._started){if(!e){if(!this.isReady())return;if(this._currentRenderId===this._scene.getRenderId())return;this._currentRenderId=this._scene.getRenderId()}var t;if(this._scaledUpdateSpeed=this.updateSpeed*(e?this.preWarmStepOffset:this._scene.getAnimationRatio()),-1<this.manualEmitCount)t=this.manualEmitCount,this._newPartsExcess=0,this.manualEmitCount=0;else{var n=this.emitRate;if(this._emitRateGradients&&0<this._emitRateGradients.length&&this.targetStopDuration){var i=this._actualFrame/this.targetStopDuration;xt.Tools.GetCurrentGradient(i,this._emitRateGradients,(function(e,t,i){e!==r._currentEmitRateGradient&&(r._currentEmitRate1=r._currentEmitRate2,r._currentEmitRate2=t.getFactor(),r._currentEmitRateGradient=e),n=xt.Scalar.Lerp(r._currentEmitRate1,r._currentEmitRate2,i)}))}t=n*this._scaledUpdateSpeed>>0,this._newPartsExcess+=n*this._scaledUpdateSpeed-t}if(1<this._newPartsExcess&&(t+=this._newPartsExcess>>0,this._newPartsExcess-=this._newPartsExcess>>0),this._alive=!1,this._stopped?t=0:(this._actualFrame+=this._scaledUpdateSpeed,this.targetStopDuration&&this._actualFrame>=this.targetStopDuration&&this.stop()),this._update(t),this._stopped&&(this._alive||(this._started=!1,this.onAnimationEnd&&this.onAnimationEnd(),this.disposeOnStop&&this._scene._toBeDisposed.push(this))),!e){for(var o=0,s=0;s<this._particles.length;s++){var a=this._particles[s];this._appendParticleVertices(o,a),o+=this._useInstancing?1:4}this._vertexBuffer&&this._vertexBuffer.update(this._vertexData)}0===this.manualEmitCount&&this.disposeOnStop&&this.stop()}},_.prototype._appendParticleVertices=function(e,t){this._appendParticleVertex(e++,t,0,0),this._useInstancing||(this._appendParticleVertex(e++,t,1,0),this._appendParticleVertex(e++,t,1,1),this._appendParticleVertex(e++,t,0,1))},_.prototype.rebuild=function(){this._createIndexBuffer(),this._vertexBuffer&&this._vertexBuffer._rebuild()},_.prototype.isReady=function(){if(!(this.emitter&&this._imageProcessingConfiguration.isReady()&&this.particleTexture&&this.particleTexture.isReady()))return!1;if(this.blendMode!==_.BLENDMODE_MULTIPLYADD){if(!this._getEffect(this.blendMode).isReady())return!1}else{if(!this._getEffect(_.BLENDMODE_MULTIPLY).isReady())return!1;if(!this._getEffect(_.BLENDMODE_ADD).isReady())return!1}return!0},_.prototype._render=function(e){var t=this._getEffect(e),i=this._scene.getEngine();i.enableEffect(t);var r=this._scene.getViewMatrix();if(t.setTexture(\"diffuseSampler\",this.particleTexture),t.setMatrix(\"view\",r),t.setMatrix(\"projection\",this._scene.getProjectionMatrix()),this._isAnimationSheetEnabled&&this.particleTexture){var n=this.particleTexture.getBaseSize();t.setFloat3(\"particlesInfos\",this.spriteCellWidth/n.width,this.spriteCellHeight/n.height,n.width/this.spriteCellWidth)}if(t.setVector2(\"translationPivot\",this.translationPivot),t.setFloat4(\"textureMask\",this.textureMask.r,this.textureMask.g,this.textureMask.b,this.textureMask.a),this._isBillboardBased){var o=this._scene.activeCamera;t.setVector3(\"eyePosition\",o.globalPosition)}if(this._rampGradientsTexture&&t.setTexture(\"rampSampler\",this._rampGradientsTexture),this._scene.clipPlane||this._scene.clipPlane2||this._scene.clipPlane3||this._scene.clipPlane4){var s=r.clone();s.invert(),t.setMatrix(\"invView\",s),xt.MaterialHelper.BindClipPlane(t,this._scene)}switch(i.bindBuffers(this._vertexBuffers,this._indexBuffer,t),this._imageProcessingConfiguration&&!this._imageProcessingConfiguration.applyByPostProcess&&this._imageProcessingConfiguration.bind(t),e){case _.BLENDMODE_ADD:i.setAlphaMode(xt.Engine.ALPHA_ADD);break;case _.BLENDMODE_ONEONE:i.setAlphaMode(xt.Engine.ALPHA_ONEONE);break;case _.BLENDMODE_STANDARD:i.setAlphaMode(xt.Engine.ALPHA_COMBINE);break;case _.BLENDMODE_MULTIPLY:i.setAlphaMode(xt.Engine.ALPHA_MULTIPLY)}return this._useInstancing?i.drawArraysType(xt.Material.TriangleFanDrawMode,0,4,this._particles.length):i.drawElementsType(xt.Material.TriangleFillMode,0,6*this._particles.length),this._particles.length},_.prototype.render=function(){if(!this.isReady()||!this._particles.length)return 0;var e=this._scene.getEngine();e.setState(!1),this.forceDepthWrite&&e.setDepthWrite(!0);var t=0;return this.blendMode===_.BLENDMODE_MULTIPLYADD&&(t=this._render(_.BLENDMODE_MULTIPLY)+this._render(_.BLENDMODE_ADD)),t=this._render(this.blendMode),e.unbindInstanceAttributes(),e.setAlphaMode(xt.Engine.ALPHA_DISABLE),t},_.prototype.dispose=function(e){if(void 0===e&&(e=!0),this._vertexBuffer&&(this._vertexBuffer.dispose(),this._vertexBuffer=null),this._spriteBuffer&&(this._spriteBuffer.dispose(),this._spriteBuffer=null),this._indexBuffer&&(this._scene.getEngine()._releaseBuffer(this._indexBuffer),this._indexBuffer=null),e&&this.particleTexture&&(this.particleTexture.dispose(),this.particleTexture=null),e&&this.noiseTexture&&(this.noiseTexture.dispose(),this.noiseTexture=null),this._rampGradientsTexture&&(this._rampGradientsTexture.dispose(),this._rampGradientsTexture=null),this._removeFromRoot(),this._subEmitters&&this._subEmitters.length){for(var t=0;t<this._subEmitters.length;t++)for(var i=0,r=this._subEmitters[t];i<r.length;i++){r[i].dispose()}this._subEmitters=[],this.subEmitters=[]}this._disposeEmitterOnDispose&&this.emitter&&this.emitter.dispose&&this.emitter.dispose(!0),-1<(t=this._scene.particleSystems.indexOf(this))&&this._scene.particleSystems.splice(t,1),this._scene._activeParticleSystems.dispose(),this.onDisposeObservable.notifyObservers(this),this.onDisposeObservable.clear(),this.reset()},_.prototype.clone=function(e,t){var i=null,r=null;if(null!=this.customShader){var n=0<(r=this.customShader).shaderOptions.defines.length?r.shaderOptions.defines.join(\"\\n\"):\"\";i=this._scene.getEngine().createEffectForParticles(r.shaderPath.fragmentElement,r.shaderOptions.uniforms,r.shaderOptions.samplers,n)}else this._customEffect&&(i=this._customEffect);var o=new _(e,this._capacity,this._scene,i);return o.customShader=r,xt.Tools.DeepCopy(this,o,[\"particles\",\"customShader\",\"noiseTexture\"]),void 0===t&&(t=this.emitter),o.noiseTexture=this.noiseTexture,o.emitter=t,this.particleTexture&&(o.particleTexture=new xt.Texture(this.particleTexture.url,this._scene)),this._colorGradients&&this._colorGradients.forEach((function(e){o.addColorGradient(e.gradient,e.color1,e.color2)})),this._dragGradients&&this._dragGradients.forEach((function(e){o.addDragGradient(e.gradient,e.factor1,e.factor2)})),this._angularSpeedGradients&&this._angularSpeedGradients.forEach((function(e){o.addAngularSpeedGradient(e.gradient,e.factor1,e.factor2)})),this._emitRateGradients&&this._emitRateGradients.forEach((function(e){o.addEmitRateGradient(e.gradient,e.factor1,e.factor2)})),this._lifeTimeGradients&&this._lifeTimeGradients.forEach((function(e){o.addLifeTimeGradient(e.gradient,e.factor1,e.factor2)})),this._limitVelocityGradients&&this._limitVelocityGradients.forEach((function(e){o.addLimitVelocityGradient(e.gradient,e.factor1,e.factor2)})),this._sizeGradients&&this._sizeGradients.forEach((function(e){o.addSizeGradient(e.gradient,e.factor1,e.factor2)})),this._startSizeGradients&&this._startSizeGradients.forEach((function(e){o.addStartSizeGradient(e.gradient,e.factor1,e.factor2)})),this._velocityGradients&&this._velocityGradients.forEach((function(e){o.addVelocityGradient(e.gradient,e.factor1,e.factor2)})),this._rampGradients&&this._rampGradients.forEach((function(e){o.addRampGradient(e.gradient,e.color)})),this._colorRemapGradients&&this._colorRemapGradients.forEach((function(e){o.addColorRemapGradient(e.gradient,e.factor1,e.factor2)})),this._alphaRemapGradients&&this._alphaRemapGradients.forEach((function(e){o.addAlphaRemapGradient(e.gradient,e.factor1,e.factor2)})),this.preventAutoStart||o.start(),o},_.prototype.serialize=function(){var e={};if(_._Serialize(e,this),e.textureMask=this.textureMask.asArray(),e.customShader=this.customShader,e.preventAutoStart=this.preventAutoStart,this.subEmitters){e.subEmitters=[],this._subEmitters||this._prepareSubEmitterInternalArray();for(var t=0,i=this._subEmitters;t<i.length;t++){for(var r=[],n=0,o=i[t];n<o.length;n++){var s=o[n];r.push(s.serialize())}e.subEmitters.push(r)}}return e},_._Serialize=function(e,t){if(e.name=t.name,e.id=t.id,e.capacity=t.getCapacity(),t.emitter.position){var i=t.emitter;e.emitterId=i.id}else{var r=t.emitter;e.emitter=r.asArray()}t.particleEmitterType&&(e.particleEmitterType=t.particleEmitterType.serialize()),t.particleTexture&&(e.textureName=t.particleTexture.name,e.invertY=t.particleTexture._invertY),xt.Animation.AppendSerializedAnimations(t,e),e.beginAnimationOnStart=t.beginAnimationOnStart,e.beginAnimationFrom=t.beginAnimationFrom,e.beginAnimationTo=t.beginAnimationTo,e.beginAnimationLoop=t.beginAnimationLoop,e.startDelay=t.startDelay,e.renderingGroupId=t.renderingGroupId,e.isBillboardBased=t.isBillboardBased,e.billboardMode=t.billboardMode,e.minAngularSpeed=t.minAngularSpeed,e.maxAngularSpeed=t.maxAngularSpeed,e.minSize=t.minSize,e.maxSize=t.maxSize,e.minScaleX=t.minScaleX,e.maxScaleX=t.maxScaleX,e.minScaleY=t.minScaleY,e.maxScaleY=t.maxScaleY,e.minEmitPower=t.minEmitPower,e.maxEmitPower=t.maxEmitPower,e.minLifeTime=t.minLifeTime,e.maxLifeTime=t.maxLifeTime,e.emitRate=t.emitRate,e.gravity=t.gravity.asArray(),e.noiseStrength=t.noiseStrength.asArray(),e.color1=t.color1.asArray(),e.color2=t.color2.asArray(),e.colorDead=t.colorDead.asArray(),e.updateSpeed=t.updateSpeed,e.targetStopDuration=t.targetStopDuration,e.blendMode=t.blendMode,e.preWarmCycles=t.preWarmCycles,e.preWarmStepOffset=t.preWarmStepOffset,e.minInitialRotation=t.minInitialRotation,e.maxInitialRotation=t.maxInitialRotation,e.startSpriteCellID=t.startSpriteCellID,e.endSpriteCellID=t.endSpriteCellID,e.spriteCellChangeSpeed=t.spriteCellChangeSpeed,e.spriteCellWidth=t.spriteCellWidth,e.spriteCellHeight=t.spriteCellHeight,e.spriteRandomStartCell=t.spriteRandomStartCell,e.isAnimationSheetEnabled=t.isAnimationSheetEnabled;var n=t.getColorGradients();if(n){e.colorGradients=[];for(var o=0,s=n;o<s.length;o++){var a=s[o],l={gradient:a.gradient,color1:a.color1.asArray()};a.color2&&(l.color2=a.color2.asArray()),e.colorGradients.push(l)}}var c=t.getRampGradients();if(c){e.rampGradients=[];for(var h=0,u=c;h<u.length;h++){var d=u[h];l={gradient:d.gradient,color:d.color.asArray()};e.rampGradients.push(l)}e.useRampGradients=t.useRampGradients}var f=t.getColorRemapGradients();if(f){e.colorRemapGradients=[];for(var p=0,_=f;p<_.length;p++){var m=_[p];l={gradient:m.gradient,factor1:m.factor1};void 0!==m.factor2&&(l.factor2=m.factor2),e.colorRemapGradients.push(l)}}var g=t.getAlphaRemapGradients();if(g){e.alphaRemapGradients=[];for(var v=0,y=g;v<y.length;v++){var b=y[v];l={gradient:b.gradient,factor1:b.factor1};void 0!==b.factor2&&(l.factor2=b.factor2),e.alphaRemapGradients.push(l)}}var T=t.getSizeGradients();if(T){e.sizeGradients=[];for(var E=0,x=T;E<x.length;E++){var P=x[E];l={gradient:P.gradient,factor1:P.factor1};void 0!==P.factor2&&(l.factor2=P.factor2),e.sizeGradients.push(l)}}var A=t.getAngularSpeedGradients();if(A){e.angularSpeedGradients=[];for(var S=0,M=A;S<M.length;S++){var R=M[S];l={gradient:R.gradient,factor1:R.factor1};void 0!==R.factor2&&(l.factor2=R.factor2),e.angularSpeedGradients.push(l)}}var C=t.getVelocityGradients();if(C){e.velocityGradients=[];for(var O=0,D=C;O<D.length;O++){var I=D[O];l={gradient:I.gradient,factor1:I.factor1};void 0!==I.factor2&&(l.factor2=I.factor2),e.velocityGradients.push(l)}}var w=t.getDragGradients();if(w){e.dragyGradients=[];for(var L=0,F=w;L<F.length;L++){var B=F[L];l={gradient:B.gradient,factor1:B.factor1};void 0!==B.factor2&&(l.factor2=B.factor2),e.dragGradients.push(l)}}var N=t.getEmitRateGradients();if(N){e.emitRateGradients=[];for(var V=0,U=N;V<U.length;V++){var z=U[V];l={gradient:z.gradient,factor1:z.factor1};void 0!==z.factor2&&(l.factor2=z.factor2),e.emitRateGradients.push(l)}}var G=t.getStartSizeGradients();if(G){e.startSizeGradients=[];for(var k=0,W=G;k<W.length;k++){var H=W[k];l={gradient:H.gradient,factor1:H.factor1};void 0!==H.factor2&&(l.factor2=H.factor2),e.startSizeGradients.push(l)}}var X=t.getLifeTimeGradients();if(X){e.lifeTimeGradients=[];for(var j=0,Y=X;j<Y.length;j++){var K=Y[j];l={gradient:K.gradient,factor1:K.factor1};void 0!==K.factor2&&(l.factor2=K.factor2),e.lifeTimeGradients.push(l)}}var Q=t.getLimitVelocityGradients();if(Q){e.limitVelocityGradients=[];for(var Z=0,q=Q;Z<q.length;Z++){var J=q[Z];l={gradient:J.gradient,factor1:J.factor1};void 0!==J.factor2&&(l.factor2=J.factor2),e.limitVelocityGradients.push(l)}e.limitVelocityDamping=t.limitVelocityDamping}t.noiseTexture&&(e.noiseTexture=t.noiseTexture.serialize())},_._Parse=function(e,t,i,r){if(e.textureName&&(t.particleTexture=new xt.Texture(r+e.textureName,i,!1,void 0===e.invertY||e.invertY),t.particleTexture.name=e.textureName),e.emitterId||0===e.emitterId||void 0!==e.emitter?e.emitterId?t.emitter=i.getLastMeshByID(e.emitterId):t.emitter=xt.Vector3.FromArray(e.emitter):t.emitter=xt.Vector3.Zero(),void 0!==e.renderingGroupId&&(t.renderingGroupId=e.renderingGroupId),void 0!==e.isBillboardBased&&(t.isBillboardBased=e.isBillboardBased),void 0!==e.billboardMode&&(t.billboardMode=e.billboardMode),e.animations){for(var n=0;n<e.animations.length;n++){var o=e.animations[n];t.animations.push(xt.Animation.Parse(o))}t.beginAnimationOnStart=e.beginAnimationOnStart,t.beginAnimationFrom=e.beginAnimationFrom,t.beginAnimationTo=e.beginAnimationTo,t.beginAnimationLoop=e.beginAnimationLoop}if(e.autoAnimate&&i.beginAnimation(t,e.autoAnimateFrom,e.autoAnimateTo,e.autoAnimateLoop,e.autoAnimateSpeed||1),t.startDelay=0|e.startDelay,t.minAngularSpeed=e.minAngularSpeed,t.maxAngularSpeed=e.maxAngularSpeed,t.minSize=e.minSize,t.maxSize=e.maxSize,e.minScaleX&&(t.minScaleX=e.minScaleX,t.maxScaleX=e.maxScaleX,t.minScaleY=e.minScaleY,t.maxScaleY=e.maxScaleY),void 0!==e.preWarmCycles&&(t.preWarmCycles=e.preWarmCycles,t.preWarmStepOffset=e.preWarmStepOffset),void 0!==e.minInitialRotation&&(t.minInitialRotation=e.minInitialRotation,t.maxInitialRotation=e.maxInitialRotation),t.minLifeTime=e.minLifeTime,t.maxLifeTime=e.maxLifeTime,t.minEmitPower=e.minEmitPower,t.maxEmitPower=e.maxEmitPower,t.emitRate=e.emitRate,t.gravity=xt.Vector3.FromArray(e.gravity),e.noiseStrength&&(t.noiseStrength=xt.Vector3.FromArray(e.noiseStrength)),t.color1=xt.Color4.FromArray(e.color1),t.color2=xt.Color4.FromArray(e.color2),t.colorDead=xt.Color4.FromArray(e.colorDead),t.updateSpeed=e.updateSpeed,t.targetStopDuration=e.targetStopDuration,t.blendMode=e.blendMode,e.colorGradients)for(var s=0,a=e.colorGradients;s<a.length;s++){var l=a[s];t.addColorGradient(l.gradient,xt.Color4.FromArray(l.color1),l.color2?xt.Color4.FromArray(l.color2):void 0)}if(e.rampGradients){for(var c=0,h=e.rampGradients;c<h.length;c++){var u=h[c];t.addRampGradient(u.gradient,xt.Color3.FromArray(u.color))}t.useRampGradients=e.useRampGradients}if(e.colorRemapGradients)for(var d=0,f=e.colorRemapGradients;d<f.length;d++){var p=f[d];t.addColorRemapGradient(p.gradient,void 0!==p.factor1?p.factor1:p.factor,p.factor2)}if(e.alphaRemapGradients)for(var _=0,m=e.alphaRemapGradients;_<m.length;_++){var g=m[_];t.addAlphaRemapGradient(g.gradient,void 0!==g.factor1?g.factor1:g.factor,g.factor2)}if(e.sizeGradients)for(var v=0,y=e.sizeGradients;v<y.length;v++){var b=y[v];t.addSizeGradient(b.gradient,void 0!==b.factor1?b.factor1:b.factor,b.factor2)}if(e.sizeGradients)for(var T=0,E=e.sizeGradients;T<E.length;T++){b=E[T];t.addSizeGradient(b.gradient,void 0!==b.factor1?b.factor1:b.factor,b.factor2)}if(e.angularSpeedGradients)for(var x=0,P=e.angularSpeedGradients;x<P.length;x++){var A=P[x];t.addAngularSpeedGradient(A.gradient,void 0!==A.factor1?A.factor1:A.factor,A.factor2)}if(e.velocityGradients)for(var S=0,M=e.velocityGradients;S<M.length;S++){var R=M[S];t.addVelocityGradient(R.gradient,void 0!==R.factor1?R.factor1:R.factor,R.factor2)}if(e.dragGradients)for(var C=0,O=e.dragGradients;C<O.length;C++){var D=O[C];t.addDragGradient(D.gradient,void 0!==D.factor1?D.factor1:D.factor,D.factor2)}if(e.emitRateGradients)for(var I=0,w=e.emitRateGradients;I<w.length;I++){var L=w[I];t.addEmitRateGradient(L.gradient,void 0!==L.factor1?L.factor1:L.factor,L.factor2)}if(e.startSizeGradients)for(var F=0,B=e.startSizeGradients;F<B.length;F++){var N=B[F];t.addStartSizeGradient(N.gradient,void 0!==N.factor1?N.factor1:N.factor,N.factor2)}if(e.lifeTimeGradients)for(var V=0,U=e.lifeTimeGradients;V<U.length;V++){var z=U[V];t.addLifeTimeGradient(z.gradient,void 0!==z.factor1?z.factor1:z.factor,z.factor2)}if(e.limitVelocityGradients){for(var G=0,k=e.limitVelocityGradients;G<k.length;G++){var W=k[G];t.addLimitVelocityGradient(W.gradient,void 0!==W.factor1?W.factor1:W.factor,W.factor2)}t.limitVelocityDamping=e.limitVelocityDamping}var H;if(e.noiseTexture&&(t.noiseTexture=xt.ProceduralTexture.Parse(e.noiseTexture,i,r)),e.particleEmitterType){switch(e.particleEmitterType.type){case\"SphereParticleEmitter\":H=new xt.SphereParticleEmitter;break;case\"SphereDirectedParticleEmitter\":H=new xt.SphereDirectedParticleEmitter;break;case\"ConeEmitter\":case\"ConeParticleEmitter\":H=new xt.ConeParticleEmitter;break;case\"CylinderParticleEmitter\":H=new xt.CylinderParticleEmitter;break;case\"HemisphericParticleEmitter\":H=new xt.HemisphericParticleEmitter;break;case\"BoxEmitter\":case\"BoxParticleEmitter\":default:H=new xt.BoxParticleEmitter}H.parse(e.particleEmitterType)}else(H=new xt.BoxParticleEmitter).parse(e);t.particleEmitterType=H,t.startSpriteCellID=e.startSpriteCellID,t.endSpriteCellID=e.endSpriteCellID,t.spriteCellWidth=e.spriteCellWidth,t.spriteCellHeight=e.spriteCellHeight,t.spriteCellChangeSpeed=e.spriteCellChangeSpeed,t.spriteRandomStartCell=e.spriteRandomStartCell},_.Parse=function(e,t,i,r){void 0===r&&(r=!1);var n=e.name,o=null,s=null;if(e.customShader){var a=0<(s=e.customShader).shaderOptions.defines.length?s.shaderOptions.defines.join(\"\\n\"):\"\";o=t.getEngine().createEffectForParticles(s.shaderPath.fragmentElement,s.shaderOptions.uniforms,s.shaderOptions.samplers,a)}var l=new _(n,e.capacity,t,o,e.isAnimationSheetEnabled);if(l.customShader=s,e.id&&(l.id=e.id),e.subEmitters){l.subEmitters=[];for(var c=0,h=e.subEmitters;c<h.length;c++){for(var u=[],d=0,f=h[c];d<f.length;d++){var p=f[d];u.push(xt.SubEmitter.Parse(p,t,i))}l.subEmitters.push(u)}}return _._Parse(e,l,t,i),l.textureMask=xt.Color4.FromArray(e.textureMask),e.preventAutoStart&&(l.preventAutoStart=e.preventAutoStart),r||l.preventAutoStart||l.start(),l},_.BILLBOARDMODE_Y=2,_.BILLBOARDMODE_ALL=7,_.BILLBOARDMODE_STRETCHED=8,_})(xt.BaseParticleSystem),xt.ParticleSystem=Pt,At=$a||($a={}),St=(function(){function t(){this.direction1=new At.Vector3(0,1,0),this.direction2=new At.Vector3(0,1,0),this.minEmitBox=new At.Vector3(-.5,-.5,-.5),this.maxEmitBox=new At.Vector3(.5,.5,.5)}return t.prototype.startDirectionFunction=function(e,t,i){var r=At.Scalar.RandomRange(this.direction1.x,this.direction2.x),n=At.Scalar.RandomRange(this.direction1.y,this.direction2.y),o=At.Scalar.RandomRange(this.direction1.z,this.direction2.z);At.Vector3.TransformNormalFromFloatsToRef(r,n,o,e,t)},t.prototype.startPositionFunction=function(e,t,i){var r=At.Scalar.RandomRange(this.minEmitBox.x,this.maxEmitBox.x),n=At.Scalar.RandomRange(this.minEmitBox.y,this.maxEmitBox.y),o=At.Scalar.RandomRange(this.minEmitBox.z,this.maxEmitBox.z);At.Vector3.TransformCoordinatesFromFloatsToRef(r,n,o,e,t)},t.prototype.clone=function(){var e=new t;return At.Tools.DeepCopy(this,e),e},t.prototype.applyToShader=function(e){e.setVector3(\"direction1\",this.direction1),e.setVector3(\"direction2\",this.direction2),e.setVector3(\"minEmitBox\",this.minEmitBox),e.setVector3(\"maxEmitBox\",this.maxEmitBox)},t.prototype.getEffectDefines=function(){return\"#define BOXEMITTER\"},t.prototype.getClassName=function(){return\"BoxParticleEmitter\"},t.prototype.serialize=function(){var e={};return e.type=this.getClassName(),e.direction1=this.direction1.asArray(),e.direction2=this.direction2.asArray(),e.minEmitBox=this.minEmitBox.asArray(),e.maxEmitBox=this.maxEmitBox.asArray(),e},t.prototype.parse=function(e){At.Vector3.FromArrayToRef(e.direction1,0,this.direction1),At.Vector3.FromArrayToRef(e.direction2,0,this.direction2),At.Vector3.FromArrayToRef(e.minEmitBox,0,this.minEmitBox),At.Vector3.FromArrayToRef(e.maxEmitBox,0,this.maxEmitBox)},t})(),At.BoxParticleEmitter=St,Mt=$a||($a={}),Rt=(function(){function t(e,t,i,r){void 0===e&&(e=1),void 0===t&&(t=1),void 0===i&&(i=1),void 0===r&&(r=0),this.radius=e,this.height=t,this.radiusRange=i,this.directionRandomizer=r}return t.prototype.startDirectionFunction=function(e,t,i){var r=i.position.subtract(e.getTranslation()).normalize(),n=Mt.Scalar.RandomRange(-this.directionRandomizer/2,this.directionRandomizer/2),o=Math.atan2(r.x,r.z);o+=Mt.Scalar.RandomRange(-Math.PI/2,Math.PI/2)*this.directionRandomizer,r.y=n,r.x=Math.sin(o),r.z=Math.cos(o),r.normalize(),Mt.Vector3.TransformNormalFromFloatsToRef(r.x,r.y,r.z,e,t)},t.prototype.startPositionFunction=function(e,t,i){var r=Mt.Scalar.RandomRange(-this.height/2,this.height/2),n=Mt.Scalar.RandomRange(0,2*Math.PI),o=Mt.Scalar.RandomRange((1-this.radiusRange)*(1-this.radiusRange),1),s=Math.sqrt(o)*this.radius,a=s*Math.cos(n),l=s*Math.sin(n);Mt.Vector3.TransformCoordinatesFromFloatsToRef(a,r,l,e,t)},t.prototype.clone=function(){var e=new t(this.radius,this.directionRandomizer);return Mt.Tools.DeepCopy(this,e),e},t.prototype.applyToShader=function(e){e.setFloat(\"radius\",this.radius),e.setFloat(\"height\",this.height),e.setFloat(\"radiusRange\",this.radiusRange),e.setFloat(\"directionRandomizer\",this.directionRandomizer)},t.prototype.getEffectDefines=function(){return\"#define CYLINDEREMITTER\"},t.prototype.getClassName=function(){return\"CylinderParticleEmitter\"},t.prototype.serialize=function(){var e={};return e.type=this.getClassName(),e.radius=this.radius,e.height=this.height,e.radiusRange=this.radiusRange,e.directionRandomizer=this.directionRandomizer,e},t.prototype.parse=function(e){this.radius=e.radius,this.height=e.height,this.radiusRange=e.radiusRange,this.directionRandomizer=e.directionRandomizer},t})(),Ct=(function(s){function t(e,t,i,r,n){void 0===e&&(e=1),void 0===t&&(t=1),void 0===i&&(i=1),void 0===r&&(r=new Mt.Vector3(0,1,0)),void 0===n&&(n=new Mt.Vector3(0,1,0));var o=s.call(this,e,t,i)||this;return o.direction1=r,o.direction2=n,o}return T(t,s),t.prototype.startDirectionFunction=function(e,t,i){var r=Mt.Scalar.RandomRange(this.direction1.x,this.direction2.x),n=Mt.Scalar.RandomRange(this.direction1.y,this.direction2.y),o=Mt.Scalar.RandomRange(this.direction1.z,this.direction2.z);Mt.Vector3.TransformNormalFromFloatsToRef(r,n,o,e,t)},t.prototype.clone=function(){var e=new t(this.radius,this.height,this.radiusRange,this.direction1,this.direction2);return Mt.Tools.DeepCopy(this,e),e},t.prototype.applyToShader=function(e){e.setFloat(\"radius\",this.radius),e.setFloat(\"height\",this.height),e.setFloat(\"radiusRange\",this.radiusRange),e.setVector3(\"direction1\",this.direction1),e.setVector3(\"direction2\",this.direction2)},t.prototype.getEffectDefines=function(){return\"#define CYLINDEREMITTER\\n#define DIRECTEDCYLINDEREMITTER\"},t.prototype.getClassName=function(){return\"CylinderDirectedParticleEmitter\"},t.prototype.serialize=function(){var e=s.prototype.serialize.call(this);return e.direction1=this.direction1.asArray(),e.direction2=this.direction2.asArray(),e},t.prototype.parse=function(e){s.prototype.parse.call(this,e),this.direction1.copyFrom(e.direction1),this.direction2.copyFrom(e.direction2)},t})(Mt.CylinderParticleEmitter=Rt),Mt.CylinderDirectedParticleEmitter=Ct,Ot=$a||($a={}),Dt=(function(){function t(e,t,i){void 0===e&&(e=1),void 0===t&&(t=Math.PI),void 0===i&&(i=0),this.directionRandomizer=i,this.radiusRange=1,this.heightRange=1,this.emitFromSpawnPointOnly=!1,this.angle=t,this.radius=e}return Object.defineProperty(t.prototype,\"radius\",{get:function(){return this._radius},set:function(e){this._radius=e,this._buildHeight()},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,\"angle\",{get:function(){return this._angle},set:function(e){this._angle=e,this._buildHeight()},enumerable:!0,configurable:!0}),t.prototype._buildHeight=function(){0!==this._angle?this._height=this._radius/Math.tan(this._angle/2):this._height=1},t.prototype.startDirectionFunction=function(e,t,i){if(1===Math.abs(Math.cos(this._angle)))Ot.Vector3.TransformNormalFromFloatsToRef(0,1,0,e,t);else{var r=i.position.subtract(e.getTranslation()).normalize(),n=Ot.Scalar.RandomRange(0,this.directionRandomizer),o=Ot.Scalar.RandomRange(0,this.directionRandomizer),s=Ot.Scalar.RandomRange(0,this.directionRandomizer);r.x+=n,r.y+=o,r.z+=s,r.normalize(),Ot.Vector3.TransformNormalFromFloatsToRef(r.x,r.y,r.z,e,t)}},t.prototype.startPositionFunction=function(e,t,i){var r,n=Ot.Scalar.RandomRange(0,2*Math.PI);r=this.emitFromSpawnPointOnly?1e-4:1-(r=Ot.Scalar.RandomRange(0,this.heightRange))*r;var o=this._radius-Ot.Scalar.RandomRange(0,this._radius*this.radiusRange),s=(o*=r)*Math.sin(n),a=o*Math.cos(n),l=r*this._height;Ot.Vector3.TransformCoordinatesFromFloatsToRef(s,l,a,e,t)},t.prototype.clone=function(){var e=new t(this._radius,this._angle,this.directionRandomizer);return Ot.Tools.DeepCopy(this,e),e},t.prototype.applyToShader=function(e){e.setFloat2(\"radius\",this._radius,this.radiusRange),e.setFloat(\"coneAngle\",this._angle),e.setFloat2(\"height\",this._height,this.heightRange),e.setFloat(\"directionRandomizer\",this.directionRandomizer)},t.prototype.getEffectDefines=function(){var e=\"#define CONEEMITTER\";return this.emitFromSpawnPointOnly&&(e+=\"\\n#define CONEEMITTERSPAWNPOINT\"),e},t.prototype.getClassName=function(){return\"ConeParticleEmitter\"},t.prototype.serialize=function(){var e={};return e.type=this.getClassName(),e.radius=this._radius,e.angle=this._angle,e.directionRandomizer=this.directionRandomizer,e},t.prototype.parse=function(e){this.radius=e.radius,this.angle=e.angle,this.directionRandomizer=e.directionRandomizer},t})(),Ot.ConeParticleEmitter=Dt,It=$a||($a={}),wt=(function(){function t(e,t,i){void 0===e&&(e=1),void 0===t&&(t=1),void 0===i&&(i=0),this.radius=e,this.radiusRange=t,this.directionRandomizer=i}return t.prototype.startDirectionFunction=function(e,t,i){var r=i.position.subtract(e.getTranslation()).normalize(),n=It.Scalar.RandomRange(0,this.directionRandomizer),o=It.Scalar.RandomRange(0,this.directionRandomizer),s=It.Scalar.RandomRange(0,this.directionRandomizer);r.x+=n,r.y+=o,r.z+=s,r.normalize(),It.Vector3.TransformNormalFromFloatsToRef(r.x,r.y,r.z,e,t)},t.prototype.startPositionFunction=function(e,t,i){var r=this.radius-It.Scalar.RandomRange(0,this.radius*this.radiusRange),n=It.Scalar.RandomRange(0,1),o=It.Scalar.RandomRange(0,2*Math.PI),s=Math.acos(2*n-1),a=r*Math.cos(o)*Math.sin(s),l=r*Math.cos(s),c=r*Math.sin(o)*Math.sin(s);It.Vector3.TransformCoordinatesFromFloatsToRef(a,l,c,e,t)},t.prototype.clone=function(){var e=new t(this.radius,this.directionRandomizer);return It.Tools.DeepCopy(this,e),e},t.prototype.applyToShader=function(e){e.setFloat(\"radius\",this.radius),e.setFloat(\"radiusRange\",this.radiusRange),e.setFloat(\"directionRandomizer\",this.directionRandomizer)},t.prototype.getEffectDefines=function(){return\"#define SPHEREEMITTER\"},t.prototype.getClassName=function(){return\"SphereParticleEmitter\"},t.prototype.serialize=function(){var e={};return e.type=this.getClassName(),e.radius=this.radius,e.radiusRange=this.radiusRange,e.directionRandomizer=this.directionRandomizer,e},t.prototype.parse=function(e){this.radius=e.radius,this.radiusRange=e.radiusRange,this.directionRandomizer=e.directionRandomizer},t})(),Lt=(function(n){function t(e,t,i){void 0===e&&(e=1),void 0===t&&(t=new It.Vector3(0,1,0)),void 0===i&&(i=new It.Vector3(0,1,0));var r=n.call(this,e)||this;return r.direction1=t,r.direction2=i,r}return T(t,n),t.prototype.startDirectionFunction=function(e,t,i){var r=It.Scalar.RandomRange(this.direction1.x,this.direction2.x),n=It.Scalar.RandomRange(this.direction1.y,this.direction2.y),o=It.Scalar.RandomRange(this.direction1.z,this.direction2.z);It.Vector3.TransformNormalFromFloatsToRef(r,n,o,e,t)},t.prototype.clone=function(){var e=new t(this.radius,this.direction1,this.direction2);return It.Tools.DeepCopy(this,e),e},t.prototype.applyToShader=function(e){e.setFloat(\"radius\",this.radius),e.setFloat(\"radiusRange\",this.radiusRange),e.setVector3(\"direction1\",this.direction1),e.setVector3(\"direction2\",this.direction2)},t.prototype.getEffectDefines=function(){return\"#define SPHEREEMITTER\\n#define DIRECTEDSPHEREEMITTER\"},t.prototype.getClassName=function(){return\"SphereDirectedParticleEmitter\"},t.prototype.serialize=function(){var e=n.prototype.serialize.call(this);return e.direction1=this.direction1.asArray(),e.direction2=this.direction2.asArray(),e},t.prototype.parse=function(e){n.prototype.parse.call(this,e),this.direction1.copyFrom(e.direction1),this.direction2.copyFrom(e.direction2)},t})(It.SphereParticleEmitter=wt),It.SphereDirectedParticleEmitter=Lt,Ft=$a||($a={}),Bt=(function(){function t(e,t,i){void 0===e&&(e=1),void 0===t&&(t=1),void 0===i&&(i=0),this.radius=e,this.radiusRange=t,this.directionRandomizer=i}return t.prototype.startDirectionFunction=function(e,t,i){var r=i.position.subtract(e.getTranslation()).normalize(),n=Ft.Scalar.RandomRange(0,this.directionRandomizer),o=Ft.Scalar.RandomRange(0,this.directionRandomizer),s=Ft.Scalar.RandomRange(0,this.directionRandomizer);r.x+=n,r.y+=o,r.z+=s,r.normalize(),Ft.Vector3.TransformNormalFromFloatsToRef(r.x,r.y,r.z,e,t)},t.prototype.startPositionFunction=function(e,t,i){var r=this.radius-Ft.Scalar.RandomRange(0,this.radius*this.radiusRange),n=Ft.Scalar.RandomRange(0,1),o=Ft.Scalar.RandomRange(0,2*Math.PI),s=Math.acos(2*n-1),a=r*Math.cos(o)*Math.sin(s),l=r*Math.cos(s),c=r*Math.sin(o)*Math.sin(s);Ft.Vector3.TransformCoordinatesFromFloatsToRef(a,Math.abs(l),c,e,t)},t.prototype.clone=function(){var e=new t(this.radius,this.directionRandomizer);return Ft.Tools.DeepCopy(this,e),e},t.prototype.applyToShader=function(e){e.setFloat(\"radius\",this.radius),e.setFloat(\"radiusRange\",this.radiusRange),e.setFloat(\"directionRandomizer\",this.directionRandomizer)},t.prototype.getEffectDefines=function(){return\"#define HEMISPHERICEMITTER\"},t.prototype.getClassName=function(){return\"HemisphericParticleEmitter\"},t.prototype.serialize=function(){var e={};return e.type=this.getClassName(),e.radius=this.radius,e.radiusRange=this.radiusRange,e.directionRandomizer=this.directionRandomizer,e},t.prototype.parse=function(e){this.radius=e.radius,this.radiusRange=e.radiusRange,this.directionRandomizer=e.directionRandomizer},t})(),Ft.HemisphericParticleEmitter=Bt,Nt=$a||($a={}),Vt=(function(){function t(){this.direction1=new Nt.Vector3(0,1,0),this.direction2=new Nt.Vector3(0,1,0)}return t.prototype.startDirectionFunction=function(e,t,i){var r=Nt.Scalar.RandomRange(this.direction1.x,this.direction2.x),n=Nt.Scalar.RandomRange(this.direction1.y,this.direction2.y),o=Nt.Scalar.RandomRange(this.direction1.z,this.direction2.z);Nt.Vector3.TransformNormalFromFloatsToRef(r,n,o,e,t)},t.prototype.startPositionFunction=function(e,t,i){Nt.Vector3.TransformCoordinatesFromFloatsToRef(0,0,0,e,t)},t.prototype.clone=function(){var e=new t;return Nt.Tools.DeepCopy(this,e),e},t.prototype.applyToShader=function(e){e.setVector3(\"direction1\",this.direction1),e.setVector3(\"direction2\",this.direction2)},t.prototype.getEffectDefines=function(){return\"#define POINTEMITTER\"},t.prototype.getClassName=function(){return\"PointParticleEmitter\"},t.prototype.serialize=function(){var e={};return e.type=this.getClassName(),e.direction1=this.direction1.asArray(),e.direction2=this.direction2.asArray(),e},t.prototype.parse=function(e){Nt.Vector3.FromArrayToRef(e.direction1,0,this.direction1),Nt.Vector3.FromArrayToRef(e.direction2,0,this.direction2)},t})(),Nt.PointParticleEmitter=Vt,(Ut=$a||($a={})).AbstractScene.AddParser(Ut.SceneComponentConstants.NAME_PARTICLESYSTEM,(function(e,t,i,r){var n=Ut.AbstractScene.GetIndividualParser(Ut.SceneComponentConstants.NAME_PARTICLESYSTEM);if(n&&void 0!==e.particleSystems&&null!==e.particleSystems)for(var o=0,s=e.particleSystems.length;o<s;o++){var a=e.particleSystems[o];i.particleSystems.push(n(a,t,r))}})),Ut.AbstractScene.AddIndividualParser(Ut.SceneComponentConstants.NAME_PARTICLESYSTEM,(function(e,t,i){return e.activeParticleCount?Ut.GPUParticleSystem.Parse(e,t,i):Ut.ParticleSystem.Parse(e,t,i)})),Ut.Engine.prototype.createEffectForParticles=function(e,t,i,r,n,o,s){void 0===t&&(t=[]),void 0===i&&(i=[]),void 0===r&&(r=\"\");var a=Ut.ParticleSystem._GetAttributeNamesOrOptions(),l=Ut.ParticleSystem._GetEffectCreationOptions();return-1===r.indexOf(\" BILLBOARD\")&&(r+=\"\\n#define BILLBOARD\\n\"),-1===i.indexOf(\"diffuseSampler\")&&i.push(\"diffuseSampler\"),this.createEffect({vertex:\"particles\",fragmentElement:e},a,l.concat(t),i,r,n,o,s)},Ut.Mesh.prototype.getEmittedParticleSystems=function(){for(var e=new Array,t=0;t<this.getScene().particleSystems.length;t++){var i=this.getScene().particleSystems[t];i.emitter===this&&e.push(i)}return e},Ut.Mesh.prototype.getHierarchyEmittedParticleSystems=function(){var e=new Array,t=this.getDescendants();t.push(this);for(var i=0;i<this.getScene().particleSystems.length;i++){var r=this.getScene().particleSystems[i],n=r.emitter;n.position&&-1!==t.indexOf(n)&&e.push(r)}return e},(function(s){var t,e;(e=t=s.SubEmitterType||(s.SubEmitterType={}))[e.ATTACHED=0]=\"ATTACHED\",e[e.END=1]=\"END\";var i=(function(){function o(e){this.particleSystem=e,this.type=t.END,this.inheritDirection=!1,this.inheritedVelocityAmount=0,e.emitter&&e.emitter.dispose||(e.emitter=new s.AbstractMesh(\"SubemitterSystemEmitter\",e.getScene())),e.onDisposeObservable.add((function(){e.emitter&&e.emitter.dispose&&e.emitter.dispose()}))}return o.prototype.clone=function(){var e=this.particleSystem.emitter;e?e instanceof s.Vector3?e=e.clone():e instanceof s.AbstractMesh&&((e=new s.Mesh(\"\",e.getScene())).isVisible=!1):e=new s.Vector3;var t=new o(this.particleSystem.clone(\"\",e));return t.type=this.type,t.inheritDirection=this.inheritDirection,t.inheritedVelocityAmount=this.inheritedVelocityAmount,t.particleSystem._disposeEmitterOnDispose=!0,t.particleSystem.disposeOnStop=!0,t},o.prototype.serialize=function(){var e={};return e.type=this.type,e.inheritDirection=this.inheritDirection,e.inheritedVelocityAmount=this.inheritedVelocityAmount,e.particleSystem=this.particleSystem.serialize(),e},o.Parse=function(e,t,i){var r=e.particleSystem,n=new o(s.ParticleSystem.Parse(r,t,i));return n.type=e.type,n.inheritDirection=e.inheritDirection,n.inheritedVelocityAmount=e.inheritedVelocityAmount,n.particleSystem._isSubEmitter=!0,n},o.prototype.dispose=function(){this.particleSystem.dispose()},o})();s.SubEmitter=i})($a||($a={})),zt=$a||($a={}),Gt=(function(o){function c(e,t,i,r){void 0===r&&(r={});var n=o.call(this,e,t)||this;return n._textures={},n._textureArrays={},n._floats={},n._ints={},n._floatsArrays={},n._colors3={},n._colors3Arrays={},n._colors4={},n._vectors2={},n._vectors3={},n._vectors4={},n._matrices={},n._matrices3x3={},n._matrices2x2={},n._vectors2Arrays={},n._vectors3Arrays={},n._cachedWorldViewMatrix=new zt.Matrix,n._shaderPath=i,n._options=ae({needAlphaBlending:!1,needAlphaTesting:!1,attributes:[\"position\",\"normal\",\"uv\"],uniforms:[\"worldViewProjection\"],uniformBuffers:[],samplers:[],defines:[]},r),n}return T(c,o),c.prototype.getClassName=function(){return\"ShaderMaterial\"},c.prototype.needAlphaBlending=function(){return this.alpha<1||this._options.needAlphaBlending},c.prototype.needAlphaTesting=function(){return this._options.needAlphaTesting},c.prototype._checkUniform=function(e){-1===this._options.uniforms.indexOf(e)&&this._options.uniforms.push(e)},c.prototype.setTexture=function(e,t){return-1===this._options.samplers.indexOf(e)&&this._options.samplers.push(e),this._textures[e]=t,this},c.prototype.setTextureArray=function(e,t){return-1===this._options.samplers.indexOf(e)&&this._options.samplers.push(e),this._checkUniform(e),this._textureArrays[e]=t,this},c.prototype.setFloat=function(e,t){return this._checkUniform(e),this._floats[e]=t,this},c.prototype.setInt=function(e,t){return this._checkUniform(e),this._ints[e]=t,this},c.prototype.setFloats=function(e,t){return this._checkUniform(e),this._floatsArrays[e]=t,this},c.prototype.setColor3=function(e,t){return this._checkUniform(e),this._colors3[e]=t,this},c.prototype.setColor3Array=function(e,t){return this._checkUniform(e),this._colors3Arrays[e]=t.reduce((function(e,t){return t.toArray(e,e.length),e}),[]),this},c.prototype.setColor4=function(e,t){return this._checkUniform(e),this._colors4[e]=t,this},c.prototype.setVector2=function(e,t){return this._checkUniform(e),this._vectors2[e]=t,this},c.prototype.setVector3=function(e,t){return this._checkUniform(e),this._vectors3[e]=t,this},c.prototype.setVector4=function(e,t){return this._checkUniform(e),this._vectors4[e]=t,this},c.prototype.setMatrix=function(e,t){return this._checkUniform(e),this._matrices[e]=t,this},c.prototype.setMatrix3x3=function(e,t){return this._checkUniform(e),this._matrices3x3[e]=t,this},c.prototype.setMatrix2x2=function(e,t){return this._checkUniform(e),this._matrices2x2[e]=t,this},c.prototype.setArray2=function(e,t){return this._checkUniform(e),this._vectors2Arrays[e]=t,this},c.prototype.setArray3=function(e,t){return this._checkUniform(e),this._vectors3Arrays[e]=t,this},c.prototype._checkCache=function(e,t,i){return!t||(this._effect&&this._effect.defines.indexOf(\"#define INSTANCES\"),!1)},c.prototype.isReady=function(e,t){var i=this.getScene(),r=i.getEngine();if(!this.checkReadyOnEveryCall&&this._renderId===i.getRenderId()&&this._checkCache(i,e,t))return!0;for(var n=[],o=[],s=new zt.EffectFallbacks,a=0;a<this._options.defines.length;a++)n.push(this._options.defines[a]);for(a=0;a<this._options.attributes.length;a++)o.push(this._options.attributes[a]);for(var l in e&&e.isVerticesDataPresent(zt.VertexBuffer.ColorKind)&&(o.push(zt.VertexBuffer.ColorKind),n.push(\"#define VERTEXCOLOR\")),t&&(n.push(\"#define INSTANCES\"),zt.MaterialHelper.PrepareAttributesForInstances(o,n)),e&&e.useBones&&e.computeBonesUsingShaders&&e.skeleton?(o.push(zt.VertexBuffer.MatricesIndicesKind),o.push(zt.VertexBuffer.MatricesWeightsKind),4<e.numBoneInfluencers&&(o.push(zt.VertexBuffer.MatricesIndicesExtraKind),o.push(zt.VertexBuffer.MatricesWeightsExtraKind)),n.push(\"#define NUM_BONE_INFLUENCERS \"+e.numBoneInfluencers),n.push(\"#define BonesPerMesh \"+(e.skeleton.bones.length+1)),s.addCPUSkinningFallback(0,e),-1===this._options.uniforms.indexOf(\"mBones\")&&this._options.uniforms.push(\"mBones\")):n.push(\"#define NUM_BONE_INFLUENCERS 0\"),this._textures)if(!this._textures[l].isReady())return!1;e&&this._shouldTurnAlphaTestOn(e)&&n.push(\"#define ALPHATEST\");var c=this._effect,h=n.join(\"\\n\");return this._effect=r.createEffect(this._shaderPath,{attributes:o,uniformsNames:this._options.uniforms,uniformBuffersNames:this._options.uniformBuffers,samplers:this._options.samplers,defines:h,fallbacks:s,onCompiled:this.onCompiled,onError:this.onError},r),!!this._effect.isReady()&&(c!==this._effect&&i.resetCachedMaterial(),this._renderId=i.getRenderId(),!0)},c.prototype.bindOnlyWorldMatrix=function(e){var t=this.getScene();this._effect&&(-1!==this._options.uniforms.indexOf(\"world\")&&this._effect.setMatrix(\"world\",e),-1!==this._options.uniforms.indexOf(\"worldView\")&&(e.multiplyToRef(t.getViewMatrix(),this._cachedWorldViewMatrix),this._effect.setMatrix(\"worldView\",this._cachedWorldViewMatrix)),-1!==this._options.uniforms.indexOf(\"worldViewProjection\")&&this._effect.setMatrix(\"worldViewProjection\",e.multiply(t.getTransformMatrix())))},c.prototype.bind=function(e,t){if(this.bindOnlyWorldMatrix(e),this._effect&&this.getScene().getCachedMaterial()!==this){var i;for(i in-1!==this._options.uniforms.indexOf(\"view\")&&this._effect.setMatrix(\"view\",this.getScene().getViewMatrix()),-1!==this._options.uniforms.indexOf(\"projection\")&&this._effect.setMatrix(\"projection\",this.getScene().getProjectionMatrix()),-1!==this._options.uniforms.indexOf(\"viewProjection\")&&this._effect.setMatrix(\"viewProjection\",this.getScene().getTransformMatrix()),zt.MaterialHelper.BindBonesParameters(t,this._effect),this._textures)this._effect.setTexture(i,this._textures[i]);for(i in this._textureArrays)this._effect.setTextureArray(i,this._textureArrays[i]);for(i in this._ints)this._effect.setInt(i,this._ints[i]);for(i in this._floats)this._effect.setFloat(i,this._floats[i]);for(i in this._floatsArrays)this._effect.setArray(i,this._floatsArrays[i]);for(i in this._colors3)this._effect.setColor3(i,this._colors3[i]);for(i in this._colors3Arrays)this._effect.setArray3(i,this._colors3Arrays[i]);for(i in this._colors4){var r=this._colors4[i];this._effect.setFloat4(i,r.r,r.g,r.b,r.a)}for(i in this._vectors2)this._effect.setVector2(i,this._vectors2[i]);for(i in this._vectors3)this._effect.setVector3(i,this._vectors3[i]);for(i in this._vectors4)this._effect.setVector4(i,this._vectors4[i]);for(i in this._matrices)this._effect.setMatrix(i,this._matrices[i]);for(i in this._matrices3x3)this._effect.setMatrix3x3(i,this._matrices3x3[i]);for(i in this._matrices2x2)this._effect.setMatrix2x2(i,this._matrices2x2[i]);for(i in this._vectors2Arrays)this._effect.setArray2(i,this._vectors2Arrays[i]);for(i in this._vectors3Arrays)this._effect.setArray3(i,this._vectors3Arrays[i])}this._afterBind(t)},c.prototype.getActiveTextures=function(){var e=o.prototype.getActiveTextures.call(this);for(var t in this._textures)e.push(this._textures[t]);for(var t in this._textureArrays)for(var i=this._textureArrays[t],r=0;r<i.length;r++)e.push(i[r]);return e},c.prototype.hasTexture=function(e){if(o.prototype.hasTexture.call(this,e))return!0;for(var t in this._textures)if(this._textures[t]===e)return!0;for(var t in this._textureArrays)for(var i=this._textureArrays[t],r=0;r<i.length;r++)if(i[r]===e)return!0;return!1},c.prototype.clone=function(e){return new c(e,this.getScene(),this._shaderPath,this._options)},c.prototype.dispose=function(e,t){if(t){var i;for(i in this._textures)this._textures[i].dispose();for(i in this._textureArrays)for(var r=this._textureArrays[i],n=0;n<r.length;n++)r[n].dispose()}this._textures={},o.prototype.dispose.call(this,e,t)},c.prototype.serialize=function(){var e,t=zt.SerializationHelper.Serialize(this);for(e in t.customType=\"BABYLON.ShaderMaterial\",t.options=this._options,t.shaderPath=this._shaderPath,t.textures={},this._textures)t.textures[e]=this._textures[e].serialize();for(e in t.textureArrays={},this._textureArrays){t.textureArrays[e]=[];for(var i=this._textureArrays[e],r=0;r<i.length;r++)t.textureArrays[e].push(i[r].serialize())}for(e in t.floats={},this._floats)t.floats[e]=this._floats[e];for(e in t.FloatArrays={},this._floatsArrays)t.FloatArrays[e]=this._floatsArrays[e];for(e in t.colors3={},this._colors3)t.colors3[e]=this._colors3[e].asArray();for(e in t.colors3Arrays={},this._colors3Arrays)t.colors3Arrays[e]=this._colors3Arrays[e];for(e in t.colors4={},this._colors4)t.colors4[e]=this._colors4[e].asArray();for(e in t.vectors2={},this._vectors2)t.vectors2[e]=this._vectors2[e].asArray();for(e in t.vectors3={},this._vectors3)t.vectors3[e]=this._vectors3[e].asArray();for(e in t.vectors4={},this._vectors4)t.vectors4[e]=this._vectors4[e].asArray();for(e in t.matrices={},this._matrices)t.matrices[e]=this._matrices[e].asArray();for(e in t.matrices3x3={},this._matrices3x3)t.matrices3x3[e]=this._matrices3x3[e];for(e in t.matrices2x2={},this._matrices2x2)t.matrices2x2[e]=this._matrices2x2[e];for(e in t.vectors2Arrays={},this._vectors2Arrays)t.vectors2Arrays[e]=this._vectors2Arrays[e];for(e in t.vectors3Arrays={},this._vectors3Arrays)t.vectors3Arrays[e]=this._vectors3Arrays[e];return t},c.Parse=function(e,t,i){var r,n=zt.SerializationHelper.Parse((function(){return new c(e.name,t,e.shaderPath,e.options)}),e,t,i);for(r in e.textures)n.setTexture(r,zt.Texture.Parse(e.textures[r],t,i));for(r in e.textureArrays){for(var o=e.textureArrays[r],s=new Array,a=0;a<o.length;a++)s.push(zt.Texture.Parse(o[a],t,i));n.setTextureArray(r,s)}for(r in e.floats)n.setFloat(r,e.floats[r]);for(r in e.floatsArrays)n.setFloats(r,e.floatsArrays[r]);for(r in e.colors3)n.setColor3(r,zt.Color3.FromArray(e.colors3[r]));for(r in e.colors3Arrays){var l=e.colors3Arrays[r].reduce((function(e,t,i){return i%3==0?e.push([t]):e[e.length-1].push(t),e}),[]).map((function(e){return zt.Color3.FromArray(e)}));n.setColor3Array(r,l)}for(r in e.colors4)n.setColor4(r,zt.Color4.FromArray(e.colors4[r]));for(r in e.vectors2)n.setVector2(r,zt.Vector2.FromArray(e.vectors2[r]));for(r in e.vectors3)n.setVector3(r,zt.Vector3.FromArray(e.vectors3[r]));for(r in e.vectors4)n.setVector4(r,zt.Vector4.FromArray(e.vectors4[r]));for(r in e.matrices)n.setMatrix(r,zt.Matrix.FromArray(e.matrices[r]));for(r in e.matrices3x3)n.setMatrix3x3(r,e.matrices3x3[r]);for(r in e.matrices2x2)n.setMatrix2x2(r,e.matrices2x2[r]);for(r in e.vectors2Arrays)n.setArray2(r,e.vectors2Arrays[r]);for(r in e.vectors3Arrays)n.setArray3(r,e.vectors3Arrays[r]);return n},c})(zt.Material),zt.ShaderMaterial=Gt,kt=$a||($a={}),Wt=(function(r){function n(e,t){var i=r.call(this,e,t)||this;return i.generateOctree=!1,i}return T(n,r),n.prototype.getClassName=function(){return\"GroundMesh\"},Object.defineProperty(n.prototype,\"subdivisions\",{get:function(){return Math.min(this._subdivisionsX,this._subdivisionsY)},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,\"subdivisionsX\",{get:function(){return this._subdivisionsX},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,\"subdivisionsY\",{get:function(){return this._subdivisionsY},enumerable:!0,configurable:!0}),n.prototype.optimize=function(e,t){void 0===t&&(t=32),this._subdivisionsX=e,this._subdivisionsY=e,this.subdivide(e);this.createOrUpdateSubmeshesOctree&&this.createOrUpdateSubmeshesOctree(t)},n.prototype.getHeightAtCoordinates=function(e,t){var i=this.getWorldMatrix(),r=kt.Tmp.Matrix[5];i.invertToRef(r);var n=kt.Tmp.Vector3[8];if(kt.Vector3.TransformCoordinatesFromFloatsToRef(e,0,t,r,n),e=n.x,t=n.z,e<this._minX||e>this._maxX||t<this._minZ||t>this._maxZ)return this.position.y;this._heightQuads&&0!=this._heightQuads.length||(this._initHeightQuads(),this._computeHeightQuads());var o=this._getFacetAt(e,t),s=-(o.x*e+o.z*t+o.w)/o.y;return kt.Vector3.TransformCoordinatesFromFloatsToRef(0,s,0,i,n),n.y},n.prototype.getNormalAtCoordinates=function(e,t){var i=new kt.Vector3(0,1,0);return this.getNormalAtCoordinatesToRef(e,t,i),i},n.prototype.getNormalAtCoordinatesToRef=function(e,t,i){var r=this.getWorldMatrix(),n=kt.Tmp.Matrix[5];r.invertToRef(n);var o=kt.Tmp.Vector3[8];if(kt.Vector3.TransformCoordinatesFromFloatsToRef(e,0,t,n,o),e=o.x,t=o.z,e<this._minX||e>this._maxX||t<this._minZ||t>this._maxZ)return this;this._heightQuads&&0!=this._heightQuads.length||(this._initHeightQuads(),this._computeHeightQuads());var s=this._getFacetAt(e,t);return kt.Vector3.TransformNormalFromFloatsToRef(s.x,s.y,s.z,r,i),this},n.prototype.updateCoordinateHeights=function(){return this._heightQuads&&0!=this._heightQuads.length||this._initHeightQuads(),this._computeHeightQuads(),this},n.prototype._getFacetAt=function(e,t){var i=Math.floor((e+this._maxX)*this._subdivisionsX/this._width),r=Math.floor(-(t+this._maxZ)*this._subdivisionsY/this._height+this._subdivisionsY),n=this._heightQuads[r*this._subdivisionsX+i];return t<n.slope.x*e+n.slope.y?n.facet1:n.facet2},n.prototype._initHeightQuads=function(){var e=this._subdivisionsX,t=this._subdivisionsY;this._heightQuads=new Array;for(var i=0;i<t;i++)for(var r=0;r<e;r++){var n={slope:kt.Vector2.Zero(),facet1:new kt.Vector4(0,0,0,0),facet2:new kt.Vector4(0,0,0,0)};this._heightQuads[i*e+r]=n}return this},n.prototype._computeHeightQuads=function(){var e=this.getVerticesData(kt.VertexBuffer.PositionKind);if(!e)return this;for(var t=kt.Tmp.Vector3[3],i=kt.Tmp.Vector3[2],r=kt.Tmp.Vector3[1],n=kt.Tmp.Vector3[0],o=kt.Tmp.Vector3[4],s=kt.Tmp.Vector3[5],a=kt.Tmp.Vector3[6],l=kt.Tmp.Vector3[7],c=kt.Tmp.Vector3[8],h=0,u=0,d=0,f=0,p=0,_=0,m=0,g=this._subdivisionsX,v=this._subdivisionsY,y=0;y<v;y++)for(var b=0;b<g;b++){h=3*b,u=y*(g+1)*3,d=(y+1)*(g+1)*3,t.x=e[u+h],t.y=e[u+h+1],t.z=e[u+h+2],i.x=e[u+h+3],i.y=e[u+h+4],i.z=e[u+h+5],r.x=e[d+h],r.y=e[d+h+1],r.z=e[d+h+2],n.x=e[d+h+3],n.y=e[d+h+4],n.z=e[d+h+5],f=(n.z-t.z)/(n.x-t.x),p=t.z-f*t.x,i.subtractToRef(t,o),r.subtractToRef(t,s),n.subtractToRef(t,a),kt.Vector3.CrossToRef(a,s,l),kt.Vector3.CrossToRef(o,a,c),l.normalize(),c.normalize(),_=-(l.x*t.x+l.y*t.y+l.z*t.z),m=-(c.x*i.x+c.y*i.y+c.z*i.z);var T=this._heightQuads[y*g+b];T.slope.copyFromFloats(f,p),T.facet1.copyFromFloats(l.x,l.y,l.z,_),T.facet2.copyFromFloats(c.x,c.y,c.z,m)}return this},n.prototype.serialize=function(e){r.prototype.serialize.call(this,e),e.subdivisionsX=this._subdivisionsX,e.subdivisionsY=this._subdivisionsY,e.minX=this._minX,e.maxX=this._maxX,e.minZ=this._minZ,e.maxZ=this._maxZ,e.width=this._width,e.height=this._height},n.Parse=function(e,t){var i=new n(e.name,t);return i._subdivisionsX=e.subdivisionsX||1,i._subdivisionsY=e.subdivisionsY||1,i._minX=e.minX,i._maxX=e.maxX,i._minZ=e.minZ,i._maxZ=e.maxZ,i._width=e.width,i._height=e.height,i},n})(kt.Mesh),kt.GroundMesh=Wt,Ht=$a||($a={}),Xt=(function(r){function e(e,t){var i=r.call(this,e,t.getScene())||this;return t.instances.push(i),i._sourceMesh=t,i.position.copyFrom(t.position),i.rotation.copyFrom(t.rotation),i.scaling.copyFrom(t.scaling),t.rotationQuaternion&&(i.rotationQuaternion=t.rotationQuaternion.clone()),i.infiniteDistance=t.infiniteDistance,i.setPivotMatrix(t.getPivotMatrix()),i.refreshBoundingInfo(),i._syncSubMeshes(),i}return T(e,r),e.prototype.getClassName=function(){return\"InstancedMesh\"},Object.defineProperty(e.prototype,\"receiveShadows\",{get:function(){return this._sourceMesh.receiveShadows},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,\"material\",{get:function(){return this._sourceMesh.material},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,\"visibility\",{get:function(){return this._sourceMesh.visibility},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,\"skeleton\",{get:function(){return this._sourceMesh.skeleton},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,\"renderingGroupId\",{get:function(){return this._sourceMesh.renderingGroupId},set:function(e){this._sourceMesh&&e!==this._sourceMesh.renderingGroupId&&Ht.Tools.Warn(\"Note - setting renderingGroupId of an instanced mesh has no effect on the scene\")},enumerable:!0,configurable:!0}),e.prototype.getTotalVertices=function(){return this._sourceMesh.getTotalVertices()},Object.defineProperty(e.prototype,\"sourceMesh\",{get:function(){return this._sourceMesh},enumerable:!0,configurable:!0}),e.prototype.isReady=function(e){return void 0===e&&(e=!1),this._sourceMesh.isReady(e,!0)},e.prototype.getVerticesData=function(e,t){return this._sourceMesh.getVerticesData(e,t)},e.prototype.setVerticesData=function(e,t,i,r){return this.sourceMesh&&this.sourceMesh.setVerticesData(e,t,i,r),this.sourceMesh},e.prototype.updateVerticesData=function(e,t,i,r){return this.sourceMesh&&this.sourceMesh.updateVerticesData(e,t,i,r),this.sourceMesh},e.prototype.setIndices=function(e,t){return void 0===t&&(t=null),this.sourceMesh&&this.sourceMesh.setIndices(e,t),this.sourceMesh},e.prototype.isVerticesDataPresent=function(e){return this._sourceMesh.isVerticesDataPresent(e)},e.prototype.getIndices=function(){return this._sourceMesh.getIndices()},Object.defineProperty(e.prototype,\"_positions\",{get:function(){return this._sourceMesh._positions},enumerable:!0,configurable:!0}),e.prototype.refreshBoundingInfo=function(){var e=this._sourceMesh.getBoundingInfo();return this._boundingInfo=new Ht.BoundingInfo(e.minimum.clone(),e.maximum.clone()),this._updateBoundingInfo(),this},e.prototype._preActivate=function(){return this._currentLOD&&this._currentLOD._preActivate(),this},e.prototype._activate=function(e){return this._currentLOD&&this._currentLOD._registerInstanceForRenderId(this,e),this},e.prototype.getLOD=function(e){if(!e)return this;var t=this.getBoundingInfo();return this._currentLOD=this.sourceMesh.getLOD(e,t.boundingSphere),this._currentLOD===this.sourceMesh?this:this._currentLOD},e.prototype._syncSubMeshes=function(){if(this.releaseSubMeshes(),this._sourceMesh.subMeshes)for(var e=0;e<this._sourceMesh.subMeshes.length;e++)this._sourceMesh.subMeshes[e].clone(this,this._sourceMesh);return this},e.prototype._generatePointsArray=function(){return this._sourceMesh._generatePointsArray()},e.prototype.clone=function(e,t,i){var r=this._sourceMesh.createInstance(e);if(Ht.Tools.DeepCopy(this,r,[\"name\",\"subMeshes\",\"uniqueId\"],[]),this.refreshBoundingInfo(),t&&(r.parent=t),!i)for(var n=0;n<this.getScene().meshes.length;n++){var o=this.getScene().meshes[n];o.parent===this&&o.clone(o.name,r)}return r.computeWorldMatrix(!0),r},e.prototype.dispose=function(e,t){void 0===t&&(t=!1);var i=this._sourceMesh.instances.indexOf(this);this._sourceMesh.instances.splice(i,1),r.prototype.dispose.call(this,e,t)},e})(Ht.AbstractMesh),Ht.InstancedMesh=Xt,jt=$a||($a={}),Yt=(function(c){function r(e,t,i,r,n,o,s){void 0===t&&(t=null),void 0===i&&(i=null);var a=c.call(this,e,t,i,r,n)||this;a.useVertexColor=o,a.useVertexAlpha=s,a.color=new jt.Color3(1,1,1),a.alpha=1,r&&(a.color=r.color.clone(),a.alpha=r.alpha,a.useVertexColor=r.useVertexColor,a.useVertexAlpha=r.useVertexAlpha),a._intersectionThreshold=.1;var l={attributes:[jt.VertexBuffer.PositionKind,\"world0\",\"world1\",\"world2\",\"world3\"],uniforms:[\"world\",\"viewProjection\"],needAlphaBlending:!0,defines:[]};return!1===s&&(l.needAlphaBlending=!1),o?(l.defines.push(\"#define VERTEXCOLOR\"),l.attributes.push(jt.VertexBuffer.ColorKind)):l.uniforms.push(\"color\"),a._colorShader=new jt.ShaderMaterial(\"colorShader\",a.getScene(),\"color\",l),a}return T(r,c),Object.defineProperty(r.prototype,\"intersectionThreshold\",{get:function(){return this._intersectionThreshold},set:function(e){this._intersectionThreshold!==e&&(this._intersectionThreshold=e,this.geometry&&(this.geometry.boundingBias=new jt.Vector2(0,e)))},enumerable:!0,configurable:!0}),r.prototype.getClassName=function(){return\"LinesMesh\"},Object.defineProperty(r.prototype,\"material\",{get:function(){return this._colorShader},set:function(e){},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,\"checkCollisions\",{get:function(){return!1},enumerable:!0,configurable:!0}),r.prototype._bind=function(e,t,i){return this._geometry&&(this._geometry._bind(this._colorShader.getEffect()),this.useVertexColor||this._colorShader.setColor4(\"color\",this.color.toColor4(this.alpha))),this},r.prototype._draw=function(e,t,i){return this._geometry&&this._geometry.getVertexBuffers()&&(this._unIndexed||this._geometry.getIndexBuffer())&&this.getScene().getEngine().drawElementsType(jt.Material.LineListDrawMode,e.indexStart,e.indexCount,i),this},r.prototype.dispose=function(e){this._colorShader.dispose(),c.prototype.dispose.call(this,e)},r.prototype.clone=function(e,t,i){return new r(e,this.getScene(),t,this,i)},r})(jt.Mesh),jt.LinesMesh=Yt,Kt=$a||($a={}),Qt=(function(){function e(){this._count=0,this._data={}}return e.prototype.copyFrom=function(e){var i=this;this.clear(),e.forEach((function(e,t){return i.add(e,t)}))},e.prototype.get=function(e){var t=this._data[e];if(void 0!==t)return t},e.prototype.getOrAddWithFactory=function(e,t){var i=this.get(e);return void 0!==i||(i=t(e))&&this.add(e,i),i},e.prototype.getOrAdd=function(e,t){var i=this.get(e);return void 0!==i?i:(this.add(e,t),t)},e.prototype.contains=function(e){return void 0!==this._data[e]},e.prototype.add=function(e,t){return void 0===this._data[e]&&(this._data[e]=t,++this._count,!0)},e.prototype.set=function(e,t){return void 0!==this._data[e]&&(this._data[e]=t,!0)},e.prototype.getAndRemove=function(e){var t=this.get(e);return void 0!==t?(delete this._data[e],--this._count,t):null},e.prototype.remove=function(e){return!!this.contains(e)&&(delete this._data[e],--this._count,!0)},e.prototype.clear=function(){this._data={},this._count=0},Object.defineProperty(e.prototype,\"count\",{get:function(){return this._count},enumerable:!0,configurable:!0}),e.prototype.forEach=function(e){for(var t in this._data){e(t,this._data[t])}},e.prototype.first=function(e){for(var t in this._data){var i=e(t,this._data[t]);if(i)return i}return null},e})(),Kt.StringDictionary=Qt,Zt=$a||($a={}),qt=Zt.Debug||(Zt.Debug={}),Jt=(function(){function e(e,t,i,r,n){void 0===r&&(r=!0),void 0===n&&(n=1),this.skeleton=e,this.mesh=t,this.autoUpdateBonesMatrices=r,this.renderingGroupId=n,this.color=Zt.Color3.White(),this._debugLines=new Array,this._isEnabled=!1,this._scene=i,this.update(),this._renderFunction=this.update.bind(this)}return Object.defineProperty(e.prototype,\"isEnabled\",{get:function(){return this._isEnabled},set:function(e){this._isEnabled!==e&&((this._isEnabled=e)?this._scene.registerBeforeRender(this._renderFunction):this._scene.unregisterBeforeRender(this._renderFunction))},enumerable:!0,configurable:!0}),e.prototype._getBonePosition=function(e,t,i,r,n,o){void 0===r&&(r=0),void 0===n&&(n=0),void 0===o&&(o=0);var s=Zt.Tmp.Matrix[0],a=t.getParent();if(s.copyFrom(t.getLocalMatrix()),0!==r||0!==n||0!==o){var l=Zt.Tmp.Matrix[1];Zt.Matrix.IdentityToRef(l),l.m[12]=r,l.m[13]=n,l.m[14]=o,l.multiplyToRef(s,s)}a&&s.multiplyToRef(a.getAbsoluteTransform(),s),s.multiplyToRef(i,s),e.x=s.m[12],e.y=s.m[13],e.z=s.m[14]},e.prototype._getLinesForBonesWithLength=function(e,t){for(var i=e.length,r=this.mesh.position,n=0;n<i;n++){var o=e[n],s=this._debugLines[n];s||(s=[Zt.Vector3.Zero(),Zt.Vector3.Zero()],this._debugLines[n]=s),this._getBonePosition(s[0],o,t),this._getBonePosition(s[1],o,t,0,o.length,0),s[0].subtractInPlace(r),s[1].subtractInPlace(r)}},e.prototype._getLinesForBonesNoLength=function(e,t){for(var i=e.length,r=0,n=this.mesh.position,o=i-1;0<=o;o--){var s=e[o],a=s.getParent();if(a){var l=this._debugLines[r];l||(l=[Zt.Vector3.Zero(),Zt.Vector3.Zero()],this._debugLines[r]=l),s.getAbsolutePositionToRef(this.mesh,l[0]),a.getAbsolutePositionToRef(this.mesh,l[1]),l[0].subtractInPlace(n),l[1].subtractInPlace(n),r++}}},e.prototype.update=function(){this.autoUpdateBonesMatrices&&this.skeleton.computeAbsoluteTransforms(),void 0===this.skeleton.bones[0].length?this._getLinesForBonesNoLength(this.skeleton.bones,this.mesh.getWorldMatrix()):this._getLinesForBonesWithLength(this.skeleton.bones,this.mesh.getWorldMatrix()),this._debugMesh?Zt.MeshBuilder.CreateLineSystem(\"\",{lines:this._debugLines,updatable:!0,instance:this._debugMesh},this._scene):(this._debugMesh=Zt.MeshBuilder.CreateLineSystem(\"\",{lines:this._debugLines,updatable:!0,instance:null},this._scene),this._debugMesh.renderingGroupId=this.renderingGroupId),this._debugMesh.position.copyFrom(this.mesh.position),this._debugMesh.color=this.color},e.prototype.dispose=function(){this._debugMesh&&(this.isEnabled=!1,this._debugMesh.dispose(),this._debugMesh=null)},e})(),qt.SkeletonViewer=Jt,$t=$a||($a={}),ei=$t.Debug||($t.Debug={}),ti=(function(){function e(e,t){void 0===t&&(t=1),this._xline=[$t.Vector3.Zero(),$t.Vector3.Zero()],this._yline=[$t.Vector3.Zero(),$t.Vector3.Zero()],this._zline=[$t.Vector3.Zero(),$t.Vector3.Zero()],this.scaleLines=1,this.scaleLines=t,this._xmesh=$t.Mesh.CreateLines(\"xline\",this._xline,e,!0),this._ymesh=$t.Mesh.CreateLines(\"yline\",this._yline,e,!0),this._zmesh=$t.Mesh.CreateLines(\"zline\",this._zline,e,!0),this._xmesh.renderingGroupId=2,this._ymesh.renderingGroupId=2,this._zmesh.renderingGroupId=2,this._xmesh.material.checkReadyOnlyOnce=!0,this._xmesh.color=new $t.Color3(1,0,0),this._ymesh.material.checkReadyOnlyOnce=!0,this._ymesh.color=new $t.Color3(0,1,0),this._zmesh.material.checkReadyOnlyOnce=!0,this._zmesh.color=new $t.Color3(0,0,1),this.scene=e}return e.prototype.update=function(e,t,i,r){var n=this.scaleLines;this._xmesh&&this._xmesh.position.copyFrom(e),this._ymesh&&this._ymesh.position.copyFrom(e),this._zmesh&&this._zmesh.position.copyFrom(e);var o=this._xline[1];o.x=t.x*n,o.y=t.y*n,o.z=t.z*n,$t.Mesh.CreateLines(\"\",this._xline,null,!1,this._xmesh),(o=this._yline[1]).x=i.x*n,o.y=i.y*n,o.z=i.z*n,$t.Mesh.CreateLines(\"\",this._yline,null,!1,this._ymesh),(o=this._zline[1]).x=r.x*n,o.y=r.y*n,o.z=r.z*n,$t.Mesh.CreateLines(\"\",this._zline,null,!1,this._zmesh)},e.prototype.dispose=function(){this._xmesh&&this._xmesh.dispose(),this._ymesh&&this._ymesh.dispose(),this._zmesh&&this._zmesh.dispose(),this._xmesh=null,this._ymesh=null,this._zmesh=null,this.scene=null},e})(),ei.AxesViewer=ti,ii=$a||($a={}),ri=ii.Debug||(ii.Debug={}),ni=(function(o){function e(e,t,i,r){void 0===r&&(r=1);var n=o.call(this,e,r)||this;return n.pos=ii.Vector3.Zero(),n.xaxis=ii.Vector3.Zero(),n.yaxis=ii.Vector3.Zero(),n.zaxis=ii.Vector3.Zero(),n.mesh=i,n.bone=t,n}return T(e,o),e.prototype.update=function(){if(this.mesh&&this.bone){var e=this.bone;e.getAbsolutePositionToRef(this.mesh,this.pos),e.getDirectionToRef(ii.Axis.X,this.mesh,this.xaxis),e.getDirectionToRef(ii.Axis.Y,this.mesh,this.yaxis),e.getDirectionToRef(ii.Axis.Z,this.mesh,this.zaxis),o.prototype.update.call(this,this.pos,this.xaxis,this.yaxis,this.zaxis)}},e.prototype.dispose=function(){this.mesh&&(this.mesh=null,this.bone=null,o.prototype.dispose.call(this))},e})(ri.AxesViewer),ri.BoneAxesViewer=ni,oi=$a||($a={}),si=(function(){function n(e){this.ray=e}return n.CreateAndShow=function(e,t,i){var r=new n(e);return r.show(t,i),r},n.prototype.show=function(e,t){if(!this._renderFunction&&this.ray){var i=this.ray;this._renderFunction=this._render.bind(this),this._scene=e,this._renderPoints=[i.origin,i.origin.add(i.direction.scale(i.length))],this._renderLine=oi.Mesh.CreateLines(\"ray\",this._renderPoints,e,!0),this._renderFunction&&this._scene.registerBeforeRender(this._renderFunction)}t&&this._renderLine&&this._renderLine.color.copyFrom(t)},n.prototype.hide=function(){this._renderFunction&&this._scene&&(this._scene.unregisterBeforeRender(this._renderFunction),this._scene=null,this._renderFunction=null,this._renderLine&&(this._renderLine.dispose(),this._renderLine=null),this._renderPoints=[])},n.prototype._render=function(){var e=this.ray;if(e){var t=this._renderPoints[1],i=Math.min(e.length,1e6);t.copyFrom(e.direction),t.scaleInPlace(i),t.addInPlace(e.origin),oi.Mesh.CreateLines(\"ray\",this._renderPoints,this._scene,!0,this._renderLine)}},n.prototype.attachToMesh=function(e,t,i,r){this._attachedToMesh=e;var n=this.ray;n&&(n.direction||(n.direction=oi.Vector3.Zero()),n.origin||(n.origin=oi.Vector3.Zero()),r&&(n.length=r),i||(i=oi.Vector3.Zero()),t||(t=new oi.Vector3(0,0,-1)),this._meshSpaceDirection?(this._meshSpaceDirection.copyFrom(t),this._meshSpaceOrigin.copyFrom(i)):(this._meshSpaceDirection=t.clone(),this._meshSpaceOrigin=i.clone()),this._updateToMeshFunction||(this._updateToMeshFunction=this._updateToMesh.bind(this),this._attachedToMesh.getScene().registerBeforeRender(this._updateToMeshFunction)),this._updateToMesh())},n.prototype.detachFromMesh=function(){this._attachedToMesh&&(this._updateToMeshFunction&&this._attachedToMesh.getScene().unregisterBeforeRender(this._updateToMeshFunction),this._attachedToMesh=null,this._updateToMeshFunction=null)},n.prototype._updateToMesh=function(){var e=this.ray;this._attachedToMesh&&e&&(this._attachedToMesh._isDisposed?this.detachFromMesh():(this._attachedToMesh.getDirectionToRef(this._meshSpaceDirection,e.direction),oi.Vector3.TransformCoordinatesToRef(this._meshSpaceOrigin,this._attachedToMesh.getWorldMatrix(),e.origin)))},n.prototype.dispose=function(){this.hide(),this.detachFromMesh(),this.ray=null},n})(),oi.RayHelper=si,(function(i){Object.defineProperty(i.Scene.prototype,\"debugLayer\",{get:function(){return this._debugLayer||(this._debugLayer=new e(this)),this._debugLayer},enumerable:!0,configurable:!0});var e=(function(){function t(e){var t=this;this.BJSINSPECTOR=\"undefined\"!=typeof INSPECTOR?INSPECTOR:void 0,this.onPropertyChangedObservable=new i.Observable,this._scene=e,this._scene.onDisposeObservable.add((function(){t._scene._debugLayer&&t._scene._debugLayer.hide()}))}return t.prototype._createInspector=function(e){void 0===e&&(e={});var t=e.popup||!1,i=e.initialTab||0,r=e.parentElement||null;this._inspector||(this.BJSINSPECTOR=this.BJSINSPECTOR||\"undefined\"!=typeof INSPECTOR?INSPECTOR:void 0,this._inspector=new this.BJSINSPECTOR.Inspector(this._scene,t,i,r,e.newColors))},t.prototype.isVisible=function(){return!!this._inspector},t.prototype.hide=function(){if(this._inspector){try{this._inspector.dispose()}catch(e){}this.onPropertyChangedObservable.clear(),this._inspector=null}},t.prototype.show=function(e){void 0===e&&(e={}),void 0===this.BJSINSPECTOR?i.Tools.LoadScript(t.InspectorURL,this._createInspector.bind(this,e)):this._createInspector(e)},t.prototype.getActiveTab=function(){return this._inspector?this._inspector.getActiveTabIndex():-1},t.InspectorURL=\"https://preview.babylonjs.com/inspector/babylon.inspector.bundle.js\",t})();i.DebugLayer=e})($a||($a={})),ai=$a||($a={}),li=ai.Debug||(ai.Debug={}),ci=(function(){function e(e){this._impostors=[],this._meshes=[],this._numMeshes=0,this._scene=e||ai.Engine.LastCreatedScene;var t=this._scene.getPhysicsEngine();t&&(this._physicsEnginePlugin=t.getPhysicsPlugin())}return e.prototype._updateDebugMeshes=function(){for(var e=this._physicsEnginePlugin,t=0;t<this._numMeshes;t++){var i=this._impostors[t];if(i)if(i.isDisposed)this.hideImpostor(this._impostors[t--]);else{var r=this._meshes[t];r&&e&&e.syncMeshWithImpostor(r,i)}}},e.prototype.showImpostor=function(e){if(this._scene){for(var t=0;t<this._numMeshes;t++)if(this._impostors[t]==e)return;var i=this._getDebugMesh(e,this._scene);i&&(this._impostors[this._numMeshes]=e,this._meshes[this._numMeshes]=i,0===this._numMeshes&&(this._renderFunction=this._updateDebugMeshes.bind(this),this._scene.registerBeforeRender(this._renderFunction)),this._numMeshes++)}},e.prototype.hideImpostor=function(e){if(e&&this._scene){for(var t=!1,i=0;i<this._numMeshes;i++)if(this._impostors[i]==e){var r=this._meshes[i];if(!r)continue;this._scene.removeMesh(r),r.dispose(),this._numMeshes--,0<this._numMeshes?(this._meshes[i]=this._meshes[this._numMeshes],this._impostors[i]=this._impostors[this._numMeshes],this._meshes[this._numMeshes]=null,this._impostors[this._numMeshes]=null):(this._meshes[0]=null,this._impostors[0]=null),t=!0;break}t&&0===this._numMeshes&&this._scene.unregisterBeforeRender(this._renderFunction)}},e.prototype._getDebugMaterial=function(e){return this._debugMaterial||(this._debugMaterial=new ai.StandardMaterial(\"\",e),this._debugMaterial.wireframe=!0),this._debugMaterial},e.prototype._getDebugBoxMesh=function(e){return this._debugBoxMesh||(this._debugBoxMesh=ai.MeshBuilder.CreateBox(\"physicsBodyBoxViewMesh\",{size:1},e),this._debugBoxMesh.renderingGroupId=1,this._debugBoxMesh.rotationQuaternion=ai.Quaternion.Identity(),this._debugBoxMesh.material=this._getDebugMaterial(e),e.removeMesh(this._debugBoxMesh)),this._debugBoxMesh.createInstance(\"physicsBodyBoxViewInstance\")},e.prototype._getDebugSphereMesh=function(e){return this._debugSphereMesh||(this._debugSphereMesh=ai.MeshBuilder.CreateSphere(\"physicsBodySphereViewMesh\",{diameter:1},e),this._debugSphereMesh.renderingGroupId=1,this._debugSphereMesh.rotationQuaternion=ai.Quaternion.Identity(),this._debugSphereMesh.material=this._getDebugMaterial(e),e.removeMesh(this._debugSphereMesh)),this._debugSphereMesh.createInstance(\"physicsBodyBoxViewInstance\")},e.prototype._getDebugMesh=function(e,t){var i=null;if(e.type==ai.PhysicsImpostor.BoxImpostor)i=this._getDebugBoxMesh(t),e.getBoxSizeToRef(i.scaling);else if(e.type==ai.PhysicsImpostor.SphereImpostor){i=this._getDebugSphereMesh(t);var r=e.getRadius();i.scaling.x=2*r,i.scaling.y=2*r,i.scaling.z=2*r}return i},e.prototype.dispose=function(){for(var e=0;e<this._numMeshes;e++)this.hideImpostor(this._impostors[e]);this._debugBoxMesh&&this._debugBoxMesh.dispose(),this._debugSphereMesh&&this._debugSphereMesh.dispose(),this._debugMaterial&&this._debugMaterial.dispose(),this._impostors.length=0,this._scene=null,this._physicsEnginePlugin=null},e})(),li.PhysicsViewer=ci,(function(l){Object.defineProperty(l.Scene.prototype,\"forceShowBoundingBoxes\",{get:function(){return this._forceShowBoundingBoxes||!1},set:function(e){(this._forceShowBoundingBoxes=e)&&this.getBoundingBoxRenderer()},enumerable:!0,configurable:!0}),l.Scene.prototype.getBoundingBoxRenderer=function(){return this._boundingBoxRenderer||(this._boundingBoxRenderer=new e(this)),this._boundingBoxRenderer},Object.defineProperty(l.AbstractMesh.prototype,\"showBoundingBox\",{get:function(){return this._showBoundingBox||!1},set:function(e){(this._showBoundingBox=e)&&this.getScene().getBoundingBoxRenderer()},enumerable:!0,configurable:!0});var e=(function(){function e(e){this.name=l.SceneComponentConstants.NAME_BOUNDINGBOXRENDERER,this.frontColor=new l.Color3(1,1,1),this.backColor=new l.Color3(.1,.1,.1),this.showBackLines=!0,this.renderList=new l.SmartArray(32),this._vertexBuffers={},(this.scene=e)._addComponent(this)}return e.prototype.register=function(){this.scene._beforeEvaluateActiveMeshStage.registerStep(l.SceneComponentConstants.STEP_BEFOREEVALUATEACTIVEMESH_BOUNDINGBOXRENDERER,this,this.reset),this.scene._activeMeshStage.registerStep(l.SceneComponentConstants.STEP_ACTIVEMESH_BOUNDINGBOXRENDERER,this,this._activeMesh),this.scene._evaluateSubMeshStage.registerStep(l.SceneComponentConstants.STEP_EVALUATESUBMESH_BOUNDINGBOXRENDERER,this,this._evaluateSubMesh),this.scene._afterRenderingGroupDrawStage.registerStep(l.SceneComponentConstants.STEP_AFTERRENDERINGGROUPDRAW_BOUNDINGBOXRENDERER,this,this.render)},e.prototype._evaluateSubMesh=function(e,t){if(e.showSubMeshesBoundingBox){var i=t.getBoundingInfo();null!=i&&(i.boundingBox._tag=e.renderingGroupId,this.renderList.push(i.boundingBox))}},e.prototype._activeMesh=function(e,t){if(e.showBoundingBox||this.scene.forceShowBoundingBoxes){var i=e.getBoundingInfo();i.boundingBox._tag=t.renderingGroupId,this.renderList.push(i.boundingBox)}},e.prototype._prepareRessources=function(){if(!this._colorShader){this._colorShader=new l.ShaderMaterial(\"colorShader\",this.scene,\"color\",{attributes:[l.VertexBuffer.PositionKind],uniforms:[\"world\",\"viewProjection\",\"color\"]});var e=this.scene.getEngine(),t=l.VertexData.CreateBox({size:1});this._vertexBuffers[l.VertexBuffer.PositionKind]=new l.VertexBuffer(e,t.positions,l.VertexBuffer.PositionKind,!1),this._createIndexBuffer()}},e.prototype._createIndexBuffer=function(){var e=this.scene.getEngine();this._indexBuffer=e.createIndexBuffer([0,1,1,2,2,3,3,0,4,5,5,6,6,7,7,4,0,7,1,6,2,5,3,4])},e.prototype.rebuild=function(){var e=this._vertexBuffers[l.VertexBuffer.PositionKind];e&&e._rebuild(),this._createIndexBuffer()},e.prototype.reset=function(){this.renderList.reset()},e.prototype.render=function(e){if(0!==this.renderList.length&&(this._prepareRessources(),this._colorShader.isReady())){var t=this.scene.getEngine();t.setDepthWrite(!1),this._colorShader._preBind();for(var i=0;i<this.renderList.length;i++){var r=this.renderList.data[i];if(r._tag===e){var n=r.minimum,o=r.maximum.subtract(n),s=n.add(o.scale(.5)),a=l.Matrix.Scaling(o.x,o.y,o.z).multiply(l.Matrix.Translation(s.x,s.y,s.z)).multiply(r.getWorldMatrix());t.bindBuffers(this._vertexBuffers,this._indexBuffer,this._colorShader.getEffect()),this.showBackLines&&(t.setDepthFunctionToGreaterOrEqual(),this.scene.resetCachedMaterial(),this._colorShader.setColor4(\"color\",this.backColor.toColor4()),this._colorShader.bind(a),t.drawElementsType(l.Material.LineListDrawMode,0,24)),t.setDepthFunctionToLess(),this.scene.resetCachedMaterial(),this._colorShader.setColor4(\"color\",this.frontColor.toColor4()),this._colorShader.bind(a),t.drawElementsType(l.Material.LineListDrawMode,0,24)}}this._colorShader.unbind(),t.setDepthFunctionToLessOrEqual(),t.setDepthWrite(!0)}},e.prototype.renderOcclusionBoundingBox=function(e){if(this._prepareRessources(),this._colorShader.isReady()&&e._boundingInfo){var t=this.scene.getEngine();t.setDepthWrite(!1),t.setColorWrite(!1),this._colorShader._preBind();var i=e._boundingInfo.boundingBox,r=i.minimum,n=i.maximum.subtract(r),o=r.add(n.scale(.5)),s=l.Matrix.Scaling(n.x,n.y,n.z).multiply(l.Matrix.Translation(o.x,o.y,o.z)).multiply(i.getWorldMatrix());t.bindBuffers(this._vertexBuffers,this._indexBuffer,this._colorShader.getEffect()),t.setDepthFunctionToLess(),this.scene.resetCachedMaterial(),this._colorShader.bind(s),t.drawElementsType(l.Material.LineListDrawMode,0,24),this._colorShader.unbind(),t.setDepthFunctionToLessOrEqual(),t.setDepthWrite(!0),t.setColorWrite(!0)}},e.prototype.dispose=function(){if(this._colorShader){this.renderList.dispose(),this._colorShader.dispose();var e=this._vertexBuffers[l.VertexBuffer.PositionKind];e&&(e.dispose(),this._vertexBuffers[l.VertexBuffer.PositionKind]=null),this.scene.getEngine()._releaseBuffer(this._indexBuffer)}},e})();l.BoundingBoxRenderer=e})($a||($a={})),(hi=$a||($a={})).Engine.prototype.createTransformFeedback=function(){return this._gl.createTransformFeedback()},hi.Engine.prototype.deleteTransformFeedback=function(e){this._gl.deleteTransformFeedback(e)},hi.Engine.prototype.bindTransformFeedback=function(e){this._gl.bindTransformFeedback(this._gl.TRANSFORM_FEEDBACK,e)},hi.Engine.prototype.beginTransformFeedback=function(e){void 0===e&&(e=!0),this._gl.beginTransformFeedback(e?this._gl.POINTS:this._gl.TRIANGLES)},hi.Engine.prototype.endTransformFeedback=function(){this._gl.endTransformFeedback()},hi.Engine.prototype.setTranformFeedbackVaryings=function(e,t){this._gl.transformFeedbackVaryings(e,t,this._gl.INTERLEAVED_ATTRIBS)},hi.Engine.prototype.bindTransformFeedbackBuffer=function(e){this._gl.bindBufferBase(this._gl.TRANSFORM_FEEDBACK_BUFFER,0,e)},ui=$a||($a={}),di=(function(h){function o(e,t,i,r){void 0===r&&(r=!1);var n=h.call(this,e)||this;n.layerMask=268435455,n._accumulatedCount=0,n._targetIndex=0,n._currentRenderId=-1,n._started=!1,n._stopped=!1,n._timeDelta=0,n._attributesStrideSize=21,n._actualFrame=0,n._rawTextureWidth=256,n.onDisposeObservable=new ui.Observable,n.forceDepthWrite=!1,n._preWarmDone=!1,n._scene=i||ui.Engine.LastCreatedScene,n._attachImageProcessingConfiguration(null),n._engine=n._scene.getEngine(),t.randomTextureSize||delete t.randomTextureSize;var o=ae({capacity:5e4,randomTextureSize:n._engine.getCaps().maxTextureSize},t),s=t;isFinite(s)&&(o.capacity=s),n._capacity=o.capacity,n._activeCount=o.capacity,n._currentActiveCount=0,n._isAnimationSheetEnabled=r,n._scene.particleSystems.push(n),n._updateEffectOptions={attributes:[\"position\",\"age\",\"life\",\"seed\",\"size\",\"color\",\"direction\",\"initialDirection\",\"angle\",\"cellIndex\",\"cellStartOffset\",\"noiseCoordinates1\",\"noiseCoordinates2\"],uniformsNames:[\"currentCount\",\"timeDelta\",\"emitterWM\",\"lifeTime\",\"color1\",\"color2\",\"sizeRange\",\"scaleRange\",\"gravity\",\"emitPower\",\"direction1\",\"direction2\",\"minEmitBox\",\"maxEmitBox\",\"radius\",\"directionRandomizer\",\"height\",\"coneAngle\",\"stopFactor\",\"angleRange\",\"radiusRange\",\"cellInfos\",\"noiseStrength\",\"limitVelocityDamping\"],uniformBuffersNames:[],samplers:[\"randomSampler\",\"randomSampler2\",\"sizeGradientSampler\",\"angularSpeedGradientSampler\",\"velocityGradientSampler\",\"limitVelocityGradientSampler\",\"noiseSampler\",\"dragGradientSampler\"],defines:\"\",fallbacks:null,onCompiled:null,onError:null,indexParameters:null,maxSimultaneousLights:0,transformFeedbackVaryings:[]},n.particleEmitterType=new ui.BoxParticleEmitter;for(var a=Math.min(n._engine.getCaps().maxTextureSize,o.randomTextureSize),l=[],c=0;c<a;++c)l.push(Math.random()),l.push(Math.random()),l.push(Math.random()),l.push(Math.random());n._randomTexture=new ui.RawTexture(new Float32Array(l),a,1,ui.Engine.TEXTUREFORMAT_RGBA,n._scene,!1,!1,ui.Texture.NEAREST_SAMPLINGMODE,ui.Engine.TEXTURETYPE_FLOAT),n._randomTexture.wrapU=ui.Texture.WRAP_ADDRESSMODE,n._randomTexture.wrapV=ui.Texture.WRAP_ADDRESSMODE,l=[];for(c=0;c<a;++c)l.push(Math.random()),l.push(Math.random()),l.push(Math.random()),l.push(Math.random());return n._randomTexture2=new ui.RawTexture(new Float32Array(l),a,1,ui.Engine.TEXTUREFORMAT_RGBA,n._scene,!1,!1,ui.Texture.NEAREST_SAMPLINGMODE,ui.Engine.TEXTURETYPE_FLOAT),n._randomTexture2.wrapU=ui.Texture.WRAP_ADDRESSMODE,n._randomTexture2.wrapV=ui.Texture.WRAP_ADDRESSMODE,n._randomTextureSize=a,n}return T(o,h),Object.defineProperty(o,\"IsSupported\",{get:function(){return!!ui.Engine.LastCreatedEngine&&1<ui.Engine.LastCreatedEngine.webGLVersion},enumerable:!0,configurable:!0}),o.prototype.getCapacity=function(){return this._capacity},Object.defineProperty(o.prototype,\"activeParticleCount\",{get:function(){return this._activeCount},set:function(e){this._activeCount=Math.min(e,this._capacity)},enumerable:!0,configurable:!0}),o.prototype.isReady=function(){return this._updateEffect?!!(this.emitter&&this._updateEffect.isReady()&&this._imageProcessingConfiguration.isReady()&&this._renderEffect.isReady()&&this.particleTexture&&this.particleTexture.isReady()):(this._recreateUpdateEffect(),this._recreateRenderEffect(),!1)},o.prototype.isStarted=function(){return this._started},o.prototype.start=function(e){var t=this;if(void 0===e&&(e=this.startDelay),!this.targetStopDuration&&this._hasTargetStopDurationDependantGradient())throw\"Particle system started with a targetStopDuration dependant gradient (eg. startSizeGradients) but no targetStopDuration set\";e?setTimeout((function(){t.start(0)}),e):(this._started=!0,this._stopped=!1,this._preWarmDone=!1,this.beginAnimationOnStart&&this.animations&&0<this.animations.length&&this.getScene().beginAnimation(this,this.beginAnimationFrom,this.beginAnimationTo,this.beginAnimationLoop))},o.prototype.stop=function(){this._stopped=!0},o.prototype.reset=function(){this._releaseBuffers(),this._releaseVAOs(),this._currentActiveCount=0,this._targetIndex=0},o.prototype.getClassName=function(){return\"GPUParticleSystem\"},o.prototype._removeGradientAndTexture=function(e,t,i){return h.prototype._removeGradientAndTexture.call(this,e,t,i),this._releaseBuffers(),this},o.prototype.addColorGradient=function(e,t,i){this._colorGradients||(this._colorGradients=[]);var r=new ui.ColorGradient;return r.gradient=e,r.color1=t,this._colorGradients.push(r),this._colorGradients.sort((function(e,t){return e.gradient<t.gradient?-1:e.gradient>t.gradient?1:0})),this._colorGradientsTexture&&(this._colorGradientsTexture.dispose(),this._colorGradientsTexture=null),this._releaseBuffers(),this},o.prototype.removeColorGradient=function(e){return this._removeGradientAndTexture(e,this._colorGradients,this._colorGradientsTexture),this._colorGradientsTexture=null,this},o.prototype._addFactorGradient=function(e,t,i){var r=new ui.FactorGradient;r.gradient=t,r.factor1=i,e.push(r),e.sort((function(e,t){return e.gradient<t.gradient?-1:e.gradient>t.gradient?1:0})),this._releaseBuffers()},o.prototype.addSizeGradient=function(e,t){return this._sizeGradients||(this._sizeGradients=[]),this._addFactorGradient(this._sizeGradients,e,t),this._sizeGradientsTexture&&(this._sizeGradientsTexture.dispose(),this._sizeGradientsTexture=null),this._releaseBuffers(),this},o.prototype.removeSizeGradient=function(e){return this._removeGradientAndTexture(e,this._sizeGradients,this._sizeGradientsTexture),this._sizeGradientsTexture=null,this},o.prototype.addAngularSpeedGradient=function(e,t){return this._angularSpeedGradients||(this._angularSpeedGradients=[]),this._addFactorGradient(this._angularSpeedGradients,e,t),this._angularSpeedGradientsTexture&&(this._angularSpeedGradientsTexture.dispose(),this._angularSpeedGradientsTexture=null),this._releaseBuffers(),this},o.prototype.removeAngularSpeedGradient=function(e){return this._removeGradientAndTexture(e,this._angularSpeedGradients,this._angularSpeedGradientsTexture),this._angularSpeedGradientsTexture=null,this},o.prototype.addVelocityGradient=function(e,t){return this._velocityGradients||(this._velocityGradients=[]),this._addFactorGradient(this._velocityGradients,e,t),this._velocityGradientsTexture&&(this._velocityGradientsTexture.dispose(),this._velocityGradientsTexture=null),this._releaseBuffers(),this},o.prototype.removeVelocityGradient=function(e){return this._removeGradientAndTexture(e,this._velocityGradients,this._velocityGradientsTexture),this._velocityGradientsTexture=null,this},o.prototype.addLimitVelocityGradient=function(e,t){return this._limitVelocityGradients||(this._limitVelocityGradients=[]),this._addFactorGradient(this._limitVelocityGradients,e,t),this._limitVelocityGradientsTexture&&(this._limitVelocityGradientsTexture.dispose(),this._limitVelocityGradientsTexture=null),this._releaseBuffers(),this},o.prototype.removeLimitVelocityGradient=function(e){return this._removeGradientAndTexture(e,this._limitVelocityGradients,this._limitVelocityGradientsTexture),this._limitVelocityGradientsTexture=null,this},o.prototype.addDragGradient=function(e,t){return this._dragGradients||(this._dragGradients=[]),this._addFactorGradient(this._dragGradients,e,t),this._dragGradientsTexture&&(this._dragGradientsTexture.dispose(),this._dragGradientsTexture=null),this._releaseBuffers(),this},o.prototype.removeDragGradient=function(e){return this._removeGradientAndTexture(e,this._dragGradients,this._dragGradientsTexture),this._dragGradientsTexture=null,this},o.prototype.addEmitRateGradient=function(e,t,i){return this},o.prototype.removeEmitRateGradient=function(e){return this},o.prototype.addStartSizeGradient=function(e,t,i){return this},o.prototype.removeStartSizeGradient=function(e){return this},o.prototype.addColorRemapGradient=function(e,t,i){return this},o.prototype.removeColorRemapGradient=function(e){return this},o.prototype.addAlphaRemapGradient=function(e,t,i){return this},o.prototype.removeAlphaRemapGradient=function(e){return this},o.prototype.addRampGradient=function(e,t){return this},o.prototype.removeRampGradient=function(e){return this},o.prototype.getRampGradients=function(){return null},Object.defineProperty(o.prototype,\"useRampGradients\",{get:function(){return!1},set:function(e){},enumerable:!0,configurable:!0}),o.prototype.addLifeTimeGradient=function(e,t,i){return this},o.prototype.removeLifeTimeGradient=function(e){return this},o.prototype._reset=function(){this._releaseBuffers()},o.prototype._createUpdateVAO=function(e){var t={};t.position=e.createVertexBuffer(\"position\",0,3),t.age=e.createVertexBuffer(\"age\",3,1),t.life=e.createVertexBuffer(\"life\",4,1),t.seed=e.createVertexBuffer(\"seed\",5,4),t.size=e.createVertexBuffer(\"size\",9,3);var i=12;this._colorGradientsTexture||(t.color=e.createVertexBuffer(\"color\",i,4),i+=4),t.direction=e.createVertexBuffer(\"direction\",i,3),i+=3,this._isBillboardBased||(t.initialDirection=e.createVertexBuffer(\"initialDirection\",i,3),i+=3),this._angularSpeedGradientsTexture?(t.angle=e.createVertexBuffer(\"angle\",i,1),i+=1):(t.angle=e.createVertexBuffer(\"angle\",i,2),i+=2),this._isAnimationSheetEnabled&&(t.cellIndex=e.createVertexBuffer(\"cellIndex\",i,1),i+=1,this.spriteRandomStartCell&&(t.cellStartOffset=e.createVertexBuffer(\"cellStartOffset\",i,1),i+=1)),this.noiseTexture&&(t.noiseCoordinates1=e.createVertexBuffer(\"noiseCoordinates1\",i,3),i+=3,t.noiseCoordinates2=e.createVertexBuffer(\"noiseCoordinates2\",i,3),i+=3);var r=this._engine.recordVertexArrayObject(t,null,this._updateEffect);return this._engine.bindArrayBuffer(null),r},o.prototype._createRenderVAO=function(e,t){var i={};i.position=e.createVertexBuffer(\"position\",0,3,this._attributesStrideSize,!0),i.age=e.createVertexBuffer(\"age\",3,1,this._attributesStrideSize,!0),i.life=e.createVertexBuffer(\"life\",4,1,this._attributesStrideSize,!0),i.size=e.createVertexBuffer(\"size\",9,3,this._attributesStrideSize,!0);var r=12;this._colorGradientsTexture||(i.color=e.createVertexBuffer(\"color\",r,4,this._attributesStrideSize,!0),r+=4),this.billboardMode===ui.ParticleSystem.BILLBOARDMODE_STRETCHED&&(i.direction=e.createVertexBuffer(\"direction\",r,3,this._attributesStrideSize,!0)),r+=3,this._isBillboardBased||(i.initialDirection=e.createVertexBuffer(\"initialDirection\",r,3,this._attributesStrideSize,!0),r+=3),i.angle=e.createVertexBuffer(\"angle\",r,1,this._attributesStrideSize,!0),this._angularSpeedGradientsTexture?r++:r+=2,this._isAnimationSheetEnabled&&(i.cellIndex=e.createVertexBuffer(\"cellIndex\",r,1,this._attributesStrideSize,!0),r+=1,this.spriteRandomStartCell&&(i.cellStartOffset=e.createVertexBuffer(\"cellStartOffset\",r,1,this._attributesStrideSize,!0),r+=1)),this.noiseTexture&&(i.noiseCoordinates1=e.createVertexBuffer(\"noiseCoordinates1\",r,3,this._attributesStrideSize,!0),r+=3,i.noiseCoordinates2=e.createVertexBuffer(\"noiseCoordinates2\",r,3,this._attributesStrideSize,!0),r+=3),i.offset=t.createVertexBuffer(\"offset\",0,2),i.uv=t.createVertexBuffer(\"uv\",2,2);var n=this._engine.recordVertexArrayObject(i,null,this._renderEffect);return this._engine.bindArrayBuffer(null),n},o.prototype._initialize=function(e){if(void 0===e&&(e=!1),!this._buffer0||e){var t=this._scene.getEngine(),i=new Array;this.isBillboardBased||(this._attributesStrideSize+=3),this._colorGradientsTexture&&(this._attributesStrideSize-=4),this._angularSpeedGradientsTexture&&(this._attributesStrideSize-=1),this._isAnimationSheetEnabled&&(this._attributesStrideSize+=1,this.spriteRandomStartCell&&(this._attributesStrideSize+=1)),this.noiseTexture&&(this._attributesStrideSize+=6);for(var r=0;r<this._capacity;r++)i.push(0),i.push(0),i.push(0),i.push(0),i.push(0),i.push(Math.random()),i.push(Math.random()),i.push(Math.random()),i.push(Math.random()),i.push(0),i.push(0),i.push(0),this._colorGradientsTexture||(i.push(0),i.push(0),i.push(0),i.push(0)),i.push(0),i.push(0),i.push(0),this.isBillboardBased||(i.push(0),i.push(0),i.push(0)),i.push(0),this._angularSpeedGradientsTexture||i.push(0),this._isAnimationSheetEnabled&&(i.push(0),this.spriteRandomStartCell&&i.push(0)),this.noiseTexture&&(i.push(Math.random()),i.push(Math.random()),i.push(Math.random()),i.push(Math.random()),i.push(Math.random()),i.push(Math.random()));var n=new Float32Array([.5,.5,1,1,-.5,.5,0,1,-.5,-.5,0,0,.5,-.5,1,0]);this._buffer0=new ui.Buffer(t,i,!1,this._attributesStrideSize),this._buffer1=new ui.Buffer(t,i,!1,this._attributesStrideSize),this._spriteBuffer=new ui.Buffer(t,n,!1,4),this._updateVAO=[],this._updateVAO.push(this._createUpdateVAO(this._buffer0)),this._updateVAO.push(this._createUpdateVAO(this._buffer1)),this._renderVAO=[],this._renderVAO.push(this._createRenderVAO(this._buffer1,this._spriteBuffer)),this._renderVAO.push(this._createRenderVAO(this._buffer0,this._spriteBuffer)),this._sourceBuffer=this._buffer0,this._targetBuffer=this._buffer1}},o.prototype._recreateUpdateEffect=function(){var e=this.particleEmitterType?this.particleEmitterType.getEffectDefines():\"\";this._isBillboardBased&&(e+=\"\\n#define BILLBOARD\"),this._colorGradientsTexture&&(e+=\"\\n#define COLORGRADIENTS\"),this._sizeGradientsTexture&&(e+=\"\\n#define SIZEGRADIENTS\"),this._angularSpeedGradientsTexture&&(e+=\"\\n#define ANGULARSPEEDGRADIENTS\"),this._velocityGradientsTexture&&(e+=\"\\n#define VELOCITYGRADIENTS\"),this._limitVelocityGradientsTexture&&(e+=\"\\n#define LIMITVELOCITYGRADIENTS\"),this._dragGradientsTexture&&(e+=\"\\n#define DRAGGRADIENTS\"),this.isAnimationSheetEnabled&&(e+=\"\\n#define ANIMATESHEET\",this.spriteRandomStartCell&&(e+=\"\\n#define ANIMATESHEETRANDOMSTART\")),this.noiseTexture&&(e+=\"\\n#define NOISE\"),this._updateEffect&&this._updateEffectOptions.defines===e||(this._updateEffectOptions.transformFeedbackVaryings=[\"outPosition\",\"outAge\",\"outLife\",\"outSeed\",\"outSize\"],this._colorGradientsTexture||this._updateEffectOptions.transformFeedbackVaryings.push(\"outColor\"),this._updateEffectOptions.transformFeedbackVaryings.push(\"outDirection\"),this._isBillboardBased||this._updateEffectOptions.transformFeedbackVaryings.push(\"outInitialDirection\"),this._updateEffectOptions.transformFeedbackVaryings.push(\"outAngle\"),this.isAnimationSheetEnabled&&(this._updateEffectOptions.transformFeedbackVaryings.push(\"outCellIndex\"),this.spriteRandomStartCell&&this._updateEffectOptions.transformFeedbackVaryings.push(\"outCellStartOffset\")),this.noiseTexture&&(this._updateEffectOptions.transformFeedbackVaryings.push(\"outNoiseCoordinates1\"),this._updateEffectOptions.transformFeedbackVaryings.push(\"outNoiseCoordinates2\")),this._updateEffectOptions.defines=e,this._updateEffect=new ui.Effect(\"gpuUpdateParticles\",this._updateEffectOptions,this._scene.getEngine()))},o.prototype._recreateRenderEffect=function(){var e=\"\";if(this._scene.clipPlane&&(e=\"\\n#define CLIPPLANE\"),this._scene.clipPlane2&&(e=\"\\n#define CLIPPLANE2\"),this._scene.clipPlane3&&(e=\"\\n#define CLIPPLANE3\"),this._scene.clipPlane4&&(e=\"\\n#define CLIPPLANE4\"),this.blendMode===ui.ParticleSystem.BLENDMODE_MULTIPLY&&(e=\"\\n#define BLENDMULTIPLYMODE\"),this._isBillboardBased)switch(e+=\"\\n#define BILLBOARD\",this.billboardMode){case ui.ParticleSystem.BILLBOARDMODE_Y:e+=\"\\n#define BILLBOARDY\";break;case ui.ParticleSystem.BILLBOARDMODE_STRETCHED:e+=\"\\n#define BILLBOARDSTRETCHED\";break;case ui.ParticleSystem.BILLBOARDMODE_ALL:}if(this._colorGradientsTexture&&(e+=\"\\n#define COLORGRADIENTS\"),this.isAnimationSheetEnabled&&(e+=\"\\n#define ANIMATESHEET\"),this._imageProcessingConfiguration&&(this._imageProcessingConfiguration.prepareDefines(this._imageProcessingConfigurationDefines),e+=\"\\n\"+this._imageProcessingConfigurationDefines.toString()),!this._renderEffect||this._renderEffect.defines!==e){var t=[\"view\",\"projection\",\"colorDead\",\"invView\",\"vClipPlane\",\"vClipPlane2\",\"vClipPlane3\",\"vClipPlane4\",\"sheetInfos\",\"translationPivot\",\"eyePosition\"],i=[\"textureSampler\",\"colorGradientSampler\"];ui.ImageProcessingConfiguration&&(ui.ImageProcessingConfiguration.PrepareUniforms(t,this._imageProcessingConfigurationDefines),ui.ImageProcessingConfiguration.PrepareSamplers(i,this._imageProcessingConfigurationDefines)),this._renderEffect=new ui.Effect(\"gpuRenderParticles\",[\"position\",\"age\",\"life\",\"size\",\"color\",\"offset\",\"uv\",\"direction\",\"initialDirection\",\"angle\",\"cellIndex\"],t,i,this._scene.getEngine(),e)}},o.prototype.animate=function(e){void 0===e&&(e=!1),this._timeDelta=this.updateSpeed*(e?this.preWarmStepOffset:this._scene.getAnimationRatio()),this._actualFrame+=this._timeDelta,this._stopped||this.targetStopDuration&&this._actualFrame>=this.targetStopDuration&&this.stop()},o.prototype._createFactorGradientTexture=function(e,t){var i=this[t];if(e&&e.length&&!i){for(var r=new Float32Array(this._rawTextureWidth),n=0;n<this._rawTextureWidth;n++){var o=n/this._rawTextureWidth;ui.Tools.GetCurrentGradient(o,e,(function(e,t,i){r[n]=ui.Scalar.Lerp(e.factor1,t.factor1,i)}))}this[t]=ui.RawTexture.CreateRTexture(r,this._rawTextureWidth,1,this._scene,!1,!1,ui.Texture.NEAREST_SAMPLINGMODE)}},o.prototype._createSizeGradientTexture=function(){this._createFactorGradientTexture(this._sizeGradients,\"_sizeGradientsTexture\")},o.prototype._createAngularSpeedGradientTexture=function(){this._createFactorGradientTexture(this._angularSpeedGradients,\"_angularSpeedGradientsTexture\")},o.prototype._createVelocityGradientTexture=function(){this._createFactorGradientTexture(this._velocityGradients,\"_velocityGradientsTexture\")},o.prototype._createLimitVelocityGradientTexture=function(){this._createFactorGradientTexture(this._limitVelocityGradients,\"_limitVelocityGradientsTexture\")},o.prototype._createDragGradientTexture=function(){this._createFactorGradientTexture(this._dragGradients,\"_dragGradientsTexture\")},o.prototype._createColorGradientTexture=function(){if(this._colorGradients&&this._colorGradients.length&&!this._colorGradientsTexture){for(var r=new Uint8Array(4*this._rawTextureWidth),n=ui.Tmp.Color4[0],o=0;o<this._rawTextureWidth;o++){var e=o/this._rawTextureWidth;ui.Tools.GetCurrentGradient(e,this._colorGradients,(function(e,t,i){ui.Color4.LerpToRef(e.color1,t.color1,i,n),r[4*o]=255*n.r,r[4*o+1]=255*n.g,r[4*o+2]=255*n.b,r[4*o+3]=255*n.a}))}this._colorGradientsTexture=ui.RawTexture.CreateRGBATexture(r,this._rawTextureWidth,1,this._scene,!1,!1,ui.Texture.NEAREST_SAMPLINGMODE)}},o.prototype.render=function(e){if(void 0===e&&(e=!1),!this._started)return 0;if(this._createColorGradientTexture(),this._createSizeGradientTexture(),this._createAngularSpeedGradientTexture(),this._createVelocityGradientTexture(),this._createLimitVelocityGradientTexture(),this._createDragGradientTexture(),this._recreateUpdateEffect(),this._recreateRenderEffect(),!this.isReady())return 0;if(!e){if(!this._preWarmDone&&this.preWarmCycles){for(var t=0;t<this.preWarmCycles;t++)this.animate(!0),this.render(!0);this._preWarmDone=!0}if(this._currentRenderId===this._scene.getRenderId())return 0;this._currentRenderId=this._scene.getRenderId()}if(this._initialize(),this._accumulatedCount+=this.emitRate*this._timeDelta,1<this._accumulatedCount){var i=0|this._accumulatedCount;this._accumulatedCount-=i,this._currentActiveCount=Math.min(this._activeCount,this._currentActiveCount+i)}if(!this._currentActiveCount)return 0;var r;if(this._engine.enableEffect(this._updateEffect),this._engine.setState(!1),this._updateEffect.setFloat(\"currentCount\",this._currentActiveCount),this._updateEffect.setFloat(\"timeDelta\",this._timeDelta),this._updateEffect.setFloat(\"stopFactor\",this._stopped?0:1),this._updateEffect.setTexture(\"randomSampler\",this._randomTexture),this._updateEffect.setTexture(\"randomSampler2\",this._randomTexture2),this._updateEffect.setFloat2(\"lifeTime\",this.minLifeTime,this.maxLifeTime),this._updateEffect.setFloat2(\"emitPower\",this.minEmitPower,this.maxEmitPower),this._colorGradientsTexture||(this._updateEffect.setDirectColor4(\"color1\",this.color1),this._updateEffect.setDirectColor4(\"color2\",this.color2)),this._updateEffect.setFloat2(\"sizeRange\",this.minSize,this.maxSize),this._updateEffect.setFloat4(\"scaleRange\",this.minScaleX,this.maxScaleX,this.minScaleY,this.maxScaleY),this._updateEffect.setFloat4(\"angleRange\",this.minAngularSpeed,this.maxAngularSpeed,this.minInitialRotation,this.maxInitialRotation),this._updateEffect.setVector3(\"gravity\",this.gravity),this._sizeGradientsTexture&&this._updateEffect.setTexture(\"sizeGradientSampler\",this._sizeGradientsTexture),this._angularSpeedGradientsTexture&&this._updateEffect.setTexture(\"angularSpeedGradientSampler\",this._angularSpeedGradientsTexture),this._velocityGradientsTexture&&this._updateEffect.setTexture(\"velocityGradientSampler\",this._velocityGradientsTexture),this._limitVelocityGradientsTexture&&(this._updateEffect.setTexture(\"limitVelocityGradientSampler\",this._limitVelocityGradientsTexture),this._updateEffect.setFloat(\"limitVelocityDamping\",this.limitVelocityDamping)),this._dragGradientsTexture&&this._updateEffect.setTexture(\"dragGradientSampler\",this._dragGradientsTexture),this.particleEmitterType&&this.particleEmitterType.applyToShader(this._updateEffect),this._isAnimationSheetEnabled&&this._updateEffect.setFloat3(\"cellInfos\",this.startSpriteCellID,this.endSpriteCellID,this.spriteCellChangeSpeed),this.noiseTexture&&(this._updateEffect.setTexture(\"noiseSampler\",this.noiseTexture),this._updateEffect.setVector3(\"noiseStrength\",this.noiseStrength)),this.emitter.position){r=this.emitter.getWorldMatrix()}else{var n=this.emitter;r=ui.Matrix.Translation(n.x,n.y,n.z)}if(this._updateEffect.setMatrix(\"emitterWM\",r),this._engine.bindVertexArrayObject(this._updateVAO[this._targetIndex],null),this._engine.bindTransformFeedbackBuffer(this._targetBuffer.getBuffer()),this._engine.setRasterizerState(!1),this._engine.beginTransformFeedback(!0),this._engine.drawArraysType(ui.Material.PointListDrawMode,0,this._currentActiveCount),this._engine.endTransformFeedback(),this._engine.setRasterizerState(!0),this._engine.bindTransformFeedbackBuffer(null),!e){this._engine.enableEffect(this._renderEffect);var o=this._scene.getViewMatrix();if(this._renderEffect.setMatrix(\"view\",o),this._renderEffect.setMatrix(\"projection\",this._scene.getProjectionMatrix()),this._renderEffect.setTexture(\"textureSampler\",this.particleTexture),this._renderEffect.setVector2(\"translationPivot\",this.translationPivot),this._colorGradientsTexture?this._renderEffect.setTexture(\"colorGradientSampler\",this._colorGradientsTexture):this._renderEffect.setDirectColor4(\"colorDead\",this.colorDead),this._isAnimationSheetEnabled&&this.particleTexture){var s=this.particleTexture.getBaseSize();this._renderEffect.setFloat3(\"sheetInfos\",this.spriteCellWidth/s.width,this.spriteCellHeight/s.height,s.width/this.spriteCellWidth)}if(this._isBillboardBased){var a=this._scene.activeCamera;this._renderEffect.setVector3(\"eyePosition\",a.globalPosition)}if(this._scene.clipPlane||this._scene.clipPlane2||this._scene.clipPlane3||this._scene.clipPlane4){var l=o.clone();l.invert(),this._renderEffect.setMatrix(\"invView\",l),ui.MaterialHelper.BindClipPlane(this._renderEffect,this._scene)}switch(this._imageProcessingConfiguration&&!this._imageProcessingConfiguration.applyByPostProcess&&this._imageProcessingConfiguration.bind(this._renderEffect),this.blendMode){case ui.ParticleSystem.BLENDMODE_ADD:this._engine.setAlphaMode(ui.Engine.ALPHA_ADD);break;case ui.ParticleSystem.BLENDMODE_ONEONE:this._engine.setAlphaMode(ui.Engine.ALPHA_ONEONE);break;case ui.ParticleSystem.BLENDMODE_STANDARD:this._engine.setAlphaMode(ui.Engine.ALPHA_COMBINE);break;case ui.ParticleSystem.BLENDMODE_MULTIPLY:this._engine.setAlphaMode(ui.Engine.ALPHA_MULTIPLY)}this.forceDepthWrite&&this._engine.setDepthWrite(!0),this._engine.bindVertexArrayObject(this._renderVAO[this._targetIndex],null),this._engine.drawArraysType(ui.Material.TriangleFanDrawMode,0,4,this._currentActiveCount),this._engine.setAlphaMode(ui.Engine.ALPHA_DISABLE)}this._targetIndex++,2===this._targetIndex&&(this._targetIndex=0);var c=this._sourceBuffer;return this._sourceBuffer=this._targetBuffer,this._targetBuffer=c,this._currentActiveCount},o.prototype.rebuild=function(){this._initialize(!0)},o.prototype._releaseBuffers=function(){this._buffer0&&(this._buffer0.dispose(),this._buffer0=null),this._buffer1&&(this._buffer1.dispose(),this._buffer1=null),this._spriteBuffer&&(this._spriteBuffer.dispose(),this._spriteBuffer=null)},o.prototype._releaseVAOs=function(){if(this._updateVAO){for(var e=0;e<this._updateVAO.length;e++)this._engine.releaseVertexArrayObject(this._updateVAO[e]);this._updateVAO=[];for(e=0;e<this._renderVAO.length;e++)this._engine.releaseVertexArrayObject(this._renderVAO[e]);this._renderVAO=[]}},o.prototype.dispose=function(e){void 0===e&&(e=!0);var t=this._scene.particleSystems.indexOf(this);-1<t&&this._scene.particleSystems.splice(t,1),this._releaseBuffers(),this._releaseVAOs(),this._colorGradientsTexture&&(this._colorGradientsTexture.dispose(),this._colorGradientsTexture=null),this._sizeGradientsTexture&&(this._sizeGradientsTexture.dispose(),this._sizeGradientsTexture=null),this._angularSpeedGradientsTexture&&(this._angularSpeedGradientsTexture.dispose(),this._angularSpeedGradientsTexture=null),this._velocityGradientsTexture&&(this._velocityGradientsTexture.dispose(),this._velocityGradientsTexture=null),this._limitVelocityGradientsTexture&&(this._limitVelocityGradientsTexture.dispose(),this._limitVelocityGradientsTexture=null),this._dragGradientsTexture&&(this._dragGradientsTexture.dispose(),this._dragGradientsTexture=null),this._randomTexture&&(this._randomTexture.dispose(),this._randomTexture=null),this._randomTexture2&&(this._randomTexture2.dispose(),this._randomTexture2=null),e&&this.particleTexture&&(this.particleTexture.dispose(),this.particleTexture=null),e&&this.noiseTexture&&(this.noiseTexture.dispose(),this.noiseTexture=null),this.onDisposeObservable.notifyObservers(this),this.onDisposeObservable.clear()},o.prototype.clone=function(e,t){var i=new o(e,{capacity:this._capacity,randomTextureSize:this._randomTextureSize},this._scene);return ui.Tools.DeepCopy(this,i),void 0===t&&(t=this.emitter),i.emitter=t,this.particleTexture&&(i.particleTexture=new ui.Texture(this.particleTexture.url,this._scene)),i},o.prototype.serialize=function(){var e={};return ui.ParticleSystem._Serialize(e,this),e.activeParticleCount=this.activeParticleCount,e},o.Parse=function(e,t,i,r){void 0===r&&(r=!1);var n=new o(e.name,{capacity:e.capacity,randomTextureSize:e.randomTextureSize},t);return e.activeParticleCount&&(n.activeParticleCount=e.activeParticleCount),ui.ParticleSystem._Parse(e,n,t,i),e.preventAutoStart&&(n.preventAutoStart=e.preventAutoStart),r||n.preventAutoStart||n.start(),n},o})(ui.BaseParticleSystem),ui.GPUParticleSystem=di,(function(l){var e=(function(){function e(e,t,i,r,n,o,s,a){void 0===a&&(a=null),this.idx=0,this.color=new l.Color4(1,1,1,1),this.position=l.Vector3.Zero(),this.rotation=l.Vector3.Zero(),this.scaling=l.Vector3.One(),this.uvs=new l.Vector4(0,0,1,1),this.velocity=l.Vector3.Zero(),this.pivot=l.Vector3.Zero(),this.translateFromPivot=!1,this.alive=!0,this.isVisible=!0,this._pos=0,this._ind=0,this.shapeId=0,this.idxInShape=0,this._stillInvisible=!1,this._rotationMatrix=[1,0,0,0,1,0,0,0,1],this.parentId=null,this._globalPosition=l.Vector3.Zero(),this.idx=e,this._pos=t,this._ind=i,this._model=r,this.shapeId=n,this.idxInShape=o,this._sps=s,a&&(this._modelBoundingInfo=a,this._boundingInfo=new l.BoundingInfo(a.minimum,a.maximum))}return Object.defineProperty(e.prototype,\"scale\",{get:function(){return this.scaling},set:function(e){this.scaling=e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,\"quaternion\",{get:function(){return this.rotationQuaternion},set:function(e){this.rotationQuaternion=e},enumerable:!0,configurable:!0}),e.prototype.intersectsMesh=function(e){return!(!this._boundingInfo||!e._boundingInfo)&&(this._sps._bSphereOnly?l.BoundingSphere.Intersects(this._boundingInfo.boundingSphere,e._boundingInfo.boundingSphere):this._boundingInfo.intersects(e._boundingInfo,!1))},e})();l.SolidParticle=e;var t=function(e,t,i,r,n,o){this._indicesLength=0,this.shapeID=e,this._shape=t,this._indicesLength=i,this._shapeUV=r,this._positionFunction=n,this._vertexFunction=o};l.ModelShape=t;var i=function(){this.ind=0,this.indicesLength=0,this.sqDistance=0};l.DepthSortedParticle=i})($a||($a={})),fi=$a||($a={}),pi=(function(){function e(e,t,i){this.particles=new Array,this.nbParticles=0,this.billboard=!1,this.recomputeNormals=!0,this.counter=0,this.vars={},this._bSphereOnly=!1,this._bSphereRadiusFactor=1,this._positions=new Array,this._indices=new Array,this._normals=new Array,this._colors=new Array,this._uvs=new Array,this._index=0,this._updatable=!0,this._pickable=!1,this._isVisibilityBoxLocked=!1,this._alwaysVisible=!1,this._depthSort=!1,this._shapeCounter=0,this._copy=new fi.SolidParticle(0,0,0,null,0,0,this),this._color=new fi.Color4(0,0,0,0),this._computeParticleColor=!0,this._computeParticleTexture=!0,this._computeParticleRotation=!0,this._computeParticleVertex=!1,this._computeBoundingBox=!1,this._depthSortParticles=!0,this._cam_axisZ=fi.Vector3.Zero(),this._cam_axisY=fi.Vector3.Zero(),this._cam_axisX=fi.Vector3.Zero(),this._axisZ=fi.Axis.Z,this._camDir=fi.Vector3.Zero(),this._camInvertedPosition=fi.Vector3.Zero(),this._rotMatrix=new fi.Matrix,this._invertMatrix=new fi.Matrix,this._rotated=fi.Vector3.Zero(),this._quaternion=new fi.Quaternion,this._vertex=fi.Vector3.Zero(),this._normal=fi.Vector3.Zero(),this._yaw=0,this._pitch=0,this._roll=0,this._halfroll=0,this._halfpitch=0,this._halfyaw=0,this._sinRoll=0,this._cosRoll=0,this._sinPitch=0,this._cosPitch=0,this._sinYaw=0,this._cosYaw=0,this._mustUnrotateFixedNormals=!1,this._minimum=fi.Vector3.Zero(),this._maximum=fi.Vector3.Zero(),this._minBbox=fi.Vector3.Zero(),this._maxBbox=fi.Vector3.Zero(),this._particlesIntersect=!1,this._depthSortFunction=function(e,t){return t.sqDistance-e.sqDistance},this._needs32Bits=!1,this._pivotBackTranslation=fi.Vector3.Zero(),this._scaledPivot=fi.Vector3.Zero(),this._particleHasParent=!1,this.name=e,this._scene=t||fi.Engine.LastCreatedScene,this._camera=t.activeCamera,this._pickable=!!i&&i.isPickable,this._depthSort=!!i&&i.enableDepthSort,this._particlesIntersect=!!i&&i.particleIntersection,this._bSphereOnly=!!i&&i.boundingSphereOnly,this._bSphereRadiusFactor=i&&i.bSphereRadiusFactor?i.bSphereRadiusFactor:1,i&&void 0!==i.updatable?this._updatable=i.updatable:this._updatable=!0,this._pickable&&(this.pickedParticles=[]),this._depthSort&&(this.depthSortedParticles=[])}return e.prototype.buildMesh=function(){if(0===this.nbParticles){var e=fi.MeshBuilder.CreateDisc(\"\",{radius:1,tessellation:3},this._scene);this.addShape(e,1),e.dispose()}this._indices32=this._needs32Bits?new Uint32Array(this._indices):new Uint16Array(this._indices),this._positions32=new Float32Array(this._positions),this._uvs32=new Float32Array(this._uvs),this._colors32=new Float32Array(this._colors),this.recomputeNormals&&fi.VertexData.ComputeNormals(this._positions32,this._indices32,this._normals),this._normals32=new Float32Array(this._normals),this._fixedNormal32=new Float32Array(this._normals),this._mustUnrotateFixedNormals&&this._unrotateFixedNormals();var t=new fi.VertexData;t.indices=this._depthSort?this._indices:this._indices32,t.set(this._positions32,fi.VertexBuffer.PositionKind),t.set(this._normals32,fi.VertexBuffer.NormalKind),0<this._uvs32.length&&t.set(this._uvs32,fi.VertexBuffer.UVKind),0<this._colors32.length&&t.set(this._colors32,fi.VertexBuffer.ColorKind);var i=new fi.Mesh(this.name,this._scene);return t.applyToMesh(i,this._updatable),this.mesh=i,this.mesh.isPickable=this._pickable,this._depthSort||(this._indices=null),this._positions=null,this._normals=null,this._uvs=null,this._colors=null,this._updatable||(this.particles.length=0),i},e.prototype.digest=function(e,t){var i=t&&t.facetNb||1,r=t&&t.number||0,n=t&&t.delta||0,o=e.getVerticesData(fi.VertexBuffer.PositionKind),s=e.getIndices(),a=e.getVerticesData(fi.VertexBuffer.UVKind),l=e.getVerticesData(fi.VertexBuffer.ColorKind),c=e.getVerticesData(fi.VertexBuffer.NormalKind),h=0,u=s.length/3;r?(r=u<r?u:r,i=Math.round(u/r),n=0):i=u<i?u:i;for(var d=[],f=[],p=[],_=[],m=fi.Vector3.Zero(),g=i;h<u;){u-(i=g+Math.floor((1+n)*Math.random()))<h&&(i=u-h),d.length=0,f.length=0,p.length=0;for(var v=_.length=0,y=3*h;y<3*(h+i);y++){f.push(v);var b=s[y];d.push(o[3*b],o[3*b+1],o[3*b+2]),a&&p.push(a[2*b],a[2*b+1]),l&&_.push(l[4*b],l[4*b+1],l[4*b+2],l[4*b+3]),v++}var T,E,x=this.nbParticles,P=this._posToShape(d),A=this._uvsToShapeUV(p);for(T=0;T<P.length;T++)m.addInPlace(P[T]);for(m.scaleInPlace(1/P.length),T=0;T<P.length;T++)P[T].subtractInPlace(m);this._particlesIntersect&&(E=new fi.BoundingInfo(m,m));var S=new fi.ModelShape(this._shapeCounter,P,3*i,A,null,null),M=this._positions.length,R=this._indices.length;this._meshBuilder(this._index,P,this._positions,f,this._indices,p,this._uvs,_,this._colors,c,this._normals,x,0,null),this._addParticle(x,M,R,S,this._shapeCounter,0,E),this.particles[this.nbParticles].position.addInPlace(m),this._index+=P.length,x++,this.nbParticles++,this._shapeCounter++,h+=i}return this},e.prototype._unrotateFixedNormals=function(){for(var e=0,t=0,i=0;i<this.particles.length;i++){this._particle=this.particles[i],this._shape=this._particle._model._shape,this._particle.rotationQuaternion?this._quaternion.copyFrom(this._particle.rotationQuaternion):(this._yaw=this._particle.rotation.y,this._pitch=this._particle.rotation.x,this._roll=this._particle.rotation.z,this._quaternionRotationYPR()),this._quaternionToRotationMatrix(),this._rotMatrix.invertToRef(this._invertMatrix);for(var r=0;r<this._shape.length;r++)t=e+3*r,fi.Vector3.TransformNormalFromFloatsToRef(this._normals32[t],this._normals32[t+1],this._normals32[t+2],this._invertMatrix,this._normal),this._fixedNormal32[t]=this._normal.x,this._fixedNormal32[t+1]=this._normal.y,this._fixedNormal32[t+2]=this._normal.z;e=t+3}},e.prototype._resetCopy=function(){this._copy.position.x=0,this._copy.position.y=0,this._copy.position.z=0,this._copy.rotation.x=0,this._copy.rotation.y=0,this._copy.rotation.z=0,this._copy.rotationQuaternion=null,this._copy.scaling.x=1,this._copy.scaling.y=1,this._copy.scaling.z=1,this._copy.uvs.x=0,this._copy.uvs.y=0,this._copy.uvs.z=1,this._copy.uvs.w=1,this._copy.color=null,this._copy.translateFromPivot=!1},e.prototype._meshBuilder=function(e,t,i,r,n,o,s,a,l,c,h,u,d,f){var p,_=0,m=0,g=0;for(this._resetCopy(),f&&f.positionFunction&&(f.positionFunction(this._copy,u,d),this._mustUnrotateFixedNormals=!0),this._copy.rotationQuaternion?this._quaternion.copyFrom(this._copy.rotationQuaternion):(this._yaw=this._copy.rotation.y,this._pitch=this._copy.rotation.x,this._roll=this._copy.rotation.z,this._quaternionRotationYPR()),this._quaternionToRotationMatrix(),this._scaledPivot.x=this._copy.pivot.x*this._copy.scaling.x,this._scaledPivot.y=this._copy.pivot.y*this._copy.scaling.y,this._scaledPivot.z=this._copy.pivot.z*this._copy.scaling.z,this._copy.translateFromPivot?this._pivotBackTranslation.copyFromFloats(0,0,0):this._pivotBackTranslation.copyFrom(this._scaledPivot),p=0;p<t.length;p++)this._vertex.x=t[p].x,this._vertex.y=t[p].y,this._vertex.z=t[p].z,f&&f.vertexFunction&&f.vertexFunction(this._copy,this._vertex,p),this._vertex.x*=this._copy.scaling.x,this._vertex.y*=this._copy.scaling.y,this._vertex.z*=this._copy.scaling.z,this._vertex.x-=this._scaledPivot.x,this._vertex.y-=this._scaledPivot.y,this._vertex.z-=this._scaledPivot.z,fi.Vector3.TransformCoordinatesToRef(this._vertex,this._rotMatrix,this._rotated),this._rotated.addInPlace(this._pivotBackTranslation),i.push(this._copy.position.x+this._rotated.x,this._copy.position.y+this._rotated.y,this._copy.position.z+this._rotated.z),o&&(s.push((this._copy.uvs.z-this._copy.uvs.x)*o[_]+this._copy.uvs.x,(this._copy.uvs.w-this._copy.uvs.y)*o[_+1]+this._copy.uvs.y),_+=2),this._copy.color?this._color=this._copy.color:a&&void 0!==a[m]?(this._color.r=a[m],this._color.g=a[m+1],this._color.b=a[m+2],this._color.a=a[m+3]):(this._color.r=1,this._color.g=1,this._color.b=1,this._color.a=1),l.push(this._color.r,this._color.g,this._color.b,this._color.a),m+=4,!this.recomputeNormals&&c&&(this._normal.x=c[g],this._normal.y=c[g+1],this._normal.z=c[g+2],fi.Vector3.TransformNormalToRef(this._normal,this._rotMatrix,this._normal),h.push(this._normal.x,this._normal.y,this._normal.z),g+=3);for(p=0;p<r.length;p++){var v=e+r[p];n.push(v),65535<v&&(this._needs32Bits=!0)}if(this._pickable){var y=r.length/3;for(p=0;p<y;p++)this.pickedParticles.push({idx:u,faceId:p})}return this._depthSort&&this.depthSortedParticles.push(new fi.DepthSortedParticle),this._copy},e.prototype._posToShape=function(e){for(var t=[],i=0;i<e.length;i+=3)t.push(new fi.Vector3(e[i],e[i+1],e[i+2]));return t},e.prototype._uvsToShapeUV=function(e){var t=[];if(e)for(var i=0;i<e.length;i++)t.push(e[i]);return t},e.prototype._addParticle=function(e,t,i,r,n,o,s){void 0===s&&(s=null);var a=new fi.SolidParticle(e,t,i,r,n,o,this,s);return this.particles.push(a),a},e.prototype.addShape=function(e,t,i){var r,n=e.getVerticesData(fi.VertexBuffer.PositionKind),o=e.getIndices(),s=e.getVerticesData(fi.VertexBuffer.UVKind),a=e.getVerticesData(fi.VertexBuffer.ColorKind),l=e.getVerticesData(fi.VertexBuffer.NormalKind);this._particlesIntersect&&(r=e.getBoundingInfo());for(var c,h,u=this._posToShape(n),d=this._uvsToShapeUV(s),f=i?i.positionFunction:null,p=i?i.vertexFunction:null,_=new fi.ModelShape(this._shapeCounter,u,o.length,d,f,p),m=this.nbParticles,g=0;g<t;g++){var v=this._positions.length,y=this._indices.length;h=this._meshBuilder(this._index,u,this._positions,o,this._indices,s,this._uvs,a,this._colors,l,this._normals,m,g,i),this._updatable&&((c=this._addParticle(m,v,y,_,this._shapeCounter,g,r)).position.copyFrom(h.position),c.rotation.copyFrom(h.rotation),h.rotationQuaternion&&c.rotationQuaternion&&c.rotationQuaternion.copyFrom(h.rotationQuaternion),h.color&&c.color&&c.color.copyFrom(h.color),c.scaling.copyFrom(h.scaling),c.uvs.copyFrom(h.uvs)),this._index+=u.length,m++}return this.nbParticles+=t,this._shapeCounter++,this._shapeCounter-1},e.prototype._rebuildParticle=function(e){this._resetCopy(),e._model._positionFunction&&e._model._positionFunction(this._copy,e.idx,e.idxInShape),this._copy.rotationQuaternion?this._quaternion.copyFrom(this._copy.rotationQuaternion):(this._yaw=this._copy.rotation.y,this._pitch=this._copy.rotation.x,this._roll=this._copy.rotation.z,this._quaternionRotationYPR()),this._quaternionToRotationMatrix(),this._scaledPivot.x=this._particle.pivot.x*this._particle.scaling.x,this._scaledPivot.y=this._particle.pivot.y*this._particle.scaling.y,this._scaledPivot.z=this._particle.pivot.z*this._particle.scaling.z,this._copy.translateFromPivot?this._pivotBackTranslation.copyFromFloats(0,0,0):this._pivotBackTranslation.copyFrom(this._scaledPivot),this._shape=e._model._shape;for(var t=0;t<this._shape.length;t++)this._vertex.x=this._shape[t].x,this._vertex.y=this._shape[t].y,this._vertex.z=this._shape[t].z,e._model._vertexFunction&&e._model._vertexFunction(this._copy,this._vertex,t),this._vertex.x*=this._copy.scaling.x,this._vertex.y*=this._copy.scaling.y,this._vertex.z*=this._copy.scaling.z,this._vertex.x-=this._scaledPivot.x,this._vertex.y-=this._scaledPivot.y,this._vertex.z-=this._scaledPivot.z,fi.Vector3.TransformCoordinatesToRef(this._vertex,this._rotMatrix,this._rotated),this._rotated.addInPlace(this._pivotBackTranslation),this._positions32[e._pos+3*t]=this._copy.position.x+this._rotated.x,this._positions32[e._pos+3*t+1]=this._copy.position.y+this._rotated.y,this._positions32[e._pos+3*t+2]=this._copy.position.z+this._rotated.z;e.position.x=0,e.position.y=0,e.position.z=0,e.rotation.x=0,e.rotation.y=0,e.rotation.z=0,e.rotationQuaternion=null,e.scaling.x=1,e.scaling.y=1,e.scaling.z=1,e.uvs.x=0,e.uvs.y=0,e.uvs.z=1,e.uvs.w=1,e.pivot.x=0,e.pivot.y=0,e.pivot.z=0,e.translateFromPivot=!1,e.parentId=null},e.prototype.rebuildMesh=function(){for(var e=0;e<this.particles.length;e++)this._rebuildParticle(this.particles[e]);return this.mesh.updateVerticesData(fi.VertexBuffer.PositionKind,this._positions32,!1,!1),this},e.prototype.setParticles=function(e,t,i){if(void 0===e&&(e=0),void 0===t&&(t=this.nbParticles-1),void 0===i&&(i=!0),!this._updatable)return this;if(this.beforeUpdateParticles(e,t,i),this._cam_axisX.x=1,this._cam_axisX.y=0,this._cam_axisX.z=0,this._cam_axisY.x=0,this._cam_axisY.y=1,this._cam_axisY.z=0,this._cam_axisZ.x=0,this._cam_axisZ.y=0,this._cam_axisZ.z=1,(this.billboard||this._depthSort)&&(this.mesh.computeWorldMatrix(!0),this.mesh._worldMatrix.invertToRef(this._invertMatrix)),this.billboard){this._camera.getDirectionToRef(this._axisZ,this._camDir),fi.Vector3.TransformNormalToRef(this._camDir,this._invertMatrix,this._cam_axisZ),this._cam_axisZ.normalize();var r=this._camera.getViewMatrix(!0);fi.Vector3.TransformNormalFromFloatsToRef(r.m[1],r.m[5],r.m[9],this._invertMatrix,this._cam_axisY),fi.Vector3.CrossToRef(this._cam_axisY,this._cam_axisZ,this._cam_axisX),this._cam_axisY.normalize(),this._cam_axisX.normalize()}this._depthSort&&fi.Vector3.TransformCoordinatesToRef(this._camera.globalPosition,this._invertMatrix,this._camInvertedPosition),fi.Matrix.IdentityToRef(this._rotMatrix);var n=0,o=0,s=0,a=0,l=0,c=0,h=0;this.mesh.isFacetDataEnabled&&(this._computeBoundingBox=!0),t=t>=this.nbParticles?this.nbParticles-1:t,this._computeBoundingBox&&(0==e&&t==this.nbParticles-1?(fi.Vector3.FromFloatsToRef(Number.MAX_VALUE,Number.MAX_VALUE,Number.MAX_VALUE,this._minimum),fi.Vector3.FromFloatsToRef(-Number.MAX_VALUE,-Number.MAX_VALUE,-Number.MAX_VALUE,this._maximum)):this.mesh._boundingInfo&&(this._minimum.copyFrom(this.mesh._boundingInfo.boundingBox.minimum),this._maximum.copyFrom(this.mesh._boundingInfo.boundingBox.maximum)));var u=(o=this.particles[e]._pos)/3|0;a=4*u,c=2*u;for(var d=e;d<=t;d++){if(this._particle=this.particles[d],this._shape=this._particle._model._shape,this._shapeUV=this._particle._model._shapeUV,this.updateParticle(this._particle),this._depthSort&&this._depthSortParticles){var f=this.depthSortedParticles[d];f.ind=this._particle._ind,f.indicesLength=this._particle._model._indicesLength,f.sqDistance=fi.Vector3.DistanceSquared(this._particle.position,this._camInvertedPosition)}if(!this._particle.alive||this._particle._stillInvisible&&!this._particle.isVisible)o+=3*(h=this._shape.length),a+=4*h,c+=2*h;else{if(this._particle.isVisible)for(this._particle._stillInvisible=!1,this._particleHasParent=null!==this._particle.parentId,this._scaledPivot.x=this._particle.pivot.x*this._particle.scaling.x,this._scaledPivot.y=this._particle.pivot.y*this._particle.scaling.y,this._scaledPivot.z=this._particle.pivot.z*this._particle.scaling.z,this.billboard&&(this._particle.rotation.x=0,this._particle.rotation.y=0),(this._computeParticleRotation||this.billboard)&&(this._particle.rotationQuaternion?this._quaternion.copyFrom(this._particle.rotationQuaternion):(this._yaw=this._particle.rotation.y,this._pitch=this._particle.rotation.x,this._roll=this._particle.rotation.z,this._quaternionRotationYPR()),this._quaternionToRotationMatrix()),this._particleHasParent?(this._parent=this.particles[this._particle.parentId],this._rotated.x=this._particle.position.x*this._parent._rotationMatrix[0]+this._particle.position.y*this._parent._rotationMatrix[3]+this._particle.position.z*this._parent._rotationMatrix[6],this._rotated.y=this._particle.position.x*this._parent._rotationMatrix[1]+this._particle.position.y*this._parent._rotationMatrix[4]+this._particle.position.z*this._parent._rotationMatrix[7],this._rotated.z=this._particle.position.x*this._parent._rotationMatrix[2]+this._particle.position.y*this._parent._rotationMatrix[5]+this._particle.position.z*this._parent._rotationMatrix[8],this._particle._globalPosition.x=this._parent._globalPosition.x+this._rotated.x,this._particle._globalPosition.y=this._parent._globalPosition.y+this._rotated.y,this._particle._globalPosition.z=this._parent._globalPosition.z+this._rotated.z,(this._computeParticleRotation||this.billboard)&&(this._particle._rotationMatrix[0]=this._rotMatrix.m[0]*this._parent._rotationMatrix[0]+this._rotMatrix.m[1]*this._parent._rotationMatrix[3]+this._rotMatrix.m[2]*this._parent._rotationMatrix[6],this._particle._rotationMatrix[1]=this._rotMatrix.m[0]*this._parent._rotationMatrix[1]+this._rotMatrix.m[1]*this._parent._rotationMatrix[4]+this._rotMatrix.m[2]*this._parent._rotationMatrix[7],this._particle._rotationMatrix[2]=this._rotMatrix.m[0]*this._parent._rotationMatrix[2]+this._rotMatrix.m[1]*this._parent._rotationMatrix[5]+this._rotMatrix.m[2]*this._parent._rotationMatrix[8],this._particle._rotationMatrix[3]=this._rotMatrix.m[4]*this._parent._rotationMatrix[0]+this._rotMatrix.m[5]*this._parent._rotationMatrix[3]+this._rotMatrix.m[6]*this._parent._rotationMatrix[6],this._particle._rotationMatrix[4]=this._rotMatrix.m[4]*this._parent._rotationMatrix[1]+this._rotMatrix.m[5]*this._parent._rotationMatrix[4]+this._rotMatrix.m[6]*this._parent._rotationMatrix[7],this._particle._rotationMatrix[5]=this._rotMatrix.m[4]*this._parent._rotationMatrix[2]+this._rotMatrix.m[5]*this._parent._rotationMatrix[5]+this._rotMatrix.m[6]*this._parent._rotationMatrix[8],this._particle._rotationMatrix[6]=this._rotMatrix.m[8]*this._parent._rotationMatrix[0]+this._rotMatrix.m[9]*this._parent._rotationMatrix[3]+this._rotMatrix.m[10]*this._parent._rotationMatrix[6],this._particle._rotationMatrix[7]=this._rotMatrix.m[8]*this._parent._rotationMatrix[1]+this._rotMatrix.m[9]*this._parent._rotationMatrix[4]+this._rotMatrix.m[10]*this._parent._rotationMatrix[7],this._particle._rotationMatrix[8]=this._rotMatrix.m[8]*this._parent._rotationMatrix[2]+this._rotMatrix.m[9]*this._parent._rotationMatrix[5]+this._rotMatrix.m[10]*this._parent._rotationMatrix[8])):(this._particle._globalPosition.x=this._particle.position.x,this._particle._globalPosition.y=this._particle.position.y,this._particle._globalPosition.z=this._particle.position.z,(this._computeParticleRotation||this.billboard)&&(this._particle._rotationMatrix[0]=this._rotMatrix.m[0],this._particle._rotationMatrix[1]=this._rotMatrix.m[1],this._particle._rotationMatrix[2]=this._rotMatrix.m[2],this._particle._rotationMatrix[3]=this._rotMatrix.m[4],this._particle._rotationMatrix[4]=this._rotMatrix.m[5],this._particle._rotationMatrix[5]=this._rotMatrix.m[6],this._particle._rotationMatrix[6]=this._rotMatrix.m[8],this._particle._rotationMatrix[7]=this._rotMatrix.m[9],this._particle._rotationMatrix[8]=this._rotMatrix.m[10])),this._particle.translateFromPivot?(this._pivotBackTranslation.x=0,this._pivotBackTranslation.y=0,this._pivotBackTranslation.z=0):(this._pivotBackTranslation.x=this._scaledPivot.x,this._pivotBackTranslation.y=this._scaledPivot.y,this._pivotBackTranslation.z=this._scaledPivot.z),h=0;h<this._shape.length;h++)n=o+3*h,s=a+4*h,l=c+2*h,this._vertex.x=this._shape[h].x,this._vertex.y=this._shape[h].y,this._vertex.z=this._shape[h].z,this._computeParticleVertex&&this.updateParticleVertex(this._particle,this._vertex,h),this._vertex.x*=this._particle.scaling.x,this._vertex.y*=this._particle.scaling.y,this._vertex.z*=this._particle.scaling.z,this._vertex.x-=this._scaledPivot.x,this._vertex.y-=this._scaledPivot.y,this._vertex.z-=this._scaledPivot.z,this._rotated.x=this._vertex.x*this._particle._rotationMatrix[0]+this._vertex.y*this._particle._rotationMatrix[3]+this._vertex.z*this._particle._rotationMatrix[6],this._rotated.y=this._vertex.x*this._particle._rotationMatrix[1]+this._vertex.y*this._particle._rotationMatrix[4]+this._vertex.z*this._particle._rotationMatrix[7],this._rotated.z=this._vertex.x*this._particle._rotationMatrix[2]+this._vertex.y*this._particle._rotationMatrix[5]+this._vertex.z*this._particle._rotationMatrix[8],this._rotated.x+=this._pivotBackTranslation.x,this._rotated.y+=this._pivotBackTranslation.y,this._rotated.z+=this._pivotBackTranslation.z,this._positions32[n]=this._particle._globalPosition.x+this._cam_axisX.x*this._rotated.x+this._cam_axisY.x*this._rotated.y+this._cam_axisZ.x*this._rotated.z,this._positions32[n+1]=this._particle._globalPosition.y+this._cam_axisX.y*this._rotated.x+this._cam_axisY.y*this._rotated.y+this._cam_axisZ.y*this._rotated.z,this._positions32[n+2]=this._particle._globalPosition.z+this._cam_axisX.z*this._rotated.x+this._cam_axisY.z*this._rotated.y+this._cam_axisZ.z*this._rotated.z,this._computeBoundingBox&&(this._positions32[n]<this._minimum.x&&(this._minimum.x=this._positions32[n]),this._positions32[n]>this._maximum.x&&(this._maximum.x=this._positions32[n]),this._positions32[n+1]<this._minimum.y&&(this._minimum.y=this._positions32[n+1]),this._positions32[n+1]>this._maximum.y&&(this._maximum.y=this._positions32[n+1]),this._positions32[n+2]<this._minimum.z&&(this._minimum.z=this._positions32[n+2]),this._positions32[n+2]>this._maximum.z&&(this._maximum.z=this._positions32[n+2])),this._computeParticleVertex||(this._normal.x=this._fixedNormal32[n],this._normal.y=this._fixedNormal32[n+1],this._normal.z=this._fixedNormal32[n+2],this._rotated.x=this._normal.x*this._particle._rotationMatrix[0]+this._normal.y*this._particle._rotationMatrix[3]+this._normal.z*this._particle._rotationMatrix[6],this._rotated.y=this._normal.x*this._particle._rotationMatrix[1]+this._normal.y*this._particle._rotationMatrix[4]+this._normal.z*this._particle._rotationMatrix[7],this._rotated.z=this._normal.x*this._particle._rotationMatrix[2]+this._normal.y*this._particle._rotationMatrix[5]+this._normal.z*this._particle._rotationMatrix[8],this._normals32[n]=this._cam_axisX.x*this._rotated.x+this._cam_axisY.x*this._rotated.y+this._cam_axisZ.x*this._rotated.z,this._normals32[n+1]=this._cam_axisX.y*this._rotated.x+this._cam_axisY.y*this._rotated.y+this._cam_axisZ.y*this._rotated.z,this._normals32[n+2]=this._cam_axisX.z*this._rotated.x+this._cam_axisY.z*this._rotated.y+this._cam_axisZ.z*this._rotated.z),this._computeParticleColor&&this._particle.color&&(this._colors32[s]=this._particle.color.r,this._colors32[s+1]=this._particle.color.g,this._colors32[s+2]=this._particle.color.b,this._colors32[s+3]=this._particle.color.a),this._computeParticleTexture&&(this._uvs32[l]=this._shapeUV[2*h]*(this._particle.uvs.z-this._particle.uvs.x)+this._particle.uvs.x,this._uvs32[l+1]=this._shapeUV[2*h+1]*(this._particle.uvs.w-this._particle.uvs.y)+this._particle.uvs.y);else for(this._particle._stillInvisible=!0,h=0;h<this._shape.length;h++)n=o+3*h,s=a+4*h,l=c+2*h,this._positions32[n]=0,this._positions32[n+1]=0,this._positions32[n+2]=0,this._normals32[n]=0,this._normals32[n+1]=0,this._normals32[n+2]=0,this._computeParticleColor&&this._particle.color&&(this._colors32[s]=this._particle.color.r,this._colors32[s+1]=this._particle.color.g,this._colors32[s+2]=this._particle.color.b,this._colors32[s+3]=this._particle.color.a),this._computeParticleTexture&&(this._uvs32[l]=this._shapeUV[2*h]*(this._particle.uvs.z-this._particle.uvs.x)+this._particle.uvs.x,this._uvs32[l+1]=this._shapeUV[2*h+1]*(this._particle.uvs.w-this._particle.uvs.y)+this._particle.uvs.y);if(this._particlesIntersect){var p=this._particle._boundingInfo,_=p.boundingBox,m=p.boundingSphere;if(!this._bSphereOnly){for(var g=0;g<_.vectors.length;g++)this._vertex.x=this._particle._modelBoundingInfo.boundingBox.vectors[g].x*this._particle.scaling.x,this._vertex.y=this._particle._modelBoundingInfo.boundingBox.vectors[g].y*this._particle.scaling.y,this._vertex.z=this._particle._modelBoundingInfo.boundingBox.vectors[g].z*this._particle.scaling.z,this._rotated.x=this._vertex.x*this._particle._rotationMatrix[0]+this._vertex.y*this._particle._rotationMatrix[3]+this._vertex.z*this._particle._rotationMatrix[6],this._rotated.y=this._vertex.x*this._particle._rotationMatrix[1]+this._vertex.y*this._particle._rotationMatrix[4]+this._vertex.z*this._particle._rotationMatrix[7],this._rotated.z=this._vertex.x*this._particle._rotationMatrix[2]+this._vertex.y*this._particle._rotationMatrix[5]+this._vertex.z*this._particle._rotationMatrix[8],_.vectors[g].x=this._particle.position.x+this._cam_axisX.x*this._rotated.x+this._cam_axisY.x*this._rotated.y+this._cam_axisZ.x*this._rotated.z,_.vectors[g].y=this._particle.position.y+this._cam_axisX.y*this._rotated.x+this._cam_axisY.y*this._rotated.y+this._cam_axisZ.y*this._rotated.z,_.vectors[g].z=this._particle.position.z+this._cam_axisX.z*this._rotated.x+this._cam_axisY.z*this._rotated.y+this._cam_axisZ.z*this._rotated.z;_._update(this.mesh._worldMatrix)}this._minBbox.x=this._particle._modelBoundingInfo.minimum.x*this._particle.scaling.x,this._minBbox.y=this._particle._modelBoundingInfo.minimum.y*this._particle.scaling.y,this._minBbox.z=this._particle._modelBoundingInfo.minimum.z*this._particle.scaling.z,this._maxBbox.x=this._particle._modelBoundingInfo.maximum.x*this._particle.scaling.x,this._maxBbox.y=this._particle._modelBoundingInfo.maximum.y*this._particle.scaling.y,this._maxBbox.z=this._particle._modelBoundingInfo.maximum.z*this._particle.scaling.z,m.center.x=this._particle._globalPosition.x+.5*(this._minBbox.x+this._maxBbox.x),m.center.y=this._particle._globalPosition.y+.5*(this._minBbox.y+this._maxBbox.y),m.center.z=this._particle._globalPosition.z+.5*(this._minBbox.z+this._maxBbox.z),m.radius=.5*this._bSphereRadiusFactor*Math.sqrt((this._maxBbox.x-this._minBbox.x)*(this._maxBbox.x-this._minBbox.x)+(this._maxBbox.y-this._minBbox.y)*(this._maxBbox.y-this._minBbox.y)+(this._maxBbox.z-this._minBbox.z)*(this._maxBbox.z-this._minBbox.z)),m._update(this.mesh._worldMatrix)}o=n+3,a=s+4,c=l+2}}if(i){if(this._computeParticleColor&&this.mesh.updateVerticesData(fi.VertexBuffer.ColorKind,this._colors32,!1,!1),this._computeParticleTexture&&this.mesh.updateVerticesData(fi.VertexBuffer.UVKind,this._uvs32,!1,!1),this.mesh.updateVerticesData(fi.VertexBuffer.PositionKind,this._positions32,!1,!1),!this.mesh.areNormalsFrozen||this.mesh.isFacetDataEnabled){if(this._computeParticleVertex||this.mesh.isFacetDataEnabled){var v=this.mesh.isFacetDataEnabled?this.mesh.getFacetDataParameters():null;fi.VertexData.ComputeNormals(this._positions32,this._indices32,this._normals32,v);for(var y=0;y<this._normals32.length;y++)this._fixedNormal32[y]=this._normals32[y]}this.mesh.areNormalsFrozen||this.mesh.updateVerticesData(fi.VertexBuffer.NormalKind,this._normals32,!1,!1)}if(this._depthSort&&this._depthSortParticles){this.depthSortedParticles.sort(this._depthSortFunction);var b=this.depthSortedParticles.length,T=0,E=0,x=0,P=0;for(T=0;T<b;T++){E=this.depthSortedParticles[T].indicesLength,x=this.depthSortedParticles[T].ind;for(y=0;y<E;y++)this._indices32[P]=this._indices[x+y],P++}this.mesh.updateIndices(this._indices32)}}return this._computeBoundingBox&&(this.mesh._boundingInfo=new fi.BoundingInfo(this._minimum,this._maximum),this.mesh._boundingInfo.update(this.mesh._worldMatrix)),this.afterUpdateParticles(e,t,i),this},e.prototype._quaternionRotationYPR=function(){this._halfroll=.5*this._roll,this._halfpitch=.5*this._pitch,this._halfyaw=.5*this._yaw,this._sinRoll=Math.sin(this._halfroll),this._cosRoll=Math.cos(this._halfroll),this._sinPitch=Math.sin(this._halfpitch),this._cosPitch=Math.cos(this._halfpitch),this._sinYaw=Math.sin(this._halfyaw),this._cosYaw=Math.cos(this._halfyaw),this._quaternion.x=this._cosYaw*this._sinPitch*this._cosRoll+this._sinYaw*this._cosPitch*this._sinRoll,this._quaternion.y=this._sinYaw*this._cosPitch*this._cosRoll-this._cosYaw*this._sinPitch*this._sinRoll,this._quaternion.z=this._cosYaw*this._cosPitch*this._sinRoll-this._sinYaw*this._sinPitch*this._cosRoll,this._quaternion.w=this._cosYaw*this._cosPitch*this._cosRoll+this._sinYaw*this._sinPitch*this._sinRoll},e.prototype._quaternionToRotationMatrix=function(){this._rotMatrix.m[0]=1-2*(this._quaternion.y*this._quaternion.y+this._quaternion.z*this._quaternion.z),this._rotMatrix.m[1]=2*(this._quaternion.x*this._quaternion.y+this._quaternion.z*this._quaternion.w),this._rotMatrix.m[2]=2*(this._quaternion.z*this._quaternion.x-this._quaternion.y*this._quaternion.w),this._rotMatrix.m[3]=0,this._rotMatrix.m[4]=2*(this._quaternion.x*this._quaternion.y-this._quaternion.z*this._quaternion.w),this._rotMatrix.m[5]=1-2*(this._quaternion.z*this._quaternion.z+this._quaternion.x*this._quaternion.x),this._rotMatrix.m[6]=2*(this._quaternion.y*this._quaternion.z+this._quaternion.x*this._quaternion.w),this._rotMatrix.m[7]=0,this._rotMatrix.m[8]=2*(this._quaternion.z*this._quaternion.x+this._quaternion.y*this._quaternion.w),this._rotMatrix.m[9]=2*(this._quaternion.y*this._quaternion.z-this._quaternion.x*this._quaternion.w),this._rotMatrix.m[10]=1-2*(this._quaternion.y*this._quaternion.y+this._quaternion.x*this._quaternion.x),this._rotMatrix.m[11]=0,this._rotMatrix.m[12]=0,this._rotMatrix.m[13]=0,this._rotMatrix.m[14]=0,this._rotMatrix.m[15]=1},e.prototype.dispose=function(){this.mesh.dispose(),this.vars=null,this._positions=null,this._indices=null,this._normals=null,this._uvs=null,this._colors=null,this._indices32=null,this._positions32=null,this._normals32=null,this._fixedNormal32=null,this._uvs32=null,this._colors32=null,this.pickedParticles=null},e.prototype.refreshVisibleSize=function(){return this._isVisibilityBoxLocked||this.mesh.refreshBoundingInfo(),this},e.prototype.setVisibilityBox=function(e){var t=e/2;this.mesh._boundingInfo=new fi.BoundingInfo(new fi.Vector3(-t,-t,-t),new fi.Vector3(t,t,t))},Object.defineProperty(e.prototype,\"isAlwaysVisible\",{get:function(){return this._alwaysVisible},set:function(e){this._alwaysVisible=e,this.mesh.alwaysSelectAsActiveMesh=e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,\"isVisibilityBoxLocked\",{get:function(){return this._isVisibilityBoxLocked},set:function(e){this._isVisibilityBoxLocked=e,this.mesh.getBoundingInfo().isLocked=e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,\"computeParticleRotation\",{get:function(){return this._computeParticleRotation},set:function(e){this._computeParticleRotation=e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,\"computeParticleColor\",{get:function(){return this._computeParticleColor},set:function(e){this._computeParticleColor=e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,\"computeParticleTexture\",{get:function(){return this._computeParticleTexture},set:function(e){this._computeParticleTexture=e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,\"computeParticleVertex\",{get:function(){return this._computeParticleVertex},set:function(e){this._computeParticleVertex=e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,\"computeBoundingBox\",{get:function(){return this._computeBoundingBox},set:function(e){this._computeBoundingBox=e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,\"depthSortParticles\",{get:function(){return this._depthSortParticles},set:function(e){this._depthSortParticles=e},enumerable:!0,configurable:!0}),e.prototype.initParticles=function(){},e.prototype.recycleParticle=function(e){return e},e.prototype.updateParticle=function(e){return e},e.prototype.updateParticleVertex=function(e,t,i){return t},e.prototype.beforeUpdateParticles=function(e,t,i){},e.prototype.afterUpdateParticles=function(e,t,i){},e})(),fi.SolidParticleSystem=pi,_i=$a||($a={}),mi=(function(){function x(){}return x.updateSideOrientation=function(e){return e==_i.Mesh.DOUBLESIDE?_i.Mesh.DOUBLESIDE:null==e?_i.Mesh.FRONTSIDE:e},x.CreateBox=function(e,t,i){void 0===i&&(i=null);var r=new _i.Mesh(e,i);return t.sideOrientation=x.updateSideOrientation(t.sideOrientation),r._originalBuilderSideOrientation=t.sideOrientation,_i.VertexData.CreateBox(t).applyToMesh(r,t.updatable),r},x.CreateSphere=function(e,t,i){var r=new _i.Mesh(e,i);return t.sideOrientation=x.updateSideOrientation(t.sideOrientation),r._originalBuilderSideOrientation=t.sideOrientation,_i.VertexData.CreateSphere(t).applyToMesh(r,t.updatable),r},x.CreateDisc=function(e,t,i){void 0===i&&(i=null);var r=new _i.Mesh(e,i);return t.sideOrientation=x.updateSideOrientation(t.sideOrientation),r._originalBuilderSideOrientation=t.sideOrientation,_i.VertexData.CreateDisc(t).applyToMesh(r,t.updatable),r},x.CreateIcoSphere=function(e,t,i){var r=new _i.Mesh(e,i);return t.sideOrientation=x.updateSideOrientation(t.sideOrientation),r._originalBuilderSideOrientation=t.sideOrientation,_i.VertexData.CreateIcoSphere(t).applyToMesh(r,t.updatable),r},x.CreateRibbon=function(e,t,i){void 0===i&&(i=null);var h=t.pathArray,r=t.closeArray,n=t.closePath,o=x.updateSideOrientation(t.sideOrientation),u=t.instance,s=t.updatable;if(u){_i.Vector3.FromFloatsToRef(Number.MAX_VALUE,Number.MAX_VALUE,Number.MAX_VALUE,_i.Tmp.Vector3[0]),_i.Vector3.FromFloatsToRef(-Number.MAX_VALUE,-Number.MAX_VALUE,-Number.MAX_VALUE,_i.Tmp.Vector3[1]);var a=u.getVerticesData(_i.VertexBuffer.PositionKind);if(function(e){for(var t=h[0].length,i=u,r=0,n=i._originalBuilderSideOrientation===_i.Mesh.DOUBLESIDE?2:1,o=1;o<=n;o++)for(var s=0;s<h.length;s++){var a=h[s],l=a.length;t=t<l?t:l;for(var c=0;c<t;)e[r]=a[c].x,e[r+1]=a[c].y,e[r+2]=a[c].z,a[c].x<_i.Tmp.Vector3[0].x&&(_i.Tmp.Vector3[0].x=a[c].x),a[c].x>_i.Tmp.Vector3[1].x&&(_i.Tmp.Vector3[1].x=a[c].x),a[c].y<_i.Tmp.Vector3[0].y&&(_i.Tmp.Vector3[0].y=a[c].y),a[c].y>_i.Tmp.Vector3[1].y&&(_i.Tmp.Vector3[1].y=a[c].y),a[c].z<_i.Tmp.Vector3[0].z&&(_i.Tmp.Vector3[0].z=a[c].z),a[c].z>_i.Tmp.Vector3[1].z&&(_i.Tmp.Vector3[1].z=a[c].z),c++,r+=3;i._creationDataStorage&&i._creationDataStorage.closePath&&(e[r]=a[0].x,e[r+1]=a[0].y,e[r+2]=a[0].z,r+=3)}}(a),u._boundingInfo=new _i.BoundingInfo(_i.Tmp.Vector3[2],_i.Tmp.Vector3[3]),u._boundingInfo.update(u._worldMatrix),u.updateVerticesData(_i.VertexBuffer.PositionKind,a,!1,!1),t.colors){for(var l=u.getVerticesData(_i.VertexBuffer.ColorKind),c=0;c<t.colors.length;c++)l[4*c]=t.colors[c].r,l[4*c+1]=t.colors[c].g,l[4*c+2]=t.colors[c].b,l[4*c+3]=t.colors[c].a;u.updateVerticesData(_i.VertexBuffer.ColorKind,l,!1,!1)}if(t.uvs){for(var d=u.getVerticesData(_i.VertexBuffer.UVKind),f=0;f<t.uvs.length;f++)d[2*f]=t.uvs[f].x,d[2*f+1]=t.uvs[f].y;u.updateVerticesData(_i.VertexBuffer.UVKind,d,!1,!1)}if(!u.areNormalsFrozen||u.isFacetDataEnabled){var p=u.getIndices(),_=u.getVerticesData(_i.VertexBuffer.NormalKind),m=u.isFacetDataEnabled?u.getFacetDataParameters():null;if(_i.VertexData.ComputeNormals(a,p,_,m),u._creationDataStorage&&u._creationDataStorage.closePath)for(var g=0,v=0,y=0;y<h.length;y++)g=3*u._creationDataStorage.idx[y],v=y+1<h.length?3*(u._creationDataStorage.idx[y+1]-1):_.length-3,_[g]=.5*(_[g]+_[v]),_[g+1]=.5*(_[g+1]+_[v+1]),_[g+2]=.5*(_[g+2]+_[v+2]),_[v]=_[g],_[v+1]=_[g+1],_[v+2]=_[g+2];u.areNormalsFrozen||u.updateVerticesData(_i.VertexBuffer.NormalKind,_,!1,!1)}return u}var b=new _i.Mesh(e,i);b._originalBuilderSideOrientation=o,b._creationDataStorage=new _i._CreationDataStorage;var T=_i.VertexData.CreateRibbon(t);return n&&(b._creationDataStorage.idx=T._idx),b._creationDataStorage.closePath=n,b._creationDataStorage.closeArray=r,T.applyToMesh(b,s),b},x.CreateCylinder=function(e,t,i){var r=new _i.Mesh(e,i);return t.sideOrientation=x.updateSideOrientation(t.sideOrientation),r._originalBuilderSideOrientation=t.sideOrientation,_i.VertexData.CreateCylinder(t).applyToMesh(r,t.updatable),r},x.CreateTorus=function(e,t,i){var r=new _i.Mesh(e,i);return t.sideOrientation=x.updateSideOrientation(t.sideOrientation),r._originalBuilderSideOrientation=t.sideOrientation,_i.VertexData.CreateTorus(t).applyToMesh(r,t.updatable),r},x.CreateTorusKnot=function(e,t,i){var r=new _i.Mesh(e,i);return t.sideOrientation=x.updateSideOrientation(t.sideOrientation),r._originalBuilderSideOrientation=t.sideOrientation,_i.VertexData.CreateTorusKnot(t).applyToMesh(r,t.updatable),r},x.CreateLineSystem=function(e,t,i){var r=t.instance,n=t.lines,o=t.colors;if(r){var s,a,l=r.getVerticesData(_i.VertexBuffer.PositionKind);o&&(s=r.getVerticesData(_i.VertexBuffer.ColorKind));for(var c=0,h=0,u=0;u<n.length;u++)for(var d=n[u],f=0;f<d.length;f++)l[c]=d[f].x,l[c+1]=d[f].y,l[c+2]=d[f].z,o&&s&&(a=o[u],s[h]=a[f].r,s[h+1]=a[f].g,s[h+2]=a[f].b,s[h+3]=a[f].a,h+=4),c+=3;return r.updateVerticesData(_i.VertexBuffer.PositionKind,l,!1,!1),o&&s&&r.updateVerticesData(_i.VertexBuffer.ColorKind,s,!1,!1),r}var p=!!o,_=new _i.LinesMesh(e,i,null,void 0,void 0,p,t.useVertexAlpha);return _i.VertexData.CreateLineSystem(t).applyToMesh(_,t.updatable),_},x.CreateLines=function(e,t,i){void 0===i&&(i=null);var r=t.colors?[t.colors]:null;return x.CreateLineSystem(e,{lines:[t.points],updatable:t.updatable,instance:t.instance,colors:r,useVertexAlpha:t.useVertexAlpha},i)},x.CreateDashedLines=function(e,t,i){void 0===i&&(i=null);var d=t.points,f=t.instance,r=t.gapSize||1,n=t.dashSize||3;if(f){return f.updateMeshPositions((function(e){var t,i,r=_i.Vector3.Zero(),n=e.length/6,o=0,s=0,a=0,l=0,c=0,h=0;for(c=0;c<d.length-1;c++)d[c+1].subtractToRef(d[c],r),o+=r.length();t=o/n;var u=f._creationDataStorage.dashSize;for(i=u*t/(u+f._creationDataStorage.gapSize),c=0;c<d.length-1;c++)for(d[c+1].subtractToRef(d[c],r),s=Math.floor(r.length()/t),r.normalize(),h=0;h<s&&l<e.length;)a=t*h,e[l]=d[c].x+a*r.x,e[l+1]=d[c].y+a*r.y,e[l+2]=d[c].z+a*r.z,e[l+3]=d[c].x+(a+i)*r.x,e[l+4]=d[c].y+(a+i)*r.y,e[l+5]=d[c].z+(a+i)*r.z,l+=6,h++;for(;l<e.length;)e[l]=d[c].x,e[l+1]=d[c].y,e[l+2]=d[c].z,l+=3}),!1),f}var o=new _i.LinesMesh(e,i);return _i.VertexData.CreateDashedLines(t).applyToMesh(o,t.updatable),o._creationDataStorage=new _i._CreationDataStorage,o._creationDataStorage.dashSize=n,o._creationDataStorage.gapSize=r,o},x.ExtrudeShape=function(e,t,i){void 0===i&&(i=null);var r=t.path,n=t.shape,o=t.scale||1,s=t.rotation||0,a=0===t.cap?0:t.cap||_i.Mesh.NO_CAP,l=t.updatable,c=x.updateSideOrientation(t.sideOrientation),h=t.instance||null,u=t.invertUV||!1;return x._ExtrudeShapeGeneric(e,n,r,o,s,null,null,!1,!1,a,!1,i,!!l,c,h,u,t.frontUVs||null,t.backUVs||null)},x.ExtrudeShapeCustom=function(e,t,i){var r=t.path,n=t.shape,o=t.scaleFunction||function(){return 1},s=t.rotationFunction||function(){return 0},a=t.ribbonCloseArray||!1,l=t.ribbonClosePath||!1,c=0===t.cap?0:t.cap||_i.Mesh.NO_CAP,h=t.updatable,u=x.updateSideOrientation(t.sideOrientation),d=t.instance,f=t.invertUV||!1;return x._ExtrudeShapeGeneric(e,n,r,null,null,o,s,a,l,c,!0,i,!!h,u,d||null,f,t.frontUVs||null,t.backUVs||null)},x.CreateLathe=function(e,t,i){var r,n=t.arc?t.arc<=0||1<t.arc?1:t.arc:1,o=void 0===t.closed||t.closed,s=t.shape,a=t.radius||1,l=t.tessellation||64,c=t.clip||0,h=t.updatable,u=x.updateSideOrientation(t.sideOrientation),d=t.cap||_i.Mesh.NO_CAP,f=2*Math.PI,p=new Array,_=t.invertUV||!1,m=0,g=0,v=f/l*n,y=new Array;for(m=0;m<=l-c;m++){y=[];for(d!=_i.Mesh.CAP_START&&d!=_i.Mesh.CAP_ALL||(y.push(new _i.Vector3(0,s[0].y,0)),y.push(new _i.Vector3(Math.cos(m*v)*s[0].x*a,s[0].y,Math.sin(m*v)*s[0].x*a))),g=0;g<s.length;g++)r=new _i.Vector3(Math.cos(m*v)*s[g].x*a,s[g].y,Math.sin(m*v)*s[g].x*a),y.push(r);d!=_i.Mesh.CAP_END&&d!=_i.Mesh.CAP_ALL||(y.push(new _i.Vector3(Math.cos(m*v)*s[s.length-1].x*a,s[s.length-1].y,Math.sin(m*v)*s[s.length-1].x*a)),y.push(new _i.Vector3(0,s[s.length-1].y,0))),p.push(y)}return x.CreateRibbon(e,{pathArray:p,closeArray:o,sideOrientation:u,updatable:h,invertUV:_,frontUVs:t.frontUVs,backUVs:t.backUVs},i)},x.CreatePlane=function(e,t,i){var r=new _i.Mesh(e,i);if(t.sideOrientation=x.updateSideOrientation(t.sideOrientation),r._originalBuilderSideOrientation=t.sideOrientation,_i.VertexData.CreatePlane(t).applyToMesh(r,t.updatable),t.sourcePlane){r.translate(t.sourcePlane.normal,t.sourcePlane.d);var n=Math.acos(_i.Vector3.Dot(t.sourcePlane.normal,_i.Axis.Z)),o=_i.Vector3.Cross(_i.Axis.Z,t.sourcePlane.normal);o.lengthSquared()>_i.Epsilon&&r.rotate(o,n)}return r},x.CreateGround=function(e,t,i){var r=new _i.GroundMesh(e,i);return r._setReady(!1),r._subdivisionsX=t.subdivisionsX||t.subdivisions||1,r._subdivisionsY=t.subdivisionsY||t.subdivisions||1,r._width=t.width||1,r._height=t.height||1,r._maxX=r._width/2,r._maxZ=r._height/2,r._minX=-r._maxX,r._minZ=-r._maxZ,_i.VertexData.CreateGround(t).applyToMesh(r,t.updatable),r._setReady(!0),r},x.CreateTiledGround=function(e,t,i){var r=new _i.Mesh(e,i);return _i.VertexData.CreateTiledGround(t).applyToMesh(r,t.updatable),r},x.CreateGroundFromHeightMap=function(e,t,i,s){var a=i.width||10,l=i.height||10,c=i.subdivisions||1,h=i.minHeight||0,u=i.maxHeight||1,d=i.colorFilter||new _i.Color3(.3,.59,.11),f=i.alphaFilter||0,p=i.updatable,_=i.onReady,m=new _i.GroundMesh(e,s);m._subdivisionsX=c,m._subdivisionsY=c,m._width=a,m._height=l,m._maxX=m._width/2,m._maxZ=m._height/2,m._minX=-m._maxX,m._minZ=-m._maxZ,m._setReady(!1);return _i.Tools.LoadImage(t,(function(e){var t=document.createElement(\"canvas\"),i=t.getContext(\"2d\");if(!i)throw new Error(\"Unable to get 2d context for CreateGroundFromHeightMap\");if(!s.isDisposed){var r=e.width,n=e.height;t.width=r,t.height=n,i.drawImage(e,0,0);var o=i.getImageData(0,0,r,n).data;_i.VertexData.CreateGroundFromHeightMap({width:a,height:l,subdivisions:c,minHeight:h,maxHeight:u,colorFilter:d,buffer:o,bufferWidth:r,bufferHeight:n,alphaFilter:f}).applyToMesh(m,p),_&&_(m),m._setReady(!0)}}),(function(){}),s.database),m},x.CreatePolygon=function(e,t,i){t.sideOrientation=x.updateSideOrientation(t.sideOrientation);for(var r=t.shape,n=t.holes||[],o=t.depth||0,s=[],a=[],l=0;l<r.length;l++)s[l]=new _i.Vector2(r[l].x,r[l].z);s[0].equalsWithEpsilon(s[s.length-1],1e-8)&&s.pop();for(var c=new _i.PolygonMeshBuilder(e,s,i),h=0;h<n.length;h++){a=[];for(var u=0;u<n[h].length;u++)a.push(new _i.Vector2(n[h][u].x,n[h][u].z));c.addHole(a)}var d=c.build(t.updatable,o);return d._originalBuilderSideOrientation=t.sideOrientation,_i.VertexData.CreatePolygon(d,t.sideOrientation,t.faceUV,t.faceColors,t.frontUVs,t.backUVs).applyToMesh(d,t.updatable),d},x.ExtrudePolygon=function(e,t,i){return x.CreatePolygon(e,t,i)},x.CreateTube=function(e,t,i){var r=t.path,n=t.instance,o=1;void 0!==t.radius?o=t.radius:n&&(o=n._creationDataStorage.radius);var s=t.tessellation||64,a=t.radiusFunction||null,l=t.cap||_i.Mesh.NO_CAP,c=t.invertUV||!1,h=t.updatable,u=x.updateSideOrientation(t.sideOrientation);t.arc=t.arc&&(t.arc<=0||1<t.arc)?1:t.arc||1;var d,f,p=function(n,e,t,i,r,o,s,a){for(var l,c,h,u,d=e.getTangents(),f=e.getNormals(),p=e.getDistances(),_=2*Math.PI/r*a,m=o||function(){return i},g=_i.Tmp.Matrix[0],v=s===_i.Mesh.NO_CAP||s===_i.Mesh.CAP_END?0:2,y=0;y<n.length;y++){c=m(y,p[y]),l=Array(),h=f[y];for(var b=0;b<r;b++)_i.Matrix.RotationAxisToRef(d[y],_*b,g),u=l[b]?l[b]:_i.Vector3.Zero(),_i.Vector3.TransformCoordinatesToRef(h,g,u),u.scaleInPlace(c).addInPlace(n[y]),l[b]=u;t[v]=l,v++}var T=function(e,t){for(var i=Array(),r=0;r<e;r++)i.push(n[t]);return i};switch(s){case _i.Mesh.NO_CAP:break;case _i.Mesh.CAP_START:t[0]=T(r,0),t[1]=t[2].slice(0);break;case _i.Mesh.CAP_END:t[v]=t[v-1].slice(0),t[v+1]=T(r,n.length-1);break;case _i.Mesh.CAP_ALL:t[0]=T(r,0),t[1]=t[2].slice(0),t[v]=t[v-1].slice(0),t[v+1]=T(r,n.length-1)}return t};if(n){var _=n._creationDataStorage,m=t.arc||_.arc;return f=p(r,d=_.path3D.update(r),_.pathArray,o,_.tessellation,a,_.cap,m),n=x.CreateRibbon(\"\",{pathArray:f,instance:n}),_.path3D=d,_.pathArray=f,_.arc=m,_.radius=o,n}f=p(r,d=new _i.Path3D(r),new Array,o,s,a,l=l<0||3<l?0:l,t.arc);var g=x.CreateRibbon(e,{pathArray:f,closePath:!0,closeArray:!1,updatable:h,sideOrientation:u,invertUV:c,frontUVs:t.frontUVs,backUVs:t.backUVs},i);return g._creationDataStorage.pathArray=f,g._creationDataStorage.path3D=d,g._creationDataStorage.tessellation=s,g._creationDataStorage.cap=l,g._creationDataStorage.arc=t.arc,g._creationDataStorage.radius=o,g},x.CreatePolyhedron=function(e,t,i){var r=new _i.Mesh(e,i);return t.sideOrientation=x.updateSideOrientation(t.sideOrientation),r._originalBuilderSideOrientation=t.sideOrientation,_i.VertexData.CreatePolyhedron(t).applyToMesh(r,t.updatable),r},x.CreateDecal=function(e,t,i){var r=t.getIndices(),n=t.getVerticesData(_i.VertexBuffer.PositionKind),o=t.getVerticesData(_i.VertexBuffer.NormalKind),s=i.position||_i.Vector3.Zero(),a=i.normal||_i.Vector3.Up(),f=i.size||_i.Vector3.One(),l=i.angle||0;if(!a){var c=new _i.Vector3(0,0,1),h=t.getScene().activeCamera,u=_i.Vector3.TransformCoordinates(c,h.getWorldMatrix());a=h.globalPosition.subtract(u)}var d=-Math.atan2(a.z,a.x)-Math.PI/2,p=Math.sqrt(a.x*a.x+a.z*a.z),_=Math.atan2(a.y,p),m=_i.Matrix.RotationYawPitchRoll(d,_,l).multiply(_i.Matrix.Translation(s.x,s.y,s.z)),g=_i.Matrix.Invert(m),v=t.getWorldMatrix().multiply(g),y=new _i.VertexData;y.indices=[],y.positions=[],y.normals=[],y.uvs=[];for(var b=0,T=function(e){var t=new _i.PositionNormalVertex;if(!r||!n||!o)return t;var i=r[e];return t.position=new _i.Vector3(n[3*i],n[3*i+1],n[3*i+2]),t.position=_i.Vector3.TransformCoordinates(t.position,v),t.normal=new _i.Vector3(o[3*i],o[3*i+1],o[3*i+2]),t.normal=_i.Vector3.TransformNormal(t.normal,v),t},E=function(e,r){if(0===e.length)return e;for(var n=.5*Math.abs(_i.Vector3.Dot(f,r)),t=function(e,t){var i=_i.Vector3.GetClipFactor(e.position,t.position,r,n);return new _i.PositionNormalVertex(_i.Vector3.Lerp(e.position,t.position,i),_i.Vector3.Lerp(e.normal,t.normal,i))},i=new Array,o=0;o<e.length;o+=3){var s,a,l,c=null,h=null,u=null,d=null;switch(((s=0<_i.Vector3.Dot(e[o].position,r)-n)?1:0)+((a=0<_i.Vector3.Dot(e[o+1].position,r)-n)?1:0)+((l=0<_i.Vector3.Dot(e[o+2].position,r)-n)?1:0)){case 0:i.push(e[o]),i.push(e[o+1]),i.push(e[o+2]);break;case 1:if(s&&(c=e[o+1],h=e[o+2],u=t(e[o],c),d=t(e[o],h)),a){c=e[o],h=e[o+2],u=t(e[o+1],c),d=t(e[o+1],h),i.push(u),i.push(h.clone()),i.push(c.clone()),i.push(h.clone()),i.push(u.clone()),i.push(d);break}l&&(c=e[o],h=e[o+1],u=t(e[o+2],c),d=t(e[o+2],h)),c&&h&&u&&d&&(i.push(c.clone()),i.push(h.clone()),i.push(u),i.push(d),i.push(u.clone()),i.push(h.clone()));break;case 2:s||(h=t(c=e[o].clone(),e[o+1]),u=t(c,e[o+2]),i.push(c),i.push(h),i.push(u)),a||(h=t(c=e[o+1].clone(),e[o+2]),u=t(c,e[o]),i.push(c),i.push(h),i.push(u)),l||(h=t(c=e[o+2].clone(),e[o]),u=t(c,e[o+1]),i.push(c),i.push(h),i.push(u))}}return i},x=0;x<r.length;x+=3){var P=new Array;if(P.push(T(x)),P.push(T(x+1)),P.push(T(x+2)),0!==(P=E(P=E(P=E(P=E(P=E(P=E(P,new _i.Vector3(1,0,0)),new _i.Vector3(-1,0,0)),new _i.Vector3(0,1,0)),new _i.Vector3(0,-1,0)),new _i.Vector3(0,0,1)),new _i.Vector3(0,0,-1))).length)for(var A=0;A<P.length;A++){var S=P[A];y.indices.push(b),S.position.toArray(y.positions,3*b),S.normal.toArray(y.normals,3*b),y.uvs.push(.5+S.position.x/f.x),y.uvs.push(.5+S.position.y/f.y),b++}}var M=new _i.Mesh(e,t.getScene());return y.applyToMesh(M),M.position=s.clone(),M.rotation=new _i.Vector3(_,d,l),M},x._ExtrudeShapeGeneric=function(e,t,i,r,n,o,s,a,l,c,h,u,d,f,p,_,m,g){var v,y,b=function(e,t,i,r,n,o,s,a,l,c){for(var h=i.getTangents(),u=i.getNormals(),d=i.getBinormals(),f=i.getDistances(),p=0,_=c&&a?a:function(){return null!==o?o:0},m=c&&s?s:function(){return null!==n?n:1},g=l===_i.Mesh.NO_CAP||l===_i.Mesh.CAP_END?0:2,v=_i.Tmp.Matrix[0],y=0;y<t.length;y++){for(var b=new Array,T=_(y,f[y]),E=m(y,f[y]),x=0;x<e.length;x++){_i.Matrix.RotationAxisToRef(h[y],p,v);var P=h[y].scale(e[x].z).add(u[y].scale(e[x].x)).add(d[y].scale(e[x].y)),A=b[x]?b[x]:_i.Vector3.Zero();_i.Vector3.TransformCoordinatesToRef(P,v,A),A.scaleInPlace(E).addInPlace(t[y]),b[x]=A}r[g]=b,p+=T,g++}var S=function(e){var t,i=Array(),r=_i.Vector3.Zero();for(t=0;t<e.length;t++)r.addInPlace(e[t]);for(r.scaleInPlace(1/e.length),t=0;t<e.length;t++)i.push(r);return i};switch(l){case _i.Mesh.NO_CAP:break;case _i.Mesh.CAP_START:r[0]=S(r[2]),r[1]=r[2];break;case _i.Mesh.CAP_END:r[g]=r[g-1],r[g+1]=S(r[g-1]);break;case _i.Mesh.CAP_ALL:r[0]=S(r[2]),r[1]=r[2],r[g]=r[g-1],r[g+1]=S(r[g-1])}return r};if(p){var T=p._creationDataStorage;return v=T.path3D.update(i),y=b(t,i,T.path3D,T.pathArray,r,n,o,s,T.cap,h),p=_i.Mesh.CreateRibbon(\"\",y,!1,!1,0,u||void 0,!1,0,p)}y=b(t,i,v=new _i.Path3D(i),new Array,r,n,o,s,c=c<0||3<c?0:c,h);var E=x.CreateRibbon(e,{pathArray:y,closeArray:a,closePath:l,updatable:d,sideOrientation:f,invertUV:_,frontUVs:m||void 0,backUVs:g||void 0},u);return E._creationDataStorage.pathArray=y,E._creationDataStorage.path3D=v,E._creationDataStorage.cap=c,E},x})(),_i.MeshBuilder=mi,gi=$a||($a={}),vi=(function(){function r(){}return Object.defineProperty(r,\"DecoderAvailable\",{get:function(){if(\"undefined\"!=typeof DracoDecoderModule)return!0;var e=r.Configuration.decoder;if(e){if(e.wasmUrl&&e.wasmBinaryUrl&&\"object\"==typeof WebAssembly)return!0;if(e.fallbackUrl)return!0}return!1},enumerable:!0,configurable:!0}),r.prototype.dispose=function(){},r.prototype.decodeMeshAsync=function(e,y){var b=e instanceof ArrayBuffer?new Uint8Array(e):e;return r._GetDecoderModule().then((function(e){var t=e.module,i=new gi.VertexData,r=new t.DecoderBuffer;r.Init(b,b.byteLength);var n,o,s=new t.Decoder;try{var a=s.GetEncodedGeometryType(r);switch(a){case t.TRIANGULAR_MESH:n=new t.Mesh,o=s.DecodeBufferToMesh(r,n);break;case t.POINT_CLOUD:n=new t.PointCloud,o=s.DecodeBufferToPointCloud(r,n);break;default:throw new Error(\"Invalid geometry type \"+a)}if(!o.ok()||!n.ptr)throw new Error(o.error_msg());var l=n.num_points();if(a===t.TRIANGULAR_MESH){var c=n.num_faces(),h=new t.DracoInt32Array;try{for(var u=new Uint32Array(3*c),d=0;d<c;d++){s.GetFaceFromMesh(n,d,h);var f=3*d;u[f+0]=h.GetValue(0),u[f+1]=h.GetValue(1),u[f+2]=h.GetValue(2)}i.indices=u}finally{t.destroy(h)}}for(var p in y){var _=y[p],m=s.GetAttributeByUniqueId(n,_),g=new t.DracoFloat32Array;try{s.GetAttributeFloatForAllPoints(n,m,g);var v=new Float32Array(l*m.num_components());for(d=0;d<v.length;d++)v[d]=g.GetValue(d);i.set(v,p)}finally{t.destroy(g)}}}finally{n&&t.destroy(n),t.destroy(s),t.destroy(r)}return i}))},r._GetDecoderModule=function(){if(!r._DecoderModulePromise){var e=null,i={};if(\"undefined\"!=typeof DracoDecoderModule)e=Promise.resolve();else{var t=r.Configuration.decoder;t&&(t.wasmUrl&&t.wasmBinaryUrl&&\"object\"==typeof WebAssembly?e=Promise.all([r._LoadScriptAsync(t.wasmUrl),r._LoadFileAsync(t.wasmBinaryUrl).then((function(e){i.wasmBinary=e}))]):t.fallbackUrl&&(e=r._LoadScriptAsync(t.fallbackUrl)))}if(!e)throw new Error(\"Draco decoder module is not available\");r._DecoderModulePromise=e.then((function(){return new Promise(function(t){i.onModuleLoaded=function(e){t({module:e})},DracoDecoderModule(i)})}))}return r._DecoderModulePromise},r._LoadScriptAsync=function(i){return new Promise(function(e,t){gi.Tools.LoadScript(i,(function(){e()}),(function(e){t(new Error(e))}))})},r._LoadFileAsync=function(e){return new Promise(function(t,i){gi.Tools.LoadFile(e,(function(e){t(e)}),void 0,void 0,!0,(function(e,t){i(t)}))})},r.Configuration={decoder:{wasmUrl:\"https://preview.babylonjs.com/draco_wasm_wrapper_gltf.js\",wasmBinaryUrl:\"https://preview.babylonjs.com/draco_decoder_gltf.wasm\",fallbackUrl:\"https://preview.babylonjs.com/draco_decoder_gltf.js\"}},r})(),gi.DracoCompression=vi,(function(r){r.Engine.AudioEngineFactory=function(e){return new t(e)};var t=(function(){function e(e){void 0===e&&(e=null);var t=this;this._audioContext=null,this._audioContextInitialized=!1,this._muteButton=null,this.canUseWebAudio=!1,this.WarnedWebAudioUnsupported=!1,this.isMP3supported=!1,this.isOGGsupported=!1,this.unlocked=!0,this.useCustomUnlockedButton=!1,this.onAudioUnlockedObservable=new r.Observable,this.onAudioLockedObservable=new r.Observable,this._tryToRun=!1,this._onResize=function(){t._moveButtonToTopLeft()},void 0===window.AudioContext&&void 0===window.webkitAudioContext||(window.AudioContext=window.AudioContext||window.webkitAudioContext,this.canUseWebAudio=!0);var i=document.createElement(\"audio\");this._hostElement=e;try{i&&i.canPlayType&&i.canPlayType('audio/mpeg; codecs=\"mp3\"').replace(/^no$/,\"\")&&(this.isMP3supported=!0)}catch(e){}try{i&&i.canPlayType&&i.canPlayType('audio/ogg; codecs=\"vorbis\"').replace(/^no$/,\"\")&&(this.isOGGsupported=!0)}catch(e){}}return Object.defineProperty(e.prototype,\"audioContext\",{get:function(){return this._audioContextInitialized?this.unlocked||this._muteButton||this._displayMuteButton():this._initializeAudioContext(),this._audioContext},enumerable:!0,configurable:!0}),e.prototype.lock=function(){this._triggerSuspendedState()},e.prototype.unlock=function(){this._triggerRunningState()},e.prototype._resumeAudioContext=function(){var e;return this._audioContext.resume&&(e=this._audioContext.resume()),e||Promise.resolve()},e.prototype._initializeAudioContext=function(){try{this.canUseWebAudio&&(this._audioContext=new AudioContext,this.masterGain=this._audioContext.createGain(),this.masterGain.gain.value=1,this.masterGain.connect(this._audioContext.destination),this._audioContextInitialized=!0,\"running\"===this._audioContext.state&&this._triggerRunningState())}catch(e){this.canUseWebAudio=!1,r.Tools.Error(\"Web Audio: \"+e.message)}},e.prototype._triggerRunningState=function(){var e=this;this._tryToRun||(this._tryToRun=!0,this._resumeAudioContext().then((function(){e._tryToRun=!1,e._muteButton&&e._hideMuteButton()})).catch((function(){e._tryToRun=!1,e.unlocked=!1})),this.unlocked=!0,this.onAudioUnlockedObservable.notifyObservers(this))},e.prototype._triggerSuspendedState=function(){this.unlocked=!1,this.onAudioLockedObservable.notifyObservers(this),this._displayMuteButton()},e.prototype._displayMuteButton=function(){var e=this;if(!this.useCustomUnlockedButton){this._muteButton=document.createElement(\"BUTTON\"),this._muteButton.className=\"babylonUnmuteIcon\",this._muteButton.id=\"babylonUnmuteIconBtn\",this._muteButton.title=\"Unmute\";var t=document.createElement(\"style\");t.appendChild(document.createTextNode(\".babylonUnmuteIcon { position: absolute; left: 20px; top: 20px; height: 40px; width: 60px; background-color: rgba(51,51,51,0.7); background-image: url(data:image/svg+xml;charset=UTF-8,%3Csvg%20version%3D%221.1%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2239%22%20height%3D%2232%22%20viewBox%3D%220%200%2039%2032%22%3E%3Cpath%20fill%3D%22white%22%20d%3D%22M9.625%2018.938l-0.031%200.016h-4.953q-0.016%200-0.031-0.016v-12.453q0-0.016%200.031-0.016h4.953q0.031%200%200.031%200.016v12.453zM12.125%207.688l8.719-8.703v27.453l-8.719-8.719-0.016-0.047v-9.938zM23.359%207.875l1.406-1.406%204.219%204.203%204.203-4.203%201.422%201.406-4.219%204.219%204.219%204.203-1.484%201.359-4.141-4.156-4.219%204.219-1.406-1.422%204.219-4.203z%22%3E%3C%2Fpath%3E%3C%2Fsvg%3E); background-size: 80%; background-repeat:no-repeat; background-position: center; background-position-y: 4px; border: none; outline: none; transition: transform 0.125s ease-out; cursor: pointer; z-index: 9999; } .babylonUnmuteIcon:hover { transform: scale(1.05) } .babylonUnmuteIcon:active { background-color: rgba(51,51,51,1) }\")),document.getElementsByTagName(\"head\")[0].appendChild(t),document.body.appendChild(this._muteButton),this._moveButtonToTopLeft(),this._muteButton.addEventListener(\"touchend\",(function(){e._triggerRunningState()}),!0),this._muteButton.addEventListener(\"click\",(function(){e._triggerRunningState()}),!0),window.addEventListener(\"resize\",this._onResize)}},e.prototype._moveButtonToTopLeft=function(){this._hostElement&&this._muteButton&&(this._muteButton.style.top=this._hostElement.offsetTop+20+\"px\",this._muteButton.style.left=this._hostElement.offsetLeft+20+\"px\")},e.prototype._hideMuteButton=function(){this._muteButton&&(document.body.removeChild(this._muteButton),this._muteButton=null)},e.prototype.dispose=function(){this.canUseWebAudio&&this._audioContextInitialized&&(this._connectedAnalyser&&this._audioContext&&(this._connectedAnalyser.stopDebugCanvas(),this._connectedAnalyser.dispose(),this.masterGain.disconnect(),this.masterGain.connect(this._audioContext.destination),this._connectedAnalyser=null),this.masterGain.gain.value=1),this.WarnedWebAudioUnsupported=!1,this._hideMuteButton(),window.removeEventListener(\"resize\",this._onResize),this.onAudioUnlockedObservable.clear(),this.onAudioLockedObservable.clear()},e.prototype.getGlobalVolume=function(){return this.canUseWebAudio&&this._audioContextInitialized?this.masterGain.gain.value:-1},e.prototype.setGlobalVolume=function(e){this.canUseWebAudio&&this._audioContextInitialized&&(this.masterGain.gain.value=e)},e.prototype.connectToAnalyser=function(e){this._connectedAnalyser&&this._connectedAnalyser.stopDebugCanvas(),this.canUseWebAudio&&this._audioContextInitialized&&this._audioContext&&(this._connectedAnalyser=e,this.masterGain.disconnect(),this._connectedAnalyser.connectAudioNodes(this.masterGain,this._audioContext.destination))},e})();r.AudioEngine=t})($a||($a={})),yi=$a||($a={}),bi=(function(){function d(e,t,i,r,n){void 0===r&&(r=null);var o=this;this.autoplay=!1,this.loop=!1,this.useCustomAttenuation=!1,this.isPlaying=!1,this.isPaused=!1,this.spatialSound=!1,this.refDistance=1,this.rolloffFactor=1,this.maxDistance=100,this.distanceModel=\"linear\",this.onEndedObservable=new yi.Observable,this._panningModel=\"equalpower\",this._playbackRate=1,this._streaming=!1,this._startTime=0,this._startOffset=0,this._position=yi.Vector3.Zero(),this._positionInEmitterSpace=!1,this._localDirection=new yi.Vector3(1,0,0),this._volume=1,this._isReadyToPlay=!1,this._isDirectional=!1,this._coneInnerAngle=360,this._coneOuterAngle=360,this._coneOuterGain=0,this._isOutputConnected=!1,this._urlType=\"Unknown\",this.name=e;var s=(this._scene=i)._getComponent(yi.SceneComponentConstants.NAME_AUDIO);if(s||(s=new yi.AudioSceneComponent(i),i._addComponent(s)),this._readyToPlayCallback=r,this._customAttenuationFunction=function(e,t,i,r,n){return t<i?e*(1-t/i):0},n&&(this.autoplay=n.autoplay||!1,this.loop=n.loop||!1,void 0!==n.volume&&(this._volume=n.volume),this.spatialSound=n.spatialSound||!1,this.maxDistance=n.maxDistance||100,this.useCustomAttenuation=n.useCustomAttenuation||!1,this.rolloffFactor=n.rolloffFactor||1,this.refDistance=n.refDistance||1,this.distanceModel=n.distanceModel||\"linear\",this._playbackRate=n.playbackRate||1,this._streaming=n.streaming||!1),yi.Engine.audioEngine.canUseWebAudio&&yi.Engine.audioEngine.audioContext){this._soundGain=yi.Engine.audioEngine.audioContext.createGain(),this._soundGain.gain.value=this._volume,this._inputAudioNode=this._soundGain,this._outputAudioNode=this._soundGain,this.spatialSound&&this._createSpatialParameters(),this._scene.mainSoundTrack.AddSound(this);var a=!0;if(t)try{\"string\"==typeof t?this._urlType=\"String\":t instanceof ArrayBuffer?this._urlType=\"ArrayBuffer\":t instanceof MediaStream?this._urlType=\"MediaStream\":Array.isArray(t)&&(this._urlType=\"Array\");var l=[],c=!1;switch(this._urlType){case\"MediaStream\":this._streaming=!0,this._isReadyToPlay=!0,this._streamingSource=yi.Engine.audioEngine.audioContext.createMediaElementSource(t),this.autoplay&&this.play(),this._readyToPlayCallback&&this._readyToPlayCallback();break;case\"ArrayBuffer\":0<t.byteLength&&(c=!0,this._soundLoaded(t));break;case\"String\":l.push(t);case\"Array\":0===l.length&&(l=t);for(var h=0;h<l.length;h++){var u=l[h];if(-1!==u.indexOf(\".mp3\",u.length-4)&&yi.Engine.audioEngine.isMP3supported&&(c=!0),-1!==u.indexOf(\".ogg\",u.length-4)&&yi.Engine.audioEngine.isOGGsupported&&(c=!0),-1!==u.indexOf(\".wav\",u.length-4)&&(c=!0),-1!==u.indexOf(\"blob:\")&&(c=!0),c){this._streaming?(this._htmlAudioElement=new Audio(u),this._htmlAudioElement.controls=!1,this._htmlAudioElement.loop=this.loop,yi.Tools.SetCorsBehavior(u,this._htmlAudioElement),this._htmlAudioElement.preload=\"auto\",this._htmlAudioElement.addEventListener(\"canplaythrough\",(function(){o._isReadyToPlay=!0,o.autoplay&&o.play(),o._readyToPlayCallback&&o._readyToPlayCallback()})),document.body.appendChild(this._htmlAudioElement),this._htmlAudioElement.load()):this._scene._loadFile(u,(function(e){o._soundLoaded(e)}),void 0,!0,!0,(function(e){e&&yi.Tools.Error(\"XHR \"+e.status+\" error on: \"+u+\".\"),yi.Tools.Error(\"Sound creation aborted.\"),o._scene.mainSoundTrack.RemoveSound(o)}));break}}break;default:a=!1}a?c||(this._isReadyToPlay=!0,this._readyToPlayCallback&&window.setTimeout((function(){o._readyToPlayCallback&&o._readyToPlayCallback()}),1e3)):yi.Tools.Error(\"Parameter must be a URL to the sound, an Array of URLs (.mp3 & .ogg) or an ArrayBuffer of the sound.\")}catch(e){yi.Tools.Error(\"Unexpected error. Sound creation aborted.\"),this._scene.mainSoundTrack.RemoveSound(this)}}else this._scene.mainSoundTrack.AddSound(this),yi.Engine.audioEngine.WarnedWebAudioUnsupported||(yi.Tools.Error(\"Web Audio is not supported by your browser.\"),yi.Engine.audioEngine.WarnedWebAudioUnsupported=!0),this._readyToPlayCallback&&window.setTimeout((function(){o._readyToPlayCallback&&o._readyToPlayCallback()}),1e3)}return d.prototype.dispose=function(){yi.Engine.audioEngine.canUseWebAudio&&(this.isPlaying&&this.stop(),this._isReadyToPlay=!1,-1===this.soundTrackId?this._scene.mainSoundTrack.RemoveSound(this):this._scene.soundTracks&&this._scene.soundTracks[this.soundTrackId].RemoveSound(this),this._soundGain&&(this._soundGain.disconnect(),this._soundGain=null),this._soundPanner&&(this._soundPanner.disconnect(),this._soundPanner=null),this._soundSource&&(this._soundSource.disconnect(),this._soundSource=null),this._audioBuffer=null,this._htmlAudioElement&&(this._htmlAudioElement.pause(),this._htmlAudioElement.src=\"\",document.body.removeChild(this._htmlAudioElement)),this._streamingSource&&this._streamingSource.disconnect(),this._connectedMesh&&this._registerFunc&&(this._connectedMesh.unregisterAfterWorldMatrixUpdate(this._registerFunc),this._connectedMesh=null))},d.prototype.isReady=function(){return this._isReadyToPlay},d.prototype._soundLoaded=function(e){var t=this;yi.Engine.audioEngine.audioContext&&yi.Engine.audioEngine.audioContext.decodeAudioData(e,(function(e){t._audioBuffer=e,t._isReadyToPlay=!0,t.autoplay&&t.play(),t._readyToPlayCallback&&t._readyToPlayCallback()}),(function(e){yi.Tools.Error(\"Error while decoding audio data for: \"+t.name+\" / Error: \"+e)}))},d.prototype.setAudioBuffer=function(e){yi.Engine.audioEngine.canUseWebAudio&&(this._audioBuffer=e,this._isReadyToPlay=!0)},d.prototype.updateOptions=function(e){e&&(this.loop=e.loop||this.loop,this.maxDistance=e.maxDistance||this.maxDistance,this.useCustomAttenuation=e.useCustomAttenuation||this.useCustomAttenuation,this.rolloffFactor=e.rolloffFactor||this.rolloffFactor,this.refDistance=e.refDistance||this.refDistance,this.distanceModel=e.distanceModel||this.distanceModel,this._playbackRate=e.playbackRate||this._playbackRate,this._updateSpatialParameters(),this.isPlaying&&(this._streaming&&this._htmlAudioElement?this._htmlAudioElement.playbackRate=this._playbackRate:this._soundSource&&(this._soundSource.playbackRate.value=this._playbackRate)))},d.prototype._createSpatialParameters=function(){yi.Engine.audioEngine.canUseWebAudio&&yi.Engine.audioEngine.audioContext&&(this._scene.headphone&&(this._panningModel=\"HRTF\"),this._soundPanner=yi.Engine.audioEngine.audioContext.createPanner(),this._updateSpatialParameters(),this._soundPanner.connect(this._outputAudioNode),this._inputAudioNode=this._soundPanner)},d.prototype._updateSpatialParameters=function(){this.spatialSound&&this._soundPanner&&(this.useCustomAttenuation?(this._soundPanner.distanceModel=\"linear\",this._soundPanner.maxDistance=Number.MAX_VALUE,this._soundPanner.refDistance=1,this._soundPanner.rolloffFactor=1):(this._soundPanner.distanceModel=this.distanceModel,this._soundPanner.maxDistance=this.maxDistance,this._soundPanner.refDistance=this.refDistance,this._soundPanner.rolloffFactor=this.rolloffFactor),this._soundPanner.panningModel=this._panningModel)},d.prototype.switchPanningModelToHRTF=function(){this._panningModel=\"HRTF\",this._switchPanningModel()},d.prototype.switchPanningModelToEqualPower=function(){this._panningModel=\"equalpower\",this._switchPanningModel()},d.prototype._switchPanningModel=function(){yi.Engine.audioEngine.canUseWebAudio&&this.spatialSound&&this._soundPanner&&(this._soundPanner.panningModel=this._panningModel)},d.prototype.connectToSoundTrackAudioNode=function(e){yi.Engine.audioEngine.canUseWebAudio&&(this._isOutputConnected&&this._outputAudioNode.disconnect(),this._outputAudioNode.connect(e),this._isOutputConnected=!0)},d.prototype.setDirectionalCone=function(e,t,i){t<e?yi.Tools.Error(\"setDirectionalCone(): outer angle of the cone must be superior or equal to the inner angle.\"):(this._coneInnerAngle=e,this._coneOuterAngle=t,this._coneOuterGain=i,this._isDirectional=!0,this.isPlaying&&this.loop&&(this.stop(),this.play()))},Object.defineProperty(d.prototype,\"directionalConeInnerAngle\",{get:function(){return this._coneInnerAngle},set:function(e){if(e!=this._coneInnerAngle){if(this._coneOuterAngle<e)return void yi.Tools.Error(\"directionalConeInnerAngle: outer angle of the cone must be superior or equal to the inner angle.\");this._coneInnerAngle=e,yi.Engine.audioEngine.canUseWebAudio&&this.spatialSound&&this._soundPanner&&(this._soundPanner.coneInnerAngle=this._coneInnerAngle)}},enumerable:!0,configurable:!0}),Object.defineProperty(d.prototype,\"directionalConeOuterAngle\",{get:function(){return this._coneOuterAngle},set:function(e){if(e!=this._coneOuterAngle){if(e<this._coneInnerAngle)return void yi.Tools.Error(\"directionalConeOuterAngle: outer angle of the cone must be superior or equal to the inner angle.\");this._coneOuterAngle=e,yi.Engine.audioEngine.canUseWebAudio&&this.spatialSound&&this._soundPanner&&(this._soundPanner.coneOuterAngle=this._coneOuterAngle)}},enumerable:!0,configurable:!0}),d.prototype.setPosition=function(e){this._position=e,yi.Engine.audioEngine.canUseWebAudio&&this.spatialSound&&this._soundPanner&&!isNaN(this._position.x)&&!isNaN(this._position.y)&&!isNaN(this._position.z)&&this._soundPanner.setPosition(this._position.x,this._position.y,this._position.z)},d.prototype.setLocalDirectionToMesh=function(e){this._localDirection=e,yi.Engine.audioEngine.canUseWebAudio&&this._connectedMesh&&this.isPlaying&&this._updateDirection()},d.prototype._updateDirection=function(){if(this._connectedMesh&&this._soundPanner){var e=this._connectedMesh.getWorldMatrix(),t=yi.Vector3.TransformNormal(this._localDirection,e);t.normalize(),this._soundPanner.setOrientation(t.x,t.y,t.z)}},d.prototype.updateDistanceFromListener=function(){if(yi.Engine.audioEngine.canUseWebAudio&&this._connectedMesh&&this.useCustomAttenuation&&this._soundGain&&this._scene.activeCamera){var e=this._connectedMesh.getDistanceToCamera(this._scene.activeCamera);this._soundGain.gain.value=this._customAttenuationFunction(this._volume,e,this.maxDistance,this.refDistance,this.rolloffFactor)}},d.prototype.setAttenuationFunction=function(e){this._customAttenuationFunction=e},d.prototype.play=function(e,t){var i=this;if(this._isReadyToPlay&&this._scene.audioEnabled&&yi.Engine.audioEngine.audioContext)try{this._startOffset<0&&(e=-this._startOffset,this._startOffset=0);var r=e?yi.Engine.audioEngine.audioContext.currentTime+e:yi.Engine.audioEngine.audioContext.currentTime;if(this._soundSource&&this._streamingSource||this.spatialSound&&this._soundPanner&&(isNaN(this._position.x)||isNaN(this._position.y)||isNaN(this._position.z)||this._soundPanner.setPosition(this._position.x,this._position.y,this._position.z),this._isDirectional&&(this._soundPanner.coneInnerAngle=this._coneInnerAngle,this._soundPanner.coneOuterAngle=this._coneOuterAngle,this._soundPanner.coneOuterGain=this._coneOuterGain,this._connectedMesh?this._updateDirection():this._soundPanner.setOrientation(this._localDirection.x,this._localDirection.y,this._localDirection.z))),this._streaming){if(this._streamingSource||(this._streamingSource=yi.Engine.audioEngine.audioContext.createMediaElementSource(this._htmlAudioElement),this._htmlAudioElement.onended=function(){i._onended()},this._htmlAudioElement.playbackRate=this._playbackRate),this._streamingSource.disconnect(),this._streamingSource.connect(this._inputAudioNode),this._htmlAudioElement){var n=function(){if(yi.Engine.audioEngine.unlocked){var e=i._htmlAudioElement.play();void 0!==e&&e.catch((function(e){yi.Engine.audioEngine.lock(),yi.Engine.audioEngine.onAudioUnlockedObservable.addOnce((function(){n()}))}))}else yi.Engine.audioEngine.onAudioUnlockedObservable.addOnce((function(){n()}))};n()}}else this._soundSource=yi.Engine.audioEngine.audioContext.createBufferSource(),this._soundSource.buffer=this._audioBuffer,this._soundSource.connect(this._inputAudioNode),this._soundSource.loop=this.loop,this._soundSource.playbackRate.value=this._playbackRate,this._soundSource.onended=function(){i._onended()},this._soundSource.buffer&&this._soundSource.start(r,this.isPaused?this._startOffset%this._soundSource.buffer.duration:t||0);this._startTime=r,this.isPlaying=!0,this.isPaused=!1}catch(e){yi.Tools.Error(\"Error while trying to play audio: \"+this.name+\", \"+e.message)}},d.prototype._onended=function(){this.isPlaying=!1,this.onended&&this.onended(),this.onEndedObservable.notifyObservers(this)},d.prototype.stop=function(e){if(this.isPlaying){if(this._streaming)this._htmlAudioElement?(this._htmlAudioElement.pause(),0<this._htmlAudioElement.currentTime&&(this._htmlAudioElement.currentTime=0)):this._streamingSource.disconnect();else if(yi.Engine.audioEngine.audioContext&&this._soundSource){var t=e?yi.Engine.audioEngine.audioContext.currentTime+e:yi.Engine.audioEngine.audioContext.currentTime;this._soundSource.stop(t),this._soundSource.onended=function(){},this.isPaused||(this._startOffset=0)}this.isPlaying=!1}},d.prototype.pause=function(){this.isPlaying&&(this.isPaused=!0,this._streaming?this._htmlAudioElement?this._htmlAudioElement.pause():this._streamingSource.disconnect():yi.Engine.audioEngine.audioContext&&(this.stop(0),this._startOffset+=yi.Engine.audioEngine.audioContext.currentTime-this._startTime))},d.prototype.setVolume=function(e,t){yi.Engine.audioEngine.canUseWebAudio&&this._soundGain&&(t&&yi.Engine.audioEngine.audioContext?(this._soundGain.gain.cancelScheduledValues(yi.Engine.audioEngine.audioContext.currentTime),this._soundGain.gain.setValueAtTime(this._soundGain.gain.value,yi.Engine.audioEngine.audioContext.currentTime),this._soundGain.gain.linearRampToValueAtTime(e,yi.Engine.audioEngine.audioContext.currentTime+t)):this._soundGain.gain.value=e),this._volume=e},d.prototype.setPlaybackRate=function(e){this._playbackRate=e,this.isPlaying&&(this._streaming&&this._htmlAudioElement?this._htmlAudioElement.playbackRate=this._playbackRate:this._soundSource&&(this._soundSource.playbackRate.value=this._playbackRate))},d.prototype.getVolume=function(){return this._volume},d.prototype.attachToMesh=function(e){var t=this;this._connectedMesh&&this._registerFunc&&(this._connectedMesh.unregisterAfterWorldMatrixUpdate(this._registerFunc),this._registerFunc=null),this._connectedMesh=e,this.spatialSound||(this.spatialSound=!0,this._createSpatialParameters(),this.isPlaying&&this.loop&&(this.stop(),this.play())),this._onRegisterAfterWorldMatrixUpdate(this._connectedMesh),this._registerFunc=function(e){return t._onRegisterAfterWorldMatrixUpdate(e)},e.registerAfterWorldMatrixUpdate(this._registerFunc)},d.prototype.detachFromMesh=function(){this._connectedMesh&&this._registerFunc&&(this._connectedMesh.unregisterAfterWorldMatrixUpdate(this._registerFunc),this._registerFunc=null,this._connectedMesh=null)},d.prototype._onRegisterAfterWorldMatrixUpdate=function(e){if(e.getBoundingInfo){var t=e;if(this._positionInEmitterSpace)t.worldMatrixFromCache.invertToRef(yi.Tmp.Matrix[0]),this.setPosition(yi.Tmp.Matrix[0].getTranslation());else{var i=t.getBoundingInfo();this.setPosition(i.boundingSphere.centerWorld)}yi.Engine.audioEngine.canUseWebAudio&&this._isDirectional&&this.isPlaying&&this._updateDirection()}},d.prototype.clone=function(){var e=this;if(this._streaming)return null;var t=function(){e._isReadyToPlay?(r._audioBuffer=e.getAudioBuffer(),r._isReadyToPlay=!0,r.autoplay&&r.play()):window.setTimeout(t,300)},i={autoplay:this.autoplay,loop:this.loop,volume:this._volume,spatialSound:this.spatialSound,maxDistance:this.maxDistance,useCustomAttenuation:this.useCustomAttenuation,rolloffFactor:this.rolloffFactor,refDistance:this.refDistance,distanceModel:this.distanceModel},r=new d(this.name+\"_cloned\",new ArrayBuffer(0),this._scene,null,i);return this.useCustomAttenuation&&r.setAttenuationFunction(this._customAttenuationFunction),r.setPosition(this._position),r.setPlaybackRate(this._playbackRate),t(),r},d.prototype.getAudioBuffer=function(){return this._audioBuffer},d.prototype.serialize=function(){var e={name:this.name,url:this.name,autoplay:this.autoplay,loop:this.loop,volume:this._volume,spatialSound:this.spatialSound,maxDistance:this.maxDistance,rolloffFactor:this.rolloffFactor,refDistance:this.refDistance,distanceModel:this.distanceModel,playbackRate:this._playbackRate,panningModel:this._panningModel,soundTrackId:this.soundTrackId};return this.spatialSound&&(this._connectedMesh&&(e.connectedMeshId=this._connectedMesh.id),e.position=this._position.asArray(),e.refDistance=this.refDistance,e.distanceModel=this.distanceModel,e.isDirectional=this._isDirectional,e.localDirectionToMesh=this._localDirection.asArray(),e.coneInnerAngle=this._coneInnerAngle,e.coneOuterAngle=this._coneOuterAngle,e.coneOuterGain=this._coneOuterGain),e},d.Parse=function(e,t,i,r){var n,o=e.name;n=e.url?i+e.url:i+o;var s,a={autoplay:e.autoplay,loop:e.loop,volume:e.volume,spatialSound:e.spatialSound,maxDistance:e.maxDistance,rolloffFactor:e.rolloffFactor,refDistance:e.refDistance,distanceModel:e.distanceModel,playbackRate:e.playbackRate};if(r){var l=function(){r._isReadyToPlay?(s._audioBuffer=r.getAudioBuffer(),s._isReadyToPlay=!0,s.autoplay&&s.play()):window.setTimeout(l,300)};s=new d(o,new ArrayBuffer(0),t,null,a),l()}else s=new d(o,n,t,function(){t._removePendingData(s)},a),t._addPendingData(s);if(e.position){var c=yi.Vector3.FromArray(e.position);s.setPosition(c)}if(e.isDirectional&&(s.setDirectionalCone(e.coneInnerAngle||360,e.coneOuterAngle||360,e.coneOuterGain||0),e.localDirectionToMesh)){var h=yi.Vector3.FromArray(e.localDirectionToMesh);s.setLocalDirectionToMesh(h)}if(e.connectedMeshId){var u=t.getMeshByID(e.connectedMeshId);u&&s.attachToMesh(u)}return s},d})(),yi.Sound=bi,Ti=$a||($a={}),Ei=(function(){function e(e,t){void 0===t&&(t={}),this.id=-1,this._isMainTrack=!1,this._isInitialized=!1,this._scene=e,this.soundCollection=new Array,this._options=t,!this._isMainTrack&&this._scene.soundTracks&&(this._scene.soundTracks.push(this),this.id=this._scene.soundTracks.length-1)}return e.prototype._initializeSoundTrackAudioGraph=function(){Ti.Engine.audioEngine.canUseWebAudio&&Ti.Engine.audioEngine.audioContext&&(this._outputAudioNode=Ti.Engine.audioEngine.audioContext.createGain(),this._outputAudioNode.connect(Ti.Engine.audioEngine.masterGain),this._options&&(this._options.volume&&(this._outputAudioNode.gain.value=this._options.volume),this._options.mainTrack&&(this._isMainTrack=this._options.mainTrack)),this._isInitialized=!0)},e.prototype.dispose=function(){if(Ti.Engine.audioEngine&&Ti.Engine.audioEngine.canUseWebAudio){for(this._connectedAnalyser&&this._connectedAnalyser.stopDebugCanvas();this.soundCollection.length;)this.soundCollection[0].dispose();this._outputAudioNode&&this._outputAudioNode.disconnect(),this._outputAudioNode=null}},e.prototype.AddSound=function(e){this._isInitialized||this._initializeSoundTrackAudioGraph(),Ti.Engine.audioEngine.canUseWebAudio&&this._outputAudioNode&&e.connectToSoundTrackAudioNode(this._outputAudioNode),e.soundTrackId&&(-1===e.soundTrackId?this._scene.mainSoundTrack.RemoveSound(e):this._scene.soundTracks&&this._scene.soundTracks[e.soundTrackId].RemoveSound(e)),this.soundCollection.push(e),e.soundTrackId=this.id},e.prototype.RemoveSound=function(e){var t=this.soundCollection.indexOf(e);-1!==t&&this.soundCollection.splice(t,1)},e.prototype.setVolume=function(e){Ti.Engine.audioEngine.canUseWebAudio&&this._outputAudioNode&&(this._outputAudioNode.gain.value=e)},e.prototype.switchPanningModelToHRTF=function(){if(Ti.Engine.audioEngine.canUseWebAudio)for(var e=0;e<this.soundCollection.length;e++)this.soundCollection[e].switchPanningModelToHRTF()},e.prototype.switchPanningModelToEqualPower=function(){if(Ti.Engine.audioEngine.canUseWebAudio)for(var e=0;e<this.soundCollection.length;e++)this.soundCollection[e].switchPanningModelToEqualPower()},e.prototype.connectToAnalyser=function(e){this._connectedAnalyser&&this._connectedAnalyser.stopDebugCanvas(),this._connectedAnalyser=e,Ti.Engine.audioEngine.canUseWebAudio&&this._outputAudioNode&&(this._outputAudioNode.disconnect(),this._connectedAnalyser.connectAudioNodes(this._outputAudioNode,Ti.Engine.audioEngine.masterGain))},e})(),Ti.SoundTrack=Ei,xi=$a||($a={}),Pi=(function(){function e(e){this.SMOOTHING=.75,this.FFT_SIZE=512,this.BARGRAPHAMPLITUDE=256,this.DEBUGCANVASPOS={x:20,y:20},this.DEBUGCANVASSIZE={width:320,height:200},this._scene=e,this._audioEngine=xi.Engine.audioEngine,this._audioEngine.canUseWebAudio&&this._audioEngine.audioContext&&(this._webAudioAnalyser=this._audioEngine.audioContext.createAnalyser(),this._webAudioAnalyser.minDecibels=-140,this._webAudioAnalyser.maxDecibels=0,this._byteFreqs=new Uint8Array(this._webAudioAnalyser.frequencyBinCount),this._byteTime=new Uint8Array(this._webAudioAnalyser.frequencyBinCount),this._floatFreqs=new Float32Array(this._webAudioAnalyser.frequencyBinCount))}return e.prototype.getFrequencyBinCount=function(){return this._audioEngine.canUseWebAudio?this._webAudioAnalyser.frequencyBinCount:0},e.prototype.getByteFrequencyData=function(){return this._audioEngine.canUseWebAudio&&(this._webAudioAnalyser.smoothingTimeConstant=this.SMOOTHING,this._webAudioAnalyser.fftSize=this.FFT_SIZE,this._webAudioAnalyser.getByteFrequencyData(this._byteFreqs)),this._byteFreqs},e.prototype.getByteTimeDomainData=function(){return this._audioEngine.canUseWebAudio&&(this._webAudioAnalyser.smoothingTimeConstant=this.SMOOTHING,this._webAudioAnalyser.fftSize=this.FFT_SIZE,this._webAudioAnalyser.getByteTimeDomainData(this._byteTime)),this._byteTime},e.prototype.getFloatFrequencyData=function(){return this._audioEngine.canUseWebAudio&&(this._webAudioAnalyser.smoothingTimeConstant=this.SMOOTHING,this._webAudioAnalyser.fftSize=this.FFT_SIZE,this._webAudioAnalyser.getFloatFrequencyData(this._floatFreqs)),this._floatFreqs},e.prototype.drawDebugCanvas=function(){var e=this;if(this._audioEngine.canUseWebAudio&&(this._debugCanvas||(this._debugCanvas=document.createElement(\"canvas\"),this._debugCanvas.width=this.DEBUGCANVASSIZE.width,this._debugCanvas.height=this.DEBUGCANVASSIZE.height,this._debugCanvas.style.position=\"absolute\",this._debugCanvas.style.top=this.DEBUGCANVASPOS.y+\"px\",this._debugCanvas.style.left=this.DEBUGCANVASPOS.x+\"px\",this._debugCanvasContext=this._debugCanvas.getContext(\"2d\"),document.body.appendChild(this._debugCanvas),this._registerFunc=function(){e.drawDebugCanvas()},this._scene.registerBeforeRender(this._registerFunc)),this._registerFunc&&this._debugCanvasContext)){var t=this.getByteFrequencyData();this._debugCanvasContext.fillStyle=\"rgb(0, 0, 0)\",this._debugCanvasContext.fillRect(0,0,this.DEBUGCANVASSIZE.width,this.DEBUGCANVASSIZE.height);for(var i=0;i<this.getFrequencyBinCount();i++){var r=t[i]/this.BARGRAPHAMPLITUDE,n=this.DEBUGCANVASSIZE.height*r,o=this.DEBUGCANVASSIZE.height-n-1,s=this.DEBUGCANVASSIZE.width/this.getFrequencyBinCount(),a=i/this.getFrequencyBinCount()*360;this._debugCanvasContext.fillStyle=\"hsl(\"+a+\", 100%, 50%)\",this._debugCanvasContext.fillRect(i*s,o,s,n)}}},e.prototype.stopDebugCanvas=function(){this._debugCanvas&&(this._registerFunc&&(this._scene.unregisterBeforeRender(this._registerFunc),this._registerFunc=null),document.body.removeChild(this._debugCanvas),this._debugCanvas=null,this._debugCanvasContext=null)},e.prototype.connectAudioNodes=function(e,t){this._audioEngine.canUseWebAudio&&(e.connect(this._webAudioAnalyser),this._webAudioAnalyser.connect(t))},e.prototype.dispose=function(){this._audioEngine.canUseWebAudio&&this._webAudioAnalyser.disconnect()},e})(),xi.Analyser=Pi,Ai=$a||($a={}),Si=(function(){function e(e,t,i){var r=this;if(this.loop=!1,this._coneInnerAngle=360,this._coneOuterAngle=360,this._volume=1,this.isPlaying=!1,this.isPaused=!1,this._sounds=[],this._weights=[],t.length!==i.length)throw new Error(\"Sounds length does not equal weights length\");this.loop=e;for(var n=0,o=0,s=this._weights=i;o<s.length;o++){n+=s[o]}for(var a=0<n?1/n:0,l=0;l<this._weights.length;l++)this._weights[l]*=a;this._sounds=t;for(var c=0,h=this._sounds;c<h.length;c++){h[c].onEndedObservable.add((function(){r._onended()}))}}return Object.defineProperty(e.prototype,\"directionalConeInnerAngle\",{get:function(){return this._coneInnerAngle},set:function(e){if(e!==this._coneInnerAngle){if(this._coneOuterAngle<e)return void Ai.Tools.Error(\"directionalConeInnerAngle: outer angle of the cone must be superior or equal to the inner angle.\");this._coneInnerAngle=e;for(var t=0,i=this._sounds;t<i.length;t++){i[t].directionalConeInnerAngle=e}}},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,\"directionalConeOuterAngle\",{get:function(){return this._coneOuterAngle},set:function(e){if(e!==this._coneOuterAngle){if(e<this._coneInnerAngle)return void Ai.Tools.Error(\"directionalConeOuterAngle: outer angle of the cone must be superior or equal to the inner angle.\");this._coneOuterAngle=e;for(var t=0,i=this._sounds;t<i.length;t++){i[t].directionalConeOuterAngle=e}}},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,\"volume\",{get:function(){return this._volume},set:function(e){if(e!==this._volume)for(var t=0,i=this._sounds;t<i.length;t++){i[t].setVolume(e)}},enumerable:!0,configurable:!0}),e.prototype._onended=function(){void 0!==this._currentIndex&&(this._sounds[this._currentIndex].autoplay=!1),this.loop&&this.isPlaying?this.play():this.isPlaying=!1},e.prototype.pause=function(){this.isPaused=!0,void 0!==this._currentIndex&&this._sounds[this._currentIndex].pause()},e.prototype.stop=function(){this.isPlaying=!1,void 0!==this._currentIndex&&this._sounds[this._currentIndex].stop()},e.prototype.play=function(e){if(!this.isPaused){this.stop();for(var t=Math.random(),i=0,r=0;r<this._weights.length;r++)if(t<=(i+=this._weights[r])){this._currentIndex=r;break}}var n=this._sounds[this._currentIndex];n.isReady()?n.play(0,this.isPaused?void 0:e):n.autoplay=!0,this.isPlaying=!0,this.isPaused=!1},e})(),Ai.WeightedSound=Si,(function(c){c.AbstractScene.AddParser(c.SceneComponentConstants.NAME_AUDIO,(function(e,t,i,r){var n,o=[];if(i.sounds=i.sounds||[],void 0!==e.sounds&&null!==e.sounds)for(var s=0,a=e.sounds.length;s<a;s++){var l=e.sounds[s];c.Engine.audioEngine.canUseWebAudio?(l.url||(l.url=l.name),o[l.url]?i.sounds.push(c.Sound.Parse(l,t,r,o[l.url])):(n=c.Sound.Parse(l,t,r),o[l.url]=n,i.sounds.push(n))):i.sounds.push(new c.Sound(l.name,null,t))}o=[]})),Object.defineProperty(c.Scene.prototype,\"mainSoundTrack\",{get:function(){var e=this._getComponent(c.SceneComponentConstants.NAME_AUDIO);return e||(e=new i(this),this._addComponent(e)),this._mainSoundTrack||(this._mainSoundTrack=new c.SoundTrack(this,{mainTrack:!0})),this._mainSoundTrack},enumerable:!0,configurable:!0}),c.Scene.prototype.getSoundByName=function(e){var t;for(t=0;t<this.mainSoundTrack.soundCollection.length;t++)if(this.mainSoundTrack.soundCollection[t].name===e)return this.mainSoundTrack.soundCollection[t];if(this.soundTracks)for(var i=0;i<this.soundTracks.length;i++)for(t=0;t<this.soundTracks[i].soundCollection.length;t++)if(this.soundTracks[i].soundCollection[t].name===e)return this.soundTracks[i].soundCollection[t];return null},Object.defineProperty(c.Scene.prototype,\"audioEnabled\",{get:function(){var e=this._getComponent(c.SceneComponentConstants.NAME_AUDIO);return e||(e=new i(this),this._addComponent(e)),e.audioEnabled},set:function(e){var t=this._getComponent(c.SceneComponentConstants.NAME_AUDIO);t||(t=new i(this),this._addComponent(t)),e?t.enableAudio():t.disableAudio()},enumerable:!0,configurable:!0}),Object.defineProperty(c.Scene.prototype,\"headphone\",{get:function(){var e=this._getComponent(c.SceneComponentConstants.NAME_AUDIO);return e||(e=new i(this),this._addComponent(e)),e.headphone},set:function(e){var t=this._getComponent(c.SceneComponentConstants.NAME_AUDIO);t||(t=new i(this),this._addComponent(t)),e?t.switchAudioModeForHeadphones():t.switchAudioModeForNormalSpeakers()},enumerable:!0,configurable:!0});var i=(function(){function e(e){this.name=c.SceneComponentConstants.NAME_AUDIO,this._audioEnabled=!0,this._headphone=!1,(this.scene=e).soundTracks=new Array,e.sounds=new Array}return Object.defineProperty(e.prototype,\"audioEnabled\",{get:function(){return this._audioEnabled},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,\"headphone\",{get:function(){return this._headphone},enumerable:!0,configurable:!0}),e.prototype.register=function(){this.scene._afterRenderStage.registerStep(c.SceneComponentConstants.STEP_AFTERRENDER_AUDIO,this,this._afterRender)},e.prototype.rebuild=function(){},e.prototype.serialize=function(e){if(e.sounds=[],this.scene.soundTracks)for(var t=0;t<this.scene.soundTracks.length;t++)for(var i=this.scene.soundTracks[t],r=0;r<i.soundCollection.length;r++)e.sounds.push(i.soundCollection[r].serialize())},e.prototype.addFromContainer=function(e){var t=this;e.sounds&&e.sounds.forEach((function(e){e.play(),e.autoplay=!0,t.scene.mainSoundTrack.AddSound(e)}))},e.prototype.removeFromContainer=function(e){var t=this;e.sounds&&e.sounds.forEach((function(e){e.stop(),e.autoplay=!1,t.scene.mainSoundTrack.RemoveSound(e)}))},e.prototype.dispose=function(){var e=this.scene;if(e._mainSoundTrack&&e.mainSoundTrack.dispose(),e.soundTracks)for(var t=0;t<e.soundTracks.length;t++)e.soundTracks[t].dispose()},e.prototype.disableAudio=function(){var e,t=this.scene;for(this._audioEnabled=!1,e=0;e<t.mainSoundTrack.soundCollection.length;e++)t.mainSoundTrack.soundCollection[e].pause();if(t.soundTracks)for(e=0;e<t.soundTracks.length;e++)for(var i=0;i<t.soundTracks[e].soundCollection.length;i++)t.soundTracks[e].soundCollection[i].pause()},e.prototype.enableAudio=function(){var e,t=this.scene;for(this._audioEnabled=!0,e=0;e<t.mainSoundTrack.soundCollection.length;e++)t.mainSoundTrack.soundCollection[e].isPaused&&t.mainSoundTrack.soundCollection[e].play();if(t.soundTracks)for(e=0;e<t.soundTracks.length;e++)for(var i=0;i<t.soundTracks[e].soundCollection.length;i++)t.soundTracks[e].soundCollection[i].isPaused&&t.soundTracks[e].soundCollection[i].play()},e.prototype.switchAudioModeForHeadphones=function(){var e=this.scene;if(this._headphone=!0,e.mainSoundTrack.switchPanningModelToHRTF(),e.soundTracks)for(var t=0;t<e.soundTracks.length;t++)e.soundTracks[t].switchPanningModelToHRTF()},e.prototype.switchAudioModeForNormalSpeakers=function(){var e=this.scene;if(this._headphone=!1,e.mainSoundTrack.switchPanningModelToEqualPower(),e.soundTracks)for(var t=0;t<e.soundTracks.length;t++)e.soundTracks[t].switchPanningModelToEqualPower()},e.prototype._afterRender=function(){var e=this.scene;if(this._audioEnabled&&e._mainSoundTrack&&e.soundTracks&&(0!==e._mainSoundTrack.soundCollection.length||1!==e.soundTracks.length)){var t,i=c.Engine.audioEngine;if((t=0<e.activeCameras.length?e.activeCameras[0]:e.activeCamera)&&i.audioContext){i.audioContext.listener.setPosition(t.position.x,t.position.y,t.position.z),t.rigCameras&&0<t.rigCameras.length&&(t=t.rigCameras[0]);var r,n=c.Matrix.Invert(t.getViewMatrix()),o=c.Vector3.TransformNormal(new c.Vector3(0,0,-1),n);for(o.normalize(),isNaN(o.x)||isNaN(o.y)||isNaN(o.z)||i.audioContext.listener.setOrientation(o.x,o.y,o.z,0,1,0),r=0;r<e.mainSoundTrack.soundCollection.length;r++){var s=e.mainSoundTrack.soundCollection[r];s.useCustomAttenuation&&s.updateDistanceFromListener()}if(e.soundTracks)for(r=0;r<e.soundTracks.length;r++)for(var a=0;a<e.soundTracks[r].soundCollection.length;a++)(s=e.soundTracks[r].soundCollection[a]).useCustomAttenuation&&s.updateDistanceFromListener()}}},e})();c.AudioSceneComponent=i})($a||($a={})),(function(e){var t=(function(n){function e(e,t,i){var r=n.call(this,e,i)||this;return r._sound=t,r}return T(e,n),e.prototype._prepare=function(){},e.prototype.execute=function(){void 0!==this._sound&&this._sound.play()},e.prototype.serialize=function(e){return n.prototype._serialize.call(this,{name:\"PlaySoundAction\",properties:[{name:\"sound\",value:this._sound.name}]},e)},e})(e.Action);e.PlaySoundAction=t;var i=(function(n){function e(e,t,i){var r=n.call(this,e,i)||this;return r._sound=t,r}return T(e,n),e.prototype._prepare=function(){},e.prototype.execute=function(){void 0!==this._sound&&this._sound.stop()},e.prototype.serialize=function(e){return n.prototype._serialize.call(this,{name:\"StopSoundAction\",properties:[{name:\"sound\",value:this._sound.name}]},e)},e})(e.Action);e.StopSoundAction=i})($a||($a={})),Mi=$a||($a={}),Ri=(function(y){function s(e,t,i,r,n,o,s,a,l,c,h,u,d){void 0===i&&(i=null),void 0===r&&(r=!1),void 0===n&&(n=null),void 0===o&&(o=null),void 0===s&&(s=null),void 0===a&&(a=Mi.Engine.TEXTUREFORMAT_RGBA),void 0===l&&(l=!1),void 0===c&&(c=null),void 0===h&&(h=!1),void 0===u&&(u=.8),void 0===d&&(d=0);var f=y.call(this,t)||this;if(f.boundingBoxPosition=Mi.Vector3.Zero(),f._rotationY=0,f._prefiltered=!1,f.name=e,f.url=e,f._noMipmap=r,f.hasAlpha=!1,f._format=a,f.isCube=!0,f._textureMatrix=Mi.Matrix.Identity(),f._createPolynomials=h,f.coordinatesMode=Mi.Texture.CUBIC_MODE,!e&&!n)return f;var p=e.lastIndexOf(\".\"),_=c||(-1<p?e.substring(p).toLowerCase():\"\"),m=\".dds\"===_,g=\".env\"===_;if(g?(f.gammaSpace=!1,f._prefiltered=!1):(f._prefiltered=l)&&(f.gammaSpace=!1),f._texture=f._getFromCache(e,r),!n&&(g||m||i||(i=[\"_px.jpg\",\"_py.jpg\",\"_pz.jpg\",\"_nx.jpg\",\"_ny.jpg\",\"_nz.jpg\"]),n=[],i))for(var v=0;v<i.length;v++)n.push(e+i[v]);return f._files=n,f._texture?o&&(f._texture.isReady?Mi.Tools.SetImmediate((function(){return o()})):f._texture.onLoadedObservable.add(o)):t.useDelayedTextureLoading?f.delayLoadState=Mi.Engine.DELAYLOADSTATE_NOTLOADED:f._texture=l?t.getEngine().createPrefilteredCubeTexture(e,t,u,d,o,s,a,c,f._createPolynomials):t.getEngine().createCubeTexture(e,t,n,r,o,s,f._format,c,!1,u,d),f}return T(s,y),Object.defineProperty(s.prototype,\"boundingBoxSize\",{get:function(){return this._boundingBoxSize},set:function(e){if(!this._boundingBoxSize||!this._boundingBoxSize.equals(e)){this._boundingBoxSize=e;var t=this.getScene();t&&t.markAllMaterialsAsDirty(Mi.Material.TextureDirtyFlag)}},enumerable:!0,configurable:!0}),Object.defineProperty(s.prototype,\"rotationY\",{get:function(){return this._rotationY},set:function(e){this._rotationY=e,this.setReflectionTextureMatrix(Mi.Matrix.RotationY(this._rotationY))},enumerable:!0,configurable:!0}),s.CreateFromImages=function(e,t,i){var r=\"\";return e.forEach((function(e){return r+=e})),new s(r,t,null,i,e)},s.CreateFromPrefilteredData=function(e,t,i,r){return void 0===i&&(i=null),void 0===r&&(r=!0),new s(e,t,null,!1,null,null,null,void 0,!0,i,r)},s.prototype.delayLoad=function(){if(this.delayLoadState===Mi.Engine.DELAYLOADSTATE_NOTLOADED){var e=this.getScene();e&&(this.delayLoadState=Mi.Engine.DELAYLOADSTATE_LOADED,this._texture=this._getFromCache(this.url,this._noMipmap),this._texture||(this._prefiltered?this._texture=e.getEngine().createPrefilteredCubeTexture(this.url,e,this.lodGenerationScale,this.lodGenerationOffset,void 0,void 0,this._format,void 0,this._createPolynomials):this._texture=e.getEngine().createCubeTexture(this.url,e,this._files,this._noMipmap,void 0,void 0,this._format)))}},s.prototype.getReflectionTextureMatrix=function(){return this._textureMatrix},s.prototype.setReflectionTextureMatrix=function(e){this._textureMatrix=e},s.Parse=function(t,i,r){var e=Mi.SerializationHelper.Parse((function(){var e=!1;return t.prefiltered&&(e=t.prefiltered),new s(r+t.name,i,t.extensions,!1,null,null,null,void 0,e)}),t,i);if(t.boundingBoxPosition&&(e.boundingBoxPosition=Mi.Vector3.FromArray(t.boundingBoxPosition)),t.boundingBoxSize&&(e.boundingBoxSize=Mi.Vector3.FromArray(t.boundingBoxSize)),t.animations)for(var n=0;n<t.animations.length;n++){var o=t.animations[n];e.animations.push(Mi.Animation.Parse(o))}return e},s.prototype.clone=function(){var t=this;return Mi.SerializationHelper.Clone((function(){var e=t.getScene();return e?new s(t.url,e,t._extensions,t._noMipmap,t._files):t}),this)},b([Mi.serialize(\"rotationY\")],s.prototype,\"rotationY\",null),s})(Mi.BaseTexture),Mi.CubeTexture=Ri,Ci=$a||($a={}),Oi=(function(h){function n(e,t,i,r,n,o,s,a,l){void 0===r&&(r=Ci.Engine.TEXTUREFORMAT_RGBA),void 0===n&&(n=Ci.Engine.TEXTURETYPE_UNSIGNED_INT),void 0===o&&(o=!1),void 0===s&&(s=!1),void 0===a&&(a=Ci.Texture.TRILINEAR_SAMPLINGMODE),void 0===l&&(l=null);var c=h.call(this,\"\",e)||this;return c._texture=e.getEngine().createRawCubeTexture(t,i,r,n,o,s,a,l),c}return T(n,h),n.prototype.update=function(e,t,i,r,n,o){void 0===n&&(n=null),void 0===o&&(o=0),this._texture.getEngine().updateRawCubeTexture(this._texture,e,t,i,r,n)},n.prototype.updateRGBDAsync=function(e,t,i,r){return void 0===t&&(t=null),void 0===i&&(i=.8),void 0===r&&(r=0),n._UpdateRGBDAsync(this._texture,e,t,i,r)},n.prototype.clone=function(){var r=this;return Ci.SerializationHelper.Clone((function(){var e=r.getScene(),t=r._texture,i=new n(e,t._bufferViewArray,t.width,t.format,t.type,t.generateMipMaps,t.invertY,t.samplingMode,t._compression);return t.dataSource===Ci.InternalTexture.DATASOURCE_CUBERAW_RGBD&&i.updateRGBDAsync(t._bufferViewArrayArray,t._sphericalPolynomial,t._lodGenerationScale,t._lodGenerationOffset),i}),this)},n._UpdateRGBDAsync=function(e,t,i,r,n){return e._dataSource=Ci.InternalTexture.DATASOURCE_CUBERAW_RGBD,e._bufferViewArrayArray=t,e._lodGenerationScale=r,e._lodGenerationOffset=n,e._sphericalPolynomial=i,Ci.EnvironmentTextureTools.UploadLevelsAsync(e,t).then((function(){e.isReady=!0}))},n})(Ci.CubeTexture),Ci.RawCubeTexture=Oi,Di=$a||($a={}),Ii=(function(f){function i(e,t,i,r,n,o,s,a,l,c,h,u){void 0===n&&(n=!0),void 0===o&&(o=Di.Engine.TEXTURETYPE_UNSIGNED_INT),void 0===s&&(s=!1),void 0===a&&(a=Di.Texture.TRILINEAR_SAMPLINGMODE),void 0===l&&(l=!0),void 0===c&&(c=!1),void 0===h&&(h=!1),void 0===u&&(u=Di.Engine.TEXTUREFORMAT_RGBA);var d=f.call(this,null,i,!r)||this;return d.isCube=s,d.renderParticles=!0,d.renderSprites=!1,d.coordinatesMode=Di.Texture.PROJECTION_MODE,d.ignoreCameraViewport=!1,d.onBeforeBindObservable=new Di.Observable,d.onAfterUnbindObservable=new Di.Observable,d.onBeforeRenderObservable=new Di.Observable,d.onAfterRenderObservable=new Di.Observable,d.onClearObservable=new Di.Observable,d._currentRefreshId=-1,d._refreshRate=1,d._samples=1,d.boundingBoxPosition=Di.Vector3.Zero(),(i=d.getScene())?(d.renderList=new Array,d._engine=i.getEngine(),d.name=e,d.isRenderTarget=!0,d._initialSizeParameter=t,d._processSizeParameter(t),d._resizeObserver=d.getScene().getEngine().onResizeObservable.add((function(){})),d._generateMipMaps=!!r,d._doNotChangeAspectRatio=n,d._renderingManager=new Di.RenderingManager(i),d._renderingManager._useSceneAutoClearSetup=!0,h||(d._renderTargetOptions={generateMipMaps:r,type:o,format:u,samplingMode:a,generateDepthBuffer:l,generateStencilBuffer:c},a===Di.Texture.NEAREST_SAMPLINGMODE&&(d.wrapU=Di.Texture.CLAMP_ADDRESSMODE,d.wrapV=Di.Texture.CLAMP_ADDRESSMODE),s?(d._texture=i.getEngine().createRenderTargetCubeTexture(d.getRenderSize(),d._renderTargetOptions),d.coordinatesMode=Di.Texture.INVCUBIC_MODE,d._textureMatrix=Di.Matrix.Identity()):d._texture=i.getEngine().createRenderTargetTexture(d._size,d._renderTargetOptions)),d):d}return T(i,f),Object.defineProperty(i.prototype,\"renderList\",{get:function(){return this._renderList},set:function(e){this._renderList=e,this._renderList&&this._hookArray(this._renderList)},enumerable:!0,configurable:!0}),i.prototype._hookArray=function(n){var o=this,s=n.push;n.push=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var i=0===n.length,r=s.apply(n,e);return i&&o.getScene().meshes.forEach((function(e){e._markSubMeshesAsLightDirty()})),r};var r=n.splice;n.splice=function(e,t){var i=r.apply(n,[e,t]);return 0===n.length&&o.getScene().meshes.forEach((function(e){e._markSubMeshesAsLightDirty()})),i}},Object.defineProperty(i.prototype,\"onAfterUnbind\",{set:function(e){this._onAfterUnbindObserver&&this.onAfterUnbindObservable.remove(this._onAfterUnbindObserver),this._onAfterUnbindObserver=this.onAfterUnbindObservable.add(e)},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,\"onBeforeRender\",{set:function(e){this._onBeforeRenderObserver&&this.onBeforeRenderObservable.remove(this._onBeforeRenderObserver),this._onBeforeRenderObserver=this.onBeforeRenderObservable.add(e)},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,\"onAfterRender\",{set:function(e){this._onAfterRenderObserver&&this.onAfterRenderObservable.remove(this._onAfterRenderObserver),this._onAfterRenderObserver=this.onAfterRenderObservable.add(e)},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,\"onClear\",{set:function(e){this._onClearObserver&&this.onClearObservable.remove(this._onClearObserver),this._onClearObserver=this.onClearObservable.add(e)},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,\"renderTargetOptions\",{get:function(){return this._renderTargetOptions},enumerable:!0,configurable:!0}),i.prototype._onRatioRescale=function(){this._sizeRatio&&this.resize(this._initialSizeParameter)},Object.defineProperty(i.prototype,\"boundingBoxSize\",{get:function(){return this._boundingBoxSize},set:function(e){if(!this._boundingBoxSize||!this._boundingBoxSize.equals(e)){this._boundingBoxSize=e;var t=this.getScene();t&&t.markAllMaterialsAsDirty(Di.Material.TextureDirtyFlag)}},enumerable:!0,configurable:!0}),i.prototype.createDepthStencilTexture=function(e,t,i){if(void 0===e&&(e=0),void 0===t&&(t=!0),void 0===i&&(i=!1),this.getScene()){var r=this.getScene().getEngine();this.depthStencilTexture=r.createDepthStencilTexture(this._size,{bilinearFiltering:t,comparisonFunction:e,generateStencil:i,isCube:this.isCube}),r.setFrameBufferDepthStencilTexture(this)}},i.prototype._processSizeParameter=function(e){e.ratio?(this._sizeRatio=e.ratio,this._size={width:this._bestReflectionRenderTargetDimension(this._engine.getRenderWidth(),this._sizeRatio),height:this._bestReflectionRenderTargetDimension(this._engine.getRenderHeight(),this._sizeRatio)}):this._size=e},Object.defineProperty(i.prototype,\"samples\",{get:function(){return this._samples},set:function(e){if(this._samples!==e){var t=this.getScene();t&&(this._samples=t.getEngine().updateRenderTargetTextureSampleCount(this._texture,e))}},enumerable:!0,configurable:!0}),i.prototype.resetRefreshCounter=function(){this._currentRefreshId=-1},Object.defineProperty(i.prototype,\"refreshRate\",{get:function(){return this._refreshRate},set:function(e){this._refreshRate=e,this.resetRefreshCounter()},enumerable:!0,configurable:!0}),i.prototype.addPostProcess=function(e){if(!this._postProcessManager){var t=this.getScene();if(!t)return;this._postProcessManager=new Di.PostProcessManager(t),this._postProcesses=new Array}this._postProcesses.push(e),this._postProcesses[0].autoClear=!1},i.prototype.clearPostProcesses=function(e){if(void 0===e&&(e=!1),this._postProcesses){if(e)for(var t=0,i=this._postProcesses;t<i.length;t++){i[t].dispose()}this._postProcesses=[]}},i.prototype.removePostProcess=function(e){if(this._postProcesses){var t=this._postProcesses.indexOf(e);-1!==t&&(this._postProcesses.splice(t,1),0<this._postProcesses.length&&(this._postProcesses[0].autoClear=!1))}},i.prototype._shouldRender=function(){return-1===this._currentRefreshId?(this._currentRefreshId=1,!0):this.refreshRate===this._currentRefreshId?(this._currentRefreshId=1,!0):(this._currentRefreshId++,!1)},i.prototype.getRenderSize=function(){return this.getRenderWidth()},i.prototype.getRenderWidth=function(){return this._size.width?this._size.width:this._size},i.prototype.getRenderHeight=function(){return this._size.width?this._size.height:this._size},Object.defineProperty(i.prototype,\"canRescale\",{get:function(){return!0},enumerable:!0,configurable:!0}),i.prototype.scale=function(e){var t=this.getRenderSize()*e;this.resize(t)},i.prototype.getReflectionTextureMatrix=function(){return this.isCube?this._textureMatrix:f.prototype.getReflectionTextureMatrix.call(this)},i.prototype.resize=function(e){this.releaseInternalTexture();var t=this.getScene();t&&(this._processSizeParameter(e),this.isCube?this._texture=t.getEngine().createRenderTargetCubeTexture(this.getRenderSize(),this._renderTargetOptions):this._texture=t.getEngine().createRenderTargetTexture(this._size,this._renderTargetOptions))},i.prototype.render=function(e,t){if(void 0===e&&(e=!1),void 0===t&&(t=!1),a=this.getScene()){var i,r=a.getEngine();if(void 0!==this.useCameraPostProcesses&&(e=this.useCameraPostProcesses),this._waitingRenderList){this.renderList=[];for(var n=0;n<this._waitingRenderList.length;n++){var o=this._waitingRenderList[n],s=a.getMeshByID(o);s&&this.renderList.push(s)}delete this._waitingRenderList}if(this.renderListPredicate){var a;if(this.renderList?this.renderList.splice(0):this.renderList=[],!(a=this.getScene()))return;var l=a.meshes;for(n=0;n<l.length;n++){var c=l[n];this.renderListPredicate(c)&&this.renderList.push(c)}}this.onBeforeBindObservable.notifyObservers(this),this.activeCamera?(i=this.activeCamera,r.setViewport(this.activeCamera.viewport,this.getRenderWidth(),this.getRenderHeight()),this.activeCamera!==a.activeCamera&&a.setTransformMatrix(this.activeCamera.getViewMatrix(),this.activeCamera.getProjectionMatrix(!0))):(i=a.activeCamera)&&r.setViewport(i.viewport,this.getRenderWidth(),this.getRenderHeight()),this._renderingManager.reset();for(var h=this.renderList?this.renderList:a.getActiveMeshes().data,u=this.renderList?this.renderList.length:a.getActiveMeshes().length,d=a.getRenderId(),f=0;f<u;f++){if(c=h[f]){if(!c.isReady(0===this.refreshRate)){this.resetRefreshCounter();continue}c._preActivateForIntermediateRendering(d);var p=void 0;if(p=!(this.renderList||!i)&&0==(c.layerMask&i.layerMask),c.isEnabled()&&c.isVisible&&c.subMeshes&&!p){c._activate(d);for(var _=0;_<c.subMeshes.length;_++){var m=c.subMeshes[_];a._activeIndices.addCount(m.indexCount,!1),this._renderingManager.dispatch(m,c)}}}}for(var g=0;g<a.particleSystems.length;g++){var v=a.particleSystems[g],y=v.emitter;v.isStarted()&&y&&y.position&&y.isEnabled()&&(0<=h.indexOf(y)&&this._renderingManager.dispatchParticles(v))}if(this.isCube)for(var b=0;b<6;b++)this.renderToTarget(b,h,u,e,t),a.incrementRenderId(),a.resetCachedMaterial();else this.renderToTarget(0,h,u,e,t);this.onAfterUnbindObservable.notifyObservers(this),a.activeCamera&&(this.activeCamera&&this.activeCamera!==a.activeCamera&&a.setTransformMatrix(a.activeCamera.getViewMatrix(),a.activeCamera.getProjectionMatrix(!0)),r.setViewport(a.activeCamera.viewport)),a.resetCachedMaterial()}},i.prototype._bestReflectionRenderTargetDimension=function(e,t){var i=e*t,r=Di.Tools.NearestPOT(i+16384/(128+i));return Math.min(Di.Tools.FloorPOT(e),r)},i.prototype.unbindFrameBuffer=function(e,t){var i=this;this._texture&&e.unBindFramebuffer(this._texture,this.isCube,(function(){i.onAfterRenderObservable.notifyObservers(t)}))},i.prototype.renderToTarget=function(e,t,i,r,n){var o=this.getScene();if(o){var s=o.getEngine();this._texture&&(this._postProcessManager?this._postProcessManager._prepareFrame(this._texture,this._postProcesses):r&&o.postProcessManager._prepareFrame(this._texture)||this._texture&&s.bindFramebuffer(this._texture,this.isCube?e:void 0,void 0,void 0,this.ignoreCameraViewport,this.depthStencilTexture?this.depthStencilTexture:void 0),this.onBeforeRenderObservable.notifyObservers(e),this.onClearObservable.hasObservers()?this.onClearObservable.notifyObservers(s):s.clear(this.clearColor||o.clearColor,!0,!0,!0),this._doNotChangeAspectRatio||o.updateTransformMatrix(!0),this._renderingManager.render(this.customRenderFunction,t,this.renderParticles,this.renderSprites),this._postProcessManager?this._postProcessManager._finalizeFrame(!1,this._texture,e,this._postProcesses,this.ignoreCameraViewport):r&&o.postProcessManager._finalizeFrame(!1,this._texture,e),this._doNotChangeAspectRatio||o.updateTransformMatrix(!0),n&&Di.Tools.DumpFramebuffer(this.getRenderWidth(),this.getRenderHeight(),s),this.isCube&&5!==e?this.onAfterRenderObservable.notifyObservers(e):(this.isCube&&5===e&&s.generateMipMapsForCubemap(this._texture),this.unbindFrameBuffer(s,e)))}},i.prototype.setRenderingOrder=function(e,t,i,r){void 0===t&&(t=null),void 0===i&&(i=null),void 0===r&&(r=null),this._renderingManager.setRenderingOrder(e,t,i,r)},i.prototype.setRenderingAutoClearDepthStencil=function(e,t){this._renderingManager.setRenderingAutoClearDepthStencil(e,t),this._renderingManager._useSceneAutoClearSetup=!1},i.prototype.clone=function(){var e=this.getSize(),t=new i(this.name,e,this.getScene(),this._renderTargetOptions.generateMipMaps,this._doNotChangeAspectRatio,this._renderTargetOptions.type,this.isCube,this._renderTargetOptions.samplingMode,this._renderTargetOptions.generateDepthBuffer,this._renderTargetOptions.generateStencilBuffer);return t.hasAlpha=this.hasAlpha,t.level=this.level,t.coordinatesMode=this.coordinatesMode,this.renderList&&(t.renderList=this.renderList.slice(0)),t},i.prototype.serialize=function(){if(!this.name)return null;var e=f.prototype.serialize.call(this);if(e.renderTargetSize=this.getRenderSize(),e.renderList=[],this.renderList)for(var t=0;t<this.renderList.length;t++)e.renderList.push(this.renderList[t].id);return e},i.prototype.disposeFramebufferObjects=function(){var e=this.getInternalTexture(),t=this.getScene();e&&t&&t.getEngine()._releaseFramebufferObjects(e)},i.prototype.dispose=function(){this._postProcessManager&&(this._postProcessManager.dispose(),this._postProcessManager=null),this.clearPostProcesses(!0),this._resizeObserver&&(this.getScene().getEngine().onResizeObservable.remove(this._resizeObserver),this._resizeObserver=null),this.renderList=null;var e=this.getScene();if(e){var t=e.customRenderTargets.indexOf(this);0<=t&&e.customRenderTargets.splice(t,1);for(var i=0,r=e.cameras;i<r.length;i++){var n=r[i];0<=(t=n.customRenderTargets.indexOf(this))&&n.customRenderTargets.splice(t,1)}f.prototype.dispose.call(this)}},i.prototype._rebuild=function(){this.refreshRate===i.REFRESHRATE_RENDER_ONCE&&(this.refreshRate=i.REFRESHRATE_RENDER_ONCE),this._postProcessManager&&this._postProcessManager._rebuild()},i.prototype.freeRenderingGroups=function(){this._renderingManager&&this._renderingManager.freeRenderingGroups()},i.REFRESHRATE_RENDER_ONCE=0,i.REFRESHRATE_RENDER_ONEVERYFRAME=1,i.REFRESHRATE_RENDER_ONEVERYTWOFRAMES=2,i})(Di.Texture),Di.RenderTargetTexture=Ii,wi=$a||($a={}),Li=(function(p){function e(e,t,i,r,n){var o=this,s=!(!n||!n.generateMipMaps)&&n.generateMipMaps,a=!(!n||!n.generateDepthTexture)&&n.generateDepthTexture,l=!n||void 0===n.doNotChangeAspectRatio||n.doNotChangeAspectRatio;if((o=p.call(this,e,t,r,s,l)||this)._engine=r.getEngine(),o.isSupported){for(var c=[],h=[],u=0;u<i;u++)n&&n.types&&void 0!==n.types[u]?c.push(n.types[u]):c.push(n&&n.defaultType?n.defaultType:wi.Engine.TEXTURETYPE_UNSIGNED_INT),n&&n.samplingModes&&void 0!==n.samplingModes[u]?h.push(n.samplingModes[u]):h.push(wi.Texture.BILINEAR_SAMPLINGMODE);var d=!n||void 0===n.generateDepthBuffer||n.generateDepthBuffer,f=!(!n||void 0===n.generateStencilBuffer)&&n.generateStencilBuffer;return o._size=t,o._multiRenderTargetOptions={samplingModes:h,generateMipMaps:s,generateDepthBuffer:d,generateStencilBuffer:f,generateDepthTexture:a,types:c,textureCount:i},o._createInternalTextures(),o._createTextures(),o}o.dispose()}return T(e,p),Object.defineProperty(e.prototype,\"isSupported\",{get:function(){return 1<this._engine.webGLVersion||this._engine.getCaps().drawBuffersExtension},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,\"textures\",{get:function(){return this._textures},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,\"depthTexture\",{get:function(){return this._textures[this._textures.length-1]},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,\"wrapU\",{set:function(e){if(this._textures)for(var t=0;t<this._textures.length;t++)this._textures[t].wrapU=e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,\"wrapV\",{set:function(e){if(this._textures)for(var t=0;t<this._textures.length;t++)this._textures[t].wrapV=e},enumerable:!0,configurable:!0}),e.prototype._rebuild=function(){this.releaseInternalTextures(),this._createInternalTextures();for(var e=0;e<this._internalTextures.length;e++){this._textures[e]._texture=this._internalTextures[e]}this._texture=this._internalTextures[0]},e.prototype._createInternalTextures=function(){this._internalTextures=this._engine.createMultipleRenderTarget(this._size,this._multiRenderTargetOptions)},e.prototype._createTextures=function(){this._textures=[];for(var e=0;e<this._internalTextures.length;e++){var t=new wi.Texture(null,this.getScene());t._texture=this._internalTextures[e],this._textures.push(t)}this._texture=this._internalTextures[0]},Object.defineProperty(e.prototype,\"samples\",{get:function(){return this._samples},set:function(e){this._samples!==e&&(this._samples=this._engine.updateMultipleRenderTargetTextureSampleCount(this._internalTextures,e))},enumerable:!0,configurable:!0}),e.prototype.resize=function(e){this.releaseInternalTextures(),this._internalTextures=this._engine.createMultipleRenderTarget(e,this._multiRenderTargetOptions),this._createInternalTextures()},e.prototype.unbindFrameBuffer=function(e,t){var i=this;e.unBindMultiColorAttachmentFramebuffer(this._internalTextures,this.isCube,(function(){i.onAfterRenderObservable.notifyObservers(t)}))},e.prototype.dispose=function(){this.releaseInternalTextures(),p.prototype.dispose.call(this)},e.prototype.releaseInternalTextures=function(){if(this._internalTextures)for(var e=this._internalTextures.length-1;0<=e;e--)void 0!==this._internalTextures[e]&&(this._internalTextures[e].dispose(),this._internalTextures.splice(e,1))},e})(wi.RenderTargetTexture),wi.MultiRenderTarget=Li,Fi=$a||($a={}),Bi=(function(l){function r(e,t,i,r,n,o,s){void 0===n&&(n=Fi.Engine.TEXTURETYPE_UNSIGNED_INT),void 0===o&&(o=Fi.Texture.BILINEAR_SAMPLINGMODE),void 0===s&&(s=!0);var a=l.call(this,e,t,i,r,!0,n,!1,o,s)||this;return a.scene=i,a.mirrorPlane=new Fi.Plane(0,1,0,1),a._transformMatrix=Fi.Matrix.Zero(),a._mirrorMatrix=Fi.Matrix.Zero(),a._adaptiveBlurKernel=0,a._blurKernelX=0,a._blurKernelY=0,a._blurRatio=1,a.ignoreCameraViewport=!0,a._updateGammaSpace(),a._imageProcessingConfigChangeObserver=i.imageProcessingConfiguration.onUpdateParameters.add((function(){a._updateGammaSpace})),a.onBeforeRenderObservable.add((function(){Fi.Matrix.ReflectionToRef(a.mirrorPlane,a._mirrorMatrix),a._savedViewMatrix=i.getViewMatrix(),a._mirrorMatrix.multiplyToRef(a._savedViewMatrix,a._transformMatrix),i.setTransformMatrix(a._transformMatrix,i.getProjectionMatrix()),i.clipPlane=a.mirrorPlane,i.getEngine().cullBackFaces=!1,i._mirroredCameraPosition=Fi.Vector3.TransformCoordinates(i.activeCamera.globalPosition,a._mirrorMatrix)})),a.onAfterRenderObservable.add((function(){i.setTransformMatrix(a._savedViewMatrix,i.getProjectionMatrix()),i.getEngine().cullBackFaces=!0,i._mirroredCameraPosition=null,delete i.clipPlane})),a}return T(r,l),Object.defineProperty(r.prototype,\"blurRatio\",{get:function(){return this._blurRatio},set:function(e){this._blurRatio!==e&&(this._blurRatio=e,this._preparePostProcesses())},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,\"adaptiveBlurKernel\",{set:function(e){this._adaptiveBlurKernel=e,this._autoComputeBlurKernel()},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,\"blurKernel\",{set:function(e){this.blurKernelX=e,this.blurKernelY=e},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,\"blurKernelX\",{get:function(){return this._blurKernelX},set:function(e){this._blurKernelX!==e&&(this._blurKernelX=e,this._preparePostProcesses())},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,\"blurKernelY\",{get:function(){return this._blurKernelY},set:function(e){this._blurKernelY!==e&&(this._blurKernelY=e,this._preparePostProcesses())},enumerable:!0,configurable:!0}),r.prototype._autoComputeBlurKernel=function(){var e=this.getScene().getEngine(),t=this.getRenderWidth()/e.getRenderWidth(),i=this.getRenderHeight()/e.getRenderHeight();this.blurKernelX=this._adaptiveBlurKernel*t,this.blurKernelY=this._adaptiveBlurKernel*i},r.prototype._onRatioRescale=function(){this._sizeRatio&&(this.resize(this._initialSizeParameter),this._adaptiveBlurKernel||this._preparePostProcesses()),this._adaptiveBlurKernel&&this._autoComputeBlurKernel()},r.prototype._updateGammaSpace=function(){this.gammaSpace=!this.scene.imageProcessingConfiguration.isEnabled||!this.scene.imageProcessingConfiguration.applyByPostProcess},r.prototype._preparePostProcesses=function(){if(this.clearPostProcesses(!0),this._blurKernelX&&this._blurKernelY){var e=this.getScene().getEngine(),t=e.getCaps().textureFloatRender?Fi.Engine.TEXTURETYPE_FLOAT:Fi.Engine.TEXTURETYPE_HALF_FLOAT;this._blurX=new Fi.BlurPostProcess(\"horizontal blur\",new Fi.Vector2(1,0),this._blurKernelX,this._blurRatio,null,Fi.Texture.BILINEAR_SAMPLINGMODE,e,!1,t),this._blurX.autoClear=!1,1===this._blurRatio&&this.samples<2&&this._texture?this._blurX.inputTexture=this._texture:this._blurX.alwaysForcePOT=!0,this._blurY=new Fi.BlurPostProcess(\"vertical blur\",new Fi.Vector2(0,1),this._blurKernelY,this._blurRatio,null,Fi.Texture.BILINEAR_SAMPLINGMODE,e,!1,t),this._blurY.autoClear=!1,this._blurY.alwaysForcePOT=1!==this._blurRatio,this.addPostProcess(this._blurX),this.addPostProcess(this._blurY)}else this._blurY&&(this.removePostProcess(this._blurY),this._blurY.dispose(),this._blurY=null),this._blurX&&(this.removePostProcess(this._blurX),this._blurX.dispose(),this._blurX=null)},r.prototype.clone=function(){var e=this.getScene();if(!e)return this;var t=this.getSize(),i=new r(this.name,t.width,e,this._renderTargetOptions.generateMipMaps,this._renderTargetOptions.type,this._renderTargetOptions.samplingMode,this._renderTargetOptions.generateDepthBuffer);return i.hasAlpha=this.hasAlpha,i.level=this.level,i.mirrorPlane=this.mirrorPlane.clone(),this.renderList&&(i.renderList=this.renderList.slice(0)),i},r.prototype.serialize=function(){if(!this.name)return null;var e=l.prototype.serialize.call(this);return e.mirrorPlane=this.mirrorPlane.asArray(),e},r.prototype.dispose=function(){l.prototype.dispose.call(this),this.scene.imageProcessingConfiguration.onUpdateParameters.remove(this._imageProcessingConfigChangeObserver)},r})(Fi.RenderTargetTexture),Fi.MirrorTexture=Bi,Ni=$a||($a={}),Vi=(function(o){function r(e,t,i,r){var n=o.call(this,e,t,i,r,!0)||this;return n.refractionPlane=new Ni.Plane(0,1,0,1),n.depth=2,n.onBeforeRenderObservable.add((function(){i.clipPlane=n.refractionPlane})),n.onAfterRenderObservable.add((function(){delete i.clipPlane})),n}return T(r,o),r.prototype.clone=function(){var e=this.getScene();if(!e)return this;var t=this.getSize(),i=new r(this.name,t.width,e,this._generateMipMaps);return i.hasAlpha=this.hasAlpha,i.level=this.level,i.refractionPlane=this.refractionPlane.clone(),this.renderList&&(i.renderList=this.renderList.slice(0)),i.depth=this.depth,i},r.prototype.serialize=function(){if(!this.name)return null;var e=o.prototype.serialize.call(this);return e.mirrorPlane=this.refractionPlane.asArray(),e.depth=this.depth,e},r})(Ni.RenderTargetTexture),Ni.RefractionTexture=Vi,Ui=$a||($a={}),zi=(function(l){function r(e,t,i,r,n,o){void 0===i&&(i=null),void 0===n&&(n=Ui.Texture.TRILINEAR_SAMPLINGMODE),void 0===o&&(o=Ui.Engine.TEXTUREFORMAT_RGBA);var s=l.call(this,null,i,!r,void 0,n,void 0,void 0,void 0,void 0,o)||this;s.name=e,s._engine=s.getScene().getEngine(),s.wrapU=Ui.Texture.CLAMP_ADDRESSMODE,s.wrapV=Ui.Texture.CLAMP_ADDRESSMODE,s._generateMipMaps=r,t.getContext?(s._canvas=t,s._texture=s._engine.createDynamicTexture(t.width,t.height,r,n)):(s._canvas=document.createElement(\"canvas\"),t.width||0===t.width?s._texture=s._engine.createDynamicTexture(t.width,t.height,r,n):s._texture=s._engine.createDynamicTexture(t,t,r,n));var a=s.getSize();return s._canvas.width=a.width,s._canvas.height=a.height,s._context=s._canvas.getContext(\"2d\"),s}return T(r,l),Object.defineProperty(r.prototype,\"canRescale\",{get:function(){return!0},enumerable:!0,configurable:!0}),r.prototype._recreate=function(e){this._canvas.width=e.width,this._canvas.height=e.height,this.releaseInternalTexture(),this._texture=this._engine.createDynamicTexture(e.width,e.height,this._generateMipMaps,this._samplingMode)},r.prototype.scale=function(e){var t=this.getSize();t.width*=e,t.height*=e,this._recreate(t)},r.prototype.scaleTo=function(e,t){var i=this.getSize();i.width=e,i.height=t,this._recreate(i)},r.prototype.getContext=function(){return this._context},r.prototype.clear=function(){var e=this.getSize();this._context.fillRect(0,0,e.width,e.height)},r.prototype.update=function(e,t){void 0===t&&(t=!1),this._engine.updateDynamicTexture(this._texture,this._canvas,void 0===e||e,t,this._format||void 0)},r.prototype.drawText=function(e,t,i,r,n,o,s,a){void 0===a&&(a=!0);var l=this.getSize();if(o&&(this._context.fillStyle=o,this._context.fillRect(0,0,l.width,l.height)),this._context.font=r,null==t){var c=this._context.measureText(e);t=(l.width-c.width)/2}if(null==i){var h=parseInt(r.replace(/\\D/g,\"\"));i=l.height/2+h/3.65}this._context.fillStyle=n,this._context.fillText(e,t,i),a&&this.update(s)},r.prototype.clone=function(){var e=this.getScene();if(!e)return this;var t=this.getSize(),i=new r(this.name,t,e,this._generateMipMaps);return i.hasAlpha=this.hasAlpha,i.level=this.level,i.wrapU=this.wrapU,i.wrapV=this.wrapV,i},r.prototype.serialize=function(){var e=this.getScene();e&&!e.isReady()&&Ui.Tools.Warn(\"The scene must be ready before serializing the dynamic texture\");var t=l.prototype.serialize.call(this);return t.base64String=this._canvas.toDataURL(),t.invertY=this._invertY,t.samplingMode=this.samplingMode,t},r.prototype._rebuild=function(){this.update()},r})(Ui.Texture),Ui.DynamicTexture=zi,Gi=$a||($a={}),ki=(function(l){function o(e,t,i,r,n,o,s){void 0===r&&(r=!1),void 0===n&&(n=!1),void 0===o&&(o=Gi.Texture.TRILINEAR_SAMPLINGMODE),void 0===s&&(s={autoPlay:!0,loop:!0,autoUpdateTexture:!0});var a=l.call(this,null,i,!r,n)||this;return a._onUserActionRequestedObservable=null,a._stillImageCaptured=!1,a._poster=!1,a._createInternalTexture=function(){if(null!=a._texture){if(!a._poster)return;a._texture.dispose(),a._poster=!1}if(!a._engine.needPOTTextures||Gi.Tools.IsExponentOfTwo(a.video.videoWidth)&&Gi.Tools.IsExponentOfTwo(a.video.videoHeight)?(a.wrapU=Gi.Texture.WRAP_ADDRESSMODE,a.wrapV=Gi.Texture.WRAP_ADDRESSMODE):(a.wrapU=Gi.Texture.CLAMP_ADDRESSMODE,a.wrapV=Gi.Texture.CLAMP_ADDRESSMODE,a._generateMipMaps=!1),a._texture=a._engine.createDynamicTexture(a.video.videoWidth,a.video.videoHeight,a._generateMipMaps,a._samplingMode),a.video.autoplay)a._texture.isReady=!0,a._updateInternalTexture(),a.onLoadObservable.hasObservers()&&a.onLoadObservable.notifyObservers(a);else{var e=a.video.onplaying,t=!1;a.video.onplaying=function(){a.video.onplaying=e,a._texture.isReady=!0,a._updateInternalTexture(),t||a.video.pause(),a.onLoadObservable.hasObservers()&&a.onLoadObservable.notifyObservers(a)};var i=a.video.play();i?i.then((function(){})).catch((function(){t=!0,a._onUserActionRequestedObservable&&a._onUserActionRequestedObservable.hasObservers()&&a._onUserActionRequestedObservable.notifyObservers(a)})):(a.video.onplaying=e,a._texture.isReady=!0,a._updateInternalTexture(),a.onLoadObservable.hasObservers()&&a.onLoadObservable.notifyObservers(a))}},a.reset=function(){null!=a._texture&&(a._poster||(a._texture.dispose(),a._texture=null))},a._updateInternalTexture=function(e){null!=a._texture&&a._texture.isReady&&(a.video.readyState<a.video.HAVE_CURRENT_DATA||a._engine.updateVideoTexture(a._texture,a.video,a._invertY))},a._engine=a.getScene().getEngine(),a._generateMipMaps=r,a._samplingMode=o,a.autoUpdateTexture=s.autoUpdateTexture,a.name=e||a._getName(t),a.video=a._getVideo(t),s.poster&&(a.video.poster=s.poster),void 0!==s.autoPlay&&(a.video.autoplay=s.autoPlay),void 0!==s.loop&&(a.video.loop=s.loop),a.video.setAttribute(\"playsinline\",\"\"),a.video.addEventListener(\"canplay\",a._createInternalTexture),a.video.addEventListener(\"paused\",a._updateInternalTexture),a.video.addEventListener(\"seeked\",a._updateInternalTexture),a.video.addEventListener(\"emptied\",a.reset),a.video.readyState>=a.video.HAVE_CURRENT_DATA&&a._createInternalTexture(),s.poster&&(a._texture=a._engine.createTexture(s.poster,!1,!0,i),a._poster=!0),a}return T(o,l),Object.defineProperty(o.prototype,\"onUserActionRequestedObservable\",{get:function(){return this._onUserActionRequestedObservable||(this._onUserActionRequestedObservable=new Gi.Observable),this._onUserActionRequestedObservable},enumerable:!0,configurable:!0}),o.prototype._getName=function(e){return e instanceof HTMLVideoElement?e.currentSrc:\"object\"==typeof e?e.toString():e},o.prototype._getVideo=function(e){if(e instanceof HTMLVideoElement)return Gi.Tools.SetCorsBehavior(e.currentSrc,e),e;var i=document.createElement(\"video\");return\"string\"==typeof e?(Gi.Tools.SetCorsBehavior(e,i),i.src=e):(Gi.Tools.SetCorsBehavior(e[0],i),e.forEach((function(e){var t=document.createElement(\"source\");t.src=e,i.appendChild(t)}))),i},o.prototype._rebuild=function(){this.update()},o.prototype.update=function(){this.autoUpdateTexture&&this.updateTexture(!0)},o.prototype.updateTexture=function(e){e&&(this.video.paused&&this._stillImageCaptured||(this._stillImageCaptured=!0,this._updateInternalTexture()))},o.prototype.updateURL=function(e){this.video.src=e},o.prototype.dispose=function(){l.prototype.dispose.call(this),this._onUserActionRequestedObservable&&(this._onUserActionRequestedObservable.clear(),this._onUserActionRequestedObservable=null),this.video.removeEventListener(\"canplay\",this._createInternalTexture),this.video.removeEventListener(\"paused\",this._updateInternalTexture),this.video.removeEventListener(\"seeked\",this._updateInternalTexture),this.video.removeEventListener(\"emptied\",this.reset),this.video.pause()},o.CreateFromWebCam=function(i,r,e){var t,n=document.createElement(\"video\");n.setAttribute(\"autoplay\",\"\"),n.setAttribute(\"muted\",\"\"),n.setAttribute(\"playsinline\",\"\"),e&&e.deviceId&&(t={exact:e.deviceId}),window.URL=window.URL||window.webkitURL||window.mozURL||window.msURL,navigator.mediaDevices?navigator.mediaDevices.getUserMedia({video:e}).then((function(e){void 0!==n.mozSrcObject?n.mozSrcObject=e:n.srcObject=e;var t=function(){r&&r(new o(\"video\",n,i,!0,!0)),n.removeEventListener(\"playing\",t)};n.addEventListener(\"playing\",t),n.play()})).catch((function(e){Gi.Tools.Error(e.name)})):(navigator.getUserMedia=navigator.getUserMedia||navigator.webkitGetUserMedia||navigator.mozGetUserMedia||navigator.msGetUserMedia,navigator.getUserMedia&&navigator.getUserMedia({video:{deviceId:t,width:{min:e&&e.minWidth||256,max:e&&e.maxWidth||640},height:{min:e&&e.minHeight||256,max:e&&e.maxHeight||480}}},(function(e){void 0!==n.mozSrcObject?n.mozSrcObject=e:n.src=window.URL&&window.URL.createObjectURL(e)||e,n.play(),r&&r(new o(\"video\",n,i,!0,!0))}),(function(e){Gi.Tools.Error(e.name)})))},o})(Gi.Texture),Gi.VideoTexture=ki,Wi=$a||($a={}),Hi=(function(h){function l(e,t,i,r,n,o,s,a,l){void 0===o&&(o=!0),void 0===s&&(s=!1),void 0===a&&(a=Wi.Texture.TRILINEAR_SAMPLINGMODE),void 0===l&&(l=Wi.Engine.TEXTURETYPE_UNSIGNED_INT);var c=h.call(this,null,n,!o,s)||this;return c.format=r,c._engine=n.getEngine(),c._texture=n.getEngine().createRawTexture(e,t,i,r,o,s,a,null,l),c.wrapU=Wi.Texture.CLAMP_ADDRESSMODE,c.wrapV=Wi.Texture.CLAMP_ADDRESSMODE,c}return T(l,h),l.prototype.update=function(e){this._engine.updateRawTexture(this._texture,e,this._texture.format,this._texture.invertY,void 0,this._texture.type)},l.CreateLuminanceTexture=function(e,t,i,r,n,o,s){return void 0===n&&(n=!0),void 0===o&&(o=!1),void 0===s&&(s=Wi.Texture.TRILINEAR_SAMPLINGMODE),new l(e,t,i,Wi.Engine.TEXTUREFORMAT_LUMINANCE,r,n,o,s)},l.CreateLuminanceAlphaTexture=function(e,t,i,r,n,o,s){return void 0===n&&(n=!0),void 0===o&&(o=!1),void 0===s&&(s=Wi.Texture.TRILINEAR_SAMPLINGMODE),new l(e,t,i,Wi.Engine.TEXTUREFORMAT_LUMINANCE_ALPHA,r,n,o,s)},l.CreateAlphaTexture=function(e,t,i,r,n,o,s){return void 0===n&&(n=!0),void 0===o&&(o=!1),void 0===s&&(s=Wi.Texture.TRILINEAR_SAMPLINGMODE),new l(e,t,i,Wi.Engine.TEXTUREFORMAT_ALPHA,r,n,o,s)},l.CreateRGBTexture=function(e,t,i,r,n,o,s,a){return void 0===n&&(n=!0),void 0===o&&(o=!1),void 0===s&&(s=Wi.Texture.TRILINEAR_SAMPLINGMODE),void 0===a&&(a=Wi.Engine.TEXTURETYPE_UNSIGNED_INT),new l(e,t,i,Wi.Engine.TEXTUREFORMAT_RGB,r,n,o,s,a)},l.CreateRGBATexture=function(e,t,i,r,n,o,s,a){return void 0===n&&(n=!0),void 0===o&&(o=!1),void 0===s&&(s=Wi.Texture.TRILINEAR_SAMPLINGMODE),void 0===a&&(a=Wi.Engine.TEXTURETYPE_UNSIGNED_INT),new l(e,t,i,Wi.Engine.TEXTUREFORMAT_RGBA,r,n,o,s,a)},l.CreateRTexture=function(e,t,i,r,n,o,s,a){return void 0===n&&(n=!0),void 0===o&&(o=!1),void 0===s&&(s=Wi.Texture.TRILINEAR_SAMPLINGMODE),void 0===a&&(a=Wi.Engine.TEXTURETYPE_FLOAT),new l(e,t,i,Wi.Engine.TEXTUREFORMAT_R,r,n,o,s,a)},l})(Wi.Texture),Wi.RawTexture=Hi,Xi=$a||($a={}),ji=(function(u){function e(e,t,i,r,n,o,s,a,l,c){void 0===s&&(s=!0),void 0===a&&(a=!1),void 0===l&&(l=Xi.Texture.TRILINEAR_SAMPLINGMODE),void 0===c&&(c=Xi.Engine.TEXTURETYPE_UNSIGNED_INT);var h=u.call(this,null,o,!s,a)||this;return h.format=n,h._engine=o.getEngine(),h._texture=o.getEngine().createRawTexture3D(e,t,i,r,n,s,a,l,void 0,c),h.is3D=!0,h}return T(e,u),e.prototype.update=function(e){this._texture&&this._engine.updateRawTexture3D(this._texture,e,this._texture.format,this._texture.invertY,void 0,this._texture.type)},e})(Xi.Texture),Xi.RawTexture3D=ji,Yi=$a||($a={}),Ki=(function(){function e(e){this._vertexBuffers={},this._scene=e}return e.prototype._prepareBuffers=function(){if(!this._vertexBuffers[Yi.VertexBuffer.PositionKind]){var e=[];e.push(1,1),e.push(-1,1),e.push(-1,-1),e.push(1,-1),this._vertexBuffers[Yi.VertexBuffer.PositionKind]=new Yi.VertexBuffer(this._scene.getEngine(),e,Yi.VertexBuffer.PositionKind,!1,!1,2),this._buildIndexBuffer()}},e.prototype._buildIndexBuffer=function(){var e=[];e.push(0),e.push(1),e.push(2),e.push(0),e.push(2),e.push(3),this._indexBuffer=this._scene.getEngine().createIndexBuffer(e)},e.prototype._rebuild=function(){var e=this._vertexBuffers[Yi.VertexBuffer.PositionKind];e&&(e._rebuild(),this._buildIndexBuffer())},e.prototype._prepareFrame=function(e,t){void 0===e&&(e=null),void 0===t&&(t=null);var i=this._scene.activeCamera;return!!i&&(!(!(t=t||i._postProcesses.filter((function(e){return null!=e})))||0===t.length||!this._scene.postProcessesEnabled)&&(t[0].activate(i,e,null!=t),!0))},e.prototype.directRender=function(e,t,i,r,n){void 0===t&&(t=null),void 0===i&&(i=!1),void 0===r&&(r=0),void 0===n&&(n=0);for(var o=this._scene.getEngine(),s=0;s<e.length;s++){s<e.length-1?e[s+1].activate(this._scene.activeCamera,t):t?o.bindFramebuffer(t,r,void 0,void 0,i,void 0,n):o.restoreDefaultFramebuffer();var a=e[s],l=a.apply();l&&(a.onBeforeRenderObservable.notifyObservers(l),this._prepareBuffers(),o.bindBuffers(this._vertexBuffers,this._indexBuffer,l),o.drawElementsType(Yi.Material.TriangleFillMode,0,6),a.onAfterRenderObservable.notifyObservers(l))}o.setDepthBuffer(!0),o.setDepthWrite(!0)},e.prototype._finalizeFrame=function(e,t,i,r,n){void 0===n&&(n=!1);var o=this._scene.activeCamera;if(o&&0!==(r=r||o._postProcesses.filter((function(e){return null!=e}))).length&&this._scene.postProcessesEnabled){for(var s=this._scene.getEngine(),a=0,l=r.length;a<l;a++){var c=r[a];if(a<l-1?c._outputTexture=r[a+1].activate(o,t):t?(s.bindFramebuffer(t,i,void 0,void 0,n),c._outputTexture=t):(s.restoreDefaultFramebuffer(),c._outputTexture=null),e)break;var h=c.apply();h&&(c.onBeforeRenderObservable.notifyObservers(h),this._prepareBuffers(),s.bindBuffers(this._vertexBuffers,this._indexBuffer,h),s.drawElementsType(Yi.Material.TriangleFillMode,0,6),c.onAfterRenderObservable.notifyObservers(h))}s.setDepthBuffer(!0),s.setDepthWrite(!0),s.setAlphaMode(Yi.Engine.ALPHA_DISABLE)}},e.prototype.dispose=function(){var e=this._vertexBuffers[Yi.VertexBuffer.PositionKind];e&&(e.dispose(),this._vertexBuffers[Yi.VertexBuffer.PositionKind]=null),this._indexBuffer&&(this._scene.getEngine()._releaseBuffer(this._indexBuffer),this._indexBuffer=null)},e})(),Yi.PostProcessManager=Ki,Qi=$a||($a={}),Zi=(function(){function e(e,t,i,r,n,o,s,a,l,c,h,u,d,f){void 0===s&&(s=Qi.Texture.NEAREST_SAMPLINGMODE),void 0===c&&(c=null),void 0===h&&(h=Qi.Engine.TEXTURETYPE_UNSIGNED_INT),void 0===u&&(u=\"postprocess\"),void 0===f&&(f=!1),this.name=e,this.width=-1,this.height=-1,this._outputTexture=null,this.autoClear=!0,this.alphaMode=Qi.Engine.ALPHA_DISABLE,this.animations=new Array,this.enablePixelPerfectMode=!1,this.forceFullscreenViewport=!0,this.scaleMode=Qi.Engine.SCALEMODE_FLOOR,this.alwaysForcePOT=!1,this._samples=1,this.adaptScaleToCurrentViewport=!1,this._reusable=!1,this._textures=new Qi.SmartArray(2),this._currentRenderTextureInd=0,this._scaleRatio=new Qi.Vector2(1,1),this._texelSize=Qi.Vector2.Zero(),this.onActivateObservable=new Qi.Observable,this.onSizeChangedObservable=new Qi.Observable,this.onApplyObservable=new Qi.Observable,this.onBeforeRenderObservable=new Qi.Observable,this.onAfterRenderObservable=new Qi.Observable,null!=o?(this._camera=o,this._scene=o.getScene(),o.attachPostProcess(this),this._engine=this._scene.getEngine(),this._scene.postProcesses.push(this)):a&&(this._engine=a,this._engine.postProcesses.push(this)),this._options=n,this.renderTargetSamplingMode=s||Qi.Texture.NEAREST_SAMPLINGMODE,this._reusable=l||!1,this._textureType=h,this._samplers=r||[],this._samplers.push(\"textureSampler\"),this._fragmentUrl=t,this._vertexUrl=u,this._parameters=i||[],this._parameters.push(\"scale\"),this._indexParameters=d,f||this.updateEffect(c)}return Object.defineProperty(e.prototype,\"samples\",{get:function(){return this._samples},set:function(e){var t=this;this._samples=e,this._textures.forEach((function(e){e.samples!==t._samples&&t._engine.updateRenderTargetTextureSampleCount(e,t._samples)}))},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,\"onActivate\",{set:function(e){this._onActivateObserver&&this.onActivateObservable.remove(this._onActivateObserver),e&&(this._onActivateObserver=this.onActivateObservable.add(e))},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,\"onSizeChanged\",{set:function(e){this._onSizeChangedObserver&&this.onSizeChangedObservable.remove(this._onSizeChangedObserver),this._onSizeChangedObserver=this.onSizeChangedObservable.add(e)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,\"onApply\",{set:function(e){this._onApplyObserver&&this.onApplyObservable.remove(this._onApplyObserver),this._onApplyObserver=this.onApplyObservable.add(e)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,\"onBeforeRender\",{set:function(e){this._onBeforeRenderObserver&&this.onBeforeRenderObservable.remove(this._onBeforeRenderObserver),this._onBeforeRenderObserver=this.onBeforeRenderObservable.add(e)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,\"onAfterRender\",{set:function(e){this._onAfterRenderObserver&&this.onAfterRenderObservable.remove(this._onAfterRenderObserver),this._onAfterRenderObserver=this.onAfterRenderObservable.add(e)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,\"inputTexture\",{get:function(){return this._textures.data[this._currentRenderTextureInd]},set:function(e){this._forcedOutputTexture=e},enumerable:!0,configurable:!0}),e.prototype.getCamera=function(){return this._camera},Object.defineProperty(e.prototype,\"texelSize\",{get:function(){return this._shareOutputWithPostProcess?this._shareOutputWithPostProcess.texelSize:(this._forcedOutputTexture&&this._texelSize.copyFromFloats(1/this._forcedOutputTexture.width,1/this._forcedOutputTexture.height),this._texelSize)},enumerable:!0,configurable:!0}),e.prototype.getEngine=function(){return this._engine},e.prototype.getEffect=function(){return this._effect},e.prototype.shareOutputWith=function(e){return this._disposeTextures(),this._shareOutputWithPostProcess=e,this},e.prototype.useOwnOutput=function(){0==this._textures.length&&(this._textures=new Qi.SmartArray(2)),this._shareOutputWithPostProcess=null},e.prototype.updateEffect=function(e,t,i,r,n,o){void 0===e&&(e=null),void 0===t&&(t=null),void 0===i&&(i=null),this._effect=this._engine.createEffect({vertex:this._vertexUrl,fragment:this._fragmentUrl},[\"position\"],t||this._parameters,i||this._samplers,null!==e?e:\"\",void 0,n,o,r||this._indexParameters)},e.prototype.isReusable=function(){return this._reusable},e.prototype.markTextureDirty=function(){this.width=-1},e.prototype.activate=function(e,t,i){var r=this;void 0===t&&(t=null);var n=(e=e||this._camera).getScene(),o=n.getEngine(),s=o.getCaps().maxTextureSize,a=(t?t.width:this._engine.getRenderWidth(!0))*this._options|0,l=(t?t.height:this._engine.getRenderHeight(!0))*this._options|0,c=e.parent;!c||c.leftCamera!=e&&c.rightCamera!=e||(a/=2);var h,u=this._options.width||a,d=this._options.height||l;if(!this._shareOutputWithPostProcess&&!this._forcedOutputTexture){if(this.adaptScaleToCurrentViewport){var f=o.currentViewport;f&&(u*=f.width,d*=f.height)}if((this.renderTargetSamplingMode===Qi.Texture.TRILINEAR_SAMPLINGMODE||this.alwaysForcePOT)&&(this._options.width||(u=o.needPOTTextures?Qi.Tools.GetExponentOfTwo(u,s,this.scaleMode):u),this._options.height||(d=o.needPOTTextures?Qi.Tools.GetExponentOfTwo(d,s,this.scaleMode):d)),this.width!==u||this.height!==d){if(0<this._textures.length){for(var p=0;p<this._textures.length;p++)this._engine._releaseTexture(this._textures.data[p]);this._textures.reset()}this.width=u,this.height=d;var _={width:this.width,height:this.height},m={generateMipMaps:!1,generateDepthBuffer:i||0===e._postProcesses.indexOf(this),generateStencilBuffer:(i||0===e._postProcesses.indexOf(this))&&this._engine.isStencilEnable,samplingMode:this.renderTargetSamplingMode,type:this._textureType};this._textures.push(this._engine.createRenderTargetTexture(_,m)),this._reusable&&this._textures.push(this._engine.createRenderTargetTexture(_,m)),this._texelSize.copyFromFloats(1/this.width,1/this.height),this.onSizeChangedObservable.notifyObservers(this)}this._textures.forEach((function(e){e.samples!==r.samples&&r._engine.updateRenderTargetTextureSampleCount(e,r.samples)}))}return this._shareOutputWithPostProcess?h=this._shareOutputWithPostProcess.inputTexture:this._forcedOutputTexture?(h=this._forcedOutputTexture,this.width=this._forcedOutputTexture.width,this.height=this._forcedOutputTexture.height):h=this.inputTexture,this.enablePixelPerfectMode?(this._scaleRatio.copyFromFloats(a/u,l/d),this._engine.bindFramebuffer(h,0,a,l,this.forceFullscreenViewport)):(this._scaleRatio.copyFromFloats(1,1),this._engine.bindFramebuffer(h,0,void 0,void 0,this.forceFullscreenViewport)),this.onActivateObservable.notifyObservers(e),this.autoClear&&this.alphaMode===Qi.Engine.ALPHA_DISABLE&&this._engine.clear(this.clearColor?this.clearColor:n.clearColor,n._allowPostProcessClearColor,!0,!0),this._reusable&&(this._currentRenderTextureInd=(this._currentRenderTextureInd+1)%2),h},Object.defineProperty(e.prototype,\"isSupported\",{get:function(){return this._effect.isSupported},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,\"aspectRatio\",{get:function(){return this._shareOutputWithPostProcess?this._shareOutputWithPostProcess.aspectRatio:this._forcedOutputTexture?this._forcedOutputTexture.width/this._forcedOutputTexture.height:this.width/this.height},enumerable:!0,configurable:!0}),e.prototype.isReady=function(){return this._effect&&this._effect.isReady()},e.prototype.apply=function(){return this._effect&&this._effect.isReady()?(this._engine.enableEffect(this._effect),this._engine.setState(!1),this._engine.setDepthBuffer(!1),this._engine.setDepthWrite(!1),this._engine.setAlphaMode(this.alphaMode),this.alphaConstants&&this.getEngine().setAlphaConstants(this.alphaConstants.r,this.alphaConstants.g,this.alphaConstants.b,this.alphaConstants.a),e=this._shareOutputWithPostProcess?this._shareOutputWithPostProcess.inputTexture:this._forcedOutputTexture?this._forcedOutputTexture:this.inputTexture,this._effect._bindTexture(\"textureSampler\",e),this._effect.setVector2(\"scale\",this._scaleRatio),this.onApplyObservable.notifyObservers(this._effect),this._effect):null;var e},e.prototype._disposeTextures=function(){if(!this._shareOutputWithPostProcess&&!this._forcedOutputTexture){if(0<this._textures.length)for(var e=0;e<this._textures.length;e++)this._engine._releaseTexture(this._textures.data[e]);this._textures.dispose()}},e.prototype.dispose=function(e){if(e=e||this._camera,this._disposeTextures(),this._scene){var t=this._scene.postProcesses.indexOf(this);-1!==t&&this._scene.postProcesses.splice(t,1)}else{var i=this._engine.postProcesses.indexOf(this);-1!==i&&this._engine.postProcesses.splice(i,1)}if(e){if(e.detachPostProcess(this),0===e._postProcesses.indexOf(this)&&0<e._postProcesses.length){var r=this._camera._getFirstPostProcess();r&&r.markTextureDirty()}this.onActivateObservable.clear(),this.onAfterRenderObservable.clear(),this.onApplyObservable.clear(),this.onBeforeRenderObservable.clear(),this.onSizeChangedObservable.clear()}},e})(),Qi.PostProcess=Zi,qi=$a||($a={}),Ji=(function(l){function e(e,t,i,r,n,o,s,a){return void 0===i&&(i=null),void 0===s&&(s=qi.Engine.TEXTURETYPE_UNSIGNED_INT),void 0===a&&(a=!1),l.call(this,e,\"pass\",null,null,t,i,r,n,o,void 0,s,void 0,null,a)||this}return T(e,l),e})(qi.PostProcess),qi.PassPostProcess=Ji;var $i,er,tr,ir,rr,nr,or,sr,ar,lr,cr,hr,ur,dr,fr,pr,_r,mr,gr,vr,yr,br,Tr,Er,xr,Pr,Ar,Sr,Mr,Rr,Cr,Or,Dr,Ir,wr,Lr,Fr,Br,Nr,Vr,Ur,zr,Gr,kr,Wr,Hr,Xr,jr,Yr,Kr,Qr,Zr,qr,Jr,$r,en,tn,rn,nn,on,sn,an,ln,cn,hn,un,dn,fn,pn,_n,mn,gn,vn,yn,bn,Tn,En,xn,Pn,An,Sn,Mn,Rn,Cn,On,Dn,In,wn,Ln,Fn,Bn,Nn,Vn,Un,zn,Gn,kn,Wn,Hn,Xn,jn,Yn,Kn,Qn,Zn,qn,Jn,$n,eo,to,io,ro,no,oo,so,ao,lo,co,ho,uo,fo,po,_o,mo,go,vo,yo,bo,To,Eo,xo,Po,Ao,So,Mo,Ro,Co,Oo,Do,Io,wo,Lo,Fo,Bo,No,Vo,Uo,zo,Go,ko,Wo,Ho,Xo,jo,Yo,Ko,Qo,Zo,qo,Jo,$o,es,ts,is,rs,ns,os,ss,as,ls,cs,hs,us,ds,fs,ps,_s,ms,gs,vs,ys,bs,Ts,Es,xs,Ps,As,Ss,Ms,Rs,Cs,Os,Ds,Is,ws,Ls,Fs,Bs,Ns,Vs,Us,zs,Gs,ks,Ws,Hs,Xs,js,Ys,Ks,Qs,Zs,qs,Js,$s,ea,ta,ia,ra,na,oa,sa,aa;ae=this&&this.__assign||function(){return(ae=Object.assign||function(e){for(var t,i=1,r=arguments.length;i<r;i++)for(var n in t=arguments[i])Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e}).apply(this,arguments)};$i=$a||($a={}),er=(function(){function s(e,t,i){this._bias=5e-5,this._normalBias=0,this._blurBoxOffset=1,this._blurScale=2,this._blurKernel=1,this._useKernelBlur=!1,this._filter=s.FILTER_NONE,this._filteringQuality=s.QUALITY_HIGH,this._contactHardeningLightSizeUVRatio=.1,this._darkness=0,this._transparencyShadow=!1,this.frustumEdgeFalloff=0,this.forceBackFacesOnly=!1,this._lightDirection=$i.Vector3.Zero(),this._viewMatrix=$i.Matrix.Zero(),this._projectionMatrix=$i.Matrix.Zero(),this._transformMatrix=$i.Matrix.Zero(),this._cachedPosition=new $i.Vector3(Number.MAX_VALUE,Number.MAX_VALUE,Number.MAX_VALUE),this._cachedDirection=new $i.Vector3(Number.MAX_VALUE,Number.MAX_VALUE,Number.MAX_VALUE),this._currentFaceIndex=0,this._currentFaceIndexCache=0,this._defaultTextureMatrix=$i.Matrix.Identity(),this._mapSize=e,this._light=t,this._scene=t.getScene();var r=(t._shadowGenerator=this)._scene._getComponent($i.SceneComponentConstants.NAME_SHADOWGENERATOR);r||(r=new $i.ShadowGeneratorSceneComponent(this._scene),this._scene._addComponent(r));var n=this._scene.getEngine().getCaps();i?n.textureFloatRender&&n.textureFloatLinearFiltering?this._textureType=$i.Engine.TEXTURETYPE_FLOAT:n.textureHalfFloatRender&&n.textureHalfFloatLinearFiltering?this._textureType=$i.Engine.TEXTURETYPE_HALF_FLOAT:this._textureType=$i.Engine.TEXTURETYPE_UNSIGNED_INT:n.textureHalfFloatRender&&n.textureHalfFloatLinearFiltering?this._textureType=$i.Engine.TEXTURETYPE_HALF_FLOAT:n.textureFloatRender&&n.textureFloatLinearFiltering?this._textureType=$i.Engine.TEXTURETYPE_FLOAT:this._textureType=$i.Engine.TEXTURETYPE_UNSIGNED_INT,this._initializeGenerator(),this._applyFilterValues()}return Object.defineProperty(s.prototype,\"bias\",{get:function(){return this._bias},set:function(e){this._bias=e},enumerable:!0,configurable:!0}),Object.defineProperty(s.prototype,\"normalBias\",{get:function(){return this._normalBias},set:function(e){this._normalBias=e},enumerable:!0,configurable:!0}),Object.defineProperty(s.prototype,\"blurBoxOffset\",{get:function(){return this._blurBoxOffset},set:function(e){this._blurBoxOffset!==e&&(this._blurBoxOffset=e,this._disposeBlurPostProcesses())},enumerable:!0,configurable:!0}),Object.defineProperty(s.prototype,\"blurScale\",{get:function(){return this._blurScale},set:function(e){this._blurScale!==e&&(this._blurScale=e,this._disposeBlurPostProcesses())},enumerable:!0,configurable:!0}),Object.defineProperty(s.prototype,\"blurKernel\",{get:function(){return this._blurKernel},set:function(e){this._blurKernel!==e&&(this._blurKernel=e,this._disposeBlurPostProcesses())},enumerable:!0,configurable:!0}),Object.defineProperty(s.prototype,\"useKernelBlur\",{get:function(){return this._useKernelBlur},set:function(e){this._useKernelBlur!==e&&(this._useKernelBlur=e,this._disposeBlurPostProcesses())},enumerable:!0,configurable:!0}),Object.defineProperty(s.prototype,\"depthScale\",{get:function(){return void 0!==this._depthScale?this._depthScale:this._light.getDepthScale()},set:function(e){this._depthScale=e},enumerable:!0,configurable:!0}),Object.defineProperty(s.prototype,\"filter\",{get:function(){return this._filter},set:function(e){if(this._light.needCube()){if(e===s.FILTER_BLUREXPONENTIALSHADOWMAP)return void(this.useExponentialShadowMap=!0);if(e===s.FILTER_BLURCLOSEEXPONENTIALSHADOWMAP)return void(this.useCloseExponentialShadowMap=!0);if(e===s.FILTER_PCF||e===s.FILTER_PCSS)return void(this.usePoissonSampling=!0)}e!==s.FILTER_PCF&&e!==s.FILTER_PCSS||1!==this._scene.getEngine().webGLVersion?this._filter!==e&&(this._filter=e,this._disposeBlurPostProcesses(),this._applyFilterValues(),this._light._markMeshesAsLightDirty()):this.usePoissonSampling=!0},enumerable:!0,configurable:!0}),Object.defineProperty(s.prototype,\"usePoissonSampling\",{get:function(){return this.filter===s.FILTER_POISSONSAMPLING},set:function(e){(e||this.filter===s.FILTER_POISSONSAMPLING)&&(this.filter=e?s.FILTER_POISSONSAMPLING:s.FILTER_NONE)},enumerable:!0,configurable:!0}),Object.defineProperty(s.prototype,\"useVarianceShadowMap\",{get:function(){return $i.Tools.Warn(\"VSM are now replaced by ESM. Please use useExponentialShadowMap instead.\"),this.useExponentialShadowMap},set:function(e){$i.Tools.Warn(\"VSM are now replaced by ESM. Please use useExponentialShadowMap instead.\"),this.useExponentialShadowMap=e},enumerable:!0,configurable:!0}),Object.defineProperty(s.prototype,\"useBlurVarianceShadowMap\",{get:function(){return $i.Tools.Warn(\"VSM are now replaced by ESM. Please use useBlurExponentialShadowMap instead.\"),this.useBlurExponentialShadowMap},set:function(e){$i.Tools.Warn(\"VSM are now replaced by ESM. Please use useBlurExponentialShadowMap instead.\"),this.useBlurExponentialShadowMap=e},enumerable:!0,configurable:!0}),Object.defineProperty(s.prototype,\"useExponentialShadowMap\",{get:function(){return this.filter===s.FILTER_EXPONENTIALSHADOWMAP},set:function(e){(e||this.filter===s.FILTER_EXPONENTIALSHADOWMAP)&&(this.filter=e?s.FILTER_EXPONENTIALSHADOWMAP:s.FILTER_NONE)},enumerable:!0,configurable:!0}),Object.defineProperty(s.prototype,\"useBlurExponentialShadowMap\",{get:function(){return this.filter===s.FILTER_BLUREXPONENTIALSHADOWMAP},set:function(e){(e||this.filter===s.FILTER_BLUREXPONENTIALSHADOWMAP)&&(this.filter=e?s.FILTER_BLUREXPONENTIALSHADOWMAP:s.FILTER_NONE)},enumerable:!0,configurable:!0}),Object.defineProperty(s.prototype,\"useCloseExponentialShadowMap\",{get:function(){return this.filter===s.FILTER_CLOSEEXPONENTIALSHADOWMAP},set:function(e){(e||this.filter===s.FILTER_CLOSEEXPONENTIALSHADOWMAP)&&(this.filter=e?s.FILTER_CLOSEEXPONENTIALSHADOWMAP:s.FILTER_NONE)},enumerable:!0,configurable:!0}),Object.defineProperty(s.prototype,\"useBlurCloseExponentialShadowMap\",{get:function(){return this.filter===s.FILTER_BLURCLOSEEXPONENTIALSHADOWMAP},set:function(e){(e||this.filter===s.FILTER_BLURCLOSEEXPONENTIALSHADOWMAP)&&(this.filter=e?s.FILTER_BLURCLOSEEXPONENTIALSHADOWMAP:s.FILTER_NONE)},enumerable:!0,configurable:!0}),Object.defineProperty(s.prototype,\"usePercentageCloserFiltering\",{get:function(){return this.filter===s.FILTER_PCF},set:function(e){(e||this.filter===s.FILTER_PCF)&&(this.filter=e?s.FILTER_PCF:s.FILTER_NONE)},enumerable:!0,configurable:!0}),Object.defineProperty(s.prototype,\"filteringQuality\",{get:function(){return this._filteringQuality},set:function(e){this._filteringQuality=e},enumerable:!0,configurable:!0}),Object.defineProperty(s.prototype,\"useContactHardeningShadow\",{get:function(){return this.filter===s.FILTER_PCSS},set:function(e){(e||this.filter===s.FILTER_PCSS)&&(this.filter=e?s.FILTER_PCSS:s.FILTER_NONE)},enumerable:!0,configurable:!0}),Object.defineProperty(s.prototype,\"contactHardeningLightSizeUVRatio\",{get:function(){return this._contactHardeningLightSizeUVRatio},set:function(e){this._contactHardeningLightSizeUVRatio=e},enumerable:!0,configurable:!0}),s.prototype.getDarkness=function(){return this._darkness},s.prototype.setDarkness=function(e){return this._darkness=1<=e?1:e<=0?0:e,this},s.prototype.setTransparencyShadow=function(e){return this._transparencyShadow=e,this},s.prototype.getShadowMap=function(){return this._shadowMap},s.prototype.getShadowMapForRendering=function(){return this._shadowMap2?this._shadowMap2:this._shadowMap},s.prototype.addShadowCaster=function(e,t){var i;return void 0===t&&(t=!0),this._shadowMap&&(this._shadowMap.renderList||(this._shadowMap.renderList=[]),this._shadowMap.renderList.push(e),t&&(i=this._shadowMap.renderList).push.apply(i,e.getChildMeshes())),this},s.prototype.removeShadowCaster=function(e,t){if(void 0===t&&(t=!0),!this._shadowMap||!this._shadowMap.renderList)return this;var i=this._shadowMap.renderList.indexOf(e);if(-1!==i&&this._shadowMap.renderList.splice(i,1),t)for(var r=0,n=e.getChildren();r<n.length;r++){var o=n[r];this.removeShadowCaster(o)}return this},s.prototype.getLight=function(){return this._light},s.prototype._initializeGenerator=function(){this._light._markMeshesAsLightDirty(),this._initializeShadowMap()},s.prototype._initializeShadowMap=function(){var t=this,i=this._scene.getEngine();1<i.webGLVersion?(this._shadowMap=new $i.RenderTargetTexture(this._light.name+\"_shadowMap\",this._mapSize,this._scene,!1,!0,this._textureType,this._light.needCube(),void 0,!1,!1),this._shadowMap.createDepthStencilTexture($i.Engine.LESS,!0)):this._shadowMap=new $i.RenderTargetTexture(this._light.name+\"_shadowMap\",this._mapSize,this._scene,!1,!0,this._textureType,this._light.needCube()),this._shadowMap.wrapU=$i.Texture.CLAMP_ADDRESSMODE,this._shadowMap.wrapV=$i.Texture.CLAMP_ADDRESSMODE,this._shadowMap.anisotropicFilteringLevel=1,this._shadowMap.updateSamplingMode($i.Texture.BILINEAR_SAMPLINGMODE),this._shadowMap.renderParticles=!1,this._shadowMap.ignoreCameraViewport=!0,this._shadowMap.onBeforeRenderObservable.add((function(e){t._currentFaceIndex=e,t._filter===s.FILTER_PCF&&i.setColorWrite(!1)})),this._shadowMap.customRenderFunction=this._renderForShadowMap.bind(this),this._shadowMap.onAfterUnbindObservable.add((function(){if(t._filter===s.FILTER_PCF&&i.setColorWrite(!0),t.useBlurExponentialShadowMap||t.useBlurCloseExponentialShadowMap){var e=t.getShadowMapForRendering();e&&t._scene.postProcessManager.directRender(t._blurPostProcesses,e.getInternalTexture(),!0)}}));var r=new $i.Color4(0,0,0,0),n=new $i.Color4(1,1,1,1);this._shadowMap.onClearObservable.add((function(e){t._filter===s.FILTER_PCF?e.clear(n,!1,!0,!1):t.useExponentialShadowMap||t.useBlurExponentialShadowMap?e.clear(r,!0,!0,!1):e.clear(n,!0,!0,!1)}))},s.prototype._initializeBlurRTTAndPostProcesses=function(){var t=this,e=this._scene.getEngine(),i=this._mapSize/this.blurScale;this.useKernelBlur&&1===this.blurScale||(this._shadowMap2=new $i.RenderTargetTexture(this._light.name+\"_shadowMap2\",i,this._scene,!1,!0,this._textureType),this._shadowMap2.wrapU=$i.Texture.CLAMP_ADDRESSMODE,this._shadowMap2.wrapV=$i.Texture.CLAMP_ADDRESSMODE,this._shadowMap2.updateSamplingMode($i.Texture.BILINEAR_SAMPLINGMODE)),this.useKernelBlur?(this._kernelBlurXPostprocess=new $i.BlurPostProcess(this._light.name+\"KernelBlurX\",new $i.Vector2(1,0),this.blurKernel,1,null,$i.Texture.BILINEAR_SAMPLINGMODE,e,!1,this._textureType),this._kernelBlurXPostprocess.width=i,this._kernelBlurXPostprocess.height=i,this._kernelBlurXPostprocess.onApplyObservable.add((function(e){e.setTexture(\"textureSampler\",t._shadowMap)})),this._kernelBlurYPostprocess=new $i.BlurPostProcess(this._light.name+\"KernelBlurY\",new $i.Vector2(0,1),this.blurKernel,1,null,$i.Texture.BILINEAR_SAMPLINGMODE,e,!1,this._textureType),this._kernelBlurXPostprocess.autoClear=!1,this._kernelBlurYPostprocess.autoClear=!1,this._textureType===$i.Engine.TEXTURETYPE_UNSIGNED_INT&&(this._kernelBlurXPostprocess.packedFloat=!0,this._kernelBlurYPostprocess.packedFloat=!0),this._blurPostProcesses=[this._kernelBlurXPostprocess,this._kernelBlurYPostprocess]):(this._boxBlurPostprocess=new $i.PostProcess(this._light.name+\"DepthBoxBlur\",\"depthBoxBlur\",[\"screenSize\",\"boxOffset\"],[],1,null,$i.Texture.BILINEAR_SAMPLINGMODE,e,!1,\"#define OFFSET \"+this._blurBoxOffset,this._textureType),this._boxBlurPostprocess.onApplyObservable.add((function(e){e.setFloat2(\"screenSize\",i,i),e.setTexture(\"textureSampler\",t._shadowMap)})),this._boxBlurPostprocess.autoClear=!1,this._blurPostProcesses=[this._boxBlurPostprocess])},s.prototype._renderForShadowMap=function(e,t,i,r){var n,o=this._scene.getEngine();if(r.length){for(o.setColorWrite(!1),n=0;n<r.length;n++)this._renderSubMeshForShadowMap(r.data[n]);o.setColorWrite(!0)}for(n=0;n<e.length;n++)this._renderSubMeshForShadowMap(e.data[n]);for(n=0;n<t.length;n++)this._renderSubMeshForShadowMap(t.data[n]);if(this._transparencyShadow)for(n=0;n<i.length;n++)this._renderSubMeshForShadowMap(i.data[n])},s.prototype._renderSubMeshForShadowMap=function(e){var i=this,t=e.getRenderingMesh(),r=this._scene,n=r.getEngine(),o=e.getMaterial();if(o){n.setState(o.backFaceCulling);var s=t._getInstancesRenderList(e._id);if(!s.mustReturn){var a=n.getCaps().instancedArrays&&null!==s.visibleInstances[e._id]&&void 0!==s.visibleInstances[e._id];if(this.isReady(e,a)){if(n.enableEffect(this._effect),t._bind(e,this._effect,$i.Material.TriangleFillMode),this._effect.setFloat3(\"biasAndScale\",this.bias,this.normalBias,this.depthScale),this._effect.setMatrix(\"viewProjection\",this.getTransformMatrix()),this.getLight().getTypeID()===$i.Light.LIGHTTYPEID_DIRECTIONALLIGHT?this._effect.setVector3(\"lightData\",this._cachedDirection):this._effect.setVector3(\"lightData\",this._cachedPosition),r.activeCamera&&this._effect.setFloat2(\"depthValues\",this.getLight().getDepthMinZ(r.activeCamera),this.getLight().getDepthMinZ(r.activeCamera)+this.getLight().getDepthMaxZ(r.activeCamera)),o&&o.needAlphaTesting()){var l=o.getAlphaTestTexture();l&&(this._effect.setTexture(\"diffuseSampler\",l),this._effect.setMatrix(\"diffuseMatrix\",l.getTextureMatrix()||this._defaultTextureMatrix))}t.useBones&&t.computeBonesUsingShaders&&this._effect.setMatrices(\"mBones\",t.skeleton.getTransformMatrices(t)),$i.MaterialHelper.BindMorphTargetParameters(t,this._effect),this.forceBackFacesOnly&&n.setState(!0,0,!1,!0),t._processRendering(e,this._effect,$i.Material.TriangleFillMode,s,a,(function(e,t){return i._effect.setMatrix(\"world\",t)})),this.forceBackFacesOnly&&n.setState(!0,0,!1,!1)}else this._shadowMap&&this._shadowMap.resetRefreshCounter()}}},s.prototype._applyFilterValues=function(){this._shadowMap&&(this.filter===s.FILTER_NONE||this.filter===s.FILTER_PCSS?this._shadowMap.updateSamplingMode($i.Texture.NEAREST_SAMPLINGMODE):this._shadowMap.updateSamplingMode($i.Texture.BILINEAR_SAMPLINGMODE))},s.prototype.forceCompilation=function(e,t){var i=this,r=ae({useInstances:!1},t),n=this.getShadowMap();if(n){var o=n.renderList;if(o){for(var s=new Array,a=0,l=o;a<l.length;a++){var c=l[a];s.push.apply(s,c.subMeshes)}if(0!==s.length){var h=0,u=function(){if(i._scene&&i._scene.getEngine()){for(;i.isReady(s[h],r.useInstances);)if(++h>=s.length)return void(e&&e(i));setTimeout(u,16)}};u()}else e&&e(this)}else e&&e(this)}else e&&e(this)},s.prototype.forceCompilationAsync=function(t){var i=this;return new Promise(function(e){i.forceCompilation((function(){e()}),t)})},s.prototype.isReady=function(e,t){var i=[];this._textureType!==$i.Engine.TEXTURETYPE_UNSIGNED_INT&&i.push(\"#define FLOAT\"),this.useExponentialShadowMap||this.useBlurExponentialShadowMap?i.push(\"#define ESM\"):(this.usePercentageCloserFiltering||this.useContactHardeningShadow)&&i.push(\"#define DEPTHTEXTURE\");var r=[$i.VertexBuffer.PositionKind],n=e.getMesh(),o=e.getMaterial();if(this.normalBias&&n.isVerticesDataPresent($i.VertexBuffer.NormalKind)&&(r.push($i.VertexBuffer.NormalKind),i.push(\"#define NORMAL\"),n.nonUniformScaling&&i.push(\"#define NONUNIFORMSCALING\"),this.getLight().getTypeID()===$i.Light.LIGHTTYPEID_DIRECTIONALLIGHT&&i.push(\"#define DIRECTIONINLIGHTDATA\")),o&&o.needAlphaTesting()){var s=o.getAlphaTestTexture();s&&(i.push(\"#define ALPHATEST\"),n.isVerticesDataPresent($i.VertexBuffer.UVKind)&&(r.push($i.VertexBuffer.UVKind),i.push(\"#define UV1\")),n.isVerticesDataPresent($i.VertexBuffer.UV2Kind)&&1===s.coordinatesIndex&&(r.push($i.VertexBuffer.UV2Kind),i.push(\"#define UV2\")))}n.useBones&&n.computeBonesUsingShaders?(r.push($i.VertexBuffer.MatricesIndicesKind),r.push($i.VertexBuffer.MatricesWeightsKind),4<n.numBoneInfluencers&&(r.push($i.VertexBuffer.MatricesIndicesExtraKind),r.push($i.VertexBuffer.MatricesWeightsExtraKind)),i.push(\"#define NUM_BONE_INFLUENCERS \"+n.numBoneInfluencers),i.push(\"#define BonesPerMesh \"+(n.skeleton.bones.length+1))):i.push(\"#define NUM_BONE_INFLUENCERS 0\");var a=n.morphTargetManager,l=0;a&&0<a.numInfluencers&&(i.push(\"#define MORPHTARGETS\"),l=a.numInfluencers,i.push(\"#define NUM_MORPH_INFLUENCERS \"+l),$i.MaterialHelper.PrepareAttributesForMorphTargets(r,n,{NUM_MORPH_INFLUENCERS:l})),t&&(i.push(\"#define INSTANCES\"),r.push(\"world0\"),r.push(\"world1\"),r.push(\"world2\"),r.push(\"world3\"));var c=i.join(\"\\n\");return this._cachedDefines!==c&&(this._cachedDefines=c,this._effect=this._scene.getEngine().createEffect(\"shadowMap\",r,[\"world\",\"mBones\",\"viewProjection\",\"diffuseMatrix\",\"lightData\",\"depthValues\",\"biasAndScale\",\"morphTargetInfluences\"],[\"diffuseSampler\"],c,void 0,void 0,void 0,{maxSimultaneousMorphTargets:l})),!!this._effect.isReady()&&((this.useBlurExponentialShadowMap||this.useBlurCloseExponentialShadowMap)&&(this._blurPostProcesses&&this._blurPostProcesses.length||this._initializeBlurRTTAndPostProcesses()),!(this._kernelBlurXPostprocess&&!this._kernelBlurXPostprocess.isReady())&&(!(this._kernelBlurYPostprocess&&!this._kernelBlurYPostprocess.isReady())&&!(this._boxBlurPostprocess&&!this._boxBlurPostprocess.isReady())))},s.prototype.prepareDefines=function(e,t){var i=this._scene,r=this._light;i.shadowsEnabled&&r.shadowEnabled&&(e[\"SHADOW\"+t]=!0,this.useContactHardeningShadow&&(e[\"SHADOWPCSS\"+t]=!0,this._filteringQuality===s.QUALITY_LOW?e[\"SHADOWLOWQUALITY\"+t]=!0:this._filteringQuality===s.QUALITY_MEDIUM&&(e[\"SHADOWMEDIUMQUALITY\"+t]=!0)),this.usePercentageCloserFiltering?(e[\"SHADOWPCF\"+t]=!0,this._filteringQuality===s.QUALITY_LOW?e[\"SHADOWLOWQUALITY\"+t]=!0:this._filteringQuality===s.QUALITY_MEDIUM&&(e[\"SHADOWMEDIUMQUALITY\"+t]=!0)):this.usePoissonSampling?e[\"SHADOWPOISSON\"+t]=!0:this.useExponentialShadowMap||this.useBlurExponentialShadowMap?e[\"SHADOWESM\"+t]=!0:(this.useCloseExponentialShadowMap||this.useBlurCloseExponentialShadowMap)&&(e[\"SHADOWCLOSEESM\"+t]=!0),r.needCube()&&(e[\"SHADOWCUBE\"+t]=!0))},s.prototype.bindShadowLight=function(e,t){var i=this._light,r=this._scene;if(r.shadowsEnabled&&i.shadowEnabled){var n=r.activeCamera;if(n){var o=this.getShadowMap();o&&(i.needCube()||t.setMatrix(\"lightMatrix\"+e,this.getTransformMatrix()),this._filter===s.FILTER_PCF?(t.setDepthStencilTexture(\"shadowSampler\"+e,this.getShadowMapForRendering()),i._uniformBuffer.updateFloat4(\"shadowsInfo\",this.getDarkness(),o.getSize().width,1/o.getSize().width,this.frustumEdgeFalloff,e)):this._filter===s.FILTER_PCSS?(t.setDepthStencilTexture(\"shadowSampler\"+e,this.getShadowMapForRendering()),t.setTexture(\"depthSampler\"+e,this.getShadowMapForRendering()),i._uniformBuffer.updateFloat4(\"shadowsInfo\",this.getDarkness(),1/o.getSize().width,this._contactHardeningLightSizeUVRatio*o.getSize().width,this.frustumEdgeFalloff,e)):(t.setTexture(\"shadowSampler\"+e,this.getShadowMapForRendering()),i._uniformBuffer.updateFloat4(\"shadowsInfo\",this.getDarkness(),this.blurScale/o.getSize().width,this.depthScale,this.frustumEdgeFalloff,e)),i._uniformBuffer.updateFloat2(\"depthValues\",this.getLight().getDepthMinZ(n),this.getLight().getDepthMinZ(n)+this.getLight().getDepthMaxZ(n),e))}}},s.prototype.getTransformMatrix=function(){var e=this._scene;if(this._currentRenderID===e.getRenderId()&&this._currentFaceIndexCache===this._currentFaceIndex)return this._transformMatrix;this._currentRenderID=e.getRenderId(),this._currentFaceIndexCache=this._currentFaceIndex;var t=this._light.position;if(this._light.computeTransformedInformation()&&(t=this._light.transformedPosition),$i.Vector3.NormalizeToRef(this._light.getShadowDirection(this._currentFaceIndex),this._lightDirection),1===Math.abs($i.Vector3.Dot(this._lightDirection,$i.Vector3.Up()))&&(this._lightDirection.z=1e-13),this._light.needProjectionMatrixCompute()||!this._cachedPosition||!this._cachedDirection||!t.equals(this._cachedPosition)||!this._lightDirection.equals(this._cachedDirection)){this._cachedPosition.copyFrom(t),this._cachedDirection.copyFrom(this._lightDirection),$i.Matrix.LookAtLHToRef(t,t.add(this._lightDirection),$i.Vector3.Up(),this._viewMatrix);var i=this.getShadowMap();if(i){var r=i.renderList;r&&this._light.setShadowProjectionMatrix(this._projectionMatrix,this._viewMatrix,r)}this._viewMatrix.multiplyToRef(this._projectionMatrix,this._transformMatrix)}return this._transformMatrix},s.prototype.recreateShadowMap=function(){var e=this._shadowMap;if(e){var t=e.renderList;this._disposeRTTandPostProcesses(),this._initializeGenerator(),this.filter=this.filter,this._applyFilterValues(),this._shadowMap.renderList=t}},s.prototype._disposeBlurPostProcesses=function(){this._shadowMap2&&(this._shadowMap2.dispose(),this._shadowMap2=null),this._boxBlurPostprocess&&(this._boxBlurPostprocess.dispose(),this._boxBlurPostprocess=null),this._kernelBlurXPostprocess&&(this._kernelBlurXPostprocess.dispose(),this._kernelBlurXPostprocess=null),this._kernelBlurYPostprocess&&(this._kernelBlurYPostprocess.dispose(),this._kernelBlurYPostprocess=null),this._blurPostProcesses=[]},s.prototype._disposeRTTandPostProcesses=function(){this._shadowMap&&(this._shadowMap.dispose(),this._shadowMap=null),this._disposeBlurPostProcesses()},s.prototype.dispose=function(){this._disposeRTTandPostProcesses(),this._light&&(this._light._shadowGenerator=null,this._light._markMeshesAsLightDirty())},s.prototype.serialize=function(){var e={},t=this.getShadowMap();if(!t)return e;if(e.lightId=this._light.id,e.mapSize=t.getRenderSize(),e.useExponentialShadowMap=this.useExponentialShadowMap,e.useBlurExponentialShadowMap=this.useBlurExponentialShadowMap,e.useCloseExponentialShadowMap=this.useBlurExponentialShadowMap,e.useBlurCloseExponentialShadowMap=this.useBlurExponentialShadowMap,e.usePoissonSampling=this.usePoissonSampling,e.forceBackFacesOnly=this.forceBackFacesOnly,e.depthScale=this.depthScale,e.darkness=this.getDarkness(),e.blurBoxOffset=this.blurBoxOffset,e.blurKernel=this.blurKernel,e.blurScale=this.blurScale,e.useKernelBlur=this.useKernelBlur,e.transparencyShadow=this._transparencyShadow,e.frustumEdgeFalloff=this.frustumEdgeFalloff,e.bias=this.bias,e.normalBias=this.normalBias,e.usePercentageCloserFiltering=this.usePercentageCloserFiltering,e.useContactHardeningShadow=this.useContactHardeningShadow,e.filteringQuality=this.filteringQuality,e.contactHardeningLightSizeUVRatio=this.contactHardeningLightSizeUVRatio,e.renderList=[],t.renderList)for(var i=0;i<t.renderList.length;i++){var r=t.renderList[i];e.renderList.push(r.id)}return e},s.Parse=function(e,t){for(var i=t.getLightByID(e.lightId),r=new s(e.mapSize,i),n=r.getShadowMap(),o=0;o<e.renderList.length;o++){t.getMeshesByID(e.renderList[o]).forEach((function(e){n&&(n.renderList||(n.renderList=[]),n.renderList.push(e))}))}return e.usePoissonSampling?r.usePoissonSampling=!0:e.useExponentialShadowMap?r.useExponentialShadowMap=!0:e.useBlurExponentialShadowMap?r.useBlurExponentialShadowMap=!0:e.useCloseExponentialShadowMap?r.useCloseExponentialShadowMap=!0:e.useBlurCloseExponentialShadowMap?r.useBlurCloseExponentialShadowMap=!0:e.usePercentageCloserFiltering?r.usePercentageCloserFiltering=!0:e.useContactHardeningShadow&&(r.useContactHardeningShadow=!0),e.filteringQuality&&(r.filteringQuality=e.filteringQuality),e.contactHardeningLightSizeUVRatio?r.contactHardeningLightSizeUVRatio=e.contactHardeningLightSizeUVRatio:e.useVarianceShadowMap?r.useExponentialShadowMap=!0:e.useBlurVarianceShadowMap&&(r.useBlurExponentialShadowMap=!0),e.depthScale&&(r.depthScale=e.depthScale),e.blurScale&&(r.blurScale=e.blurScale),e.blurBoxOffset&&(r.blurBoxOffset=e.blurBoxOffset),e.useKernelBlur&&(r.useKernelBlur=e.useKernelBlur),e.blurKernel&&(r.blurKernel=e.blurKernel),void 0!==e.bias&&(r.bias=e.bias),void 0!==e.normalBias&&(r.normalBias=e.normalBias),void 0!==e.frustumEdgeFalloff&&(r.frustumEdgeFalloff=e.frustumEdgeFalloff),e.darkness&&r.setDarkness(e.darkness),e.transparencyShadow&&r.setTransparencyShadow(!0),r.forceBackFacesOnly=e.forceBackFacesOnly,r},s.FILTER_NONE=0,s.FILTER_EXPONENTIALSHADOWMAP=1,s.FILTER_POISSONSAMPLING=2,s.FILTER_BLUREXPONENTIALSHADOWMAP=3,s.FILTER_CLOSEEXPONENTIALSHADOWMAP=4,s.FILTER_BLURCLOSEEXPONENTIALSHADOWMAP=5,s.FILTER_PCF=6,s.FILTER_PCSS=7,s.QUALITY_HIGH=0,s.QUALITY_MEDIUM=1,s.QUALITY_LOW=2,s})(),$i.ShadowGenerator=er,(function(a){a.AbstractScene.AddParser(a.SceneComponentConstants.NAME_SHADOWGENERATOR,(function(e,t,i,r){if(void 0!==e.shadowGenerators&&null!==e.shadowGenerators)for(var n=0,o=e.shadowGenerators.length;n<o;n++){var s=e.shadowGenerators[n];a.ShadowGenerator.Parse(s,t)}}));var e=(function(){function e(e){this.name=a.SceneComponentConstants.NAME_SHADOWGENERATOR,this.scene=e}return e.prototype.register=function(){this.scene._gatherRenderTargetsStage.registerStep(a.SceneComponentConstants.STEP_GATHERRENDERTARGETS_SHADOWGENERATOR,this,this._gatherRenderTargets)},e.prototype.rebuild=function(){},e.prototype.serialize=function(e){e.shadowGenerators=[];for(var t=0,i=this.scene.lights;t<i.length;t++){var r=i[t].getShadowGenerator();r&&e.shadowGenerators.push(r.serialize())}},e.prototype.addFromContainer=function(e){},e.prototype.removeFromContainer=function(e){},e.prototype.dispose=function(){},e.prototype._gatherRenderTargets=function(e){var t=this.scene;if(this.scene.shadowsEnabled)for(var i=0;i<t.lights.length;i++){var r=t.lights[i],n=r.getShadowGenerator();if(r.isEnabled()&&r.shadowEnabled&&n){var o=n.getShadowMap();-1!==t.textures.indexOf(o)&&e.push(o)}}},e})();a.ShadowGeneratorSceneComponent=e})($a||($a={})),tr=$a||($a={}),ir=(function(){function e(e,t,i){void 0===t&&(t=\"\"),void 0===i&&(i=\"black\");var r=this;this._renderingCanvas=e,this._loadingText=t,this._loadingDivBackgroundColor=i,this._resizeLoadingUI=function(){var e=r._renderingCanvas.getBoundingClientRect(),t=window.getComputedStyle(r._renderingCanvas).position;r._loadingDiv&&(r._loadingDiv.style.position=\"fixed\"===t?\"fixed\":\"absolute\",r._loadingDiv.style.left=e.left+\"px\",r._loadingDiv.style.top=e.top+\"px\",r._loadingDiv.style.width=e.width+\"px\",r._loadingDiv.style.height=e.height+\"px\")}}return e.prototype.displayLoadingUI=function(){if(!this._loadingDiv){this._loadingDiv=document.createElement(\"div\"),this._loadingDiv.id=\"babylonjsLoadingDiv\",this._loadingDiv.style.opacity=\"0\",this._loadingDiv.style.transition=\"opacity 1.5s ease\",this._loadingDiv.style.pointerEvents=\"none\",this._loadingTextDiv=document.createElement(\"div\"),this._loadingTextDiv.style.position=\"absolute\",this._loadingTextDiv.style.left=\"0\",this._loadingTextDiv.style.top=\"50%\",this._loadingTextDiv.style.marginTop=\"80px\",this._loadingTextDiv.style.width=\"100%\",this._loadingTextDiv.style.height=\"20px\",this._loadingTextDiv.style.fontFamily=\"Arial\",this._loadingTextDiv.style.fontSize=\"14px\",this._loadingTextDiv.style.color=\"white\",this._loadingTextDiv.style.textAlign=\"center\",this._loadingTextDiv.innerHTML=\"Loading\",this._loadingDiv.appendChild(this._loadingTextDiv),this._loadingTextDiv.innerHTML=this._loadingText;var e=document.createElement(\"style\");e.type=\"text/css\";e.innerHTML=\"@-webkit-keyframes spin1 { 0% { -webkit-transform: rotate(0deg);}\\n 100% { -webkit-transform: rotate(360deg);}\\n } @keyframes spin1 { 0% { transform: rotate(0deg);}\\n 100% { transform: rotate(360deg);}\\n }\",document.getElementsByTagName(\"head\")[0].appendChild(e);var t=new Image;t.src=\"data:image/png;base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t.style.left=\"50%\",t.style.top=\"50%\",t.style.marginLeft=\"-60px\",t.style.marginTop=\"-60px\",t.style.animation=\"spin1 2s infinite ease-in-out\",t.style.webkitAnimation=\"spin1 2s infinite ease-in-out\",t.style.transformOrigin=\"50% 50%\",t.style.webkitTransformOrigin=\"50% 50%\",this._loadingDiv.appendChild(t),this._resizeLoadingUI(),window.addEventListener(\"resize\",this._resizeLoadingUI),this._loadingDiv.style.backgroundColor=this._loadingDivBackgroundColor,document.body.appendChild(this._loadingDiv),this._loadingDiv.style.opacity=\"1\"}},e.prototype.hideLoadingUI=function(){var e=this;if(this._loadingDiv){this._loadingDiv.style.opacity=\"0\",this._loadingDiv.addEventListener(\"transitionend\",(function(){e._loadingDiv&&(document.body.removeChild(e._loadingDiv),window.removeEventListener(\"resize\",e._resizeLoadingUI),e._loadingDiv=null)}))}},Object.defineProperty(e.prototype,\"loadingUIText\",{get:function(){return this._loadingText},set:function(e){this._loadingText=e,this._loadingTextDiv&&(this._loadingTextDiv.innerHTML=this._loadingText)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,\"loadingUIBackgroundColor\",{get:function(){return this._loadingDivBackgroundColor},set:function(e){this._loadingDivBackgroundColor=e,this._loadingDiv&&(this._loadingDiv.style.backgroundColor=this._loadingDivBackgroundColor)},enumerable:!0,configurable:!0}),e})(),tr.DefaultLoadingScreen=ir,(function(P){var A=(function(){function t(e,t,i){this.lengthComputable=e,this.loaded=t,this.total=i}return t.FromProgressEvent=function(e){return new t(e.lengthComputable,e.loaded,e.total)},t})();P.SceneLoaderProgressEvent=A;var e=(function(){function x(){}return Object.defineProperty(x,\"ForceFullSceneLoadingForIncremental\",{get:function(){return x._ForceFullSceneLoadingForIncremental},set:function(e){x._ForceFullSceneLoadingForIncremental=e},enumerable:!0,configurable:!0}),Object.defineProperty(x,\"ShowLoadingScreen\",{get:function(){return x._ShowLoadingScreen},set:function(e){x._ShowLoadingScreen=e},enumerable:!0,configurable:!0}),Object.defineProperty(x,\"loggingLevel\",{get:function(){return x._loggingLevel},set:function(e){x._loggingLevel=e},enumerable:!0,configurable:!0}),Object.defineProperty(x,\"CleanBoneMatrixWeights\",{get:function(){return x._CleanBoneMatrixWeights},set:function(e){x._CleanBoneMatrixWeights=e},enumerable:!0,configurable:!0}),x._getDefaultPlugin=function(){return x._registeredPlugins[\".babylon\"]},x._getPluginForExtension=function(e){var t=x._registeredPlugins[e];return t||(P.Tools.Warn(\"Unable to find a plugin to load \"+e+\" files. Trying to use .babylon default plugin. To load from a specific filetype (eg. gltf) see: http://doc.babylonjs.com/how_to/load_from_any_file_type\"),x._getDefaultPlugin())},x._getPluginForDirectLoad=function(e){for(var t in x._registeredPlugins){var i=x._registeredPlugins[t].plugin;if(i.canDirectLoad&&i.canDirectLoad(e))return x._registeredPlugins[t]}return x._getDefaultPlugin()},x._getPluginForFilename=function(e){var t=e.indexOf(\"?\");-1!==t&&(e=e.substring(0,t));var i=e.lastIndexOf(\".\"),r=e.substring(i,e.length).toLowerCase();return x._getPluginForExtension(r)},x._getDirectLoad=function(e){return\"data:\"===e.substr(0,5)?e.substr(5):null},x._loadData=function(e,i,r,t,n,o,s){var a,l=x._getDirectLoad(e.name),c=s?x._getPluginForExtension(s):l?x._getPluginForDirectLoad(e.name):x._getPluginForFilename(e.name);a=c.plugin.createPlugin?c.plugin.createPlugin():c.plugin;var h,u=c.isBinary;x.OnPluginActivatedObservable.notifyObservers(a);var d=function(e,t){i.isDisposed?n(\"Scene has been disposed\"):(i.database=h,r(a,e,t))},f=null,p=!1,_=a.onDisposeObservable;_&&_.add((function(){p=!0,f&&(f.abort(),f=null),o()}));var m=function(){p||(f=P.Tools.LoadFile(e.url,d,t?function(e){t(A.FromProgressEvent(e))}:void 0,h,u,(function(e,t){n(\"Failed to load scene.\"+(t?\" \"+t.message:\"\"),t)})))};if(l)return d(l),a;if(-1===e.rootUrl.indexOf(\"file:\")){var g=i.getEngine(),v=g.enableOfflineSupport;if(v){for(var y=!1,b=0,T=i.disableOfflineSupportExceptionRules;b<T.length;b++){if(T[b].test(e.url)){y=!0;break}}v=!y}v?h=new P.Database(e.url,m,g.disableManifestCheck):m()}else{var E=P.FilesInput.FilesToLoad[e.name.toLowerCase()];E?f=P.Tools.ReadFile(E,d,t,u):n(\"Unable to find file named \"+e.name)}return a},x._getFileInfo=function(e,t){var i,r;if(t){if(\"/\"===t.substr(0,1))return P.Tools.Error(\"Wrong sceneFilename parameter\"),null;i=e+t,r=t}else i=e,r=P.Tools.GetFilename(e),e=P.Tools.GetFolderPath(e);return{url:i,rootUrl:e,name:r}},x.GetPluginForExtension=function(e){return x._getPluginForExtension(e).plugin},x.IsPluginForExtensionAvailable=function(e){return!!x._registeredPlugins[e]},x.RegisterPlugin=function(t){if(\"string\"==typeof t.extensions){var e=t.extensions;x._registeredPlugins[e.toLowerCase()]={plugin:t,isBinary:!1}}else{var i=t.extensions;Object.keys(i).forEach((function(e){x._registeredPlugins[e.toLowerCase()]={plugin:t,isBinary:i[e].isBinary}}))}},x.ImportMesh=function(a,e,t,l,n,i,r,o){if(void 0===t&&(t=\"\"),void 0===l&&(l=P.Engine.LastCreatedScene),void 0===n&&(n=null),void 0===i&&(i=null),void 0===r&&(r=null),void 0===o&&(o=null),!l)return P.Tools.Error(\"No scene available to import mesh to\"),null;var c=x._getFileInfo(e,t);if(!c)return null;var s={};l._addPendingData(s);var h=function(){l._removePendingData(s)},u=function(e,t){var i=\"Unable to import meshes from \"+c.url+\": \"+e;r?r(l,i,t):P.Tools.Error(i),h()},d=i?function(e){try{i(e)}catch(e){u(\"Error in onProgress callback\",e)}}:void 0,f=function(e,t,i,r){if(l.importedMeshesFiles.push(c.url),n)try{n(e,t,i,r)}catch(e){u(\"Error in onSuccess callback\",e)}l._removePendingData(s)};return x._loadData(c,l,(function(t,e,i){if(t.rewriteRootURL&&(c.rootUrl=t.rewriteRootURL(c.rootUrl,i)),t.importMesh){var r=t,n=new Array,o=new Array,s=new Array;if(!r.importMesh(a,l,e,c.rootUrl,n,o,s,u))return;l.loadingPluginName=t.name,f(n,o,s,[])}else{t.importMeshAsync(a,l,e,c.rootUrl,d,c.name).then((function(e){l.loadingPluginName=t.name,f(e.meshes,e.particleSystems,e.skeletons,e.animationGroups)})).catch((function(e){u(e.message,e)}))}}),d,u,h,o)},x.ImportMeshAsync=function(e,t,i,o,s,a){return void 0===i&&(i=\"\"),void 0===o&&(o=P.Engine.LastCreatedScene),void 0===s&&(s=null),void 0===a&&(a=null),new Promise(function(n,r){x.ImportMesh(e,t,i,o,(function(e,t,i,r){n({meshes:e,particleSystems:t,skeletons:i,animationGroups:r})}),s,(function(e,t,i){r(i||new Error(t))}),a)})},x.Load=function(e,t,i,r,n,o,s){return void 0===r&&(r=null),void 0===n&&(n=null),void 0===o&&(o=null),void 0===s&&(s=null),x.Append(e,t,new P.Scene(i),r,n,o,s)},x.LoadAsync=function(e,i,n,o,s){return void 0===o&&(o=null),void 0===s&&(s=null),new Promise(function(t,r){x.Load(e,i,n,(function(e){t(e)}),o,(function(e,t,i){r(i||new Error(t))}),s)})},x.Append=function(e,t,r,i,n,o,s){if(void 0===t&&(t=\"\"),void 0===r&&(r=P.Engine.LastCreatedScene),void 0===i&&(i=null),void 0===n&&(n=null),void 0===o&&(o=null),void 0===s&&(s=null),!r)return P.Tools.Error(\"No scene available to append to\"),null;var a=x._getFileInfo(e,t);if(!a)return null;x.ShowLoadingScreen&&r.getEngine().displayLoadingUI();var l={};r._addPendingData(l);var c=function(){r._removePendingData(l),r.getEngine().hideLoadingUI()},h=function(e,t){var i=\"Unable to load from \"+a.url+(e?\": \"+e:\"\");o?o(r,i,t):P.Tools.Error(i),c()},u=n?function(e){try{n(e)}catch(e){h(\"Error in onProgress callback\",e)}}:void 0,d=function(){if(i)try{i(r)}catch(e){h(\"Error in onSuccess callback\",e)}r._removePendingData(l)};return x._loadData(a,r,(function(e,t,i){if(e.load){if(!e.load(r,t,a.rootUrl,h))return;r.loadingPluginName=e.name,d()}else{e.loadAsync(r,t,a.rootUrl,u,a.name).then((function(){r.loadingPluginName=e.name,d()})).catch((function(e){h(e.message,e)}))}x.ShowLoadingScreen&&r.executeWhenReady((function(){r.getEngine().hideLoadingUI()}))}),u,h,c,s)},x.AppendAsync=function(e,i,n,o,s){return void 0===i&&(i=\"\"),void 0===n&&(n=P.Engine.LastCreatedScene),void 0===o&&(o=null),void 0===s&&(s=null),new Promise(function(t,r){x.Append(e,i,n,(function(e){t(e)}),o,(function(e,t,i){r(i||new Error(t))}),s)})},x.LoadAssetContainer=function(e,t,n,i,r,o,s){if(void 0===t&&(t=\"\"),void 0===n&&(n=P.Engine.LastCreatedScene),void 0===i&&(i=null),void 0===r&&(r=null),void 0===o&&(o=null),void 0===s&&(s=null),!n)return P.Tools.Error(\"No scene available to load asset container to\"),null;var a=x._getFileInfo(e,t);if(!a)return null;var l={};n._addPendingData(l);var c=function(){n._removePendingData(l)},h=function(e,t){var i=\"Unable to load assets from \"+a.url+(e?\": \"+e:\"\");o?o(n,i,t):P.Tools.Error(i),c()},u=r?function(e){try{r(e)}catch(e){h(\"Error in onProgress callback\",e)}}:void 0,d=function(e){if(i)try{i(e)}catch(e){h(\"Error in onSuccess callback\",e)}n._removePendingData(l)};return x._loadData(a,n,(function(t,e,i){if(t.loadAssetContainer){var r=t.loadAssetContainer(n,e,a.rootUrl,h);if(!r)return;n.loadingPluginName=t.name,d(r)}else if(t.loadAssetContainerAsync){t.loadAssetContainerAsync(n,e,a.rootUrl,u,a.name).then((function(e){n.loadingPluginName=t.name,d(e)})).catch((function(e){h(e.message,e)}))}else h(\"LoadAssetContainer is not supported by this plugin. Plugin did not provide a loadAssetContainer or loadAssetContainerAsync method.\");x.ShowLoadingScreen&&n.executeWhenReady((function(){n.getEngine().hideLoadingUI()}))}),u,h,c,s)},x.LoadAssetContainerAsync=function(e,i,n,o,s){return void 0===i&&(i=\"\"),void 0===n&&(n=P.Engine.LastCreatedScene),void 0===o&&(o=null),void 0===s&&(s=null),new Promise(function(t,r){x.LoadAssetContainer(e,i,n,(function(e){t(e)}),o,(function(e,t,i){r(i||new Error(t))}),s)})},x._ForceFullSceneLoadingForIncremental=!1,x._ShowLoadingScreen=!0,x._CleanBoneMatrixWeights=!1,x.NO_LOGGING=0,x.MINIMAL_LOGGING=1,x.SUMMARY_LOGGING=2,x.DETAILED_LOGGING=3,x._loggingLevel=x.NO_LOGGING,x.OnPluginActivatedObservable=new P.Observable,x._registeredPlugins={},x})();P.SceneLoader=e})($a||($a={})),rr=$a||($a={}),nr=function(e,t,i,r){for(var n=0,o=t.materials.length;n<o;n++){var s=t.materials[n];if(s.id===e)return rr.Material.Parse(s,i,r)}return null},or=function(e,t,i){for(var r in t)if(e.name===t[r])return i.push(e.id),!0;return!(!e.parentId||-1===i.indexOf(e.parentId))&&(i.push(e.id),!0)},sr=function(e,t){return e+\" of \"+(t?t.file+\" from \"+t.name+\" version: \"+t.version+\", exporter version: \"+t.exporter_version:\"unknown\")},ar=function(e,t,i,r,n){void 0===n&&(n=!1);var o=new rr.AssetContainer(e),s=\"importScene has failed JSON parse\";try{var a=JSON.parse(t);s=\"\";var l,c,h=rr.SceneLoader.loggingLevel===rr.SceneLoader.DETAILED_LOGGING;if(void 0!==a.lights&&null!==a.lights)for(l=0,c=a.lights.length;l<c;l++){var u=a.lights[l],d=rr.Light.Parse(u,e);d&&(o.lights.push(d),s+=0===l?\"\\n\\tLights:\":\"\",s+=\"\\n\\t\\t\"+d.toString(h))}if(void 0!==a.animations&&null!==a.animations)for(l=0,c=a.animations.length;l<c;l++){var f=a.animations[l],p=rr.Animation.Parse(f);e.animations.push(p),o.animations.push(p),s+=0===l?\"\\n\\tAnimations:\":\"\",s+=\"\\n\\t\\t\"+p.toString(h)}if(void 0!==a.materials&&null!==a.materials)for(l=0,c=a.materials.length;l<c;l++){var _=a.materials[l],m=rr.Material.Parse(_,e,i);o.materials.push(m),s+=0===l?\"\\n\\tMaterials:\":\"\",s+=\"\\n\\t\\t\"+m.toString(h)}if(void 0!==a.multiMaterials&&null!==a.multiMaterials)for(l=0,c=a.multiMaterials.length;l<c;l++){var g=a.multiMaterials[l],v=rr.Material.ParseMultiMaterial(g,e);o.multiMaterials.push(v),s+=0===l?\"\\n\\tMultiMaterials:\":\"\",s+=\"\\n\\t\\t\"+v.toString(h)}if(void 0!==a.morphTargetManagers&&null!==a.morphTargetManagers)for(var y=0,b=a.morphTargetManagers;y<b.length;y++){var T=b[y];o.morphTargetManagers.push(rr.MorphTargetManager.Parse(T,e))}if(void 0!==a.skeletons&&null!==a.skeletons)for(l=0,c=a.skeletons.length;l<c;l++){var E=a.skeletons[l],x=rr.Skeleton.Parse(E,e);o.skeletons.push(x),s+=0===l?\"\\n\\tSkeletons:\":\"\",s+=\"\\n\\t\\t\"+x.toString(h)}var P=a.geometries;if(null!=P){var A=new Array,S=P.boxes;if(null!=S)for(l=0,c=S.length;l<c;l++){var M=S[l];A.push(rr.BoxGeometry.Parse(M,e))}var R=P.spheres;if(null!=R)for(l=0,c=R.length;l<c;l++){var C=R[l];A.push(rr.SphereGeometry.Parse(C,e))}var O=P.cylinders;if(null!=O)for(l=0,c=O.length;l<c;l++){var D=O[l];A.push(rr.CylinderGeometry.Parse(D,e))}var I=P.toruses;if(null!=I)for(l=0,c=I.length;l<c;l++){var w=I[l];A.push(rr.TorusGeometry.Parse(w,e))}var L=P.grounds;if(null!=L)for(l=0,c=L.length;l<c;l++){var F=L[l];A.push(rr.GroundGeometry.Parse(F,e))}var B=P.planes;if(null!=B)for(l=0,c=B.length;l<c;l++){var N=B[l];A.push(rr.PlaneGeometry.Parse(N,e))}var V=P.torusKnots;if(null!=V)for(l=0,c=V.length;l<c;l++){var U=V[l];A.push(rr.TorusKnotGeometry.Parse(U,e))}var z=P.vertexData;if(null!=z)for(l=0,c=z.length;l<c;l++){var G=z[l];A.push(rr.Geometry.Parse(G,e,i))}A.forEach((function(e){e&&o.geometries.push(e)}))}if(void 0!==a.transformNodes&&null!==a.transformNodes)for(l=0,c=a.transformNodes.length;l<c;l++){var k=a.transformNodes[l],W=rr.TransformNode.Parse(k,e,i);o.transformNodes.push(W)}if(void 0!==a.meshes&&null!==a.meshes)for(l=0,c=a.meshes.length;l<c;l++){var H=a.meshes[l],X=rr.Mesh.Parse(H,e,i);o.meshes.push(X),s+=0===l?\"\\n\\tMeshes:\":\"\",s+=\"\\n\\t\\t\"+X.toString(h)}if(void 0!==a.cameras&&null!==a.cameras)for(l=0,c=a.cameras.length;l<c;l++){var j=a.cameras[l],Y=rr.Camera.Parse(j,e);o.cameras.push(Y),s+=0===l?\"\\n\\tCameras:\":\"\",s+=\"\\n\\t\\t\"+Y.toString(h)}if(void 0!==a.animationGroups&&null!==a.animationGroups)for(l=0,c=a.animationGroups.length;l<c;l++){var K=a.animationGroups[l],Q=rr.AnimationGroup.Parse(K,e);o.animationGroups.push(Q),s+=0===l?\"\\n\\tAnimationGroups:\":\"\",s+=\"\\n\\t\\t\"+Q.toString(h)}for(l=0,c=e.cameras.length;l<c;l++){(Y=e.cameras[l])._waitingParentId&&(Y.parent=e.getLastEntryByID(Y._waitingParentId),Y._waitingParentId=null)}for(l=0,c=e.lights.length;l<c;l++){var Z=e.lights[l];Z&&Z._waitingParentId&&(Z.parent=e.getLastEntryByID(Z._waitingParentId),Z._waitingParentId=null)}for(l=0,c=e.transformNodes.length;l<c;l++){var q=e.transformNodes[l];q._waitingParentId&&(q.parent=e.getLastEntryByID(q._waitingParentId),q._waitingParentId=null)}for(l=0,c=e.meshes.length;l<c;l++){(X=e.meshes[l])._waitingParentId&&(X.parent=e.getLastEntryByID(X._waitingParentId),X._waitingParentId=null)}for(l=0,c=e.meshes.length;l<c;l++){var J=e.meshes[l];J._waitingFreezeWorldMatrix?(J.freezeWorldMatrix(),J._waitingFreezeWorldMatrix=null):J.computeWorldMatrix(!0)}for(l=0,c=e.lights.length;l<c;l++){var $=e.lights[l];if(0<$._excludedMeshesIds.length){for(var ee=0;ee<$._excludedMeshesIds.length;ee++){var te=e.getMeshByID($._excludedMeshesIds[ee]);te&&$.excludedMeshes.push(te)}$._excludedMeshesIds=[]}if(0<$._includedOnlyMeshesIds.length){for(var ie=0;ie<$._includedOnlyMeshesIds.length;ie++){var re=e.getMeshByID($._includedOnlyMeshesIds[ie]);re&&$.includedOnlyMeshes.push(re)}$._includedOnlyMeshesIds=[]}}for(rr.AbstractScene.Parse(a,e,o,i),l=0,c=e.meshes.length;l<c;l++){(X=e.meshes[l])._waitingActions&&(rr.ActionManager.Parse(X._waitingActions,X,e),X._waitingActions=null)}void 0!==a.actions&&null!==a.actions&&rr.ActionManager.Parse(a.actions,null,e),n||o.removeAllFromScene()}catch(e){var ne=sr(\"loadAssets\",a?a.producer:\"Unknown\")+s;if(!r)throw rr.Tools.Log(ne),e;r(ne,e)}finally{null!==s&&rr.SceneLoader.loggingLevel!==rr.SceneLoader.NO_LOGGING&&rr.Tools.Log(sr(\"loadAssets\",a?a.producer:\"Unknown\")+(rr.SceneLoader.loggingLevel!==rr.SceneLoader.MINIMAL_LOGGING?s:\"\"))}return o},rr.SceneLoader.RegisterPlugin({name:\"babylon.js\",extensions:\".babylon\",canDirectLoad:function(e){return-1!==e.indexOf(\"babylon\")},importMesh:function(e,i,t,r,n,o,s,a){var l=\"importMesh has failed JSON parse\";try{var c=JSON.parse(t);l=\"\";var h=rr.SceneLoader.loggingLevel===rr.SceneLoader.DETAILED_LOGGING;e?Array.isArray(e)||(e=[e]):e=null;var u=new Array;if(void 0!==c.meshes&&null!==c.meshes){var d,f,p,_=[],m=[];for(d=0,f=c.meshes.length;d<f;d++){var g=c.meshes[d];if(null===e||or(g,e,u)){if(null!==e&&delete e[e.indexOf(g.name)],void 0!==g.geometryId&&null!==g.geometryId&&void 0!==c.geometries&&null!==c.geometries){var v=!1;[\"boxes\",\"spheres\",\"cylinders\",\"toruses\",\"grounds\",\"planes\",\"torusKnots\",\"vertexData\"].forEach((function(t){!0!==v&&c.geometries[t]&&Array.isArray(c.geometries[t])&&c.geometries[t].forEach((function(e){if(e.id===g.geometryId){switch(t){case\"boxes\":rr.BoxGeometry.Parse(e,i);break;case\"spheres\":rr.SphereGeometry.Parse(e,i);break;case\"cylinders\":rr.CylinderGeometry.Parse(e,i);break;case\"toruses\":rr.TorusGeometry.Parse(e,i);break;case\"grounds\":rr.GroundGeometry.Parse(e,i);break;case\"planes\":rr.PlaneGeometry.Parse(e,i);break;case\"torusKnots\":rr.TorusKnotGeometry.Parse(e,i);break;case\"vertexData\":rr.Geometry.Parse(e,i,r)}v=!0}}))})),!1===v&&rr.Tools.Warn(\"Geometry not found for mesh \"+g.id)}if(g.materialId){var y=-1!==m.indexOf(g.materialId);if(!1===y&&void 0!==c.multiMaterials&&null!==c.multiMaterials)for(var b=0,T=c.multiMaterials.length;b<T;b++){var E=c.multiMaterials[b];if(E.id===g.materialId){for(var x=0,P=E.materials.length;x<P;x++){var A,S=E.materials[x];m.push(S),(A=nr(S,c,i,r))&&(l+=\"\\n\\tMaterial \"+A.toString(h))}m.push(E.id);var M=rr.Material.ParseMultiMaterial(E,i);M&&(y=!0,l+=\"\\n\\tMulti-Material \"+M.toString(h));break}}!1===y&&(m.push(g.materialId),(A=nr(g.materialId,c,i,r))?l+=\"\\n\\tMaterial \"+A.toString(h):rr.Tools.Warn(\"Material not found for mesh \"+g.id))}if(-1<g.skeletonId&&void 0!==c.skeletons&&null!==c.skeletons&&!1==-1<_.indexOf(g.skeletonId))for(var R=0,C=c.skeletons.length;R<C;R++){var O=c.skeletons[R];if(O.id===g.skeletonId){var D=rr.Skeleton.Parse(O,i);s.push(D),_.push(O.id),l+=\"\\n\\tSkeleton \"+D.toString(h)}}if(void 0!==c.morphTargetManagers&&null!==c.morphTargetManagers)for(var I=0,w=c.morphTargetManagers;I<w.length;I++){var L=w[I];rr.MorphTargetManager.Parse(L,i)}var F=rr.Mesh.Parse(g,i,r);n.push(F),l+=\"\\n\\tMesh \"+F.toString(h)}}for(d=0,f=i.meshes.length;d<f;d++)(p=i.meshes[d])._waitingParentId&&(p.parent=i.getLastEntryByID(p._waitingParentId),p._waitingParentId=null);for(d=0,f=i.meshes.length;d<f;d++)(p=i.meshes[d])._waitingFreezeWorldMatrix?(p.freezeWorldMatrix(),p._waitingFreezeWorldMatrix=null):p.computeWorldMatrix(!0)}if(void 0!==c.particleSystems&&null!==c.particleSystems){var B=rr.AbstractScene.GetIndividualParser(rr.SceneComponentConstants.NAME_PARTICLESYSTEM);if(B)for(d=0,f=c.particleSystems.length;d<f;d++){var N=c.particleSystems[d];-1!==u.indexOf(N.emitterId)&&o.push(B(N,i,r))}}return!0}catch(e){var V=sr(\"importMesh\",c?c.producer:\"Unknown\")+l;if(!a)throw rr.Tools.Log(V),e;a(V,e)}finally{null!==l&&rr.SceneLoader.loggingLevel!==rr.SceneLoader.NO_LOGGING&&rr.Tools.Log(sr(\"importMesh\",c?c.producer:\"Unknown\")+(rr.SceneLoader.loggingLevel!==rr.SceneLoader.MINIMAL_LOGGING?l:\"\"))}return!1},load:function(e,t,i,r){var n=\"importScene has failed JSON parse\";try{var o=JSON.parse(t);if(n=\"\",void 0!==o.useDelayedTextureLoading&&null!==o.useDelayedTextureLoading&&(e.useDelayedTextureLoading=o.useDelayedTextureLoading&&!rr.SceneLoader.ForceFullSceneLoadingForIncremental),void 0!==o.autoClear&&null!==o.autoClear&&(e.autoClear=o.autoClear),void 0!==o.clearColor&&null!==o.clearColor&&(e.clearColor=rr.Color4.FromArray(o.clearColor)),void 0!==o.ambientColor&&null!==o.ambientColor&&(e.ambientColor=rr.Color3.FromArray(o.ambientColor)),void 0!==o.gravity&&null!==o.gravity&&(e.gravity=rr.Vector3.FromArray(o.gravity)),o.fogMode&&0!==o.fogMode)switch(e.fogMode=o.fogMode,e.fogColor=rr.Color3.FromArray(o.fogColor),e.fogStart=o.fogStart,e.fogEnd=o.fogEnd,e.fogDensity=o.fogDensity,n+=\"\\tFog mode for scene: \",e.fogMode){case 1:n+=\"exp\\n\";break;case 2:n+=\"exp2\\n\";break;case 3:n+=\"linear\\n\"}if(o.physicsEnabled){var s;\"cannon\"===o.physicsEngine?s=new rr.CannonJSPlugin:\"oimo\"===o.physicsEngine&&(s=new rr.OimoJSPlugin),n=\"\\tPhysics engine \"+(o.physicsEngine?o.physicsEngine:\"oimo\")+\" enabled\\n\";var a=o.physicsGravity?rr.Vector3.FromArray(o.physicsGravity):null;e.enablePhysics(a,s)}if(void 0!==o.metadata&&null!==o.metadata&&(e.metadata=o.metadata),void 0!==o.collisionsEnabled&&null!==o.collisionsEnabled&&(e.collisionsEnabled=o.collisionsEnabled),e.workerCollisions=!!o.workerCollisions,!ar(e,t,i,r,!0))return!1;if(o.autoAnimate&&e.beginAnimation(e,o.autoAnimateFrom,o.autoAnimateTo,o.autoAnimateLoop,o.autoAnimateSpeed||1),void 0!==o.activeCameraID&&null!==o.activeCameraID&&e.setActiveCameraByID(o.activeCameraID),void 0!==o.environmentTexture&&null!==o.environmentTexture){if(o.environmentTextureType&&\"BABYLON.HDRCubeTexture\"===o.environmentTextureType){var l=o.environmentTextureSize?o.environmentTextureSize:128,c=new rr.HDRCubeTexture(i+o.environmentTexture,e,l);o.environmentTextureRotationY&&(c.rotationY=o.environmentTextureRotationY),e.environmentTexture=c}else{var h=rr.CubeTexture.CreateFromPrefilteredData(i+o.environmentTexture,e);o.environmentTextureRotationY&&(h.rotationY=o.environmentTextureRotationY),e.environmentTexture=h}if(!0===o.createDefaultSkybox){var u=void 0!==e.activeCamera&&null!==e.activeCamera?(e.activeCamera.maxZ-e.activeCamera.minZ)/2:1e3,d=o.skyboxBlurLevel||0;e.createDefaultSkybox(void 0,!0,u,d)}}return!0}catch(e){var f=sr(\"importScene\",o?o.producer:\"Unknown\")+n;if(!r)throw rr.Tools.Log(f),e;r(f,e)}finally{null!==n&&rr.SceneLoader.loggingLevel!==rr.SceneLoader.NO_LOGGING&&rr.Tools.Log(sr(\"importScene\",o?o.producer:\"Unknown\")+(rr.SceneLoader.loggingLevel!==rr.SceneLoader.MINIMAL_LOGGING?n:\"\"))}return!1},loadAssetContainer:function(e,t,i,r){return ar(e,t,i,r)}}),lr=$a||($a={}),cr=(function(){function n(e,t,i,r,n,o,s,a,l){this.onProcessFileCallback=function(){return!0},this._engine=e,this._currentScene=t,this._sceneLoadedCallback=i,this._progressCallback=r,this._additionalRenderLoopLogicCallback=n,this._textureLoadingCallback=o,this._startingProcessingFilesCallback=s,this._onReloadCallback=a,this._errorCallback=l}return n.prototype.monitorElementForDragNDrop=function(e){var t=this;e&&(this._elementToMonitor=e,this._dragEnterHandler=function(e){t.drag(e)},this._dragOverHandler=function(e){t.drag(e)},this._dropHandler=function(e){t.drop(e)},this._elementToMonitor.addEventListener(\"dragenter\",this._dragEnterHandler,!1),this._elementToMonitor.addEventListener(\"dragover\",this._dragOverHandler,!1),this._elementToMonitor.addEventListener(\"drop\",this._dropHandler,!1))},n.prototype.dispose=function(){this._elementToMonitor&&(this._elementToMonitor.removeEventListener(\"dragenter\",this._dragEnterHandler),this._elementToMonitor.removeEventListener(\"dragover\",this._dragOverHandler),this._elementToMonitor.removeEventListener(\"drop\",this._dropHandler))},n.prototype.renderFunction=function(){if(this._additionalRenderLoopLogicCallback&&this._additionalRenderLoopLogicCallback(),this._currentScene){if(this._textureLoadingCallback){var e=this._currentScene.getWaitingItemsCount();0<e&&this._textureLoadingCallback(e)}this._currentScene.render()}},n.prototype.drag=function(e){e.stopPropagation(),e.preventDefault()},n.prototype.drop=function(e){e.stopPropagation(),e.preventDefault(),this.loadFiles(e)},n.prototype._traverseFolder=function(e,n,o,s){var a=this,t=e.createReader(),l=e.fullPath.replace(/^\\//,\"\").replace(/(.+?)\\/?$/,\"$1/\");t.readEntries((function(e){o.count+=e.length;for(var t=0,i=e;t<i.length;t++){var r=i[t];r.isFile?r.file((function(e){e.correctName=l+e.name,n.push(e),0==--o.count&&s()})):r.isDirectory&&a._traverseFolder(r,n,o,s)}--o.count&&s()}))},n.prototype._processFiles=function(e){for(var t=0;t<e.length;t++){var i=e[t].correctName.toLowerCase(),r=i.split(\".\").pop();this.onProcessFileCallback(e[t],i,r)&&(\"babylon\"!==r&&\"stl\"!==r&&\"obj\"!==r&&\"gltf\"!==r&&\"glb\"!==r||-1!==i.indexOf(\".binary.babylon\")||-1!==i.indexOf(\".incremental.babylon\")||(this._sceneFileToLoad=e[t]),n.FilesToLoad[i]=e[t])}},n.prototype.loadFiles=function(e){var t=this;if(e&&e.dataTransfer&&e.dataTransfer.files&&(this._filesToLoad=e.dataTransfer.files),e&&e.target&&e.target.files&&(this._filesToLoad=e.target.files),this._filesToLoad&&0!==this._filesToLoad.length&&(this._startingProcessingFilesCallback&&this._startingProcessingFilesCallback(this._filesToLoad),this._filesToLoad&&0<this._filesToLoad.length)){for(var i=new Array,r=[],n=e.dataTransfer?e.dataTransfer.items:null,o=0;o<this._filesToLoad.length;o++){var s=this._filesToLoad[o],a=s.name.toLowerCase(),l=void 0;if(s.correctName=a,n){var c=n[o];c.getAsEntry?l=c.getAsEntry():c.webkitGetAsEntry&&(l=c.webkitGetAsEntry())}l&&l.isDirectory?r.push(l):i.push(s)}if(0===r.length)this._processFiles(i),this._processReload();else for(var h={count:r.length},u=0,d=r;u<d.length;u++){var f=d[u];this._traverseFolder(f,i,h,(function(){t._processFiles(i),0===h.count&&t._processReload()}))}}},n.prototype._processReload=function(){this._onReloadCallback?this._onReloadCallback(this._sceneFileToLoad):this.reload()},n.prototype.reload=function(){var t=this;this._sceneFileToLoad?(this._currentScene&&(0<lr.Tools.errorsCount&&lr.Tools.ClearLogCache(),this._engine.stopRenderLoop()),lr.SceneLoader.LoadAsync(\"file:\",this._sceneFileToLoad.name,this._engine,(function(e){t._progressCallback&&t._progressCallback(e)})).then((function(e){t._currentScene&&t._currentScene.dispose(),t._currentScene=e,t._sceneLoadedCallback&&t._sceneLoadedCallback(t._sceneFileToLoad,t._currentScene),t._currentScene.executeWhenReady((function(){t._engine.runRenderLoop((function(){t.renderFunction()}))}))})).catch((function(e){t._errorCallback&&t._errorCallback(t._sceneFileToLoad,t._currentScene,e.message)}))):lr.Tools.Error(\"Please provide a valid .babylon file.\")},n.FilesToLoad={},n})(),lr.FilesInput=cr,hr=$a||($a={}),ur=(function(){function n(){}return n.EnableFor=function(t){t._tags=t._tags||{},t.hasTags=function(){return n.HasTags(t)},t.addTags=function(e){return n.AddTagsTo(t,e)},t.removeTags=function(e){return n.RemoveTagsFrom(t,e)},t.matchesTagsQuery=function(e){return n.MatchesQuery(t,e)}},n.DisableFor=function(e){delete e._tags,delete e.hasTags,delete e.addTags,delete e.removeTags,delete e.matchesTagsQuery},n.HasTags=function(e){return!!e._tags&&!hr.Tools.IsEmpty(e._tags)},n.GetTags=function(e,t){if(void 0===t&&(t=!0),!e._tags)return null;if(t){var i=[];for(var r in e._tags)e._tags.hasOwnProperty(r)&&!0===e._tags[r]&&i.push(r);return i.join(\" \")}return e._tags},n.AddTagsTo=function(r,e){e&&(\"string\"==typeof e&&e.split(\" \").forEach((function(e,t,i){n._AddTagTo(r,e)})))},n._AddTagTo=function(e,t){\"\"!==(t=t.trim())&&\"true\"!==t&&\"false\"!==t&&(t.match(/[\\s]/)||t.match(/^([!]|([|]|[&]){2})/)||(n.EnableFor(e),e._tags[t]=!0))},n.RemoveTagsFrom=function(e,t){if(n.HasTags(e)){var i=t.split(\" \");for(var r in i)n._RemoveTagFrom(e,i[r])}},n._RemoveTagFrom=function(e,t){delete e._tags[t]},n.MatchesQuery=function(t,e){return void 0===e||(\"\"===e?n.HasTags(t):hr.AndOrNotEvaluator.Eval(e,(function(e){return n.HasTags(t)&&t._tags[e]})))},n})(),hr.Tags=ur,dr=$a||($a={}),fr=(function(){function c(){}return c.Eval=function(e,t){return\"true\"===(e=e.match(/\\([^\\(\\)]*\\)/g)?e.replace(/\\([^\\(\\)]*\\)/g,(function(e){return e=e.slice(1,e.length-1),c._HandleParenthesisContent(e,t)})):c._HandleParenthesisContent(e,t))||\"false\"!==e&&c.Eval(e,t)},c._HandleParenthesisContent=function(e,t){var i;t=t||function(e){return\"true\"===e};var r=e.split(\"||\");for(var n in r)if(r.hasOwnProperty(n)){var o=c._SimplifyNegation(r[n].trim()),s=o.split(\"&&\");if(1<s.length)for(var a=0;a<s.length;++a){var l=c._SimplifyNegation(s[a].trim());if(!(i=\"true\"!==l&&\"false\"!==l?\"!\"===l[0]?!t(l.substring(1)):t(l):\"true\"===l)){o=\"false\";break}}if(i||\"true\"===o){i=!0;break}i=\"true\"!==o&&\"false\"!==o?\"!\"===o[0]?!t(o.substring(1)):t(o):\"true\"===o}return i?\"true\":\"false\"},c._SimplifyNegation=function(e){return\"!true\"===(e=(e=e.replace(/^[\\s!]+/,(function(e){return(e=e.replace(/[\\s]/g,(function(){return\"\"}))).length%2?\"!\":\"\"}))).trim())?e=\"false\":\"!false\"===e&&(e=\"true\"),e},c})(),dr.AndOrNotEvaluator=fr,pr=$a||($a={}),_r=(function(){function c(e,t,i){void 0===i&&(i=!1);var r=this;this.idbFactory=window.indexedDB||window.mozIndexedDB||window.webkitIndexedDB||window.msIndexedDB,this.callbackManifestChecked=t,this.currentSceneUrl=c._ReturnFullUrlLocation(e),this.db=null,this._enableSceneOffline=!1,this._enableTexturesOffline=!1,this.manifestVersionFound=0,this.mustUpdateRessources=!1,this.hasReachedQuota=!1,c.IDBStorageEnabled?i?(this._enableSceneOffline=!0,this._enableTexturesOffline=!0,this.manifestVersionFound=1,pr.Tools.SetImmediate((function(){r.callbackManifestChecked(!0)}))):this._checkManifestFile():this.callbackManifestChecked(!0)}return Object.defineProperty(c.prototype,\"enableSceneOffline\",{get:function(){return this._enableSceneOffline},enumerable:!0,configurable:!0}),Object.defineProperty(c.prototype,\"enableTexturesOffline\",{get:function(){return this._enableTexturesOffline},enumerable:!0,configurable:!0}),c.prototype._checkManifestFile=function(){var i=this,r=function(){i._enableSceneOffline=!1,i._enableTexturesOffline=!1,i.callbackManifestChecked(!1)},n=!1,e=this.currentSceneUrl+\".manifest\",o=new XMLHttpRequest;navigator.onLine&&(n=!0,e=e+(null==e.match(/\\?/)?\"?\":\"&\")+Date.now()),o.open(\"GET\",e,!0),o.addEventListener(\"load\",(function(){if(200===o.status||pr.Tools.ValidateXHRData(o,1))try{var e=JSON.parse(o.response);i._enableSceneOffline=e.enableSceneOffline,i._enableTexturesOffline=e.enableTexturesOffline,e.version&&!isNaN(parseInt(e.version))&&(i.manifestVersionFound=e.version),i.callbackManifestChecked&&i.callbackManifestChecked(!0)}catch(e){r()}else r()}),!1),o.addEventListener(\"error\",(function(e){if(n){n=!1;var t=i.currentSceneUrl+\".manifest\";o.open(\"GET\",t,!0),o.send()}else r()}),!1);try{o.send()}catch(e){pr.Tools.Error(\"Error on XHR send request.\"),this.callbackManifestChecked(!1)}},c.prototype.openAsync=function(t,e){var i=this,r=function(){i.isSupported=!1,e&&e()};if(this.idbFactory&&(this._enableSceneOffline||this._enableTexturesOffline))if(this.db)t&&t();else{this.hasReachedQuota=!1,this.isSupported=!0;var n=this.idbFactory.open(\"babylonjs\",1);n.onerror=function(e){r()},n.onblocked=function(e){pr.Tools.Error(\"IDB request blocked. Please reload the page.\"),r()},n.onsuccess=function(e){i.db=n.result,t()},n.onupgradeneeded=function(e){if(i.db=e.target.result,i.db)try{i.db.createObjectStore(\"scenes\",{keyPath:\"sceneUrl\"}),i.db.createObjectStore(\"versions\",{keyPath:\"sceneUrl\"}),i.db.createObjectStore(\"textures\",{keyPath:\"textureUrl\"})}catch(e){pr.Tools.Error(\"Error while creating object stores. Exception: \"+e.message),r()}}}else this.isSupported=!1,e&&e()},c.prototype.loadImageFromDB=function(e,t){var i=this,r=c._ReturnFullUrlLocation(e),n=function(){i.hasReachedQuota||null===i.db?t.src=e:i._saveImageIntoDBAsync(r,t)};this.mustUpdateRessources?n():this._loadImageFromDBAsync(r,t,n)},c.prototype._loadImageFromDBAsync=function(r,n,o){if(this.isSupported&&null!==this.db){var s,e=this.db.transaction([\"textures\"]);e.onabort=function(e){n.src=r},e.oncomplete=function(e){var t;if(s){var i=window.URL||window.webkitURL;t=i.createObjectURL(s.data),n.onerror=function(){pr.Tools.Error(\"Error loading image from blob URL: \"+t+\" switching back to web url: \"+r),n.src=r},n.src=t}else o()};var t=e.objectStore(\"textures\").get(r);t.onsuccess=function(e){s=e.target.result},t.onerror=function(e){pr.Tools.Error(\"Error loading texture \"+r+\" from DB.\"),n.src=r}}else pr.Tools.Error(\"Error: IndexedDB not supported by your browser or BabylonJS Database is not open.\"),n.src=r},c.prototype._saveImageIntoDBAsync=function(r,n){var o=this;if(this.isSupported){var s=function(){var t;if(a){var i=window.URL||window.webkitURL;try{t=i.createObjectURL(a)}catch(e){t=i.createObjectURL(a)}}t&&(n.src=t)};if(c.IsUASupportingBlobStorage){var a,l=new XMLHttpRequest;l.open(\"GET\",r,!0),l.responseType=\"blob\",l.addEventListener(\"load\",(function(){if(200===l.status&&o.db){a=l.response;var e=o.db.transaction([\"textures\"],\"readwrite\");e.onabort=function(e){try{var t=(e.srcElement||e.target).error;t&&\"QuotaExceededError\"===t.name&&(o.hasReachedQuota=!0)}catch(e){}s()},e.oncomplete=function(e){s()};var t={textureUrl:r,data:a};try{var i=e.objectStore(\"textures\").put(t);i.onsuccess=function(e){},i.onerror=function(e){s()}}catch(e){25===e.code&&(c.IsUASupportingBlobStorage=!1),n.src=r}}else n.src=r}),!1),l.addEventListener(\"error\",(function(e){pr.Tools.Error(\"Error in XHR request in BABYLON.Database.\"),n.src=r}),!1),l.send()}else n.src=r}else pr.Tools.Error(\"Error: IndexedDB not supported by your browser or BabylonJS Database is not open.\"),n.src=r},c.prototype._checkVersionFromDB=function(e,t){var i=this;this._loadVersionFromDBAsync(e,t,(function(){i._saveVersionIntoDBAsync(e,t)}))},c.prototype._loadVersionFromDBAsync=function(t,i,r){var n,o=this;if(this.isSupported&&this.db)try{var e=this.db.transaction([\"versions\"]);e.oncomplete=function(e){n?o.manifestVersionFound!==n.data?(o.mustUpdateRessources=!0,r()):i(n.data):(o.mustUpdateRessources=!0,r())},e.onabort=function(e){i(-1)};var s=e.objectStore(\"versions\").get(t);s.onsuccess=function(e){n=e.target.result},s.onerror=function(e){pr.Tools.Error(\"Error loading version for scene \"+t+\" from DB.\"),i(-1)}}catch(e){pr.Tools.Error(\"Error while accessing 'versions' object store (READ OP). Exception: \"+e.message),i(-1)}else pr.Tools.Error(\"Error: IndexedDB not supported by your browser or BabylonJS Database is not open.\"),i(-1)},c.prototype._saveVersionIntoDBAsync=function(e,i){var r=this;if(this.isSupported&&!this.hasReachedQuota&&this.db)try{var t=this.db.transaction([\"versions\"],\"readwrite\");t.onabort=function(e){try{var t=e.srcElement.error;t&&\"QuotaExceededError\"===t.name&&(r.hasReachedQuota=!0)}catch(e){}i(-1)},t.oncomplete=function(e){i(r.manifestVersionFound)};var n={sceneUrl:e,data:this.manifestVersionFound},o=t.objectStore(\"versions\").put(n);o.onsuccess=function(e){},o.onerror=function(e){pr.Tools.Error(\"Error in DB add version request in BABYLON.Database.\")}}catch(e){pr.Tools.Error(\"Error while accessing 'versions' object store (WRITE OP). Exception: \"+e.message),i(-1)}else i(-1)},c.prototype.loadFileFromDB=function(e,t,i,r,n){var o=this,s=c._ReturnFullUrlLocation(e),a=function(){o._saveFileIntoDBAsync(s,t,i,n,r)};this._checkVersionFromDB(s,(function(e){-1!==e?o.mustUpdateRessources?o._saveFileIntoDBAsync(s,t,i,n,r):o._loadFileFromDBAsync(s,t,a,n):r&&r()}))},c.prototype._loadFileFromDBAsync=function(t,i,r,e){if(this.isSupported&&this.db){var n,o;n=-1!==t.indexOf(\".babylon\")?\"scenes\":\"textures\";var s=this.db.transaction([n]);s.oncomplete=function(e){o?i(o.data):r()},s.onabort=function(e){r()};var a=s.objectStore(n).get(t);a.onsuccess=function(e){o=e.target.result},a.onerror=function(e){pr.Tools.Error(\"Error loading file \"+t+\" from DB.\"),r()}}else pr.Tools.Error(\"Error: IndexedDB not supported by your browser or BabylonJS Database is not open.\"),i()},c.prototype._saveFileIntoDBAsync=function(r,n,e,o,s){var a=this;if(this.isSupported){var l;l=-1!==r.indexOf(\".babylon\")?\"scenes\":\"textures\";var c,h=new XMLHttpRequest;h.open(\"GET\",r+\"?\"+Date.now(),!0),o&&(h.responseType=\"arraybuffer\"),e&&(h.onprogress=e),h.addEventListener(\"load\",(function(){if(200===h.status||h.status<400&&pr.Tools.ValidateXHRData(h,o?6:1))if(c=o?h.response:h.responseText,!a.hasReachedQuota&&a.db){var e,t=a.db.transaction([l],\"readwrite\");t.onabort=function(e){try{var t=e.srcElement.error;t&&\"QuotaExceededError\"===t.name&&(a.hasReachedQuota=!0)}catch(e){}n(c)},t.oncomplete=function(e){n(c)},e=\"scenes\"===l?{sceneUrl:r,data:c,version:a.manifestVersionFound}:{textureUrl:r,data:c};try{var i=t.objectStore(l).put(e);i.onsuccess=function(e){},i.onerror=function(e){pr.Tools.Error(\"Error in DB add file request in BABYLON.Database.\")}}catch(e){n(c)}}else n(c);else 400<=h.status&&s?s(h):n()}),!1),h.addEventListener(\"error\",(function(e){pr.Tools.Error(\"error on XHR request.\"),n()}),!1),h.send()}else pr.Tools.Error(\"Error: IndexedDB not supported by your browser or BabylonJS Database is not open.\"),n()},c.IsUASupportingBlobStorage=!0,c.IDBStorageEnabled=!0,c._ParseURL=function(e){var t=(document.createElement(\"a\").href=e).substring(0,e.lastIndexOf(\"#\")),i=e.substring(t.lastIndexOf(\"/\")+1,e.length);return e.substring(0,e.indexOf(i,0))},c._ReturnFullUrlLocation=function(e){return-1===e.indexOf(\"http:/\")&&-1===e.indexOf(\"https:/\")?c._ParseURL(window.location.href)+e:e},c})(),pr.Database=_r,mr=$a||($a={}),gr=(function(){function i(){this._isEnabled=!0,this.leftColor=mr.Color3.White(),this.rightColor=mr.Color3.Black(),this.bias=0,this.power=1}return Object.defineProperty(i.prototype,\"isEnabled\",{get:function(){return this._isEnabled},set:function(e){this._isEnabled!==e&&(this._isEnabled=e,mr.Engine.MarkAllMaterialsAsDirty(mr.Material.FresnelDirtyFlag|mr.Material.MiscDirtyFlag))},enumerable:!0,configurable:!0}),i.prototype.clone=function(){var e=new i;return mr.Tools.DeepCopy(this,e),e},i.prototype.serialize=function(){var e={};return e.isEnabled=this.isEnabled,e.leftColor=this.leftColor.asArray(),e.rightColor=this.rightColor.asArray(),e.bias=this.bias,e.power=this.power,e},i.Parse=function(e){var t=new i;return t.isEnabled=e.isEnabled,t.leftColor=mr.Color3.FromArray(e.leftColor),t.rightColor=mr.Color3.FromArray(e.rightColor),t.bias=e.bias,t.power=e.power||1,t},i})(),mr.FresnelParameters=gr,vr=$a||($a={}),yr=(function(n){function s(e,t){var i=n.call(this,e,t,!0)||this;return t.multiMaterials.push(i),i.subMaterials=new Array,i.storeEffectOnSubMeshes=!0,i}return T(s,n),Object.defineProperty(s.prototype,\"subMaterials\",{get:function(){return this._subMaterials},set:function(e){this._subMaterials=e,this._hookArray(e)},enumerable:!0,configurable:!0}),s.prototype._hookArray=function(r){var n=this,o=r.push;r.push=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var i=o.apply(r,e);return n._markAllSubMeshesAsTexturesDirty(),i};var s=r.splice;r.splice=function(e,t){var i=s.apply(r,[e,t]);return n._markAllSubMeshesAsTexturesDirty(),i}},s.prototype.getSubMaterial=function(e){return e<0||e>=this.subMaterials.length?this.getScene().defaultMaterial:this.subMaterials[e]},s.prototype.getActiveTextures=function(){var e;return(e=n.prototype.getActiveTextures.call(this)).concat.apply(e,this.subMaterials.map((function(e){return e?e.getActiveTextures():[]})))},s.prototype.getClassName=function(){return\"MultiMaterial\"},s.prototype.isReadyForSubMesh=function(e,t,i){for(var r=0;r<this.subMaterials.length;r++){var n=this.subMaterials[r];if(n){if(n.storeEffectOnSubMeshes){if(!n.isReadyForSubMesh(e,t,i))return!1;continue}if(!n.isReady(e))return!1}}return!0},s.prototype.clone=function(e,t){for(var i=new s(e,this.getScene()),r=0;r<this.subMaterials.length;r++){var n=null,o=this.subMaterials[r];n=t&&o?o.clone(e+\"-\"+o.name):this.subMaterials[r],i.subMaterials.push(n)}return i},s.prototype.serialize=function(){var e={};e.name=this.name,e.id=this.id,vr.Tags&&(e.tags=vr.Tags.GetTags(this)),e.materials=[];for(var t=0;t<this.subMaterials.length;t++){var i=this.subMaterials[t];i?e.materials.push(i.id):e.materials.push(null)}return e},s.prototype.dispose=function(e,t){var i=this.getScene();if(i){var r=i.multiMaterials.indexOf(this);0<=r&&i.multiMaterials.splice(r,1),n.prototype.dispose.call(this,e,t)}},s})(vr.Material),vr.MultiMaterial=yr,br=$a||($a={}),Tr=(function(){function e(){this.touchAngularSensibility=2e5,this.touchMoveSensibility=250,this._offsetX=null,this._offsetY=null,this._pointerPressed=new Array}return e.prototype.attachControl=function(e,n){var o=this,s=null;void 0===this._pointerInput&&(this._onLostFocus=function(e){o._offsetX=null,o._offsetY=null},this._pointerInput=function(e,t){var i=e.event;if(\"mouse\"!==i.pointerType)if(e.type===br.PointerEventTypes.POINTERDOWN){if(n||i.preventDefault(),o._pointerPressed.push(i.pointerId),1!==o._pointerPressed.length)return;s={x:i.clientX,y:i.clientY}}else if(e.type===br.PointerEventTypes.POINTERUP){if(n||i.preventDefault(),-1===(r=o._pointerPressed.indexOf(i.pointerId)))return;if(o._pointerPressed.splice(r,1),0!=r)return;s=null,o._offsetX=null,o._offsetY=null}else if(e.type===br.PointerEventTypes.POINTERMOVE){if(n||i.preventDefault(),!s)return;var r;if(0!=(r=o._pointerPressed.indexOf(i.pointerId)))return;o._offsetX=i.clientX-s.x,o._offsetY=-(i.clientY-s.y)}}),this._observer=this.camera.getScene().onPointerObservable.add(this._pointerInput,br.PointerEventTypes.POINTERDOWN|br.PointerEventTypes.POINTERUP|br.PointerEventTypes.POINTERMOVE),this._onLostFocus&&e.addEventListener(\"blur\",this._onLostFocus)},e.prototype.detachControl=function(e){this._pointerInput&&e&&(this._observer&&(this.camera.getScene().onPointerObservable.remove(this._observer),this._observer=null),this._onLostFocus&&(e.removeEventListener(\"blur\",this._onLostFocus),this._onLostFocus=null),this._pointerPressed=[],this._offsetX=null,this._offsetY=null)},e.prototype.checkInputs=function(){if(this._offsetX&&this._offsetY){var e=this.camera;if(e.cameraRotation.y+=this._offsetX/this.touchAngularSensibility,1<this._pointerPressed.length)e.cameraRotation.x+=-this._offsetY/this.touchAngularSensibility;else{var t=e._computeLocalCameraSpeed(),i=new br.Vector3(0,0,t*this._offsetY/this.touchMoveSensibility);br.Matrix.RotationYawPitchRollToRef(e.rotation.y,e.rotation.x,0,e._cameraRotationMatrix),e.cameraDirection.addInPlace(br.Vector3.TransformCoordinates(i,e._cameraRotationMatrix))}}},e.prototype.getClassName=function(){return\"FreeCameraTouchInput\"},e.prototype.getSimpleName=function(){return\"touch\"},b([br.serialize()],e.prototype,\"touchAngularSensibility\",void 0),b([br.serialize()],e.prototype,\"touchMoveSensibility\",void 0),e})(),br.FreeCameraTouchInput=Tr,br.CameraInputTypes.FreeCameraTouchInput=Tr,(function(i){i.Node.AddNodeConstructor(\"TouchCamera\",(function(e,t){return function(){return new r(e,i.Vector3.Zero(),t)}}));var r=(function(n){function e(e,t,i){var r=n.call(this,e,t,i)||this;return r.inputs.addTouch(),r._setupInputs(),r}return T(e,n),Object.defineProperty(e.prototype,\"touchAngularSensibility\",{get:function(){var e=this.inputs.attached.touch;return e?e.touchAngularSensibility:0},set:function(e){var t=this.inputs.attached.touch;t&&(t.touchAngularSensibility=e)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,\"touchMoveSensibility\",{get:function(){var e=this.inputs.attached.touch;return e?e.touchMoveSensibility:0},set:function(e){var t=this.inputs.attached.touch;t&&(t.touchMoveSensibility=e)},enumerable:!0,configurable:!0}),e.prototype.getClassName=function(){return\"TouchCamera\"},e.prototype._setupInputs=function(){var e=this.inputs.attached.mouse;e&&(e.touchEnabled=!1)},e})(i.FreeCamera);i.TouchCamera=r})($a||($a={})),Er=$a||($a={}),xr=(function(h){function i(e,t,i,r,n,o,s){void 0===n&&(n=null),void 0===o&&(o=!0),void 0===s&&(s=!1);var a=h.call(this,null,r,!o)||this;a.isCube=s,a.isEnabled=!0,a.autoClear=!0,a.onGeneratedObservable=new Er.Observable,a._textures={},a._currentRefreshId=-1,a._refreshRate=1,a._vertexBuffers={},a._uniforms=new Array,a._samplers=new Array,a._floats={},a._ints={},a._floatsArrays={},a._colors3={},a._colors4={},a._vectors2={},a._vectors3={},a._matrices={},a._fallbackTextureUsed=!1,a._cachedDefines=\"\",a._contentUpdateId=-1;var l=(r=a.getScene())._getComponent(Er.SceneComponentConstants.NAME_PROCEDURALTEXTURE);l||(l=new Er.ProceduralTextureSceneComponent(r),r._addComponent(l)),r.proceduralTextures.push(a),a._engine=r.getEngine(),a.name=e,a.isRenderTarget=!0,a._size=t,a._generateMipMaps=o,a.setFragment(i),a._fallbackTexture=n,s?(a._texture=a._engine.createRenderTargetCubeTexture(t,{generateMipMaps:o,generateDepthBuffer:!1,generateStencilBuffer:!1}),a.setFloat(\"face\",0)):a._texture=a._engine.createRenderTargetTexture(t,{generateMipMaps:o,generateDepthBuffer:!1,generateStencilBuffer:!1});var c=[];return c.push(1,1),c.push(-1,1),c.push(-1,-1),c.push(1,-1),a._vertexBuffers[Er.VertexBuffer.PositionKind]=new Er.VertexBuffer(a._engine,c,Er.VertexBuffer.PositionKind,!1,!1,2),a._createIndexBuffer(),a}return T(i,h),i.prototype.getContent=function(){return this._contentData&&this._currentRefreshId==this._contentUpdateId||(this._contentData=this.readPixels(0,0,this._contentData),this._contentUpdateId=this._currentRefreshId),this._contentData},i.prototype._createIndexBuffer=function(){var e=this._engine,t=[];t.push(0),t.push(1),t.push(2),t.push(0),t.push(2),t.push(3),this._indexBuffer=e.createIndexBuffer(t)},i.prototype._rebuild=function(){var e=this._vertexBuffers[Er.VertexBuffer.PositionKind];e&&e._rebuild(),this._createIndexBuffer(),this.refreshRate===Er.RenderTargetTexture.REFRESHRATE_RENDER_ONCE&&(this.refreshRate=Er.RenderTargetTexture.REFRESHRATE_RENDER_ONCE)},i.prototype.reset=function(){void 0!==this._effect&&this._engine._releaseEffect(this._effect)},i.prototype._getDefines=function(){return\"\"},i.prototype.isReady=function(){var e,t=this,i=this._engine;if(!this._fragment)return!1;if(this._fallbackTextureUsed)return!0;var r=this._getDefines();return!(!this._effect||r!==this._cachedDefines||!this._effect.isReady())||(e=void 0!==this._fragment.fragmentElement?{vertex:\"procedural\",fragmentElement:this._fragment.fragmentElement}:{vertex:\"procedural\",fragment:this._fragment},this._cachedDefines=r,this._effect=i.createEffect(e,[Er.VertexBuffer.PositionKind],this._uniforms,this._samplers,r,void 0,void 0,(function(){t.releaseInternalTexture(),t._fallbackTexture&&(t._texture=t._fallbackTexture._texture,t._texture&&t._texture.incrementReferences()),t._fallbackTextureUsed=!0})),this._effect.isReady())},i.prototype.resetRefreshCounter=function(){this._currentRefreshId=-1},i.prototype.setFragment=function(e){this._fragment=e},Object.defineProperty(i.prototype,\"refreshRate\",{get:function(){return this._refreshRate},set:function(e){this._refreshRate=e,this.resetRefreshCounter()},enumerable:!0,configurable:!0}),i.prototype._shouldRender=function(){return this.isEnabled&&this.isReady()&&this._texture?!this._fallbackTextureUsed&&(-1===this._currentRefreshId?(this._currentRefreshId=1,!0):this.refreshRate===this._currentRefreshId?(this._currentRefreshId=1,!0):(this._currentRefreshId++,!1)):(this._texture&&(this._texture.isReady=!1),!1)},i.prototype.getRenderSize=function(){return this._size},i.prototype.resize=function(e,t){this._fallbackTextureUsed||(this.releaseInternalTexture(),this._texture=this._engine.createRenderTargetTexture(e,t),this._size=e,this._generateMipMaps=t)},i.prototype._checkUniform=function(e){-1===this._uniforms.indexOf(e)&&this._uniforms.push(e)},i.prototype.setTexture=function(e,t){return-1===this._samplers.indexOf(e)&&this._samplers.push(e),this._textures[e]=t,this},i.prototype.setFloat=function(e,t){return this._checkUniform(e),this._floats[e]=t,this},i.prototype.setInt=function(e,t){return this._checkUniform(e),this._ints[e]=t,this},i.prototype.setFloats=function(e,t){return this._checkUniform(e),this._floatsArrays[e]=t,this},i.prototype.setColor3=function(e,t){return this._checkUniform(e),this._colors3[e]=t,this},i.prototype.setColor4=function(e,t){return this._checkUniform(e),this._colors4[e]=t,this},i.prototype.setVector2=function(e,t){return this._checkUniform(e),this._vectors2[e]=t,this},i.prototype.setVector3=function(e,t){return this._checkUniform(e),this._vectors3[e]=t,this},i.prototype.setMatrix=function(e,t){return this._checkUniform(e),this._matrices[e]=t,this},i.prototype.render=function(e){var t=this.getScene();if(t){var i=this._engine;for(var r in i.enableEffect(this._effect),i.setState(!1),this._textures)this._effect.setTexture(r,this._textures[r]);for(r in this._ints)this._effect.setInt(r,this._ints[r]);for(r in this._floats)this._effect.setFloat(r,this._floats[r]);for(r in this._floatsArrays)this._effect.setArray(r,this._floatsArrays[r]);for(r in this._colors3)this._effect.setColor3(r,this._colors3[r]);for(r in this._colors4){var n=this._colors4[r];this._effect.setFloat4(r,n.r,n.g,n.b,n.a)}for(r in this._vectors2)this._effect.setVector2(r,this._vectors2[r]);for(r in this._vectors3)this._effect.setVector3(r,this._vectors3[r]);for(r in this._matrices)this._effect.setMatrix(r,this._matrices[r]);if(this._texture){if(this.isCube)for(var o=0;o<6;o++)i.bindFramebuffer(this._texture,o,void 0,void 0,!0),i.bindBuffers(this._vertexBuffers,this._indexBuffer,this._effect),this._effect.setFloat(\"face\",o),this.autoClear&&i.clear(t.clearColor,!0,!1,!1),i.drawElementsType(Er.Material.TriangleFillMode,0,6),5===o&&i.generateMipMapsForCubemap(this._texture);else i.bindFramebuffer(this._texture,0,void 0,void 0,!0),i.bindBuffers(this._vertexBuffers,this._indexBuffer,this._effect),this.autoClear&&i.clear(t.clearColor,!0,!1,!1),i.drawElementsType(Er.Material.TriangleFillMode,0,6);i.unBindFramebuffer(this._texture,this.isCube),this.onGenerated&&this.onGenerated(),this.onGeneratedObservable.notifyObservers(this)}}},i.prototype.clone=function(){var e=this.getSize(),t=new i(this.name,e.width,this._fragment,this.getScene(),this._fallbackTexture,this._generateMipMaps);return t.hasAlpha=this.hasAlpha,t.level=this.level,t.coordinatesMode=this.coordinatesMode,t},i.prototype.dispose=function(){var e=this.getScene();if(e){var t=e.proceduralTextures.indexOf(this);0<=t&&e.proceduralTextures.splice(t,1);var i=this._vertexBuffers[Er.VertexBuffer.PositionKind];i&&(i.dispose(),this._vertexBuffers[Er.VertexBuffer.PositionKind]=null),this._indexBuffer&&this._engine._releaseBuffer(this._indexBuffer)&&(this._indexBuffer=null),h.prototype.dispose.call(this)}},b([Er.serialize()],i.prototype,\"isEnabled\",void 0),b([Er.serialize()],i.prototype,\"autoClear\",void 0),b([Er.serialize()],i.prototype,\"_generateMipMaps\",void 0),b([Er.serialize()],i.prototype,\"_size\",void 0),b([Er.serialize()],i.prototype,\"refreshRate\",null),i})(Er.Texture),Er.ProceduralTexture=xr,Pr=$a||($a={}),Ar=(function(){function e(e){this.name=Pr.SceneComponentConstants.NAME_PROCEDURALTEXTURE,this.scene=e,this.scene.proceduralTextures=new Array,e.layers=new Array}return e.prototype.register=function(){this.scene._beforeClearStage.registerStep(Pr.SceneComponentConstants.STEP_BEFORECLEAR_PROCEDURALTEXTURE,this,this._beforeClear)},e.prototype.rebuild=function(){},e.prototype.dispose=function(){},e.prototype._beforeClear=function(){if(this.scene.proceduralTexturesEnabled){Pr.Tools.StartPerformanceCounter(\"Procedural textures\",0<this.scene.proceduralTextures.length);for(var e=0;e<this.scene.proceduralTextures.length;e++){var t=this.scene.proceduralTextures[e];t._shouldRender()&&t.render()}Pr.Tools.EndPerformanceCounter(\"Procedural textures\",0<this.scene.proceduralTextures.length)}},e})(),Pr.ProceduralTextureSceneComponent=Ar,Sr=$a||($a={}),Mr=(function(a){function e(e,t,i,r,n,o){var s=a.call(this,e,i,null,r,n,o)||this;return s._animate=!0,s._time=0,s._texturePath=t,s._loadJson(t),s.refreshRate=1,s}return T(e,a),e.prototype._loadJson=function(e){var t=this,i=function(){Sr.Tools.Log(\"No config file found in \"+e+\" trying to use ShadersStore or DOM element\");try{t.setFragment(t._texturePath)}catch(e){Sr.Tools.Error(\"No json or ShaderStore or DOM element found for CustomProceduralTexture\")}},r=e+\"/config.json\",n=new XMLHttpRequest;n.open(\"GET\",r,!0),n.addEventListener(\"load\",(function(){if(200===n.status||Sr.Tools.ValidateXHRData(n,1))try{t._config=JSON.parse(n.response),t.updateShaderUniforms(),t.updateTextures(),t.setFragment(t._texturePath+\"/custom\"),t._animate=t._config.animate,t.refreshRate=t._config.refreshrate}catch(e){i()}else i()}),!1),n.addEventListener(\"error\",(function(){i()}),!1);try{n.send()}catch(e){Sr.Tools.Error(\"CustomProceduralTexture: Error on XHR send request.\")}},e.prototype.isReady=function(){if(!a.prototype.isReady.call(this))return!1;for(var e in this._textures){if(!this._textures[e].isReady())return!1}return!0},e.prototype.render=function(e){var t=this.getScene();this._animate&&t&&(this._time+=.03*t.getAnimationRatio(),this.updateShaderUniforms()),a.prototype.render.call(this,e)},e.prototype.updateTextures=function(){for(var e=0;e<this._config.sampler2Ds.length;e++)this.setTexture(this._config.sampler2Ds[e].sample2Dname,new Sr.Texture(this._texturePath+\"/\"+this._config.sampler2Ds[e].textureRelativeUrl,this.getScene()))},e.prototype.updateShaderUniforms=function(){if(this._config)for(var e=0;e<this._config.uniforms.length;e++){var t=this._config.uniforms[e];switch(t.type){case\"float\":this.setFloat(t.name,t.value);break;case\"color3\":this.setColor3(t.name,new Sr.Color3(t.r,t.g,t.b));break;case\"color4\":this.setColor4(t.name,new Sr.Color4(t.r,t.g,t.b,t.a));break;case\"vector2\":this.setVector2(t.name,new Sr.Vector2(t.x,t.y));break;case\"vector3\":this.setVector3(t.name,new Sr.Vector3(t.x,t.y,t.z))}}this.setFloat(\"time\",this._time)},Object.defineProperty(e.prototype,\"animate\",{get:function(){return this._animate},set:function(e){this._animate=e},enumerable:!0,configurable:!0}),e})(Sr.ProceduralTexture),Sr.CustomProceduralTexture=Mr,Rr=$a||($a={}),Cr=(function(){function e(){this.gamepadAngularSensibility=200,this.gamepadMoveSensibility=40,this._cameraTransform=Rr.Matrix.Identity(),this._deltaTransform=Rr.Vector3.Zero(),this._vector3=Rr.Vector3.Zero(),this._vector2=Rr.Vector2.Zero()}return e.prototype.attachControl=function(e,t){var i=this,r=this.camera.getScene().gamepadManager;this._onGamepadConnectedObserver=r.onGamepadConnectedObservable.add((function(e){e.type!==Rr.Gamepad.POSE_ENABLED&&(i.gamepad&&e.type!==Rr.Gamepad.XBOX||(i.gamepad=e))})),this._onGamepadDisconnectedObserver=r.onGamepadDisconnectedObservable.add((function(e){i.gamepad===e&&(i.gamepad=null)})),this.gamepad=r.getGamepadByType(Rr.Gamepad.XBOX)},e.prototype.detachControl=function(e){this.camera.getScene().gamepadManager.onGamepadConnectedObservable.remove(this._onGamepadConnectedObserver),this.camera.getScene().gamepadManager.onGamepadDisconnectedObservable.remove(this._onGamepadDisconnectedObserver),this.gamepad=null},e.prototype.checkInputs=function(){if(this.gamepad&&this.gamepad.leftStick){var e=this.camera,t=this.gamepad.leftStick,i=t.x/this.gamepadMoveSensibility,r=t.y/this.gamepadMoveSensibility;t.x=.005<Math.abs(i)?0+i:0,t.y=.005<Math.abs(r)?0+r:0;var n=this.gamepad.rightStick;if(n){var o=n.x/this.gamepadAngularSensibility,s=n.y/this.gamepadAngularSensibility;n.x=.001<Math.abs(o)?0+o:0,n.y=.001<Math.abs(s)?0+s:0}else n={x:0,y:0};e.rotationQuaternion?e.rotationQuaternion.toRotationMatrix(this._cameraTransform):Rr.Matrix.RotationYawPitchRollToRef(e.rotation.y,e.rotation.x,0,this._cameraTransform);var a=50*e._computeLocalCameraSpeed();this._vector3.copyFromFloats(t.x*a,0,-t.y*a),Rr.Vector3.TransformCoordinatesToRef(this._vector3,this._cameraTransform,this._deltaTransform),e.cameraDirection.addInPlace(this._deltaTransform),this._vector2.copyFromFloats(n.y,n.x),e.cameraRotation.addInPlace(this._vector2)}},e.prototype.getClassName=function(){return\"FreeCameraGamepadInput\"},e.prototype.getSimpleName=function(){return\"gamepad\"},b([Rr.serialize()],e.prototype,\"gamepadAngularSensibility\",void 0),b([Rr.serialize()],e.prototype,\"gamepadMoveSensibility\",void 0),e})(),Rr.FreeCameraGamepadInput=Cr,Rr.CameraInputTypes.FreeCameraGamepadInput=Cr,Or=$a||($a={}),Dr=(function(){function e(){this.gamepadRotationSensibility=80,this.gamepadMoveSensibility=40}return e.prototype.attachControl=function(e,t){var i=this,r=this.camera.getScene().gamepadManager;this._onGamepadConnectedObserver=r.onGamepadConnectedObservable.add((function(e){e.type!==Or.Gamepad.POSE_ENABLED&&(i.gamepad&&e.type!==Or.Gamepad.XBOX||(i.gamepad=e))})),this._onGamepadDisconnectedObserver=r.onGamepadDisconnectedObservable.add((function(e){i.gamepad===e&&(i.gamepad=null)})),this.gamepad=r.getGamepadByType(Or.Gamepad.XBOX)},e.prototype.detachControl=function(e){this.camera.getScene().gamepadManager.onGamepadConnectedObservable.remove(this._onGamepadConnectedObserver),this.camera.getScene().gamepadManager.onGamepadDisconnectedObservable.remove(this._onGamepadDisconnectedObserver),this.gamepad=null},e.prototype.checkInputs=function(){if(this.gamepad){var e=this.camera,t=this.gamepad.rightStick;if(t){if(0!=t.x){var i=t.x/this.gamepadRotationSensibility;0!=i&&.005<Math.abs(i)&&(e.inertialAlphaOffset+=i)}if(0!=t.y){var r=t.y/this.gamepadRotationSensibility;0!=r&&.005<Math.abs(r)&&(e.inertialBetaOffset+=r)}}var n=this.gamepad.leftStick;if(n&&0!=n.y){var o=n.y/this.gamepadMoveSensibility;0!=o&&.005<Math.abs(o)&&(this.camera.inertialRadiusOffset-=o)}}},e.prototype.getClassName=function(){return\"ArcRotateCameraGamepadInput\"},e.prototype.getSimpleName=function(){return\"gamepad\"},b([Or.serialize()],e.prototype,\"gamepadRotationSensibility\",void 0),b([Or.serialize()],e.prototype,\"gamepadMoveSensibility\",void 0),e})(),Or.ArcRotateCameraGamepadInput=Dr,Or.CameraInputTypes.ArcRotateCameraGamepadInput=Dr,Ir=$a||($a={}),wr=(function(){function e(e){var n=this;this._scene=e,this._babylonGamepads=[],this._oneGamepadConnected=!1,this._isMonitoring=!1,this.onGamepadDisconnectedObservable=new Ir.Observable,Ir.Tools.IsWindowObjectExist()?(this._gamepadEventSupported=\"GamepadEvent\"in window,this._gamepadSupport=navigator.getGamepads||navigator.webkitGetGamepads||navigator.msGetGamepads||navigator.webkitGamepads):this._gamepadEventSupported=!1,this.onGamepadConnectedObservable=new Ir.Observable(function(e){for(var t in n._babylonGamepads){var i=n._babylonGamepads[t];i&&i._isConnected&&n.onGamepadConnectedObservable.notifyObserver(e,i)}}),this._onGamepadConnectedEvent=function(e){var t,i=e.gamepad;i.index in n._babylonGamepads&&n._babylonGamepads[i.index].isConnected||(n._babylonGamepads[i.index]?((t=n._babylonGamepads[i.index]).browserGamepad=i,t._isConnected=!0):t=n._addNewGamepad(i),n.onGamepadConnectedObservable.notifyObservers(t),n._startMonitoringGamepads())},this._onGamepadDisconnectedEvent=function(e){var t=e.gamepad;for(var i in n._babylonGamepads)if(n._babylonGamepads[i].index===t.index){var r=n._babylonGamepads[i];r._isConnected=!1,n.onGamepadDisconnectedObservable.notifyObservers(r);break}},this._gamepadSupport&&(this._updateGamepadObjects(),this._babylonGamepads.length&&this._startMonitoringGamepads(),this._gamepadEventSupported?(window.addEventListener(\"gamepadconnected\",this._onGamepadConnectedEvent,!1),window.addEventListener(\"gamepaddisconnected\",this._onGamepadDisconnectedEvent,!1)):this._startMonitoringGamepads())}return Object.defineProperty(e.prototype,\"gamepads\",{get:function(){return this._babylonGamepads},enumerable:!0,configurable:!0}),e.prototype.getGamepadByType=function(e){void 0===e&&(e=Ir.Gamepad.XBOX);for(var t=0,i=this._babylonGamepads;t<i.length;t++){var r=i[t];if(r&&r.type===e)return r}return null},e.prototype.dispose=function(){this._gamepadEventSupported&&(this._onGamepadConnectedEvent&&window.removeEventListener(\"gamepadconnected\",this._onGamepadConnectedEvent),this._onGamepadDisconnectedEvent&&window.removeEventListener(\"gamepaddisconnected\",this._onGamepadDisconnectedEvent),this._onGamepadConnectedEvent=null,this._onGamepadDisconnectedEvent=null),this._babylonGamepads.forEach((function(e){e.dispose()})),this.onGamepadConnectedObservable.clear(),this.onGamepadDisconnectedObservable.clear(),this._oneGamepadConnected=!1,this._stopMonitoringGamepads(),this._babylonGamepads=[]},e.prototype._addNewGamepad=function(e){var t;this._oneGamepadConnected||(this._oneGamepadConnected=!0);var i=-1!==e.id.search(\"Xbox One\");return t=i||-1!==e.id.search(\"Xbox 360\")||-1!==e.id.search(\"xinput\")?new Ir.Xbox360Pad(e.id,e.index,e,i):e.pose?Ir.PoseEnabledControllerHelper.InitiateController(e):new Ir.GenericPad(e.id,e.index,e),this._babylonGamepads[t.index]=t},e.prototype._startMonitoringGamepads=function(){this._isMonitoring||(this._isMonitoring=!0,this._scene||this._checkGamepadsStatus())},e.prototype._stopMonitoringGamepads=function(){this._isMonitoring=!1},e.prototype._checkGamepadsStatus=function(){var e=this;for(var t in this._updateGamepadObjects(),this._babylonGamepads){var i=this._babylonGamepads[t];i&&i.isConnected&&i.update()}this._isMonitoring&&!this._scene&&Ir.Tools.QueueNewFrame((function(){e._checkGamepadsStatus()}))},e.prototype._updateGamepadObjects=function(){for(var e=navigator.getGamepads?navigator.getGamepads():navigator.webkitGetGamepads?navigator.webkitGetGamepads():[],t=0;t<e.length;t++){var i=e[t];if(i)if(this._babylonGamepads[i.index])this._babylonGamepads[t].browserGamepad=i,this._babylonGamepads[t].isConnected||(this._babylonGamepads[t]._isConnected=!0,this.onGamepadConnectedObservable.notifyObservers(this._babylonGamepads[t]));else{var r=this._addNewGamepad(i);this.onGamepadConnectedObservable.notifyObservers(r)}}},e})(),Ir.GamepadManager=wr,(function(o){var e=function(e,t){this.x=e,this.y=t};o.StickValues=e;var s=(function(){function a(e,t,i,r,n,o,s){void 0===r&&(r=0),void 0===n&&(n=1),void 0===o&&(o=2),void 0===s&&(s=3),this.id=e,this.index=t,this.browserGamepad=i,this._leftStick={x:0,y:0},this._rightStick={x:0,y:0},this._isConnected=!0,this._invertLeftStickY=!1,this.type=a.GAMEPAD,this._leftStickAxisX=r,this._leftStickAxisY=n,this._rightStickAxisX=o,this._rightStickAxisY=s,2<=this.browserGamepad.axes.length&&(this._leftStick={x:this.browserGamepad.axes[this._leftStickAxisX],y:this.browserGamepad.axes[this._leftStickAxisY]}),4<=this.browserGamepad.axes.length&&(this._rightStick={x:this.browserGamepad.axes[this._rightStickAxisX],y:this.browserGamepad.axes[this._rightStickAxisY]})}return Object.defineProperty(a.prototype,\"isConnected\",{get:function(){return this._isConnected},enumerable:!0,configurable:!0}),a.prototype.onleftstickchanged=function(e){this._onleftstickchanged=e},a.prototype.onrightstickchanged=function(e){this._onrightstickchanged=e},Object.defineProperty(a.prototype,\"leftStick\",{get:function(){return this._leftStick},set:function(e){!this._onleftstickchanged||this._leftStick.x===e.x&&this._leftStick.y===e.y||this._onleftstickchanged(e),this._leftStick=e},enumerable:!0,configurable:!0}),Object.defineProperty(a.prototype,\"rightStick\",{get:function(){return this._rightStick},set:function(e){!this._onrightstickchanged||this._rightStick.x===e.x&&this._rightStick.y===e.y||this._onrightstickchanged(e),this._rightStick=e},enumerable:!0,configurable:!0}),a.prototype.update=function(){this._leftStick&&(this.leftStick={x:this.browserGamepad.axes[this._leftStickAxisX],y:this.browserGamepad.axes[this._leftStickAxisY]},this._invertLeftStickY&&(this.leftStick.y*=-1)),this._rightStick&&(this.rightStick={x:this.browserGamepad.axes[this._rightStickAxisX],y:this.browserGamepad.axes[this._rightStickAxisY]})},a.prototype.dispose=function(){},a.GAMEPAD=0,a.GENERIC=1,a.XBOX=2,a.POSE_ENABLED=3,a})(),t=(function(n){function e(e,t,i){var r=n.call(this,e,t,i)||this;return r.onButtonDownObservable=new o.Observable,r.onButtonUpObservable=new o.Observable,r.type=s.GENERIC,r._buttons=new Array(i.buttons.length),r}return T(e,n),e.prototype.onbuttondown=function(e){this._onbuttondown=e},e.prototype.onbuttonup=function(e){this._onbuttonup=e},e.prototype._setButtonValue=function(e,t,i){return e!==t&&(1===e&&(this._onbuttondown&&this._onbuttondown(i),this.onButtonDownObservable.notifyObservers(i)),0===e&&(this._onbuttonup&&this._onbuttonup(i),this.onButtonUpObservable.notifyObservers(i))),e},e.prototype.update=function(){n.prototype.update.call(this);for(var e=0;e<this._buttons.length;e++)this._buttons[e]=this._setButtonValue(this.browserGamepad.buttons[e].value,this._buttons[e],e)},e.prototype.dispose=function(){n.prototype.dispose.call(this),this.onButtonDownObservable.clear(),this.onButtonUpObservable.clear()},e})(o.Gamepad=s);o.GenericPad=t})($a||($a={})),(function(s){var t,e,i,r;(e=t=s.Xbox360Button||(s.Xbox360Button={}))[e.A=0]=\"A\",e[e.B=1]=\"B\",e[e.X=2]=\"X\",e[e.Y=3]=\"Y\",e[e.Start=4]=\"Start\",e[e.Back=5]=\"Back\",e[e.LB=6]=\"LB\",e[e.RB=7]=\"RB\",e[e.LeftStick=8]=\"LeftStick\",e[e.RightStick=9]=\"RightStick\",(r=i=s.Xbox360Dpad||(s.Xbox360Dpad={}))[r.Up=0]=\"Up\",r[r.Down=1]=\"Down\",r[r.Left=2]=\"Left\",r[r.Right=3]=\"Right\";var n=(function(o){function e(e,t,i,r){void 0===r&&(r=!1);var n=o.call(this,e,t,i,0,1,2,3)||this;return n._leftTrigger=0,n._rightTrigger=0,n.onButtonDownObservable=new s.Observable,n.onButtonUpObservable=new s.Observable,n.onPadDownObservable=new s.Observable,n.onPadUpObservable=new s.Observable,n._buttonA=0,n._buttonB=0,n._buttonX=0,n._buttonY=0,n._buttonBack=0,n._buttonStart=0,n._buttonLB=0,n._buttonRB=0,n._buttonLeftStick=0,n._buttonRightStick=0,n._dPadUp=0,n._dPadDown=0,n._dPadLeft=0,n._dPadRight=0,n._isXboxOnePad=!1,n.type=s.Gamepad.XBOX,n._isXboxOnePad=r,n}return T(e,o),e.prototype.onlefttriggerchanged=function(e){this._onlefttriggerchanged=e},e.prototype.onrighttriggerchanged=function(e){this._onrighttriggerchanged=e},Object.defineProperty(e.prototype,\"leftTrigger\",{get:function(){return this._leftTrigger},set:function(e){this._onlefttriggerchanged&&this._leftTrigger!==e&&this._onlefttriggerchanged(e),this._leftTrigger=e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,\"rightTrigger\",{get:function(){return this._rightTrigger},set:function(e){this._onrighttriggerchanged&&this._rightTrigger!==e&&this._onrighttriggerchanged(e),this._rightTrigger=e},enumerable:!0,configurable:!0}),e.prototype.onbuttondown=function(e){this._onbuttondown=e},e.prototype.onbuttonup=function(e){this._onbuttonup=e},e.prototype.ondpaddown=function(e){this._ondpaddown=e},e.prototype.ondpadup=function(e){this._ondpadup=e},e.prototype._setButtonValue=function(e,t,i){return e!==t&&(1===e&&(this._onbuttondown&&this._onbuttondown(i),this.onButtonDownObservable.notifyObservers(i)),0===e&&(this._onbuttonup&&this._onbuttonup(i),this.onButtonUpObservable.notifyObservers(i))),e},e.prototype._setDPadValue=function(e,t,i){return e!==t&&(1===e&&(this._ondpaddown&&this._ondpaddown(i),this.onPadDownObservable.notifyObservers(i)),0===e&&(this._ondpadup&&this._ondpadup(i),this.onPadUpObservable.notifyObservers(i))),e},Object.defineProperty(e.prototype,\"buttonA\",{get:function(){return this._buttonA},set:function(e){this._buttonA=this._setButtonValue(e,this._buttonA,t.A)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,\"buttonB\",{get:function(){return this._buttonB},set:function(e){this._buttonB=this._setButtonValue(e,this._buttonB,t.B)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,\"buttonX\",{get:function(){return this._buttonX},set:function(e){this._buttonX=this._setButtonValue(e,this._buttonX,t.X)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,\"buttonY\",{get:function(){return this._buttonY},set:function(e){this._buttonY=this._setButtonValue(e,this._buttonY,t.Y)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,\"buttonStart\",{get:function(){return this._buttonStart},set:function(e){this._buttonStart=this._setButtonValue(e,this._buttonStart,t.Start)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,\"buttonBack\",{get:function(){return this._buttonBack},set:function(e){this._buttonBack=this._setButtonValue(e,this._buttonBack,t.Back)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,\"buttonLB\",{get:function(){return this._buttonLB},set:function(e){this._buttonLB=this._setButtonValue(e,this._buttonLB,t.LB)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,\"buttonRB\",{get:function(){return this._buttonRB},set:function(e){this._buttonRB=this._setButtonValue(e,this._buttonRB,t.RB)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,\"buttonLeftStick\",{get:function(){return this._buttonLeftStick},set:function(e){this._buttonLeftStick=this._setButtonValue(e,this._buttonLeftStick,t.LeftStick)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,\"buttonRightStick\",{get:function(){return this._buttonRightStick},set:function(e){this._buttonRightStick=this._setButtonValue(e,this._buttonRightStick,t.RightStick)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,\"dPadUp\",{get:function(){return this._dPadUp},set:function(e){this._dPadUp=this._setDPadValue(e,this._dPadUp,i.Up)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,\"dPadDown\",{get:function(){return this._dPadDown},set:function(e){this._dPadDown=this._setDPadValue(e,this._dPadDown,i.Down)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,\"dPadLeft\",{get:function(){return this._dPadLeft},set:function(e){this._dPadLeft=this._setDPadValue(e,this._dPadLeft,i.Left)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,\"dPadRight\",{get:function(){return this._dPadRight},set:function(e){this._dPadRight=this._setDPadValue(e,this._dPadRight,i.Right)},enumerable:!0,configurable:!0}),e.prototype.update=function(){o.prototype.update.call(this),this._isXboxOnePad?(this.buttonA=this.browserGamepad.buttons[0].value,this.buttonB=this.browserGamepad.buttons[1].value,this.buttonX=this.browserGamepad.buttons[2].value,this.buttonY=this.browserGamepad.buttons[3].value,this.buttonLB=this.browserGamepad.buttons[4].value,this.buttonRB=this.browserGamepad.buttons[5].value,this.leftTrigger=this.browserGamepad.axes[2],this.rightTrigger=this.browserGamepad.axes[5],this.buttonBack=this.browserGamepad.buttons[9].value,this.buttonStart=this.browserGamepad.buttons[8].value,this.buttonLeftStick=this.browserGamepad.buttons[6].value,this.buttonRightStick=this.browserGamepad.buttons[7].value,this.dPadUp=this.browserGamepad.buttons[11].value,this.dPadDown=this.browserGamepad.buttons[12].value,this.dPadLeft=this.browserGamepad.buttons[13].value,this.dPadRight=this.browserGamepad.buttons[14].value):(this.buttonA=this.browserGamepad.buttons[0].value,this.buttonB=this.browserGamepad.buttons[1].value,this.buttonX=this.browserGamepad.buttons[2].value,this.buttonY=this.browserGamepad.buttons[3].value,this.buttonLB=this.browserGamepad.buttons[4].value,this.buttonRB=this.browserGamepad.buttons[5].value,this.leftTrigger=this.browserGamepad.buttons[6].value,this.rightTrigger=this.browserGamepad.buttons[7].value,this.buttonBack=this.browserGamepad.buttons[8].value,this.buttonStart=this.browserGamepad.buttons[9].value,this.buttonLeftStick=this.browserGamepad.buttons[10].value,this.buttonRightStick=this.browserGamepad.buttons[11].value,this.dPadUp=this.browserGamepad.buttons[12].value,this.dPadDown=this.browserGamepad.buttons[13].value,this.dPadLeft=this.browserGamepad.buttons[14].value,this.dPadRight=this.browserGamepad.buttons[15].value)},e.prototype.dispose=function(){o.prototype.dispose.call(this),this.onButtonDownObservable.clear(),this.onButtonUpObservable.clear(),this.onPadDownObservable.clear(),this.onPadUpObservable.clear()},e})(s.Gamepad);s.Xbox360Pad=n})($a||($a={})),(function(s){var r,e;(e=r=s.PoseEnabledControllerType||(s.PoseEnabledControllerType={}))[e.VIVE=0]=\"VIVE\",e[e.OCULUS=1]=\"OCULUS\",e[e.WINDOWS=2]=\"WINDOWS\",e[e.GEAR_VR=3]=\"GEAR_VR\",e[e.DAYDREAM=4]=\"DAYDREAM\",e[e.GENERIC=5]=\"GENERIC\";var t=(function(){function e(){}return e.InitiateController=function(e){return-1!==e.id.indexOf(\"Oculus Touch\")?new s.OculusTouchController(e):0===e.id.indexOf(s.WindowsMotionController.GAMEPAD_ID_PREFIX)?new s.WindowsMotionController(e):-1!==e.id.toLowerCase().indexOf(\"openvr\")?new s.ViveController(e):0===e.id.indexOf(s.GearVRController.GAMEPAD_ID_PREFIX)||-1!==e.id.indexOf(\"Oculus Go\")?new s.GearVRController(e):0===e.id.indexOf(s.DaydreamController.GAMEPAD_ID_PREFIX)?new s.DaydreamController(e):new s.GenericController(e)},e})();s.PoseEnabledControllerHelper=t;var i=(function(i){function e(e){var t=i.call(this,e.id,e.index,e)||this;return t._deviceRoomPosition=s.Vector3.Zero(),t._deviceRoomRotationQuaternion=new s.Quaternion,t.devicePosition=s.Vector3.Zero(),t.deviceRotationQuaternion=new s.Quaternion,t.deviceScaleFactor=1,t._trackPosition=!0,t._maxRotationDistFromHeadset=Math.PI/5,t._draggedRoomRotation=0,t._leftHandSystemQuaternion=new s.Quaternion,t._deviceToWorld=s.Matrix.Identity(),t._pointingPoseNode=null,t._workingMatrix=s.Matrix.Identity(),t._meshAttachedObservable=new s.Observable,t.type=s.Gamepad.POSE_ENABLED,t.controllerType=r.GENERIC,t.position=s.Vector3.Zero(),t.rotationQuaternion=new s.Quaternion,t._calculatedPosition=s.Vector3.Zero(),t._calculatedRotation=new s.Quaternion,s.Quaternion.RotationYawPitchRollToRef(Math.PI,0,0,t._leftHandSystemQuaternion),t}return T(e,i),e.prototype._disableTrackPosition=function(e){this._trackPosition&&(this._calculatedPosition.copyFrom(e),this._trackPosition=!1)},e.prototype.update=function(){i.prototype.update.call(this),this._updatePoseAndMesh()},e.prototype._updatePoseAndMesh=function(){var e=this.browserGamepad.pose;if((this.updateFromDevice(e),!this._trackPosition&&s.Engine.LastCreatedScene&&s.Engine.LastCreatedScene.activeCamera&&s.Engine.LastCreatedScene.activeCamera.devicePosition)&&((t=s.Engine.LastCreatedScene.activeCamera)._computeDevicePosition(),this._deviceToWorld.setTranslation(t.devicePosition),t.deviceRotationQuaternion)){var t;(t=t)._deviceRoomRotationQuaternion.toEulerAnglesToRef(s.Tmp.Vector3[0]);var i=Math.atan2(Math.sin(s.Tmp.Vector3[0].y-this._draggedRoomRotation),Math.cos(s.Tmp.Vector3[0].y-this._draggedRoomRotation));if(Math.abs(i)>this._maxRotationDistFromHeadset){var r=i-(i<0?-this._maxRotationDistFromHeadset:this._maxRotationDistFromHeadset);this._draggedRoomRotation+=r;var n=Math.sin(-r),o=Math.cos(-r);this._calculatedPosition.x=this._calculatedPosition.x*o-this._calculatedPosition.z*n,this._calculatedPosition.z=this._calculatedPosition.x*n+this._calculatedPosition.z*o}}s.Vector3.TransformCoordinatesToRef(this._calculatedPosition,this._deviceToWorld,this.devicePosition),this._deviceToWorld.getRotationMatrixToRef(this._workingMatrix),s.Quaternion.FromRotationMatrixToRef(this._workingMatrix,this.deviceRotationQuaternion),this.deviceRotationQuaternion.multiplyInPlace(this._calculatedRotation),this._mesh&&(this._mesh.position.copyFrom(this.devicePosition),this._mesh.rotationQuaternion&&this._mesh.rotationQuaternion.copyFrom(this.deviceRotationQuaternion))},e.prototype.updateFromDevice=function(e){if(e){(this.rawPose=e).position&&(this._deviceRoomPosition.copyFromFloats(e.position[0],e.position[1],-e.position[2]),this._mesh&&this._mesh.getScene().useRightHandedSystem&&(this._deviceRoomPosition.z*=-1),this._trackPosition&&this._deviceRoomPosition.scaleToRef(this.deviceScaleFactor,this._calculatedPosition),this._calculatedPosition.addInPlace(this.position));var t=this.rawPose;e.orientation&&t.orientation&&(this._deviceRoomRotationQuaternion.copyFromFloats(t.orientation[0],t.orientation[1],-t.orientation[2],-t.orientation[3]),this._mesh&&(this._mesh.getScene().useRightHandedSystem?(this._deviceRoomRotationQuaternion.z*=-1,this._deviceRoomRotationQuaternion.w*=-1):this._deviceRoomRotationQuaternion.multiplyToRef(this._leftHandSystemQuaternion,this._deviceRoomRotationQuaternion)),this._deviceRoomRotationQuaternion.multiplyToRef(this.rotationQuaternion,this._calculatedRotation))}},e.prototype.attachToMesh=function(e){if(this._mesh&&(this._mesh.parent=null),this._mesh=e,this._poseControlledCamera&&(this._mesh.parent=this._poseControlledCamera),this._mesh.rotationQuaternion||(this._mesh.rotationQuaternion=new s.Quaternion),this._updatePoseAndMesh(),this._pointingPoseNode){for(var t=[],i=this._pointingPoseNode;i.parent;)t.push(i.parent),i=i.parent;t.reverse().forEach((function(e){e.computeWorldMatrix(!0)}))}this._meshAttachedObservable.notifyObservers(e)},e.prototype.attachToPoseControlledCamera=function(e){this._poseControlledCamera=e,this._mesh&&(this._mesh.parent=this._poseControlledCamera)},e.prototype.dispose=function(){this._mesh&&this._mesh.dispose(),this._mesh=null,i.prototype.dispose.call(this)},Object.defineProperty(e.prototype,\"mesh\",{get:function(){return this._mesh},enumerable:!0,configurable:!0}),e.prototype.getForwardRay=function(e){if(void 0===e&&(e=100),!this.mesh)return new s.Ray(s.Vector3.Zero(),new s.Vector3(0,0,1),e);var t=this._pointingPoseNode?this._pointingPoseNode.getWorldMatrix():this.mesh.getWorldMatrix(),i=t.getTranslation(),r=new s.Vector3(0,0,-1),n=s.Vector3.TransformNormal(r,t),o=s.Vector3.Normalize(n);return new s.Ray(i,o,e)},e.POINTING_POSE=\"POINTING_POSE\",e})(s.Gamepad);s.PoseEnabledController=i})($a||($a={})),Lr=$a||($a={}),Fr=(function(i){function e(e){var t=i.call(this,e)||this;return t.onTriggerStateChangedObservable=new Lr.Observable,t.onMainButtonStateChangedObservable=new Lr.Observable,t.onSecondaryButtonStateChangedObservable=new Lr.Observable,t.onPadStateChangedObservable=new Lr.Observable,t.onPadValuesChangedObservable=new Lr.Observable,t.pad={x:0,y:0},t._changes={pressChanged:!1,touchChanged:!1,valueChanged:!1,changed:!1},t._buttons=new Array(e.buttons.length),t.hand=e.hand,t}return T(e,i),e.prototype.onButtonStateChange=function(e){this._onButtonStateChange=e},Object.defineProperty(e.prototype,\"defaultModel\",{get:function(){return this._defaultModel},enumerable:!0,configurable:!0}),e.prototype.update=function(){i.prototype.update.call(this);for(var e=0;e<this._buttons.length;e++)this._setButtonValue(this.browserGamepad.buttons[e],this._buttons[e],e);this.leftStick.x===this.pad.x&&this.leftStick.y===this.pad.y||(this.pad.x=this.leftStick.x,this.pad.y=this.leftStick.y,this.onPadValuesChangedObservable.notifyObservers(this.pad))},e.prototype._setButtonValue=function(e,t,i){e||(e={pressed:!1,touched:!1,value:0}),t?(this._checkChanges(e,t),this._changes.changed&&(this._onButtonStateChange&&this._onButtonStateChange(this.index,i,e),this._handleButtonChange(i,e,this._changes)),this._buttons[i].pressed=e.pressed,this._buttons[i].touched=e.touched,this._buttons[i].value=e.value<1e-8?0:e.value):this._buttons[i]={pressed:e.pressed,touched:e.touched,value:e.value}},e.prototype._checkChanges=function(e,t){return this._changes.pressChanged=e.pressed!==t.pressed,this._changes.touchChanged=e.touched!==t.touched,this._changes.valueChanged=e.value!==t.value,this._changes.changed=this._changes.pressChanged||this._changes.touchChanged||this._changes.valueChanged,this._changes},e.prototype.dispose=function(){i.prototype.dispose.call(this),this.onTriggerStateChangedObservable.clear(),this.onMainButtonStateChangedObservable.clear(),this.onSecondaryButtonStateChangedObservable.clear(),this.onPadStateChangedObservable.clear(),this.onPadValuesChangedObservable.clear()},e})(Lr.PoseEnabledController),Lr.WebVRController=Fr,Br=$a||($a={}),Nr=(function(i){function n(e){var t=i.call(this,e)||this;return t.onSecondaryTriggerStateChangedObservable=new Br.Observable,t.onThumbRestChangedObservable=new Br.Observable,t.controllerType=Br.PoseEnabledControllerType.OCULUS,t}return T(n,i),n.prototype.initControllerMesh=function(e,t){var i,r=this;i=\"left\"===this.hand?n.MODEL_LEFT_FILENAME:n.MODEL_RIGHT_FILENAME,Br.SceneLoader.ImportMesh(\"\",n.MODEL_BASE_URL,i,e,(function(e){r._defaultModel=e[1],r.attachToMesh(r._defaultModel),t&&t(r._defaultModel)}))},Object.defineProperty(n.prototype,\"onAButtonStateChangedObservable\",{get:function(){if(\"right\"===this.hand)return this.onMainButtonStateChangedObservable;throw new Error(\"No A button on left hand\")},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,\"onBButtonStateChangedObservable\",{get:function(){if(\"right\"===this.hand)return this.onSecondaryButtonStateChangedObservable;throw new Error(\"No B button on left hand\")},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,\"onXButtonStateChangedObservable\",{get:function(){if(\"left\"===this.hand)return this.onMainButtonStateChangedObservable;throw new Error(\"No X button on right hand\")},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,\"onYButtonStateChangedObservable\",{get:function(){if(\"left\"===this.hand)return this.onSecondaryButtonStateChangedObservable;throw new Error(\"No Y button on right hand\")},enumerable:!0,configurable:!0}),n.prototype._handleButtonChange=function(e,t,i){var r=t,n=\"right\"===this.hand?-1:1;switch(e){case 0:return void this.onPadStateChangedObservable.notifyObservers(r);case 1:return this._defaultModel&&(this._defaultModel.getChildren()[3].rotation.x=.2*-r.value,this._defaultModel.getChildren()[3].position.y=.005*-r.value,this._defaultModel.getChildren()[3].position.z=.005*-r.value),void this.onTriggerStateChangedObservable.notifyObservers(r);case 2:return this._defaultModel&&(this._defaultModel.getChildren()[4].position.x=n*r.value*.0035),void this.onSecondaryTriggerStateChangedObservable.notifyObservers(r);case 3:return this._defaultModel&&(r.pressed?this._defaultModel.getChildren()[1].position.y=-.001:this._defaultModel.getChildren()[1].position.y=0),void this.onMainButtonStateChangedObservable.notifyObservers(r);case 4:return this._defaultModel&&(r.pressed?this._defaultModel.getChildren()[2].position.y=-.001:this._defaultModel.getChildren()[2].position.y=0),void this.onSecondaryButtonStateChangedObservable.notifyObservers(r);case 5:return void this.onThumbRestChangedObservable.notifyObservers(r)}},n.MODEL_BASE_URL=\"https://controllers.babylonjs.com/oculus/\",n.MODEL_LEFT_FILENAME=\"left.babylon\",n.MODEL_RIGHT_FILENAME=\"right.babylon\",n})(Br.WebVRController),Br.OculusTouchController=Nr,Vr=$a||($a={}),Ur=(function(i){function r(e){var t=i.call(this,e)||this;return t.controllerType=Vr.PoseEnabledControllerType.VIVE,t._invertLeftStickY=!0,t}return T(r,i),r.prototype.initControllerMesh=function(e,t){var i=this;Vr.SceneLoader.ImportMesh(\"\",r.MODEL_BASE_URL,r.MODEL_FILENAME,e,(function(e){i._defaultModel=e[1],i.attachToMesh(i._defaultModel),t&&t(i._defaultModel)}))},Object.defineProperty(r.prototype,\"onLeftButtonStateChangedObservable\",{get:function(){return this.onMainButtonStateChangedObservable},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,\"onRightButtonStateChangedObservable\",{get:function(){return this.onMainButtonStateChangedObservable},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,\"onMenuButtonStateChangedObservable\",{get:function(){return this.onSecondaryButtonStateChangedObservable},enumerable:!0,configurable:!0}),r.prototype._handleButtonChange=function(e,t,i){var r=t;switch(e){case 0:return void this.onPadStateChangedObservable.notifyObservers(r);case 1:return this._defaultModel&&(this._defaultModel.getChildren()[6].rotation.x=.15*-r.value),void this.onTriggerStateChangedObservable.notifyObservers(r);case 2:return void this.onMainButtonStateChangedObservable.notifyObservers(r);case 3:return this._defaultModel&&(r.pressed?this._defaultModel.getChildren()[2].position.y=-.001:this._defaultModel.getChildren()[2].position.y=0),void this.onSecondaryButtonStateChangedObservable.notifyObservers(r)}},r.MODEL_BASE_URL=\"https://controllers.babylonjs.com/vive/\",r.MODEL_FILENAME=\"wand.babylon\",r})(Vr.WebVRController),Vr.ViveController=Ur,zr=$a||($a={}),Gr=(function(t){function r(e){return t.call(this,e)||this}return T(r,t),r.prototype.initControllerMesh=function(e,t){var i=this;zr.SceneLoader.ImportMesh(\"\",r.MODEL_BASE_URL,r.MODEL_FILENAME,e,(function(e){i._defaultModel=e[1],i.attachToMesh(i._defaultModel),t&&t(i._defaultModel)}))},r.prototype._handleButtonChange=function(e,t,i){console.log(\"Button id: \"+e+\"state: \"),console.dir(t)},r.MODEL_BASE_URL=\"https://controllers.babylonjs.com/generic/\",r.MODEL_FILENAME=\"generic.babylon\",r})(zr.WebVRController),zr.GenericController=Gr,kr=$a||($a={}),Wr=function(){this.buttonMeshes={},this.axisMeshes={}},Hr=(function(s){function l(e){var t=s.call(this,e)||this;return t._mapping={buttons:[\"thumbstick\",\"trigger\",\"grip\",\"menu\",\"trackpad\"],buttonMeshNames:{trigger:\"SELECT\",menu:\"MENU\",grip:\"GRASP\",thumbstick:\"THUMBSTICK_PRESS\",trackpad:\"TOUCHPAD_PRESS\"},buttonObservableNames:{trigger:\"onTriggerStateChangedObservable\",menu:\"onSecondaryButtonStateChangedObservable\",grip:\"onMainButtonStateChangedObservable\",thumbstick:\"onPadStateChangedObservable\",trackpad:\"onTrackpadChangedObservable\"},axisMeshNames:[\"THUMBSTICK_X\",\"THUMBSTICK_Y\",\"TOUCHPAD_TOUCH_X\",\"TOUCHPAD_TOUCH_Y\"],pointingPoseMeshName:kr.PoseEnabledController.POINTING_POSE},t.onTrackpadChangedObservable=new kr.Observable,t.onTrackpadValuesChangedObservable=new kr.Observable,t.trackpad={x:0,y:0},t.controllerType=kr.PoseEnabledControllerType.WINDOWS,t._loadedMeshInfo=null,t}return T(l,s),Object.defineProperty(l.prototype,\"onTriggerButtonStateChangedObservable\",{get:function(){return this.onTriggerStateChangedObservable},enumerable:!0,configurable:!0}),Object.defineProperty(l.prototype,\"onMenuButtonStateChangedObservable\",{get:function(){return this.onSecondaryButtonStateChangedObservable},enumerable:!0,configurable:!0}),Object.defineProperty(l.prototype,\"onGripButtonStateChangedObservable\",{get:function(){return this.onMainButtonStateChangedObservable},enumerable:!0,configurable:!0}),Object.defineProperty(l.prototype,\"onThumbstickButtonStateChangedObservable\",{get:function(){return this.onPadStateChangedObservable},enumerable:!0,configurable:!0}),Object.defineProperty(l.prototype,\"onTouchpadButtonStateChangedObservable\",{get:function(){return this.onTrackpadChangedObservable},enumerable:!0,configurable:!0}),Object.defineProperty(l.prototype,\"onTouchpadValuesChangedObservable\",{get:function(){return this.onTrackpadValuesChangedObservable},enumerable:!0,configurable:!0}),l.prototype._updateTrackpad=function(){!this.browserGamepad.axes||this.browserGamepad.axes[2]==this.trackpad.x&&this.browserGamepad.axes[3]==this.trackpad.y||(this.trackpad.x=this.browserGamepad.axes[2],this.trackpad.y=this.browserGamepad.axes[3],this.onTrackpadValuesChangedObservable.notifyObservers(this.trackpad))},l.prototype.update=function(){if(s.prototype.update.call(this),this.browserGamepad.axes&&(this._updateTrackpad(),this._loadedMeshInfo))for(var e=0;e<this._mapping.axisMeshNames.length;e++)this._lerpAxisTransform(e,this.browserGamepad.axes[e])},l.prototype._handleButtonChange=function(e,t,i){var r=this._mapping.buttons[e];if(r){this._updateTrackpad();var n=this[this._mapping.buttonObservableNames[r]];n&&n.notifyObservers(t),this._lerpButtonTransform(r,t.value)}},l.prototype._lerpButtonTransform=function(e,t){if(this._loadedMeshInfo){var i=this._loadedMeshInfo.buttonMeshes[e];i.unpressed.rotationQuaternion&&i.pressed.rotationQuaternion&&i.value.rotationQuaternion&&(kr.Quaternion.SlerpToRef(i.unpressed.rotationQuaternion,i.pressed.rotationQuaternion,t,i.value.rotationQuaternion),kr.Vector3.LerpToRef(i.unpressed.position,i.pressed.position,t,i.value.position))}},l.prototype._lerpAxisTransform=function(e,t){if(this._loadedMeshInfo){var i=this._loadedMeshInfo.axisMeshes[e];if(i&&i.min.rotationQuaternion&&i.max.rotationQuaternion&&i.value.rotationQuaternion){var r=.5*t+.5;kr.Quaternion.SlerpToRef(i.min.rotationQuaternion,i.max.rotationQuaternion,r,i.value.rotationQuaternion),kr.Vector3.LerpToRef(i.min.position,i.max.position,r,i.value.position)}}},l.prototype.initControllerMesh=function(t,i,r){var n,o,s=this;if(void 0===r&&(r=!1),kr.SceneLoader.IsPluginForExtensionAvailable(\".glb\")){var e=\"default\";if(this.id&&!r){var a=this.id.match(l.GAMEPAD_ID_PATTERN);e=a&&a[0]||e}o=\"left\"===this.hand?l.MODEL_LEFT_FILENAME:l.MODEL_RIGHT_FILENAME,n=l.MODEL_BASE_URL+e+\"/\"}else kr.Tools.Warn(\"You need to reference GLTF loader to load Windows Motion Controllers model. Falling back to generic models\"),n=kr.GenericController.MODEL_BASE_URL,o=kr.GenericController.MODEL_FILENAME;kr.SceneLoader.ImportMesh(\"\",n,o,t,(function(e){s._loadedMeshInfo=s.processModel(t,e),s._loadedMeshInfo&&(s._defaultModel=s._loadedMeshInfo.rootNode,s.attachToMesh(s._defaultModel),i&&i(s._defaultModel))}),null,(function(e,t){kr.Tools.Log(t),kr.Tools.Warn(\"Failed to retrieve controller model from the remote server: \"+n+o),r||s.initControllerMesh(e,i,!0)}))},l.prototype.processModel=function(e,t){for(var i=null,r=new kr.Mesh(this.id+\" \"+this.hand,e),n=null,o=0;o<t.length;o++){var s=t[o];if(!s.parent){s.isPickable=!1,n=s;break}}return n?(n.setParent(r),i=this.createMeshInfo(r)):kr.Tools.Warn(\"Could not find root node in model file.\"),i},l.prototype.createMeshInfo=function(e){var t,i=new Wr;for(i.rootNode=e,i.buttonMeshes={},i.axisMeshes={},t=0;t<this._mapping.buttons.length;t++){var r=this._mapping.buttonMeshNames[this._mapping.buttons[t]];if(r){var n=c(e,r);if(n){var o={index:t,value:h(n,\"VALUE\"),pressed:h(n,\"PRESSED\"),unpressed:h(n,\"UNPRESSED\")};o.value&&o.pressed&&o.unpressed?i.buttonMeshes[this._mapping.buttons[t]]=o:kr.Tools.Warn(\"Missing button submesh under mesh with name: \"+r+\"(VALUE: \"+!!o.value+\", PRESSED: \"+!!o.pressed+\", UNPRESSED:\"+!!o.unpressed+\")\")}else kr.Tools.Warn(\"Missing button mesh with name: \"+r)}else kr.Tools.Log(\"Skipping unknown button at index: \"+t+\" with mapped name: \"+this._mapping.buttons[t])}for(t=0;t<this._mapping.axisMeshNames.length;t++){var s=this._mapping.axisMeshNames[t];if(s){var a=c(e,s);if(a){var l={index:t,value:h(a,\"VALUE\"),min:h(a,\"MIN\"),max:h(a,\"MAX\")};l.value&&l.min&&l.max?i.axisMeshes[t]=l:kr.Tools.Warn(\"Missing axis submesh under mesh with name: \"+s+\"(VALUE: \"+!!l.value+\", MIN: \"+!!l.min+\", MAX:\"+!!l.max+\")\")}else kr.Tools.Warn(\"Missing axis mesh with name: \"+s)}else kr.Tools.Log(\"Skipping unknown axis at index: \"+t)}return i.pointingPoseNode=c(e,this._mapping.pointingPoseMeshName),i.pointingPoseNode?this._pointingPoseNode=i.pointingPoseNode:kr.Tools.Warn(\"Missing pointing pose mesh with name: \"+this._mapping.pointingPoseMeshName),i;function c(e,t){return e.getChildMeshes(!1,(function(e){return e.name===t}))[0]}function h(e,t){return e.getChildMeshes(!0,(function(e){return e.name==t}))[0]}},l.prototype.getForwardRay=function(e){if(void 0===e&&(e=100),!this._loadedMeshInfo||!this._loadedMeshInfo.pointingPoseNode)return s.prototype.getForwardRay.call(this,e);var t=this._loadedMeshInfo.pointingPoseNode.getWorldMatrix(),i=t.getTranslation(),r=new kr.Vector3(0,0,-1),n=kr.Vector3.TransformNormal(r,t),o=kr.Vector3.Normalize(n);return new kr.Ray(i,o,e)},l.prototype.dispose=function(){s.prototype.dispose.call(this),this.onTrackpadChangedObservable.clear()},l.MODEL_BASE_URL=\"https://controllers.babylonjs.com/microsoft/\",l.MODEL_LEFT_FILENAME=\"left.glb\",l.MODEL_RIGHT_FILENAME=\"right.glb\",l.GAMEPAD_ID_PREFIX=\"Spatial Controller (Spatial Interaction Source) \",l.GAMEPAD_ID_PATTERN=/([0-9a-zA-Z]+-[0-9a-zA-Z]+)$/,l})(kr.WebVRController),kr.WindowsMotionController=Hr,Xr=$a||($a={}),jr=(function(i){function e(e){var t=i.call(this,e)||this;return t._buttonIndexToObservableNameMap=[\"onTrackpadChangedObservable\",\"onTriggerStateChangedObservable\"],t.controllerType=Xr.PoseEnabledControllerType.GEAR_VR,t._calculatedPosition=new Xr.Vector3(\"left\"==t.hand?-.15:.15,-.5,.25),t._disableTrackPosition(t._calculatedPosition),t}return T(e,i),e.prototype.initControllerMesh=function(i,r){var n=this;Xr.SceneLoader.ImportMesh(\"\",e.MODEL_BASE_URL,e.MODEL_FILENAME,i,(function(e){var t=new Xr.Mesh(\"\",i);e[1].parent=t,e[1].position.z=-.15,n._defaultModel=t,n.attachToMesh(n._defaultModel),r&&r(n._defaultModel)}))},e.prototype._handleButtonChange=function(e,t,i){if(e<this._buttonIndexToObservableNameMap.length){var r=this[this._buttonIndexToObservableNameMap[e]];r&&r.notifyObservers(t)}},e.MODEL_BASE_URL=\"https://controllers.babylonjs.com/generic/\",e.MODEL_FILENAME=\"generic.babylon\",e.GAMEPAD_ID_PREFIX=\"Gear VR\",e})(Xr.WebVRController),Xr.GearVRController=jr,Yr=$a||($a={}),Kr=(function(i){function r(e){var t=i.call(this,e)||this;return t.controllerType=Yr.PoseEnabledControllerType.DAYDREAM,t}return T(r,i),r.prototype.initControllerMesh=function(e,t){var i=this;Yr.SceneLoader.ImportMesh(\"\",r.MODEL_BASE_URL,r.MODEL_FILENAME,e,(function(e){i._defaultModel=e[1],i.attachToMesh(i._defaultModel),t&&t(i._defaultModel)}))},r.prototype._handleButtonChange=function(e,t,i){if(0===e){var r=this.onTriggerStateChangedObservable;r&&r.notifyObservers(t)}else Yr.Tools.Warn(\"Unrecognized Daydream button index: \"+e)},r.MODEL_BASE_URL=\"https://controllers.babylonjs.com/generic/\",r.MODEL_FILENAME=\"generic.babylon\",r.GAMEPAD_ID_PREFIX=\"Daydream\",r})(Yr.WebVRController),Yr.DaydreamController=Kr,(function(t){Object.defineProperty(t.Scene.prototype,\"gamepadManager\",{get:function(){if(!this._gamepadManager){this._gamepadManager=new t.GamepadManager(this);var e=this._getComponent(t.SceneComponentConstants.NAME_GAMEPAD);e||(e=new i(this),this._addComponent(e))}return this._gamepadManager},enumerable:!0,configurable:!0}),t.FreeCameraInputsManager.prototype.addGamepad=function(){return this.add(new t.FreeCameraGamepadInput),this},t.ArcRotateCameraInputsManager.prototype.addGamepad=function(){return this.add(new t.ArcRotateCameraGamepadInput),this};var i=(function(){function e(e){this.name=t.SceneComponentConstants.NAME_GAMEPAD,this.scene=e}return e.prototype.register=function(){this.scene._beforeCameraUpdateStage.registerStep(t.SceneComponentConstants.STEP_BEFORECAMERAUPDATE_GAMEPAD,this,this._beforeCameraUpdate)},e.prototype.rebuild=function(){},e.prototype.dispose=function(){var e=this.scene._gamepadManager;e&&(e.dispose(),this.scene._gamepadManager=null)},e.prototype._beforeCameraUpdate=function(){var e=this.scene._gamepadManager;e&&e._isMonitoring&&e._checkGamepadsStatus()},e})();t.GamepadSystemSceneComponent=i})($a||($a={})),(function(f){f.Node.AddNodeConstructor(\"FollowCamera\",(function(e,t){return function(){return new i(e,f.Vector3.Zero(),t)}})),f.Node.AddNodeConstructor(\"ArcFollowCamera\",(function(e,t){return function(){return new r(e,0,0,1,null,t)}}));var i=(function(o){function e(e,t,i,r){void 0===r&&(r=null);var n=o.call(this,e,t,i)||this;return n.radius=12,n.rotationOffset=0,n.heightOffset=4,n.cameraAcceleration=.05,n.maxCameraSpeed=20,n.lockedTarget=r,n}return T(e,o),e.prototype._follow=function(e){if(e){var t;if(e.rotationQuaternion){var i=new f.Matrix;e.rotationQuaternion.toRotationMatrix(i),t=Math.atan2(i.m[8],i.m[10])}else t=e.rotation.y;var r=f.Tools.ToRadians(this.rotationOffset)+t,n=e.getAbsolutePosition(),o=n.x+Math.sin(r)*this.radius,s=n.z+Math.cos(r)*this.radius,a=o-this.position.x,l=n.y+this.heightOffset-this.position.y,c=s-this.position.z,h=a*this.cameraAcceleration*2,u=l*this.cameraAcceleration,d=c*this.cameraAcceleration*2;(h>this.maxCameraSpeed||h<-this.maxCameraSpeed)&&(h=h<1?-this.maxCameraSpeed:this.maxCameraSpeed),(u>this.maxCameraSpeed||u<-this.maxCameraSpeed)&&(u=u<1?-this.maxCameraSpeed:this.maxCameraSpeed),(d>this.maxCameraSpeed||d<-this.maxCameraSpeed)&&(d=d<1?-this.maxCameraSpeed:this.maxCameraSpeed),this.position=new f.Vector3(this.position.x+h,this.position.y+u,this.position.z+d),this.setTarget(n)}},e.prototype._checkInputs=function(){o.prototype._checkInputs.call(this),this.lockedTarget&&this._follow(this.lockedTarget)},e.prototype.getClassName=function(){return\"FollowCamera\"},b([f.serialize()],e.prototype,\"radius\",void 0),b([f.serialize()],e.prototype,\"rotationOffset\",void 0),b([f.serialize()],e.prototype,\"heightOffset\",void 0),b([f.serialize()],e.prototype,\"cameraAcceleration\",void 0),b([f.serialize()],e.prototype,\"maxCameraSpeed\",void 0),b([f.serializeAsMeshReference(\"lockedTargetId\")],e.prototype,\"lockedTarget\",void 0),e})(f.TargetCamera);f.FollowCamera=i;var r=(function(a){function e(e,t,i,r,n,o){var s=a.call(this,e,f.Vector3.Zero(),o)||this;return s.alpha=t,s.beta=i,s.radius=r,s.target=n,s._cartesianCoordinates=f.Vector3.Zero(),s._follow(),s}return T(e,a),e.prototype._follow=function(){if(this.target){this._cartesianCoordinates.x=this.radius*Math.cos(this.alpha)*Math.cos(this.beta),this._cartesianCoordinates.y=this.radius*Math.sin(this.beta),this._cartesianCoordinates.z=this.radius*Math.sin(this.alpha)*Math.cos(this.beta);var e=this.target.getAbsolutePosition();this.position=e.add(this._cartesianCoordinates),this.setTarget(e)}},e.prototype._checkInputs=function(){a.prototype._checkInputs.call(this),this._follow()},e.prototype.getClassName=function(){return\"ArcFollowCamera\"},e})(f.TargetCamera);f.ArcFollowCamera=r})($a||($a={})),Qr=$a||($a={}),Zr=(function(n){function e(e,t,i){var r=n.call(this,e,t,i)||this;return r.inputs.addGamepad(),r}return T(e,n),Object.defineProperty(e.prototype,\"gamepadAngularSensibility\",{get:function(){var e=this.inputs.attached.gamepad;return e?e.gamepadAngularSensibility:0},set:function(e){var t=this.inputs.attached.gamepad;t&&(t.gamepadAngularSensibility=e)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,\"gamepadMoveSensibility\",{get:function(){var e=this.inputs.attached.gamepad;return e?e.gamepadMoveSensibility:0},set:function(e){var t=this.inputs.attached.gamepad;t&&(t.gamepadMoveSensibility=e)},enumerable:!0,configurable:!0}),e.prototype.getClassName=function(){return\"UniversalCamera\"},e})(Qr.TouchCamera),Qr.UniversalCamera=Zr,(function(i){i.Node.AddNodeConstructor(\"GamepadCamera\",(function(e,t){return function(){return new r(e,i.Vector3.Zero(),t)}}));var r=(function(r){function e(e,t,i){return r.call(this,e,t,i)||this}return T(e,r),e.prototype.getClassName=function(){return\"GamepadCamera\"},e})(i.UniversalCamera);i.GamepadCamera=r})($a||($a={})),qr=$a||($a={}),Jr=(function(){function e(){this._renderPipelines={}}return e.prototype.addPipeline=function(e){this._renderPipelines[e._name]=e},e.prototype.attachCamerasToRenderPipeline=function(e,t,i){void 0===i&&(i=!1);var r=this._renderPipelines[e];r&&r._attachCameras(t,i)},e.prototype.detachCamerasFromRenderPipeline=function(e,t){var i=this._renderPipelines[e];i&&i._detachCameras(t)},e.prototype.enableEffectInPipeline=function(e,t,i){var r=this._renderPipelines[e];r&&r._enableEffect(t,i)},e.prototype.disableEffectInPipeline=function(e,t,i){var r=this._renderPipelines[e];r&&r._disableEffect(t,i)},e.prototype.update=function(){for(var e in this._renderPipelines)if(this._renderPipelines.hasOwnProperty(e)){var t=this._renderPipelines[e];t.isSupported?t._update():(t.dispose(),delete this._renderPipelines[e])}},e.prototype._rebuild=function(){for(var e in this._renderPipelines){if(this._renderPipelines.hasOwnProperty(e))this._renderPipelines[e]._rebuild()}},e.prototype.dispose=function(){for(var e in this._renderPipelines){if(this._renderPipelines.hasOwnProperty(e))this._renderPipelines[e].dispose()}},e})(),qr.PostProcessRenderPipelineManager=Jr,(function(t){Object.defineProperty(t.Scene.prototype,\"postProcessRenderPipelineManager\",{get:function(){if(!this._postProcessRenderPipelineManager){var e=this._getComponent(t.SceneComponentConstants.NAME_POSTPROCESSRENDERPIPELINEMANAGER);e||(e=new i(this),this._addComponent(e)),this._postProcessRenderPipelineManager=new t.PostProcessRenderPipelineManager}return this._postProcessRenderPipelineManager},enumerable:!0,configurable:!0});var i=(function(){function e(e){this.name=t.SceneComponentConstants.NAME_POSTPROCESSRENDERPIPELINEMANAGER,this.scene=e}return e.prototype.register=function(){this.scene._gatherRenderTargetsStage.registerStep(t.SceneComponentConstants.STEP_GATHERRENDERTARGETS_POSTPROCESSRENDERPIPELINEMANAGER,this,this._gatherRenderTargets)},e.prototype.rebuild=function(){this.scene._postProcessRenderPipelineManager&&this.scene._postProcessRenderPipelineManager._rebuild()},e.prototype.dispose=function(){this.scene._postProcessRenderPipelineManager&&this.scene._postProcessRenderPipelineManager.dispose()},e.prototype._gatherRenderTargets=function(e){this.scene._postProcessRenderPipelineManager&&this.scene._postProcessRenderPipelineManager.update()},e})();t.PostProcessRenderPipelineManagerSceneComponent=i})($a||($a={})),$r=$a||($a={}),en=(function(){function e(e,t,i,r){this._name=t,this._singleInstance=r||!0,this._getPostProcesses=i,this._cameras={},this._indicesForCamera={},this._postProcesses={}}return Object.defineProperty(e.prototype,\"isSupported\",{get:function(){for(var e in this._postProcesses)if(this._postProcesses.hasOwnProperty(e))for(var t=this._postProcesses[e],i=0;i<t.length;i++)if(!t[i].isSupported)return!1;return!0},enumerable:!0,configurable:!0}),e.prototype._update=function(){},e.prototype._attachCameras=function(e){var t,i=this,r=$r.Tools.MakeArray(e||this._cameras);if(r)for(var n=0;n<r.length;n++){var o=r[n],s=o.name;if(t=this._singleInstance?0:s,!this._postProcesses[t]){var a=this._getPostProcesses();a&&(this._postProcesses[t]=Array.isArray(a)?a:[a])}this._indicesForCamera[s]||(this._indicesForCamera[s]=[]),this._postProcesses[t].forEach((function(e){var t=o.attachPostProcess(e);i._indicesForCamera[s].push(t)})),this._cameras[s]||(this._cameras[s]=o)}},e.prototype._detachCameras=function(e){var t=$r.Tools.MakeArray(e||this._cameras);if(t)for(var i=0;i<t.length;i++){var r=t[i],n=r.name;this._postProcesses[this._singleInstance?0:n].forEach((function(e){r.detachPostProcess(e)})),this._cameras[n]&&(this._cameras[n]=null)}},e.prototype._enable=function(e){var t=this,i=$r.Tools.MakeArray(e||this._cameras);if(i)for(var r=0;r<i.length;r++)for(var n=i[r],o=n.name,s=0;s<this._indicesForCamera[o].length;s++)void 0!==n._postProcesses[this._indicesForCamera[o][s]]&&null!==n._postProcesses[this._indicesForCamera[o][s]]||this._postProcesses[this._singleInstance?0:o].forEach((function(e){i[r].attachPostProcess(e,t._indicesForCamera[o][s])}))},e.prototype._disable=function(e){var t=$r.Tools.MakeArray(e||this._cameras);if(t)for(var i=0;i<t.length;i++){var r=t[i],n=r.name;this._postProcesses[this._singleInstance?0:n].forEach((function(e){r.detachPostProcess(e)}))}},e.prototype.getPostProcesses=function(e){return this._singleInstance?this._postProcesses[0]:e?this._postProcesses[e.name]:null},e})(),$r.PostProcessRenderEffect=en,tn=$a||($a={}),rn=(function(){function e(e,t){this.engine=e,this._name=t,this._renderEffects={},this._renderEffectsForIsolatedPass=new Array,this._cameras=[]}return e.prototype.getClassName=function(){return\"PostProcessRenderPipeline\"},Object.defineProperty(e.prototype,\"isSupported\",{get:function(){for(var e in this._renderEffects)if(this._renderEffects.hasOwnProperty(e)&&!this._renderEffects[e].isSupported)return!1;return!0},enumerable:!0,configurable:!0}),e.prototype.addEffect=function(e){this._renderEffects[e._name]=e},e.prototype._rebuild=function(){},e.prototype._enableEffect=function(e,t){var i=this._renderEffects[e];i&&i._enable(tn.Tools.MakeArray(t||this._cameras))},e.prototype._disableEffect=function(e,t){var i=this._renderEffects[e];i&&i._disable(tn.Tools.MakeArray(t||this._cameras))},e.prototype._attachCameras=function(e,t){var i=tn.Tools.MakeArray(e||this._cameras);if(i){var r,n=[];for(r=0;r<i.length;r++){var o=i[r],s=o.name;-1===this._cameras.indexOf(o)?this._cameras[s]=o:t&&n.push(r)}for(r=0;r<n.length;r++)e.splice(n[r],1);for(var a in this._renderEffects)this._renderEffects.hasOwnProperty(a)&&this._renderEffects[a]._attachCameras(i)}},e.prototype._detachCameras=function(e){var t=tn.Tools.MakeArray(e||this._cameras);if(t){for(var i in this._renderEffects)this._renderEffects.hasOwnProperty(i)&&this._renderEffects[i]._detachCameras(t);for(var r=0;r<t.length;r++)this._cameras.splice(this._cameras.indexOf(t[r]),1)}},e.prototype._update=function(){for(var e in this._renderEffects)this._renderEffects.hasOwnProperty(e)&&this._renderEffects[e]._update();for(var t=0;t<this._cameras.length;t++){var i=this._cameras[t].name;this._renderEffectsForIsolatedPass[i]&&this._renderEffectsForIsolatedPass[i]._update()}},e.prototype._reset=function(){this._renderEffects={},this._renderEffectsForIsolatedPass=new Array},e.prototype._enableMSAAOnFirstPostProcess=function(e){var t=Object.keys(this._renderEffects);if(2<=this.engine.webGLVersion&&0<t.length){var i=this._renderEffects[t[0]].getPostProcesses();if(i)return i[0].samples=e,!0}return!1},e.prototype.dispose=function(){},b([tn.serialize()],e.prototype,\"_name\",void 0),e})(),tn.PostProcessRenderPipeline=rn,nn=$a||($a={}),on=(function(){function e(e,t,i){void 0===t&&(t=nn.Engine.TEXTURETYPE_FLOAT),void 0===i&&(i=null);var c=this;this.useOnlyInActiveCamera=!1;var r=(this._scene=e)._getComponent(nn.SceneComponentConstants.NAME_DEPTHRENDERER);r||(r=new nn.DepthRendererSceneComponent(e),e._addComponent(r)),this._camera=i;var o=e.getEngine();this._depthMap=new nn.RenderTargetTexture(\"depthMap\",{width:o.getRenderWidth(),height:o.getRenderHeight()},this._scene,!1,!0,t),this._depthMap.wrapU=nn.Texture.CLAMP_ADDRESSMODE,this._depthMap.wrapV=nn.Texture.CLAMP_ADDRESSMODE,this._depthMap.refreshRate=1,this._depthMap.renderParticles=!1,this._depthMap.renderList=null,this._depthMap.activeCamera=this._camera,this._depthMap.ignoreCameraViewport=!0,this._depthMap.useCameraPostProcesses=!1,this._depthMap.onClearObservable.add((function(e){e.clear(new nn.Color4(1,1,1,1),!0,!0,!0)}));var s=function(e){var t=e.getRenderingMesh(),i=c._scene,r=i.getEngine(),n=e.getMaterial();if(n){r.setState(n.backFaceCulling,0,!1,i.useRightHandedSystem);var o=t._getInstancesRenderList(e._id);if(!o.mustReturn){var s=r.getCaps().instancedArrays&&null!==o.visibleInstances[e._id],a=c._camera||i.activeCamera;if(c.isReady(e,s)&&a){if(r.enableEffect(c._effect),t._bind(e,c._effect,nn.Material.TriangleFillMode),c._effect.setMatrix(\"viewProjection\",i.getTransformMatrix()),c._effect.setFloat2(\"depthValues\",a.minZ,a.minZ+a.maxZ),n&&n.needAlphaTesting()){var l=n.getAlphaTestTexture();l&&(c._effect.setTexture(\"diffuseSampler\",l),c._effect.setMatrix(\"diffuseMatrix\",l.getTextureMatrix()))}t.useBones&&t.computeBonesUsingShaders&&t.skeleton&&c._effect.setMatrices(\"mBones\",t.skeleton.getTransformMatrices(t)),t._processRendering(e,c._effect,nn.Material.TriangleFillMode,o,s,(function(e,t){return c._effect.setMatrix(\"world\",t)}))}}}};this._depthMap.customRenderFunction=function(e,t,i,r){var n;if(r.length){for(o.setColorWrite(!1),n=0;n<r.length;n++)s(r.data[n]);o.setColorWrite(!0)}for(n=0;n<e.length;n++)s(e.data[n]);for(n=0;n<t.length;n++)s(t.data[n])}}return e.prototype.isReady=function(e,t){var i=e.getMaterial();if(i.disableDepthWrite)return!1;var r=[],n=[nn.VertexBuffer.PositionKind],o=e.getMesh();i&&i.needAlphaTesting()&&i.getAlphaTestTexture()&&(r.push(\"#define ALPHATEST\"),o.isVerticesDataPresent(nn.VertexBuffer.UVKind)&&(n.push(nn.VertexBuffer.UVKind),r.push(\"#define UV1\")),o.isVerticesDataPresent(nn.VertexBuffer.UV2Kind)&&(n.push(nn.VertexBuffer.UV2Kind),r.push(\"#define UV2\"))),o.useBones&&o.computeBonesUsingShaders?(n.push(nn.VertexBuffer.MatricesIndicesKind),n.push(nn.VertexBuffer.MatricesWeightsKind),4<o.numBoneInfluencers&&(n.push(nn.VertexBuffer.MatricesIndicesExtraKind),n.push(nn.VertexBuffer.MatricesWeightsExtraKind)),r.push(\"#define NUM_BONE_INFLUENCERS \"+o.numBoneInfluencers),r.push(\"#define BonesPerMesh \"+(o.skeleton?o.skeleton.bones.length+1:0))):r.push(\"#define NUM_BONE_INFLUENCERS 0\"),t&&(r.push(\"#define INSTANCES\"),n.push(\"world0\"),n.push(\"world1\"),n.push(\"world2\"),n.push(\"world3\"));var s=r.join(\"\\n\");return this._cachedDefines!==s&&(this._cachedDefines=s,this._effect=this._scene.getEngine().createEffect(\"depth\",n,[\"world\",\"mBones\",\"viewProjection\",\"diffuseMatrix\",\"depthValues\"],[\"diffuseSampler\"],s)),this._effect.isReady()},e.prototype.getDepthMap=function(){return this._depthMap},e.prototype.dispose=function(){this._depthMap.dispose()},e})(),nn.DepthRenderer=on,(function(i){i.Scene.prototype.enableDepthRenderer=function(e){if(!(e=e||this.activeCamera))throw\"No camera available to enable depth renderer\";if(this._depthRenderer||(this._depthRenderer={}),!this._depthRenderer[e.id]){var t=0;if(this.getEngine().getCaps().textureHalfFloatRender)t=i.Engine.TEXTURETYPE_HALF_FLOAT;else{if(!this.getEngine().getCaps().textureFloatRender)throw\"Depth renderer does not support int texture type\";t=i.Engine.TEXTURETYPE_FLOAT}this._depthRenderer[e.id]=new i.DepthRenderer(this,t,e)}return this._depthRenderer[e.id]},i.Scene.prototype.disableDepthRenderer=function(e){(e=e||this.activeCamera)&&this._depthRenderer&&this._depthRenderer[e.id]&&(this._depthRenderer[e.id].dispose(),delete this._depthRenderer[e.id])};var e=(function(){function e(e){this.name=i.SceneComponentConstants.NAME_DEPTHRENDERER,this.scene=e}return e.prototype.register=function(){this.scene._gatherRenderTargetsStage.registerStep(i.SceneComponentConstants.STEP_GATHERRENDERTARGETS_DEPTHRENDERER,this,this._gatherRenderTargets),this.scene._gatherActiveCameraRenderTargetsStage.registerStep(i.SceneComponentConstants.STEP_GATHERACTIVECAMERARENDERTARGETS_DEPTHRENDERER,this,this._gatherActiveCameraRenderTargets)},e.prototype.rebuild=function(){},e.prototype.dispose=function(){for(var e in this.scene._depthRenderer)this.scene._depthRenderer[e].dispose()},e.prototype._gatherRenderTargets=function(e){if(this.scene._depthRenderer)for(var t in this.scene._depthRenderer){var i=this.scene._depthRenderer[t];i.useOnlyInActiveCamera||e.push(i.getDepthMap())}},e.prototype._gatherActiveCameraRenderTargets=function(e){if(this.scene._depthRenderer)for(var t in this.scene._depthRenderer){var i=this.scene._depthRenderer[t];i.useOnlyInActiveCamera&&this.scene.activeCamera.id===t&&e.push(i.getDepthMap())}},e})();i.DepthRendererSceneComponent=e})($a||($a={})),sn=$a||($a={}),an=(function(){function e(e,t){void 0===t&&(t=1),this._enablePosition=!1,this._scene=e,this._ratio=t;var i=e._getComponent(sn.SceneComponentConstants.NAME_GEOMETRYBUFFERRENDERER);i||(i=new sn.GeometryBufferRendererSceneComponent(e),e._addComponent(i)),this._createRenderTargets()}return Object.defineProperty(e.prototype,\"renderList\",{set:function(e){this._multiRenderTarget.renderList=e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,\"isSupported\",{get:function(){return this._multiRenderTarget.isSupported},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,\"enablePosition\",{get:function(){return this._enablePosition},set:function(e){this._enablePosition=e,this.dispose(),this._createRenderTargets()},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,\"scene\",{get:function(){return this._scene},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,\"ratio\",{get:function(){return this._ratio},enumerable:!0,configurable:!0}),e.prototype.isReady=function(e,t){var i=e.getMaterial();if(i&&i.disableDepthWrite)return!1;var r=[],n=[sn.VertexBuffer.PositionKind,sn.VertexBuffer.NormalKind],o=e.getMesh();i&&i.needAlphaTesting()&&(r.push(\"#define ALPHATEST\"),o.isVerticesDataPresent(sn.VertexBuffer.UVKind)&&(n.push(sn.VertexBuffer.UVKind),r.push(\"#define UV1\")),o.isVerticesDataPresent(sn.VertexBuffer.UV2Kind)&&(n.push(sn.VertexBuffer.UV2Kind),r.push(\"#define UV2\"))),this._enablePosition&&r.push(\"#define POSITION\"),o.useBones&&o.computeBonesUsingShaders?(n.push(sn.VertexBuffer.MatricesIndicesKind),n.push(sn.VertexBuffer.MatricesWeightsKind),4<o.numBoneInfluencers&&(n.push(sn.VertexBuffer.MatricesIndicesExtraKind),n.push(sn.VertexBuffer.MatricesWeightsExtraKind)),r.push(\"#define NUM_BONE_INFLUENCERS \"+o.numBoneInfluencers),r.push(\"#define BonesPerMesh \"+(o.skeleton?o.skeleton.bones.length+1:0))):r.push(\"#define NUM_BONE_INFLUENCERS 0\"),t&&(r.push(\"#define INSTANCES\"),n.push(\"world0\"),n.push(\"world1\"),n.push(\"world2\"),n.push(\"world3\"));var s=r.join(\"\\n\");return this._cachedDefines!==s&&(this._cachedDefines=s,this._effect=this._scene.getEngine().createEffect(\"geometry\",n,[\"world\",\"mBones\",\"viewProjection\",\"diffuseMatrix\",\"view\"],[\"diffuseSampler\"],s,void 0,void 0,void 0,{buffersCount:this._enablePosition?3:2})),this._effect.isReady()},e.prototype.getGBuffer=function(){return this._multiRenderTarget},Object.defineProperty(e.prototype,\"samples\",{get:function(){return this._multiRenderTarget.samples},set:function(e){this._multiRenderTarget.samples=e},enumerable:!0,configurable:!0}),e.prototype.dispose=function(){this.getGBuffer().dispose()},e.prototype._createRenderTargets=function(){var l=this,o=this._scene.getEngine(),e=this._enablePosition?3:2;if(this._multiRenderTarget=new sn.MultiRenderTarget(\"gBuffer\",{width:o.getRenderWidth()*this._ratio,height:o.getRenderHeight()*this._ratio},e,this._scene,{generateMipMaps:!1,generateDepthTexture:!0,defaultType:sn.Engine.TEXTURETYPE_FLOAT}),this.isSupported){this._multiRenderTarget.wrapU=sn.Texture.CLAMP_ADDRESSMODE,this._multiRenderTarget.wrapV=sn.Texture.CLAMP_ADDRESSMODE,this._multiRenderTarget.refreshRate=1,this._multiRenderTarget.renderParticles=!1,this._multiRenderTarget.renderList=null,this._multiRenderTarget.onClearObservable.add((function(e){e.clear(new sn.Color4(0,0,0,1),!0,!0,!0)}));var s=function(e){var t=e.getRenderingMesh(),i=l._scene,r=i.getEngine(),n=e.getMaterial();if(n){r.setState(n.backFaceCulling,0,!1,i.useRightHandedSystem);var o=t._getInstancesRenderList(e._id);if(!o.mustReturn){var s=r.getCaps().instancedArrays&&null!==o.visibleInstances[e._id];if(l.isReady(e,s)){if(r.enableEffect(l._effect),t._bind(e,l._effect,sn.Material.TriangleFillMode),l._effect.setMatrix(\"viewProjection\",i.getTransformMatrix()),l._effect.setMatrix(\"view\",i.getViewMatrix()),n&&n.needAlphaTesting()){var a=n.getAlphaTestTexture();a&&(l._effect.setTexture(\"diffuseSampler\",a),l._effect.setMatrix(\"diffuseMatrix\",a.getTextureMatrix()))}t.useBones&&t.computeBonesUsingShaders&&t.skeleton&&l._effect.setMatrices(\"mBones\",t.skeleton.getTransformMatrices(t)),t._processRendering(e,l._effect,sn.Material.TriangleFillMode,o,s,(function(e,t){return l._effect.setMatrix(\"world\",t)}))}}}};this._multiRenderTarget.customRenderFunction=function(e,t,i,r){var n;if(r.length){for(o.setColorWrite(!1),n=0;n<r.length;n++)s(r.data[n]);o.setColorWrite(!0)}for(n=0;n<e.length;n++)s(e.data[n]);for(n=0;n<t.length;n++)s(t.data[n])}}},e})(),sn.GeometryBufferRenderer=an,(function(t){Object.defineProperty(t.Scene.prototype,\"geometryBufferRenderer\",{get:function(){this._geometryBufferRenderer},set:function(e){e&&e.isSupported&&(this._geometryBufferRenderer=e)},enumerable:!0,configurable:!0}),t.Scene.prototype.enableGeometryBufferRenderer=function(e){return void 0===e&&(e=1),this._geometryBufferRenderer||(this._geometryBufferRenderer=new t.GeometryBufferRenderer(this,e),this._geometryBufferRenderer.isSupported||(this._geometryBufferRenderer=null)),this._geometryBufferRenderer},t.Scene.prototype.disableGeometryBufferRenderer=function(){this._geometryBufferRenderer&&(this._geometryBufferRenderer.dispose(),this._geometryBufferRenderer=null)};var e=(function(){function e(e){this.name=t.SceneComponentConstants.NAME_GEOMETRYBUFFERRENDERER,this.scene=e}return e.prototype.register=function(){this.scene._gatherRenderTargetsStage.registerStep(t.SceneComponentConstants.STEP_GATHERRENDERTARGETS_GEOMETRYBUFFERRENDERER,this,this._gatherRenderTargets)},e.prototype.rebuild=function(){},e.prototype.dispose=function(){},e.prototype._gatherRenderTargets=function(e){this.scene._geometryBufferRenderer&&e.push(this.scene._geometryBufferRenderer.getGBuffer())},e})();t.GeometryBufferRendererSceneComponent=e})($a||($a={})),ln=$a||($a={}),cn=(function(a){function e(e,t,i,r){var n=a.call(this,t.getEngine(),e)||this;n.SSAOOriginalSceneColorEffect=\"SSAOOriginalSceneColorEffect\",n.SSAORenderEffect=\"SSAORenderEffect\",n.SSAOBlurHRenderEffect=\"SSAOBlurHRenderEffect\",n.SSAOBlurVRenderEffect=\"SSAOBlurVRenderEffect\",n.SSAOCombineRenderEffect=\"SSAOCombineRenderEffect\",n.totalStrength=1,n.radius=1e-4,n.area=.0075,n.fallOff=1e-6,n.base=.5,n._firstUpdate=!0,n._scene=t,n._createRandomTexture(),n._depthTexture=t.enableDepthRenderer().getDepthMap();var o=i.ssaoRatio||i,s=i.combineRatio||i;return n._originalColorPostProcess=new ln.PassPostProcess(\"SSAOOriginalSceneColor\",s,null,ln.Texture.BILINEAR_SAMPLINGMODE,t.getEngine(),!1),n._createSSAOPostProcess(o),n._createBlurPostProcess(o),n._createSSAOCombinePostProcess(s),n.addEffect(new ln.PostProcessRenderEffect(t.getEngine(),n.SSAOOriginalSceneColorEffect,function(){return n._originalColorPostProcess},!0)),n.addEffect(new ln.PostProcessRenderEffect(t.getEngine(),n.SSAORenderEffect,function(){return n._ssaoPostProcess},!0)),n.addEffect(new ln.PostProcessRenderEffect(t.getEngine(),n.SSAOBlurHRenderEffect,function(){return n._blurHPostProcess},!0)),n.addEffect(new ln.PostProcessRenderEffect(t.getEngine(),n.SSAOBlurVRenderEffect,function(){return n._blurVPostProcess},!0)),n.addEffect(new ln.PostProcessRenderEffect(t.getEngine(),n.SSAOCombineRenderEffect,function(){return n._ssaoCombinePostProcess},!0)),t.postProcessRenderPipelineManager.addPipeline(n),r&&t.postProcessRenderPipelineManager.attachCamerasToRenderPipeline(e,r),n}return T(e,a),e.prototype.dispose=function(e){void 0===e&&(e=!1);for(var t=0;t<this._scene.cameras.length;t++){var i=this._scene.cameras[t];this._originalColorPostProcess.dispose(i),this._ssaoPostProcess.dispose(i),this._blurHPostProcess.dispose(i),this._blurVPostProcess.dispose(i),this._ssaoCombinePostProcess.dispose(i)}this._randomTexture.dispose(),e&&this._scene.disableDepthRenderer(),this._scene.postProcessRenderPipelineManager.detachCamerasFromRenderPipeline(this._name,this._scene.cameras),a.prototype.dispose.call(this)},e.prototype._createBlurPostProcess=function(e){var t=this;this._blurHPostProcess=new ln.BlurPostProcess(\"BlurH\",new ln.Vector2(1,0),16,e,null,ln.Texture.BILINEAR_SAMPLINGMODE,this._scene.getEngine(),!1,ln.Engine.TEXTURETYPE_UNSIGNED_INT),this._blurVPostProcess=new ln.BlurPostProcess(\"BlurV\",new ln.Vector2(0,1),16,e,null,ln.Texture.BILINEAR_SAMPLINGMODE,this._scene.getEngine(),!1,ln.Engine.TEXTURETYPE_UNSIGNED_INT),this._blurHPostProcess.onActivateObservable.add((function(){var e=t._blurHPostProcess.width/t._scene.getEngine().getRenderWidth();t._blurHPostProcess.kernel=16*e})),this._blurVPostProcess.onActivateObservable.add((function(){var e=t._blurVPostProcess.height/t._scene.getEngine().getRenderHeight();t._blurVPostProcess.kernel=16*e}))},e.prototype._rebuild=function(){this._firstUpdate=!0,a.prototype._rebuild.call(this)},e.prototype._createSSAOPostProcess=function(e){var t=this,i=[.5381,.1856,-.4319,.1379,.2486,.443,.3371,.5679,-.0057,-.6999,-.0451,-.0019,.0689,-.1598,-.8547,.056,.0069,-.1843,-.0146,.1402,.0762,.01,-.1924,-.0344,-.3577,-.5301,-.4358,-.3169,.1063,.0158,.0103,-.5869,.0046,-.0897,-.494,.3287,.7119,-.0154,-.0918,-.0533,.0596,-.5411,.0352,-.0631,.546,-.4776,.2847,-.0271];this._ssaoPostProcess=new ln.PostProcess(\"ssao\",\"ssao\",[\"sampleSphere\",\"samplesFactor\",\"randTextureTiles\",\"totalStrength\",\"radius\",\"area\",\"fallOff\",\"base\",\"range\",\"viewport\"],[\"randomSampler\"],e,null,ln.Texture.BILINEAR_SAMPLINGMODE,this._scene.getEngine(),!1,\"#define SAMPLES 16\\n#define SSAO\"),this._ssaoPostProcess.onApply=function(e){t._firstUpdate&&(e.setArray3(\"sampleSphere\",i),e.setFloat(\"samplesFactor\",1/16),e.setFloat(\"randTextureTiles\",4)),e.setFloat(\"totalStrength\",t.totalStrength),e.setFloat(\"radius\",t.radius),e.setFloat(\"area\",t.area),e.setFloat(\"fallOff\",t.fallOff),e.setFloat(\"base\",t.base),e.setTexture(\"textureSampler\",t._depthTexture),e.setTexture(\"randomSampler\",t._randomTexture)}},e.prototype._createSSAOCombinePostProcess=function(e){var t=this;this._ssaoCombinePostProcess=new ln.PostProcess(\"ssaoCombine\",\"ssaoCombine\",[],[\"originalColor\",\"viewport\"],e,null,ln.Texture.BILINEAR_SAMPLINGMODE,this._scene.getEngine(),!1),this._ssaoCombinePostProcess.onApply=function(e){e.setVector4(\"viewport\",ln.Tmp.Vector4[0].copyFromFloats(0,0,1,1)),e.setTextureFromPostProcess(\"originalColor\",t._originalColorPostProcess)}},e.prototype._createRandomTexture=function(){this._randomTexture=new ln.DynamicTexture(\"SSAORandomTexture\",512,this._scene,!1,ln.Texture.TRILINEAR_SAMPLINGMODE),this._randomTexture.wrapU=ln.Texture.WRAP_ADDRESSMODE,this._randomTexture.wrapV=ln.Texture.WRAP_ADDRESSMODE;for(var e=this._randomTexture.getContext(),t=function(e,t){return Math.random()*(t-e)+e},i=ln.Vector3.Zero(),r=0;r<512;r++)for(var n=0;n<512;n++)i.x=Math.floor(255*t(-1,1)),i.y=Math.floor(255*t(-1,1)),i.z=Math.floor(255*t(-1,1)),e.fillStyle=\"rgb(\"+i.x+\", \"+i.y+\", \"+i.z+\")\",e.fillRect(r,n,1,1);this._randomTexture.update(!1)},b([ln.serialize()],e.prototype,\"totalStrength\",void 0),b([ln.serialize()],e.prototype,\"radius\",void 0),b([ln.serialize()],e.prototype,\"area\",void 0),b([ln.serialize()],e.prototype,\"fallOff\",void 0),b([ln.serialize()],e.prototype,\"base\",void 0),e})(ln.PostProcessRenderPipeline),ln.SSAORenderingPipeline=cn,hn=$a||($a={}),un=(function(l){function r(e,t,i,r){var n=l.call(this,t.getEngine(),e)||this;if(n.SSAOOriginalSceneColorEffect=\"SSAOOriginalSceneColorEffect\",n.SSAORenderEffect=\"SSAORenderEffect\",n.SSAOBlurHRenderEffect=\"SSAOBlurHRenderEffect\",n.SSAOBlurVRenderEffect=\"SSAOBlurVRenderEffect\",n.SSAOCombineRenderEffect=\"SSAOCombineRenderEffect\",n.totalStrength=1,n.maxZ=100,n.minZAspect=.2,n._samples=8,n._textureSamples=1,n._expensiveBlur=!0,n.radius=2,n.base=0,n._firstUpdate=!0,n._bits=new Uint32Array(1),n._scene=t,n._ratio=i,!n.isSupported)return hn.Tools.Error(\"SSAO 2 needs WebGL 2 support.\"),n;var o=n._ratio.ssaoRatio||i,s=n._ratio.blurRatio||i,a=t.enableGeometryBufferRenderer();return n._createRandomTexture(),n._depthTexture=a.getGBuffer().textures[0],n._normalTexture=a.getGBuffer().textures[1],n._originalColorPostProcess=new hn.PassPostProcess(\"SSAOOriginalSceneColor\",1,null,hn.Texture.BILINEAR_SAMPLINGMODE,t.getEngine(),!1),n._originalColorPostProcess.samples=n.textureSamples,n._createSSAOPostProcess(1),n._createBlurPostProcess(o,s),n._createSSAOCombinePostProcess(s),n.addEffect(new hn.PostProcessRenderEffect(t.getEngine(),n.SSAOOriginalSceneColorEffect,function(){return n._originalColorPostProcess},!0)),n.addEffect(new hn.PostProcessRenderEffect(t.getEngine(),n.SSAORenderEffect,function(){return n._ssaoPostProcess},!0)),n.addEffect(new hn.PostProcessRenderEffect(t.getEngine(),n.SSAOBlurHRenderEffect,function(){return n._blurHPostProcess},!0)),n.addEffect(new hn.PostProcessRenderEffect(t.getEngine(),n.SSAOBlurVRenderEffect,function(){return n._blurVPostProcess},!0)),n.addEffect(new hn.PostProcessRenderEffect(t.getEngine(),n.SSAOCombineRenderEffect,function(){return n._ssaoCombinePostProcess},!0)),t.postProcessRenderPipelineManager.addPipeline(n),r&&t.postProcessRenderPipelineManager.attachCamerasToRenderPipeline(e,r),n}return T(r,l),Object.defineProperty(r.prototype,\"samples\",{get:function(){return this._samples},set:function(e){this._ssaoPostProcess.updateEffect(\"#define SAMPLES \"+e+\"\\n#define SSAO\"),this._samples=e,this._sampleSphere=this._generateHemisphere(),this._firstUpdate=!0},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,\"textureSamples\",{get:function(){return this._textureSamples},set:function(e){this._textureSamples=e,this._originalColorPostProcess.samples=e,this._blurHPostProcess.samples=e,this._blurVPostProcess.samples=e,this._ssaoPostProcess.samples=e,this._ssaoCombinePostProcess.samples=e},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,\"expensiveBlur\",{get:function(){return this._expensiveBlur},set:function(e){this._blurHPostProcess.updateEffect(\"#define BILATERAL_BLUR\\n#define BILATERAL_BLUR_H\\n#define SAMPLES 16\\n#define EXPENSIVE \"+(e?\"1\":\"0\")+\"\\n\",null,[\"textureSampler\",\"depthSampler\"]),this._blurVPostProcess.updateEffect(\"#define BILATERAL_BLUR\\n#define SAMPLES 16\\n#define EXPENSIVE \"+(e?\"1\":\"0\")+\"\\n\",null,[\"textureSampler\",\"depthSampler\"]),this._expensiveBlur=e,this._firstUpdate=!0},enumerable:!0,configurable:!0}),Object.defineProperty(r,\"IsSupported\",{get:function(){var e=hn.Engine.LastCreatedEngine;return!!e&&e.getCaps().drawBuffersExtension},enumerable:!0,configurable:!0}),r.prototype.dispose=function(e){void 0===e&&(e=!1);for(var t=0;t<this._scene.cameras.length;t++){var i=this._scene.cameras[t];this._originalColorPostProcess.dispose(i),this._ssaoPostProcess.dispose(i),this._blurHPostProcess.dispose(i),this._blurVPostProcess.dispose(i),this._ssaoCombinePostProcess.dispose(i)}this._randomTexture.dispose(),e&&this._scene.disableGeometryBufferRenderer(),this._scene.postProcessRenderPipelineManager.detachCamerasFromRenderPipeline(this._name,this._scene.cameras),l.prototype.dispose.call(this)},r.prototype._createBlurPostProcess=function(e,t){var i=this;this._samplerOffsets=[];for(var r=this.expensiveBlur,n=-8;n<8;n++)this._samplerOffsets.push(2*n+.5);this._blurHPostProcess=new hn.PostProcess(\"BlurH\",\"ssao2\",[\"outSize\",\"samplerOffsets\",\"near\",\"far\",\"radius\"],[\"depthSampler\"],e,null,hn.Texture.TRILINEAR_SAMPLINGMODE,this._scene.getEngine(),!1,\"#define BILATERAL_BLUR\\n#define BILATERAL_BLUR_H\\n#define SAMPLES 16\\n#define EXPENSIVE \"+(r?\"1\":\"0\")+\"\\n\"),this._blurHPostProcess.onApply=function(e){i._scene.activeCamera&&(e.setFloat(\"outSize\",0<i._ssaoCombinePostProcess.width?i._ssaoCombinePostProcess.width:i._originalColorPostProcess.width),e.setFloat(\"near\",i._scene.activeCamera.minZ),e.setFloat(\"far\",i._scene.activeCamera.maxZ),e.setFloat(\"radius\",i.radius),e.setTexture(\"depthSampler\",i._depthTexture),i._firstUpdate&&e.setArray(\"samplerOffsets\",i._samplerOffsets))},this._blurVPostProcess=new hn.PostProcess(\"BlurV\",\"ssao2\",[\"outSize\",\"samplerOffsets\",\"near\",\"far\",\"radius\"],[\"depthSampler\"],t,null,hn.Texture.TRILINEAR_SAMPLINGMODE,this._scene.getEngine(),!1,\"#define BILATERAL_BLUR\\n#define BILATERAL_BLUR_V\\n#define SAMPLES 16\\n#define EXPENSIVE \"+(r?\"1\":\"0\")+\"\\n\"),this._blurVPostProcess.onApply=function(e){i._scene.activeCamera&&(e.setFloat(\"outSize\",0<i._ssaoCombinePostProcess.height?i._ssaoCombinePostProcess.height:i._originalColorPostProcess.height),e.setFloat(\"near\",i._scene.activeCamera.minZ),e.setFloat(\"far\",i._scene.activeCamera.maxZ),e.setFloat(\"radius\",i.radius),e.setTexture(\"depthSampler\",i._depthTexture),i._firstUpdate&&(e.setArray(\"samplerOffsets\",i._samplerOffsets),i._firstUpdate=!1))},this._blurHPostProcess.samples=this.textureSamples,this._blurVPostProcess.samples=this.textureSamples},r.prototype._rebuild=function(){this._firstUpdate=!0,l.prototype._rebuild.call(this)},r.prototype._radicalInverse_VdC=function(e){return this._bits[0]=e,this._bits[0]=(this._bits[0]<<16|this._bits[0]>>16)>>>0,this._bits[0]=(1431655765&this._bits[0])<<1|(2863311530&this._bits[0])>>>1>>>0,this._bits[0]=(858993459&this._bits[0])<<2|(3435973836&this._bits[0])>>>2>>>0,this._bits[0]=(252645135&this._bits[0])<<4|(4042322160&this._bits[0])>>>4>>>0,this._bits[0]=(16711935&this._bits[0])<<8|(4278255360&this._bits[0])>>>8>>>0,2.3283064365386963e-10*this._bits[0]},r.prototype._hammersley=function(e,t){return[e/t,this._radicalInverse_VdC(e)]},r.prototype._hemisphereSample_uniform=function(e,t){var i=2*t*Math.PI,r=1-(.85*e+.15),n=Math.sqrt(1-r*r);return new hn.Vector3(Math.cos(i)*n,Math.sin(i)*n,r)},r.prototype._generateHemisphere=function(){for(var e,t=this.samples,i=[],r=0;r<t;){if(t<16)e=this._hemisphereSample_uniform(Math.random(),Math.random());else{var n=this._hammersley(r,t);e=this._hemisphereSample_uniform(n[0],n[1])}i.push(e.x,e.y,e.z),r++}return i},r.prototype._createSSAOPostProcess=function(e){var t=this,i=this.samples;this._sampleSphere=this._generateHemisphere(),this._ssaoPostProcess=new hn.PostProcess(\"ssao2\",\"ssao2\",[\"sampleSphere\",\"samplesFactor\",\"randTextureTiles\",\"totalStrength\",\"radius\",\"base\",\"range\",\"projection\",\"near\",\"far\",\"texelSize\",\"xViewport\",\"yViewport\",\"maxZ\",\"minZAspect\"],[\"randomSampler\",\"normalSampler\"],e,null,hn.Texture.BILINEAR_SAMPLINGMODE,this._scene.getEngine(),!1,\"#define SAMPLES \"+i+\"\\n#define SSAO\"),this._ssaoPostProcess.onApply=function(e){t._firstUpdate&&(e.setArray3(\"sampleSphere\",t._sampleSphere),e.setFloat(\"randTextureTiles\",32)),t._scene.activeCamera&&(e.setFloat(\"samplesFactor\",1/t.samples),e.setFloat(\"totalStrength\",t.totalStrength),e.setFloat2(\"texelSize\",1/t._ssaoPostProcess.width,1/t._ssaoPostProcess.height),e.setFloat(\"radius\",t.radius),e.setFloat(\"maxZ\",t.maxZ),e.setFloat(\"minZAspect\",t.minZAspect),e.setFloat(\"base\",t.base),e.setFloat(\"near\",t._scene.activeCamera.minZ),e.setFloat(\"far\",t._scene.activeCamera.maxZ),e.setFloat(\"xViewport\",Math.tan(t._scene.activeCamera.fov/2)*t._scene.getEngine().getAspectRatio(t._scene.activeCamera,!0)),e.setFloat(\"yViewport\",Math.tan(t._scene.activeCamera.fov/2)),e.setMatrix(\"projection\",t._scene.getProjectionMatrix()),e.setTexture(\"textureSampler\",t._depthTexture),e.setTexture(\"normalSampler\",t._normalTexture),e.setTexture(\"randomSampler\",t._randomTexture))},this._ssaoPostProcess.samples=this.textureSamples},r.prototype._createSSAOCombinePostProcess=function(e){var i=this;this._ssaoCombinePostProcess=new hn.PostProcess(\"ssaoCombine\",\"ssaoCombine\",[],[\"originalColor\",\"viewport\"],e,null,hn.Texture.BILINEAR_SAMPLINGMODE,this._scene.getEngine(),!1),this._ssaoCombinePostProcess.onApply=function(e){var t=i._scene.activeCamera.viewport;e.setVector4(\"viewport\",hn.Tmp.Vector4[0].copyFromFloats(t.x,t.y,t.width,t.height)),e.setTextureFromPostProcess(\"originalColor\",i._originalColorPostProcess)},this._ssaoCombinePostProcess.samples=this.textureSamples},r.prototype._createRandomTexture=function(){this._randomTexture=new hn.DynamicTexture(\"SSAORandomTexture\",128,this._scene,!1,hn.Texture.TRILINEAR_SAMPLINGMODE),this._randomTexture.wrapU=hn.Texture.WRAP_ADDRESSMODE,this._randomTexture.wrapV=hn.Texture.WRAP_ADDRESSMODE;for(var e=this._randomTexture.getContext(),t=function(e,t){return Math.random()*(t-e)+e},i=hn.Vector3.Zero(),r=0;r<128;r++)for(var n=0;n<128;n++)i.x=t(0,1),i.y=t(0,1),i.z=0,i.normalize(),i.scaleInPlace(255),i.x=Math.floor(i.x),i.y=Math.floor(i.y),e.fillStyle=\"rgb(\"+i.x+\", \"+i.y+\", \"+i.z+\")\",e.fillRect(r,n,1,1);this._randomTexture.update(!1)},r.prototype.serialize=function(){var e=hn.SerializationHelper.Serialize(this);return e.customType=\"SSAO2RenderingPipeline\",e},r.Parse=function(e,t,i){return hn.SerializationHelper.Parse((function(){return new r(e._name,t,e._ratio)}),e,t,i)},b([hn.serialize()],r.prototype,\"totalStrength\",void 0),b([hn.serialize()],r.prototype,\"maxZ\",void 0),b([hn.serialize()],r.prototype,\"minZAspect\",void 0),b([hn.serialize(\"samples\")],r.prototype,\"_samples\",void 0),b([hn.serialize(\"textureSamples\")],r.prototype,\"_textureSamples\",void 0),b([hn.serialize()],r.prototype,\"_ratio\",void 0),b([hn.serialize(\"expensiveBlur\")],r.prototype,\"_expensiveBlur\",void 0),b([hn.serialize()],r.prototype,\"radius\",void 0),b([hn.serialize()],r.prototype,\"base\",void 0),r})(hn.PostProcessRenderPipeline),hn.SSAO2RenderingPipeline=un,dn=$a||($a={}),fn=(function(s){function e(e,t,i,r,n){void 0===r&&(r=1);var o=s.call(this,i.getEngine(),e)||this;return o.LensChromaticAberrationEffect=\"LensChromaticAberrationEffect\",o.HighlightsEnhancingEffect=\"HighlightsEnhancingEffect\",o.LensDepthOfFieldEffect=\"LensDepthOfFieldEffect\",o._scene=i,o._depthTexture=i.enableDepthRenderer().getDepthMap(),t.grain_texture?o._grainTexture=t.grain_texture:o._createGrainTexture(),o._edgeBlur=t.edge_blur?t.edge_blur:0,o._grainAmount=t.grain_amount?t.grain_amount:0,o._chromaticAberration=t.chromatic_aberration?t.chromatic_aberration:0,o._distortion=t.distortion?t.distortion:0,o._highlightsGain=void 0!==t.dof_gain?t.dof_gain:-1,o._highlightsThreshold=t.dof_threshold?t.dof_threshold:1,o._dofDistance=void 0!==t.dof_focus_distance?t.dof_focus_distance:-1,o._dofAperture=t.dof_aperture?t.dof_aperture:1,o._dofDarken=t.dof_darken?t.dof_darken:0,o._dofPentagon=void 0===t.dof_pentagon||t.dof_pentagon,o._blurNoise=void 0===t.blur_noise||t.blur_noise,o._createChromaticAberrationPostProcess(r),o._createHighlightsPostProcess(r),o._createDepthOfFieldPostProcess(r/4),o.addEffect(new dn.PostProcessRenderEffect(i.getEngine(),o.LensChromaticAberrationEffect,function(){return o._chromaticAberrationPostProcess},!0)),o.addEffect(new dn.PostProcessRenderEffect(i.getEngine(),o.HighlightsEnhancingEffect,function(){return o._highlightsPostProcess},!0)),o.addEffect(new dn.PostProcessRenderEffect(i.getEngine(),o.LensDepthOfFieldEffect,function(){return o._depthOfFieldPostProcess},!0)),-1===o._highlightsGain&&o._disableEffect(o.HighlightsEnhancingEffect,null),i.postProcessRenderPipelineManager.addPipeline(o),n&&i.postProcessRenderPipelineManager.attachCamerasToRenderPipeline(e,n),o}return T(e,s),e.prototype.setEdgeBlur=function(e){this._edgeBlur=e},e.prototype.disableEdgeBlur=function(){this._edgeBlur=0},e.prototype.setGrainAmount=function(e){this._grainAmount=e},e.prototype.disableGrain=function(){this._grainAmount=0},e.prototype.setChromaticAberration=function(e){this._chromaticAberration=e},e.prototype.disableChromaticAberration=function(){this._chromaticAberration=0},e.prototype.setEdgeDistortion=function(e){this._distortion=e},e.prototype.disableEdgeDistortion=function(){this._distortion=0},e.prototype.setFocusDistance=function(e){this._dofDistance=e},e.prototype.disableDepthOfField=function(){this._dofDistance=-1},e.prototype.setAperture=function(e){this._dofAperture=e},e.prototype.setDarkenOutOfFocus=function(e){this._dofDarken=e},e.prototype.enablePentagonBokeh=function(){this._highlightsPostProcess.updateEffect(\"#define PENTAGON\\n\")},e.prototype.disablePentagonBokeh=function(){this._highlightsPostProcess.updateEffect()},e.prototype.enableNoiseBlur=function(){this._blurNoise=!0},e.prototype.disableNoiseBlur=function(){this._blurNoise=!1},e.prototype.setHighlightsGain=function(e){this._highlightsGain=e},e.prototype.setHighlightsThreshold=function(e){-1===this._highlightsGain&&(this._highlightsGain=1),this._highlightsThreshold=e},e.prototype.disableHighlights=function(){this._highlightsGain=-1},e.prototype.dispose=function(e){void 0===e&&(e=!1),this._scene.postProcessRenderPipelineManager.detachCamerasFromRenderPipeline(this._name,this._scene.cameras),this._chromaticAberrationPostProcess=null,this._highlightsPostProcess=null,this._depthOfFieldPostProcess=null,this._grainTexture.dispose(),e&&this._scene.disableDepthRenderer()},e.prototype._createChromaticAberrationPostProcess=function(e){var t=this;this._chromaticAberrationPostProcess=new dn.PostProcess(\"LensChromaticAberration\",\"chromaticAberration\",[\"chromatic_aberration\",\"screen_width\",\"screen_height\",\"direction\",\"radialIntensity\",\"centerPosition\"],[],e,null,dn.Texture.TRILINEAR_SAMPLINGMODE,this._scene.getEngine(),!1),this._chromaticAberrationPostProcess.onApply=function(e){e.setFloat(\"chromatic_aberration\",t._chromaticAberration),e.setFloat(\"screen_width\",t._scene.getEngine().getRenderWidth()),e.setFloat(\"screen_height\",t._scene.getEngine().getRenderHeight()),e.setFloat(\"radialIntensity\",1),e.setFloat2(\"direction\",17,17),e.setFloat2(\"centerPosition\",.5,.5)}},e.prototype._createHighlightsPostProcess=function(e){var t=this;this._highlightsPostProcess=new dn.PostProcess(\"LensHighlights\",\"lensHighlights\",[\"gain\",\"threshold\",\"screen_width\",\"screen_height\"],[],e,null,dn.Texture.TRILINEAR_SAMPLINGMODE,this._scene.getEngine(),!1,this._dofPentagon?\"#define PENTAGON\\n\":\"\"),this._highlightsPostProcess.onApply=function(e){e.setFloat(\"gain\",t._highlightsGain),e.setFloat(\"threshold\",t._highlightsThreshold),e.setTextureFromPostProcess(\"textureSampler\",t._chromaticAberrationPostProcess),e.setFloat(\"screen_width\",t._scene.getEngine().getRenderWidth()),e.setFloat(\"screen_height\",t._scene.getEngine().getRenderHeight())}},e.prototype._createDepthOfFieldPostProcess=function(e){var t=this;this._depthOfFieldPostProcess=new dn.PostProcess(\"LensDepthOfField\",\"depthOfField\",[\"grain_amount\",\"blur_noise\",\"screen_width\",\"screen_height\",\"distortion\",\"dof_enabled\",\"screen_distance\",\"aperture\",\"darken\",\"edge_blur\",\"highlights\",\"near\",\"far\"],[\"depthSampler\",\"grainSampler\",\"highlightsSampler\"],e,null,dn.Texture.TRILINEAR_SAMPLINGMODE,this._scene.getEngine(),!1),this._depthOfFieldPostProcess.onApply=function(e){e.setTexture(\"depthSampler\",t._depthTexture),e.setTexture(\"grainSampler\",t._grainTexture),e.setTextureFromPostProcess(\"textureSampler\",t._highlightsPostProcess),e.setTextureFromPostProcess(\"highlightsSampler\",t._depthOfFieldPostProcess),e.setFloat(\"grain_amount\",t._grainAmount),e.setBool(\"blur_noise\",t._blurNoise),e.setFloat(\"screen_width\",t._scene.getEngine().getRenderWidth()),e.setFloat(\"screen_height\",t._scene.getEngine().getRenderHeight()),e.setFloat(\"distortion\",t._distortion),e.setBool(\"dof_enabled\",-1!==t._dofDistance),e.setFloat(\"screen_distance\",1/(.1-1/t._dofDistance)),e.setFloat(\"aperture\",t._dofAperture),e.setFloat(\"darken\",t._dofDarken),e.setFloat(\"edge_blur\",t._edgeBlur),e.setBool(\"highlights\",-1!==t._highlightsGain),t._scene.activeCamera&&(e.setFloat(\"near\",t._scene.activeCamera.minZ),e.setFloat(\"far\",t._scene.activeCamera.maxZ))}},e.prototype._createGrainTexture=function(){this._grainTexture=new dn.DynamicTexture(\"LensNoiseTexture\",512,this._scene,!1,dn.Texture.BILINEAR_SAMPLINGMODE),this._grainTexture.wrapU=dn.Texture.WRAP_ADDRESSMODE,this._grainTexture.wrapV=dn.Texture.WRAP_ADDRESSMODE;for(var e,t,i,r=this._grainTexture.getContext(),n=0;n<512;n++)for(var o=0;o<512;o++)e=Math.floor(255*(t=.42,i=.58,Math.random()*(i-t)+t)),r.fillStyle=\"rgb(\"+e+\", \"+e+\", \"+e+\")\",r.fillRect(n,o,1,1);this._grainTexture.update(!1)},e})(dn.PostProcessRenderPipeline),dn.LensRenderingPipeline=fn,pn=$a||($a={}),_n=(function(s){function c(e,t,i,r,n){void 0===r&&(r=null);var o=s.call(this,t.getEngine(),e)||this;return o.downSampleX4PostProcess=null,o.brightPassPostProcess=null,o.blurHPostProcesses=[],o.blurVPostProcesses=[],o.textureAdderPostProcess=null,o.volumetricLightPostProcess=null,o.volumetricLightSmoothXPostProcess=null,o.volumetricLightSmoothYPostProcess=null,o.volumetricLightMergePostProces=null,o.volumetricLightFinalPostProcess=null,o.luminancePostProcess=null,o.luminanceDownSamplePostProcesses=[],o.hdrPostProcess=null,o.textureAdderFinalPostProcess=null,o.lensFlareFinalPostProcess=null,o.hdrFinalPostProcess=null,o.lensFlarePostProcess=null,o.lensFlareComposePostProcess=null,o.motionBlurPostProcess=null,o.depthOfFieldPostProcess=null,o.fxaaPostProcess=null,o.brightThreshold=1,o.blurWidth=512,o.horizontalBlur=!1,o.exposure=1,o.lensTexture=null,o.volumetricLightCoefficient=.2,o.volumetricLightPower=4,o.volumetricLightBlurScale=64,o.sourceLight=null,o.hdrMinimumLuminance=1,o.hdrDecreaseRate=.5,o.hdrIncreaseRate=.5,o.lensColorTexture=null,o.lensFlareStrength=20,o.lensFlareGhostDispersal=1.4,o.lensFlareHaloWidth=.7,o.lensFlareDistortionStrength=16,o.lensStarTexture=null,o.lensFlareDirtTexture=null,o.depthOfFieldDistance=10,o.depthOfFieldBlurWidth=64,o.motionStrength=1,o.animations=[],o._currentDepthOfFieldSource=null,o._hdrCurrentLuminance=1,o._bloomEnabled=!1,o._depthOfFieldEnabled=!1,o._vlsEnabled=!1,o._lensFlareEnabled=!1,o._hdrEnabled=!1,o._motionBlurEnabled=!1,o._fxaaEnabled=!1,o._motionBlurSamples=64,o._volumetricLightStepsCount=50,o._samples=1,o._cameras=n||[],o._scene=t,o._basePostProcess=r,o._ratio=i,o._floatTextureType=t.getEngine().getCaps().textureFloatRender?pn.Engine.TEXTURETYPE_FLOAT:pn.Engine.TEXTURETYPE_HALF_FLOAT,t.postProcessRenderPipelineManager.addPipeline(o),o._buildPipeline(),o}return T(c,s),Object.defineProperty(c.prototype,\"BloomEnabled\",{get:function(){return this._bloomEnabled},set:function(e){this._bloomEnabled!==e&&(this._bloomEnabled=e,this._buildPipeline())},enumerable:!0,configurable:!0}),Object.defineProperty(c.prototype,\"DepthOfFieldEnabled\",{get:function(){return this._depthOfFieldEnabled},set:function(e){this._depthOfFieldEnabled!==e&&(this._depthOfFieldEnabled=e,this._buildPipeline())},enumerable:!0,configurable:!0}),Object.defineProperty(c.prototype,\"LensFlareEnabled\",{get:function(){return this._lensFlareEnabled},set:function(e){this._lensFlareEnabled!==e&&(this._lensFlareEnabled=e,this._buildPipeline())},enumerable:!0,configurable:!0}),Object.defineProperty(c.prototype,\"HDREnabled\",{get:function(){return this._hdrEnabled},set:function(e){this._hdrEnabled!==e&&(this._hdrEnabled=e,this._buildPipeline())},enumerable:!0,configurable:!0}),Object.defineProperty(c.prototype,\"VLSEnabled\",{get:function(){return this._vlsEnabled},set:function(e){if(this._vlsEnabled!==e){if(e)if(!this._scene.enableGeometryBufferRenderer())return void pn.Tools.Warn(\"Geometry renderer is not supported, cannot create volumetric lights in Standard Rendering Pipeline\");this._vlsEnabled=e,this._buildPipeline()}},enumerable:!0,configurable:!0}),Object.defineProperty(c.prototype,\"MotionBlurEnabled\",{get:function(){return this._motionBlurEnabled},set:function(e){this._motionBlurEnabled!==e&&(this._motionBlurEnabled=e,this._buildPipeline())},enumerable:!0,configurable:!0}),Object.defineProperty(c.prototype,\"fxaaEnabled\",{get:function(){return this._fxaaEnabled},set:function(e){this._fxaaEnabled!==e&&(this._fxaaEnabled=e,this._buildPipeline())},enumerable:!0,configurable:!0}),Object.defineProperty(c.prototype,\"volumetricLightStepsCount\",{get:function(){return this._volumetricLightStepsCount},set:function(e){this.volumetricLightPostProcess&&this.volumetricLightPostProcess.updateEffect(\"#define VLS\\n#define NB_STEPS \"+e.toFixed(1)),this._volumetricLightStepsCount=e},enumerable:!0,configurable:!0}),Object.defineProperty(c.prototype,\"motionBlurSamples\",{get:function(){return this._motionBlurSamples},set:function(e){this.motionBlurPostProcess&&this.motionBlurPostProcess.updateEffect(\"#define MOTION_BLUR\\n#define MAX_MOTION_SAMPLES \"+e.toFixed(1)),this._motionBlurSamples=e},enumerable:!0,configurable:!0}),Object.defineProperty(c.prototype,\"samples\",{get:function(){return this._samples},set:function(e){this._samples!==e&&(this._samples=e,this._buildPipeline())},enumerable:!0,configurable:!0}),c.prototype._buildPipeline=function(){var t=this,e=this._ratio,i=this._scene;this._disposePostProcesses(),this._reset(),this._basePostProcess?this.originalPostProcess=this._basePostProcess:(this.originalPostProcess=new pn.PostProcess(\"HDRPass\",\"standard\",[],[],e,null,pn.Texture.BILINEAR_SAMPLINGMODE,i.getEngine(),!1,\"#define PASS_POST_PROCESS\",this._floatTextureType),this.originalPostProcess.onApply=function(e){t._currentDepthOfFieldSource=t.originalPostProcess}),(this._bloomEnabled||this._vlsEnabled||this._lensFlareEnabled||this._depthOfFieldEnabled||this._motionBlurEnabled)&&this.addEffect(new pn.PostProcessRenderEffect(i.getEngine(),\"HDRPassPostProcess\",function(){return t.originalPostProcess},!0)),this._currentDepthOfFieldSource=this.originalPostProcess,this._bloomEnabled&&(this._createDownSampleX4PostProcess(i,e/2),this._createBrightPassPostProcess(i,e/2),this._createBlurPostProcesses(i,e/4,1),this._createTextureAdderPostProcess(i,e),this.textureAdderFinalPostProcess=new pn.PostProcess(\"HDRDepthOfFieldSource\",\"standard\",[],[],e,null,pn.Texture.BILINEAR_SAMPLINGMODE,i.getEngine(),!1,\"#define PASS_POST_PROCESS\",pn.Engine.TEXTURETYPE_UNSIGNED_INT),this.addEffect(new pn.PostProcessRenderEffect(i.getEngine(),\"HDRBaseDepthOfFieldSource\",function(){return t.textureAdderFinalPostProcess},!0))),this._vlsEnabled&&(this._createVolumetricLightPostProcess(i,e),this.volumetricLightFinalPostProcess=new pn.PostProcess(\"HDRVLSFinal\",\"standard\",[],[],e,null,pn.Texture.BILINEAR_SAMPLINGMODE,i.getEngine(),!1,\"#define PASS_POST_PROCESS\",pn.Engine.TEXTURETYPE_UNSIGNED_INT),this.addEffect(new pn.PostProcessRenderEffect(i.getEngine(),\"HDRVLSFinal\",function(){return t.volumetricLightFinalPostProcess},!0))),this._lensFlareEnabled&&(this._createLensFlarePostProcess(i,e),this.lensFlareFinalPostProcess=new pn.PostProcess(\"HDRPostLensFlareDepthOfFieldSource\",\"standard\",[],[],e,null,pn.Texture.BILINEAR_SAMPLINGMODE,i.getEngine(),!1,\"#define PASS_POST_PROCESS\",pn.Engine.TEXTURETYPE_UNSIGNED_INT),this.addEffect(new pn.PostProcessRenderEffect(i.getEngine(),\"HDRPostLensFlareDepthOfFieldSource\",function(){return t.lensFlareFinalPostProcess},!0))),this._hdrEnabled&&(this._createLuminancePostProcesses(i,this._floatTextureType),this._createHdrPostProcess(i,e),this.hdrFinalPostProcess=new pn.PostProcess(\"HDRPostHDReDepthOfFieldSource\",\"standard\",[],[],e,null,pn.Texture.BILINEAR_SAMPLINGMODE,i.getEngine(),!1,\"#define PASS_POST_PROCESS\",pn.Engine.TEXTURETYPE_UNSIGNED_INT),this.addEffect(new pn.PostProcessRenderEffect(i.getEngine(),\"HDRPostHDReDepthOfFieldSource\",function(){return t.hdrFinalPostProcess},!0))),this._depthOfFieldEnabled&&(this._createBlurPostProcesses(i,e/2,3,\"depthOfFieldBlurWidth\"),this._createDepthOfFieldPostProcess(i,e)),this._motionBlurEnabled&&this._createMotionBlurPostProcess(i,e),this._fxaaEnabled&&(this.fxaaPostProcess=new pn.FxaaPostProcess(\"fxaa\",1,null,pn.Texture.BILINEAR_SAMPLINGMODE,i.getEngine(),!1,pn.Engine.TEXTURETYPE_UNSIGNED_INT),this.addEffect(new pn.PostProcessRenderEffect(i.getEngine(),\"HDRFxaa\",function(){return t.fxaaPostProcess},!0))),null!==this._cameras&&this._scene.postProcessRenderPipelineManager.attachCamerasToRenderPipeline(this._name,this._cameras),!this._enableMSAAOnFirstPostProcess(this._samples)&&1<this._samples&&pn.Tools.Warn(\"MSAA failed to enable, MSAA is only supported in browsers that support webGL >= 2.0\")},c.prototype._createDownSampleX4PostProcess=function(e,t){var s=this,a=new Array(32);this.downSampleX4PostProcess=new pn.PostProcess(\"HDRDownSampleX4\",\"standard\",[\"dsOffsets\"],[],t,null,pn.Texture.BILINEAR_SAMPLINGMODE,e.getEngine(),!1,\"#define DOWN_SAMPLE_X4\",pn.Engine.TEXTURETYPE_UNSIGNED_INT),this.downSampleX4PostProcess.onApply=function(e){for(var t=0,i=s.downSampleX4PostProcess.width,r=s.downSampleX4PostProcess.height,n=-2;n<2;n++)for(var o=-2;o<2;o++)a[t]=(n+.5)*(1/i),a[t+1]=(o+.5)*(1/r),t+=2;e.setArray2(\"dsOffsets\",a)},this.addEffect(new pn.PostProcessRenderEffect(e.getEngine(),\"HDRDownSampleX4\",function(){return s.downSampleX4PostProcess},!0))},c.prototype._createBrightPassPostProcess=function(e,t){var r=this,n=new Array(8);this.brightPassPostProcess=new pn.PostProcess(\"HDRBrightPass\",\"standard\",[\"dsOffsets\",\"brightThreshold\"],[],t,null,pn.Texture.BILINEAR_SAMPLINGMODE,e.getEngine(),!1,\"#define BRIGHT_PASS\",pn.Engine.TEXTURETYPE_UNSIGNED_INT),this.brightPassPostProcess.onApply=function(e){var t=1/r.brightPassPostProcess.width,i=1/r.brightPassPostProcess.height;n[0]=-.5*t,n[1]=.5*i,n[2]=.5*t,n[3]=.5*i,n[4]=-.5*t,n[5]=-.5*i,n[6]=.5*t,n[7]=-.5*i,e.setArray2(\"dsOffsets\",n),e.setFloat(\"brightThreshold\",r.brightThreshold)},this.addEffect(new pn.PostProcessRenderEffect(e.getEngine(),\"HDRBrightPass\",function(){return r.brightPassPostProcess},!0))},c.prototype._createBlurPostProcesses=function(e,t,i,r){var n=this;void 0===r&&(r=\"blurWidth\");var o=e.getEngine(),s=new pn.BlurPostProcess(\"HDRBlurH_\"+i,new pn.Vector2(1,0),this[r],t,null,pn.Texture.BILINEAR_SAMPLINGMODE,e.getEngine(),!1,pn.Engine.TEXTURETYPE_UNSIGNED_INT),a=new pn.BlurPostProcess(\"HDRBlurV_\"+i,new pn.Vector2(0,1),this[r],t,null,pn.Texture.BILINEAR_SAMPLINGMODE,e.getEngine(),!1,pn.Engine.TEXTURETYPE_UNSIGNED_INT);s.onActivateObservable.add((function(){var e=s.width/o.getRenderWidth();s.kernel=n[r]*e})),a.onActivateObservable.add((function(){var e=a.height/o.getRenderHeight();a.kernel=n.horizontalBlur?64*e:n[r]*e})),this.addEffect(new pn.PostProcessRenderEffect(e.getEngine(),\"HDRBlurH\"+i,function(){return s},!0)),this.addEffect(new pn.PostProcessRenderEffect(e.getEngine(),\"HDRBlurV\"+i,function(){return a},!0)),this.blurHPostProcesses.push(s),this.blurVPostProcesses.push(a)},c.prototype._createTextureAdderPostProcess=function(e,t){var i=this;this.textureAdderPostProcess=new pn.PostProcess(\"HDRTextureAdder\",\"standard\",[\"exposure\"],[\"otherSampler\",\"lensSampler\"],t,null,pn.Texture.BILINEAR_SAMPLINGMODE,e.getEngine(),!1,\"#define TEXTURE_ADDER\",pn.Engine.TEXTURETYPE_UNSIGNED_INT),this.textureAdderPostProcess.onApply=function(e){e.setTextureFromPostProcess(\"otherSampler\",i._vlsEnabled?i._currentDepthOfFieldSource:i.originalPostProcess),e.setTexture(\"lensSampler\",i.lensTexture),e.setFloat(\"exposure\",i.exposure),i._currentDepthOfFieldSource=i.textureAdderFinalPostProcess},this.addEffect(new pn.PostProcessRenderEffect(e.getEngine(),\"HDRTextureAdder\",function(){return i.textureAdderPostProcess},!0))},c.prototype._createVolumetricLightPostProcess=function(e,t){var i=this,r=e.enableGeometryBufferRenderer();r.enablePosition=!0;var n=r.getGBuffer();this.volumetricLightPostProcess=new pn.PostProcess(\"HDRVLS\",\"standard\",[\"shadowViewProjection\",\"cameraPosition\",\"sunDirection\",\"sunColor\",\"scatteringCoefficient\",\"scatteringPower\",\"depthValues\"],[\"shadowMapSampler\",\"positionSampler\"],t/8,null,pn.Texture.BILINEAR_SAMPLINGMODE,e.getEngine(),!1,\"#define VLS\\n#define NB_STEPS \"+this._volumetricLightStepsCount.toFixed(1));var o=pn.Vector2.Zero();this.volumetricLightPostProcess.onApply=function(e){if(i.sourceLight&&i.sourceLight.getShadowGenerator()&&i._scene.activeCamera){var t=i.sourceLight.getShadowGenerator();e.setTexture(\"shadowMapSampler\",t.getShadowMap()),e.setTexture(\"positionSampler\",n.textures[2]),e.setColor3(\"sunColor\",i.sourceLight.diffuse),e.setVector3(\"sunDirection\",i.sourceLight.getShadowDirection()),e.setVector3(\"cameraPosition\",i._scene.activeCamera.globalPosition),e.setMatrix(\"shadowViewProjection\",t.getTransformMatrix()),e.setFloat(\"scatteringCoefficient\",i.volumetricLightCoefficient),e.setFloat(\"scatteringPower\",i.volumetricLightPower),o.x=i.sourceLight.getDepthMinZ(i._scene.activeCamera),o.y=i.sourceLight.getDepthMaxZ(i._scene.activeCamera),e.setVector2(\"depthValues\",o)}},this.addEffect(new pn.PostProcessRenderEffect(e.getEngine(),\"HDRVLS\",function(){return i.volumetricLightPostProcess},!0)),this._createBlurPostProcesses(e,t/4,0,\"volumetricLightBlurScale\"),this.volumetricLightMergePostProces=new pn.PostProcess(\"HDRVLSMerge\",\"standard\",[],[\"originalSampler\"],t,null,pn.Texture.BILINEAR_SAMPLINGMODE,e.getEngine(),!1,\"#define VLSMERGE\"),this.volumetricLightMergePostProces.onApply=function(e){e.setTextureFromPostProcess(\"originalSampler\",i._bloomEnabled?i.textureAdderFinalPostProcess:i.originalPostProcess),i._currentDepthOfFieldSource=i.volumetricLightFinalPostProcess},this.addEffect(new pn.PostProcessRenderEffect(e.getEngine(),\"HDRVLSMerge\",function(){return i.volumetricLightMergePostProces},!0))},c.prototype._createLuminancePostProcesses=function(r,e){var a=this,t=Math.pow(3,c.LuminanceSteps);this.luminancePostProcess=new pn.PostProcess(\"HDRLuminance\",\"standard\",[\"lumOffsets\"],[],{width:t,height:t},null,pn.Texture.BILINEAR_SAMPLINGMODE,r.getEngine(),!1,\"#define LUMINANCE\",e);var n=[];this.luminancePostProcess.onApply=function(e){var t=1/a.luminancePostProcess.width,i=1/a.luminancePostProcess.height;n[0]=-.5*t,n[1]=.5*i,n[2]=.5*t,n[3]=.5*i,n[4]=-.5*t,n[5]=-.5*i,n[6]=.5*t,n[7]=-.5*i,e.setArray2(\"lumOffsets\",n)},this.addEffect(new pn.PostProcessRenderEffect(r.getEngine(),\"HDRLuminance\",function(){return a.luminancePostProcess},!0));for(var i=c.LuminanceSteps-1;0<=i;i--){t=Math.pow(3,i);var o=\"#define LUMINANCE_DOWN_SAMPLE\\n\";0===i&&(o+=\"#define FINAL_DOWN_SAMPLER\");var s=new pn.PostProcess(\"HDRLuminanceDownSample\"+i,\"standard\",[\"dsOffsets\",\"halfDestPixelSize\"],[],{width:t,height:t},null,pn.Texture.BILINEAR_SAMPLINGMODE,r.getEngine(),!1,o,e);this.luminanceDownSamplePostProcesses.push(s)}var l=this.luminancePostProcess;this.luminanceDownSamplePostProcesses.forEach((function(n,o){var s=new Array(18);n.onApply=function(e){if(l){for(var t=0,i=-1;i<2;i++)for(var r=-1;r<2;r++)s[t]=i/l.width,s[t+1]=r/l.height,t+=2;e.setArray2(\"dsOffsets\",s),e.setFloat(\"halfDestPixelSize\",.5/l.width),l=o===a.luminanceDownSamplePostProcesses.length-1?a.luminancePostProcess:n}},o===a.luminanceDownSamplePostProcesses.length-1&&(n.onAfterRender=function(e){var t=r.getEngine().readPixels(0,0,1,1),i=new pn.Vector4(1/16581375,1/65025,1/255,1);a._hdrCurrentLuminance=(t[0]*i.x+t[1]*i.y+t[2]*i.z+t[3]*i.w)/100}),a.addEffect(new pn.PostProcessRenderEffect(r.getEngine(),\"HDRLuminanceDownSample\"+o,function(){return n},!0))}))},c.prototype._createHdrPostProcess=function(i,e){var r=this;this.hdrPostProcess=new pn.PostProcess(\"HDR\",\"standard\",[\"averageLuminance\"],[\"textureAdderSampler\"],e,null,pn.Texture.BILINEAR_SAMPLINGMODE,i.getEngine(),!1,\"#define HDR\",pn.Engine.TEXTURETYPE_UNSIGNED_INT);var n=1,o=0,s=0;this.hdrPostProcess.onApply=function(e){if(e.setTextureFromPostProcess(\"textureAdderSampler\",r._currentDepthOfFieldSource),o+=i.getEngine().getDeltaTime(),n<0)n=r._hdrCurrentLuminance;else{var t=(s-o)/1e3;r._hdrCurrentLuminance<n+r.hdrDecreaseRate*t?n+=r.hdrDecreaseRate*t:r._hdrCurrentLuminance>n-r.hdrIncreaseRate*t?n-=r.hdrIncreaseRate*t:n=r._hdrCurrentLuminance}n=pn.Scalar.Clamp(n,r.hdrMinimumLuminance,1e20),e.setFloat(\"averageLuminance\",n),s=o,r._currentDepthOfFieldSource=r.hdrFinalPostProcess},this.addEffect(new pn.PostProcessRenderEffect(i.getEngine(),\"HDR\",function(){return r.hdrPostProcess},!0))},c.prototype._createLensFlarePostProcess=function(e,t){var s=this;this.lensFlarePostProcess=new pn.PostProcess(\"HDRLensFlare\",\"standard\",[\"strength\",\"ghostDispersal\",\"haloWidth\",\"resolution\",\"distortionStrength\"],[\"lensColorSampler\"],t/2,null,pn.Texture.BILINEAR_SAMPLINGMODE,e.getEngine(),!1,\"#define LENS_FLARE\",pn.Engine.TEXTURETYPE_UNSIGNED_INT),this.addEffect(new pn.PostProcessRenderEffect(e.getEngine(),\"HDRLensFlare\",function(){return s.lensFlarePostProcess},!0)),this._createBlurPostProcesses(e,t/4,2),this.lensFlareComposePostProcess=new pn.PostProcess(\"HDRLensFlareCompose\",\"standard\",[\"lensStarMatrix\"],[\"otherSampler\",\"lensDirtSampler\",\"lensStarSampler\"],t,null,pn.Texture.BILINEAR_SAMPLINGMODE,e.getEngine(),!1,\"#define LENS_FLARE_COMPOSE\",pn.Engine.TEXTURETYPE_UNSIGNED_INT),this.addEffect(new pn.PostProcessRenderEffect(e.getEngine(),\"HDRLensFlareCompose\",function(){return s.lensFlareComposePostProcess},!0));var i=new pn.Vector2(0,0);this.lensFlarePostProcess.onApply=function(e){e.setTextureFromPostProcess(\"textureSampler\",s._bloomEnabled?s.blurHPostProcesses[0]:s.originalPostProcess),e.setTexture(\"lensColorSampler\",s.lensColorTexture),e.setFloat(\"strength\",s.lensFlareStrength),e.setFloat(\"ghostDispersal\",s.lensFlareGhostDispersal),e.setFloat(\"haloWidth\",s.lensFlareHaloWidth),i.x=s.lensFlarePostProcess.width,i.y=s.lensFlarePostProcess.height,e.setVector2(\"resolution\",i),e.setFloat(\"distortionStrength\",s.lensFlareDistortionStrength)};var a=pn.Matrix.FromValues(2,0,-1,0,0,2,-1,0,0,0,1,0,0,0,0,1),l=pn.Matrix.FromValues(.5,0,.5,0,0,.5,.5,0,0,0,1,0,0,0,0,1);this.lensFlareComposePostProcess.onApply=function(e){if(s._scene.activeCamera){e.setTextureFromPostProcess(\"otherSampler\",s._currentDepthOfFieldSource),e.setTexture(\"lensDirtSampler\",s.lensFlareDirtTexture),e.setTexture(\"lensStarSampler\",s.lensStarTexture);var t=s._scene.activeCamera.getViewMatrix().getRow(0),i=s._scene.activeCamera.getViewMatrix().getRow(2),r=pn.Vector3.Dot(t.toVector3(),new pn.Vector3(1,0,0))+pn.Vector3.Dot(i.toVector3(),new pn.Vector3(0,0,1));r*=4;var n=pn.Matrix.FromValues(.5*Math.cos(r),-Math.sin(r),0,0,Math.sin(r),.5*Math.cos(r),0,0,0,0,1,0,0,0,0,1),o=l.multiply(n).multiply(a);e.setMatrix(\"lensStarMatrix\",o),s._currentDepthOfFieldSource=s.lensFlareFinalPostProcess}}},c.prototype._createDepthOfFieldPostProcess=function(e,t){var i=this;this.depthOfFieldPostProcess=new pn.PostProcess(\"HDRDepthOfField\",\"standard\",[\"distance\"],[\"otherSampler\",\"depthSampler\"],t,null,pn.Texture.BILINEAR_SAMPLINGMODE,e.getEngine(),!1,\"#define DEPTH_OF_FIELD\",pn.Engine.TEXTURETYPE_UNSIGNED_INT),this.depthOfFieldPostProcess.onApply=function(e){e.setTextureFromPostProcess(\"otherSampler\",i._currentDepthOfFieldSource),e.setTexture(\"depthSampler\",i._getDepthTexture()),e.setFloat(\"distance\",i.depthOfFieldDistance)},this.addEffect(new pn.PostProcessRenderEffect(e.getEngine(),\"HDRDepthOfField\",function(){return i.depthOfFieldPostProcess},!0))},c.prototype._createMotionBlurPostProcess=function(t,e){var i=this;this.motionBlurPostProcess=new pn.PostProcess(\"HDRMotionBlur\",\"standard\",[\"inverseViewProjection\",\"prevViewProjection\",\"screenSize\",\"motionScale\",\"motionStrength\"],[\"depthSampler\"],e,null,pn.Texture.BILINEAR_SAMPLINGMODE,t.getEngine(),!1,\"#define MOTION_BLUR\\n#define MAX_MOTION_SAMPLES \"+this.motionBlurSamples.toFixed(1),pn.Engine.TEXTURETYPE_UNSIGNED_INT);var r=0,n=pn.Matrix.Identity(),o=pn.Matrix.Identity(),s=pn.Matrix.Identity(),a=pn.Vector2.Zero();this.motionBlurPostProcess.onApply=function(e){(s=t.getProjectionMatrix().multiply(t.getViewMatrix())).invertToRef(o),e.setMatrix(\"inverseViewProjection\",o),e.setMatrix(\"prevViewProjection\",n),n=s,a.x=i.motionBlurPostProcess.width,a.y=i.motionBlurPostProcess.height,e.setVector2(\"screenSize\",a),r=t.getEngine().getFps()/60,e.setFloat(\"motionScale\",r),e.setFloat(\"motionStrength\",i.motionStrength),e.setTexture(\"depthSampler\",i._getDepthTexture())},this.addEffect(new pn.PostProcessRenderEffect(t.getEngine(),\"HDRMotionBlur\",function(){return i.motionBlurPostProcess},!0))},c.prototype._getDepthTexture=function(){return this._scene.getEngine().getCaps().drawBuffersExtension?this._scene.enableGeometryBufferRenderer().getGBuffer().textures[0]:this._scene.enableDepthRenderer().getDepthMap()},c.prototype._disposePostProcesses=function(){for(var e=0;e<this._cameras.length;e++){var t=this._cameras[e];this.originalPostProcess&&this.originalPostProcess.dispose(t),this.downSampleX4PostProcess&&this.downSampleX4PostProcess.dispose(t),this.brightPassPostProcess&&this.brightPassPostProcess.dispose(t),this.textureAdderPostProcess&&this.textureAdderPostProcess.dispose(t),this.textureAdderFinalPostProcess&&this.textureAdderFinalPostProcess.dispose(t),this.volumetricLightPostProcess&&this.volumetricLightPostProcess.dispose(t),this.volumetricLightSmoothXPostProcess&&this.volumetricLightSmoothXPostProcess.dispose(t),this.volumetricLightSmoothYPostProcess&&this.volumetricLightSmoothYPostProcess.dispose(t),this.volumetricLightMergePostProces&&this.volumetricLightMergePostProces.dispose(t),this.volumetricLightFinalPostProcess&&this.volumetricLightFinalPostProcess.dispose(t),this.lensFlarePostProcess&&this.lensFlarePostProcess.dispose(t),this.lensFlareComposePostProcess&&this.lensFlareComposePostProcess.dispose(t);for(var i=0;i<this.luminanceDownSamplePostProcesses.length;i++)this.luminanceDownSamplePostProcesses[i].dispose(t);this.luminancePostProcess&&this.luminancePostProcess.dispose(t),this.hdrPostProcess&&this.hdrPostProcess.dispose(t),this.hdrFinalPostProcess&&this.hdrFinalPostProcess.dispose(t),this.depthOfFieldPostProcess&&this.depthOfFieldPostProcess.dispose(t),this.motionBlurPostProcess&&this.motionBlurPostProcess.dispose(t),this.fxaaPostProcess&&this.fxaaPostProcess.dispose(t);for(i=0;i<this.blurHPostProcesses.length;i++)this.blurHPostProcesses[i].dispose(t);for(i=0;i<this.blurVPostProcesses.length;i++)this.blurVPostProcesses[i].dispose(t)}this.originalPostProcess=null,this.downSampleX4PostProcess=null,this.brightPassPostProcess=null,this.textureAdderPostProcess=null,this.textureAdderFinalPostProcess=null,this.volumetricLightPostProcess=null,this.volumetricLightSmoothXPostProcess=null,this.volumetricLightSmoothYPostProcess=null,this.volumetricLightMergePostProces=null,this.volumetricLightFinalPostProcess=null,this.lensFlarePostProcess=null,this.lensFlareComposePostProcess=null,this.luminancePostProcess=null,this.hdrPostProcess=null,this.hdrFinalPostProcess=null,this.depthOfFieldPostProcess=null,this.motionBlurPostProcess=null,this.fxaaPostProcess=null,this.luminanceDownSamplePostProcesses=[],this.blurHPostProcesses=[],this.blurVPostProcesses=[]},c.prototype.dispose=function(){this._disposePostProcesses(),this._scene.postProcessRenderPipelineManager.detachCamerasFromRenderPipeline(this._name,this._cameras),s.prototype.dispose.call(this)},c.prototype.serialize=function(){var e=pn.SerializationHelper.Serialize(this);return this.sourceLight&&(e.sourceLightId=this.sourceLight.id),e.customType=\"StandardRenderingPipeline\",e},c.Parse=function(e,t,i){var r=pn.SerializationHelper.Parse((function(){return new c(e._name,t,e._ratio)}),e,t,i);return e.sourceLightId&&(r.sourceLight=t.getLightByID(e.sourceLightId)),r},c.LuminanceSteps=6,b([pn.serialize()],c.prototype,\"brightThreshold\",void 0),b([pn.serialize()],c.prototype,\"blurWidth\",void 0),b([pn.serialize()],c.prototype,\"horizontalBlur\",void 0),b([pn.serialize()],c.prototype,\"exposure\",void 0),b([pn.serializeAsTexture(\"lensTexture\")],c.prototype,\"lensTexture\",void 0),b([pn.serialize()],c.prototype,\"volumetricLightCoefficient\",void 0),b([pn.serialize()],c.prototype,\"volumetricLightPower\",void 0),b([pn.serialize()],c.prototype,\"volumetricLightBlurScale\",void 0),b([pn.serialize()],c.prototype,\"hdrMinimumLuminance\",void 0),b([pn.serialize()],c.prototype,\"hdrDecreaseRate\",void 0),b([pn.serialize()],c.prototype,\"hdrIncreaseRate\",void 0),b([pn.serializeAsTexture(\"lensColorTexture\")],c.prototype,\"lensColorTexture\",void 0),b([pn.serialize()],c.prototype,\"lensFlareStrength\",void 0),b([pn.serialize()],c.prototype,\"lensFlareGhostDispersal\",void 0),b([pn.serialize()],c.prototype,\"lensFlareHaloWidth\",void 0),b([pn.serialize()],c.prototype,\"lensFlareDistortionStrength\",void 0),b([pn.serializeAsTexture(\"lensStarTexture\")],c.prototype,\"lensStarTexture\",void 0),b([pn.serializeAsTexture(\"lensFlareDirtTexture\")],c.prototype,\"lensFlareDirtTexture\",void 0),b([pn.serialize()],c.prototype,\"depthOfFieldDistance\",void 0),b([pn.serialize()],c.prototype,\"depthOfFieldBlurWidth\",void 0),b([pn.serialize()],c.prototype,\"motionStrength\",void 0),b([pn.serialize()],c.prototype,\"_ratio\",void 0),b([pn.serialize()],c.prototype,\"BloomEnabled\",null),b([pn.serialize()],c.prototype,\"DepthOfFieldEnabled\",null),b([pn.serialize()],c.prototype,\"LensFlareEnabled\",null),b([pn.serialize()],c.prototype,\"HDREnabled\",null),b([pn.serialize()],c.prototype,\"VLSEnabled\",null),b([pn.serialize()],c.prototype,\"MotionBlurEnabled\",null),b([pn.serialize()],c.prototype,\"fxaaEnabled\",null),b([pn.serialize()],c.prototype,\"volumetricLightStepsCount\",null),b([pn.serialize()],c.prototype,\"motionBlurSamples\",null),b([pn.serialize()],c.prototype,\"samples\",null),c})(pn.PostProcessRenderPipeline),pn.StandardRenderingPipeline=_n,mn=$a||($a={}),gn=(function(c){function e(e,t,i,r,n,o,s){void 0===i&&(i=null),void 0===s&&(s=mn.Engine.TEXTURETYPE_UNSIGNED_INT);var a=c.call(this,e,\"fxaa\",[\"texelSize\"],null,t,i,r||mn.Texture.BILINEAR_SAMPLINGMODE,n,o,null,s,\"fxaa\",void 0,!0)||this,l=a._getDefines();return a.updateEffect(l),a.onApplyObservable.add((function(e){var t=a.texelSize;e.setFloat2(\"texelSize\",t.x,t.y)})),a}return T(e,c),e.prototype._getDefines=function(){var e=this.getEngine();if(!e)return null;var t=e.getGlInfo();return t&&t.renderer&&-1<t.renderer.toLowerCase().indexOf(\"mali\")?\"#define MALI 1\\n\":null},e})(mn.PostProcess),mn.FxaaPostProcess=gn,vn=$a||($a={}),yn=(function(u){function e(e,t,i,r,n,o,s,a,l,c){void 0===l&&(l=vn.Engine.TEXTURETYPE_UNSIGNED_INT),void 0===c&&(c=!1);var h=u.call(this,e,\"chromaticAberration\",[\"chromatic_aberration\",\"screen_width\",\"screen_height\",\"direction\",\"radialIntensity\",\"centerPosition\"],[],r,n,o,s,a,null,l,void 0,null,c)||this;return h.aberrationAmount=30,h.radialIntensity=0,h.direction=new vn.Vector2(.707,.707),h.centerPosition=new vn.Vector2(.5,.5),h.onApplyObservable.add((function(e){e.setFloat(\"chromatic_aberration\",h.aberrationAmount),e.setFloat(\"screen_width\",t),e.setFloat(\"screen_height\",i),e.setFloat(\"radialIntensity\",h.radialIntensity),e.setFloat2(\"direction\",h.direction.x,h.direction.y),e.setFloat2(\"centerPosition\",h.centerPosition.x,h.centerPosition.y)})),h}return T(e,u),e})(vn.PostProcess),vn.ChromaticAberrationPostProcess=yn,bn=$a||($a={}),Tn=(function(c){function e(e,t,i,r,n,o,s,a){void 0===s&&(s=bn.Engine.TEXTURETYPE_UNSIGNED_INT),void 0===a&&(a=!1);var l=c.call(this,e,\"grain\",[\"intensity\",\"animatedSeed\"],[],t,i,r,n,o,null,s,void 0,null,a)||this;return l.intensity=30,l.animated=!1,l.onApplyObservable.add((function(e){e.setFloat(\"intensity\",l.intensity),e.setFloat(\"animatedSeed\",l.animated?Math.random()+1:1)})),l}return T(e,c),e})(bn.PostProcess),bn.GrainPostProcess=Tn,En=$a||($a={}),xn=(function(c){function e(e,t,i,r,n,o,s,a){void 0===s&&(s=En.Engine.TEXTURETYPE_UNSIGNED_INT),void 0===a&&(a=!1);var l=c.call(this,e,\"sharpen\",[\"sharpnessAmounts\",\"screenSize\"],null,t,i,r,n,o,null,s,void 0,null,a)||this;return l.colorAmount=1,l.edgeAmount=.3,l.onApply=function(e){e.setFloat2(\"screenSize\",l.width,l.height),e.setFloat2(\"sharpnessAmounts\",l.edgeAmount,l.colorAmount)},l}return T(e,c),e})(En.PostProcess),En.SharpenPostProcess=xn,Pn=$a||($a={}),An=(function(E){function e(e,t,i,r,n,o,s,a,l,c,h){void 0===o&&(o=Pn.Texture.BILINEAR_SAMPLINGMODE),void 0===l&&(l=Pn.Engine.TEXTURETYPE_UNSIGNED_INT),void 0===c&&(c=\"\"),void 0===h&&(h=!1);var u=E.call(this,e,\"kernelBlur\",[\"delta\",\"direction\",\"cameraMinMaxZ\"],[\"circleOfConfusionSampler\"],r,n,o,s,a,null,l,\"kernelBlur\",{varyingCount:0,depCount:0},!0)||this;return u.direction=t,u.blockCompilation=h,u._packedFloat=!1,u._staticDefines=\"\",u._staticDefines=c,u.onApplyObservable.add((function(e){u._outputTexture?e.setFloat2(\"delta\",1/u._outputTexture.width*u.direction.x,1/u._outputTexture.height*u.direction.y):e.setFloat2(\"delta\",1/u.width*u.direction.x,1/u.height*u.direction.y)})),u.kernel=i,u}return T(e,E),Object.defineProperty(e.prototype,\"kernel\",{get:function(){return this._idealKernel},set:function(e){this._idealKernel!==e&&(e=Math.max(e,1),this._idealKernel=e,this._kernel=this._nearestBestKernel(e),this.blockCompilation||this._updateParameters())},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,\"packedFloat\",{get:function(){return this._packedFloat},set:function(e){this._packedFloat!==e&&(this._packedFloat=e,this.blockCompilation||this._updateParameters())},enumerable:!0,configurable:!0}),e.prototype.updateEffect=function(e,t,i,r,n,o){void 0===e&&(e=null),void 0===t&&(t=null),void 0===i&&(i=null),this._updateParameters(n,o)},e.prototype._updateParameters=function(e,t){for(var i=this._kernel,r=(i-1)/2,n=[],o=[],s=0,a=0;a<i;a++){var l=a/(i-1),c=this._gaussianWeight(2*l-1);n[a]=a-r,s+=o[a]=c}for(a=0;a<o.length;a++)o[a]/=s;var h=[],u=[],d=[];for(a=0;a<=r;a+=2){var f=Math.min(a+1,Math.floor(r));if(a===f)d.push({o:n[a],w:o[a]});else{var p=f===r,_=o[a]+o[f]*(p?.5:1),m=n[a]+1/(1+o[a]/o[f]);0===m?(d.push({o:n[a],w:o[a]}),d.push({o:n[a+1],w:o[a+1]})):(d.push({o:m,w:_}),d.push({o:-m,w:_}))}}for(a=0;a<d.length;a++)u[a]=d[a].o,h[a]=d[a].w;n=u,o=h;var g=this.getEngine().getCaps().maxVaryingVectors,v=Math.max(g,0)-1,y=Math.min(n.length,v),b=\"\";b+=this._staticDefines,-1!=this._staticDefines.indexOf(\"DOF\")&&(b+=\"#define CENTER_WEIGHT \"+this._glslFloat(o[y-1])+\"\\r\\n\",y--);for(a=0;a<y;a++)b+=\"#define KERNEL_OFFSET\"+a+\" \"+this._glslFloat(n[a])+\"\\r\\n\",b+=\"#define KERNEL_WEIGHT\"+a+\" \"+this._glslFloat(o[a])+\"\\r\\n\";var T=0;for(a=v;a<n.length;a++)b+=\"#define KERNEL_DEP_OFFSET\"+T+\" \"+this._glslFloat(n[a])+\"\\r\\n\",b+=\"#define KERNEL_DEP_WEIGHT\"+T+\" \"+this._glslFloat(o[a])+\"\\r\\n\",T++;this.packedFloat&&(b+=\"#define PACKEDFLOAT 1\"),this.blockCompilation=!1,E.prototype.updateEffect.call(this,b,null,null,{varyingCount:y,depCount:T},e,t)},e.prototype._nearestBestKernel=function(e){for(var t=Math.round(e),i=0,r=[t,t-1,t+1,t-2,t+2];i<r.length;i++){var n=r[i];if(n%2!=0&&Math.floor(n/2)%2==0&&0<n)return Math.max(n,3)}return Math.max(t,3)},e.prototype._gaussianWeight=function(e){var t=-e*e/(1/3*2*(1/3));return 1/(Math.sqrt(2*Math.PI)*(1/3))*Math.exp(t)},e.prototype._glslFloat=function(e,t){return void 0===t&&(t=8),e.toFixed(t).replace(/0+$/,\"\")},e})(Pn.PostProcess),Pn.BlurPostProcess=An,Sn=$a||($a={}),Mn=(function(p){function e(e,t,i,r,n,o,s,a,l,c,h,u,d){void 0===a&&(a=null),void 0===l&&(l=Sn.Texture.BILINEAR_SAMPLINGMODE),void 0===u&&(u=Sn.Engine.TEXTURETYPE_UNSIGNED_INT),void 0===d&&(d=!1);var f=p.call(this,e,i,r,n,o,l=Sn.Texture.BILINEAR_SAMPLINGMODE,c,h,u=Sn.Engine.TEXTURETYPE_UNSIGNED_INT,\"#define DOF 1\\r\\n\",d)||this;return f.direction=i,f.onApplyObservable.add((function(e){null!=a&&e.setTextureFromPostProcess(\"textureSampler\",a),e.setTextureFromPostProcessOutput(\"circleOfConfusionSampler\",s),t.activeCamera&&e.setFloat2(\"cameraMinMaxZ\",t.activeCamera.minZ,t.activeCamera.maxZ)})),f}return T(e,p),e})(Sn.BlurPostProcess),Sn.DepthOfFieldBlurPostProcess=Mn,(function(f){var e=function(){};f.DepthOfFieldMergePostProcessOptions=e;var t=(function(d){function e(e,t,r,n,i,o,s,a,l,c,h){void 0===c&&(c=f.Engine.TEXTURETYPE_UNSIGNED_INT),void 0===h&&(h=!1);var u=d.call(this,e,\"depthOfFieldMerge\",[],[\"circleOfConfusionSampler\",\"blurStep0\",\"blurStep1\",\"blurStep2\"],i,o,s,a,l,null,c,void 0,null,!0)||this;return u.blurSteps=n,u.onApplyObservable.add((function(i){i.setTextureFromPostProcess(\"textureSampler\",t),i.setTextureFromPostProcessOutput(\"circleOfConfusionSampler\",r),n.forEach((function(e,t){i.setTextureFromPostProcessOutput(\"blurStep\"+(n.length-t-1),e)}))})),h||u.updateEffect(),u}return T(e,d),e.prototype.updateEffect=function(e,t,i,r,n,o){void 0===e&&(e=null),void 0===t&&(t=null),void 0===i&&(i=null),e||(e=\"\",e+=\"#define BLUR_LEVEL \"+(this.blurSteps.length-1)+\"\\n\"),d.prototype.updateEffect.call(this,e,t,i,r,n,o)},e})(f.PostProcess);f.DepthOfFieldMergePostProcess=t})($a||($a={})),Rn=$a||($a={}),Cn=(function(h){function e(e,t,i,r,n,o,s,a,l){void 0===a&&(a=Rn.Engine.TEXTURETYPE_UNSIGNED_INT),void 0===l&&(l=!1);var c=h.call(this,e,\"circleOfConfusion\",[\"cameraMinMaxZ\",\"focusDistance\",\"cocPrecalculation\"],[\"depthSampler\"],i,r,n,o,s,null,a,void 0,null,l)||this;return c.lensSize=50,c.fStop=1.4,c.focusDistance=2e3,c.focalLength=50,c._depthTexture=null,c._depthTexture=t,c.onApplyObservable.add((function(e){if(c._depthTexture){e.setTexture(\"depthSampler\",c._depthTexture);var t=c.lensSize/c.fStop*c.focalLength/(c.focusDistance-c.focalLength);e.setFloat(\"focusDistance\",c.focusDistance),e.setFloat(\"cocPrecalculation\",t),e.setFloat2(\"cameraMinMaxZ\",c._depthTexture.activeCamera.minZ,c._depthTexture.activeCamera.maxZ)}else Rn.Tools.Warn(\"No depth texture set on CircleOfConfusionPostProcess\")})),c}return T(e,h),Object.defineProperty(e.prototype,\"depthTexture\",{set:function(e){this._depthTexture=e},enumerable:!0,configurable:!0}),e})(Rn.PostProcess),Rn.CircleOfConfusionPostProcess=Cn,(function(p){var _,e;(e=_=p.DepthOfFieldEffectBlurLevel||(p.DepthOfFieldEffectBlurLevel={}))[e.Low=0]=\"Low\",e[e.Medium=1]=\"Medium\",e[e.High=2]=\"High\";var t=(function(f){function e(e,t,i,r,n){void 0===i&&(i=_.Low),void 0===r&&(r=0),void 0===n&&(n=!1);var o=f.call(this,e.getEngine(),\"depth of field\",(function(){return o._effects}),!0)||this;o._effects=[],o._circleOfConfusion=new p.CircleOfConfusionPostProcess(\"circleOfConfusion\",t,1,null,p.Texture.BILINEAR_SAMPLINGMODE,e.getEngine(),!1,r,n),o._depthOfFieldBlurY=[],o._depthOfFieldBlurX=[];var s=1,a=15;switch(i){case _.High:s=3,a=51;break;case _.Medium:s=2,a=31;break;default:a=15,s=1}for(var l=a/Math.pow(2,s-1),c=1,h=0;h<s;h++){var u=new p.DepthOfFieldBlurPostProcess(\"verticle blur\",e,new p.Vector2(0,1),l,c,null,o._circleOfConfusion,0==h?o._circleOfConfusion:null,p.Texture.BILINEAR_SAMPLINGMODE,e.getEngine(),!1,r,n);u.autoClear=!1,c=.75/Math.pow(2,h);var d=new p.DepthOfFieldBlurPostProcess(\"horizontal blur\",e,new p.Vector2(1,0),l,c,null,o._circleOfConfusion,null,p.Texture.BILINEAR_SAMPLINGMODE,e.getEngine(),!1,r,n);d.autoClear=!1,o._depthOfFieldBlurY.push(u),o._depthOfFieldBlurX.push(d)}o._effects=[o._circleOfConfusion];for(h=0;h<o._depthOfFieldBlurX.length;h++)o._effects.push(o._depthOfFieldBlurY[h]),o._effects.push(o._depthOfFieldBlurX[h]);return o._dofMerge=new p.DepthOfFieldMergePostProcess(\"dofMerge\",o._circleOfConfusion,o._circleOfConfusion,o._depthOfFieldBlurX,c,null,p.Texture.BILINEAR_SAMPLINGMODE,e.getEngine(),!1,r,n),o._dofMerge.autoClear=!1,o._effects.push(o._dofMerge),o}return T(e,f),Object.defineProperty(e.prototype,\"focalLength\",{get:function(){return this._circleOfConfusion.focalLength},set:function(e){this._circleOfConfusion.focalLength=e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,\"fStop\",{get:function(){return this._circleOfConfusion.fStop},set:function(e){this._circleOfConfusion.fStop=e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,\"focusDistance\",{get:function(){return this._circleOfConfusion.focusDistance},set:function(e){this._circleOfConfusion.focusDistance=e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,\"lensSize\",{get:function(){return this._circleOfConfusion.lensSize},set:function(e){this._circleOfConfusion.lensSize=e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,\"depthTexture\",{set:function(e){this._circleOfConfusion.depthTexture=e},enumerable:!0,configurable:!0}),e.prototype.disposeEffects=function(e){for(var t=0;t<this._effects.length;t++)this._effects[t].dispose(e)},e.prototype._updateEffects=function(){for(var e=0;e<this._effects.length;e++)this._effects[e].updateEffect()},e.prototype._isReady=function(){for(var e=0;e<this._effects.length;e++)if(!this._effects[e].isReady())return!1;return!0},e})(p.PostProcessRenderEffect);p.DepthOfFieldEffect=t})($a||($a={})),On=$a||($a={}),Dn=(function(d){function e(e,t,i,r,n,o,s,a,l,c,h){void 0===c&&(c=On.Engine.TEXTURETYPE_UNSIGNED_INT),void 0===h&&(h=!1);var u=d.call(this,e,\"bloomMerge\",[\"bloomWeight\"],[\"circleOfConfusionSampler\",\"blurStep0\",\"blurStep1\",\"blurStep2\",\"bloomBlur\"],n,o,s,a,l,null,c,void 0,null,!0)||this;return u.weight=r,u.onApplyObservable.add((function(e){e.setTextureFromPostProcess(\"textureSampler\",t),e.setTextureFromPostProcessOutput(\"bloomBlur\",i),e.setFloat(\"bloomWeight\",u.weight)})),h||u.updateEffect(),u}return T(e,d),e})(On.PostProcess),On.BloomMergePostProcess=Dn,In=$a||($a={}),wn=(function(c){function e(e,t,i,r,n,o,s,a){void 0===s&&(s=In.Engine.TEXTURETYPE_UNSIGNED_INT),void 0===a&&(a=!1);var l=c.call(this,e,\"extractHighlights\",[\"threshold\",\"exposure\"],null,t,i,r,n,o,null,s,void 0,null,a)||this;return l.threshold=.9,l._exposure=1,l._inputPostProcess=null,l.onApplyObservable.add((function(e){l._inputPostProcess&&e.setTextureFromPostProcess(\"textureSampler\",l._inputPostProcess),e.setFloat(\"threshold\",Math.pow(l.threshold,In.ToGammaSpace)),e.setFloat(\"exposure\",l._exposure)})),l}return T(e,c),e})(In.PostProcess),In.ExtractHighlightsPostProcess=wn,Ln=$a||($a={}),Fn=(function(a){function e(e,t,i,r,n,o){void 0===n&&(n=0),void 0===o&&(o=!1);var s=a.call(this,e.getEngine(),\"bloom\",(function(){return s._effects}),!0)||this;return s.bloomScale=t,s._effects=[],s._downscale=new Ln.ExtractHighlightsPostProcess(\"highlights\",1,null,Ln.Texture.BILINEAR_SAMPLINGMODE,e.getEngine(),!1,n,o),s._blurX=new Ln.BlurPostProcess(\"horizontal blur\",new Ln.Vector2(1,0),10,t,null,Ln.Texture.BILINEAR_SAMPLINGMODE,e.getEngine(),!1,n,void 0,o),s._blurX.alwaysForcePOT=!0,s._blurX.autoClear=!1,s._blurY=new Ln.BlurPostProcess(\"vertical blur\",new Ln.Vector2(0,1),10,t,null,Ln.Texture.BILINEAR_SAMPLINGMODE,e.getEngine(),!1,n,void 0,o),s._blurY.alwaysForcePOT=!0,s._blurY.autoClear=!1,s.kernel=r,s._effects=[s._downscale,s._blurX,s._blurY],s._merge=new Ln.BloomMergePostProcess(\"bloomMerge\",s._downscale,s._blurY,i,t,null,Ln.Texture.BILINEAR_SAMPLINGMODE,e.getEngine(),!1,n,o),s._merge.autoClear=!1,s._effects.push(s._merge),s}return T(e,a),Object.defineProperty(e.prototype,\"threshold\",{get:function(){return this._downscale.threshold},set:function(e){this._downscale.threshold=e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,\"weight\",{get:function(){return this._merge.weight},set:function(e){this._merge.weight=e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,\"kernel\",{get:function(){return this._blurX.kernel/this.bloomScale},set:function(e){this._blurX.kernel=e*this.bloomScale,this._blurY.kernel=e*this.bloomScale},enumerable:!0,configurable:!0}),e.prototype.disposeEffects=function(e){for(var t=0;t<this._effects.length;t++)this._effects[t].dispose(e)},e.prototype._updateEffects=function(){for(var e=0;e<this._effects.length;e++)this._effects[e].updateEffect()},e.prototype._isReady=function(){for(var e=0;e<this._effects.length;e++)if(!this._effects[e].isReady())return!1;return!0},e})(Ln.PostProcessRenderEffect),Ln.BloomEffect=Fn,Bn=$a||($a={}),Nn=(function(l){function r(e,t,i,r,n){void 0===e&&(e=\"\"),void 0===t&&(t=!0),void 0===i&&(i=Bn.Engine.LastCreatedScene),void 0===n&&(n=!0);var o=l.call(this,i.getEngine(),e)||this;o._camerasToBeAttached=[],o.SharpenPostProcessId=\"SharpenPostProcessEffect\",o.ImageProcessingPostProcessId=\"ImageProcessingPostProcessEffect\",o.FxaaPostProcessId=\"FxaaPostProcessEffect\",o.ChromaticAberrationPostProcessId=\"ChromaticAberrationPostProcessEffect\",o.GrainPostProcessId=\"GrainPostProcessEffect\",o._glowLayer=null,o.animations=[],o._imageProcessingConfigurationObserver=null,o._sharpenEnabled=!1,o._bloomEnabled=!1,o._depthOfFieldEnabled=!1,o._depthOfFieldBlurLevel=Bn.DepthOfFieldEffectBlurLevel.Low,o._fxaaEnabled=!1,o._imageProcessingEnabled=!0,o._bloomScale=.5,o._chromaticAberrationEnabled=!1,o._grainEnabled=!1,o._buildAllowed=!0,o._resizeObserver=null,o._hardwareScaleLevel=1,o._bloomKernel=64,o._bloomWeight=.15,o._bloomThreshold=.9,o._samples=1,o._hasCleared=!1,o._prevPostProcess=null,o._prevPrevPostProcess=null,o._depthOfFieldSceneObserver=null,o._cameras=r||i.cameras,o._cameras=o._cameras.slice(),o._camerasToBeAttached=o._cameras.slice(),o._buildAllowed=n,o._scene=i;var s=o._scene.getEngine().getCaps();o._hdr=t&&(s.textureHalfFloatRender||s.textureFloatRender),o._hdr?s.textureHalfFloatRender?o._defaultPipelineTextureType=Bn.Engine.TEXTURETYPE_HALF_FLOAT:s.textureFloatRender&&(o._defaultPipelineTextureType=Bn.Engine.TEXTURETYPE_FLOAT):o._defaultPipelineTextureType=Bn.Engine.TEXTURETYPE_UNSIGNED_INT,i.postProcessRenderPipelineManager.addPipeline(o);var a=o._scene.getEngine();return o.sharpen=new Bn.SharpenPostProcess(\"sharpen\",1,null,Bn.Texture.BILINEAR_SAMPLINGMODE,a,!1,o._defaultPipelineTextureType,!0),o._sharpenEffect=new Bn.PostProcessRenderEffect(a,o.SharpenPostProcessId,function(){return o.sharpen},!0),o.depthOfField=new Bn.DepthOfFieldEffect(o._scene,null,o._depthOfFieldBlurLevel,o._defaultPipelineTextureType,!0),o.bloom=new Bn.BloomEffect(o._scene,o._bloomScale,o._bloomWeight,o.bloomKernel,o._defaultPipelineTextureType,!0),o.chromaticAberration=new Bn.ChromaticAberrationPostProcess(\"ChromaticAberration\",a.getRenderWidth(),a.getRenderHeight(),1,null,Bn.Texture.BILINEAR_SAMPLINGMODE,a,!1,o._defaultPipelineTextureType,!0),o._chromaticAberrationEffect=new Bn.PostProcessRenderEffect(a,o.ChromaticAberrationPostProcessId,function(){return o.chromaticAberration},!0),o.grain=new Bn.GrainPostProcess(\"Grain\",1,null,Bn.Texture.BILINEAR_SAMPLINGMODE,a,!1,o._defaultPipelineTextureType,!0),o._grainEffect=new Bn.PostProcessRenderEffect(a,o.GrainPostProcessId,function(){return o.grain},!0),o._resizeObserver=a.onResizeObservable.add((function(){o._hardwareScaleLevel=a.getHardwareScalingLevel(),o.bloomKernel=o.bloomKernel})),o._imageProcessingConfigurationObserver=o._scene.imageProcessingConfiguration.onUpdateParameters.add((function(){o.bloom._downscale._exposure=o._scene.imageProcessingConfiguration.exposure})),o._buildPipeline(),o}return T(r,l),Object.defineProperty(r.prototype,\"sharpenEnabled\",{get:function(){return this._sharpenEnabled},set:function(e){this._sharpenEnabled!==e&&(this._sharpenEnabled=e,this._buildPipeline())},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,\"bloomKernel\",{get:function(){return this._bloomKernel},set:function(e){this._bloomKernel=e,this.bloom.kernel=e/this._hardwareScaleLevel},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,\"bloomWeight\",{get:function(){return this._bloomWeight},set:function(e){this._bloomWeight!==e&&(this.bloom.weight=e,this._bloomWeight=e)},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,\"bloomThreshold\",{get:function(){return this._bloomThreshold},set:function(e){this._bloomThreshold!==e&&(this.bloom.threshold=e,this._bloomThreshold=e)},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,\"bloomScale\",{get:function(){return this._bloomScale},set:function(e){this._bloomScale!==e&&(this._bloomScale=e,this._rebuildBloom(),this._buildPipeline())},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,\"bloomEnabled\",{get:function(){return this._bloomEnabled},set:function(e){this._bloomEnabled!==e&&(this._bloomEnabled=e,this._buildPipeline())},enumerable:!0,configurable:!0}),r.prototype._rebuildBloom=function(){var e=this.bloom;this.bloom=new Bn.BloomEffect(this._scene,this.bloomScale,this._bloomWeight,this.bloomKernel,this._defaultPipelineTextureType,!1),this.bloom.threshold=e.threshold;for(var t=0;t<this._cameras.length;t++)e.disposeEffects(this._cameras[t])},Object.defineProperty(r.prototype,\"depthOfFieldEnabled\",{get:function(){return this._depthOfFieldEnabled},set:function(e){this._depthOfFieldEnabled!==e&&(this._depthOfFieldEnabled=e,this._buildPipeline())},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,\"depthOfFieldBlurLevel\",{get:function(){return this._depthOfFieldBlurLevel},set:function(e){if(this._depthOfFieldBlurLevel!==e){this._depthOfFieldBlurLevel=e;var t=this.depthOfField;this.depthOfField=new Bn.DepthOfFieldEffect(this._scene,null,this._depthOfFieldBlurLevel,this._defaultPipelineTextureType,!1),this.depthOfField.focalLength=t.focalLength,this.depthOfField.focusDistance=t.focusDistance,this.depthOfField.fStop=t.fStop,this.depthOfField.lensSize=t.lensSize;for(var i=0;i<this._cameras.length;i++)t.disposeEffects(this._cameras[i]);this._buildPipeline()}},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,\"fxaaEnabled\",{get:function(){return this._fxaaEnabled},set:function(e){this._fxaaEnabled!==e&&(this._fxaaEnabled=e,this._buildPipeline())},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,\"samples\",{get:function(){return this._samples},set:function(e){this._samples!==e&&(this._samples=e,this._buildPipeline())},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,\"imageProcessingEnabled\",{get:function(){return this._imageProcessingEnabled},set:function(e){this._imageProcessingEnabled!==e&&(this._imageProcessingEnabled=e,this._buildPipeline())},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,\"glowLayerEnabled\",{get:function(){return null==this._glowLayer},set:function(e){e&&!this._glowLayer?this._glowLayer=new Bn.GlowLayer(\"\",this._scene):!e&&this._glowLayer&&(this._glowLayer.dispose(),this._glowLayer=null)},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,\"chromaticAberrationEnabled\",{get:function(){return this._chromaticAberrationEnabled},set:function(e){this._chromaticAberrationEnabled!==e&&(this._chromaticAberrationEnabled=e,this._buildPipeline())},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,\"grainEnabled\",{get:function(){return this._grainEnabled},set:function(e){this._grainEnabled!==e&&(this._grainEnabled=e,this._buildPipeline())},enumerable:!0,configurable:!0}),r.prototype.prepare=function(){var e=this._buildAllowed;this._buildAllowed=!0,this._buildPipeline(),this._buildAllowed=e},r.prototype._setAutoClearAndTextureSharing=function(e,t){void 0===t&&(t=!1),this._hasCleared?e.autoClear=!1:(e.autoClear=!0,this._scene.autoClear=!1,this._hasCleared=!0),t||(this._prevPrevPostProcess?e.shareOutputWith(this._prevPrevPostProcess):e.useOwnOutput(),this._prevPostProcess&&(this._prevPrevPostProcess=this._prevPostProcess),this._prevPostProcess=e)},r.prototype._buildPipeline=function(){var t=this;if(this._buildAllowed){this._scene.autoClear=!0;var e=this._scene.getEngine();if(this._disposePostProcesses(),null!==this._cameras&&(this._scene.postProcessRenderPipelineManager.detachCamerasFromRenderPipeline(this._name,this._cameras),this._cameras=this._camerasToBeAttached.slice()),this._reset(),this._prevPostProcess=null,this._prevPrevPostProcess=null,this._hasCleared=!1,this.depthOfFieldEnabled){if(1<this._cameras.length){for(var i=0,r=this._cameras;i<r.length;i++){var n=r[i];(o=this._scene.enableDepthRenderer(n)).useOnlyInActiveCamera=!0}this._depthOfFieldSceneObserver=this._scene.onAfterRenderTargetsRenderObservable.add((function(e){-1<t._cameras.indexOf(e.activeCamera)&&(t.depthOfField.depthTexture=e.enableDepthRenderer(e.activeCamera).getDepthMap())}))}else{this._scene.onAfterRenderTargetsRenderObservable.remove(this._depthOfFieldSceneObserver);var o=this._scene.enableDepthRenderer(this._cameras[0]);this.depthOfField.depthTexture=o.getDepthMap()}this.depthOfField._isReady()||this.depthOfField._updateEffects(),this.addEffect(this.depthOfField),this._setAutoClearAndTextureSharing(this.depthOfField._effects[0],!0)}else this._scene.onAfterRenderTargetsRenderObservable.remove(this._depthOfFieldSceneObserver);this.bloomEnabled&&(this.bloom._isReady()||this.bloom._updateEffects(),this.addEffect(this.bloom),this._setAutoClearAndTextureSharing(this.bloom._effects[0],!0)),this._imageProcessingEnabled&&(this.imageProcessing=new Bn.ImageProcessingPostProcess(\"imageProcessing\",1,null,Bn.Texture.BILINEAR_SAMPLINGMODE,e,!1,this._defaultPipelineTextureType),this._hdr?(this.addEffect(new Bn.PostProcessRenderEffect(e,this.ImageProcessingPostProcessId,function(){return t.imageProcessing},!0)),this._setAutoClearAndTextureSharing(this.imageProcessing)):this._scene.imageProcessingConfiguration.applyByPostProcess=!1),this.sharpenEnabled&&(this.sharpen.isReady()||this.sharpen.updateEffect(),this.addEffect(this._sharpenEffect),this._setAutoClearAndTextureSharing(this.sharpen)),this.grainEnabled&&(this.grain.isReady()||this.grain.updateEffect(),this.addEffect(this._grainEffect),this._setAutoClearAndTextureSharing(this.grain)),this.chromaticAberrationEnabled&&(this.chromaticAberration.isReady()||this.chromaticAberration.updateEffect(),this.addEffect(this._chromaticAberrationEffect),this._setAutoClearAndTextureSharing(this.chromaticAberration)),this.fxaaEnabled&&(this.fxaa=new Bn.FxaaPostProcess(\"fxaa\",1,null,Bn.Texture.BILINEAR_SAMPLINGMODE,e,!1,this._defaultPipelineTextureType),this.addEffect(new Bn.PostProcessRenderEffect(e,this.FxaaPostProcessId,function(){return t.fxaa},!0)),this._setAutoClearAndTextureSharing(this.fxaa,!0)),null!==this._cameras&&this._scene.postProcessRenderPipelineManager.attachCamerasToRenderPipeline(this._name,this._cameras),!this._enableMSAAOnFirstPostProcess(this.samples)&&1<this.samples&&Bn.Tools.Warn(\"MSAA failed to enable, MSAA is only supported in browsers that support webGL >= 2.0\")}},r.prototype._disposePostProcesses=function(e){void 0===e&&(e=!1);for(var t=0;t<this._cameras.length;t++){var i=this._cameras[t];this.imageProcessing&&this.imageProcessing.dispose(i),this.fxaa&&this.fxaa.dispose(i),e&&(this.sharpen&&this.sharpen.dispose(i),this.depthOfField&&(this._scene.onAfterRenderTargetsRenderObservable.remove(this._depthOfFieldSceneObserver),this.depthOfField.disposeEffects(i)),this.bloom&&this.bloom.disposeEffects(i),this.chromaticAberration&&this.chromaticAberration.dispose(i),this.grain&&this.grain.dispose(i),this._glowLayer&&this._glowLayer.dispose())}this.imageProcessing=null,this.fxaa=null,e&&(this.sharpen=null,this._sharpenEffect=null,this.depthOfField=null,this.bloom=null,this.chromaticAberration=null,this._chromaticAberrationEffect=null,this.grain=null,this._grainEffect=null,this._glowLayer=null)},r.prototype.addCamera=function(e){this._camerasToBeAttached.push(e),this._buildPipeline()},r.prototype.removeCamera=function(e){var t=this._camerasToBeAttached.indexOf(e);this._camerasToBeAttached.splice(t,1),this._buildPipeline()},r.prototype.dispose=function(){this._disposePostProcesses(!0),this._scene.postProcessRenderPipelineManager.detachCamerasFromRenderPipeline(this._name,this._cameras),this._scene.autoClear=!0,this._resizeObserver&&(this._scene.getEngine().onResizeObservable.remove(this._resizeObserver),this._resizeObserver=null),this._scene.imageProcessingConfiguration.onUpdateParameters.remove(this._imageProcessingConfigurationObserver),l.prototype.dispose.call(this)},r.prototype.serialize=function(){var e=Bn.SerializationHelper.Serialize(this);return e.customType=\"DefaultRenderingPipeline\",e},r.Parse=function(e,t,i){return Bn.SerializationHelper.Parse((function(){return new r(e._name,e._name._hdr,t)}),e,t,i)},b([Bn.serialize()],r.prototype,\"sharpenEnabled\",null),b([Bn.serialize()],r.prototype,\"bloomKernel\",null),b([Bn.serialize()],r.prototype,\"_bloomWeight\",void 0),b([Bn.serialize()],r.prototype,\"_bloomThreshold\",void 0),b([Bn.serialize()],r.prototype,\"_hdr\",void 0),b([Bn.serialize()],r.prototype,\"bloomWeight\",null),b([Bn.serialize()],r.prototype,\"bloomThreshold\",null),b([Bn.serialize()],r.prototype,\"bloomScale\",null),b([Bn.serialize()],r.prototype,\"bloomEnabled\",null),b([Bn.serialize()],r.prototype,\"depthOfFieldEnabled\",null),b([Bn.serialize()],r.prototype,\"depthOfFieldBlurLevel\",null),b([Bn.serialize()],r.prototype,\"fxaaEnabled\",null),b([Bn.serialize()],r.prototype,\"samples\",null),b([Bn.serialize()],r.prototype,\"imageProcessingEnabled\",null),b([Bn.serialize()],r.prototype,\"glowLayerEnabled\",null),b([Bn.serialize()],r.prototype,\"chromaticAberrationEnabled\",null),b([Bn.serialize()],r.prototype,\"grainEnabled\",null),r})(Bn.PostProcessRenderPipeline),Bn.DefaultRenderingPipeline=Nn,(function(c){var e=(function(t){function e(){var e=t.call(this)||this;return e.IMAGEPROCESSING=!1,e.VIGNETTE=!1,e.VIGNETTEBLENDMODEMULTIPLY=!1,e.VIGNETTEBLENDMODEOPAQUE=!1,e.TONEMAPPING=!1,e.TONEMAPPING_ACES=!1,e.CONTRAST=!1,e.COLORCURVES=!1,e.COLORGRADING=!1,e.COLORGRADING3D=!1,e.SAMPLER3DGREENDEPTH=!1,e.SAMPLER3DBGRMAP=!1,e.IMAGEPROCESSINGPOSTPROCESS=!1,e.EXPOSURE=!1,e.rebuild(),e}return T(e,t),e})(c.MaterialDefines);c.ImageProcessingConfigurationDefines=e;var t=(function(){function i(){this.colorCurves=new c.ColorCurves,this._colorCurvesEnabled=!1,this._colorGradingEnabled=!1,this._colorGradingWithGreenDepth=!0,this._colorGradingBGR=!0,this._exposure=1,this._toneMappingEnabled=!1,this._toneMappingType=i.TONEMAPPING_STANDARD,this._contrast=1,this.vignetteStretch=0,this.vignetteCentreX=0,this.vignetteCentreY=0,this.vignetteWeight=1.5,this.vignetteColor=new c.Color4(0,0,0,0),this.vignetteCameraFov=.5,this._vignetteBlendMode=i.VIGNETTEMODE_MULTIPLY,this._vignetteEnabled=!1,this._applyByPostProcess=!1,this._isEnabled=!0,this.onUpdateParameters=new c.Observable}return Object.defineProperty(i.prototype,\"colorCurvesEnabled\",{get:function(){return this._colorCurvesEnabled},set:function(e){this._colorCurvesEnabled!==e&&(this._colorCurvesEnabled=e,this._updateParameters())},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,\"colorGradingTexture\",{get:function(){return this._colorGradingTexture},set:function(e){this._colorGradingTexture!==e&&(this._colorGradingTexture=e,this._updateParameters())},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,\"colorGradingEnabled\",{get:function(){return this._colorGradingEnabled},set:function(e){this._colorGradingEnabled!==e&&(this._colorGradingEnabled=e,this._updateParameters())},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,\"colorGradingWithGreenDepth\",{get:function(){return this._colorGradingWithGreenDepth},set:function(e){this._colorGradingWithGreenDepth!==e&&(this._colorGradingWithGreenDepth=e,this._updateParameters())},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,\"colorGradingBGR\",{get:function(){return this._colorGradingBGR},set:function(e){this._colorGradingBGR!==e&&(this._colorGradingBGR=e,this._updateParameters())},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,\"exposure\",{get:function(){return this._exposure},set:function(e){this._exposure!==e&&(this._exposure=e,this._updateParameters())},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,\"toneMappingEnabled\",{get:function(){return this._toneMappingEnabled},set:function(e){this._toneMappingEnabled!==e&&(this._toneMappingEnabled=e,this._updateParameters())},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,\"toneMappingType\",{get:function(){return this._toneMappingType},set:function(e){this._toneMappingType!==e&&(this._toneMappingType=e,this._updateParameters())},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,\"contrast\",{get:function(){return this._contrast},set:function(e){this._contrast!==e&&(this._contrast=e,this._updateParameters())},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,\"vignetteBlendMode\",{get:function(){return this._vignetteBlendMode},set:function(e){this._vignetteBlendMode!==e&&(this._vignetteBlendMode=e,this._updateParameters())},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,\"vignetteEnabled\",{get:function(){return this._vignetteEnabled},set:function(e){this._vignetteEnabled!==e&&(this._vignetteEnabled=e,this._updateParameters())},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,\"applyByPostProcess\",{get:function(){return this._applyByPostProcess},set:function(e){this._applyByPostProcess!==e&&(this._applyByPostProcess=e,this._updateParameters())},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,\"isEnabled\",{get:function(){return this._isEnabled},set:function(e){this._isEnabled!==e&&(this._isEnabled=e,this._updateParameters())},enumerable:!0,configurable:!0}),i.prototype._updateParameters=function(){this.onUpdateParameters.notifyObservers(this)},i.prototype.getClassName=function(){return\"ImageProcessingConfiguration\"},i.PrepareUniforms=function(e,t){t.EXPOSURE&&e.push(\"exposureLinear\"),t.CONTRAST&&e.push(\"contrast\"),t.COLORGRADING&&e.push(\"colorTransformSettings\"),t.VIGNETTE&&(e.push(\"vInverseScreenSize\"),e.push(\"vignetteSettings1\"),e.push(\"vignetteSettings2\")),t.COLORCURVES&&c.ColorCurves.PrepareUniforms(e)},i.PrepareSamplers=function(e,t){t.COLORGRADING&&e.push(\"txColorTransform\")},i.prototype.prepareDefines=function(e,t){if(void 0===t&&(t=!1),t!==this.applyByPostProcess||!this._isEnabled)return e.VIGNETTE=!1,e.TONEMAPPING=!1,e.TONEMAPPING_ACES=!1,e.CONTRAST=!1,e.EXPOSURE=!1,e.COLORCURVES=!1,e.COLORGRADING=!1,e.COLORGRADING3D=!1,e.IMAGEPROCESSING=!1,void(e.IMAGEPROCESSINGPOSTPROCESS=this.applyByPostProcess&&this._isEnabled);switch(e.VIGNETTE=this.vignetteEnabled,e.VIGNETTEBLENDMODEMULTIPLY=this.vignetteBlendMode===i._VIGNETTEMODE_MULTIPLY,e.VIGNETTEBLENDMODEOPAQUE=!e.VIGNETTEBLENDMODEMULTIPLY,e.TONEMAPPING=this.toneMappingEnabled,this._toneMappingType){case i.TONEMAPPING_ACES:e.TONEMAPPING_ACES=!0}e.CONTRAST=1!==this.contrast,e.EXPOSURE=1!==this.exposure,e.COLORCURVES=this.colorCurvesEnabled&&!!this.colorCurves,e.COLORGRADING=this.colorGradingEnabled&&!!this.colorGradingTexture,e.COLORGRADING?e.COLORGRADING3D=this.colorGradingTexture.is3D:e.COLORGRADING3D=!1,e.SAMPLER3DGREENDEPTH=this.colorGradingWithGreenDepth,e.SAMPLER3DBGRMAP=this.colorGradingBGR,e.IMAGEPROCESSINGPOSTPROCESS=this.applyByPostProcess,e.IMAGEPROCESSING=e.VIGNETTE||e.TONEMAPPING||e.CONTRAST||e.EXPOSURE||e.COLORCURVES||e.COLORGRADING},i.prototype.isReady=function(){return!this.colorGradingEnabled||!this.colorGradingTexture||this.colorGradingTexture.isReady()},i.prototype.bind=function(e,t){if(void 0===t&&(t=1),this._colorCurvesEnabled&&this.colorCurves&&c.ColorCurves.Bind(this.colorCurves,e),this._vignetteEnabled){var i=1/e.getEngine().getRenderWidth(),r=1/e.getEngine().getRenderHeight();e.setFloat2(\"vInverseScreenSize\",i,r);var n=Math.tan(.5*this.vignetteCameraFov),o=n*t,s=Math.sqrt(o*n);o=c.Tools.Mix(o,s,this.vignetteStretch),n=c.Tools.Mix(n,s,this.vignetteStretch),e.setFloat4(\"vignetteSettings1\",o,n,-o*this.vignetteCentreX,-n*this.vignetteCentreY);var a=-2*this.vignetteWeight;e.setFloat4(\"vignetteSettings2\",this.vignetteColor.r,this.vignetteColor.g,this.vignetteColor.b,a)}if(e.setFloat(\"exposureLinear\",this.exposure),e.setFloat(\"contrast\",this.contrast),this.colorGradingTexture){e.setTexture(\"txColorTransform\",this.colorGradingTexture);var l=this.colorGradingTexture.getSize().height;e.setFloat4(\"colorTransformSettings\",(l-1)/l,.5/l,l,this.colorGradingTexture.level)}},i.prototype.clone=function(){return c.SerializationHelper.Clone((function(){return new i}),this)},i.prototype.serialize=function(){return c.SerializationHelper.Serialize(this)},i.Parse=function(e){return c.SerializationHelper.Parse((function(){return new i}),e,null,null)},Object.defineProperty(i,\"VIGNETTEMODE_MULTIPLY\",{get:function(){return this._VIGNETTEMODE_MULTIPLY},enumerable:!0,configurable:!0}),Object.defineProperty(i,\"VIGNETTEMODE_OPAQUE\",{get:function(){return this._VIGNETTEMODE_OPAQUE},enumerable:!0,configurable:!0}),i.TONEMAPPING_STANDARD=0,i.TONEMAPPING_ACES=1,i._VIGNETTEMODE_MULTIPLY=0,i._VIGNETTEMODE_OPAQUE=1,b([c.serializeAsColorCurves()],i.prototype,\"colorCurves\",void 0),b([c.serialize()],i.prototype,\"_colorCurvesEnabled\",void 0),b([c.serializeAsTexture(\"colorGradingTexture\")],i.prototype,\"_colorGradingTexture\",void 0),b([c.serialize()],i.prototype,\"_colorGradingEnabled\",void 0),b([c.serialize()],i.prototype,\"_colorGradingWithGreenDepth\",void 0),b([c.serialize()],i.prototype,\"_colorGradingBGR\",void 0),b([c.serialize()],i.prototype,\"_exposure\",void 0),b([c.serialize()],i.prototype,\"_toneMappingEnabled\",void 0),b([c.serialize()],i.prototype,\"_toneMappingType\",void 0),b([c.serialize()],i.prototype,\"_contrast\",void 0),b([c.serialize()],i.prototype,\"vignetteStretch\",void 0),b([c.serialize()],i.prototype,\"vignetteCentreX\",void 0),b([c.serialize()],i.prototype,\"vignetteCentreY\",void 0),b([c.serialize()],i.prototype,\"vignetteWeight\",void 0),b([c.serializeAsColor4()],i.prototype,\"vignetteColor\",void 0),b([c.serialize()],i.prototype,\"vignetteCameraFov\",void 0),b([c.serialize()],i.prototype,\"_vignetteBlendMode\",void 0),b([c.serialize()],i.prototype,\"_vignetteEnabled\",void 0),b([c.serialize()],i.prototype,\"_applyByPostProcess\",void 0),b([c.serialize()],i.prototype,\"_isEnabled\",void 0),i})();c.ImageProcessingConfiguration=t})($a||($a={})),Vn=$a||($a={}),Un=(function(r){function y(e,t){var i=r.call(this,t)||this;return e&&(i._engine=t.getEngine(),i._textureMatrix=Vn.Matrix.Identity(),i.name=e,i.url=e,i.hasAlpha=!1,i.isCube=!1,i.is3D=1<i._engine.webGLVersion,i.wrapU=Vn.Texture.CLAMP_ADDRESSMODE,i.wrapV=Vn.Texture.CLAMP_ADDRESSMODE,i.wrapR=Vn.Texture.CLAMP_ADDRESSMODE,i.anisotropicFilteringLevel=1,i._texture=i._getFromCache(e,!0),i._texture||(t.useDelayedTextureLoading?i.delayLoadState=Vn.Engine.DELAYLOADSTATE_NOTLOADED:i.loadTexture())),i}return T(y,r),y.prototype.getTextureMatrix=function(){return this._textureMatrix},y.prototype.load3dlTexture=function(){var g,v=this._engine;g=1===v.webGLVersion?v.createRawTexture(null,1,1,Vn.Engine.TEXTUREFORMAT_RGBA,!1,!1,Vn.Texture.BILINEAR_SAMPLINGMODE):v.createRawTexture3D(null,1,1,1,Vn.Engine.TEXTUREFORMAT_RGBA,!1,!1,Vn.Texture.BILINEAR_SAMPLINGMODE),this._texture=g;var e=function(e){if(\"string\"==typeof e){for(var t,i=null,r=null,n=e.split(\"\\n\"),o=0,s=0,a=0,l=0,c=0,h=0;h<n.length;h++)if(t=n[h],y._noneEmptyLineRegex.test(t)&&0!==t.indexOf(\"#\")){var u=t.split(\" \");if(0!==o){if(0!=o){var d=Math.max(parseInt(u[0]),0),f=Math.max(parseInt(u[1]),0),p=Math.max(parseInt(u[2]),0);c=Math.max(d,c),c=Math.max(f,c),c=Math.max(p,c);var _=4*(s+l*o+a*o*o);r&&(r[_+0]=d,r[_+1]=f,r[_+2]=p),++a%o==0&&++l%o==(a=0)&&(s++,l=0)}}else o=u.length,i=new Uint8Array(o*o*o*4),r=new Float32Array(o*o*o*4)}if(r&&i)for(h=0;h<r.length;h++)if(0<h&&(h+1)%4==0)i[h]=255;else{var m=r[h];i[h]=m/c*255}g.is3D?(g.updateSize(o,o,o),v.updateRawTexture3D(g,i,Vn.Engine.TEXTUREFORMAT_RGBA,!1)):(g.updateSize(o*o,o),v.updateRawTexture(g,i,Vn.Engine.TEXTUREFORMAT_RGBA,!1))}},t=this.getScene();return t?t._loadFile(this.url,e):this._engine._loadFile(this.url,e),this._texture},y.prototype.loadTexture=function(){this.url&&this.url.toLocaleLowerCase().indexOf(\".3dl\")==this.url.length-4&&this.load3dlTexture()},y.prototype.clone=function(){var e=new y(this.url,this.getScene());return e.level=this.level,e},y.prototype.delayLoad=function(){this.delayLoadState===Vn.Engine.DELAYLOADSTATE_NOTLOADED&&(this.delayLoadState=Vn.Engine.DELAYLOADSTATE_LOADED,this._texture=this._getFromCache(this.url,!0),this._texture||this.loadTexture())},y.Parse=function(e,t,i){var r=null;return e.name&&!e.isRenderTarget&&((r=new y(e.name,t)).name=e.name,r.level=e.level),r},y.prototype.serialize=function(){if(!this.name)return null;var e={};return e.name=this.name,e.level=this.level,e.customType=\"BABYLON.ColorGradingTexture\",e},y._noneEmptyLineRegex=/\\S+/,y})(Vn.BaseTexture),Vn.ColorGradingTexture=Un,zn=$a||($a={}),Gn=(function(){function d(){this._dirty=!0,this._tempColor=new zn.Color4(0,0,0,0),this._globalCurve=new zn.Color4(0,0,0,0),this._highlightsCurve=new zn.Color4(0,0,0,0),this._midtonesCurve=new zn.Color4(0,0,0,0),this._shadowsCurve=new zn.Color4(0,0,0,0),this._positiveCurve=new zn.Color4(0,0,0,0),this._negativeCurve=new zn.Color4(0,0,0,0),this._globalHue=30,this._globalDensity=0,this._globalSaturation=0,this._globalExposure=0,this._highlightsHue=30,this._highlightsDensity=0,this._highlightsSaturation=0,this._highlightsExposure=0,this._midtonesHue=30,this._midtonesDensity=0,this._midtonesSaturation=0,this._midtonesExposure=0,this._shadowsHue=30,this._shadowsDensity=0,this._shadowsSaturation=0,this._shadowsExposure=0}return Object.defineProperty(d.prototype,\"globalHue\",{get:function(){return this._globalHue},set:function(e){this._globalHue=e,this._dirty=!0},enumerable:!0,configurable:!0}),Object.defineProperty(d.prototype,\"globalDensity\",{get:function(){return this._globalDensity},set:function(e){this._globalDensity=e,this._dirty=!0},enumerable:!0,configurable:!0}),Object.defineProperty(d.prototype,\"globalSaturation\",{get:function(){return this._globalSaturation},set:function(e){this._globalSaturation=e,this._dirty=!0},enumerable:!0,configurable:!0}),Object.defineProperty(d.prototype,\"globalExposure\",{get:function(){return this._globalExposure},set:function(e){this._globalExposure=e,this._dirty=!0},enumerable:!0,configurable:!0}),Object.defineProperty(d.prototype,\"highlightsHue\",{get:function(){return this._highlightsHue},set:function(e){this._highlightsHue=e,this._dirty=!0},enumerable:!0,configurable:!0}),Object.defineProperty(d.prototype,\"highlightsDensity\",{get:function(){return this._highlightsDensity},set:function(e){this._highlightsDensity=e,this._dirty=!0},enumerable:!0,configurable:!0}),Object.defineProperty(d.prototype,\"highlightsSaturation\",{get:function(){return this._highlightsSaturation},set:function(e){this._highlightsSaturation=e,this._dirty=!0},enumerable:!0,configurable:!0}),Object.defineProperty(d.prototype,\"highlightsExposure\",{get:function(){return this._highlightsExposure},set:function(e){this._highlightsExposure=e,this._dirty=!0},enumerable:!0,configurable:!0}),Object.defineProperty(d.prototype,\"midtonesHue\",{get:function(){return this._midtonesHue},set:function(e){this._midtonesHue=e,this._dirty=!0},enumerable:!0,configurable:!0}),Object.defineProperty(d.prototype,\"midtonesDensity\",{get:function(){return this._midtonesDensity},set:function(e){this._midtonesDensity=e,this._dirty=!0},enumerable:!0,configurable:!0}),Object.defineProperty(d.prototype,\"midtonesSaturation\",{get:function(){return this._midtonesSaturation},set:function(e){this._midtonesSaturation=e,this._dirty=!0},enumerable:!0,configurable:!0}),Object.defineProperty(d.prototype,\"midtonesExposure\",{get:function(){return this._midtonesExposure},set:function(e){this._midtonesExposure=e,this._dirty=!0},enumerable:!0,configurable:!0}),Object.defineProperty(d.prototype,\"shadowsHue\",{get:function(){return this._shadowsHue},set:function(e){this._shadowsHue=e,this._dirty=!0},enumerable:!0,configurable:!0}),Object.defineProperty(d.prototype,\"shadowsDensity\",{get:function(){return this._shadowsDensity},set:function(e){this._shadowsDensity=e,this._dirty=!0},enumerable:!0,configurable:!0}),Object.defineProperty(d.prototype,\"shadowsSaturation\",{get:function(){return this._shadowsSaturation},set:function(e){this._shadowsSaturation=e,this._dirty=!0},enumerable:!0,configurable:!0}),Object.defineProperty(d.prototype,\"shadowsExposure\",{get:function(){return this._shadowsExposure},set:function(e){this._shadowsExposure=e,this._dirty=!0},enumerable:!0,configurable:!0}),d.prototype.getClassName=function(){return\"ColorCurves\"},d.Bind=function(e,t,i,r,n){void 0===i&&(i=\"vCameraColorCurvePositive\"),void 0===r&&(r=\"vCameraColorCurveNeutral\"),void 0===n&&(n=\"vCameraColorCurveNegative\"),e._dirty&&(e._dirty=!1,e.getColorGradingDataToRef(e._globalHue,e._globalDensity,e._globalSaturation,e._globalExposure,e._globalCurve),e.getColorGradingDataToRef(e._highlightsHue,e._highlightsDensity,e._highlightsSaturation,e._highlightsExposure,e._tempColor),e._tempColor.multiplyToRef(e._globalCurve,e._highlightsCurve),e.getColorGradingDataToRef(e._midtonesHue,e._midtonesDensity,e._midtonesSaturation,e._midtonesExposure,e._tempColor),e._tempColor.multiplyToRef(e._globalCurve,e._midtonesCurve),e.getColorGradingDataToRef(e._shadowsHue,e._shadowsDensity,e._shadowsSaturation,e._shadowsExposure,e._tempColor),e._tempColor.multiplyToRef(e._globalCurve,e._shadowsCurve),e._highlightsCurve.subtractToRef(e._midtonesCurve,e._positiveCurve),e._midtonesCurve.subtractToRef(e._shadowsCurve,e._negativeCurve)),t&&(t.setFloat4(i,e._positiveCurve.r,e._positiveCurve.g,e._positiveCurve.b,e._positiveCurve.a),t.setFloat4(r,e._midtonesCurve.r,e._midtonesCurve.g,e._midtonesCurve.b,e._midtonesCurve.a),t.setFloat4(n,e._negativeCurve.r,e._negativeCurve.g,e._negativeCurve.b,e._negativeCurve.a))},d.PrepareUniforms=function(e){e.push(\"vCameraColorCurveNeutral\",\"vCameraColorCurvePositive\",\"vCameraColorCurveNegative\")},d.prototype.getColorGradingDataToRef=function(e,t,i,r,n){null!=e&&(e=d.clamp(e,0,360),t=d.clamp(t,-100,100),i=d.clamp(i,-100,100),r=d.clamp(r,-100,100),t=d.applyColorGradingSliderNonlinear(t),t*=.5,r=d.applyColorGradingSliderNonlinear(r),t<0&&(t*=-1,e=(e+180)%360),d.fromHSBToRef(e,t,50+.25*r,n),n.scaleToRef(2,n),n.a=1+.01*i)},d.applyColorGradingSliderNonlinear=function(e){e/=100;var t=Math.abs(e);return t=Math.pow(t,2),e<0&&(t*=-1),t*=100},d.fromHSBToRef=function(e,t,i,r){var n=d.clamp(e,0,360),o=d.clamp(t/100,0,1),s=d.clamp(i/100,0,1);if(0===o)r.r=s,r.g=s,r.b=s;else{n/=60;var a=Math.floor(n),l=n-a,c=s*(1-o),h=s*(1-o*l),u=s*(1-o*(1-l));switch(a){case 0:r.r=s,r.g=u,r.b=c;break;case 1:r.r=h,r.g=s,r.b=c;break;case 2:r.r=c,r.g=s,r.b=u;break;case 3:r.r=c,r.g=h,r.b=s;break;case 4:r.r=u,r.g=c,r.b=s;break;default:r.r=s,r.g=c,r.b=h}}r.a=1},d.clamp=function(e,t,i){return Math.min(Math.max(e,t),i)},d.prototype.clone=function(){return zn.SerializationHelper.Clone((function(){return new d}),this)},d.prototype.serialize=function(){return zn.SerializationHelper.Serialize(this)},d.Parse=function(e){return zn.SerializationHelper.Parse((function(){return new d}),e,null,null)},b([zn.serialize()],d.prototype,\"_globalHue\",void 0),b([zn.serialize()],d.prototype,\"_globalDensity\",void 0),b([zn.serialize()],d.prototype,\"_globalSaturation\",void 0),b([zn.serialize()],d.prototype,\"_globalExposure\",void 0),b([zn.serialize()],d.prototype,\"_highlightsHue\",void 0),b([zn.serialize()],d.prototype,\"_highlightsDensity\",void 0),b([zn.serialize()],d.prototype,\"_highlightsSaturation\",void 0),b([zn.serialize()],d.prototype,\"_highlightsExposure\",void 0),b([zn.serialize()],d.prototype,\"_midtonesHue\",void 0),b([zn.serialize()],d.prototype,\"_midtonesDensity\",void 0),b([zn.serialize()],d.prototype,\"_midtonesSaturation\",void 0),b([zn.serialize()],d.prototype,\"_midtonesExposure\",void 0),d})(),zn.ColorCurves=Gn,kn=$a||($a={}),Wn=(function(u){function e(e,t,i,r,n,o,s,a,l,c){var h=u.call(this,e,\"refraction\",[\"baseColor\",\"depth\",\"colorLevel\"],[\"refractionSampler\"],o,s,a,l,c)||this;return h.color=i,h.depth=r,h.colorLevel=n,h._ownRefractionTexture=!0,h.onActivateObservable.add((function(e){h._refTexture=h._refTexture||new kn.Texture(t,e.getScene())})),h.onApplyObservable.add((function(e){e.setColor3(\"baseColor\",h.color),e.setFloat(\"depth\",h.depth),e.setFloat(\"colorLevel\",h.colorLevel),e.setTexture(\"refractionSampler\",h._refTexture)})),h}return T(e,u),Object.defineProperty(e.prototype,\"refractionTexture\",{get:function(){return this._refTexture},set:function(e){this._refTexture&&this._ownRefractionTexture&&this._refTexture.dispose(),this._refTexture=e,this._ownRefractionTexture=!1},enumerable:!0,configurable:!0}),e.prototype.dispose=function(e){this._refTexture&&this._ownRefractionTexture&&(this._refTexture.dispose(),this._refTexture=null),u.prototype.dispose.call(this,e)},e})(kn.PostProcess),kn.RefractionPostProcess=Wn,Hn=$a||($a={}),Xn=(function(a){function e(e,t,i,r,n,o){var s=a.call(this,e,\"blackAndWhite\",[\"degree\"],null,t,i,r,n,o)||this;return s.degree=1,s.onApplyObservable.add((function(e){e.setFloat(\"degree\",s.degree)})),s}return T(e,a),e})(Hn.PostProcess),Hn.BlackAndWhitePostProcess=Xn,jn=$a||($a={}),Yn=(function(c){function e(e,t,i,r,n,o,s,a){void 0===a&&(a=jn.Engine.TEXTURETYPE_UNSIGNED_INT);var l=c.call(this,e,\"convolution\",[\"kernel\",\"screenSize\"],null,i,r,n,o,s,null,a)||this;return l.kernel=t,l.onApply=function(e){e.setFloat2(\"screenSize\",l.width,l.height),e.setArray(\"kernel\",l.kernel)},l}return T(e,c),e.EdgeDetect0Kernel=[1,0,-1,0,0,0,-1,0,1],e.EdgeDetect1Kernel=[0,1,0,1,-4,1,0,1,0],e.EdgeDetect2Kernel=[-1,-1,-1,-1,8,-1,-1,-1,-1],e.SharpenKernel=[0,-1,0,-1,5,-1,0,-1,0],e.EmbossKernel=[-2,-1,0,-1,1,1,0,1,2],e.GaussianKernel=[0,1,0,1,1,1,0,1,0],e})(jn.PostProcess),jn.ConvolutionPostProcess=Yn,Kn=$a||($a={}),Qn=(function(l){function e(e,t,i,r,n,o,s){var a=l.call(this,e,\"filter\",[\"kernelMatrix\"],null,i,r,n,o,s)||this;return a.kernelMatrix=t,a.onApply=function(e){e.setMatrix(\"kernelMatrix\",a.kernelMatrix)},a}return T(e,l),e})(Kn.PostProcess),Kn.FilterPostProcess=Qn,Zn=$a||($a={}),qn=(function(h){function u(e,t,i,r,n,o,s,a,l){void 0===n&&(n=100),void 0===o&&(o=Zn.Texture.BILINEAR_SAMPLINGMODE);var c=h.call(this,e,\"volumetricLightScattering\",[\"decay\",\"exposure\",\"weight\",\"meshPositionOnScreen\",\"density\"],[\"lightScatteringSampler\"],t.postProcessRatio||t,i,o,s,a,\"#define NUM_SAMPLES \"+n)||this;return c._screenCoordinates=Zn.Vector2.Zero(),c.customMeshPosition=Zn.Vector3.Zero(),c.useCustomMeshPosition=!1,c.invert=!0,c.excludedMeshes=new Array,c.exposure=.3,c.decay=.96815,c.weight=.58767,c.density=.926,s=(l=null===i?l:i.getScene()).getEngine(),c._viewPort=new Zn.Viewport(0,0,1,1).toGlobal(s.getRenderWidth(),s.getRenderHeight()),c.mesh=null!==r?r:u.CreateDefaultMesh(\"VolumetricLightScatteringMesh\",l),c._createPass(l,t.passRatio||t),c.onActivate=function(e){c.isSupported||c.dispose(e),c.onActivate=null},c.onApplyObservable.add((function(e){c._updateMeshScreenCoordinates(l),e.setTexture(\"lightScatteringSampler\",c._volumetricLightScatteringRTT),e.setFloat(\"exposure\",c.exposure),e.setFloat(\"decay\",c.decay),e.setFloat(\"weight\",c.weight),e.setFloat(\"density\",c.density),e.setVector2(\"meshPositionOnScreen\",c._screenCoordinates)})),c}return T(u,h),Object.defineProperty(u.prototype,\"useDiffuseColor\",{get:function(){return Zn.Tools.Warn(\"VolumetricLightScatteringPostProcess.useDiffuseColor is no longer used, use the mesh material directly instead\"),!1},set:function(e){Zn.Tools.Warn(\"VolumetricLightScatteringPostProcess.useDiffuseColor is no longer used, use the mesh material directly instead\")},enumerable:!0,configurable:!0}),u.prototype.getClassName=function(){return\"VolumetricLightScatteringPostProcess\"},u.prototype._isReady=function(e,t){var i=e.getMesh();if(i===this.mesh&&i.material)return i.material.isReady(i);var r=[],n=[Zn.VertexBuffer.PositionKind],o=e.getMaterial();o&&(o.needAlphaTesting()&&r.push(\"#define ALPHATEST\"),i.isVerticesDataPresent(Zn.VertexBuffer.UVKind)&&(n.push(Zn.VertexBuffer.UVKind),r.push(\"#define UV1\")),i.isVerticesDataPresent(Zn.VertexBuffer.UV2Kind)&&(n.push(Zn.VertexBuffer.UV2Kind),r.push(\"#define UV2\"))),i.useBones&&i.computeBonesUsingShaders?(n.push(Zn.VertexBuffer.MatricesIndicesKind),n.push(Zn.VertexBuffer.MatricesWeightsKind),r.push(\"#define NUM_BONE_INFLUENCERS \"+i.numBoneInfluencers),r.push(\"#define BonesPerMesh \"+(i.skeleton?i.skeleton.bones.length+1:0))):r.push(\"#define NUM_BONE_INFLUENCERS 0\"),t&&(r.push(\"#define INSTANCES\"),n.push(\"world0\"),n.push(\"world1\"),n.push(\"world2\"),n.push(\"world3\"));var s=r.join(\"\\n\");return this._cachedDefines!==s&&(this._cachedDefines=s,this._volumetricLightScatteringPass=i.getScene().getEngine().createEffect({vertexElement:\"depth\",fragmentElement:\"volumetricLightScatteringPass\"},n,[\"world\",\"mBones\",\"viewProjection\",\"diffuseMatrix\"],[\"diffuseSampler\"],s)),this._volumetricLightScatteringPass.isReady()},u.prototype.setCustomMeshPosition=function(e){this.customMeshPosition=e},u.prototype.getCustomMeshPosition=function(){return this.customMeshPosition},u.prototype.dispose=function(e){var t=e.getScene().customRenderTargets.indexOf(this._volumetricLightScatteringRTT);-1!==t&&e.getScene().customRenderTargets.splice(t,1),this._volumetricLightScatteringRTT.dispose(),h.prototype.dispose.call(this,e)},u.prototype.getPass=function(){return this._volumetricLightScatteringRTT},u.prototype._meshExcluded=function(e){return 0<this.excludedMeshes.length&&-1!==this.excludedMeshes.indexOf(e)},u.prototype._createPass=function(c,e){var h=this,t=c.getEngine();this._volumetricLightScatteringRTT=new Zn.RenderTargetTexture(\"volumetricLightScatteringMap\",{width:t.getRenderWidth()*e,height:t.getRenderHeight()*e},c,!1,!0,Zn.Engine.TEXTURETYPE_UNSIGNED_INT),this._volumetricLightScatteringRTT.wrapU=Zn.Texture.CLAMP_ADDRESSMODE,this._volumetricLightScatteringRTT.wrapV=Zn.Texture.CLAMP_ADDRESSMODE,this._volumetricLightScatteringRTT.renderList=null,this._volumetricLightScatteringRTT.renderParticles=!1,this._volumetricLightScatteringRTT.ignoreCameraViewport=!0;var i=this.getCamera();i?i.customRenderTargets.push(this._volumetricLightScatteringRTT):c.customRenderTargets.push(this._volumetricLightScatteringRTT);var r,u=function(e){var t=e.getRenderingMesh();if(!h._meshExcluded(t)){var i=e.getMaterial();if(i){var r=t.getScene(),n=r.getEngine();n.setState(i.backFaceCulling);var o=t._getInstancesRenderList(e._id);if(!o.mustReturn){var s=n.getCaps().instancedArrays&&null!==o.visibleInstances[e._id];if(h._isReady(e,s)){var a=h._volumetricLightScatteringPass;if(t===h.mesh&&(a=e.effect?e.effect:i.getEffect()),n.enableEffect(a),t._bind(e,a,Zn.Material.TriangleFillMode),t===h.mesh)i.bind(t.getWorldMatrix(),t);else{if(h._volumetricLightScatteringPass.setMatrix(\"viewProjection\",r.getTransformMatrix()),i&&i.needAlphaTesting()){var l=i.getAlphaTestTexture();h._volumetricLightScatteringPass.setTexture(\"diffuseSampler\",l),l&&h._volumetricLightScatteringPass.setMatrix(\"diffuseMatrix\",l.getTextureMatrix())}t.useBones&&t.computeBonesUsingShaders&&t.skeleton&&h._volumetricLightScatteringPass.setMatrices(\"mBones\",t.skeleton.getTransformMatrices(t))}t._processRendering(e,h._volumetricLightScatteringPass,Zn.Material.TriangleFillMode,o,s,(function(e,t){return a.setMatrix(\"world\",t)}))}}}}},n=new Zn.Color4(0,0,0,1);this._volumetricLightScatteringRTT.onBeforeRenderObservable.add((function(){r=c.clearColor,c.clearColor=n})),this._volumetricLightScatteringRTT.onAfterRenderObservable.add((function(){c.clearColor=r})),this._volumetricLightScatteringRTT.customRenderFunction=function(e,t,i,r){var n,o=c.getEngine();if(r.length){for(o.setColorWrite(!1),n=0;n<r.length;n++)u(r.data[n]);o.setColorWrite(!0)}for(n=0;n<e.length;n++)u(e.data[n]);for(n=0;n<t.length;n++)u(t.data[n]);if(i.length){for(n=0;n<i.length;n++){var s=i.data[n],a=s.getBoundingInfo();a&&c.activeCamera&&(s._alphaIndex=s.getMesh().alphaIndex,s._distanceToCamera=a.boundingSphere.centerWorld.subtract(c.activeCamera.position).length())}var l=i.data.slice(0,i.length);for(l.sort((function(e,t){return e._alphaIndex>t._alphaIndex?1:e._alphaIndex<t._alphaIndex?-1:e._distanceToCamera<t._distanceToCamera?1:e._distanceToCamera>t._distanceToCamera?-1:0})),o.setAlphaMode(Zn.Engine.ALPHA_COMBINE),n=0;n<l.length;n++)u(l[n]);o.setAlphaMode(Zn.Engine.ALPHA_DISABLE)}}},u.prototype._updateMeshScreenCoordinates=function(e){var t,i=e.getTransformMatrix();t=this.useCustomMeshPosition?this.customMeshPosition:this.attachedNode?this.attachedNode.position:this.mesh.parent?this.mesh.getAbsolutePosition():this.mesh.position;var r=Zn.Vector3.Project(t,Zn.Matrix.Identity(),i,this._viewPort);this._screenCoordinates.x=r.x/this._viewPort.width,this._screenCoordinates.y=r.y/this._viewPort.height,this.invert&&(this._screenCoordinates.y=1-this._screenCoordinates.y)},u.CreateDefaultMesh=function(e,t){var i=Zn.Mesh.CreatePlane(e,1,t);i.billboardMode=Zn.AbstractMesh.BILLBOARDMODE_ALL;var r=new Zn.StandardMaterial(e+\"Material\",t);return r.emissiveColor=new Zn.Color3(1,1,1),i.material=r,i},b([Zn.serializeAsVector3()],u.prototype,\"customMeshPosition\",void 0),b([Zn.serialize()],u.prototype,\"useCustomMeshPosition\",void 0),b([Zn.serialize()],u.prototype,\"invert\",void 0),b([Zn.serializeAsMeshReference()],u.prototype,\"mesh\",void 0),b([Zn.serialize()],u.prototype,\"excludedMeshes\",void 0),b([Zn.serialize()],u.prototype,\"exposure\",void 0),b([Zn.serialize()],u.prototype,\"decay\",void 0),b([Zn.serialize()],u.prototype,\"weight\",void 0),b([Zn.serialize()],u.prototype,\"density\",void 0),u})(Zn.PostProcess),Zn.VolumetricLightScatteringPostProcess=qn,Jn=$a||($a={}),$n=(function(l){function e(e,t,i,r,n,o,s){var a=l.call(this,e,\"colorCorrection\",null,[\"colorTable\"],i,r,n,o,s)||this;return a._colorTableTexture=new Jn.Texture(t,r.getScene(),!0,!1,Jn.Texture.TRILINEAR_SAMPLINGMODE),a._colorTableTexture.anisotropicFilteringLevel=1,a._colorTableTexture.wrapU=Jn.Texture.CLAMP_ADDRESSMODE,a._colorTableTexture.wrapV=Jn.Texture.CLAMP_ADDRESSMODE,a.onApply=function(e){e.setTexture(\"colorTable\",a._colorTableTexture)},a}return T(e,l),e})(Jn.PostProcess),Jn.ColorCorrectionPostProcess=$n,(function(h){var u,e;(e=u=h.TonemappingOperator||(h.TonemappingOperator={}))[e.Hable=0]=\"Hable\",e[e.Reinhard=1]=\"Reinhard\",e[e.HejiDawson=2]=\"HejiDawson\",e[e.Photographic=3]=\"Photographic\";var t=(function(c){function e(e,t,i,r,n,o,s){void 0===n&&(n=h.Texture.BILINEAR_SAMPLINGMODE),void 0===s&&(s=h.Engine.TEXTURETYPE_UNSIGNED_INT);var a=c.call(this,e,\"tonemap\",[\"_ExposureAdjustment\"],null,1,r,n,o,!0,null,s)||this;a._operator=t,a.exposureAdjustment=i;var l=\"#define \";return a._operator===u.Hable?l+=\"HABLE_TONEMAPPING\":a._operator===u.Reinhard?l+=\"REINHARD_TONEMAPPING\":a._operator===u.HejiDawson?l+=\"OPTIMIZED_HEJIDAWSON_TONEMAPPING\":a._operator===u.Photographic&&(l+=\"PHOTOGRAPHIC_TONEMAPPING\"),a.updateEffect(l),a.onApply=function(e){e.setFloat(\"_ExposureAdjustment\",a.exposureAdjustment)},a}return T(e,c),e})(h.PostProcess);h.TonemapPostProcess=t})($a||($a={})),eo=$a||($a={}),to=(function(s){function e(e,t,i,r,n,o){return s.call(this,e,\"displayPass\",[\"passSampler\"],[\"passSampler\"],t,i,r,n,o)||this}return T(e,s),e})(eo.PostProcess),eo.DisplayPassPostProcess=to,io=$a||($a={}),ro=(function(a){function e(e,t,i,r,n,o,s){return void 0===s&&(s=io.Engine.TEXTURETYPE_UNSIGNED_INT),a.call(this,e,\"highlights\",null,null,t,i,r,n,o,null,s)||this}return T(e,a),e})(io.PostProcess),io.HighlightsPostProcess=ro,no=$a||($a={}),oo=(function(c){function e(e,t,i,r,n,o,s,a){void 0===i&&(i=null),void 0===s&&(s=no.Engine.TEXTURETYPE_UNSIGNED_INT);var l=c.call(this,e,\"imageProcessing\",[],[],t,i,r,n,o,null,s,\"postprocess\",null,!0)||this;return l._fromLinearSpace=!0,l._defines={IMAGEPROCESSING:!1,VIGNETTE:!1,VIGNETTEBLENDMODEMULTIPLY:!1,VIGNETTEBLENDMODEOPAQUE:!1,TONEMAPPING:!1,TONEMAPPING_ACES:!1,CONTRAST:!1,COLORCURVES:!1,COLORGRADING:!1,COLORGRADING3D:!1,FROMLINEARSPACE:!1,SAMPLER3DGREENDEPTH:!1,SAMPLER3DBGRMAP:!1,IMAGEPROCESSINGPOSTPROCESS:!1,EXPOSURE:!1},a?(a.applyByPostProcess=!0,l._attachImageProcessingConfiguration(a,!0),l.fromLinearSpace=!1):(l._attachImageProcessingConfiguration(null,!0),l.imageProcessingConfiguration.applyByPostProcess=!0),l.onApply=function(e){l.imageProcessingConfiguration.bind(e,l.aspectRatio)},l}return T(e,c),Object.defineProperty(e.prototype,\"imageProcessingConfiguration\",{get:function(){return this._imageProcessingConfiguration},set:function(e){this._attachImageProcessingConfiguration(e)},enumerable:!0,configurable:!0}),e.prototype._attachImageProcessingConfiguration=function(e,t){var i=this;if(void 0===t&&(t=!1),e!==this._imageProcessingConfiguration){if(this._imageProcessingConfiguration&&this._imageProcessingObserver&&this._imageProcessingConfiguration.onUpdateParameters.remove(this._imageProcessingObserver),e)this._imageProcessingConfiguration=e;else{var r=null,n=this.getEngine(),o=this.getCamera();if(o)r=o.getScene();else if(n&&n.scenes){var s=n.scenes;r=s[s.length-1]}else r=no.Engine.LastCreatedScene;this._imageProcessingConfiguration=r.imageProcessingConfiguration}this._imageProcessingConfiguration&&(this._imageProcessingObserver=this._imageProcessingConfiguration.onUpdateParameters.add((function(e){i._updateParameters()}))),t||this._updateParameters()}},Object.defineProperty(e.prototype,\"colorCurves\",{get:function(){return this.imageProcessingConfiguration.colorCurves},set:function(e){this.imageProcessingConfiguration.colorCurves=e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,\"colorCurvesEnabled\",{get:function(){return this.imageProcessingConfiguration.colorCurvesEnabled},set:function(e){this.imageProcessingConfiguration.colorCurvesEnabled=e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,\"colorGradingTexture\",{get:function(){return this.imageProcessingConfiguration.colorGradingTexture},set:function(e){this.imageProcessingConfiguration.colorGradingTexture=e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,\"colorGradingEnabled\",{get:function(){return this.imageProcessingConfiguration.colorGradingEnabled},set:function(e){this.imageProcessingConfiguration.colorGradingEnabled=e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,\"exposure\",{get:function(){return this.imageProcessingConfiguration.exposure},set:function(e){this.imageProcessingConfiguration.exposure=e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,\"toneMappingEnabled\",{get:function(){return this._imageProcessingConfiguration.toneMappingEnabled},set:function(e){this._imageProcessingConfiguration.toneMappingEnabled=e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,\"contrast\",{get:function(){return this.imageProcessingConfiguration.contrast},set:function(e){this.imageProcessingConfiguration.contrast=e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,\"vignetteStretch\",{get:function(){return this.imageProcessingConfiguration.vignetteStretch},set:function(e){this.imageProcessingConfiguration.vignetteStretch=e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,\"vignetteCentreX\",{get:function(){return this.imageProcessingConfiguration.vignetteCentreX},set:function(e){this.imageProcessingConfiguration.vignetteCentreX=e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,\"vignetteCentreY\",{get:function(){return this.imageProcessingConfiguration.vignetteCentreY},set:function(e){this.imageProcessingConfiguration.vignetteCentreY=e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,\"vignetteWeight\",{get:function(){return this.imageProcessingConfiguration.vignetteWeight},set:function(e){this.imageProcessingConfiguration.vignetteWeight=e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,\"vignetteColor\",{get:function(){return this.imageProcessingConfiguration.vignetteColor},set:function(e){this.imageProcessingConfiguration.vignetteColor=e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,\"vignetteCameraFov\",{get:function(){return this.imageProcessingConfiguration.vignetteCameraFov},set:function(e){this.imageProcessingConfiguration.vignetteCameraFov=e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,\"vignetteBlendMode\",{get:function(){return this.imageProcessingConfiguration.vignetteBlendMode},set:function(e){this.imageProcessingConfiguration.vignetteBlendMode=e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,\"vignetteEnabled\",{get:function(){return this.imageProcessingConfiguration.vignetteEnabled},set:function(e){this.imageProcessingConfiguration.vignetteEnabled=e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,\"fromLinearSpace\",{get:function(){return this._fromLinearSpace},set:function(e){this._fromLinearSpace!==e&&(this._fromLinearSpace=e,this._updateParameters())},enumerable:!0,configurable:!0}),e.prototype.getClassName=function(){return\"ImageProcessingPostProcess\"},e.prototype._updateParameters=function(){this._defines.FROMLINEARSPACE=this._fromLinearSpace,this.imageProcessingConfiguration.prepareDefines(this._defines,!0);var e=\"\";for(var t in this._defines)this._defines[t]&&(e+=\"#define \"+t+\";\\r\\n\");var i=[\"textureSampler\"],r=[\"scale\"];no.ImageProcessingConfiguration&&(no.ImageProcessingConfiguration.PrepareSamplers(i,this._defines),no.ImageProcessingConfiguration.PrepareUniforms(r,this._defines)),this.updateEffect(e,r,i)},e.prototype.dispose=function(e){c.prototype.dispose.call(this,e),this._imageProcessingConfiguration&&this._imageProcessingObserver&&this._imageProcessingConfiguration.onUpdateParameters.remove(this._imageProcessingObserver),this._imageProcessingConfiguration&&(this.imageProcessingConfiguration.applyByPostProcess=!1)},b([no.serialize()],e.prototype,\"_fromLinearSpace\",void 0),e})(no.PostProcess),no.ImageProcessingPostProcess=oo,so=$a||($a={}),ao=(function(l){function d(e,t,i,r,n,o,s){void 0===i&&(i=null),void 0===r&&(r=null),void 0===n&&(n=null),void 0===o&&(o=null),void 0===s&&(s=null);var a=l.call(this,e,t.getScene())||this;return a.name=e,a.children=new Array,a.animations=new Array,a._index=null,a._absoluteTransform=new so.Matrix,a._invertedAbsoluteTransform=new so.Matrix,a._scalingDeterminant=1,a._worldTransform=new so.Matrix,a._needToDecompose=!0,a._needToCompose=!1,a._skeleton=t,a._localMatrix=r?r.clone():so.Matrix.Identity(),a._restPose=n||a._localMatrix.clone(),a._baseMatrix=o||a._localMatrix.clone(),a._index=s,t.bones.push(a),a.setParent(i,!1),(o||r)&&a._updateDifferenceMatrix(),a}return T(d,l),Object.defineProperty(d.prototype,\"_matrix\",{get:function(){return this._compose(),this._localMatrix},set:function(e){this._localMatrix.copyFrom(e),this._needToDecompose=!0},enumerable:!0,configurable:!0}),d.prototype.getSkeleton=function(){return this._skeleton},d.prototype.getParent=function(){return this._parent},d.prototype.setParent=function(e,t){if(void 0===t&&(t=!0),this._parent!==e){if(this._parent){var i=this._parent.children.indexOf(this);-1!==i&&this._parent.children.splice(i,1)}this._parent=e,this._parent&&this._parent.children.push(this),t&&this._updateDifferenceMatrix(),this.markAsDirty()}},d.prototype.getLocalMatrix=function(){return this._compose(),this._localMatrix},d.prototype.getBaseMatrix=function(){return this._baseMatrix},d.prototype.getRestPose=function(){return this._restPose},d.prototype.getWorldMatrix=function(){return this._worldTransform},d.prototype.returnToRest=function(){this.updateMatrix(this._restPose.clone())},d.prototype.getInvertedAbsoluteTransform=function(){return this._invertedAbsoluteTransform},d.prototype.getAbsoluteTransform=function(){return this._absoluteTransform},Object.defineProperty(d.prototype,\"position\",{get:function(){return this._decompose(),this._localPosition},set:function(e){this._decompose(),this._localPosition.copyFrom(e),this._markAsDirtyAndCompose()},enumerable:!0,configurable:!0}),Object.defineProperty(d.prototype,\"rotation\",{get:function(){return this.getRotation()},set:function(e){this.setRotation(e)},enumerable:!0,configurable:!0}),Object.defineProperty(d.prototype,\"rotationQuaternion\",{get:function(){return this._decompose(),this._localRotation},set:function(e){this.setRotationQuaternion(e)},enumerable:!0,configurable:!0}),Object.defineProperty(d.prototype,\"scaling\",{get:function(){return this.getScale()},set:function(e){this.setScale(e)},enumerable:!0,configurable:!0}),Object.defineProperty(d.prototype,\"animationPropertiesOverride\",{get:function(){return this._skeleton.animationPropertiesOverride},enumerable:!0,configurable:!0}),d.prototype._decompose=function(){this._needToDecompose&&(this._needToDecompose=!1,this._localScaling||(this._localScaling=so.Vector3.Zero(),this._localRotation=so.Quaternion.Zero(),this._localPosition=so.Vector3.Zero()),this._localMatrix.decompose(this._localScaling,this._localRotation,this._localPosition))},d.prototype._compose=function(){this._needToCompose&&(this._needToCompose=!1,so.Matrix.ComposeToRef(this._localScaling,this._localRotation,this._localPosition,this._localMatrix))},d.prototype.updateMatrix=function(e,t,i){void 0===t&&(t=!0),void 0===i&&(i=!0),this._baseMatrix.copyFrom(e),t&&this._updateDifferenceMatrix(),i?(this._localMatrix.copyFrom(e),this._markAsDirtyAndDecompose()):this.markAsDirty()},d.prototype._updateDifferenceMatrix=function(e,t){if(void 0===t&&(t=!0),e||(e=this._baseMatrix),this._parent?e.multiplyToRef(this._parent._absoluteTransform,this._absoluteTransform):this._absoluteTransform.copyFrom(e),this._absoluteTransform.invertToRef(this._invertedAbsoluteTransform),t)for(var i=0;i<this.children.length;i++)this.children[i]._updateDifferenceMatrix();this._scalingDeterminant=this._absoluteTransform.determinant()<0?-1:1},d.prototype.markAsDirty=function(){this._currentRenderId++,this._childRenderId++,this._skeleton._markAsDirty()},d.prototype._markAsDirtyAndCompose=function(){this.markAsDirty(),this._needToCompose=!0},d.prototype._markAsDirtyAndDecompose=function(){this.markAsDirty(),this._needToDecompose=!0},d.prototype.copyAnimationRange=function(e,t,i,r,n){void 0===r&&(r=!1),void 0===n&&(n=null),0===this.animations.length&&(this.animations.push(new so.Animation(this.name,\"_matrix\",e.animations[0].framePerSecond,so.Animation.ANIMATIONTYPE_MATRIX,0)),this.animations[0].setKeys([]));var o=e.animations[0].getRange(t);if(!o)return!1;for(var s,a,l,c=o.from,h=o.to,u=e.animations[0].getKeys(),d=e.length,f=e.getParent(),p=this.getParent(),_=r&&f&&d&&this.length&&d!==this.length,m=_&&p&&f?p.length/f.length:1,g=r&&!p&&n&&(1!==n.x||1!==n.y||1!==n.z),v=this.animations[0].getKeys(),y=0,b=u.length;y<b;y++)(s=u[y]).frame>=c&&s.frame<=h&&(r?(l=s.value.clone(),_?(a=l.getTranslation(),l.setTranslation(a.scaleInPlace(m))):g&&n?(a=l.getTranslation(),l.setTranslation(a.multiplyInPlace(n))):l=s.value):l=s.value,v.push({frame:s.frame+i,value:l}));return this.animations[0].createRange(t,c+i,h+i),!0},d.prototype.translate=function(e,t,i){void 0===t&&(t=so.Space.LOCAL);var r=this.getLocalMatrix();if(t==so.Space.LOCAL)r.m[12]+=e.x,r.m[13]+=e.y,r.m[14]+=e.z;else{var n=null;i&&(n=i.getWorldMatrix()),this._skeleton.computeAbsoluteTransforms();var o=d._tmpMats[0],s=d._tmpVecs[0];this._parent&&(i&&n?(o.copyFrom(this._parent.getAbsoluteTransform()),o.multiplyToRef(n,o)):o.copyFrom(this._parent.getAbsoluteTransform())),o.m[12]=0,o.m[13]=0,o.m[14]=0,o.invert(),so.Vector3.TransformCoordinatesToRef(e,o,s),r.m[12]+=s.x,r.m[13]+=s.y,r.m[14]+=s.z}this._markAsDirtyAndDecompose()},d.prototype.setPosition=function(e,t,i){void 0===t&&(t=so.Space.LOCAL);var r=this.getLocalMatrix();if(t==so.Space.LOCAL)r.m[12]=e.x,r.m[13]=e.y,r.m[14]=e.z;else{var n=null;i&&(n=i.getWorldMatrix()),this._skeleton.computeAbsoluteTransforms();var o=d._tmpMats[0],s=d._tmpVecs[0];this._parent&&(i&&n?(o.copyFrom(this._parent.getAbsoluteTransform()),o.multiplyToRef(n,o)):o.copyFrom(this._parent.getAbsoluteTransform())),o.invert(),so.Vector3.TransformCoordinatesToRef(e,o,s),r.m[12]=s.x,r.m[13]=s.y,r.m[14]=s.z}this._markAsDirtyAndDecompose()},d.prototype.setAbsolutePosition=function(e,t){this.setPosition(e,so.Space.WORLD,t)},d.prototype.scale=function(e,t,i,r){void 0===r&&(r=!1);var n=this.getLocalMatrix(),o=d._tmpMats[0];so.Matrix.ScalingToRef(e,t,i,o),o.multiplyToRef(n,n),o.invert();for(var s=0,a=this.children;s<a.length;s++){var l=(u=a[s]).getLocalMatrix();l.multiplyToRef(o,l),l.m[12]*=e,l.m[13]*=t,l.m[14]*=i,u._markAsDirtyAndDecompose()}if(this._markAsDirtyAndDecompose(),r)for(var c=0,h=this.children;c<h.length;c++){var u;(u=h[c]).scale(e,t,i,r)}},d.prototype.setScale=function(e){this._decompose(),this._localScaling.copyFrom(e),this._markAsDirtyAndCompose()},d.prototype.getScale=function(){return this._decompose(),this._localScaling},d.prototype.getScaleToRef=function(e){this._decompose(),e.copyFrom(this._localScaling)},d.prototype.setYawPitchRoll=function(e,t,i,r,n){if(void 0===r&&(r=so.Space.LOCAL),r===so.Space.LOCAL){var o=d._tmpQuat;return so.Quaternion.RotationYawPitchRollToRef(e,t,i,o),void this.setRotationQuaternion(o,r,n)}var s=d._tmpMats[0];if(this._getNegativeRotationToRef(s,n)){var a=d._tmpMats[1];so.Matrix.RotationYawPitchRollToRef(e,t,i,a),s.multiplyToRef(a,a),this._rotateWithMatrix(a,r,n)}},d.prototype.rotate=function(e,t,i,r){void 0===i&&(i=so.Space.LOCAL);var n=d._tmpMats[0];n.m[12]=0,n.m[13]=0,n.m[14]=0,so.Matrix.RotationAxisToRef(e,t,n),this._rotateWithMatrix(n,i,r)},d.prototype.setAxisAngle=function(e,t,i,r){if(void 0===i&&(i=so.Space.LOCAL),i===so.Space.LOCAL){var n=d._tmpQuat;return so.Quaternion.RotationAxisToRef(e,t,n),void this.setRotationQuaternion(n,i,r)}var o=d._tmpMats[0];if(this._getNegativeRotationToRef(o,r)){var s=d._tmpMats[1];so.Matrix.RotationAxisToRef(e,t,s),o.multiplyToRef(s,s),this._rotateWithMatrix(s,i,r)}},d.prototype.setRotation=function(e,t,i){void 0===t&&(t=so.Space.LOCAL),this.setYawPitchRoll(e.y,e.x,e.z,t,i)},d.prototype.setRotationQuaternion=function(e,t,i){if(void 0===t&&(t=so.Space.LOCAL),t===so.Space.LOCAL)return this._decompose(),this._localRotation.copyFrom(e),void this._markAsDirtyAndCompose();var r=d._tmpMats[0];if(this._getNegativeRotationToRef(r,i)){var n=d._tmpMats[1];so.Matrix.FromQuaternionToRef(e,n),r.multiplyToRef(n,n),this._rotateWithMatrix(n,t,i)}},d.prototype.setRotationMatrix=function(e,t,i){if(void 0===t&&(t=so.Space.LOCAL),t===so.Space.LOCAL){var r=d._tmpQuat;return so.Quaternion.FromRotationMatrixToRef(e,r),void this.setRotationQuaternion(r,t,i)}var n=d._tmpMats[0];if(this._getNegativeRotationToRef(n,i)){var o=d._tmpMats[1];o.copyFrom(e),n.multiplyToRef(e,o),this._rotateWithMatrix(o,t,i)}},d.prototype._rotateWithMatrix=function(e,t,i){void 0===t&&(t=so.Space.LOCAL);var r=this.getLocalMatrix(),n=r.m[12],o=r.m[13],s=r.m[14],a=this.getParent(),l=d._tmpMats[3],c=d._tmpMats[4];a&&t==so.Space.WORLD?(i?(l.copyFrom(i.getWorldMatrix()),a.getAbsoluteTransform().multiplyToRef(l,l)):l.copyFrom(a.getAbsoluteTransform()),c.copyFrom(l),c.invert(),r.multiplyToRef(l,r),r.multiplyToRef(e,r),r.multiplyToRef(c,r)):t==so.Space.WORLD&&i?(l.copyFrom(i.getWorldMatrix()),c.copyFrom(l),c.invert(),r.multiplyToRef(l,r),r.multiplyToRef(e,r),r.multiplyToRef(c,r)):r.multiplyToRef(e,r),r.m[12]=n,r.m[13]=o,r.m[14]=s,this.computeAbsoluteTransforms(),this._markAsDirtyAndDecompose()},d.prototype._getNegativeRotationToRef=function(e,t){var i=d._tmpMats[2];return e.copyFrom(this.getAbsoluteTransform()),t&&(e.multiplyToRef(t.getWorldMatrix(),e),so.Matrix.ScalingToRef(t.scaling.x,t.scaling.y,t.scaling.z,i)),e.invert(),!isNaN(e.m[0])&&(i.m[0]*=this._scalingDeterminant,e.multiplyToRef(i,e),!0)},d.prototype.getPosition=function(e,t){void 0===e&&(e=so.Space.LOCAL),void 0===t&&(t=null);var i=so.Vector3.Zero();return this.getPositionToRef(e,t,i),i},d.prototype.getPositionToRef=function(e,t,i){if(void 0===e&&(e=so.Space.LOCAL),e==so.Space.LOCAL){var r=this.getLocalMatrix();i.x=r.m[12],i.y=r.m[13],i.z=r.m[14]}else{var n=null;t&&(n=t.getWorldMatrix()),this._skeleton.computeAbsoluteTransforms();var o=d._tmpMats[0];t&&n?(o.copyFrom(this.getAbsoluteTransform()),o.multiplyToRef(n,o)):o=this.getAbsoluteTransform(),i.x=o.m[12],i.y=o.m[13],i.z=o.m[14]}},d.prototype.getAbsolutePosition=function(e){void 0===e&&(e=null);var t=so.Vector3.Zero();return this.getPositionToRef(so.Space.WORLD,e,t),t},d.prototype.getAbsolutePositionToRef=function(e,t){this.getPositionToRef(so.Space.WORLD,e,t)},d.prototype.computeAbsoluteTransforms=function(){if(this._compose(),this._parent)this._localMatrix.multiplyToRef(this._parent._absoluteTransform,this._absoluteTransform);else{this._absoluteTransform.copyFrom(this._localMatrix);var e=this._skeleton.getPoseMatrix();e&&this._absoluteTransform.multiplyToRef(e,this._absoluteTransform)}for(var t=this.children,i=t.length,r=0;r<i;r++)t[r].computeAbsoluteTransforms()},d.prototype.getDirection=function(e,t){void 0===t&&(t=null);var i=so.Vector3.Zero();return this.getDirectionToRef(e,t,i),i},d.prototype.getDirectionToRef=function(e,t,i){void 0===t&&(t=null);var r=null;t&&(r=t.getWorldMatrix()),this._skeleton.computeAbsoluteTransforms();var n=d._tmpMats[0];n.copyFrom(this.getAbsoluteTransform()),t&&r&&n.multiplyToRef(r,n),so.Vector3.TransformNormalToRef(e,n,i),i.normalize()},d.prototype.getRotation=function(e,t){void 0===e&&(e=so.Space.LOCAL),void 0===t&&(t=null);var i=so.Vector3.Zero();return this.getRotationToRef(e,t,i),i},d.prototype.getRotationToRef=function(e,t,i){void 0===e&&(e=so.Space.LOCAL),void 0===t&&(t=null);var r=d._tmpQuat;this.getRotationQuaternionToRef(e,t,r),r.toEulerAnglesToRef(i)},d.prototype.getRotationQuaternion=function(e,t){void 0===e&&(e=so.Space.LOCAL),void 0===t&&(t=null);var i=so.Quaternion.Identity();return this.getRotationQuaternionToRef(e,t,i),i},d.prototype.getRotationQuaternionToRef=function(e,t,i){if(void 0===e&&(e=so.Space.LOCAL),void 0===t&&(t=null),e==so.Space.LOCAL)this._decompose(),i.copyFrom(this._localRotation);else{var r=d._tmpMats[0],n=this.getAbsoluteTransform();t?n.multiplyToRef(t.getWorldMatrix(),r):r.copyFrom(n),r.m[0]*=this._scalingDeterminant,r.m[1]*=this._scalingDeterminant,r.m[2]*=this._scalingDeterminant,r.decompose(void 0,i,void 0)}},d.prototype.getRotationMatrix=function(e,t){void 0===e&&(e=so.Space.LOCAL);var i=so.Matrix.Identity();return this.getRotationMatrixToRef(e,t,i),i},d.prototype.getRotationMatrixToRef=function(e,t,i){if(void 0===e&&(e=so.Space.LOCAL),e==so.Space.LOCAL)this.getLocalMatrix().getRotationMatrixToRef(i);else{var r=d._tmpMats[0],n=this.getAbsoluteTransform();t?n.multiplyToRef(t.getWorldMatrix(),r):r.copyFrom(n),r.m[0]*=this._scalingDeterminant,r.m[1]*=this._scalingDeterminant,r.m[2]*=this._scalingDeterminant,r.getRotationMatrixToRef(i)}},d.prototype.getAbsolutePositionFromLocal=function(e,t){void 0===t&&(t=null);var i=so.Vector3.Zero();return this.getAbsolutePositionFromLocalToRef(e,t,i),i},d.prototype.getAbsolutePositionFromLocalToRef=function(e,t,i){void 0===t&&(t=null);var r=null;t&&(r=t.getWorldMatrix()),this._skeleton.computeAbsoluteTransforms();var n=d._tmpMats[0];t&&r?(n.copyFrom(this.getAbsoluteTransform()),n.multiplyToRef(r,n)):n=this.getAbsoluteTransform(),so.Vector3.TransformCoordinatesToRef(e,n,i)},d.prototype.getLocalPositionFromAbsolute=function(e,t){void 0===t&&(t=null);var i=so.Vector3.Zero();return this.getLocalPositionFromAbsoluteToRef(e,t,i),i},d.prototype.getLocalPositionFromAbsoluteToRef=function(e,t,i){void 0===t&&(t=null);var r=null;t&&(r=t.getWorldMatrix()),this._skeleton.computeAbsoluteTransforms();var n=d._tmpMats[0];n.copyFrom(this.getAbsoluteTransform()),t&&r&&n.multiplyToRef(r,n),n.invert(),so.Vector3.TransformCoordinatesToRef(e,n,i)},d._tmpVecs=[so.Vector3.Zero(),so.Vector3.Zero()],d._tmpQuat=so.Quaternion.Identity(),d._tmpMats=[so.Matrix.Identity(),so.Matrix.Identity(),so.Matrix.Identity(),so.Matrix.Identity(),so.Matrix.Identity()],d})(so.Node),so.Bone=ao,lo=$a||($a={}),co=(function(){function b(e,t,i){if(this.targetPosition=lo.Vector3.Zero(),this.poleTargetPosition=lo.Vector3.Zero(),this.poleTargetLocalOffset=lo.Vector3.Zero(),this.poleAngle=0,this.slerpAmount=1,this._bone1Quat=lo.Quaternion.Identity(),this._bone1Mat=lo.Matrix.Identity(),this._bone2Ang=Math.PI,this._maxAngle=Math.PI,this._rightHandedSystem=!1,this._bendAxis=lo.Vector3.Right(),this._slerping=!1,this._adjustRoll=0,this._bone2=t,this._bone1=t.getParent(),this._bone1){this.mesh=e;var r=t.getPosition();if(0<t.getAbsoluteTransform().determinant()&&(this._rightHandedSystem=!0,this._bendAxis.x=0,this._bendAxis.y=0,this._bendAxis.z=-1,r.x>r.y&&r.x>r.z&&(this._adjustRoll=.5*Math.PI,this._bendAxis.z=1)),this._bone1.length){var n=this._bone1.getScale(),o=this._bone2.getScale();this._bone1Length=this._bone1.length*n.y*this.mesh.scaling.y,this._bone2Length=this._bone2.length*o.y*this.mesh.scaling.y}else if(this._bone1.children[0]){e.computeWorldMatrix(!0);var s=this._bone2.children[0].getAbsolutePosition(e),a=this._bone2.getAbsolutePosition(e),l=this._bone1.getAbsolutePosition(e);this._bone1Length=lo.Vector3.Distance(s,a),this._bone2Length=lo.Vector3.Distance(a,l)}this._bone1.getRotationMatrixToRef(lo.Space.WORLD,e,this._bone1Mat),this.maxAngle=Math.PI,i&&(i.targetMesh&&(this.targetMesh=i.targetMesh,this.targetMesh.computeWorldMatrix(!0)),i.poleTargetMesh?(this.poleTargetMesh=i.poleTargetMesh,this.poleTargetMesh.computeWorldMatrix(!0)):i.poleTargetBone?this.poleTargetBone=i.poleTargetBone:this._bone1.getParent()&&(this.poleTargetBone=this._bone1.getParent()),i.poleTargetLocalOffset&&this.poleTargetLocalOffset.copyFrom(i.poleTargetLocalOffset),i.poleAngle&&(this.poleAngle=i.poleAngle),i.bendAxis&&this._bendAxis.copyFrom(i.bendAxis),i.maxAngle&&(this.maxAngle=i.maxAngle),i.slerpAmount&&(this.slerpAmount=i.slerpAmount))}}return Object.defineProperty(b.prototype,\"maxAngle\",{get:function(){return this._maxAngle},set:function(e){this._setMaxAngle(e)},enumerable:!0,configurable:!0}),b.prototype._setMaxAngle=function(e){e<0&&(e=0),(e>Math.PI||null==e)&&(e=Math.PI),this._maxAngle=e;var t=this._bone1Length,i=this._bone2Length;this._maxReach=Math.sqrt(t*t+i*i-2*t*i*Math.cos(e))},b.prototype.update=function(){var e=this._bone1;if(e){var t=this.targetPosition,i=this.poleTargetPosition,r=b._tmpMats[0],n=b._tmpMats[1];this.targetMesh&&t.copyFrom(this.targetMesh.getAbsolutePosition()),this.poleTargetBone?this.poleTargetBone.getAbsolutePositionFromLocalToRef(this.poleTargetLocalOffset,this.mesh,i):this.poleTargetMesh&&lo.Vector3.TransformCoordinatesToRef(this.poleTargetLocalOffset,this.poleTargetMesh.getWorldMatrix(),i);var o=b._tmpVecs[0],s=b._tmpVecs[1],a=b._tmpVecs[2],l=b._tmpVecs[3],c=b._tmpVecs[4],h=b._tmpQuat;e.getAbsolutePositionToRef(this.mesh,o),i.subtractToRef(o,c),0==c.x&&0==c.y&&0==c.z?c.y=1:c.normalize(),t.subtractToRef(o,l),l.normalize(),lo.Vector3.CrossToRef(l,c,s),s.normalize(),lo.Vector3.CrossToRef(l,s,a),a.normalize(),lo.Matrix.FromXYZAxesToRef(a,l,s,r);var u=this._bone1Length,d=this._bone2Length,f=lo.Vector3.Distance(o,t);0<this._maxReach&&(f=Math.min(this._maxReach,f));var p=(d*d+f*f-u*u)/(2*d*f),_=(f*f+u*u-d*d)/(2*f*u);1<p&&(p=1),1<_&&(_=1),p<-1&&(p=-1),_<-1&&(_=-1);var m=Math.acos(p),g=Math.acos(_),v=-m-g;if(this._rightHandedSystem)lo.Matrix.RotationYawPitchRollToRef(0,0,this._adjustRoll,n),n.multiplyToRef(r,r),lo.Matrix.RotationAxisToRef(this._bendAxis,g,n),n.multiplyToRef(r,r);else{var y=b._tmpVecs[5];y.copyFrom(this._bendAxis),y.x*=-1,lo.Matrix.RotationAxisToRef(y,-g,n),n.multiplyToRef(r,r)}this.poleAngle&&(lo.Matrix.RotationAxisToRef(l,this.poleAngle,n),r.multiplyToRef(n,r)),this._bone1&&(this.slerpAmount<1?(this._slerping||lo.Quaternion.FromRotationMatrixToRef(this._bone1Mat,this._bone1Quat),lo.Quaternion.FromRotationMatrixToRef(r,h),lo.Quaternion.SlerpToRef(this._bone1Quat,h,this.slerpAmount,this._bone1Quat),v=this._bone2Ang*(1-this.slerpAmount)+v*this.slerpAmount,this._bone1.setRotationQuaternion(this._bone1Quat,lo.Space.WORLD,this.mesh),this._slerping=!0):(this._bone1.setRotationMatrix(r,lo.Space.WORLD,this.mesh),this._bone1Mat.copyFrom(r),this._slerping=!1)),this._bone2.setAxisAngle(this._bendAxis,v,lo.Space.LOCAL),this._bone2Ang=v}},b._tmpVecs=[lo.Vector3.Zero(),lo.Vector3.Zero(),lo.Vector3.Zero(),lo.Vector3.Zero(),lo.Vector3.Zero(),lo.Vector3.Zero()],b._tmpQuat=lo.Quaternion.Identity(),b._tmpMats=[lo.Matrix.Identity(),lo.Matrix.Identity()],b})(),lo.BoneIKController=co,ho=$a||($a={}),uo=(function(){function C(e,t,i,r){if(this.upAxis=ho.Vector3.Up(),this.upAxisSpace=ho.Space.LOCAL,this.adjustYaw=0,this.adjustPitch=0,this.adjustRoll=0,this.slerpAmount=1,this._boneQuat=ho.Quaternion.Identity(),this._slerping=!1,this._firstFrameSkipped=!1,this._fowardAxis=ho.Vector3.Forward(),this.mesh=e,this.bone=t,this.target=i,r&&(r.adjustYaw&&(this.adjustYaw=r.adjustYaw),r.adjustPitch&&(this.adjustPitch=r.adjustPitch),r.adjustRoll&&(this.adjustRoll=r.adjustRoll),null!=r.maxYaw?this.maxYaw=r.maxYaw:this.maxYaw=Math.PI,null!=r.minYaw?this.minYaw=r.minYaw:this.minYaw=-Math.PI,null!=r.maxPitch?this.maxPitch=r.maxPitch:this.maxPitch=Math.PI,null!=r.minPitch?this.minPitch=r.minPitch:this.minPitch=-Math.PI,null!=r.slerpAmount&&(this.slerpAmount=r.slerpAmount),null!=r.upAxis&&(this.upAxis=r.upAxis),null!=r.upAxisSpace&&(this.upAxisSpace=r.upAxisSpace),null!=r.yawAxis||null!=r.pitchAxis)){var n=ho.Axis.Y,o=ho.Axis.X;null!=r.yawAxis&&(n=r.yawAxis.clone()).normalize(),null!=r.pitchAxis&&(o=r.pitchAxis.clone()).normalize();var s=ho.Vector3.Cross(o,n);this._transformYawPitch=ho.Matrix.Identity(),ho.Matrix.FromXYZAxesToRef(o,n,s,this._transformYawPitch),this._transformYawPitchInv=this._transformYawPitch.clone(),this._transformYawPitch.invert()}t.getParent()||this.upAxisSpace!=ho.Space.BONE||(this.upAxisSpace=ho.Space.LOCAL)}return Object.defineProperty(C.prototype,\"minYaw\",{get:function(){return this._minYaw},set:function(e){this._minYaw=e,this._minYawSin=Math.sin(e),this._minYawCos=Math.cos(e),null!=this._maxYaw&&(this._midYawConstraint=.5*this._getAngleDiff(this._minYaw,this._maxYaw)+this._minYaw,this._yawRange=this._maxYaw-this._minYaw)},enumerable:!0,configurable:!0}),Object.defineProperty(C.prototype,\"maxYaw\",{get:function(){return this._maxYaw},set:function(e){this._maxYaw=e,this._maxYawSin=Math.sin(e),this._maxYawCos=Math.cos(e),null!=this._minYaw&&(this._midYawConstraint=.5*this._getAngleDiff(this._minYaw,this._maxYaw)+this._minYaw,this._yawRange=this._maxYaw-this._minYaw)},enumerable:!0,configurable:!0}),Object.defineProperty(C.prototype,\"minPitch\",{get:function(){return this._minPitch},set:function(e){this._minPitch=e,this._minPitchTan=Math.tan(e)},enumerable:!0,configurable:!0}),Object.defineProperty(C.prototype,\"maxPitch\",{get:function(){return this._maxPitch},set:function(e){this._maxPitch=e,this._maxPitchTan=Math.tan(e)},enumerable:!0,configurable:!0}),C.prototype.update=function(){if(this.slerpAmount<1&&!this._firstFrameSkipped)this._firstFrameSkipped=!0;else{var e=this.bone,t=C._tmpVecs[0];e.getAbsolutePositionToRef(this.mesh,t);var i=this.target,r=C._tmpMats[0],n=C._tmpMats[1],o=this.mesh,s=e.getParent(),a=C._tmpVecs[1];a.copyFrom(this.upAxis),this.upAxisSpace==ho.Space.BONE&&s?(this._transformYawPitch&&ho.Vector3.TransformCoordinatesToRef(a,this._transformYawPitchInv,a),s.getDirectionToRef(a,this.mesh,a)):this.upAxisSpace==ho.Space.LOCAL&&(o.getDirectionToRef(a,a),1==o.scaling.x&&1==o.scaling.y&&1==o.scaling.z||a.normalize());var l=!1,c=!1;if(this._maxYaw==Math.PI&&this._minYaw==-Math.PI||(l=!0),this._maxPitch==Math.PI&&this._minPitch==-Math.PI||(c=!0),l||c){var h=C._tmpMats[2],u=C._tmpMats[3];if(this.upAxisSpace==ho.Space.BONE&&1==a.y&&s)s.getRotationMatrixToRef(ho.Space.WORLD,this.mesh,h);else if(this.upAxisSpace!=ho.Space.LOCAL||1!=a.y||s){(f=C._tmpVecs[2]).copyFrom(this._fowardAxis),this._transformYawPitch&&ho.Vector3.TransformCoordinatesToRef(f,this._transformYawPitchInv,f),s?s.getDirectionToRef(f,this.mesh,f):o.getDirectionToRef(f,f);var d=ho.Vector3.Cross(a,f);d.normalize();var f=ho.Vector3.Cross(d,a);ho.Matrix.FromXYZAxesToRef(d,a,f,h)}else h.copyFrom(o.getWorldMatrix());h.invertToRef(u);var p=null;if(c){var _=C._tmpVecs[3];i.subtractToRef(t,_),ho.Vector3.TransformCoordinatesToRef(_,u,_),p=Math.sqrt(_.x*_.x+_.z*_.z);var m=Math.atan2(_.y,p),g=m;m>this._maxPitch?(_.y=this._maxPitchTan*p,g=this._maxPitch):m<this._minPitch&&(_.y=this._minPitchTan*p,g=this._minPitch),m!=g&&(ho.Vector3.TransformCoordinatesToRef(_,h,_),_.addInPlace(t),i=_)}if(l){_=C._tmpVecs[4];i.subtractToRef(t,_),ho.Vector3.TransformCoordinatesToRef(_,u,_);var v=Math.atan2(_.x,_.z),y=v;if((v>this._maxYaw||v<this._minYaw)&&(null==p&&(p=Math.sqrt(_.x*_.x+_.z*_.z)),this._yawRange>Math.PI?this._isAngleBetween(v,this._maxYaw,this._midYawConstraint)?(_.z=this._maxYawCos*p,_.x=this._maxYawSin*p,y=this._maxYaw):this._isAngleBetween(v,this._midYawConstraint,this._minYaw)&&(_.z=this._minYawCos*p,_.x=this._minYawSin*p,y=this._minYaw):v>this._maxYaw?(_.z=this._maxYawCos*p,_.x=this._maxYawSin*p,y=this._maxYaw):v<this._minYaw&&(_.z=this._minYawCos*p,_.x=this._minYawSin*p,y=this._minYaw)),this._slerping&&this._yawRange>Math.PI){var b=C._tmpVecs[8];b.copyFrom(ho.Axis.Z),this._transformYawPitch&&ho.Vector3.TransformCoordinatesToRef(b,this._transformYawPitchInv,b);var T=C._tmpMats[4];this._boneQuat.toRotationMatrix(T),this.mesh.getWorldMatrix().multiplyToRef(T,T),ho.Vector3.TransformCoordinatesToRef(b,T,b),ho.Vector3.TransformCoordinatesToRef(b,u,b);var E=Math.atan2(b.x,b.z),x=this._getAngleBetween(E,v);if(this._getAngleBetween(E,this._midYawConstraint)<x){null==p&&(p=Math.sqrt(_.x*_.x+_.z*_.z));var P=this._getAngleBetween(E,this._maxYaw);y=this._getAngleBetween(E,this._minYaw)<P?E+.75*Math.PI:E-.75*Math.PI,_.z=Math.cos(y)*p,_.x=Math.sin(y)*p}}v!=y&&(ho.Vector3.TransformCoordinatesToRef(_,h,_),_.addInPlace(t),i=_)}}var A=C._tmpVecs[5],S=C._tmpVecs[6],M=C._tmpVecs[7],R=C._tmpQuat;i.subtractToRef(t,A),A.normalize(),ho.Vector3.CrossToRef(a,A,S),S.normalize(),ho.Vector3.CrossToRef(A,S,M),M.normalize(),ho.Matrix.FromXYZAxesToRef(S,M,A,r),0===S.x&&0===S.y&&0===S.z||0===M.x&&0===M.y&&0===M.z||0===A.x&&0===A.y&&0===A.z||((this.adjustYaw||this.adjustPitch||this.adjustRoll)&&(ho.Matrix.RotationYawPitchRollToRef(this.adjustYaw,this.adjustPitch,this.adjustRoll,n),n.multiplyToRef(r,r)),this.slerpAmount<1?(this._slerping||this.bone.getRotationQuaternionToRef(ho.Space.WORLD,this.mesh,this._boneQuat),this._transformYawPitch&&this._transformYawPitch.multiplyToRef(r,r),ho.Quaternion.FromRotationMatrixToRef(r,R),ho.Quaternion.SlerpToRef(this._boneQuat,R,this.slerpAmount,this._boneQuat),this.bone.setRotationQuaternion(this._boneQuat,ho.Space.WORLD,this.mesh),this._slerping=!0):(this._transformYawPitch&&this._transformYawPitch.multiplyToRef(r,r),this.bone.setRotationMatrix(r,ho.Space.WORLD,this.mesh),this._slerping=!1))}},C.prototype._getAngleDiff=function(e,t){var i=t-e;return(i%=2*Math.PI)>Math.PI?i-=2*Math.PI:i<-Math.PI&&(i+=2*Math.PI),i},C.prototype._getAngleBetween=function(e,t){var i=0;return(i=(e=(e%=2*Math.PI)<0?e+2*Math.PI:e)<(t=(t%=2*Math.PI)<0?t+2*Math.PI:t)?t-e:e-t)>Math.PI&&(i=2*Math.PI-i),i},C.prototype._isAngleBetween=function(e,t,i){if(e=(e%=2*Math.PI)<0?e+2*Math.PI:e,(t=(t%=2*Math.PI)<0?t+2*Math.PI:t)<(i=(i%=2*Math.PI)<0?i+2*Math.PI:i)){if(t<e&&e<i)return!0}else if(i<e&&e<t)return!0;return!1},C._tmpVecs=[ho.Vector3.Zero(),ho.Vector3.Zero(),ho.Vector3.Zero(),ho.Vector3.Zero(),ho.Vector3.Zero(),ho.Vector3.Zero(),ho.Vector3.Zero(),ho.Vector3.Zero(),ho.Vector3.Zero(),ho.Vector3.Zero()],C._tmpQuat=ho.Quaternion.Identity(),C._tmpMats=[ho.Matrix.Identity(),ho.Matrix.Identity(),ho.Matrix.Identity(),ho.Matrix.Identity(),ho.Matrix.Identity()],C})(),ho.BoneLookController=uo,fo=$a||($a={}),po=(function(){function u(e,t,i){this.name=e,this.id=t,this.bones=new Array,this.needInitialSkinMatrix=!1,this._isDirty=!0,this._meshesWithPoseMatrix=new Array,this._identity=fo.Matrix.Identity(),this._ranges={},this._lastAbsoluteTransformsUpdateId=-1,this.doNotSerialize=!1,this._animationPropertiesOverride=null,this.onBeforeComputeObservable=new fo.Observable,this.bones=[],this._scene=i||fo.Engine.LastCreatedScene,i.skeletons.push(this),this._isDirty=!0}return Object.defineProperty(u.prototype,\"animationPropertiesOverride\",{get:function(){return this._animationPropertiesOverride?this._animationPropertiesOverride:this._scene.animationPropertiesOverride},set:function(e){this._animationPropertiesOverride=e},enumerable:!0,configurable:!0}),u.prototype.getTransformMatrices=function(e){return this.needInitialSkinMatrix&&e._bonesTransformMatrices?e._bonesTransformMatrices:(this._transformMatrices||this.prepare(),this._transformMatrices)},u.prototype.getScene=function(){return this._scene},u.prototype.toString=function(e){var t=\"Name: \"+this.name+\", nBones: \"+this.bones.length;if(t+=\", nAnimationRanges: \"+(this._ranges?Object.keys(this._ranges).length:\"none\"),e){t+=\", Ranges: {\";var i=!0;for(var r in this._ranges)i&&(t+=\", \",i=!1),t+=r;t+=\"}\"}return t},u.prototype.getBoneIndexByName=function(e){for(var t=0,i=this.bones.length;t<i;t++)if(this.bones[t].name===e)return t;return-1},u.prototype.createAnimationRange=function(e,t,i){if(!this._ranges[e]){this._ranges[e]=new fo.AnimationRange(e,t,i);for(var r=0,n=this.bones.length;r<n;r++)this.bones[r].animations[0]&&this.bones[r].animations[0].createRange(e,t,i)}},u.prototype.deleteAnimationRange=function(e,t){void 0===t&&(t=!0);for(var i=0,r=this.bones.length;i<r;i++)this.bones[i].animations[0]&&this.bones[i].animations[0].deleteRange(e,t);this._ranges[e]=null},u.prototype.getAnimationRange=function(e){return this._ranges[e]},u.prototype.getAnimationRanges=function(){var e,t=[],i=0;for(e in this._ranges)t[i]=this._ranges[e],i++;return t},u.prototype.copyAnimationRange=function(e,t,i){if(void 0===i&&(i=!1),this._ranges[t]||!e.getAnimationRange(t))return!1;var r,n,o=!0,s=this._getHighestAnimationFrame()+1,a={},l=e.bones;for(n=0,r=l.length;n<r;n++)a[l[n].name]=l[n];this.bones.length!==l.length&&(fo.Tools.Warn(\"copyAnimationRange: this rig has \"+this.bones.length+\" bones, while source as \"+l.length),o=!1);var c=i&&this.dimensionsAtRest&&e.dimensionsAtRest?this.dimensionsAtRest.divide(e.dimensionsAtRest):null;for(n=0,r=this.bones.length;n<r;n++){var h=this.bones[n].name,u=a[h];u?o=o&&this.bones[n].copyAnimationRange(u,t,s,i,c):(fo.Tools.Warn(\"copyAnimationRange: not same rig, missing source bone \"+h),o=!1)}var d=e.getAnimationRange(t);return d&&(this._ranges[t]=new fo.AnimationRange(t,d.from+s,d.to+s)),o},u.prototype.returnToRest=function(){for(var e=0;e<this.bones.length;e++)this.bones[e].returnToRest()},u.prototype._getHighestAnimationFrame=function(){for(var e=0,t=0,i=this.bones.length;t<i;t++)if(this.bones[t].animations[0]){var r=this.bones[t].animations[0].getHighestFrame();e<r&&(e=r)}return e},u.prototype.beginAnimation=function(e,t,i,r){var n=this.getAnimationRange(e);return n?this._scene.beginAnimation(this,n.from,n.to,t,i,r):null},u.prototype._markAsDirty=function(){this._isDirty=!0},u.prototype._registerMeshWithPoseMatrix=function(e){this._meshesWithPoseMatrix.push(e)},u.prototype._unregisterMeshWithPoseMatrix=function(e){var t=this._meshesWithPoseMatrix.indexOf(e);-1<t&&this._meshesWithPoseMatrix.splice(t,1)},u.prototype._computeTransformMatrices=function(e,t){this.onBeforeComputeObservable.notifyObservers(this);for(var i=0;i<this.bones.length;i++){var r=this.bones[i],n=r.getParent();if(n?r.getLocalMatrix().multiplyToRef(n.getWorldMatrix(),r.getWorldMatrix()):t?r.getLocalMatrix().multiplyToRef(t,r.getWorldMatrix()):r.getWorldMatrix().copyFrom(r.getLocalMatrix()),-1!==r._index){var o=null===r._index?i:r._index;r.getInvertedAbsoluteTransform().multiplyToArray(r.getWorldMatrix(),e,16*o)}}this._identity.copyToArray(e,16*this.bones.length)},u.prototype.prepare=function(){if(this._isDirty){if(this.needInitialSkinMatrix)for(var e=0;e<this._meshesWithPoseMatrix.length;e++){var t=this._meshesWithPoseMatrix[e],i=t.getPoseMatrix();if(t._bonesTransformMatrices&&t._bonesTransformMatrices.length===16*(this.bones.length+1)||(t._bonesTransformMatrices=new Float32Array(16*(this.bones.length+1))),this._synchronizedWithMesh!==t){this._synchronizedWithMesh=t;for(var r=0;r<this.bones.length;r++){var n=this.bones[r];if(!n.getParent())n.getBaseMatrix().multiplyToRef(i,fo.Tmp.Matrix[1]),n._updateDifferenceMatrix(fo.Tmp.Matrix[1])}}this._computeTransformMatrices(t._bonesTransformMatrices,i)}else this._transformMatrices&&this._transformMatrices.length===16*(this.bones.length+1)||(this._transformMatrices=new Float32Array(16*(this.bones.length+1))),this._computeTransformMatrices(this._transformMatrices,null);this._isDirty=!1,this._scene._activeBones.addCount(this.bones.length,!1)}},u.prototype.getAnimatables=function(){if(!this._animatables||this._animatables.length!==this.bones.length){this._animatables=[];for(var e=0;e<this.bones.length;e++)this._animatables.push(this.bones[e])}return this._animatables},u.prototype.clone=function(e,t){var i=new u(e,t||e,this._scene);i.needInitialSkinMatrix=this.needInitialSkinMatrix;for(var r=0;r<this.bones.length;r++){var n=this.bones[r],o=null,s=n.getParent();if(s){var a=this.bones.indexOf(s);o=i.bones[a]}var l=new fo.Bone(n.name,i,o,n.getBaseMatrix().clone(),n.getRestPose().clone());fo.Tools.DeepCopy(n.animations,l.animations)}if(this._ranges)for(var c in i._ranges={},this._ranges){var h=this._ranges[c];h&&(i._ranges[c]=h.clone())}return this._isDirty=!0,i},u.prototype.enableBlending=function(t){void 0===t&&(t=.01),this.bones.forEach((function(e){e.animations.forEach((function(e){e.enableBlending=!0,e.blendingSpeed=t}))}))},u.prototype.dispose=function(){this._meshesWithPoseMatrix=[],this.getScene().stopAnimation(this),this.getScene().removeSkeleton(this)},u.prototype.serialize=function(){var e={};e.name=this.name,e.id=this.id,this.dimensionsAtRest&&(e.dimensionsAtRest=this.dimensionsAtRest.asArray()),e.bones=[],e.needInitialSkinMatrix=this.needInitialSkinMatrix;for(var t=0;t<this.bones.length;t++){var i=this.bones[t],r=i.getParent(),n={parentBoneIndex:r?this.bones.indexOf(r):-1,name:i.name,matrix:i.getBaseMatrix().toArray(),rest:i.getRestPose().toArray()};for(var o in e.bones.push(n),i.length&&(n.length=i.length),i.metadata&&(n.metadata=i.metadata),i.animations&&0<i.animations.length&&(n.animation=i.animations[0].serialize()),e.ranges=[],this._ranges){var s=this._ranges[o];if(s){var a={};a.name=o,a.from=s.from,a.to=s.to,e.ranges.push(a)}}}return e},u.Parse=function(e,t){var i,r=new u(e.name,e.id,t);for(e.dimensionsAtRest&&(r.dimensionsAtRest=fo.Vector3.FromArray(e.dimensionsAtRest)),r.needInitialSkinMatrix=e.needInitialSkinMatrix,i=0;i<e.bones.length;i++){var n=e.bones[i],o=null;-1<n.parentBoneIndex&&(o=r.bones[n.parentBoneIndex]);var s=n.rest?fo.Matrix.FromArray(n.rest):null,a=new fo.Bone(n.name,r,o,fo.Matrix.FromArray(n.matrix),s);void 0!==n.id&&null!==n.id&&(a.id=n.id),n.length&&(a.length=n.length),n.metadata&&(a.metadata=n.metadata),n.animation&&a.animations.push(fo.Animation.Parse(n.animation))}if(e.ranges)for(i=0;i<e.ranges.length;i++){var l=e.ranges[i];r.createAnimationRange(l.name,l.from,l.to)}return r},u.prototype.computeAbsoluteTransforms=function(e){void 0===e&&(e=!1);var t=this._scene.getRenderId();(this._lastAbsoluteTransformsUpdateId!=t||e)&&(this.bones[0].computeAbsoluteTransforms(),this._lastAbsoluteTransformsUpdateId=t)},u.prototype.getPoseMatrix=function(){var e=null;return 0<this._meshesWithPoseMatrix.length&&(e=this._meshesWithPoseMatrix[0].getPoseMatrix()),e},u.prototype.sortBones=function(){for(var e=new Array,t=new Array(this.bones.length),i=0;i<this.bones.length;i++)this._sortBones(i,e,t);this.bones=e},u.prototype._sortBones=function(e,t,i){if(!i[e]){i[e]=!0;var r=this.bones[e];void 0===r._index&&(r._index=e);var n=r.getParent();n&&this._sortBones(this.bones.indexOf(n),t,i),t.push(r)}},u})(),fo.Skeleton=po,_o=$a||($a={}),mo=(function(){function e(){}return e.Ldexp=function(e,t){return 1023<t?e*Math.pow(2,1023)*Math.pow(2,t-1023):t<-1074?e*Math.pow(2,-1074)*Math.pow(2,t+1074):e*Math.pow(2,t)},e.Rgbe2float=function(e,t,i,r,n,o){0<n?(n=this.Ldexp(1,n-136),e[o+0]=t*n,e[o+1]=i*n,e[o+2]=r*n):(e[o+0]=0,e[o+1]=0,e[o+2]=0)},e.readStringLine=function(e,t){for(var i=\"\",r=\"\",n=t;n<e.length-t&&\"\\n\"!=(r=String.fromCharCode(e[n]));n++)i+=r;return i},e.RGBE_ReadHeader=function(e){var t,i,r=this.readStringLine(e,0);if(\"#\"!=r[0]||\"?\"!=r[1])throw\"Bad HDR Format.\";for(var n=!1,o=!1,s=0;s+=r.length+1,\"FORMAT=32-bit_rle_rgbe\"==(r=this.readStringLine(e,s))?o=!0:0==r.length&&(n=!0),!n;);if(!o)throw\"HDR Bad header format, unsupported FORMAT\";s+=r.length+1,r=this.readStringLine(e,s);var a=/^\\-Y (.*) \\+X (.*)$/g.exec(r);if(!a||a.length<3)throw\"HDR Bad header format, no size\";if(i=parseInt(a[2]),t=parseInt(a[1]),i<8||32767<i)throw\"HDR Bad header format, unsupported size\";return{height:t,width:i,dataPosition:s+=r.length+1}},e.GetCubeMapTextureData=function(e,t){var i=new Uint8Array(e),r=this.RGBE_ReadHeader(i),n=this.RGBE_ReadPixels_RLE(i,r);return _o.PanoramaToCubeMapTools.ConvertPanoramaToCubemap(n,r.width,r.height,t)},e.RGBE_ReadPixels=function(e,t){return this.RGBE_ReadPixels_RLE(e,t)},e.RGBE_ReadPixels_RLE=function(e,t){for(var i,r,n,o,s,a=t.height,l=t.width,c=t.dataPosition,h=0,u=0,d=0,f=new ArrayBuffer(4*l),p=new Uint8Array(f),_=new ArrayBuffer(t.width*t.height*4*3),m=new Float32Array(_);0<a;){if(i=e[c++],r=e[c++],n=e[c++],o=e[c++],2!=i||2!=r||128&n)throw\"HDR Bad header format, not RLE\";if((n<<8|o)!=l)throw\"HDR Bad header format, wrong scan line width\";for(d=h=0;d<4;d++)for(u=(d+1)*l;h<u;)if(i=e[c++],r=e[c++],128<i){if(0==(s=i-128)||u-h<s)throw\"HDR Bad Format, bad scanline data (run)\";for(;0<s--;)p[h++]=r}else{if(0==(s=i)||u-h<s)throw\"HDR Bad Format, bad scanline data (non-run)\";if(p[h++]=r,0<--s)for(var g=0;g<s;g++)p[h++]=e[c++]}for(d=0;d<l;d++)i=p[d],r=p[d+l],n=p[d+2*l],o=p[d+3*l],this.Rgbe2float(m,i,r,n,o,(t.height-a)*l*3+3*d);a--}return m},e})(),_o.HDRTools=mo,go=$a||($a={}),vo=(function(h){function m(e,t,i,r,n,o,s,a,l){void 0===r&&(r=!1),void 0===n&&(n=!0),void 0===o&&(o=!1),void 0===s&&(s=!1),void 0===a&&(a=null),void 0===l&&(l=null);var c=h.call(this,t)||this;return c._generateHarmonics=!0,c._onLoad=null,c._onError=null,c.coordinatesMode=go.Texture.CUBIC_MODE,c._isBlocking=!0,c._rotationY=0,c.boundingBoxPosition=go.Vector3.Zero(),e&&(c.name=e,c.url=e,c.hasAlpha=!1,c.isCube=!0,c._textureMatrix=go.Matrix.Identity(),c._onLoad=a,c._onError=l,c.gammaSpace=o,c._noMipmap=r,c._size=i,c._texture=c._getFromCache(e,c._noMipmap),c._texture||(t.useDelayedTextureLoading?c.delayLoadState=go.Engine.DELAYLOADSTATE_NOTLOADED:c.loadTexture())),c}return T(m,h),Object.defineProperty(m.prototype,\"isBlocking\",{get:function(){return this._isBlocking},set:function(e){this._isBlocking=e},enumerable:!0,configurable:!0}),Object.defineProperty(m.prototype,\"rotationY\",{get:function(){return this._rotationY},set:function(e){this._rotationY=e,this.setReflectionTextureMatrix(go.Matrix.RotationY(this._rotationY))},enumerable:!0,configurable:!0}),Object.defineProperty(m.prototype,\"boundingBoxSize\",{get:function(){return this._boundingBoxSize},set:function(e){if(!this._boundingBoxSize||!this._boundingBoxSize.equals(e)){this._boundingBoxSize=e;var t=this.getScene();t&&t.markAllMaterialsAsDirty(go.Material.TextureDirtyFlag)}},enumerable:!0,configurable:!0}),m.prototype.loadTexture=function(){var _=this,e=this.getScene();e&&(this._texture=e.getEngine().createRawCubeTextureFromUrl(this.url,e,this._size,go.Engine.TEXTUREFORMAT_RGB,e.getEngine().getCaps().textureFloat?go.Engine.TEXTURETYPE_FLOAT:go.Engine.TEXTURETYPE_UNSIGNED_INT,this._noMipmap,(function(e){_.lodGenerationOffset=0,_.lodGenerationScale=.8;var t=_.getScene();if(!t)return null;var i=go.HDRTools.GetCubeMapTextureData(e,_._size);if(_._generateHarmonics){var r=go.CubeMapToSphericalPolynomialTools.ConvertCubeMapToSphericalPolynomial(i);_.sphericalPolynomial=r}for(var n=[],o=null,s=0;s<6;s++){if(!t.getEngine().getCaps().textureFloat){var a=new ArrayBuffer(_._size*_._size*3);o=new Uint8Array(a)}var l=i[m._facesMapping[s]];if(_.gammaSpace||o)for(var c=0;c<_._size*_._size;c++)if(_.gammaSpace&&(l[3*c+0]=Math.pow(l[3*c+0],go.ToGammaSpace),l[3*c+1]=Math.pow(l[3*c+1],go.ToGammaSpace),l[3*c+2]=Math.pow(l[3*c+2],go.ToGammaSpace)),o){var h=Math.max(255*l[3*c+0],0),u=Math.max(255*l[3*c+1],0),d=Math.max(255*l[3*c+2],0),f=Math.max(Math.max(h,u),d);if(255<f){var p=255/f;h*=p,u*=p,d*=p}o[3*c+0]=h,o[3*c+1]=u,o[3*c+2]=d}o?n.push(o):n.push(l)}return n}),null,this._onLoad,this._onError))},m.prototype.clone=function(){var e=this.getScene();if(!e)return this;var t=new m(this.url,e,this._size,this._noMipmap,this._generateHarmonics,this.gammaSpace);return t.level=this.level,t.wrapU=this.wrapU,t.wrapV=this.wrapV,t.coordinatesIndex=this.coordinatesIndex,t.coordinatesMode=this.coordinatesMode,t},m.prototype.delayLoad=function(){this.delayLoadState===go.Engine.DELAYLOADSTATE_NOTLOADED&&(this.delayLoadState=go.Engine.DELAYLOADSTATE_LOADED,this._texture=this._getFromCache(this.url,this._noMipmap),this._texture||this.loadTexture())},m.prototype.getReflectionTextureMatrix=function(){return this._textureMatrix},m.prototype.setReflectionTextureMatrix=function(e){this._textureMatrix=e},m.Parse=function(e,t,i){var r=null;return e.name&&!e.isRenderTarget&&((r=new m(i+e.name,t,e.size,e.noMipmap,e.generateHarmonics,e.useInGammaSpace)).name=e.name,r.hasAlpha=e.hasAlpha,r.level=e.level,r.coordinatesMode=e.coordinatesMode,r.isBlocking=e.isBlocking),r&&(e.boundingBoxPosition&&(r.boundingBoxPosition=go.Vector3.FromArray(e.boundingBoxPosition)),e.boundingBoxSize&&(r.boundingBoxSize=go.Vector3.FromArray(e.boundingBoxSize)),e.rotationY&&(r.rotationY=e.rotationY)),r},m.prototype.serialize=function(){if(!this.name)return null;var e={};return e.name=this.name,e.hasAlpha=this.hasAlpha,e.isCube=!0,e.level=this.level,e.size=this._size,e.coordinatesMode=this.coordinatesMode,e.useInGammaSpace=this.gammaSpace,e.generateHarmonics=this._generateHarmonics,e.customType=\"BABYLON.HDRCubeTexture\",e.noMipmap=this._noMipmap,e.isBlocking=this._isBlocking,e.rotationY=this._rotationY,e},m._facesMapping=[\"right\",\"left\",\"up\",\"down\",\"front\",\"back\"],m})(go.BaseTexture),go.HDRCubeTexture=vo,yo=$a||($a={}),bo=(function(){function e(){}return e.ConvertPanoramaToCubemap=function(e,t,i,r){if(!e)throw\"ConvertPanoramaToCubemap: input cannot be null\";if(e.length!=t*i*3)throw\"ConvertPanoramaToCubemap: input size is wrong\";return{front:this.CreateCubemapTexture(r,this.FACE_FRONT,e,t,i),back:this.CreateCubemapTexture(r,this.FACE_BACK,e,t,i),left:this.CreateCubemapTexture(r,this.FACE_LEFT,e,t,i),right:this.CreateCubemapTexture(r,this.FACE_RIGHT,e,t,i),up:this.CreateCubemapTexture(r,this.FACE_UP,e,t,i),down:this.CreateCubemapTexture(r,this.FACE_DOWN,e,t,i),size:r,type:yo.Engine.TEXTURETYPE_FLOAT,format:yo.Engine.TEXTUREFORMAT_RGB,gammaSpace:!1}},e.CreateCubemapTexture=function(e,t,i,r,n){for(var o=new ArrayBuffer(e*e*4*3),s=new Float32Array(o),a=t[1].subtract(t[0]).scale(1/e),l=t[3].subtract(t[2]).scale(1/e),c=1/e,h=0,u=0;u<e;u++){for(var d=t[0],f=t[2],p=0;p<e;p++){var _=f.subtract(d).scale(h).add(d);_.normalize();var m=this.CalcProjectionSpherical(_,i,r,n);s[u*e*3+3*p+0]=m.r,s[u*e*3+3*p+1]=m.g,s[u*e*3+3*p+2]=m.b,d=d.add(a),f=f.add(l)}h+=c}return s},e.CalcProjectionSpherical=function(e,t,i,r){for(var n=Math.atan2(e.z,e.x),o=Math.acos(e.y);n<-Math.PI;)n+=2*Math.PI;for(;n>Math.PI;)n-=2*Math.PI;var s=n/Math.PI,a=o/Math.PI;s=.5*s+.5;var l=Math.round(s*i);l<0?l=0:i<=l&&(l=i-1);var c=Math.round(a*r);c<0?c=0:r<=c&&(c=r-1);var h=r-c-1;return{r:t[h*i*3+3*l+0],g:t[h*i*3+3*l+1],b:t[h*i*3+3*l+2]}},e.FACE_FRONT=[new yo.Vector3(-1,-1,-1),new yo.Vector3(1,-1,-1),new yo.Vector3(-1,1,-1),new yo.Vector3(1,1,-1)],e.FACE_BACK=[new yo.Vector3(1,-1,1),new yo.Vector3(-1,-1,1),new yo.Vector3(1,1,1),new yo.Vector3(-1,1,1)],e.FACE_RIGHT=[new yo.Vector3(1,-1,-1),new yo.Vector3(1,-1,1),new yo.Vector3(1,1,-1),new yo.Vector3(1,1,1)],e.FACE_LEFT=[new yo.Vector3(-1,-1,1),new yo.Vector3(-1,-1,-1),new yo.Vector3(-1,1,1),new yo.Vector3(-1,1,-1)],e.FACE_DOWN=[new yo.Vector3(-1,1,-1),new yo.Vector3(1,1,-1),new yo.Vector3(-1,1,1),new yo.Vector3(1,1,1)],e.FACE_UP=[new yo.Vector3(-1,-1,1),new yo.Vector3(1,-1,1),new yo.Vector3(-1,-1,-1),new yo.Vector3(1,-1,-1)],e})(),yo.PanoramaToCubeMapTools=bo,(function(g){var n=(function(r){function e(e,t){var i=r.call(this,e.x,e.y)||this;return i.index=t,i}return T(e,r),e})(g.Vector2),o=(function(){function e(){this.elements=new Array}return e.prototype.add=function(e){var i=this,r=new Array;return e.forEach((function(e){if(0===r.length||!e.equalsWithEpsilon(r[0])){var t=new n(e,i.elements.length);r.push(t),i.elements.push(t)}})),r},e.prototype.computeBounds=function(){var t=new g.Vector2(this.elements[0].x,this.elements[0].y),i=new g.Vector2(this.elements[0].x,this.elements[0].y);return this.elements.forEach((function(e){e.x<t.x?t.x=e.x:e.x>i.x&&(i.x=e.x),e.y<t.y?t.y=e.y:e.y>i.y&&(i.y=e.y)})),{min:t,max:i,width:i.x-t.x,height:i.y-t.y}},e})(),e=(function(){function e(){}return e.Rectangle=function(e,t,i,r){return[new g.Vector2(e,t),new g.Vector2(i,t),new g.Vector2(i,r),new g.Vector2(e,r)]},e.Circle=function(e,t,i,r){void 0===t&&(t=0),void 0===i&&(i=0),void 0===r&&(r=32);for(var n=new Array,o=0,s=2*Math.PI/r,a=0;a<r;a++)n.push(new g.Vector2(t+Math.cos(o)*e,i+Math.sin(o)*e)),o-=s;return n},e.Parse=function(e){var t,i=e.split(/[^-+eE\\.\\d]+/).map(parseFloat).filter((function(e){return!isNaN(e)})),r=[];for(t=0;t<(2147483646&i.length);t+=2)r.push(new g.Vector2(i[t],i[t+1]));return r},e.StartingAt=function(e,t){return g.Path2.StartingAt(e,t)},e})();g.Polygon=e;var t=(function(){function e(e,t,i){var r;this._points=new o,this._outlinepoints=new o,this._holes=new Array,this._epoints=new Array,this._eholes=new Array,this._name=e,this._scene=i,r=t instanceof g.Path2?t.getPoints():t,this._addToepoint(r),this._points.add(r),this._outlinepoints.add(r),void 0===m&&g.Tools.Warn(\"Earcut was not found, the polygon will not be built.\")}return e.prototype._addToepoint=function(e){for(var t=0,i=e;t<i.length;t++){var r=i[t];this._epoints.push(r.x,r.y)}},e.prototype.addHole=function(e){this._points.add(e);var t=new o;return t.add(e),this._holes.push(t),this._eholes.push(this._epoints.length/2),this._addToepoint(e),this},e.prototype.build=function(e,t){var i=this;void 0===e&&(e=!1),void 0===t&&(t=0);var r=new g.Mesh(this._name,this._scene),n=new Array,o=new Array,s=new Array,a=this._points.computeBounds();this._points.elements.forEach((function(e){n.push(0,1,0),o.push(e.x,0,e.y),s.push((e.x-a.min.x)/a.width,(e.y-a.min.y)/a.height)}));for(var l=new Array,c=m(this._epoints,this._eholes,2),h=0;h<c.length;h++)l.push(c[h]);if(0<t){var u=o.length/3;this._points.elements.forEach((function(e){n.push(0,-1,0),o.push(e.x,-t,e.y),s.push(1-(e.x-a.min.x)/a.width,1-(e.y-a.min.y)/a.height)}));var d=l.length;for(h=0;h<d;h+=3){var f=l[h+0],p=l[h+1],_=l[h+2];l.push(_+u),l.push(p+u),l.push(f+u)}this.addSide(o,n,s,l,a,this._outlinepoints,t,!1),this._holes.forEach((function(e){i.addSide(o,n,s,l,a,e,t,!0)}))}return r.setVerticesData(g.VertexBuffer.PositionKind,o,e),r.setVerticesData(g.VertexBuffer.NormalKind,n,e),r.setVerticesData(g.VertexBuffer.UVKind,s,e),r.setIndices(l),r},e.prototype.addSide=function(e,t,i,r,n,o,s,a){for(var l=e.length/3,c=0,h=0;h<o.elements.length;h++){var u,d=o.elements[h];u=h+1>o.elements.length-1?o.elements[0]:o.elements[h+1],e.push(d.x,0,d.y),e.push(d.x,-s,d.y),e.push(u.x,0,u.y),e.push(u.x,-s,u.y);var f=new g.Vector3(d.x,0,d.y),p=new g.Vector3(u.x,0,u.y).subtract(f),_=new g.Vector3(0,1,0),m=g.Vector3.Cross(p,_);m=m.normalize(),i.push(c/n.width,0),i.push(c/n.width,1),c+=p.length(),i.push(c/n.width,0),i.push(c/n.width,1),a?(t.push(m.x,m.y,m.z),t.push(m.x,m.y,m.z),t.push(m.x,m.y,m.z),t.push(m.x,m.y,m.z),r.push(l),r.push(l+2),r.push(l+1),r.push(l+1),r.push(l+2),r.push(l+3)):(t.push(-m.x,-m.y,-m.z),t.push(-m.x,-m.y,-m.z),t.push(-m.x,-m.y,-m.z),t.push(-m.x,-m.y,-m.z),r.push(l),r.push(l+1),r.push(l+2),r.push(l+1),r.push(l+3),r.push(l+2)),l+=4}},e})();g.PolygonMeshBuilder=t})($a||($a={})),To=$a||($a={}),Eo=0,xo=(function(){function i(e,t,i){this.pos=e,this.normal=t,this.uv=i}return i.prototype.clone=function(){return new i(this.pos.clone(),this.normal.clone(),this.uv.clone())},i.prototype.flip=function(){this.normal=this.normal.scale(-1)},i.prototype.interpolate=function(e,t){return new i(To.Vector3.Lerp(this.pos,e.pos,t),To.Vector3.Lerp(this.normal,e.normal,t),To.Vector2.Lerp(this.uv,e.uv,t))},i})(),Po=(function(){function y(e,t){this.normal=e,this.w=t}return y.FromPoints=function(e,t,i){var r=i.subtract(e),n=t.subtract(e);if(0===r.lengthSquared()||0===n.lengthSquared())return null;var o=To.Vector3.Normalize(To.Vector3.Cross(r,n));return new y(o,To.Vector3.Dot(o,e))},y.prototype.clone=function(){return new y(this.normal.clone(),this.w)},y.prototype.flip=function(){this.normal.scaleInPlace(-1),this.w=-this.w},y.prototype.splitPolygon=function(e,t,i,r,n){var o,s,a=0,l=[];for(o=0;o<e.vertices.length;o++){var c=(s=To.Vector3.Dot(this.normal,e.vertices[o].pos)-this.w)<-y.EPSILON?2:y.EPSILON<s?1:0;a|=c,l.push(c)}switch(a){case 0:(0<To.Vector3.Dot(this.normal,e.plane.normal)?t:i).push(e);break;case 1:r.push(e);break;case 2:n.push(e);break;case 3:var h,u=[],d=[];for(o=0;o<e.vertices.length;o++){var f=(o+1)%e.vertices.length,p=l[o],_=l[f],m=e.vertices[o],g=e.vertices[f];if(2!==p&&u.push(m),1!==p&&d.push(2!==p?m.clone():m),3==(p|_)){s=(this.w-To.Vector3.Dot(this.normal,m.pos))/To.Vector3.Dot(this.normal,g.pos.subtract(m.pos));var v=m.interpolate(g,s);u.push(v),d.push(v.clone())}}3<=u.length&&(h=new Ao(u,e.shared)).plane&&r.push(h),3<=d.length&&(h=new Ao(d,e.shared)).plane&&n.push(h)}},y.EPSILON=1e-5,y})(),Ao=(function(){function e(e,t){this.vertices=e,this.shared=t,this.plane=Po.FromPoints(e[0].pos,e[1].pos,e[2].pos)}return e.prototype.clone=function(){return new e(this.vertices.map((function(e){return e.clone()})),this.shared)},e.prototype.flip=function(){this.vertices.reverse().map((function(e){e.flip()})),this.plane.flip()},e})(),So=(function(){function n(e){this.plane=null,this.front=null,this.back=null,this.polygons=new Array,e&&this.build(e)}return n.prototype.clone=function(){var e=new n;return e.plane=this.plane&&this.plane.clone(),e.front=this.front&&this.front.clone(),e.back=this.back&&this.back.clone(),e.polygons=this.polygons.map((function(e){return e.clone()})),e},n.prototype.invert=function(){for(var e=0;e<this.polygons.length;e++)this.polygons[e].flip();this.plane&&this.plane.flip(),this.front&&this.front.invert(),this.back&&this.back.invert();var t=this.front;this.front=this.back,this.back=t},n.prototype.clipPolygons=function(e){if(!this.plane)return e.slice();for(var t=new Array,i=new Array,r=0;r<e.length;r++)this.plane.splitPolygon(e[r],t,i,t,i);return this.front&&(t=this.front.clipPolygons(t)),i=this.back?this.back.clipPolygons(i):[],t.concat(i)},n.prototype.clipTo=function(e){this.polygons=e.clipPolygons(this.polygons),this.front&&this.front.clipTo(e),this.back&&this.back.clipTo(e)},n.prototype.allPolygons=function(){var e=this.polygons.slice();return this.front&&(e=e.concat(this.front.allPolygons())),this.back&&(e=e.concat(this.back.allPolygons())),e},n.prototype.build=function(e){if(e.length){this.plane||(this.plane=e[0].plane.clone());for(var t=new Array,i=new Array,r=0;r<e.length;r++)this.plane.splitPolygon(e[r],this.polygons,this.polygons,t,i);t.length&&(this.front||(this.front=new n),this.front.build(t)),i.length&&(this.back||(this.back=new n),this.back.build(i))}},n})(),Mo=(function(){function S(){this.polygons=new Array}return S.FromMesh=function(e){var t,i,r,n,o,s,a,l,c,h,u=new Array,d=null;if(!(e instanceof To.Mesh))throw\"BABYLON.CSG: Wrong Mesh type, must be BABYLON.Mesh\";e.computeWorldMatrix(!0),a=e.getWorldMatrix(),l=e.position.clone(),c=e.rotation.clone(),e.rotationQuaternion&&(d=e.rotationQuaternion.clone()),h=e.scaling.clone();for(var f=e.getIndices(),p=e.getVerticesData(To.VertexBuffer.PositionKind),_=e.getVerticesData(To.VertexBuffer.NormalKind),m=e.getVerticesData(To.VertexBuffer.UVKind),g=e.subMeshes,v=0,y=g.length;v<y;v++)for(var b=g[v].indexStart,T=g[v].indexCount+g[v].indexStart;b<T;b+=3){s=[];for(var E=0;E<3;E++){var x=new To.Vector3(_[3*f[b+E]],_[3*f[b+E]+1],_[3*f[b+E]+2]);r=new To.Vector2(m[2*f[b+E]],m[2*f[b+E]+1]);var P=new To.Vector3(p[3*f[b+E]],p[3*f[b+E]+1],p[3*f[b+E]+2]);n=To.Vector3.TransformCoordinates(P,a),i=To.Vector3.TransformNormal(x,a),t=new xo(n,i,r),s.push(t)}(o=new Ao(s,{subMeshId:v,meshId:Eo,materialIndex:g[v].materialIndex})).plane&&u.push(o)}var A=S.FromPolygons(u);return A.matrix=a,A.position=l,A.rotation=c,A.scaling=h,A.rotationQuaternion=d,Eo++,A},S.FromPolygons=function(e){var t=new S;return t.polygons=e,t},S.prototype.clone=function(){var e=new S;return e.polygons=this.polygons.map((function(e){return e.clone()})),e.copyTransformAttributes(this),e},S.prototype.union=function(e){var t=new So(this.clone().polygons),i=new So(e.clone().polygons);return t.clipTo(i),i.clipTo(t),i.invert(),i.clipTo(t),i.invert(),t.build(i.allPolygons()),S.FromPolygons(t.allPolygons()).copyTransformAttributes(this)},S.prototype.unionInPlace=function(e){var t=new So(this.polygons),i=new So(e.polygons);t.clipTo(i),i.clipTo(t),i.invert(),i.clipTo(t),i.invert(),t.build(i.allPolygons()),this.polygons=t.allPolygons()},S.prototype.subtract=function(e){var t=new So(this.clone().polygons),i=new So(e.clone().polygons);return t.invert(),t.clipTo(i),i.clipTo(t),i.invert(),i.clipTo(t),i.invert(),t.build(i.allPolygons()),t.invert(),S.FromPolygons(t.allPolygons()).copyTransformAttributes(this)},S.prototype.subtractInPlace=function(e){var t=new So(this.polygons),i=new So(e.polygons);t.invert(),t.clipTo(i),i.clipTo(t),i.invert(),i.clipTo(t),i.invert(),t.build(i.allPolygons()),t.invert(),this.polygons=t.allPolygons()},S.prototype.intersect=function(e){var t=new So(this.clone().polygons),i=new So(e.clone().polygons);return t.invert(),i.clipTo(t),i.invert(),t.clipTo(i),i.clipTo(t),t.build(i.allPolygons()),t.invert(),S.FromPolygons(t.allPolygons()).copyTransformAttributes(this)},S.prototype.intersectInPlace=function(e){var t=new So(this.polygons),i=new So(e.polygons);t.invert(),i.clipTo(t),i.invert(),t.clipTo(i),i.clipTo(t),t.build(i.allPolygons()),t.invert(),this.polygons=t.allPolygons()},S.prototype.inverse=function(){var e=this.clone();return e.inverseInPlace(),e},S.prototype.inverseInPlace=function(){this.polygons.map((function(e){e.flip()}))},S.prototype.copyTransformAttributes=function(e){return this.matrix=e.matrix,this.position=e.position,this.rotation=e.rotation,this.scaling=e.scaling,this.rotationQuaternion=e.rotationQuaternion,this},S.prototype.buildMeshGeometry=function(e,t,i){var r=this.matrix.clone();r.invert();var n,o,s,a=new To.Mesh(e,t),l=[],c=[],h=[],u=[],d=To.Vector3.Zero(),f=To.Vector3.Zero(),p=To.Vector2.Zero(),_=this.polygons,m=[0,0,0],g={},v=0,y={};i&&_.sort((function(e,t){return e.shared.meshId===t.shared.meshId?e.shared.subMeshId-t.shared.subMeshId:e.shared.meshId-t.shared.meshId}));for(var b=0,T=_.length;b<T;b++){y[(n=_[b]).shared.meshId]||(y[n.shared.meshId]={}),y[n.shared.meshId][n.shared.subMeshId]||(y[n.shared.meshId][n.shared.subMeshId]={indexStart:1/0,indexEnd:-1/0,materialIndex:n.shared.materialIndex}),s=y[n.shared.meshId][n.shared.subMeshId];for(var E=2,x=n.vertices.length;E<x;E++){m[0]=0,m[1]=E-1,m[2]=E;for(var P=0;P<3;P++){d.copyFrom(n.vertices[m[P]].pos),f.copyFrom(n.vertices[m[P]].normal),p.copyFrom(n.vertices[m[P]].uv);var A=To.Vector3.TransformCoordinates(d,r),S=To.Vector3.TransformNormal(f,r);void 0!==(o=g[A.x+\",\"+A.y+\",\"+A.z])&&h[3*o]===S.x&&h[3*o+1]===S.y&&h[3*o+2]===S.z&&u[2*o]===p.x&&u[2*o+1]===p.y||(l.push(A.x,A.y,A.z),u.push(p.x,p.y),h.push(f.x,f.y,f.z),o=g[A.x+\",\"+A.y+\",\"+A.z]=l.length/3-1),c.push(o),s.indexStart=Math.min(v,s.indexStart),s.indexEnd=Math.max(v,s.indexEnd),v++}}}if(a.setVerticesData(To.VertexBuffer.PositionKind,l),a.setVerticesData(To.VertexBuffer.NormalKind,h),a.setVerticesData(To.VertexBuffer.UVKind,u),a.setIndices(c,null),i){var M,R=0;for(var C in a.subMeshes=new Array,y){for(var O in M=-1,y[C])s=y[C][O],To.SubMesh.CreateFromIndices(s.materialIndex+R,s.indexStart,s.indexEnd-s.indexStart+1,a),M=Math.max(s.materialIndex,M);R+=++M}}return a},S.prototype.toMesh=function(e,t,i,r){var n=this.buildMeshGeometry(e,i,r);return n.material=t,n.position.copyFrom(this.position),n.rotation.copyFrom(this.rotation),this.rotationQuaternion&&(n.rotationQuaternion=this.rotationQuaternion.clone()),n.scaling.copyFrom(this.scaling),n.computeWorldMatrix(!0),n},S})(),To.CSG=Mo,Ro=$a||($a={}),Co=(function(){function o(e,t,i,r,n){this.size=e,this.position=t,this.alphaMode=Ro.Engine.ALPHA_ONEONE,this.color=i||new Ro.Color3(1,1,1),this.texture=r?new Ro.Texture(r,n.getScene(),!0):null,(this._system=n).lensFlares.push(this)}return o.AddFlare=function(e,t,i,r,n){return new o(e,t,i,r,n)},o.prototype.dispose=function(){this.texture&&this.texture.dispose();var e=this._system.lensFlares.indexOf(this);this._system.lensFlares.splice(e,1)},o})(),Ro.LensFlare=Co,(function(l){l.AbstractScene.AddParser(l.SceneComponentConstants.NAME_LENSFLARESYSTEM,(function(e,t,i,r){if(void 0!==e.lensFlareSystems&&null!==e.lensFlareSystems){i.lensFlareSystems||(i.lensFlareSystems=new Array);for(var n=0,o=e.lensFlareSystems.length;n<o;n++){var s=e.lensFlareSystems[n],a=l.LensFlareSystem.Parse(s,t,r);i.lensFlareSystems.push(a)}}})),l.AbstractScene.prototype.getLensFlareSystemByName=function(e){for(var t=0;t<this.lensFlareSystems.length;t++)if(this.lensFlareSystems[t].name===e)return this.lensFlareSystems[t];return null},l.AbstractScene.prototype.getLensFlareSystemByID=function(e){for(var t=0;t<this.lensFlareSystems.length;t++)if(this.lensFlareSystems[t].id===e)return this.lensFlareSystems[t];return null},l.AbstractScene.prototype.removeLensFlareSystem=function(e){var t=this.lensFlareSystems.indexOf(e);return-1!==t&&this.lensFlareSystems.splice(t,1),t},l.AbstractScene.prototype.addLensFlareSystem=function(e){this.lensFlareSystems.push(e)};var e=(function(){function e(e){this.name=l.SceneComponentConstants.NAME_LENSFLARESYSTEM,(this.scene=e).lensFlareSystems=new Array}return e.prototype.register=function(){this.scene._afterCameraDrawStage.registerStep(l.SceneComponentConstants.STEP_AFTERCAMERADRAW_LENSFLARESYSTEM,this,this._draw)},e.prototype.rebuild=function(){},e.prototype.addFromContainer=function(e){var t=this;e.lensFlareSystems&&e.lensFlareSystems.forEach((function(e){t.scene.addLensFlareSystem(e)}))},e.prototype.removeFromContainer=function(e){var t=this;e.lensFlareSystems&&e.lensFlareSystems.forEach((function(e){t.scene.removeLensFlareSystem(e)}))},e.prototype.serialize=function(e){e.lensFlareSystems=[];for(var t=0,i=this.scene.lensFlareSystems;t<i.length;t++){var r=i[t];e.lensFlareSystems.push(r.serialize())}},e.prototype.dispose=function(){for(var e=this.scene.lensFlareSystems;e.length;)e[0].dispose()},e.prototype._draw=function(e){if(this.scene.lensFlaresEnabled){var t=this.scene.lensFlareSystems;l.Tools.StartPerformanceCounter(\"Lens flares\",0<t.length);for(var i=0,r=t;i<r.length;i++){var n=r[i];0!=(e.layerMask&n.layerMask)&&n.render()}l.Tools.EndPerformanceCounter(\"Lens flares\",0<t.length)}},e})();l.LensFlareSystemSceneComponent=e})($a||($a={})),Oo=$a||($a={}),Do=(function(){function l(e,t,i){this.name=e,this.lensFlares=new Array,this.borderLimit=300,this.viewportBorder=0,this.layerMask=268435455,this._vertexBuffers={},this._isEnabled=!0,this._scene=i||Oo.Engine.LastCreatedScene;var r=this._scene._getComponent(Oo.SceneComponentConstants.NAME_LENSFLARESYSTEM);r||(r=new Oo.LensFlareSystemSceneComponent(this._scene),i._addComponent(r)),this._emitter=t,this.id=e,i.lensFlareSystems.push(this),this.meshesSelectionPredicate=function(e){return i.activeCamera&&e.material&&e.isVisible&&e.isEnabled()&&e.isBlocker&&0!=(e.layerMask&i.activeCamera.layerMask)};var n=i.getEngine(),o=[];o.push(1,1),o.push(-1,1),o.push(-1,-1),o.push(1,-1),this._vertexBuffers[Oo.VertexBuffer.PositionKind]=new Oo.VertexBuffer(n,o,Oo.VertexBuffer.PositionKind,!1,!1,2);var s=[];s.push(0),s.push(1),s.push(2),s.push(0),s.push(2),s.push(3),this._indexBuffer=n.createIndexBuffer(s),this._effect=n.createEffect(\"lensFlare\",[Oo.VertexBuffer.PositionKind],[\"color\",\"viewportMatrix\"],[\"textureSampler\"],\"\")}return Object.defineProperty(l.prototype,\"isEnabled\",{get:function(){return this._isEnabled},set:function(e){this._isEnabled=e},enumerable:!0,configurable:!0}),l.prototype.getScene=function(){return this._scene},l.prototype.getEmitter=function(){return this._emitter},l.prototype.setEmitter=function(e){this._emitter=e},l.prototype.getEmitterPosition=function(){return this._emitter.getAbsolutePosition?this._emitter.getAbsolutePosition():this._emitter.position},l.prototype.computeEffectivePosition=function(e){var t=this.getEmitterPosition();return t=Oo.Vector3.Project(t,Oo.Matrix.Identity(),this._scene.getTransformMatrix(),e),this._positionX=t.x,this._positionY=t.y,t=Oo.Vector3.TransformCoordinates(this.getEmitterPosition(),this._scene.getViewMatrix()),0<this.viewportBorder&&(e.x-=this.viewportBorder,e.y-=this.viewportBorder,e.width+=2*this.viewportBorder,e.height+=2*this.viewportBorder,t.x+=this.viewportBorder,t.y+=this.viewportBorder,this._positionX+=this.viewportBorder,this._positionY+=this.viewportBorder),0<t.z&&(this._positionX>e.x&&this._positionX<e.x+e.width&&this._positionY>e.y&&(this._positionY,e.y,e.height),!0)},l.prototype._isVisible=function(){if(!this._isEnabled||!this._scene.activeCamera)return!1;var e=this.getEmitterPosition().subtract(this._scene.activeCamera.globalPosition),t=e.length();e.normalize();var i=new Oo.Ray(this._scene.activeCamera.globalPosition,e),r=this._scene.pickWithRay(i,this.meshesSelectionPredicate,!0);return!r||!r.hit||r.distance>t},l.prototype.render=function(){if(!this._effect.isReady()||!this._scene.activeCamera)return!1;var e,t,i=this._scene.getEngine(),r=this._scene.activeCamera.viewport.toGlobal(i.getRenderWidth(!0),i.getRenderHeight(!0));if(!this.computeEffectivePosition(r))return!1;if(!this._isVisible())return!1;e=this._positionX<this.borderLimit+r.x?this.borderLimit+r.x-this._positionX:this._positionX>r.x+r.width-this.borderLimit?this._positionX-r.x-r.width+this.borderLimit:0;var n=(t=this._positionY<this.borderLimit+r.y?this.borderLimit+r.y-this._positionY:this._positionY>r.y+r.height-this.borderLimit?this._positionY-r.y-r.height+this.borderLimit:0)<e?e:t;(n-=this.viewportBorder)>this.borderLimit&&(n=this.borderLimit);var o=1-Oo.Scalar.Clamp(n/this.borderLimit,0,1);if(o<0)return!1;1<o&&(o=1),0<this.viewportBorder&&(r.x+=this.viewportBorder,r.y+=this.viewportBorder,r.width-=2*this.viewportBorder,r.height-=2*this.viewportBorder,this._positionX-=this.viewportBorder,this._positionY-=this.viewportBorder);var s=r.x+r.width/2,a=r.y+r.height/2,l=s-this._positionX,c=a-this._positionY;i.enableEffect(this._effect),i.setState(!1),i.setDepthBuffer(!1),i.bindBuffers(this._vertexBuffers,this._indexBuffer,this._effect);for(var h=0;h<this.lensFlares.length;h++){var u=this.lensFlares[h];i.setAlphaMode(u.alphaMode);var d=s-l*u.position,f=a-c*u.position,p=u.size,_=u.size*i.getAspectRatio(this._scene.activeCamera,!0),m=d/(r.width+2*r.x)*2-1,g=1-f/(r.height+2*r.y)*2,v=Oo.Matrix.FromValues(p/2,0,0,0,0,_/2,0,0,0,0,1,0,m,g,0,1);this._effect.setMatrix(\"viewportMatrix\",v),this._effect.setTexture(\"textureSampler\",u.texture),this._effect.setFloat4(\"color\",u.color.r*o,u.color.g*o,u.color.b*o,1),i.drawElementsType(Oo.Material.TriangleFillMode,0,6)}return i.setDepthBuffer(!0),i.setAlphaMode(Oo.Engine.ALPHA_DISABLE),!0},l.prototype.dispose=function(){var e=this._vertexBuffers[Oo.VertexBuffer.PositionKind];for(e&&(e.dispose(),this._vertexBuffers[Oo.VertexBuffer.PositionKind]=null),this._indexBuffer&&(this._scene.getEngine()._releaseBuffer(this._indexBuffer),this._indexBuffer=null);this.lensFlares.length;)this.lensFlares[0].dispose();var t=this._scene.lensFlareSystems.indexOf(this);this._scene.lensFlareSystems.splice(t,1)},l.Parse=function(e,t,i){var r=t.getLastEntryByID(e.emitterId),n=e.name||\"lensFlareSystem#\"+e.emitterId,o=new l(n,r,t);o.id=e.id||n,o.borderLimit=e.borderLimit;for(var s=0;s<e.flares.length;s++){var a=e.flares[s];Oo.LensFlare.AddFlare(a.size,a.position,Oo.Color3.FromArray(a.color),a.textureName?i+a.textureName:\"\",o)}return o},l.prototype.serialize=function(){var e={};e.id=this.id,e.name=this.name,e.emitterId=this.getEmitter().id,e.borderLimit=this.borderLimit,e.flares=[];for(var t=0;t<this.lensFlares.length;t++){var i=this.lensFlares[t];e.flares.push({size:i.size,position:i.position,color:i.color.asArray(),textureName:Oo.Tools.GetFilename(i.texture?i.texture.name:\"\")})}return e},l})(),Oo.LensFlareSystem=Do,(function(e){var i=(function(){function e(e,t){this.type=e,(this.jointData=t).nativeParams=t.nativeParams||{}}return Object.defineProperty(e.prototype,\"physicsJoint\",{get:function(){return this._physicsJoint},set:function(e){this._physicsJoint,this._physicsJoint=e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,\"physicsPlugin\",{set:function(e){this._physicsPlugin=e},enumerable:!0,configurable:!0}),e.prototype.executeNativeFunction=function(e){e(this._physicsPlugin.world,this._physicsJoint)},e.DistanceJoint=0,e.HingeJoint=1,e.BallAndSocketJoint=2,e.WheelJoint=3,e.SliderJoint=4,e.PrismaticJoint=5,e.UniversalJoint=6,e.Hinge2Joint=e.WheelJoint,e.PointToPointJoint=8,e.SpringJoint=9,e.LockJoint=10,e})(),t=(function(t){function e(e){return t.call(this,i.DistanceJoint,e)||this}return T(e,t),e.prototype.updateDistance=function(e,t){this._physicsPlugin.updateDistanceJoint(this,e,t)},e})(e.PhysicsJoint=i);e.DistanceJoint=t;var r=(function(i){function e(e,t){return i.call(this,e,t)||this}return T(e,i),e.prototype.setMotor=function(e,t){this._physicsPlugin.setMotor(this,e||0,t)},e.prototype.setLimit=function(e,t){this._physicsPlugin.setLimit(this,e,t)},e})(i),n=(function(t){function e(e){return t.call(this,i.HingeJoint,e)||this}return T(e,t),e.prototype.setMotor=function(e,t){this._physicsPlugin.setMotor(this,e||0,t)},e.prototype.setLimit=function(e,t){this._physicsPlugin.setLimit(this,e,t)},e})(e.MotorEnabledJoint=r);e.HingeJoint=n;var o=(function(t){function e(e){return t.call(this,i.Hinge2Joint,e)||this}return T(e,t),e.prototype.setMotor=function(e,t,i){void 0===i&&(i=0),this._physicsPlugin.setMotor(this,e||0,t,i)},e.prototype.setLimit=function(e,t,i){void 0===i&&(i=0),this._physicsPlugin.setLimit(this,e,t,i)},e})(r);e.Hinge2Joint=o})($a||($a={})),Io=$a||($a={}),wo=(function(){function h(e,t,i,r){void 0===i&&(i={mass:0});var n=this;this.object=e,this.type=t,this._options=i,this._scene=r,this._bodyUpdateRequired=!1,this._onBeforePhysicsStepCallbacks=new Array,this._onAfterPhysicsStepCallbacks=new Array,this._onPhysicsCollideCallbacks=[],this._deltaPosition=Io.Vector3.Zero(),this._isDisposed=!1,this._tmpQuat=new Io.Quaternion,this._tmpQuat2=new Io.Quaternion,this.beforeStep=function(){n._physicsEngine&&(n.object.translate(n._deltaPosition,-1),n._deltaRotationConjugated&&n.object.rotationQuaternion&&n.object.rotationQuaternion.multiplyToRef(n._deltaRotationConjugated,n.object.rotationQuaternion),n.object.computeWorldMatrix(!1),n.object.parent&&n.object.rotationQuaternion?(n.getParentsRotation(),n._tmpQuat.multiplyToRef(n.object.rotationQuaternion,n._tmpQuat)):n._tmpQuat.copyFrom(n.object.rotationQuaternion||new Io.Quaternion),n._options.disableBidirectionalTransformation||n.object.rotationQuaternion&&n._physicsEngine.getPhysicsPlugin().setPhysicsBodyTransformation(n,n.object.getAbsolutePivotPoint(),n._tmpQuat),n._onBeforePhysicsStepCallbacks.forEach((function(e){e(n)})))},this.afterStep=function(){n._physicsEngine&&(n._onAfterPhysicsStepCallbacks.forEach((function(e){e(n)})),n._physicsEngine.getPhysicsPlugin().setTransformationFromPhysicsBody(n),n.object.parent&&n.object.rotationQuaternion&&(n.getParentsRotation(),n._tmpQuat.conjugateInPlace(),n._tmpQuat.multiplyToRef(n.object.rotationQuaternion,n.object.rotationQuaternion)),n.object.setAbsolutePosition(n.object.position),n._deltaRotation&&n.object.rotationQuaternion&&n.object.rotationQuaternion.multiplyToRef(n._deltaRotation,n.object.rotationQuaternion),n.object.translate(n._deltaPosition,1))},this.onCollideEvent=null,this.onCollide=function(e){if((n._onPhysicsCollideCallbacks.length||n.onCollideEvent)&&n._physicsEngine){var t=n._physicsEngine.getImpostorWithPhysicsBody(e.body);t&&(n.onCollideEvent&&n.onCollideEvent(n,t),n._onPhysicsCollideCallbacks.filter((function(e){return-1!==e.otherImpostors.indexOf(t)})).forEach((function(e){e.callback(n,t)})))}},this.object?(!this._scene&&e.getScene&&(this._scene=e.getScene()),this._scene&&(this._physicsEngine=this._scene.getPhysicsEngine(),this._physicsEngine?(this.object.rotationQuaternion||(this.object.rotation?this.object.rotationQuaternion=Io.Quaternion.RotationYawPitchRoll(this.object.rotation.y,this.object.rotation.x,this.object.rotation.z):this.object.rotationQuaternion=new Io.Quaternion),this._options.mass=void 0===i.mass?0:i.mass,this._options.friction=void 0===i.friction?.2:i.friction,this._options.restitution=void 0===i.restitution?.2:i.restitution,this._joints=[],!this.object.parent||this._options.ignoreParent?this._init():this.object.parent.physicsImpostor&&Io.Tools.Warn(\"You must affect impostors to children before affecting impostor to parent.\")):Io.Tools.Error(\"Physics not enabled. Please use scene.enablePhysics(...) before creating impostors.\"))):Io.Tools.Error(\"No object was provided. A physics object is obligatory\")}return Object.defineProperty(h.prototype,\"isDisposed\",{get:function(){return this._isDisposed},enumerable:!0,configurable:!0}),Object.defineProperty(h.prototype,\"mass\",{get:function(){return this._physicsEngine?this._physicsEngine.getPhysicsPlugin().getBodyMass(this):0},set:function(e){this.setMass(e)},enumerable:!0,configurable:!0}),Object.defineProperty(h.prototype,\"friction\",{get:function(){return this._physicsEngine?this._physicsEngine.getPhysicsPlugin().getBodyFriction(this):0},set:function(e){this._physicsEngine&&this._physicsEngine.getPhysicsPlugin().setBodyFriction(this,e)},enumerable:!0,configurable:!0}),Object.defineProperty(h.prototype,\"restitution\",{get:function(){return this._physicsEngine?this._physicsEngine.getPhysicsPlugin().getBodyRestitution(this):0},set:function(e){this._physicsEngine&&this._physicsEngine.getPhysicsPlugin().setBodyRestitution(this,e)},enumerable:!0,configurable:!0}),h.prototype._init=function(){this._physicsEngine&&(this._physicsEngine.removeImpostor(this),this.physicsBody=null,this._parent=this._parent||this._getPhysicsParent(),this._isDisposed||this.parent&&!this._options.ignoreParent||this._physicsEngine.addImpostor(this))},h.prototype._getPhysicsParent=function(){return this.object.parent instanceof Io.AbstractMesh?this.object.parent.physicsImpostor:null},h.prototype.isBodyInitRequired=function(){return this._bodyUpdateRequired||!this._physicsBody&&!this._parent},h.prototype.setScalingUpdated=function(e){this.forceUpdate()},h.prototype.forceUpdate=function(){this._init(),this.parent&&!this._options.ignoreParent&&this.parent.forceUpdate()},Object.defineProperty(h.prototype,\"physicsBody\",{get:function(){return this._parent&&!this._options.ignoreParent?this._parent.physicsBody:this._physicsBody},set:function(e){this._physicsBody&&this._physicsEngine&&this._physicsEngine.getPhysicsPlugin().removePhysicsBody(this),this._physicsBody=e,this.resetUpdateFlags()},enumerable:!0,configurable:!0}),Object.defineProperty(h.prototype,\"parent\",{get:function(){return!this._options.ignoreParent&&this._parent?this._parent:null},set:function(e){this._parent=e},enumerable:!0,configurable:!0}),h.prototype.resetUpdateFlags=function(){this._bodyUpdateRequired=!1},h.prototype.getObjectExtendSize=function(){if(this.object.getBoundingInfo){var e=this.object.rotationQuaternion;this.object.rotationQuaternion=h.IDENTITY_QUATERNION,this.object.computeWorldMatrix&&this.object.computeWorldMatrix(!0);var t=this.object.getBoundingInfo().boundingBox.extendSizeWorld.scale(2);return this.object.rotationQuaternion=e,this.object.computeWorldMatrix&&this.object.computeWorldMatrix(!0),t}return h.DEFAULT_OBJECT_SIZE},h.prototype.getObjectCenter=function(){return this.object.getBoundingInfo?this.object.getBoundingInfo().boundingBox.centerWorld:this.object.position},h.prototype.getParam=function(e){return this._options[e]},h.prototype.setParam=function(e,t){this._options[e]=t,this._bodyUpdateRequired=!0},h.prototype.setMass=function(e){this.getParam(\"mass\")!==e&&this.setParam(\"mass\",e),this._physicsEngine&&this._physicsEngine.getPhysicsPlugin().setBodyMass(this,e)},h.prototype.getLinearVelocity=function(){return this._physicsEngine?this._physicsEngine.getPhysicsPlugin().getLinearVelocity(this):Io.Vector3.Zero()},h.prototype.setLinearVelocity=function(e){this._physicsEngine&&this._physicsEngine.getPhysicsPlugin().setLinearVelocity(this,e)},h.prototype.getAngularVelocity=function(){return this._physicsEngine?this._physicsEngine.getPhysicsPlugin().getAngularVelocity(this):Io.Vector3.Zero()},h.prototype.setAngularVelocity=function(e){this._physicsEngine&&this._physicsEngine.getPhysicsPlugin().setAngularVelocity(this,e)},h.prototype.executeNativeFunction=function(e){this._physicsEngine&&e(this._physicsEngine.getPhysicsPlugin().world,this.physicsBody)},h.prototype.registerBeforePhysicsStep=function(e){this._onBeforePhysicsStepCallbacks.push(e)},h.prototype.unregisterBeforePhysicsStep=function(e){var t=this._onBeforePhysicsStepCallbacks.indexOf(e);-1<t?this._onBeforePhysicsStepCallbacks.splice(t,1):Io.Tools.Warn(\"Function to remove was not found\")},h.prototype.registerAfterPhysicsStep=function(e){this._onAfterPhysicsStepCallbacks.push(e)},h.prototype.unregisterAfterPhysicsStep=function(e){var t=this._onAfterPhysicsStepCallbacks.indexOf(e);-1<t?this._onAfterPhysicsStepCallbacks.splice(t,1):Io.Tools.Warn(\"Function to remove was not found\")},h.prototype.registerOnPhysicsCollide=function(e,t){var i=e instanceof Array?e:[e];this._onPhysicsCollideCallbacks.push({callback:t,otherImpostors:i})},h.prototype.unregisterOnPhysicsCollide=function(e,r){var n=e instanceof Array?e:[e],o=-1;this._onPhysicsCollideCallbacks.some((function(e,t){if(e.callback===r&&e.otherImpostors.length===n.length){var i=e.otherImpostors.every((function(e){return-1<n.indexOf(e)}));return i&&(o=t),i}return!1}))?this._onPhysicsCollideCallbacks.splice(o,1):Io.Tools.Warn(\"Function to remove was not found\")},h.prototype.getParentsRotation=function(){var e=this.object.parent;for(this._tmpQuat.copyFromFloats(0,0,0,1);e;)e.rotationQuaternion?this._tmpQuat2.copyFrom(e.rotationQuaternion):Io.Quaternion.RotationYawPitchRollToRef(e.rotation.y,e.rotation.x,e.rotation.z,this._tmpQuat2),this._tmpQuat.multiplyToRef(this._tmpQuat2,this._tmpQuat),e=e.parent;return this._tmpQuat},h.prototype.applyForce=function(e,t){return this._physicsEngine&&this._physicsEngine.getPhysicsPlugin().applyForce(this,e,t),this},h.prototype.applyImpulse=function(e,t){return this._physicsEngine&&this._physicsEngine.getPhysicsPlugin().applyImpulse(this,e,t),this},h.prototype.createJoint=function(e,t,i){var r=new Io.PhysicsJoint(t,i);return this.addJoint(e,r),this},h.prototype.addJoint=function(e,t){return this._joints.push({otherImpostor:e,joint:t}),this._physicsEngine&&this._physicsEngine.addJoint(this,e,t),this},h.prototype.sleep=function(){return this._physicsEngine&&this._physicsEngine.getPhysicsPlugin().sleepBody(this),this},h.prototype.wakeUp=function(){return this._physicsEngine&&this._physicsEngine.getPhysicsPlugin().wakeUpBody(this),this},h.prototype.clone=function(e){return e?new h(e,this.type,this._options,this._scene):null},h.prototype.dispose=function(){var t=this;this._physicsEngine&&(this._joints.forEach((function(e){t._physicsEngine&&t._physicsEngine.removeJoint(t,e.otherImpostor,e.joint)})),this._physicsEngine.removeImpostor(this),this.parent&&this.parent.forceUpdate(),this._isDisposed=!0)},h.prototype.setDeltaPosition=function(e){this._deltaPosition.copyFrom(e)},h.prototype.setDeltaRotation=function(e){this._deltaRotation||(this._deltaRotation=new Io.Quaternion),this._deltaRotation.copyFrom(e),this._deltaRotationConjugated=this._deltaRotation.conjugate()},h.prototype.getBoxSizeToRef=function(e){return this._physicsEngine&&this._physicsEngine.getPhysicsPlugin().getBoxSizeToRef(this,e),this},h.prototype.getRadius=function(){return this._physicsEngine?this._physicsEngine.getPhysicsPlugin().getRadius(this):0},h.prototype.syncBoneWithImpostor=function(e,t,i,r,n){var o=h._tmpVecs[0],s=this.object;if(s.rotationQuaternion)if(n){var a=h._tmpQuat;s.rotationQuaternion.multiplyToRef(n,a),e.setRotationQuaternion(a,Io.Space.WORLD,t)}else e.setRotationQuaternion(s.rotationQuaternion,Io.Space.WORLD,t);o.x=0,o.y=0,o.z=0,i&&(o.x=i.x,o.y=i.y,o.z=i.z,e.getDirectionToRef(o,t,o),null==r&&(r=i.length()),o.x*=r,o.y*=r,o.z*=r),e.getParent()?(o.addInPlace(s.getAbsolutePosition()),e.setAbsolutePosition(o,t)):(t.setAbsolutePosition(s.getAbsolutePosition()),t.position.x-=o.x,t.position.y-=o.y,t.position.z-=o.z)},h.prototype.syncImpostorWithBone=function(e,t,i,r,n,o){var s=this.object;if(s.rotationQuaternion)if(n){var a=h._tmpQuat;e.getRotationQuaternionToRef(Io.Space.WORLD,t,a),a.multiplyToRef(n,s.rotationQuaternion)}else e.getRotationQuaternionToRef(Io.Space.WORLD,t,s.rotationQuaternion);var l=h._tmpVecs[0],c=h._tmpVecs[1];o||((o=h._tmpVecs[2]).x=0,o.y=1,o.z=0),e.getDirectionToRef(o,t,c),e.getAbsolutePositionToRef(t,l),null==r&&i&&(r=i.length()),null!=r&&(l.x+=c.x*r,l.y+=c.y*r,l.z+=c.z*r),s.setAbsolutePosition(l)},h.DEFAULT_OBJECT_SIZE=new Io.Vector3(1,1,1),h.IDENTITY_QUATERNION=Io.Quaternion.Identity(),h._tmpVecs=[Io.Vector3.Zero(),Io.Vector3.Zero(),Io.Vector3.Zero()],h._tmpQuat=Io.Quaternion.Identity(),h.NoImpostor=0,h.SphereImpostor=1,h.BoxImpostor=2,h.PlaneImpostor=3,h.MeshImpostor=4,h.CylinderImpostor=7,h.ParticleImpostor=8,h.HeightmapImpostor=9,h})(),Io.PhysicsImpostor=wo,Lo=$a||($a={}),Fo=(function(){function e(e,t){if(void 0===t&&(t=new Lo.CannonJSPlugin),this._physicsPlugin=t,this._impostors=[],this._joints=[],!this._physicsPlugin.isSupported())throw new Error(\"Physics Engine \"+this._physicsPlugin.name+\" cannot be found. Please make sure it is included.\");e=e||new Lo.Vector3(0,-9.807,0),this.setGravity(e),this.setTimeStep()}return e.prototype.setGravity=function(e){this.gravity=e,this._physicsPlugin.setGravity(this.gravity)},e.prototype.setTimeStep=function(e){void 0===e&&(e=1/60),this._physicsPlugin.setTimeStep(e)},e.prototype.getTimeStep=function(){return this._physicsPlugin.getTimeStep()},e.prototype.dispose=function(){this._impostors.forEach((function(e){e.dispose()})),this._physicsPlugin.dispose()},e.prototype.getPhysicsPluginName=function(){return this._physicsPlugin.name},e.prototype.addImpostor=function(e){e.uniqueId=this._impostors.push(e),e.parent||this._physicsPlugin.generatePhysicsBody(e)},e.prototype.removeImpostor=function(e){var t=this._impostors.indexOf(e);if(-1<t){var i=this._impostors.splice(t,1);i.length&&(i[0].physicsBody=null)}},e.prototype.addJoint=function(e,t,i){var r={mainImpostor:e,connectedImpostor:t,joint:i};i.physicsPlugin=this._physicsPlugin,this._joints.push(r),this._physicsPlugin.generateJoint(r)},e.prototype.removeJoint=function(t,i,r){var e=this._joints.filter((function(e){return e.connectedImpostor===i&&e.joint===r&&e.mainImpostor===t}));e.length&&this._physicsPlugin.removeJoint(e[0])},e.prototype._step=function(e){var t=this;this._impostors.forEach((function(e){e.isBodyInitRequired()&&t._physicsPlugin.generatePhysicsBody(e)})),.1<e?e=.1:e<=0&&(e=1/60),this._physicsPlugin.executeStep(e,this._impostors)},e.prototype.getPhysicsPlugin=function(){return this._physicsPlugin},e.prototype.getImpostors=function(){return this._impostors},e.prototype.getImpostorForPhysicsObject=function(e){for(var t=0;t<this._impostors.length;++t)if(this._impostors[t].object===e)return this._impostors[t];return null},e.prototype.getImpostorWithPhysicsBody=function(e){for(var t=0;t<this._impostors.length;++t)if(this._impostors[t].physicsBody===e)return this._impostors[t];return null},e.Epsilon=.001,e})(),Lo.PhysicsEngine=Fo,(function(f){var e=(function(){function e(e){this._scene=e,this._physicsEngine=this._scene.getPhysicsEngine(),this._physicsEngine||f.Tools.Warn(\"Physics engine not enabled. Please enable the physics before you can use the methods.\")}return e.prototype.applyRadialExplosionImpulse=function(i,r,n,o){if(void 0===o&&(o=h.Constant),!this._physicsEngine)return f.Tools.Warn(\"Physics engine not enabled. Please enable the physics before you call this method.\"),null;var e=this._physicsEngine.getImpostors();if(0===e.length)return null;var s=new t(this._scene);return e.forEach((function(e){var t=s.getImpostorForceAndContactPoint(e,i,r,n,o);t&&e.applyImpulse(t.force,t.contactPoint)})),s.dispose(!1),s},e.prototype.applyRadialExplosionForce=function(i,r,n,o){if(void 0===o&&(o=h.Constant),!this._physicsEngine)return f.Tools.Warn(\"Physics engine not enabled. Please enable the physics before you call the PhysicsHelper.\"),null;var e=this._physicsEngine.getImpostors();if(0===e.length)return null;var s=new t(this._scene);return e.forEach((function(e){var t=s.getImpostorForceAndContactPoint(e,i,r,n,o);t&&e.applyForce(t.force,t.contactPoint)})),s.dispose(!1),s},e.prototype.gravitationalField=function(e,t,i,r){if(void 0===r&&(r=h.Constant),!this._physicsEngine)return f.Tools.Warn(\"Physics engine not enabled. Please enable the physics before you call the PhysicsHelper.\"),null;if(0===this._physicsEngine.getImpostors().length)return null;var n=new o(this,this._scene,e,t,i,r);return n.dispose(!1),n},e.prototype.updraft=function(e,t,i,r,n){if(void 0===n&&(n=a.Center),!this._physicsEngine)return f.Tools.Warn(\"Physics engine not enabled. Please enable the physics before you call the PhysicsHelper.\"),null;if(0===this._physicsEngine.getImpostors().length)return null;var o=new s(this._scene,e,t,i,r,n);return o.dispose(!1),o},e.prototype.vortex=function(e,t,i,r){if(!this._physicsEngine)return f.Tools.Warn(\"Physics engine not enabled. Please enable the physics before you call the PhysicsHelper.\"),null;if(0===this._physicsEngine.getImpostors().length)return null;var n=new l(this._scene,e,t,i,r);return n.dispose(!1),n},e})();f.PhysicsHelper=e;var t=(function(){function e(e){this._sphereOptions={segments:32,diameter:1},this._rays=[],this._dataFetched=!1,this._scene=e}return e.prototype.getData=function(){return this._dataFetched=!0,{sphere:this._sphere,rays:this._rays}},e.prototype.getImpostorForceAndContactPoint=function(e,t,i,r,n){if(0===e.mass)return null;if(!this._intersectsWithSphere(e,t,i))return null;if(\"Mesh\"!==e.object.getClassName()&&\"InstancedMesh\"!==e.object.getClassName())return null;var o=e.getObjectCenter().subtract(t),s=new f.Ray(t,o,i);this._rays.push(s);var a=s.intersectsMesh(e.object).pickedPoint;if(!a)return null;var l=f.Vector3.Distance(t,a);if(i<l)return null;var c=n===h.Constant?r:r*(1-l/i);return{force:o.multiplyByFloats(c,c,c),contactPoint:a}},e.prototype.dispose=function(e){var t=this;void 0===e&&(e=!0),e?this._sphere.dispose():setTimeout((function(){t._dataFetched||t._sphere.dispose()}),0)},e.prototype._prepareSphere=function(){this._sphere||(this._sphere=f.MeshBuilder.CreateSphere(\"radialExplosionEventSphere\",this._sphereOptions,this._scene),this._sphere.isVisible=!1)},e.prototype._intersectsWithSphere=function(e,t,i){var r=e.object;return this._prepareSphere(),this._sphere.position=t,this._sphere.scaling=new f.Vector3(2*i,2*i,2*i),this._sphere._updateBoundingInfo(),this._sphere.computeWorldMatrix(!0),this._sphere.intersectsMesh(r,!0)},e})();f.PhysicsRadialExplosionEvent=t;var o=(function(){function e(e,t,i,r,n,o){void 0===o&&(o=h.Constant),this._dataFetched=!1,this._physicsHelper=e,this._scene=t,this._origin=i,this._radius=r,this._strength=n,this._falloff=o,this._tickCallback=this._tick.bind(this)}return e.prototype.getData=function(){return this._dataFetched=!0,{sphere:this._sphere}},e.prototype.enable=function(){this._tickCallback.call(this),this._scene.registerBeforeRender(this._tickCallback)},e.prototype.disable=function(){this._scene.unregisterBeforeRender(this._tickCallback)},e.prototype.dispose=function(e){var t=this;void 0===e&&(e=!0),e?this._sphere.dispose():setTimeout((function(){t._dataFetched||t._sphere.dispose()}),0)},e.prototype._tick=function(){if(this._sphere)this._physicsHelper.applyRadialExplosionForce(this._origin,this._radius,-1*this._strength,this._falloff);else{var e=this._physicsHelper.applyRadialExplosionForce(this._origin,this._radius,-1*this._strength,this._falloff);e&&(this._sphere=e.getData().sphere.clone(\"radialExplosionEventSphereClone\"))}},e})();f.PhysicsGravitationalFieldEvent=o;var s=(function(){function e(e,t,i,r,n,o){this._scene=e,this._origin=t,this._radius=i,this._strength=r,this._height=n,this._updraftMode=o,this._originTop=f.Vector3.Zero(),this._originDirection=f.Vector3.Zero(),this._cylinderPosition=f.Vector3.Zero(),this._dataFetched=!1,this._physicsEngine=this._scene.getPhysicsEngine(),this._origin.addToRef(new f.Vector3(0,this._height/2,0),this._cylinderPosition),this._origin.addToRef(new f.Vector3(0,this._height,0),this._originTop),this._updraftMode===a.Perpendicular&&(this._originDirection=this._origin.subtract(this._originTop).normalize()),this._tickCallback=this._tick.bind(this)}return e.prototype.getData=function(){return this._dataFetched=!0,{cylinder:this._cylinder}},e.prototype.enable=function(){this._tickCallback.call(this),this._scene.registerBeforeRender(this._tickCallback)},e.prototype.disable=function(){this._scene.unregisterBeforeRender(this._tickCallback)},e.prototype.dispose=function(e){var t=this;void 0===e&&(e=!0),e?this._cylinder.dispose():setTimeout((function(){t._dataFetched||t._cylinder.dispose()}),0)},e.prototype.getImpostorForceAndContactPoint=function(e){if(0===e.mass)return null;if(!this._intersectsWithCylinder(e))return null;var t=e.getObjectCenter();if(this._updraftMode===a.Perpendicular)var i=this._originDirection;else i=t.subtract(this._originTop);var r=-1*this._strength;return{force:i.multiplyByFloats(r,r,r),contactPoint:t}},e.prototype._tick=function(){var i=this;this._physicsEngine.getImpostors().forEach((function(e){var t=i.getImpostorForceAndContactPoint(e);t&&e.applyForce(t.force,t.contactPoint)}))},e.prototype._prepareCylinder=function(){this._cylinder||(this._cylinder=f.MeshBuilder.CreateCylinder(\"updraftEventCylinder\",{height:this._height,diameter:2*this._radius},this._scene),this._cylinder.isVisible=!1)},e.prototype._intersectsWithCylinder=function(e){var t=e.object;return this._prepareCylinder(),this._cylinder.position=this._cylinderPosition,this._cylinder.intersectsMesh(t,!0)},e})();f.PhysicsUpdraftEvent=s;var h,i,a,r,l=(function(){function e(e,t,i,r,n){this._scene=e,this._origin=t,this._radius=i,this._strength=r,this._height=n,this._originTop=f.Vector3.Zero(),this._centripetalForceThreshold=.7,this._updraftMultiplier=.02,this._cylinderPosition=f.Vector3.Zero(),this._dataFetched=!1,this._physicsEngine=this._scene.getPhysicsEngine(),this._origin.addToRef(new f.Vector3(0,this._height/2,0),this._cylinderPosition),this._origin.addToRef(new f.Vector3(0,this._height,0),this._originTop),this._tickCallback=this._tick.bind(this)}return e.prototype.getData=function(){return this._dataFetched=!0,{cylinder:this._cylinder}},e.prototype.enable=function(){this._tickCallback.call(this),this._scene.registerBeforeRender(this._tickCallback)},e.prototype.disable=function(){this._scene.unregisterBeforeRender(this._tickCallback)},e.prototype.dispose=function(e){var t=this;void 0===e&&(e=!0),e?this._cylinder.dispose():setTimeout((function(){t._dataFetched||t._cylinder.dispose()}),0)},e.prototype.getImpostorForceAndContactPoint=function(e){if(0===e.mass)return null;if(!this._intersectsWithCylinder(e))return null;if(\"Mesh\"!==e.object.getClassName()&&\"InstancedMesh\"!==e.object.getClassName())return null;var t=e.getObjectCenter(),i=new f.Vector3(this._origin.x,t.y,this._origin.z),r=t.subtract(i),n=new f.Ray(i,r,this._radius).intersectsMesh(e.object),o=n.pickedPoint;if(!o)return null;var s=n.distance/this._radius,a=f.Vector3.Cross(i,t).normalize(),l=o.normalize();if(s>this._centripetalForceThreshold&&(l=l.negate()),s>this._centripetalForceThreshold)var c=l.x*this._strength/8,h=l.y*this._updraftMultiplier,u=l.z*this._strength/8;else c=(a.x+l.x)/2,h=this._originTop.y*this._updraftMultiplier,u=(a.z+l.z)/2;var d=new f.Vector3(c,h,u);return{force:d=d.multiplyByFloats(this._strength,this._strength,this._strength),contactPoint:t}},e.prototype._tick=function(){var i=this;this._physicsEngine.getImpostors().forEach((function(e){var t=i.getImpostorForceAndContactPoint(e);t&&e.applyForce(t.force,t.contactPoint)}))},e.prototype._prepareCylinder=function(){this._cylinder||(this._cylinder=f.MeshBuilder.CreateCylinder(\"vortexEventCylinder\",{height:this._height,diameter:2*this._radius},this._scene),this._cylinder.isVisible=!1)},e.prototype._intersectsWithCylinder=function(e){var t=e.object;return this._prepareCylinder(),this._cylinder.position=this._cylinderPosition,this._cylinder.intersectsMesh(t,!0)},e})();f.PhysicsVortexEvent=l,(i=h=f.PhysicsRadialImpulseFalloff||(f.PhysicsRadialImpulseFalloff={}))[i.Constant=0]=\"Constant\",i[i.Linear=1]=\"Linear\",(r=a=f.PhysicsUpdraftMode||(f.PhysicsUpdraftMode={}))[r.Center=0]=\"Center\",r[r.Perpendicular=1]=\"Perpendicular\"})($a||($a={})),Bo=$a||($a={}),No=(function(){function e(e,t){void 0===e&&(e=!0),void 0===t&&(t=10),this._useDeltaForWorldStep=e,this.name=\"CannonJSPlugin\",this._physicsMaterials=new Array,this._fixedTimeStep=1/60,this.BJSCANNON=i,this._minus90X=new Bo.Quaternion(-.7071067811865475,0,0,.7071067811865475),this._plus90X=new Bo.Quaternion(.7071067811865475,0,0,.7071067811865475),this._tmpPosition=Bo.Vector3.Zero(),this._tmpDeltaPosition=Bo.Vector3.Zero(),this._tmpUnityRotation=new Bo.Quaternion,this.isSupported()?(this._extendNamespace(),this.world=new this.BJSCANNON.World,this.world.broadphase=new this.BJSCANNON.NaiveBroadphase,this.world.solver.iterations=t):Bo.Tools.Error(\"CannonJS is not available. Please make sure you included the js file.\")}return e.prototype.setGravity=function(e){this.world.gravity.copy(e)},e.prototype.setTimeStep=function(e){this._fixedTimeStep=e},e.prototype.getTimeStep=function(){return this._fixedTimeStep},e.prototype.executeStep=function(e,t){this.world.step(this._fixedTimeStep,this._useDeltaForWorldStep?e:0,3)},e.prototype.applyImpulse=function(e,t,i){var r=new this.BJSCANNON.Vec3(i.x,i.y,i.z),n=new this.BJSCANNON.Vec3(t.x,t.y,t.z);e.physicsBody.applyImpulse(n,r)},e.prototype.applyForce=function(e,t,i){var r=new this.BJSCANNON.Vec3(i.x,i.y,i.z),n=new this.BJSCANNON.Vec3(t.x,t.y,t.z);e.physicsBody.applyForce(n,r)},e.prototype.generatePhysicsBody=function(t){if(t.parent)t.physicsBody&&(this.removePhysicsBody(t),t.forceUpdate());else{if(t.isBodyInitRequired()){var e=this._createShape(t),i=t.physicsBody;i&&this.removePhysicsBody(t);var r=this._addMaterial(\"mat-\"+t.uniqueId,t.getParam(\"friction\"),t.getParam(\"restitution\")),n={mass:t.getParam(\"mass\"),material:r},o=t.getParam(\"nativeOptions\");for(var s in o)o.hasOwnProperty(s)&&(n[s]=o[s]);t.physicsBody=new this.BJSCANNON.Body(n),t.physicsBody.addEventListener(\"collide\",t.onCollide),this.world.addEventListener(\"preStep\",t.beforeStep),this.world.addEventListener(\"postStep\",t.afterStep),t.physicsBody.addShape(e),this.world.add(t.physicsBody),i&&[\"force\",\"torque\",\"velocity\",\"angularVelocity\"].forEach((function(e){t.physicsBody[e].copy(i[e])})),this._processChildMeshes(t)}this._updatePhysicsBodyTransformation(t)}},e.prototype._processChildMeshes=function(o){var s=this,e=o.object.getChildMeshes?o.object.getChildMeshes(!0):[],a=o.object.rotationQuaternion;if(e.length){var l=function(e,t){if(a&&t.rotationQuaternion){var i=t.getPhysicsImpostor();if(i)if(i.parent!==o){var r=t.getAbsolutePosition().subtract(o.object.getAbsolutePosition()),n=t.rotationQuaternion.multiply(Bo.Quaternion.Inverse(a));i.physicsBody&&(s.removePhysicsBody(i),i.physicsBody=null),i.parent=o,i.resetUpdateFlags(),o.physicsBody.addShape(s._createShape(i),new s.BJSCANNON.Vec3(r.x,r.y,r.z),new s.BJSCANNON.Quaternion(n.x,n.y,n.z,n.w)),o.physicsBody.mass+=i.getParam(\"mass\")}a.multiplyInPlace(t.rotationQuaternion),t.getChildMeshes(!0).filter((function(e){return!!e.physicsImpostor})).forEach(l.bind(s,t.getAbsolutePosition()))}};e.filter((function(e){return!!e.physicsImpostor})).forEach(l.bind(this,o.object.getAbsolutePosition()))}},e.prototype.removePhysicsBody=function(e){e.physicsBody.removeEventListener(\"collide\",e.onCollide),this.world.removeEventListener(\"preStep\",e.beforeStep),this.world.removeEventListener(\"postStep\",e.afterStep),this.world.remove(e.physicsBody)},e.prototype.generateJoint=function(e){var t=e.mainImpostor.physicsBody,i=e.connectedImpostor.physicsBody;if(t&&i){var r,n=e.joint.jointData,o={pivotA:n.mainPivot?(new this.BJSCANNON.Vec3).copy(n.mainPivot):null,pivotB:n.connectedPivot?(new this.BJSCANNON.Vec3).copy(n.connectedPivot):null,axisA:n.mainAxis?(new this.BJSCANNON.Vec3).copy(n.mainAxis):null,axisB:n.connectedAxis?(new this.BJSCANNON.Vec3).copy(n.connectedAxis):null,maxForce:n.nativeParams.maxForce,collideConnected:!!n.collision};switch(e.joint.type){case Bo.PhysicsJoint.HingeJoint:case Bo.PhysicsJoint.Hinge2Joint:r=new this.BJSCANNON.HingeConstraint(t,i,o);break;case Bo.PhysicsJoint.DistanceJoint:r=new this.BJSCANNON.DistanceConstraint(t,i,n.maxDistance||2);break;case Bo.PhysicsJoint.SpringJoint:var s=n;r=new this.BJSCANNON.Spring(t,i,{restLength:s.length,stiffness:s.stiffness,damping:s.damping,localAnchorA:o.pivotA,localAnchorB:o.pivotB});break;case Bo.PhysicsJoint.LockJoint:r=new this.BJSCANNON.LockConstraint(t,i,o);break;case Bo.PhysicsJoint.PointToPointJoint:case Bo.PhysicsJoint.BallAndSocketJoint:default:r=new this.BJSCANNON.PointToPointConstraint(t,o.pivotA,i,o.pivotA,o.maxForce)}r.collideConnected=!!n.collision,e.joint.physicsJoint=r,e.joint.type!==Bo.PhysicsJoint.SpringJoint?this.world.addConstraint(r):(e.joint.jointData.forceApplicationCallback=e.joint.jointData.forceApplicationCallback||function(){r.applyForce()},e.mainImpostor.registerAfterPhysicsStep(e.joint.jointData.forceApplicationCallback))}},e.prototype.removeJoint=function(e){e.joint.type!==Bo.PhysicsJoint.SpringJoint?this.world.removeConstraint(e.joint.physicsJoint):e.mainImpostor.unregisterAfterPhysicsStep(e.joint.jointData.forceApplicationCallback)},e.prototype._addMaterial=function(e,t,i){var r,n;for(r=0;r<this._physicsMaterials.length;r++)if((n=this._physicsMaterials[r]).friction===t&&n.restitution===i)return n;var o=new this.BJSCANNON.Material(e);return o.friction=t,o.restitution=i,this._physicsMaterials.push(o),o},e.prototype._checkWithEpsilon=function(e){return e<Bo.PhysicsEngine.Epsilon?Bo.PhysicsEngine.Epsilon:e},e.prototype._createShape=function(e){var t,i=e.object,r=e.getObjectExtendSize();switch(e.type){case Bo.PhysicsImpostor.SphereImpostor:var n=r.x,o=r.y,s=r.z;t=new this.BJSCANNON.Sphere(Math.max(this._checkWithEpsilon(n),this._checkWithEpsilon(o),this._checkWithEpsilon(s))/2);break;case Bo.PhysicsImpostor.CylinderImpostor:t=new this.BJSCANNON.Cylinder(this._checkWithEpsilon(r.x)/2,this._checkWithEpsilon(r.x)/2,this._checkWithEpsilon(r.y),16);break;case Bo.PhysicsImpostor.BoxImpostor:var a=r.scale(.5);t=new this.BJSCANNON.Box(new this.BJSCANNON.Vec3(this._checkWithEpsilon(a.x),this._checkWithEpsilon(a.y),this._checkWithEpsilon(a.z)));break;case Bo.PhysicsImpostor.PlaneImpostor:Bo.Tools.Warn(\"Attention, PlaneImposter might not behave as you expect. Consider using BoxImposter instead\"),t=new this.BJSCANNON.Plane;break;case Bo.PhysicsImpostor.MeshImpostor:var l=i.getVerticesData?i.getVerticesData(Bo.VertexBuffer.PositionKind):[],c=i.getIndices?i.getIndices():[];if(!l)return;var h=i.position.clone(),u=i.rotation&&i.rotation.clone(),d=i.rotationQuaternion&&i.rotationQuaternion.clone();i.position.copyFromFloats(0,0,0),i.rotation&&i.rotation.copyFromFloats(0,0,0),i.rotationQuaternion&&i.rotationQuaternion.copyFrom(e.getParentsRotation()),i.rotationQuaternion&&i.parent&&i.rotationQuaternion.conjugateInPlace();var f,p=i.computeWorldMatrix(!0),_=new Array;for(f=0;f<l.length;f+=3)Bo.Vector3.TransformCoordinates(Bo.Vector3.FromArray(l,f),p).toArray(_,f);Bo.Tools.Warn(\"MeshImpostor only collides against spheres.\"),t=new this.BJSCANNON.Trimesh(_,c),i.position.copyFrom(h),u&&i.rotation&&i.rotation.copyFrom(u),d&&i.rotationQuaternion&&i.rotationQuaternion.copyFrom(d);break;case Bo.PhysicsImpostor.HeightmapImpostor:var m=i.position.clone(),g=i.rotation&&i.rotation.clone(),v=i.rotationQuaternion&&i.rotationQuaternion.clone();i.position.copyFromFloats(0,0,0),i.rotation&&i.rotation.copyFromFloats(0,0,0),i.rotationQuaternion&&i.rotationQuaternion.copyFrom(e.getParentsRotation()),i.rotationQuaternion&&i.parent&&i.rotationQuaternion.conjugateInPlace(),i.rotationQuaternion&&i.rotationQuaternion.multiplyInPlace(this._minus90X),t=this._createHeightmap(i),i.position.copyFrom(m),g&&i.rotation&&i.rotation.copyFrom(g),v&&i.rotationQuaternion&&i.rotationQuaternion.copyFrom(v),i.computeWorldMatrix(!0);break;case Bo.PhysicsImpostor.ParticleImpostor:t=new this.BJSCANNON.Particle}return t},e.prototype._createHeightmap=function(e,t){var i,r=e.getVerticesData(Bo.VertexBuffer.PositionKind),n=e.computeWorldMatrix(!0),o=new Array;for(i=0;i<r.length;i+=3)Bo.Vector3.TransformCoordinates(Bo.Vector3.FromArray(r,i),n).toArray(o,i);r=o;for(var s=new Array,a=t||~~(Math.sqrt(r.length/3)-1),l=e.getBoundingInfo(),c=Math.min(l.boundingBox.extendSizeWorld.x,l.boundingBox.extendSizeWorld.y),h=l.boundingBox.extendSizeWorld.z,u=2*c/a,d=0;d<r.length;d+=3){var f=Math.round(r[d+0]/u+a/2),p=Math.round(-1*(r[d+1]/u-a/2)),_=-r[d+2]+h;s[f]||(s[f]=[]),s[f][p]||(s[f][p]=_),s[f][p]=Math.max(_,s[f][p])}for(f=0;f<=a;++f){if(!s[f]){for(var m=1;!s[(f+m)%a];)m++;s[f]=s[(f+m)%a].slice()}for(p=0;p<=a;++p)if(!s[f][p]){var g;for(m=1;void 0===g;)g=s[f][(p+m++)%a];s[f][p]=g}}var v=new this.BJSCANNON.Heightfield(s,{elementSize:u});return v.minY=h,v},e.prototype._updatePhysicsBodyTransformation=function(e){var t=e.object;if(t.computeWorldMatrix&&t.computeWorldMatrix(!0),t.getBoundingInfo()){var i=e.getObjectCenter();this._tmpDeltaPosition.copyFrom(t.getAbsolutePivotPoint().subtract(i)),this._tmpDeltaPosition.divideInPlace(e.object.scaling),this._tmpPosition.copyFrom(i);var r=t.rotationQuaternion;if(r){if(e.type!==Bo.PhysicsImpostor.PlaneImpostor&&e.type!==Bo.PhysicsImpostor.HeightmapImpostor&&e.type!==Bo.PhysicsImpostor.CylinderImpostor||(r=r.multiply(this._minus90X),e.setDeltaRotation(this._plus90X)),e.type===Bo.PhysicsImpostor.HeightmapImpostor){var n=t,o=n.getBoundingInfo(),s=n.rotationQuaternion;n.rotationQuaternion=this._tmpUnityRotation,n.computeWorldMatrix(!0);var a=i.clone(),l=n.getPivotMatrix()||Bo.Matrix.Translation(0,0,0),c=Bo.Matrix.Translation(o.boundingBox.extendSizeWorld.x,0,-o.boundingBox.extendSizeWorld.z);n.setPreTransformMatrix(c),n.computeWorldMatrix(!0);var h=o.boundingBox.centerWorld.subtract(i).subtract(n.position).negate();this._tmpPosition.copyFromFloats(h.x,h.y-o.boundingBox.extendSizeWorld.y,h.z),this._tmpDeltaPosition.copyFrom(o.boundingBox.centerWorld.subtract(a)),this._tmpDeltaPosition.y+=o.boundingBox.extendSizeWorld.y,n.rotationQuaternion=s,n.setPreTransformMatrix(l),n.computeWorldMatrix(!0)}else e.type===Bo.PhysicsImpostor.MeshImpostor&&this._tmpDeltaPosition.copyFromFloats(0,0,0);e.setDeltaPosition(this._tmpDeltaPosition),e.physicsBody.position.copy(this._tmpPosition),e.physicsBody.quaternion.copy(r)}}},e.prototype.setTransformationFromPhysicsBody=function(e){e.object.position.copyFrom(e.physicsBody.position),e.object.rotationQuaternion&&e.object.rotationQuaternion.copyFrom(e.physicsBody.quaternion)},e.prototype.setPhysicsBodyTransformation=function(e,t,i){e.physicsBody.position.copy(t),e.physicsBody.quaternion.copy(i)},e.prototype.isSupported=function(){return void 0!==this.BJSCANNON},e.prototype.setLinearVelocity=function(e,t){e.physicsBody.velocity.copy(t)},e.prototype.setAngularVelocity=function(e,t){e.physicsBody.angularVelocity.copy(t)},e.prototype.getLinearVelocity=function(e){var t=e.physicsBody.velocity;return t?new Bo.Vector3(t.x,t.y,t.z):null},e.prototype.getAngularVelocity=function(e){var t=e.physicsBody.angularVelocity;return t?new Bo.Vector3(t.x,t.y,t.z):null},e.prototype.setBodyMass=function(e,t){e.physicsBody.mass=t,e.physicsBody.updateMassProperties()},e.prototype.getBodyMass=function(e){return e.physicsBody.mass},e.prototype.getBodyFriction=function(e){return e.physicsBody.material.friction},e.prototype.setBodyFriction=function(e,t){e.physicsBody.material.friction=t},e.prototype.getBodyRestitution=function(e){return e.physicsBody.material.restitution},e.prototype.setBodyRestitution=function(e,t){e.physicsBody.material.restitution=t},e.prototype.sleepBody=function(e){e.physicsBody.sleep()},e.prototype.wakeUpBody=function(e){e.physicsBody.wakeUp()},e.prototype.updateDistanceJoint=function(e,t,i){e.physicsJoint.distance=t},e.prototype.setMotor=function(e,t,i,r){r||(e.physicsJoint.enableMotor(),e.physicsJoint.setMotorSpeed(t),i&&this.setLimit(e,i))},e.prototype.setLimit=function(e,t,i){e.physicsJoint.motorEquation.maxForce=t,e.physicsJoint.motorEquation.minForce=void 0===i?-t:i},e.prototype.syncMeshWithImpostor=function(e,t){var i=t.physicsBody;e.position.x=i.position.x,e.position.y=i.position.y,e.position.z=i.position.z,e.rotationQuaternion&&(e.rotationQuaternion.x=i.quaternion.x,e.rotationQuaternion.y=i.quaternion.y,e.rotationQuaternion.z=i.quaternion.z,e.rotationQuaternion.w=i.quaternion.w)},e.prototype.getRadius=function(e){return e.physicsBody.shapes[0].boundingSphereRadius},e.prototype.getBoxSizeToRef=function(e,t){var i=e.physicsBody.shapes[0];t.x=2*i.halfExtents.x,t.y=2*i.halfExtents.y,t.z=2*i.halfExtents.z},e.prototype.dispose=function(){},e.prototype._extendNamespace=function(){var u=new this.BJSCANNON.Vec3,d=this.BJSCANNON;this.BJSCANNON.World.prototype.step=function(e,t,i){if(i=i||10,0===(t=t||0))this.internalStep(e),this.time+=e;else{var r=Math.floor((this.time+t)/e)-Math.floor(this.time/e);r=Math.min(r,i)||1;for(var n=performance.now(),o=0;o!==r&&(this.internalStep(e),!(performance.now()-n>1e3*e));o++);this.time+=t;for(var s=this.time%e/e,a=u,l=this.bodies,c=0;c!==l.length;c++){var h=l[c];h.type!==d.Body.STATIC&&h.sleepState!==d.Body.SLEEPING?(h.position.vsub(h.previousPosition,a),a.scale(s,a),h.position.vadd(a,h.interpolatedPosition)):(h.interpolatedPosition.copy(h.position),h.interpolatedQuaternion.copy(h.quaternion))}}}},e})(),Bo.CannonJSPlugin=No,Vo=$a||($a={}),Uo=(function(){function e(e){this.name=\"OimoJSPlugin\",this._tmpImpostorsArray=[],this._tmpPositionVector=Vo.Vector3.Zero(),this.BJSOIMO=t,this.world=new this.BJSOIMO.World({iterations:e}),this.world.clear()}return e.prototype.setGravity=function(e){this.world.gravity.copy(e)},e.prototype.setTimeStep=function(e){this.world.timeStep=e},e.prototype.getTimeStep=function(){return this.world.timeStep},e.prototype.executeStep=function(e,t){var i=this;t.forEach((function(e){e.beforeStep()})),this.world.step(),t.forEach((function(e){e.afterStep(),i._tmpImpostorsArray[e.uniqueId]=e}));for(var r=this.world.contacts;null!==r;)if(!r.touching||r.body1.sleeping||r.body2.sleeping){var n=this._tmpImpostorsArray[+r.body1.name],o=this._tmpImpostorsArray[+r.body2.name];n&&o&&(n.onCollide({body:o.physicsBody}),o.onCollide({body:n.physicsBody})),r=r.next}else r=r.next},e.prototype.applyImpulse=function(e,t,i){var r=e.physicsBody.mass;e.physicsBody.applyImpulse(i.scale(this.world.invScale),t.scale(this.world.invScale*r))},e.prototype.applyForce=function(e,t,i){Vo.Tools.Warn(\"Oimo doesn't support applying force. Using impule instead.\"),this.applyImpulse(e,t,i)},e.prototype.generatePhysicsBody=function(p){var _=this;if(p.parent)p.physicsBody&&(this.removePhysicsBody(p),p.forceUpdate());else{if(p.isBodyInitRequired()){var m={name:p.uniqueId,config:[p.getParam(\"mass\")||1,p.getParam(\"friction\"),p.getParam(\"restitution\")],size:[],type:[],pos:[],posShape:[],rot:[],rotShape:[],move:0!==p.getParam(\"mass\"),density:p.getParam(\"mass\"),friction:p.getParam(\"friction\"),restitution:p.getParam(\"restitution\"),world:this.world},t=[p];(e=p.object).getChildMeshes&&e.getChildMeshes().forEach((function(e){e.physicsImpostor&&t.push(e.physicsImpostor)}));var g=function(e){return Math.max(e,Vo.PhysicsEngine.Epsilon)},v=new Vo.Quaternion;t.forEach((function(e){if(e.object.rotationQuaternion){var t=e.object.rotationQuaternion;v=t.clone();var i=t.toEulerAngles(),r=e.getObjectExtendSize(),n=57.29577951308232;if(e===p){var o=p.getObjectCenter();p.object.getAbsolutePivotPoint().subtractToRef(o,_._tmpPositionVector),_._tmpPositionVector.divideInPlace(p.object.scaling),m.pos.push(o.x),m.pos.push(o.y),m.pos.push(o.z),m.posShape.push(0,0,0),m.rot.push(0),m.rot.push(0),m.rot.push(0),m.rotShape.push(0,0,0)}else{var s=e.object.getAbsolutePosition().subtract(p.object.getAbsolutePosition());m.posShape.push(s.x),m.posShape.push(s.y),m.posShape.push(s.z),m.pos.push(0,0,0),m.rot.push(0),m.rot.push(0),m.rot.push(0),m.rotShape.push(i.x*n),m.rotShape.push(i.y*n),m.rotShape.push(i.z*n)}switch(e.type){case Vo.PhysicsImpostor.ParticleImpostor:Vo.Tools.Warn(\"No Particle support in OIMO.js. using SphereImpostor instead\");case Vo.PhysicsImpostor.SphereImpostor:var a=r.x,l=r.y,c=r.z,h=Math.max(g(a),g(l),g(c))/2;m.type.push(\"sphere\"),m.size.push(h),m.size.push(h),m.size.push(h);break;case Vo.PhysicsImpostor.CylinderImpostor:var u=g(r.x)/2,d=g(r.y);m.type.push(\"cylinder\"),m.size.push(u),m.size.push(d),m.size.push(d);break;case Vo.PhysicsImpostor.PlaneImpostor:case Vo.PhysicsImpostor.BoxImpostor:default:u=g(r.x),d=g(r.y);var f=g(r.z);m.type.push(\"box\"),m.size.push(u),m.size.push(d),m.size.push(f)}e.object.rotationQuaternion=t}})),p.physicsBody=this.world.add(m),p.physicsBody.resetQuaternion(v),p.physicsBody.updatePosition(0)}else this._tmpPositionVector.copyFromFloats(0,0,0);var e;p.setDeltaPosition(this._tmpPositionVector)}},e.prototype.removePhysicsBody=function(e){this.world.removeRigidBody(e.physicsBody)},e.prototype.generateJoint=function(e){var t=e.mainImpostor.physicsBody,i=e.connectedImpostor.physicsBody;if(t&&i){var r,n=e.joint.jointData,o=n.nativeParams||{},s={body1:t,body2:i,axe1:o.axe1||(n.mainAxis?n.mainAxis.asArray():null),axe2:o.axe2||(n.connectedAxis?n.connectedAxis.asArray():null),pos1:o.pos1||(n.mainPivot?n.mainPivot.asArray():null),pos2:o.pos2||(n.connectedPivot?n.connectedPivot.asArray():null),min:o.min,max:o.max,collision:o.collision||n.collision,spring:o.spring,world:this.world};switch(e.joint.type){case Vo.PhysicsJoint.BallAndSocketJoint:r=\"jointBall\";break;case Vo.PhysicsJoint.SpringJoint:Vo.Tools.Warn(\"OIMO.js doesn't support Spring Constraint. Simulating using DistanceJoint instead\");var a=n;s.min=a.length||s.min,s.max=Math.max(s.min,s.max);case Vo.PhysicsJoint.DistanceJoint:r=\"jointDistance\",s.max=n.maxDistance;break;case Vo.PhysicsJoint.PrismaticJoint:r=\"jointPrisme\";break;case Vo.PhysicsJoint.SliderJoint:r=\"jointSlide\";break;case Vo.PhysicsJoint.WheelJoint:r=\"jointWheel\";break;case Vo.PhysicsJoint.HingeJoint:default:r=\"jointHinge\"}s.type=r,e.joint.physicsJoint=this.world.add(s)}},e.prototype.removeJoint=function(e){try{this.world.removeJoint(e.joint.physicsJoint)}catch(e){Vo.Tools.Warn(e)}},e.prototype.isSupported=function(){return void 0!==this.BJSOIMO},e.prototype.setTransformationFromPhysicsBody=function(e){e.physicsBody.sleeping||(e.object.position.copyFrom(e.physicsBody.getPosition()),e.object.rotationQuaternion&&e.object.rotationQuaternion.copyFrom(e.physicsBody.getQuaternion()))},e.prototype.setPhysicsBodyTransformation=function(e,t,i){var r=e.physicsBody;r.position.copy(t),r.orientation.copy(i),r.syncShapes(),r.awake()},e.prototype.setLinearVelocity=function(e,t){e.physicsBody.linearVelocity.copy(t)},e.prototype.setAngularVelocity=function(e,t){e.physicsBody.angularVelocity.copy(t)},e.prototype.getLinearVelocity=function(e){var t=e.physicsBody.linearVelocity;return t?new Vo.Vector3(t.x,t.y,t.z):null},e.prototype.getAngularVelocity=function(e){var t=e.physicsBody.angularVelocity;return t?new Vo.Vector3(t.x,t.y,t.z):null},e.prototype.setBodyMass=function(e,t){var i=0===t;e.physicsBody.shapes.density=i?1:t,e.physicsBody.setupMass(i?2:1)},e.prototype.getBodyMass=function(e){return e.physicsBody.shapes.density},e.prototype.getBodyFriction=function(e){return e.physicsBody.shapes.friction},e.prototype.setBodyFriction=function(e,t){e.physicsBody.shapes.friction=t},e.prototype.getBodyRestitution=function(e){return e.physicsBody.shapes.restitution},e.prototype.setBodyRestitution=function(e,t){e.physicsBody.shapes.restitution=t},e.prototype.sleepBody=function(e){e.physicsBody.sleep()},e.prototype.wakeUpBody=function(e){e.physicsBody.awake()},e.prototype.updateDistanceJoint=function(e,t,i){e.physicsJoint.limitMotor.upperLimit=t,void 0!==i&&(e.physicsJoint.limitMotor.lowerLimit=i)},e.prototype.setMotor=function(e,t,i,r){var n=r?e.physicsJoint.rotationalLimitMotor2:e.physicsJoint.rotationalLimitMotor1||e.physicsJoint.rotationalLimitMotor||e.physicsJoint.limitMotor;n&&n.setMotor(t,i)},e.prototype.setLimit=function(e,t,i,r){var n=r?e.physicsJoint.rotationalLimitMotor2:e.physicsJoint.rotationalLimitMotor1||e.physicsJoint.rotationalLimitMotor||e.physicsJoint.limitMotor;n&&n.setLimit(t,void 0===i?-t:i)},e.prototype.syncMeshWithImpostor=function(e,t){var i=t.physicsBody;e.position.x=i.position.x,e.position.y=i.position.y,e.position.z=i.position.z,e.rotationQuaternion&&(e.rotationQuaternion.x=i.orientation.x,e.rotationQuaternion.y=i.orientation.y,e.rotationQuaternion.z=i.orientation.z,e.rotationQuaternion.w=i.orientation.s)},e.prototype.getRadius=function(e){return e.physicsBody.shapes.radius},e.prototype.getBoxSizeToRef=function(e,t){var i=e.physicsBody.shapes;t.x=2*i.halfWidth,t.y=2*i.halfHeight,t.z=2*i.halfDepth},e.prototype.dispose=function(){this.world.clear()},e})(),Vo.OimoJSPlugin=Uo,(function(n){n.Scene.prototype.getPhysicsEngine=function(){return this._physicsEngine},n.Scene.prototype.enablePhysics=function(e,t){if(void 0===e&&(e=null),this._physicsEngine)return!0;var i=this._getComponent(n.SceneComponentConstants.NAME_PHYSICSENGINE);i||(i=new r(this),this._addComponent(i));try{return this._physicsEngine=new n.PhysicsEngine(e,t),!0}catch(e){return n.Tools.Error(e.message),!1}},n.Scene.prototype.disablePhysicsEngine=function(){this._physicsEngine&&(this._physicsEngine.dispose(),this._physicsEngine=null)},n.Scene.prototype.isPhysicsEnabled=function(){return void 0!==this._physicsEngine},n.Scene.prototype.deleteCompoundImpostor=function(e){var t=e.parts[0].mesh;t.physicsImpostor&&(t.physicsImpostor.dispose(),t.physicsImpostor=null)},n.Scene.prototype._advancePhysicsEngineStep=function(e){this._physicsEngine&&(this.onBeforePhysicsObservable.notifyObservers(this),this._physicsEngine._step(e/1e3),this.onAfterPhysicsObservable.notifyObservers(this))},Object.defineProperty(n.AbstractMesh.prototype,\"physicsImpostor\",{get:function(){return this._physicsImpostor},set:function(e){var t=this;this._physicsImpostor!==e&&(this._disposePhysicsObserver&&this.onDisposeObservable.remove(this._disposePhysicsObserver),(this._physicsImpostor=e)&&(this._disposePhysicsObserver=this.onDisposeObservable.add((function(){t.physicsImpostor&&(t.physicsImpostor.dispose(),t.physicsImpostor=null)}))))},enumerable:!0,configurable:!0}),n.AbstractMesh.prototype.getPhysicsImpostor=function(){return this.physicsImpostor},n.AbstractMesh.prototype.applyImpulse=function(e,t){return this.physicsImpostor&&this.physicsImpostor.applyImpulse(e,t),this},n.AbstractMesh.prototype.setPhysicsLinkWith=function(e,t,i,r){return this.physicsImpostor&&e.physicsImpostor&&this.physicsImpostor.createJoint(e.physicsImpostor,n.PhysicsJoint.HingeJoint,{mainPivot:t,connectedPivot:i,nativeParams:r}),this};var r=(function(){function e(e){var t=this;this.name=n.SceneComponentConstants.NAME_PHYSICSENGINE,this.scene=e,this.scene.onBeforePhysicsObservable=new n.Observable,this.scene.onAfterPhysicsObservable=new n.Observable,this.scene.getDeterministicFrameTime=function(){return t.scene._physicsEngine?1e3*t.scene._physicsEngine.getTimeStep():1e3/60}}return e.prototype.register=function(){},e.prototype.rebuild=function(){},e.prototype.dispose=function(){this.scene.onBeforePhysicsObservable.clear(),this.scene.onAfterPhysicsObservable.clear(),this.scene._physicsEngine&&this.scene.disablePhysicsEngine()},e})();n.PhysicsEngineSceneComponent=r})($a||($a={})),(function(B){function e(e){return e.charCodeAt(0)+(e.charCodeAt(1)<<8)+(e.charCodeAt(2)<<16)+(e.charCodeAt(3)<<24)}var N=e(\"DXT1\"),V=e(\"DXT3\"),U=e(\"DXT5\"),z=e(\"DX10\"),t=(function(){function F(){}return F.GetDDSInfo=function(e){var t=new Int32Array(e,0,31),i=new Int32Array(e,0,35),r=1;131072&t[2]&&(r=Math.max(1,t[7]));var n=t[21],o=n===z?i[32]:0,s=B.Engine.TEXTURETYPE_UNSIGNED_INT;switch(n){case 113:s=B.Engine.TEXTURETYPE_HALF_FLOAT;break;case 116:s=B.Engine.TEXTURETYPE_FLOAT;break;case z:if(10===o){s=B.Engine.TEXTURETYPE_HALF_FLOAT;break}}return{width:t[4],height:t[3],mipmapCount:r,isFourCC:4==(4&t[20]),isRGB:64==(64&t[20]),isLuminance:131072==(131072&t[20]),isCube:512==(512&t[28]),isCompressed:n===N||n===V||n===U,dxgiFormat:o,textureType:s}},F._ToHalfFloat=function(e){F._FloatView||(F._FloatView=new Float32Array(1),F._Int32View=new Int32Array(F._FloatView.buffer)),F._FloatView[0]=e;var t=F._Int32View[0],i=t>>16&32768,r=t>>12&2047,n=t>>23&255;return n<103?i:142<n?(i|=31744,i|=(255==n?0:1)&&8388607&t):n<113?i|=((r|=2048)>>114-n)+(r>>113-n&1):(i|=n-112<<10|r>>1,i+=1&r)},F._FromHalfFloat=function(e){var t=(32768&e)>>15,i=(31744&e)>>10,r=1023&e;return 0===i?(t?-1:1)*Math.pow(2,-14)*(r/Math.pow(2,10)):31==i?r?NaN:1/0*(t?-1:1):(t?-1:1)*Math.pow(2,i-15)*(1+r/Math.pow(2,10))},F._GetHalfFloatAsFloatRGBAArrayBuffer=function(e,t,i,r,n,o){for(var s=new Float32Array(r),a=new Uint16Array(n,i),l=0,c=0;c<t;c++)for(var h=0;h<e;h++){var u=4*(h+c*e);s[l]=F._FromHalfFloat(a[u]),s[l+1]=F._FromHalfFloat(a[u+1]),s[l+2]=F._FromHalfFloat(a[u+2]),s[l+3]=F.StoreLODInAlphaChannel?o:F._FromHalfFloat(a[u+3]),l+=4}return s},F._GetHalfFloatRGBAArrayBuffer=function(e,t,i,r,n,o){if(F.StoreLODInAlphaChannel){for(var s=new Uint16Array(r),a=new Uint16Array(n,i),l=0,c=0;c<t;c++)for(var h=0;h<e;h++){var u=4*(h+c*e);s[l]=a[u],s[l+1]=a[u+1],s[l+2]=a[u+2],s[l+3]=F._ToHalfFloat(o),l+=4}return s}return new Uint16Array(n,i,r)},F._GetFloatRGBAArrayBuffer=function(e,t,i,r,n,o){if(F.StoreLODInAlphaChannel){for(var s=new Float32Array(r),a=new Float32Array(n,i),l=0,c=0;c<t;c++)for(var h=0;h<e;h++){var u=4*(h+c*e);s[l]=a[u],s[l+1]=a[u+1],s[l+2]=a[u+2],s[l+3]=o,l+=4}return s}return new Float32Array(n,i,r)},F._GetFloatAsUIntRGBAArrayBuffer=function(e,t,i,r,n,o){for(var s=new Uint8Array(r),a=new Float32Array(n,i),l=0,c=0;c<t;c++)for(var h=0;h<e;h++){var u=4*(h+c*e);s[l]=255*B.Scalar.Clamp(a[u]),s[l+1]=255*B.Scalar.Clamp(a[u+1]),s[l+2]=255*B.Scalar.Clamp(a[u+2]),s[l+3]=F.StoreLODInAlphaChannel?o:255*B.Scalar.Clamp(a[u+3]),l+=4}return s},F._GetHalfFloatAsUIntRGBAArrayBuffer=function(e,t,i,r,n,o){for(var s=new Uint8Array(r),a=new Uint16Array(n,i),l=0,c=0;c<t;c++)for(var h=0;h<e;h++){var u=4*(h+c*e);s[l]=255*B.Scalar.Clamp(F._FromHalfFloat(a[u])),s[l+1]=255*B.Scalar.Clamp(F._FromHalfFloat(a[u+1])),s[l+2]=255*B.Scalar.Clamp(F._FromHalfFloat(a[u+2])),s[l+3]=F.StoreLODInAlphaChannel?o:255*B.Scalar.Clamp(F._FromHalfFloat(a[u+3])),l+=4}return s},F._GetRGBAArrayBuffer=function(e,t,i,r,n,o,s,a,l){for(var c=new Uint8Array(r),h=new Uint8Array(n,i),u=0,d=0;d<t;d++)for(var f=0;f<e;f++){var p=4*(f+d*e);c[u]=h[p+o],c[u+1]=h[p+s],c[u+2]=h[p+a],c[u+3]=h[p+l],u+=4}return c},F._ExtractLongWordOrder=function(e){return 0===e||255===e||-16777216===e?0:1+F._ExtractLongWordOrder(e>>8)},F._GetRGBArrayBuffer=function(e,t,i,r,n,o,s,a){for(var l=new Uint8Array(r),c=new Uint8Array(n,i),h=0,u=0;u<t;u++)for(var d=0;d<e;d++){var f=3*(d+u*e);l[h]=c[f+o],l[h+1]=c[f+s],l[h+2]=c[f+a],h+=3}return l},F._GetLuminanceArrayBuffer=function(e,t,i,r,n){for(var o=new Uint8Array(r),s=new Uint8Array(n,i),a=0,l=0;l<t;l++)for(var c=0;c<e;c++){var h=c+l*e;o[a]=s[h],a++}return o},F.UploadDDSLevels=function(e,t,i,r,n,o,s,a){void 0===s&&(s=-1);var l=null;r.sphericalPolynomial&&(l=new Array);var c,h,u,d,f,p,_,m=e.getCaps().s3tc,g=new Int32Array(i,0,31),v=0,y=0,b=1;if(542327876===g[0])if(r.isFourCC||r.isRGB||r.isLuminance)if(!r.isCompressed||m){var T=g[22];d=g[1]+4;var E,x=!1;if(r.isFourCC)switch(c=g[21]){case N:b=8,y=m.COMPRESSED_RGBA_S3TC_DXT1_EXT;break;case V:b=16,y=m.COMPRESSED_RGBA_S3TC_DXT3_EXT;break;case U:b=16,y=m.COMPRESSED_RGBA_S3TC_DXT5_EXT;break;case 113:case 116:x=!0;break;case z:d+=20;var P=!1;switch(r.dxgiFormat){case 10:P=x=!0;break;case 88:r.isRGB=!0,T=32,P=!(r.isFourCC=!1)}if(P)break;default:return void console.error(\"Unsupported FourCC code:\",(E=c,String.fromCharCode(255&E,E>>8&255,E>>16&255,E>>24&255)))}var A=F._ExtractLongWordOrder(g[23]),S=F._ExtractLongWordOrder(g[24]),M=F._ExtractLongWordOrder(g[25]),R=F._ExtractLongWordOrder(g[26]);x&&(y=e._getRGBABufferInternalSizedFormat(r.textureType)),p=1,131072&g[2]&&!1!==n&&(p=Math.max(1,g[7]));for(var C=0;C<o;C++){for(h=g[4],u=g[3],_=0;_<p;++_){if(-1===s||s===_){var O=-1===s?_:0;if(!r.isCompressed&&r.isFourCC){t.format=B.Engine.TEXTUREFORMAT_RGBA,v=h*u*4;var D=null;e._badOS||e._badDesktopOS||!e.getCaps().textureHalfFloat&&!e.getCaps().textureFloat?(128===T?(D=F._GetFloatAsUIntRGBAArrayBuffer(h,u,d,v,i,O),l&&0==O&&l.push(F._GetFloatRGBAArrayBuffer(h,u,d,v,i,O))):64===T&&(D=F._GetHalfFloatAsUIntRGBAArrayBuffer(h,u,d,v,i,O),l&&0==O&&l.push(F._GetHalfFloatAsFloatRGBAArrayBuffer(h,u,d,v,i,O))),t.type=B.Engine.TEXTURETYPE_UNSIGNED_INT):128===T?(t.type=B.Engine.TEXTURETYPE_FLOAT,D=F._GetFloatRGBAArrayBuffer(h,u,d,v,i,O),l&&0==O&&l.push(D)):64!==T||e.getCaps().textureHalfFloat?(t.type=B.Engine.TEXTURETYPE_HALF_FLOAT,D=F._GetHalfFloatRGBAArrayBuffer(h,u,d,v,i,O),l&&0==O&&l.push(F._GetHalfFloatAsFloatRGBAArrayBuffer(h,u,d,v,i,O))):(t.type=B.Engine.TEXTURETYPE_FLOAT,D=F._GetHalfFloatAsFloatRGBAArrayBuffer(h,u,d,v,i,O),l&&0==O&&l.push(D)),D&&e._uploadDataToTextureDirectly(t,D,C,O)}else if(r.isRGB)t.type=B.Engine.TEXTURETYPE_UNSIGNED_INT,24===T?(t.format=B.Engine.TEXTUREFORMAT_RGB,f=F._GetRGBArrayBuffer(h,u,d,v=h*u*3,i,A,S,M)):(t.format=B.Engine.TEXTUREFORMAT_RGBA,f=F._GetRGBAArrayBuffer(h,u,d,v=h*u*4,i,A,S,M,R)),e._uploadDataToTextureDirectly(t,f,C,O);else if(r.isLuminance){var I=e._getUnpackAlignement(),w=h,L=Math.floor((h+I-1)/I)*I;f=F._GetLuminanceArrayBuffer(h,u,d,v=L*(u-1)+w,i),t.format=B.Engine.TEXTUREFORMAT_LUMINANCE,t.type=B.Engine.TEXTURETYPE_UNSIGNED_INT,e._uploadDataToTextureDirectly(t,f,C,O)}else v=Math.max(4,h)/4*Math.max(4,u)/4*b,f=new Uint8Array(i,d,v),t.type=B.Engine.TEXTURETYPE_UNSIGNED_INT,e._uploadCompressedDataToTextureDirectly(t,y,h,u,f,C,O)}d+=T?h*u*(T/8):v,h*=.5,u*=.5,h=Math.max(1,h),u=Math.max(1,u)}if(void 0!==a)break}l&&0<l.length?r.sphericalPolynomial=B.CubeMapToSphericalPolynomialTools.ConvertCubeMapToSphericalPolynomial({size:g[4],right:l[0],left:l[1],up:l[2],down:l[3],front:l[4],back:l[5],format:B.Engine.TEXTUREFORMAT_RGBA,type:B.Engine.TEXTURETYPE_FLOAT,gammaSpace:!1}):r.sphericalPolynomial=void 0}else B.Tools.Error(\"Compressed textures are not supported on this platform.\");else B.Tools.Error(\"Unsupported format, must contain a FourCC, RGB or LUMINANCE code\");else B.Tools.Error(\"Invalid magic number in DDS header\")},F.StoreLODInAlphaChannel=!1,F})();B.DDSTools=t})($a||($a={})),zo=$a||($a={}),Go=(function(){function e(){this.supportCascades=!0}return e.prototype.canLoad=function(e,t,i,r,n){return 0===e.indexOf(\".dds\")},e.prototype.transformUrl=function(e,t){return e},e.prototype.getFallbackTextureUrl=function(e,t){return null},e.prototype.loadCubeData=function(e,t,i,r,n){var o,s=t.getEngine(),a=!1;if(Array.isArray(e))for(var l=0;l<e.length;l++){var c=e[l];o=zo.DDSTools.GetDDSInfo(c),t.width=o.width,t.height=o.height,a=(o.isRGB||o.isLuminance||1<o.mipmapCount)&&t.generateMipMaps,s._unpackFlipY(o.isCompressed),zo.DDSTools.UploadDDSLevels(s,t,c,o,a,6,-1,l),o.isFourCC||1!==o.mipmapCount||s.generateMipMapsForCubemap(t)}else{var h=e;o=zo.DDSTools.GetDDSInfo(h),t.width=o.width,t.height=o.height,i&&(o.sphericalPolynomial=new zo.SphericalPolynomial),a=(o.isRGB||o.isLuminance||1<o.mipmapCount)&&t.generateMipMaps,s._unpackFlipY(o.isCompressed),zo.DDSTools.UploadDDSLevels(s,t,h,o,a,6),o.isFourCC||1!==o.mipmapCount||s.generateMipMapsForCubemap(t)}s._setCubeMapTextureParams(a),t.isReady=!0,r&&r({isDDS:!0,width:t.width,info:o,data:e,texture:t})},e.prototype.loadData=function(e,t,i){var r=zo.DDSTools.GetDDSInfo(e),n=(r.isRGB||r.isLuminance||1<r.mipmapCount)&&t.generateMipMaps&&r.width>>r.mipmapCount-1==1;i(r.width,r.height,n,r.isFourCC,(function(){zo.DDSTools.UploadDDSLevels(t.getEngine(),t,e,r,n,1)}))},e})(),zo.Engine._TextureLoaders.push(new Go),ko=$a||($a={}),Wo=(function(){function x(){}return x.GetTGAHeader=function(e){var t=0;return{id_length:e[t++],colormap_type:e[t++],image_type:e[t++],colormap_index:e[t++]|e[t++]<<8,colormap_length:e[t++]|e[t++]<<8,colormap_size:e[t++],origin:[e[t++]|e[t++]<<8,e[t++]|e[t++]<<8],width:e[t++]|e[t++]<<8,height:e[t++]|e[t++]<<8,pixel_size:e[t++],flags:e[t++]}},x.UploadContent=function(e,t){if(t.length<19)ko.Tools.Error(\"Unable to load TGA file - Not enough data to contain header\");else{var i=18,r=x.GetTGAHeader(t);if(r.id_length+i>t.length)ko.Tools.Error(\"Unable to load TGA file - Not enough data\");else{i+=r.id_length;var n,o=!1,s=!1,a=!1;switch(r.image_type){case x._TYPE_RLE_INDEXED:o=!0;case x._TYPE_INDEXED:s=!0;break;case x._TYPE_RLE_RGB:o=!0;case x._TYPE_RGB:break;case x._TYPE_RLE_GREY:o=!0;case x._TYPE_GREY:a=!0}var l,c,h,u,d,f,p,_=r.pixel_size>>3,m=r.width*r.height*_;if(s&&(l=t.subarray(i,i+=r.colormap_length*(r.colormap_size>>3))),o){var g,v,y;n=new Uint8Array(m);for(var b=0,T=new Uint8Array(_);i<m&&b<m;)if(v=1+(127&(g=t[i++])),128&g){for(y=0;y<_;++y)T[y]=t[i++];for(y=0;y<v;++y)n.set(T,b+y*_);b+=_*v}else{for(v*=_,y=0;y<v;++y)n[b+y]=t[i++];b+=v}}else n=t.subarray(i,i+=s?r.width*r.height:m);switch((r.flags&x._ORIGIN_MASK)>>x._ORIGIN_SHIFT){default:case x._ORIGIN_UL:c=0,u=1,p=r.width,h=0,d=1,f=r.height;break;case x._ORIGIN_BL:c=0,u=1,p=r.width,h=r.height-1,f=d=-1;break;case x._ORIGIN_UR:c=r.width-1,p=u=-1,h=0,d=1,f=r.height;break;case x._ORIGIN_BR:c=r.width-1,p=u=-1,h=r.height-1,f=d=-1}var E=x[\"_getImageData\"+(a?\"Grey\":\"\")+r.pixel_size+\"bits\"](r,l,n,h,d,f,c,u,p);e.getEngine()._uploadDataToTextureDirectly(e,E)}}},x._getImageData8bits=function(e,t,i,r,n,o,s,a,l){var c,h,u,d=i,f=t,p=e.width,_=e.height,m=0,g=new Uint8Array(p*_*4);for(u=r;u!==o;u+=n)for(h=s;h!==l;h+=a,m++)c=d[m],g[4*(h+p*u)+3]=255,g[4*(h+p*u)+2]=f[3*c+0],g[4*(h+p*u)+1]=f[3*c+1],g[4*(h+p*u)+0]=f[3*c+2];return g},x._getImageData16bits=function(e,t,i,r,n,o,s,a,l){var c,h,u,d=i,f=e.width,p=e.height,_=0,m=new Uint8Array(f*p*4);for(u=r;u!==o;u+=n)for(h=s;h!==l;h+=a,_+=2){var g=255*((31744&(c=d[_+0]+(d[_+1]<<8)))>>10)/31|0,v=255*((992&c)>>5)/31|0,y=255*(31&c)/31|0;m[4*(h+f*u)+0]=g,m[4*(h+f*u)+1]=v,m[4*(h+f*u)+2]=y,m[4*(h+f*u)+3]=32768&c?0:255}return m},x._getImageData24bits=function(e,t,i,r,n,o,s,a,l){var c,h,u=i,d=e.width,f=e.height,p=0,_=new Uint8Array(d*f*4);for(h=r;h!==o;h+=n)for(c=s;c!==l;c+=a,p+=3)_[4*(c+d*h)+3]=255,_[4*(c+d*h)+2]=u[p+0],_[4*(c+d*h)+1]=u[p+1],_[4*(c+d*h)+0]=u[p+2];return _},x._getImageData32bits=function(e,t,i,r,n,o,s,a,l){var c,h,u=i,d=e.width,f=e.height,p=0,_=new Uint8Array(d*f*4);for(h=r;h!==o;h+=n)for(c=s;c!==l;c+=a,p+=4)_[4*(c+d*h)+2]=u[p+0],_[4*(c+d*h)+1]=u[p+1],_[4*(c+d*h)+0]=u[p+2],_[4*(c+d*h)+3]=u[p+3];return _},x._getImageDataGrey8bits=function(e,t,i,r,n,o,s,a,l){var c,h,u,d=i,f=e.width,p=e.height,_=0,m=new Uint8Array(f*p*4);for(u=r;u!==o;u+=n)for(h=s;h!==l;h+=a,_++)c=d[_],m[4*(h+f*u)+0]=c,m[4*(h+f*u)+1]=c,m[4*(h+f*u)+2]=c,m[4*(h+f*u)+3]=255;return m},x._getImageDataGrey16bits=function(e,t,i,r,n,o,s,a,l){var c,h,u=i,d=e.width,f=e.height,p=0,_=new Uint8Array(d*f*4);for(h=r;h!==o;h+=n)for(c=s;c!==l;c+=a,p+=2)_[4*(c+d*h)+0]=u[p+0],_[4*(c+d*h)+1]=u[p+0],_[4*(c+d*h)+2]=u[p+0],_[4*(c+d*h)+3]=u[p+1];return _},x._TYPE_INDEXED=1,x._TYPE_RGB=2,x._TYPE_GREY=3,x._TYPE_RLE_INDEXED=9,x._TYPE_RLE_RGB=10,x._TYPE_RLE_GREY=11,x._ORIGIN_MASK=48,x._ORIGIN_SHIFT=4,x._ORIGIN_BL=0,x._ORIGIN_BR=1,x._ORIGIN_UL=2,x._ORIGIN_UR=3,x})(),ko.TGATools=Wo,Ho=$a||($a={}),Xo=(function(){function e(){this.supportCascades=!1}return e.prototype.canLoad=function(e,t,i,r,n){return 0===e.indexOf(\".tga\")},e.prototype.transformUrl=function(e,t){return e},e.prototype.getFallbackTextureUrl=function(e,t){return null},e.prototype.loadCubeData=function(e,t,i,r,n){throw\".env not supported in Cube.\"},e.prototype.loadData=function(e,t,i){var r=new Uint8Array(e),n=Ho.TGATools.GetTGAHeader(r);i(n.width,n.height,t.generateMipMaps,!1,(function(){Ho.TGATools.UploadContent(t,r)}))},e})(),Ho.Engine._TextureLoaders.push(new Xo),jo=$a||($a={}),Yo=(function(){function h(e,t,i,r){this.arrayBuffer=e;var n=new Uint8Array(this.arrayBuffer,0,12);if(171===n[0]&&75===n[1]&&84===n[2]&&88===n[3]&&32===n[4]&&49===n[5]&&49===n[6]&&187===n[7]&&13===n[8]&&10===n[9]&&26===n[10]&&10===n[11]){var o=new Int32Array(this.arrayBuffer,12,13),s=16909060===o[0];this.glType=s?this.switchEndianness(o[1]):o[1],this.glTypeSize=s?this.switchEndianness(o[2]):o[2],this.glFormat=s?this.switchEndianness(o[3]):o[3],this.glInternalFormat=s?this.switchEndianness(o[4]):o[4],this.glBaseInternalFormat=s?this.switchEndianness(o[5]):o[5],this.pixelWidth=s?this.switchEndianness(o[6]):o[6],this.pixelHeight=s?this.switchEndianness(o[7]):o[7],this.pixelDepth=s?this.switchEndianness(o[8]):o[8],this.numberOfArrayElements=s?this.switchEndianness(o[9]):o[9],this.numberOfFaces=s?this.switchEndianness(o[10]):o[10],this.numberOfMipmapLevels=s?this.switchEndianness(o[11]):o[11],this.bytesOfKeyValueData=s?this.switchEndianness(o[12]):o[12],0===this.glType?(this.numberOfMipmapLevels=Math.max(1,this.numberOfMipmapLevels),0!==this.pixelHeight&&0===this.pixelDepth?0===this.numberOfArrayElements?this.numberOfFaces===t?this.loadType=h.COMPRESSED_2D:jo.Tools.Error(\"number of faces expected\"+t+\", but found \"+this.numberOfFaces):jo.Tools.Error(\"texture arrays not currently supported\"):jo.Tools.Error(\"only 2D textures currently supported\")):jo.Tools.Error(\"only compressed formats currently supported\")}else jo.Tools.Error(\"texture missing KTX identifier\")}return h.prototype.switchEndianness=function(e){return(255&e)<<24|(65280&e)<<8|e>>8&65280|e>>24&255},h.prototype.uploadLevels=function(e,t){switch(this.loadType){case h.COMPRESSED_2D:this._upload2DCompressedLevels(e,t)}},h.prototype._upload2DCompressedLevels=function(e,t){for(var i=h.HEADER_LEN+this.bytesOfKeyValueData,r=this.pixelWidth,n=this.pixelHeight,o=t?this.numberOfMipmapLevels:1,s=0;s<o;s++){var a=new Int32Array(this.arrayBuffer,i,1)[0];i+=4;for(var l=0;l<this.numberOfFaces;l++){var c=new Uint8Array(this.arrayBuffer,i,a);e.getEngine()._uploadCompressedDataToTextureDirectly(e,this.glInternalFormat,r,n,c,l,s),i+=a,i+=3-(a+3)%4}r=Math.max(1,.5*r),n=Math.max(1,.5*n)}},h.HEADER_LEN=64,h.COMPRESSED_2D=0,h.COMPRESSED_3D=1,h.TEX_2D=2,h.TEX_3D=3,h})(),jo.KhronosTextureContainer=Yo,Ko=$a||($a={}),Qo=(function(){function e(){this.supportCascades=!1}return e.prototype.canLoad=function(e,t,i,r,n){return!(!t||r||i||n)},e.prototype.transformUrl=function(e,t){var i=e.lastIndexOf(\".\");return(-1<i?e.substring(0,i):e)+t},e.prototype.getFallbackTextureUrl=function(e,t){var i=new RegExp(t+\"$\");return e.replace(i,\"\")},e.prototype.loadCubeData=function(e,t,i,r,n){if(!Array.isArray(e)){var o=t.getEngine(),s=new Ko.KhronosTextureContainer(e,6),a=1<s.numberOfMipmapLevels&&t.generateMipMaps;o._unpackFlipY(!0),s.uploadLevels(t,t.generateMipMaps),t.width=s.pixelWidth,t.height=s.pixelHeight,o._setCubeMapTextureParams(a),t.isReady=!0}},e.prototype.loadData=function(e,t,i){var r=new Ko.KhronosTextureContainer(e,1);i(r.pixelWidth,r.pixelHeight,!1,!0,(function(){r.uploadLevels(t,t.generateMipMaps)}))},e})(),Ko.Engine._TextureLoaders.unshift(new Qo),Zo=$a||($a={}),qo=(function(){function T(){}return T.GetEnvInfo=function(e){for(var t=new DataView(e),i=0,r=0;r<T._MagicBytes.length;r++)if(t.getUint8(i++)!==T._MagicBytes[r])return Zo.Tools.Error(\"Not a babylon environment map\"),null;for(var n=\"\",o=0;o=t.getUint8(i++);)n+=String.fromCharCode(o);var s=JSON.parse(n);return s.specular&&(s.specular.specularDataPosition=i,s.specular.lodGenerationScale=s.specular.lodGenerationScale||.8),s},T.CreateEnvTextureAsync=function(_){var m=this,e=_.getInternalTexture();if(!e)return Promise.reject(\"The cube texture is invalid.\");if(!_._prefiltered)return Promise.reject(\"The cube texture is invalid (not prefiltered).\");var l=e.getEngine();if(l&&l.premultipliedAlpha)return Promise.reject(\"Env texture can only be created when the engine is created with the premultipliedAlpha option set to false.\");if(_.textureType===Zo.Engine.TEXTURETYPE_UNSIGNED_INT)return Promise.reject(\"The cube texture should allow HDR (Full Float or Half Float).\");var c=l.getRenderingCanvas();if(!c)return Promise.reject(\"Env texture can only be created when the engine is associated to a canvas.\");var i=Zo.Engine.TEXTURETYPE_FLOAT;if(!l.getCaps().textureFloatRender&&(i=Zo.Engine.TEXTURETYPE_HALF_FLOAT,!l.getCaps().textureHalfFloatRender))return Promise.reject(\"Env texture can only be created when the browser supports half float or full float rendering.\");var g=e.width,v=new Zo.Scene(l),y={},r=[],b=Zo.Scalar.Log2(e.width);b=Math.round(b);for(var t=function(s){for(var a=Math.pow(2,b-s),e=function(n){var e=_.readPixels(n,s),o=l.createRawTexture(e,a,a,Zo.Engine.TEXTUREFORMAT_RGBA,!1,!1,Zo.Texture.NEAREST_SAMPLINGMODE,null,i),t=new Promise(function(i,e){var r=new Zo.PostProcess(\"rgbdEncode\",\"rgbdEncode\",null,null,1,null,Zo.Texture.NEAREST_SAMPLINGMODE,l,!1,void 0,Zo.Engine.TEXTURETYPE_UNSIGNED_INT,void 0,null,!1);r.getEffect().executeWhenCompiled((function(){r.onApply=function(e){e._bindTexture(\"textureSampler\",o)};var e=l.getRenderWidth(),t=l.getRenderHeight();l.setSize(a,a),v.postProcessManager.directRender([r],null),Zo.Tools.ToBlob(c,(function(e){var t=new FileReader;t.onload=function(e){var t=e.target.result;y[6*s+n]=t,i()},t.readAsArrayBuffer(e)})),l.setSize(e,t)}))});r.push(t)},t=0;t<6;t++)e(t)},n=0;n<=b;n++)t(n);return Promise.all(r).then((function(){v.dispose();for(var e={version:1,width:g,irradiance:m._CreateEnvTextureIrradiance(_),specular:{mipmaps:[],lodGenerationScale:_.lodGenerationScale}},t=0,i=0;i<=b;i++)for(var r=0;r<6;r++){var n=y[6*i+r].byteLength;e.specular.mipmaps.push({length:n,position:t}),t+=n}for(var o=JSON.stringify(e),s=new ArrayBuffer(o.length+1),a=new Uint8Array(s),l=(i=0,o.length);i<l;i++)a[i]=o.charCodeAt(i);a[o.length]=0;var c=T._MagicBytes.length+t+s.byteLength,h=new ArrayBuffer(c),u=new Uint8Array(h),d=new DataView(h),f=0;for(i=0;i<T._MagicBytes.length;i++)d.setUint8(f++,T._MagicBytes[i]);u.set(new Uint8Array(s),f),f+=s.byteLength;for(i=0;i<=b;i++)for(r=0;r<6;r++){var p=y[6*i+r];u.set(new Uint8Array(p),f),f+=p.byteLength}return h}))},T._CreateEnvTextureIrradiance=function(e){var t=e.sphericalPolynomial;return null==t?null:{x:[t.x.x,t.x.y,t.x.z],y:[t.y.x,t.y.y,t.y.z],z:[t.z.x,t.z.y,t.z.z],xx:[t.xx.x,t.xx.y,t.xx.z],yy:[t.yy.x,t.yy.y,t.yy.z],zz:[t.zz.x,t.zz.y,t.zz.z],yz:[t.yz.x,t.yz.y,t.yz.z],zx:[t.zx.x,t.zx.y,t.zx.z],xy:[t.xy.x,t.xy.y,t.xy.z]}},T.UploadEnvLevelsAsync=function(e,t,i){if(1!==i.version)throw new Error('Unsupported babylon environment map version \"'+i.version+'\"');var r=i.specular;if(!r)return Promise.resolve();var n=Zo.Scalar.Log2(i.width);if(n=Math.round(n)+1,r.mipmaps.length!==6*n)throw new Error('Unsupported specular mipmaps number \"'+r.mipmaps.length+'\"');e._lodGenerationScale=r.lodGenerationScale;for(var o=new Array(n),s=0;s<n;s++){o[s]=new Array(6);for(var a=0;a<6;a++){var l=r.mipmaps[6*s+a];o[s][a]=new Uint8Array(t,r.specularDataPosition+l.position,l.length)}}return T.UploadLevelsAsync(e,o)},T.UploadLevelsAsync=function(l,r){if(!Zo.Tools.IsExponentOfTwo(l.width))throw new Error(\"Texture size must be a power of two\");var e=Math.round(Zo.Scalar.Log2(l.width))+1,c=l.getEngine(),h=!1,u=!1,d=null,f=null,p=null,t=c.getCaps();if(l.format=Zo.Engine.TEXTUREFORMAT_RGBA,l.type=Zo.Engine.TEXTURETYPE_UNSIGNED_INT,l.generateMipMaps=!0,c.updateTextureSamplingMode(Zo.Texture.TRILINEAR_SAMPLINGMODE,l),t.textureLOD?c.webGLVersion<2?h=!1:t.textureHalfFloatRender&&t.textureHalfFloatLinearFiltering?(h=!0,l.type=Zo.Engine.TEXTURETYPE_HALF_FLOAT):t.textureFloatRender&&t.textureFloatLinearFiltering&&(h=!0,l.type=Zo.Engine.TEXTURETYPE_FLOAT):(u=!(h=!1),p={}),h)d=new Zo.PostProcess(\"rgbdDecode\",\"rgbdDecode\",null,null,1,null,Zo.Texture.TRILINEAR_SAMPLINGMODE,c,!1,void 0,l.type,void 0,null,!1),l._isRGBD=!1,l.invertY=!1,f=c.createRenderTargetCubeTexture(l.width,{generateDepthBuffer:!1,generateMipMaps:!0,generateStencilBuffer:!1,samplingMode:Zo.Texture.TRILINEAR_SAMPLINGMODE,type:l.type,format:Zo.Engine.TEXTUREFORMAT_RGBA});else if(l._isRGBD=!0,l.invertY=!0,u)for(var i=l._lodGenerationScale,n=l._lodGenerationOffset,o=0;o<3;o++){var s=(e-1)*i+n,a=n+(s-n)*(1-o/2),_=Math.round(Math.min(Math.max(a,0),s)),m=new Zo.InternalTexture(c,Zo.InternalTexture.DATASOURCE_TEMP);m.isCube=!0,m.invertY=!0,m.generateMipMaps=!1,c.updateTextureSamplingMode(Zo.Texture.LINEAR_LINEAR,m);var g=new Zo.BaseTexture(null);switch(g.isCube=!0,g._texture=m,p[_]=g,o){case 0:l._lodTextureLow=g;break;case 1:l._lodTextureMid=g;break;case 2:l._lodTextureHigh=g}}var v=[],y=function(a){for(var e=function(n){var e=r[a][n],t=new Blob([e],{type:\"image/png\"}),o=URL.createObjectURL(t),s=new Image;s.src=o;var i=new Promise(function(i,r){s.onload=function(){if(h){var t=c.createTexture(null,!0,!0,null,Zo.Texture.NEAREST_SAMPLINGMODE,null,(function(e){r(e)}),s);d.getEffect().executeWhenCompiled((function(){d.onApply=function(e){e._bindTexture(\"textureSampler\",t),e.setFloat2(\"scale\",1,1)},c.scenes[0].postProcessManager.directRender([d],f,!0,n,a),c.restoreDefaultFramebuffer(),t.dispose(),window.URL.revokeObjectURL(o),i()}))}else{if(c._uploadImageToTexture(l,s,n,a),u){var e=p[a];e&&c._uploadImageToTexture(e._texture,s,n,0)}i()}},s.onerror=function(e){r(e)}});v.push(i)},t=0;t<6;t++)e(t)};for(o=0;o<r.length;o++)y(o);if(r.length<e){var b=void 0,T=Math.pow(2,e-1-r.length),E=T*T*4;switch(l.type){case Zo.Engine.TEXTURETYPE_UNSIGNED_INT:b=new Uint8Array(E);break;case Zo.Engine.TEXTURETYPE_HALF_FLOAT:b=new Uint16Array(E);break;case Zo.Engine.TEXTURETYPE_FLOAT:b=new Float32Array(E)}for(o=r.length;o<e;o++)for(var x=0;x<6;x++)c._uploadArrayBufferViewToTexture(l,b,x,o)}return Promise.all(v).then((function(){f&&(c._releaseFramebufferObjects(f),f._swapAndDie(l)),d&&d.dispose(),u&&(l._lodTextureHigh&&l._lodTextureHigh._texture&&(l._lodTextureHigh._texture.isReady=!0),l._lodTextureMid&&l._lodTextureMid._texture&&(l._lodTextureMid._texture.isReady=!0),l._lodTextureLow&&l._lodTextureLow._texture&&(l._lodTextureLow._texture.isReady=!0))}))},T.UploadEnvSpherical=function(e,t){1!==t.version&&Zo.Tools.Warn('Unsupported babylon environment map version \"'+t.version+'\"');var i=t.irradiance;if(i){var r=new Zo.SphericalPolynomial;Zo.Vector3.FromArrayToRef(i.x,0,r.x),Zo.Vector3.FromArrayToRef(i.y,0,r.y),Zo.Vector3.FromArrayToRef(i.z,0,r.z),Zo.Vector3.FromArrayToRef(i.xx,0,r.xx),Zo.Vector3.FromArrayToRef(i.yy,0,r.yy),Zo.Vector3.FromArrayToRef(i.zz,0,r.zz),Zo.Vector3.FromArrayToRef(i.yz,0,r.yz),Zo.Vector3.FromArrayToRef(i.zx,0,r.zx),Zo.Vector3.FromArrayToRef(i.xy,0,r.xy),e._sphericalPolynomial=r}},T._MagicBytes=[134,22,135,150,246,214,150,54],T})(),Zo.EnvironmentTextureTools=qo,Jo=$a||($a={}),$o=(function(){function e(){this.supportCascades=!1}return e.prototype.canLoad=function(e,t,i,r,n){return 0===e.indexOf(\".env\")},e.prototype.transformUrl=function(e,t){return e},e.prototype.getFallbackTextureUrl=function(e,t){return null},e.prototype.loadCubeData=function(e,t,i,r,n){if(!Array.isArray(e)){e=e;var o=Jo.EnvironmentTextureTools.GetEnvInfo(e);o?(t.width=o.width,t.height=o.width,Jo.EnvironmentTextureTools.UploadEnvSpherical(t,o),Jo.EnvironmentTextureTools.UploadEnvLevelsAsync(t,e,o).then((function(){t.isReady=!0,r&&r()}))):n&&n(\"Can not parse the environment file\",null)}},e.prototype.loadData=function(e,t,i){throw\".env not supported in 2d.\"},e})(),Jo.Engine._TextureLoaders.push(new $o),es=$a||($a={}),ts=(function(){function e(s){var a=this;this.originalScene=s,this._pointerCaptures={},this._lastPointerEvents={},this.shouldRender=!0,this.onlyCheckPointerDownEvents=!0,this.processAllEvents=!1,this.onPointerOutObservable=new es.Observable,this.utilityLayerScene=new es.Scene(s.getEngine()),this.utilityLayerScene.useRightHandedSystem=s.useRightHandedSystem,this.utilityLayerScene._allowPostProcessClearColor=!1,s.getEngine().scenes.pop(),this.utilityLayerScene.detachControl(),this._originalPointerObserver=s.onPrePointerObservable.add((function(e,t){if(a.processAllEvents||e.type===es.PointerEventTypes.POINTERMOVE||e.type===es.PointerEventTypes.POINTERUP||e.type===es.PointerEventTypes.POINTERDOWN){var i=e.event;if(s.isPointerCaptured(i.pointerId))a._pointerCaptures[i.pointerId]=!1;else{var r=e.ray?a.utilityLayerScene.pickWithRay(e.ray):a.utilityLayerScene.pick(s.pointerX,s.pointerY);if(!e.ray&&r&&(e.ray=r.ray),a.utilityLayerScene.onPrePointerObservable.notifyObservers(e),a.onlyCheckPointerDownEvents&&e.type!=es.PointerEventTypes.POINTERDOWN)return e.skipOnPointerObservable||a.utilityLayerScene.onPointerObservable.notifyObservers(new es.PointerInfo(e.type,e.event,r)),void(e.type===es.PointerEventTypes.POINTERUP&&a._pointerCaptures[i.pointerId]&&(a._pointerCaptures[i.pointerId]=!1));if(a.utilityLayerScene.autoClearDepthAndStencil)r&&r.hit&&(e.skipOnPointerObservable||a.utilityLayerScene.onPointerObservable.notifyObservers(new es.PointerInfo(e.type,e.event,r)),e.skipOnPointerObservable=!0);else{var n=e.ray?s.pickWithRay(e.ray):s.pick(s.pointerX,s.pointerY),o=e.event;n&&r&&(0===r.distance&&n.pickedMesh?a.mainSceneTrackerPredicate&&a.mainSceneTrackerPredicate(n.pickedMesh)?(a._notifyObservers(e,n,o),e.skipOnPointerObservable=!0):e.type===es.PointerEventTypes.POINTERDOWN?a._pointerCaptures[o.pointerId]=!0:a._lastPointerEvents[o.pointerId]&&(a.onPointerOutObservable.notifyObservers(o.pointerId),delete a._lastPointerEvents[o.pointerId]):!a._pointerCaptures[o.pointerId]&&(r.distance<n.distance||0===n.distance)?(a._notifyObservers(e,r,o),e.skipOnPointerObservable||(e.skipOnPointerObservable=0<r.distance)):!a._pointerCaptures[o.pointerId]&&r.distance>n.distance&&(a.mainSceneTrackerPredicate&&a.mainSceneTrackerPredicate(n.pickedMesh)?(a._notifyObservers(e,n,o),e.skipOnPointerObservable=!0):a._lastPointerEvents[o.pointerId]&&(a.onPointerOutObservable.notifyObservers(o.pointerId),delete a._lastPointerEvents[o.pointerId])),e.type===es.PointerEventTypes.POINTERUP&&a._pointerCaptures[o.pointerId]&&(a._pointerCaptures[o.pointerId]=!1))}}}})),this.utilityLayerScene.autoClear=!1,this._afterRenderObserver=this.originalScene.onAfterRenderObservable.add((function(){a.shouldRender&&a.render()})),this._sceneDisposeObserver=this.originalScene.onDisposeObservable.add((function(){a.dispose()})),this._updateCamera()}return Object.defineProperty(e,\"DefaultUtilityLayer\",{get:function(){return null==e._DefaultUtilityLayer&&(e._DefaultUtilityLayer=new e(es.Engine.LastCreatedScene)).originalScene.onDisposeObservable.addOnce((function(){e._DefaultUtilityLayer=null})),e._DefaultUtilityLayer},enumerable:!0,configurable:!0}),Object.defineProperty(e,\"DefaultKeepDepthUtilityLayer\",{get:function(){return null==e._DefaultKeepDepthUtilityLayer&&((e._DefaultKeepDepthUtilityLayer=new e(es.Engine.LastCreatedScene)).utilityLayerScene.autoClearDepthAndStencil=!1,e._DefaultKeepDepthUtilityLayer.originalScene.onDisposeObservable.addOnce((function(){e._DefaultKeepDepthUtilityLayer=null}))),e._DefaultKeepDepthUtilityLayer},enumerable:!0,configurable:!0}),e.prototype._notifyObservers=function(e,t,i){e.skipOnPointerObservable||(this.utilityLayerScene.onPointerObservable.notifyObservers(new es.PointerInfo(e.type,e.event,t)),this._lastPointerEvents[i.pointerId]=!0)},e.prototype.render=function(){if(this._updateCamera(),this.utilityLayerScene.activeCamera){var e=this.utilityLayerScene.activeCamera.getScene(),t=this.utilityLayerScene.activeCamera;t._scene=this.utilityLayerScene,t.leftCamera&&(t.leftCamera._scene=this.utilityLayerScene),t.rightCamera&&(t.rightCamera._scene=this.utilityLayerScene),this.utilityLayerScene.render(!1),t._scene=e,t.leftCamera&&(t.leftCamera._scene=e),t.rightCamera&&(t.rightCamera._scene=e)}},e.prototype.dispose=function(){this.onPointerOutObservable.clear(),this._afterRenderObserver&&this.originalScene.onAfterRenderObservable.remove(this._afterRenderObserver),this._sceneDisposeObserver&&this.originalScene.onDisposeObservable.remove(this._sceneDisposeObserver),this._originalPointerObserver&&this.originalScene.onPrePointerObservable.remove(this._originalPointerObserver),this.utilityLayerScene.dispose()},e.prototype._updateCamera=function(){this.utilityLayerScene.activeCamera=this.originalScene.activeCamera},e._DefaultUtilityLayer=null,e._DefaultKeepDepthUtilityLayer=null,e})(),es.UtilityLayerRenderer=ts,is=$a||($a={}),rs=(function(){function o(e){this.maxDragAngle=0,this._useAlternatePickedPointAboveMaxDragAngle=!1,this.currentDraggingPointerID=-1,this.dragging=!1,this.dragDeltaRatio=.2,this.updateDragPlane=!0,this._debugMode=!1,this._moving=!1,this.onDragObservable=new is.Observable,this.onDragStartObservable=new is.Observable,this.onDragEndObservable=new is.Observable,this.moveAttached=!0,this.enabled=!0,this.detachCameraControls=!0,this.useObjectOrienationForDragging=!0,this._tmpVector=new is.Vector3(0,0,0),this._alternatePickedPoint=new is.Vector3(0,0,0),this._worldDragAxis=new is.Vector3(0,0,0),this._targetPosition=new is.Vector3(0,0,0),this._attachedElement=null,this._startDragRay=new is.Ray(new is.Vector3,new is.Vector3),this._lastPointerRay={},this._dragDelta=new is.Vector3,this._pointA=new is.Vector3(0,0,0),this._pointB=new is.Vector3(0,0,0),this._pointC=new is.Vector3(0,0,0),this._lineA=new is.Vector3(0,0,0),this._lineB=new is.Vector3(0,0,0),this._localAxis=new is.Vector3(0,0,0),this._lookAt=new is.Vector3(0,0,0),this._options=e||{};var t=0;if(this._options.dragAxis&&t++,this._options.dragPlaneNormal&&t++,1<t)throw\"Multiple drag modes specified in dragBehavior options. Only one expected\"}return Object.defineProperty(o.prototype,\"name\",{get:function(){return\"PointerDrag\"},enumerable:!0,configurable:!0}),o.prototype.init=function(){},o.prototype.attach=function(e){var n=this;this._scene=e.getScene(),this._attachedNode=e,o._planeScene||(this._debugMode?o._planeScene=this._scene:((o._planeScene=new is.Scene(this._scene.getEngine())).detachControl(),this._scene.getEngine().scenes.pop(),this._scene.onDisposeObservable.addOnce((function(){o._planeScene.dispose(),o._planeScene=null})))),this._dragPlane=is.Mesh.CreatePlane(\"pointerDragPlane\",this._debugMode?1:1e4,o._planeScene,!1,is.Mesh.DOUBLESIDE),this.lastDragPosition=new is.Vector3(0,0,0);this._pointerObserver=this._scene.onPointerObservable.add((function(e,t){var i;if(n.enabled)if(e.type==is.PointerEventTypes.POINTERDOWN)!n.dragging&&e.pickInfo&&e.pickInfo.hit&&e.pickInfo.pickedMesh&&e.pickInfo.pickedPoint&&e.pickInfo.ray&&(i=e.pickInfo.pickedMesh,n._attachedNode==i||i.isDescendantOf(n._attachedNode))&&n._startDrag(e.event.pointerId,e.pickInfo.ray,e.pickInfo.pickedPoint);else if(e.type==is.PointerEventTypes.POINTERUP)n.currentDraggingPointerID==e.event.pointerId&&n.releaseDrag();else if(e.type==is.PointerEventTypes.POINTERMOVE){var r=e.event.pointerId;n.currentDraggingPointerID===o._AnyMouseID&&r!==o._AnyMouseID&&\"mouse\"==e.event.pointerType&&(n._lastPointerRay[n.currentDraggingPointerID]&&(n._lastPointerRay[r]=n._lastPointerRay[n.currentDraggingPointerID],delete n._lastPointerRay[n.currentDraggingPointerID]),n.currentDraggingPointerID=r),n._lastPointerRay[r]||(n._lastPointerRay[r]=new is.Ray(new is.Vector3,new is.Vector3)),e.pickInfo&&e.pickInfo.ray&&(n._lastPointerRay[r].origin.copyFrom(e.pickInfo.ray.origin),n._lastPointerRay[r].direction.copyFrom(e.pickInfo.ray.direction),n.currentDraggingPointerID==r&&n.dragging&&n._moveDrag(e.pickInfo.ray))}})),this._beforeRenderObserver=this._scene.onBeforeRenderObservable.add((function(){n._moving&&n.moveAttached&&(is.BoundingBoxGizmo._RemoveAndStorePivotPoint(n._attachedNode),n._targetPosition.subtractToRef(n._attachedNode.absolutePosition,n._tmpVector),n._tmpVector.scaleInPlace(n.dragDeltaRatio),n._attachedNode.getAbsolutePosition().addToRef(n._tmpVector,n._tmpVector),n._attachedNode.setAbsolutePosition(n._tmpVector),is.BoundingBoxGizmo._RestorePivotPoint(n._attachedNode))}))},o.prototype.releaseDrag=function(){this.dragging=!1,this.onDragEndObservable.notifyObservers({dragPlanePoint:this.lastDragPosition,pointerId:this.currentDraggingPointerID}),this.currentDraggingPointerID=-1,this._moving=!1,this.detachCameraControls&&this._attachedElement&&this._scene.activeCamera&&!this._scene.activeCamera.leftCamera&&this._scene.activeCamera.attachControl(this._attachedElement,!0)},o.prototype.startDrag=function(e,t,i){void 0===e&&(e=o._AnyMouseID),this._startDrag(e,t,i);var r=this._lastPointerRay[e];e===o._AnyMouseID&&(r=this._lastPointerRay[Object.keys(this._lastPointerRay)[0]]),r&&this._moveDrag(r)},o.prototype._startDrag=function(e,t,i){if(this._scene.activeCamera&&!this.dragging&&this._attachedNode){is.BoundingBoxGizmo._RemoveAndStorePivotPoint(this._attachedNode),t?(this._startDragRay.direction.copyFrom(t.direction),this._startDragRay.origin.copyFrom(t.origin)):(this._startDragRay.origin.copyFrom(this._scene.activeCamera.position),this._attachedNode.getWorldMatrix().getTranslationToRef(this._tmpVector),this._tmpVector.subtractToRef(this._scene.activeCamera.position,this._startDragRay.direction)),this._updateDragPlanePosition(this._startDragRay,i||this._tmpVector);var r=this._pickWithRayOnDragPlane(this._startDragRay);r&&(this.dragging=!0,this.currentDraggingPointerID=e,this.lastDragPosition.copyFrom(r),this.onDragStartObservable.notifyObservers({dragPlanePoint:r,pointerId:this.currentDraggingPointerID}),this._targetPosition.copyFrom(this._attachedNode.absolutePosition),this.detachCameraControls&&this._scene.activeCamera&&!this._scene.activeCamera.leftCamera&&(this._scene.activeCamera.inputs.attachedElement?(this._attachedElement=this._scene.activeCamera.inputs.attachedElement,this._scene.activeCamera.detachControl(this._scene.activeCamera.inputs.attachedElement)):this._attachedElement=null)),is.BoundingBoxGizmo._RestorePivotPoint(this._attachedNode)}},o.prototype._moveDrag=function(e){this._moving=!0;var t=this._pickWithRayOnDragPlane(e);if(t){this.updateDragPlane&&this._updateDragPlanePosition(e,t);var i=0;this._options.dragAxis?(is.Vector3.TransformCoordinatesToRef(this._options.dragAxis,this._attachedNode.getWorldMatrix().getRotationMatrix(),this._worldDragAxis),t.subtractToRef(this.lastDragPosition,this._tmpVector),i=is.Vector3.Dot(this._tmpVector,this._worldDragAxis),this._worldDragAxis.scaleToRef(i,this._dragDelta)):(i=this._dragDelta.length(),t.subtractToRef(this.lastDragPosition,this._dragDelta)),this._targetPosition.addInPlace(this._dragDelta),this.onDragObservable.notifyObservers({dragDistance:i,delta:this._dragDelta,dragPlanePoint:t,dragPlaneNormal:this._dragPlane.forward,pointerId:this.currentDraggingPointerID}),this.lastDragPosition.copyFrom(t)}},o.prototype._pickWithRayOnDragPlane=function(e){var t=this;if(!e)return null;var i=Math.acos(is.Vector3.Dot(this._dragPlane.forward,e.direction));if(i>Math.PI/2&&(i=Math.PI-i),0<this.maxDragAngle&&i>this.maxDragAngle){if(this._useAlternatePickedPointAboveMaxDragAngle){this._tmpVector.copyFrom(e.direction),this._attachedNode.absolutePosition.subtractToRef(e.origin,this._alternatePickedPoint),this._alternatePickedPoint.normalize(),this._alternatePickedPoint.scaleInPlace(-2*is.Vector3.Dot(this._alternatePickedPoint,this._tmpVector)),this._tmpVector.addInPlace(this._alternatePickedPoint);var r=is.Vector3.Dot(this._dragPlane.forward,this._tmpVector);return this._dragPlane.forward.scaleToRef(-r,this._alternatePickedPoint),this._alternatePickedPoint.addInPlace(this._tmpVector),this._alternatePickedPoint.addInPlace(this._attachedNode.absolutePosition),this._alternatePickedPoint}return null}var n=o._planeScene.pickWithRay(e,(function(e){return e==t._dragPlane}));return n&&n.hit&&n.pickedMesh&&n.pickedPoint?n.pickedPoint:null},o.prototype._updateDragPlanePosition=function(e,t){this._pointA.copyFrom(t),this._options.dragAxis?(this.useObjectOrienationForDragging?is.Vector3.TransformCoordinatesToRef(this._options.dragAxis,this._attachedNode.getWorldMatrix().getRotationMatrix(),this._localAxis):this._localAxis.copyFrom(this._options.dragAxis),this._pointA.addToRef(this._localAxis,this._pointB),e.origin.subtractToRef(this._pointA,this._pointC),this._pointA.addToRef(this._pointC.normalize(),this._pointC),this._pointB.subtractToRef(this._pointA,this._lineA),this._pointC.subtractToRef(this._pointA,this._lineB),is.Vector3.CrossToRef(this._lineA,this._lineB,this._lookAt),is.Vector3.CrossToRef(this._lineA,this._lookAt,this._lookAt),this._lookAt.normalize(),this._dragPlane.position.copyFrom(this._pointA),this._pointA.subtractToRef(this._lookAt,this._lookAt),this._dragPlane.lookAt(this._lookAt)):this._options.dragPlaneNormal?(this.useObjectOrienationForDragging?is.Vector3.TransformCoordinatesToRef(this._options.dragPlaneNormal,this._attachedNode.getWorldMatrix().getRotationMatrix(),this._localAxis):this._localAxis.copyFrom(this._options.dragPlaneNormal),this._dragPlane.position.copyFrom(this._pointA),this._pointA.subtractToRef(this._localAxis,this._lookAt),this._dragPlane.lookAt(this._lookAt)):(this._dragPlane.position.copyFrom(this._pointA),this._dragPlane.lookAt(e.origin)),this._dragPlane.computeWorldMatrix(!0)},o.prototype.detach=function(){this._pointerObserver&&this._scene.onPointerObservable.remove(this._pointerObserver),this._beforeRenderObserver&&this._scene.onBeforeRenderObservable.remove(this._beforeRenderObserver)},o._AnyMouseID=-2,o})(),is.PointerDragBehavior=rs,ns=$a||($a={}),os=(function(){function e(){this._startDistance=0,this._initialScale=new ns.Vector3(0,0,0),this._targetScale=new ns.Vector3(0,0,0),this._sceneRenderObserver=null,this._dragBehaviorA=new ns.PointerDragBehavior({}),this._dragBehaviorA.moveAttached=!1,this._dragBehaviorB=new ns.PointerDragBehavior({}),this._dragBehaviorB.moveAttached=!1}return Object.defineProperty(e.prototype,\"name\",{get:function(){return\"MultiPointerScale\"},enumerable:!0,configurable:!0}),e.prototype.init=function(){},e.prototype._getCurrentDistance=function(){return this._dragBehaviorA.lastDragPosition.subtract(this._dragBehaviorB.lastDragPosition).length()},e.prototype.attach=function(t){var i=this;this._ownerNode=t,this._dragBehaviorA.onDragStartObservable.add((function(e){i._dragBehaviorA.dragging&&i._dragBehaviorB.dragging&&(i._dragBehaviorA.currentDraggingPointerID==i._dragBehaviorB.currentDraggingPointerID?i._dragBehaviorA.releaseDrag():(i._initialScale.copyFrom(t.scaling),i._startDistance=i._getCurrentDistance()))})),this._dragBehaviorB.onDragStartObservable.add((function(e){i._dragBehaviorA.dragging&&i._dragBehaviorB.dragging&&(i._dragBehaviorA.currentDraggingPointerID==i._dragBehaviorB.currentDraggingPointerID?i._dragBehaviorB.releaseDrag():(i._initialScale.copyFrom(t.scaling),i._startDistance=i._getCurrentDistance()))})),[this._dragBehaviorA,this._dragBehaviorB].forEach((function(e){e.onDragObservable.add((function(){if(i._dragBehaviorA.dragging&&i._dragBehaviorB.dragging){var e=i._getCurrentDistance()/i._startDistance;i._initialScale.scaleToRef(e,i._targetScale)}}))})),t.addBehavior(this._dragBehaviorA),t.addBehavior(this._dragBehaviorB),this._sceneRenderObserver=t.getScene().onBeforeRenderObservable.add((function(){if(i._dragBehaviorA.dragging&&i._dragBehaviorB.dragging){var e=i._targetScale.subtract(t.scaling).scaleInPlace(.1);.01<e.length()&&t.scaling.addInPlace(e)}}))},e.prototype.detach=function(){var t=this;this._ownerNode.getScene().onBeforeRenderObservable.remove(this._sceneRenderObserver),[this._dragBehaviorA,this._dragBehaviorB].forEach((function(e){e.onDragStartObservable.clear(),e.onDragObservable.clear(),t._ownerNode.removeBehavior(e)}))},e})(),ns.MultiPointerScaleBehavior=os,ss=$a||($a={}),as=(function(){function i(){this._sceneRenderObserver=null,this._targetPosition=new ss.Vector3(0,0,0),this._moving=!1,this._startingOrientation=new ss.Quaternion,this.zDragFactor=3,this.dragging=!1,this.dragDeltaRatio=.2,this.currentDraggingPointerID=-1,this.detachCameraControls=!0,this.onDragStartObservable=new ss.Observable,this.onDragEndObservable=new ss.Observable}return Object.defineProperty(i.prototype,\"name\",{get:function(){return\"SixDofDrag\"},enumerable:!0,configurable:!0}),i.prototype.init=function(){},i.prototype.attach=function(e){var a=this;this._ownerNode=e,this._scene=this._ownerNode.getScene(),i._virtualScene||((i._virtualScene=new ss.Scene(this._scene.getEngine())).detachControl(),this._scene.getEngine().scenes.pop());var l=null,c=new ss.Vector3(0,0,0);this._virtualOriginMesh=new ss.AbstractMesh(\"\",i._virtualScene),this._virtualOriginMesh.rotationQuaternion=new ss.Quaternion,this._virtualDragMesh=new ss.AbstractMesh(\"\",i._virtualScene),this._virtualDragMesh.rotationQuaternion=new ss.Quaternion;var h=null;this._pointerObserver=this._scene.onPointerObservable.add((function(e,t){if(e.type==ss.PointerEventTypes.POINTERDOWN){if(!a.dragging&&e.pickInfo&&e.pickInfo.hit&&e.pickInfo.pickedMesh&&e.pickInfo.ray&&(s=e.pickInfo.pickedMesh,a._ownerNode==s||s.isDescendantOf(a._ownerNode))){a._scene.activeCamera&&a._scene.activeCamera.cameraRigMode==ss.Camera.RIG_MODE_NONE&&e.pickInfo.ray.origin.copyFrom(a._scene.activeCamera.position),l=a._ownerNode,ss.BoundingBoxGizmo._RemoveAndStorePivotPoint(l),c.copyFrom(e.pickInfo.ray.origin),a._virtualOriginMesh.position.copyFrom(e.pickInfo.ray.origin),a._virtualOriginMesh.lookAt(e.pickInfo.ray.origin.subtract(e.pickInfo.ray.direction)),a._virtualOriginMesh.removeChild(a._virtualDragMesh),l.computeWorldMatrix(),a._virtualDragMesh.position.copyFrom(l.absolutePosition),l.rotationQuaternion||(l.rotationQuaternion=ss.Quaternion.RotationYawPitchRoll(l.rotation.y,l.rotation.x,l.rotation.z));var i=l.parent;l.setParent(null),a._virtualDragMesh.rotationQuaternion.copyFrom(l.rotationQuaternion),l.setParent(i),a._virtualOriginMesh.addChild(a._virtualDragMesh),a._targetPosition.copyFrom(a._virtualDragMesh.absolutePosition),a.dragging=!0,a.currentDraggingPointerID=e.event.pointerId,a.detachCameraControls&&a._scene.activeCamera&&!a._scene.activeCamera.leftCamera&&(a._scene.activeCamera.inputs.attachedElement?(h=a._scene.activeCamera.inputs.attachedElement,a._scene.activeCamera.detachControl(a._scene.activeCamera.inputs.attachedElement)):h=null),ss.BoundingBoxGizmo._RestorePivotPoint(l),a.onDragStartObservable.notifyObservers({})}}else if(e.type==ss.PointerEventTypes.POINTERUP)a.currentDraggingPointerID==e.event.pointerId&&(a.dragging=!1,a._moving=!1,a.currentDraggingPointerID=-1,l=null,a._virtualOriginMesh.removeChild(a._virtualDragMesh),a.detachCameraControls&&h&&a._scene.activeCamera&&!a._scene.activeCamera.leftCamera&&a._scene.activeCamera.attachControl(h,!0),a.onDragEndObservable.notifyObservers({}));else if(e.type==ss.PointerEventTypes.POINTERMOVE&&a.currentDraggingPointerID==e.event.pointerId&&a.dragging&&e.pickInfo&&e.pickInfo.ray&&l){var r=a.zDragFactor;a._scene.activeCamera&&a._scene.activeCamera.cameraRigMode==ss.Camera.RIG_MODE_NONE&&(e.pickInfo.ray.origin.copyFrom(a._scene.activeCamera.position),r=0);var n=e.pickInfo.ray.origin.subtract(c);c.copyFrom(e.pickInfo.ray.origin);var o=-ss.Vector3.Dot(n,e.pickInfo.ray.direction);a._virtualOriginMesh.addChild(a._virtualDragMesh),a._virtualDragMesh.position.z-=a._virtualDragMesh.position.z<1?o*a.zDragFactor:o*r*a._virtualDragMesh.position.z,a._virtualDragMesh.position.z<0&&(a._virtualDragMesh.position.z=0),a._virtualOriginMesh.position.copyFrom(e.pickInfo.ray.origin),a._virtualOriginMesh.lookAt(e.pickInfo.ray.origin.subtract(e.pickInfo.ray.direction)),a._virtualOriginMesh.removeChild(a._virtualDragMesh),a._targetPosition.copyFrom(a._virtualDragMesh.absolutePosition),l.parent&&ss.Vector3.TransformCoordinatesToRef(a._targetPosition,ss.Matrix.Invert(l.parent.getWorldMatrix()),a._targetPosition),a._moving||a._startingOrientation.copyFrom(a._virtualDragMesh.rotationQuaternion),a._moving=!0}var s}));var t=new ss.Quaternion;this._sceneRenderObserver=e.getScene().onBeforeRenderObservable.add((function(){if(a.dragging&&a._moving&&l){ss.BoundingBoxGizmo._RemoveAndStorePivotPoint(l),l.position.addInPlace(a._targetPosition.subtract(l.position).scale(a.dragDeltaRatio)),t.copyFrom(a._startingOrientation),t.x=-t.x,t.y=-t.y,t.z=-t.z,a._virtualDragMesh.rotationQuaternion.multiplyToRef(t,t),ss.Quaternion.RotationYawPitchRollToRef(t.toEulerAngles(\"xyz\").y,0,0,t),t.multiplyToRef(a._startingOrientation,t);var e=l.parent;l.setParent(null),ss.Quaternion.SlerpToRef(l.rotationQuaternion,t,a.dragDeltaRatio,l.rotationQuaternion),l.setParent(e),ss.BoundingBoxGizmo._RestorePivotPoint(l)}}))},i.prototype.detach=function(){this._scene&&this._scene.onPointerObservable.remove(this._pointerObserver),this._ownerNode&&this._ownerNode.getScene().onBeforeRenderObservable.remove(this._sceneRenderObserver),this._virtualOriginMesh&&this._virtualOriginMesh.dispose(),this._virtualDragMesh&&this._virtualDragMesh.dispose(),this.onDragEndObservable.clear(),this.onDragStartObservable.clear()},i})(),ss.SixDofDragBehavior=as,ls=$a||($a={}),cs=function(e,t,i,r){void 0===t&&(t=new ls.Vector3),void 0===i&&(i=0),void 0===r&&(r=!1),this.direction=e,this.rotatedDirection=t,this.diff=i,this.ignore=r},hs=(function(){function e(e){this.ui=e,this.name=\"AttachToBoxBehavior\",this.distanceAwayFromFace=.15,this.distanceAwayFromBottomOfFace=.15,this._faceVectors=[new cs(ls.Vector3.Up()),new cs(ls.Vector3.Down()),new cs(ls.Vector3.Left()),new cs(ls.Vector3.Right()),new cs(ls.Vector3.Forward()),new cs(ls.Vector3.Forward().scaleInPlace(-1))],this._tmpMatrix=new ls.Matrix,this._tmpVector=new ls.Vector3,this._zeroVector=ls.Vector3.Zero(),this._lookAtTmpMatrix=new ls.Matrix}return e.prototype.init=function(){},e.prototype._closestFace=function(t){var i=this;return this._faceVectors.forEach((function(e){i._target.rotationQuaternion||(i._target.rotationQuaternion=ls.Quaternion.RotationYawPitchRoll(i._target.rotation.y,i._target.rotation.x,i._target.rotation.z)),i._target.rotationQuaternion.toRotationMatrix(i._tmpMatrix),ls.Vector3.TransformCoordinatesToRef(e.direction,i._tmpMatrix,e.rotatedDirection),e.diff=ls.Vector3.GetAngleBetweenVectors(e.rotatedDirection,t,ls.Vector3.Cross(e.rotatedDirection,t))})),this._faceVectors.reduce((function(e,t){return e.ignore?t:t.ignore?e:e.diff<t.diff?e:t}),this._faceVectors[0])},e.prototype._lookAtToRef=function(e,t,i){void 0===t&&(t=new ls.Vector3(0,1,0)),ls.Matrix.LookAtLHToRef(this._zeroVector,e,t,this._lookAtTmpMatrix),this._lookAtTmpMatrix.invert(),ls.Quaternion.FromRotationMatrixToRef(this._lookAtTmpMatrix,i)},e.prototype.attach=function(r){var n=this;this._target=r,this._scene=this._target.getScene(),this._onRenderObserver=this._scene.onBeforeRenderObservable.add((function(){if(n._scene.activeCamera){var e=n._scene.activeCamera.position;n._scene.activeCamera.devicePosition&&(e=n._scene.activeCamera.devicePosition);var t=n._closestFace(e.subtract(r.position));n._scene.activeCamera.leftCamera?n._scene.activeCamera.leftCamera.computeWorldMatrix().getRotationMatrixToRef(n._tmpMatrix):n._scene.activeCamera.computeWorldMatrix().getRotationMatrixToRef(n._tmpMatrix),ls.Vector3.TransformCoordinatesToRef(ls.Vector3.Up(),n._tmpMatrix,n._tmpVector),n._faceVectors.forEach((function(e){t.direction.x&&e.direction.x&&(e.ignore=!0),t.direction.y&&e.direction.y&&(e.ignore=!0),t.direction.z&&e.direction.z&&(e.ignore=!0)}));var i=n._closestFace(n._tmpVector);n._faceVectors.forEach((function(e){e.ignore=!1})),n.ui.position.copyFrom(r.position),t.direction.x&&(t.rotatedDirection.scaleToRef(r.scaling.x/2+n.distanceAwayFromFace,n._tmpVector),n.ui.position.addInPlace(n._tmpVector)),t.direction.y&&(t.rotatedDirection.scaleToRef(r.scaling.y/2+n.distanceAwayFromFace,n._tmpVector),n.ui.position.addInPlace(n._tmpVector)),t.direction.z&&(t.rotatedDirection.scaleToRef(r.scaling.z/2+n.distanceAwayFromFace,n._tmpVector),n.ui.position.addInPlace(n._tmpVector)),n.ui.rotationQuaternion||(n.ui.rotationQuaternion=ls.Quaternion.RotationYawPitchRoll(n.ui.rotation.y,n.ui.rotation.x,n.ui.rotation.z)),t.rotatedDirection.scaleToRef(-1,n._tmpVector),n._lookAtToRef(n._tmpVector,i.rotatedDirection,n.ui.rotationQuaternion),i.direction.x&&n.ui.up.scaleToRef(n.distanceAwayFromBottomOfFace-r.scaling.x/2,n._tmpVector),i.direction.y&&n.ui.up.scaleToRef(n.distanceAwayFromBottomOfFace-r.scaling.y/2,n._tmpVector),i.direction.z&&n.ui.up.scaleToRef(n.distanceAwayFromBottomOfFace-r.scaling.z/2,n._tmpVector),n.ui.position.addInPlace(n._tmpVector)}}))},e.prototype.detach=function(){this._scene.onBeforeRenderObservable.remove(this._onRenderObserver)},e})(),ls.AttachToBoxBehavior=hs,us=$a||($a={}),ds=(function(){function e(){var e=this;this.delay=0,this.fadeInTime=300,this._millisecondsPerFrame=1e3/60,this._hovered=!1,this._hoverValue=0,this._ownerNode=null,this._update=function(){if(e._ownerNode){if(e._hoverValue+=e._hovered?e._millisecondsPerFrame:-e._millisecondsPerFrame,e._setAllVisibility(e._ownerNode,(e._hoverValue-e.delay)/e.fadeInTime),1<e._ownerNode.visibility)return e._setAllVisibility(e._ownerNode,1),void(e._hoverValue=e.fadeInTime+e.delay);if(e._ownerNode.visibility<0&&(e._setAllVisibility(e._ownerNode,0),e._hoverValue<0))return void(e._hoverValue=0);setTimeout(e._update,e._millisecondsPerFrame)}}}return Object.defineProperty(e.prototype,\"name\",{get:function(){return\"FadeInOut\"},enumerable:!0,configurable:!0}),e.prototype.init=function(){},e.prototype.attach=function(e){this._ownerNode=e,this._setAllVisibility(this._ownerNode,0)},e.prototype.detach=function(){this._ownerNode=null},e.prototype.fadeIn=function(e){this._hovered=e,this._update()},e.prototype._setAllVisibility=function(e,t){var i=this;e.visibility=t,e.getChildMeshes().forEach((function(e){i._setAllVisibility(e,t)}))},e})(),us.FadeInOutBehavior=ds,fs=$a||($a={}),ps=(function(){function e(e){void 0===e&&(e=fs.UtilityLayerRenderer.DefaultUtilityLayer);var t=this;this.gizmoLayer=e,this.scaleRatio=1,this._tmpMatrix=new fs.Matrix,this._customMeshSet=!1,this.updateGizmoRotationToMatchAttachedMesh=!0,this.updateGizmoPositionToMatchAttachedMesh=!0,this._updateScale=!0,this._interactionsEnabled=!0,this._tempVector=new fs.Vector3,this._rootMesh=new fs.Mesh(\"gizmoRootNode\",e.utilityLayerScene),this._beforeRenderObserver=this.gizmoLayer.utilityLayerScene.onBeforeRenderObservable.add((function(){t._update()})),this.attachedMesh=null}return Object.defineProperty(e.prototype,\"attachedMesh\",{get:function(){return this._attachedMesh},set:function(e){this._attachedMesh=e,this._rootMesh.setEnabled(!!e),this._attachedMeshChanged(e)},enumerable:!0,configurable:!0}),e.prototype.setCustomMesh=function(e){if(e.getScene()!=this.gizmoLayer.utilityLayerScene)throw\"When setting a custom mesh on a gizmo, the custom meshes scene must be the same as the gizmos (eg. gizmo.gizmoLayer.utilityLayerScene)\";this._rootMesh.getChildMeshes().forEach((function(e){e.dispose()})),e.parent=this._rootMesh,this._customMeshSet=!0},e.prototype._attachedMeshChanged=function(e){},e.prototype._update=function(){if(this.attachedMesh&&(this.updateGizmoRotationToMatchAttachedMesh?(this._rootMesh.rotationQuaternion||(this._rootMesh.rotationQuaternion=fs.Quaternion.RotationYawPitchRoll(this._rootMesh.rotation.y,this._rootMesh.rotation.x,this._rootMesh.rotation.z)),this._tempVector.copyFrom(this.attachedMesh.scaling),this.attachedMesh.scaling.x<0&&(this.attachedMesh.scaling.x*=-1),this.attachedMesh.scaling.y<0&&(this.attachedMesh.scaling.y*=-1),this.attachedMesh.scaling.z<0&&(this.attachedMesh.scaling.z*=-1),this.attachedMesh.computeWorldMatrix().getRotationMatrixToRef(this._tmpMatrix),this.attachedMesh.scaling.copyFrom(this._tempVector),this.attachedMesh.computeWorldMatrix(),fs.Quaternion.FromRotationMatrixToRef(this._tmpMatrix,this._rootMesh.rotationQuaternion)):this._rootMesh.rotationQuaternion&&this._rootMesh.rotationQuaternion.set(0,0,0,1),this.updateGizmoPositionToMatchAttachedMesh&&this._rootMesh.position.copyFrom(this.attachedMesh.absolutePosition),this._updateScale&&this.gizmoLayer.utilityLayerScene.activeCamera&&this.attachedMesh)){var e=this.gizmoLayer.utilityLayerScene.activeCamera.position;this.gizmoLayer.utilityLayerScene.activeCamera.devicePosition&&(e=this.gizmoLayer.utilityLayerScene.activeCamera.devicePosition),this._rootMesh.position.subtractToRef(e,this._tempVector);var t=this._tempVector.length()*this.scaleRatio;this._rootMesh.scaling.set(t,t,t)}},e.prototype.dispose=function(){this._rootMesh.dispose(),this._beforeRenderObserver&&this.gizmoLayer.utilityLayerScene.onBeforeRenderObservable.remove(this._beforeRenderObserver)},e})(),fs.Gizmo=ps,_s=$a||($a={}),ms=(function(p){function e(e,t,i){void 0===t&&(t=_s.Color3.Gray()),void 0===i&&(i=_s.UtilityLayerRenderer.DefaultUtilityLayer);var r=p.call(this,i)||this;r._pointerObserver=null,r.snapDistance=0,r.onSnapObservable=new _s.Observable;var n=new _s.StandardMaterial(\"\",i.utilityLayerScene);n.disableLighting=!0,n.emissiveColor=t;var o=new _s.StandardMaterial(\"\",i.utilityLayerScene);o.disableLighting=!0,o.emissiveColor=t.add(new _s.Color3(.3,.3,.3));var s=new _s.AbstractMesh(\"\",i.utilityLayerScene),a=_s.MeshBuilder.CreateCylinder(\"yPosMesh\",{diameterTop:0,height:1.5,diameterBottom:.75,tessellation:96},i.utilityLayerScene),l=_s.MeshBuilder.CreateLines(\"yPosMesh\",{points:[new _s.Vector3(0,0,0),new _s.Vector3(0,1.1,0)]},i.utilityLayerScene);l.color=n.emissiveColor,s.addChild(a),s.addChild(l),a.scaling.scaleInPlace(.05),a.material=n,a.rotation.x=Math.PI/2,a.position.z+=.3,l.scaling.scaleInPlace(.26),l.rotation.x=Math.PI/2,l.material=n,s.lookAt(r._rootMesh.position.subtract(e)),s.scaling.scaleInPlace(1/3),r._rootMesh.addChild(s);var c=0,h=new _s.Vector3,u={snapDistance:0};r.dragBehavior=new _s.PointerDragBehavior({dragAxis:e}),r.dragBehavior.moveAttached=!1,r._rootMesh.addBehavior(r.dragBehavior);var d=new _s.Vector3,f=new _s.Matrix;return r.dragBehavior.onDragObservable.add((function(e){if(r.attachedMesh)if(r.attachedMesh.parent?(r.attachedMesh.parent.computeWorldMatrix().invertToRef(f),f.setTranslationFromFloats(0,0,0),_s.Vector3.TransformCoordinatesToRef(e.delta,f,d)):d.copyFrom(e.delta),0==r.snapDistance)r.attachedMesh.position.addInPlace(d);else if(c+=e.dragDistance,Math.abs(c)>r.snapDistance){var t=Math.floor(Math.abs(c)/r.snapDistance);c%=r.snapDistance,d.normalizeToRef(h),h.scaleInPlace(r.snapDistance*t),r.attachedMesh.position.addInPlace(h),u.snapDistance=r.snapDistance*t,r.onSnapObservable.notifyObservers(u)}})),r._pointerObserver=i.utilityLayerScene.onPointerObservable.add((function(e,t){if(!r._customMeshSet){var i=e.pickInfo&&-1!=r._rootMesh.getChildMeshes().indexOf(e.pickInfo.pickedMesh)?o:n;r._rootMesh.getChildMeshes().forEach((function(e){e.material=i,e.color&&(e.color=i.emissiveColor)}))}})),r}return T(e,p),e.prototype._attachedMeshChanged=function(e){this.dragBehavior&&(this.dragBehavior.enabled=!!e)},e.prototype.dispose=function(){this.onSnapObservable.clear(),this.gizmoLayer.utilityLayerScene.onPointerObservable.remove(this._pointerObserver),this.dragBehavior.detach(),p.prototype.dispose.call(this)},e})(_s.Gizmo),_s.AxisDragGizmo=ms,gs=$a||($a={}),vs=(function(u){function e(r,e,t){void 0===e&&(e=gs.Color3.Gray()),void 0===t&&(t=gs.UtilityLayerRenderer.DefaultUtilityLayer);var n=u.call(this,t)||this;n._pointerObserver=null,n.snapDistance=0,n.onSnapObservable=new gs.Observable,n.uniformScaling=!1,n._coloredMaterial=new gs.StandardMaterial(\"\",t.utilityLayerScene),n._coloredMaterial.disableLighting=!0,n._coloredMaterial.emissiveColor=e;var o=new gs.StandardMaterial(\"\",t.utilityLayerScene);o.disableLighting=!0,o.emissiveColor=e.add(new gs.Color3(.3,.3,.3));var i=new gs.AbstractMesh(\"\",t.utilityLayerScene),s=gs.MeshBuilder.CreateBox(\"yPosMesh\",{size:.4},t.utilityLayerScene),a=gs.MeshBuilder.CreateLines(\"yPosMesh\",{points:[new gs.Vector3(0,0,0),new gs.Vector3(0,1.1,0)]},t.utilityLayerScene);a.color=n._coloredMaterial.emissiveColor,i.addChild(s),i.addChild(a),s.scaling.scaleInPlace(.1),s.material=n._coloredMaterial,s.rotation.x=Math.PI/2,s.position.z+=.3,a.scaling.scaleInPlace(.26),a.rotation.x=Math.PI/2,a.material=n._coloredMaterial,i.lookAt(n._rootMesh.position.subtract(r)),n._rootMesh.addChild(i),i.scaling.scaleInPlace(1/3),n.dragBehavior=new gs.PointerDragBehavior({dragAxis:r}),n.dragBehavior.moveAttached=!1,n._rootMesh.addBehavior(n.dragBehavior);var l=0,c=new gs.Vector3,h={snapDistance:0};return n.dragBehavior.onDragObservable.add((function(e){if(n.attachedMesh){var t=!1,i=0;n.uniformScaling?(n.attachedMesh.scaling.normalizeToRef(c),c.y<0&&c.scaleInPlace(-1)):c.copyFrom(r),0==n.snapDistance?c.scaleToRef(e.dragDistance,c):(l+=e.dragDistance,Math.abs(l)>n.snapDistance?(i=Math.floor(l/n.snapDistance),l%=n.snapDistance,c.scaleToRef(n.snapDistance*i,c),t=!0):c.scaleInPlace(0)),n.attachedMesh.scaling.addInPlace(c),t&&(h.snapDistance=n.snapDistance*i,n.onSnapObservable.notifyObservers(h))}})),n._pointerObserver=t.utilityLayerScene.onPointerObservable.add((function(e,t){if(!n._customMeshSet){var i=e.pickInfo&&-1!=n._rootMesh.getChildMeshes().indexOf(e.pickInfo.pickedMesh)?o:n._coloredMaterial;n._rootMesh.getChildMeshes().forEach((function(e){e.material=i,e.color&&(e.color=i.emissiveColor)}))}})),n}return T(e,u),e.prototype._attachedMeshChanged=function(e){this.dragBehavior&&(this.dragBehavior.enabled=!!e)},e.prototype.dispose=function(){this.onSnapObservable.clear(),this.gizmoLayer.utilityLayerScene.onPointerObservable.remove(this._pointerObserver),this.dragBehavior.detach(),u.prototype.dispose.call(this)},e.prototype.setCustomMesh=function(e,t){var i=this;void 0===t&&(t=!1),u.prototype.setCustomMesh.call(this,e),t&&(this._rootMesh.getChildMeshes().forEach((function(e){e.material=i._coloredMaterial,e.color&&(e.color=i._coloredMaterial.emissiveColor)})),this._customMeshSet=!1)},e})(gs.Gizmo),gs.AxisScaleGizmo=vs,ys=$a||($a={}),bs=(function(c){function e(h,e,u,t){void 0===e&&(e=ys.Color3.Gray()),void 0===u&&(u=ys.UtilityLayerRenderer.DefaultUtilityLayer),void 0===t&&(t=32);var d=c.call(this,u)||this;d._pointerObserver=null,d.snapDistance=0,d.onSnapObservable=new ys.Observable;var r=new ys.StandardMaterial(\"\",u.utilityLayerScene);r.disableLighting=!0,r.emissiveColor=e;var n=new ys.StandardMaterial(\"\",u.utilityLayerScene);n.disableLighting=!0,n.emissiveColor=e.add(new ys.Color3(.3,.3,.3));for(var i=new ys.AbstractMesh(\"\",u.utilityLayerScene),o=new Array,s=0;s<t;s++){var a=2*Math.PI*(s/(t-1));o.push(new ys.Vector3(.8*Math.sin(a),0,.8*Math.cos(a)))}var l=ys.Mesh.CreateLines(\"\",o,u.utilityLayerScene);l.color=r.emissiveColor,l.scaling.scaleInPlace(.26),l.material=r,l.rotation.x=Math.PI/2,i.addChild(l),i.lookAt(d._rootMesh.position.subtract(h)),d._rootMesh.addChild(i),i.scaling.scaleInPlace(1/3),d.dragBehavior=new ys.PointerDragBehavior({dragPlaneNormal:h}),d.dragBehavior.moveAttached=!1,d.dragBehavior.maxDragAngle=9*Math.PI/20,d.dragBehavior._useAlternatePickedPointAboveMaxDragAngle=!0,d._rootMesh.addBehavior(d.dragBehavior);var f=new ys.Vector3;d.dragBehavior.onDragStartObservable.add((function(e){d.attachedMesh&&f.copyFrom(e.dragPlanePoint)}));var p=new ys.Matrix,_=new ys.Vector3,m=new ys.Vector3,g={snapDistance:0},v=0,y=new ys.Matrix,b=new ys.Vector3,T=new ys.Quaternion;return d.dragBehavior.onDragObservable.add((function(e){if(d.attachedMesh){d.attachedMesh.rotationQuaternion||(d.attachedMesh.rotationQuaternion=ys.Quaternion.RotationYawPitchRoll(d.attachedMesh.rotation.y,d.attachedMesh.rotation.x,d.attachedMesh.rotation.z));var t=e.dragPlanePoint.subtract(d.attachedMesh.absolutePosition).normalize(),i=f.subtract(d.attachedMesh.absolutePosition).normalize(),r=ys.Vector3.Cross(t,i),n=ys.Vector3.Dot(t,i),o=Math.atan2(r.length(),n);if(_.copyFrom(h),m.copyFrom(h),d.updateGizmoRotationToMatchAttachedMesh&&(d.attachedMesh.rotationQuaternion.toRotationMatrix(p),m=ys.Vector3.TransformCoordinates(_,p)),u.utilityLayerScene.activeCamera){var s=u.utilityLayerScene.activeCamera.position.subtract(d.attachedMesh.position);0<ys.Vector3.Dot(s,m)&&(_.scaleInPlace(-1),m.scaleInPlace(-1))}0<ys.Vector3.Dot(m,r)&&(o=-o);var a=!1;if(0!=d.snapDistance)if(v+=o,Math.abs(v)>d.snapDistance){var l=Math.floor(v/d.snapDistance);v%=d.snapDistance,o=d.snapDistance*l,a=!0}else o=0;y.reset(),d.attachedMesh.parent&&(d.attachedMesh.parent.computeWorldMatrix().invertToRef(y),y.getRotationMatrixToRef(y),ys.Vector3.TransformCoordinatesToRef(_,y,_));var c=Math.sin(o/2);T.set(_.x*c,_.y*c,_.z*c,Math.cos(o/2)),0<y.determinant()&&(T.toEulerAnglesToRef(b),ys.Quaternion.RotationYawPitchRollToRef(b.y,-b.x,-b.z,T)),d.updateGizmoRotationToMatchAttachedMesh?d.attachedMesh.rotationQuaternion.multiplyToRef(T,d.attachedMesh.rotationQuaternion):T.multiplyToRef(d.attachedMesh.rotationQuaternion,d.attachedMesh.rotationQuaternion),f.copyFrom(e.dragPlanePoint),a&&(g.snapDistance=o,d.onSnapObservable.notifyObservers(g))}})),d._pointerObserver=u.utilityLayerScene.onPointerObservable.add((function(e,t){if(!d._customMeshSet){var i=e.pickInfo&&-1!=d._rootMesh.getChildMeshes().indexOf(e.pickInfo.pickedMesh)?n:r;d._rootMesh.getChildMeshes().forEach((function(e){e.material=i,e.color&&(e.color=i.emissiveColor)}))}})),d}return T(e,c),e.prototype._attachedMeshChanged=function(e){this.dragBehavior&&(this.dragBehavior.enabled=!!e)},e.prototype.dispose=function(){this.onSnapObservable.clear(),this.gizmoLayer.utilityLayerScene.onPointerObservable.remove(this._pointerObserver),this.dragBehavior.detach(),c.prototype.dispose.call(this)},e})(ys.Gizmo),ys.PlaneRotationGizmo=bs,Ts=$a||($a={}),Es=(function(i){function e(e){void 0===e&&(e=Ts.UtilityLayerRenderer.DefaultUtilityLayer);var t=i.call(this,e)||this;return t.onDragStartObservable=new Ts.Observable,t.onDragEndObservable=new Ts.Observable,t.xGizmo=new Ts.AxisDragGizmo(new Ts.Vector3(1,0,0),Ts.Color3.Red().scale(.5),e),t.yGizmo=new Ts.AxisDragGizmo(new Ts.Vector3(0,1,0),Ts.Color3.Green().scale(.5),e),t.zGizmo=new Ts.AxisDragGizmo(new Ts.Vector3(0,0,1),Ts.Color3.Blue().scale(.5),e),[t.xGizmo,t.yGizmo,t.zGizmo].forEach((function(e){e.dragBehavior.onDragStartObservable.add((function(){t.onDragStartObservable.notifyObservers({})})),e.dragBehavior.onDragEndObservable.add((function(){t.onDragEndObservable.notifyObservers({})}))})),t.attachedMesh=null,t}return T(e,i),Object.defineProperty(e.prototype,\"attachedMesh\",{set:function(e){this.xGizmo&&(this.xGizmo.attachedMesh=e,this.yGizmo.attachedMesh=e,this.zGizmo.attachedMesh=e)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,\"updateGizmoRotationToMatchAttachedMesh\",{get:function(){return this.xGizmo.updateGizmoRotationToMatchAttachedMesh},set:function(e){this.xGizmo&&(this.xGizmo.updateGizmoRotationToMatchAttachedMesh=e,this.yGizmo.updateGizmoRotationToMatchAttachedMesh=e,this.zGizmo.updateGizmoRotationToMatchAttachedMesh=e)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,\"snapDistance\",{get:function(){return this.xGizmo.snapDistance},set:function(e){this.xGizmo&&(this.xGizmo.snapDistance=e,this.yGizmo.snapDistance=e,this.zGizmo.snapDistance=e)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,\"scaleRatio\",{get:function(){return this.xGizmo.scaleRatio},set:function(e){this.xGizmo&&(this.xGizmo.scaleRatio=e,this.yGizmo.scaleRatio=e,this.zGizmo.scaleRatio=e)},enumerable:!0,configurable:!0}),e.prototype.dispose=function(){this.xGizmo.dispose(),this.yGizmo.dispose(),this.zGizmo.dispose(),this.onDragStartObservable.clear(),this.onDragEndObservable.clear()},e.prototype.setCustomMesh=function(e){Ts.Tools.Error(\"Custom meshes are not supported on this gizmo, please set the custom meshes on the gizmos contained within this one (gizmo.xGizmo, gizmo.yGizmo, gizmo.zGizmo)\")},e})(Ts.Gizmo),Ts.PositionGizmo=Es,xs=$a||($a={}),Ps=(function(r){function e(e,t){void 0===e&&(e=xs.UtilityLayerRenderer.DefaultUtilityLayer),void 0===t&&(t=32);var i=r.call(this,e)||this;return i.onDragStartObservable=new xs.Observable,i.onDragEndObservable=new xs.Observable,i.xGizmo=new xs.PlaneRotationGizmo(new xs.Vector3(1,0,0),xs.Color3.Red().scale(.5),e,t),i.yGizmo=new xs.PlaneRotationGizmo(new xs.Vector3(0,1,0),xs.Color3.Green().scale(.5),e,t),i.zGizmo=new xs.PlaneRotationGizmo(new xs.Vector3(0,0,1),xs.Color3.Blue().scale(.5),e,t),[i.xGizmo,i.yGizmo,i.zGizmo].forEach((function(e){e.dragBehavior.onDragStartObservable.add((function(){i.onDragStartObservable.notifyObservers({})})),e.dragBehavior.onDragEndObservable.add((function(){i.onDragEndObservable.notifyObservers({})}))})),i.attachedMesh=null,i}return T(e,r),Object.defineProperty(e.prototype,\"attachedMesh\",{set:function(e){this.xGizmo&&(this.xGizmo.attachedMesh=e,this.yGizmo.attachedMesh=e,this.zGizmo.attachedMesh=e)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,\"updateGizmoRotationToMatchAttachedMesh\",{get:function(){return this.xGizmo.updateGizmoRotationToMatchAttachedMesh},set:function(e){this.xGizmo&&(this.xGizmo.updateGizmoRotationToMatchAttachedMesh=e,this.yGizmo.updateGizmoRotationToMatchAttachedMesh=e,this.zGizmo.updateGizmoRotationToMatchAttachedMesh=e)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,\"snapDistance\",{get:function(){return this.xGizmo.snapDistance},set:function(e){this.xGizmo&&(this.xGizmo.snapDistance=e,this.yGizmo.snapDistance=e,this.zGizmo.snapDistance=e)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,\"scaleRatio\",{get:function(){return this.xGizmo.scaleRatio},set:function(e){this.xGizmo&&(this.xGizmo.scaleRatio=e,this.yGizmo.scaleRatio=e,this.zGizmo.scaleRatio=e)},enumerable:!0,configurable:!0}),e.prototype.dispose=function(){this.xGizmo.dispose(),this.yGizmo.dispose(),this.zGizmo.dispose(),this.onDragStartObservable.clear(),this.onDragEndObservable.clear()},e.prototype.setCustomMesh=function(e){xs.Tools.Error(\"Custom meshes are not supported on this gizmo, please set the custom meshes on the gizmos contained within this one (gizmo.xGizmo, gizmo.yGizmo, gizmo.zGizmo)\")},e})(xs.Gizmo),xs.RotationGizmo=Ps,As=$a||($a={}),Ss=(function(n){function e(e){void 0===e&&(e=As.UtilityLayerRenderer.DefaultUtilityLayer);var t=n.call(this,e)||this;t.onDragStartObservable=new As.Observable,t.onDragEndObservable=new As.Observable,t.xGizmo=new As.AxisScaleGizmo(new As.Vector3(1,0,0),As.Color3.Red().scale(.5),e),t.yGizmo=new As.AxisScaleGizmo(new As.Vector3(0,1,0),As.Color3.Green().scale(.5),e),t.zGizmo=new As.AxisScaleGizmo(new As.Vector3(0,0,1),As.Color3.Blue().scale(.5),e),t.uniformScaleGizmo=new As.AxisScaleGizmo(new As.Vector3(0,1,0),As.Color3.Yellow().scale(.5),e),t.uniformScaleGizmo.updateGizmoRotationToMatchAttachedMesh=!1,t.uniformScaleGizmo.uniformScaling=!0;var i=As.Mesh.CreatePolyhedron(\"\",{type:1},t.uniformScaleGizmo.gizmoLayer.utilityLayerScene);i.scaling.scaleInPlace(.02),i.visibility=0;var r=As.Mesh.CreatePolyhedron(\"\",{type:1},t.uniformScaleGizmo.gizmoLayer.utilityLayerScene);return r.scaling.scaleInPlace(.007),i.addChild(r),t.uniformScaleGizmo.setCustomMesh(i,!0),[t.xGizmo,t.yGizmo,t.zGizmo,t.uniformScaleGizmo].forEach((function(e){e.dragBehavior.onDragStartObservable.add((function(){t.onDragStartObservable.notifyObservers({})})),e.dragBehavior.onDragEndObservable.add((function(){t.onDragEndObservable.notifyObservers({})}))})),t.attachedMesh=null,t}return T(e,n),Object.defineProperty(e.prototype,\"attachedMesh\",{set:function(e){this.xGizmo&&(this.xGizmo.attachedMesh=e,this.yGizmo.attachedMesh=e,this.zGizmo.attachedMesh=e,this.uniformScaleGizmo.attachedMesh=e)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,\"updateGizmoRotationToMatchAttachedMesh\",{get:function(){return this.xGizmo.updateGizmoRotationToMatchAttachedMesh},set:function(e){e||As.Tools.Warn(\"Setting updateGizmoRotationToMatchAttachedMesh = false on scaling gizmo is not supported.\"),this.xGizmo&&(this.xGizmo.updateGizmoRotationToMatchAttachedMesh=e,this.yGizmo.updateGizmoRotationToMatchAttachedMesh=e,this.zGizmo.updateGizmoRotationToMatchAttachedMesh=e)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,\"snapDistance\",{get:function(){return this.xGizmo.snapDistance},set:function(e){this.xGizmo&&(this.xGizmo.snapDistance=e,this.yGizmo.snapDistance=e,this.zGizmo.snapDistance=e,this.uniformScaleGizmo.snapDistance=e)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,\"scaleRatio\",{get:function(){return this.xGizmo.scaleRatio},set:function(e){this.xGizmo&&(this.xGizmo.scaleRatio=e,this.yGizmo.scaleRatio=e,this.zGizmo.scaleRatio=e,this.uniformScaleGizmo.scaleRatio=e)},enumerable:!0,configurable:!0}),e.prototype.dispose=function(){this.xGizmo.dispose(),this.yGizmo.dispose(),this.zGizmo.dispose(),this.uniformScaleGizmo.dispose(),this.onDragStartObservable.clear(),this.onDragEndObservable.clear()},e})(As.Gizmo),As.ScaleGizmo=Ss,Ms=$a||($a={}),Rs=(function(m){function g(t,i){void 0===t&&(t=Ms.Color3.Gray()),void 0===i&&(i=Ms.UtilityLayerRenderer.DefaultKeepDepthUtilityLayer);var l=m.call(this,i)||this;l._boundingDimensions=new Ms.Vector3(1,1,1),l._renderObserver=null,l._pointerObserver=null,l._scaleDragSpeed=.2,l._tmpQuaternion=new Ms.Quaternion,l._tmpVector=new Ms.Vector3(0,0,0),l._tmpRotationMatrix=new Ms.Matrix,l.ignoreChildren=!1,l.includeChildPredicate=null,l.rotationSphereSize=.1,l.scaleBoxSize=.1,l.fixedDragMeshScreenSize=!1,l.fixedDragMeshScreenSizeDistanceFactor=10,l.onDragStartObservable=new Ms.Observable,l.onScaleBoxDragObservable=new Ms.Observable,l.onScaleBoxDragEndObservable=new Ms.Observable,l.onRotationSphereDragObservable=new Ms.Observable,l.onRotationSphereDragEndObservable=new Ms.Observable,l.scalePivot=null,l._existingMeshScale=new Ms.Vector3,l._updateScale=!1,l._anchorMesh=new Ms.AbstractMesh(\"anchor\",i.utilityLayerScene);var n=new Ms.StandardMaterial(\"\",i.utilityLayerScene);n.disableLighting=!0,n.emissiveColor=t;var r=new Ms.StandardMaterial(\"\",i.utilityLayerScene);r.disableLighting=!0,r.emissiveColor=t.clone().add(new Ms.Color3(.3,.3,.3)),l._lineBoundingBox=new Ms.AbstractMesh(\"\",i.utilityLayerScene),l._lineBoundingBox.rotationQuaternion=new Ms.Quaternion;var e=[];e.push(Ms.MeshBuilder.CreateLines(\"lines\",{points:[new Ms.Vector3(0,0,0),new Ms.Vector3(l._boundingDimensions.x,0,0)]},i.utilityLayerScene)),e.push(Ms.MeshBuilder.CreateLines(\"lines\",{points:[new Ms.Vector3(0,0,0),new Ms.Vector3(0,l._boundingDimensions.y,0)]},i.utilityLayerScene)),e.push(Ms.MeshBuilder.CreateLines(\"lines\",{points:[new Ms.Vector3(0,0,0),new Ms.Vector3(0,0,l._boundingDimensions.z)]},i.utilityLayerScene)),e.push(Ms.MeshBuilder.CreateLines(\"lines\",{points:[new Ms.Vector3(l._boundingDimensions.x,0,0),new Ms.Vector3(l._boundingDimensions.x,l._boundingDimensions.y,0)]},i.utilityLayerScene)),e.push(Ms.MeshBuilder.CreateLines(\"lines\",{points:[new Ms.Vector3(l._boundingDimensions.x,0,0),new Ms.Vector3(l._boundingDimensions.x,0,l._boundingDimensions.z)]},i.utilityLayerScene)),e.push(Ms.MeshBuilder.CreateLines(\"lines\",{points:[new Ms.Vector3(0,l._boundingDimensions.y,0),new Ms.Vector3(l._boundingDimensions.x,l._boundingDimensions.y,0)]},i.utilityLayerScene)),e.push(Ms.MeshBuilder.CreateLines(\"lines\",{points:[new Ms.Vector3(0,l._boundingDimensions.y,0),new Ms.Vector3(0,l._boundingDimensions.y,l._boundingDimensions.z)]},i.utilityLayerScene)),e.push(Ms.MeshBuilder.CreateLines(\"lines\",{points:[new Ms.Vector3(0,0,l._boundingDimensions.z),new Ms.Vector3(l._boundingDimensions.x,0,l._boundingDimensions.z)]},i.utilityLayerScene)),e.push(Ms.MeshBuilder.CreateLines(\"lines\",{points:[new Ms.Vector3(0,0,l._boundingDimensions.z),new Ms.Vector3(0,l._boundingDimensions.y,l._boundingDimensions.z)]},i.utilityLayerScene)),e.push(Ms.MeshBuilder.CreateLines(\"lines\",{points:[new Ms.Vector3(l._boundingDimensions.x,l._boundingDimensions.y,l._boundingDimensions.z),new Ms.Vector3(0,l._boundingDimensions.y,l._boundingDimensions.z)]},i.utilityLayerScene)),e.push(Ms.MeshBuilder.CreateLines(\"lines\",{points:[new Ms.Vector3(l._boundingDimensions.x,l._boundingDimensions.y,l._boundingDimensions.z),new Ms.Vector3(l._boundingDimensions.x,0,l._boundingDimensions.z)]},i.utilityLayerScene)),e.push(Ms.MeshBuilder.CreateLines(\"lines\",{points:[new Ms.Vector3(l._boundingDimensions.x,l._boundingDimensions.y,l._boundingDimensions.z),new Ms.Vector3(l._boundingDimensions.x,l._boundingDimensions.y,0)]},i.utilityLayerScene)),e.forEach((function(e){e.color=t,e.position.addInPlace(new Ms.Vector3(-l._boundingDimensions.x/2,-l._boundingDimensions.y/2,-l._boundingDimensions.z/2)),e.isPickable=!1,l._lineBoundingBox.addChild(e)})),l._rootMesh.addChild(l._lineBoundingBox),l._rotateSpheresParent=new Ms.AbstractMesh(\"\",i.utilityLayerScene),l._rotateSpheresParent.rotationQuaternion=new Ms.Quaternion;for(var o=function(o){var t=Ms.MeshBuilder.CreateSphere(\"\",{diameter:1},i.utilityLayerScene);t.rotationQuaternion=new Ms.Quaternion,t.material=n,(u=new Ms.PointerDragBehavior({})).moveAttached=!1,u.updateDragPlane=!1,t.addBehavior(u);var s=new Ms.Vector3(1,0,0),a=0;u.onDragStartObservable.add((function(e){s.copyFrom(t.forward),a=0})),u.onDragObservable.add((function(e){if(l.onRotationSphereDragObservable.notifyObservers({}),l.attachedMesh){g._RemoveAndStorePivotPoint(l.attachedMesh);var t=s,i=e.dragPlaneNormal.scale(Ms.Vector3.Dot(e.dragPlaneNormal,t)),r=t.subtract(i).normalizeToNew(),n=-Ms.Vector3.Dot(r,e.delta);n=n/l._boundingDimensions.length()*l._anchorMesh.scaling.length(),l.attachedMesh.rotationQuaternion||(l.attachedMesh.rotationQuaternion=Ms.Quaternion.RotationYawPitchRoll(l.attachedMesh.rotation.y,l.attachedMesh.rotation.x,l.attachedMesh.rotation.z)),l._anchorMesh.rotationQuaternion||(l._anchorMesh.rotationQuaternion=Ms.Quaternion.RotationYawPitchRoll(l._anchorMesh.rotation.y,l._anchorMesh.rotation.x,l._anchorMesh.rotation.z)),a+=n,Math.abs(a)<=2*Math.PI&&(8<=o?Ms.Quaternion.RotationYawPitchRollToRef(0,0,n,l._tmpQuaternion):4<=o?Ms.Quaternion.RotationYawPitchRollToRef(n,0,0,l._tmpQuaternion):Ms.Quaternion.RotationYawPitchRollToRef(0,n,0,l._tmpQuaternion),l._anchorMesh.addChild(l.attachedMesh),l._anchorMesh.rotationQuaternion.multiplyToRef(l._tmpQuaternion,l._anchorMesh.rotationQuaternion),l._anchorMesh.removeChild(l.attachedMesh)),l.updateBoundingBox(),g._RestorePivotPoint(l.attachedMesh)}})),u.onDragStartObservable.add((function(){l.onDragStartObservable.notifyObservers({}),l._selectNode(t)})),u.onDragEndObservable.add((function(){l.onRotationSphereDragEndObservable.notifyObservers({}),l._selectNode(null)})),c._rotateSpheresParent.addChild(t)},c=this,s=0;s<12;s++)o(s);l._rootMesh.addChild(l._rotateSpheresParent),l._scaleBoxesParent=new Ms.AbstractMesh(\"\",i.utilityLayerScene),l._scaleBoxesParent.rotationQuaternion=new Ms.Quaternion;for(var a=0;a<2;a++)for(var h=0;h<2;h++)for(var u,d=function(){var r=Ms.MeshBuilder.CreateBox(\"\",{size:1},i.utilityLayerScene);r.material=n;var e=new Ms.Vector3(0==a?-1:1,0==h?-1:1,0==p?-1:1);(u=new Ms.PointerDragBehavior({dragAxis:e})).moveAttached=!1,r.addBehavior(u),u.onDragObservable.add((function(e){if(l.onScaleBoxDragObservable.notifyObservers({}),l.attachedMesh){g._RemoveAndStorePivotPoint(l.attachedMesh);var t=e.dragDistance/l._boundingDimensions.length()*l._anchorMesh.scaling.length(),i=new Ms.Vector3(t,t,t);i.scaleInPlace(l._scaleDragSpeed),l.updateBoundingBox(),l.scalePivot?(l.attachedMesh.getWorldMatrix().getRotationMatrixToRef(l._tmpRotationMatrix),l._boundingDimensions.scaleToRef(.5,l._tmpVector),Ms.Vector3.TransformCoordinatesToRef(l._tmpVector,l._tmpRotationMatrix,l._tmpVector),l._anchorMesh.position.subtractInPlace(l._tmpVector),l._boundingDimensions.multiplyToRef(l.scalePivot,l._tmpVector),Ms.Vector3.TransformCoordinatesToRef(l._tmpVector,l._tmpRotationMatrix,l._tmpVector),l._anchorMesh.position.addInPlace(l._tmpVector)):(r.absolutePosition.subtractToRef(l._anchorMesh.position,l._tmpVector),l._anchorMesh.position.subtractInPlace(l._tmpVector)),l._anchorMesh.addChild(l.attachedMesh),l._anchorMesh.scaling.addInPlace(i),(l._anchorMesh.scaling.x<0||l._anchorMesh.scaling.y<0||l._anchorMesh.scaling.z<0)&&l._anchorMesh.scaling.subtractInPlace(i),l._anchorMesh.removeChild(l.attachedMesh),g._RestorePivotPoint(l.attachedMesh)}})),u.onDragStartObservable.add((function(){l.onDragStartObservable.notifyObservers({}),l._selectNode(r)})),u.onDragEndObservable.add((function(){l.onScaleBoxDragEndObservable.notifyObservers({}),l._selectNode(null)})),f._scaleBoxesParent.addChild(r)},f=this,p=0;p<2;p++)d();l._rootMesh.addChild(l._scaleBoxesParent);var _=new Array;return l._pointerObserver=i.utilityLayerScene.onPointerObservable.add((function(t,e){_[t.event.pointerId]?t.pickInfo&&t.pickInfo.pickedMesh!=_[t.event.pointerId]&&(_[t.event.pointerId].material=n,delete _[t.event.pointerId]):l._rotateSpheresParent.getChildMeshes().concat(l._scaleBoxesParent.getChildMeshes()).forEach((function(e){t.pickInfo&&t.pickInfo.pickedMesh==e&&((_[t.event.pointerId]=e).material=r)}))})),l._renderObserver=l.gizmoLayer.originalScene.onBeforeRenderObservable.add((function(){l.attachedMesh&&!l._existingMeshScale.equals(l.attachedMesh.scaling)&&l.updateBoundingBox()})),l.updateBoundingBox(),l}return T(g,m),g._RemoveAndStorePivotPoint=function(e){e&&0===g._PivotCached&&(e.getPivotPointToRef(g._OldPivotPoint),g._OldPivotPoint.equalsToFloats(0,0,0)||(e.setPivotMatrix(Ms.Matrix.IdentityReadOnly),g._OldPivotPoint.subtractToRef(e.getPivotPoint(),g._PivotTranslation),g._PivotTmpVector.copyFromFloats(1,1,1),g._PivotTmpVector.subtractInPlace(e.scaling),g._PivotTmpVector.multiplyInPlace(g._PivotTranslation),e.position.addInPlace(g._PivotTmpVector))),g._PivotCached++},g._RestorePivotPoint=function(e){e&&!g._OldPivotPoint.equalsToFloats(0,0,0)&&1===g._PivotCached&&(e.setPivotPoint(g._OldPivotPoint),g._PivotTmpVector.copyFromFloats(1,1,1),g._PivotTmpVector.subtractInPlace(e.scaling),g._PivotTmpVector.multiplyInPlace(g._PivotTranslation),e.position.subtractInPlace(g._PivotTmpVector)),this._PivotCached--},g.prototype._attachedMeshChanged=function(e){e&&(g._RemoveAndStorePivotPoint(e),this._anchorMesh.addChild(e),this._anchorMesh.removeChild(e),g._RestorePivotPoint(e),this.updateBoundingBox())},g.prototype._selectNode=function(i){this._rotateSpheresParent.getChildMeshes().concat(this._scaleBoxesParent.getChildMeshes()).forEach((function(e,t){e.isVisible=!i||e==i}))},g.prototype.updateBoundingBox=function(){if(this.attachedMesh){g._RemoveAndStorePivotPoint(this.attachedMesh),this._update(),this.attachedMesh.rotationQuaternion||(this.attachedMesh.rotationQuaternion=Ms.Quaternion.RotationYawPitchRoll(this.attachedMesh.rotation.y,this.attachedMesh.rotation.x,this.attachedMesh.rotation.z)),this._anchorMesh.rotationQuaternion||(this._anchorMesh.rotationQuaternion=Ms.Quaternion.RotationYawPitchRoll(this._anchorMesh.rotation.y,this._anchorMesh.rotation.x,this._anchorMesh.rotation.z)),this._anchorMesh.rotationQuaternion.copyFrom(this.attachedMesh.rotationQuaternion),this._tmpQuaternion.copyFrom(this.attachedMesh.rotationQuaternion),this._tmpVector.copyFrom(this.attachedMesh.position),this.attachedMesh.rotationQuaternion.set(0,0,0,1),this.attachedMesh.position.set(0,0,0);var e=this.attachedMesh.getHierarchyBoundingVectors(!this.ignoreChildren,this.includeChildPredicate);e.max.subtractToRef(e.min,this._boundingDimensions),this._lineBoundingBox.scaling.copyFrom(this._boundingDimensions),this._lineBoundingBox.position.set((e.max.x+e.min.x)/2,(e.max.y+e.min.y)/2,(e.max.z+e.min.z)/2),this._rotateSpheresParent.position.copyFrom(this._lineBoundingBox.position),this._scaleBoxesParent.position.copyFrom(this._lineBoundingBox.position),this._lineBoundingBox.computeWorldMatrix(),this._anchorMesh.position.copyFrom(this._lineBoundingBox.absolutePosition),this.attachedMesh.rotationQuaternion.copyFrom(this._tmpQuaternion),this.attachedMesh.position.copyFrom(this._tmpVector)}for(var t=this._rotateSpheresParent.getChildMeshes(),i=0;i<3;i++)for(var r=0;r<2;r++)for(var n=0;n<2;n++){var o=4*i+2*r+n;if(0==i&&(t[o].position.set(this._boundingDimensions.x/2,this._boundingDimensions.y*r,this._boundingDimensions.z*n),t[o].position.addInPlace(new Ms.Vector3(-this._boundingDimensions.x/2,-this._boundingDimensions.y/2,-this._boundingDimensions.z/2)),t[o].lookAt(Ms.Vector3.Cross(Ms.Vector3.Right(),t[o].position.normalizeToNew()).normalizeToNew().add(t[o].position))),1==i&&(t[o].position.set(this._boundingDimensions.x*r,this._boundingDimensions.y/2,this._boundingDimensions.z*n),t[o].position.addInPlace(new Ms.Vector3(-this._boundingDimensions.x/2,-this._boundingDimensions.y/2,-this._boundingDimensions.z/2)),t[o].lookAt(Ms.Vector3.Cross(Ms.Vector3.Up(),t[o].position.normalizeToNew()).normalizeToNew().add(t[o].position))),2==i&&(t[o].position.set(this._boundingDimensions.x*r,this._boundingDimensions.y*n,this._boundingDimensions.z/2),t[o].position.addInPlace(new Ms.Vector3(-this._boundingDimensions.x/2,-this._boundingDimensions.y/2,-this._boundingDimensions.z/2)),t[o].lookAt(Ms.Vector3.Cross(Ms.Vector3.Forward(),t[o].position.normalizeToNew()).normalizeToNew().add(t[o].position))),this.fixedDragMeshScreenSize){this._rootMesh.computeWorldMatrix(),this._rotateSpheresParent.computeWorldMatrix(),t[o].computeWorldMatrix(),t[o].absolutePosition.subtractToRef(this.gizmoLayer.utilityLayerScene.activeCamera.position,this._tmpVector);var s=this.rotationSphereSize*this._tmpVector.length()/this.fixedDragMeshScreenSizeDistanceFactor;t[o].scaling.set(s,s,s)}else t[o].scaling.set(this.rotationSphereSize,this.rotationSphereSize,this.rotationSphereSize)}var a=this._scaleBoxesParent.getChildMeshes();for(i=0;i<2;i++)for(r=0;r<2;r++)for(n=0;n<2;n++){if(a[o=4*i+2*r+n])if(a[o].position.set(this._boundingDimensions.x*i,this._boundingDimensions.y*r,this._boundingDimensions.z*n),a[o].position.addInPlace(new Ms.Vector3(-this._boundingDimensions.x/2,-this._boundingDimensions.y/2,-this._boundingDimensions.z/2)),this.fixedDragMeshScreenSize){this._rootMesh.computeWorldMatrix(),this._scaleBoxesParent.computeWorldMatrix(),a[o].computeWorldMatrix(),a[o].absolutePosition.subtractToRef(this.gizmoLayer.utilityLayerScene.activeCamera.position,this._tmpVector);s=this.scaleBoxSize*this._tmpVector.length()/this.fixedDragMeshScreenSizeDistanceFactor;a[o].scaling.set(s,s,s)}else a[o].scaling.set(this.scaleBoxSize,this.scaleBoxSize,this.scaleBoxSize)}this.attachedMesh&&(this._existingMeshScale.copyFrom(this.attachedMesh.scaling),g._RestorePivotPoint(this.attachedMesh))},g.prototype.setEnabledRotationAxis=function(i){this._rotateSpheresParent.getChildMeshes().forEach((function(e,t){t<4?e.setEnabled(-1!=i.indexOf(\"x\")):t<8?e.setEnabled(-1!=i.indexOf(\"y\")):e.setEnabled(-1!=i.indexOf(\"z\"))}))},g.prototype.dispose=function(){this.gizmoLayer.utilityLayerScene.onPointerObservable.remove(this._pointerObserver),this.gizmoLayer.originalScene.onBeforeRenderObservable.remove(this._renderObserver),this._lineBoundingBox.dispose(),this._rotateSpheresParent.dispose(),this._scaleBoxesParent.dispose(),m.prototype.dispose.call(this)},g.MakeNotPickableAndWrapInBoundingBox=function(e){var t=function(e){e.isPickable=!1,e.getChildMeshes().forEach((function(e){t(e)}))};t(e),e.rotationQuaternion||(e.rotationQuaternion=Ms.Quaternion.RotationYawPitchRoll(e.rotation.y,e.rotation.x,e.rotation.z));var i=e.position.clone(),r=e.rotationQuaternion.clone();e.rotationQuaternion.set(0,0,0,1),e.position.set(0,0,0);var n=Ms.MeshBuilder.CreateBox(\"box\",{size:1},e.getScene()),o=e.getHierarchyBoundingVectors();return o.max.subtractToRef(o.min,n.scaling),n.position.set((o.max.x+o.min.x)/2,(o.max.y+o.min.y)/2,(o.max.z+o.min.z)/2),e.addChild(n),e.rotationQuaternion.copyFrom(r),e.position.copyFrom(i),e.removeChild(n),n.addChild(e),n.visibility=0,n},g.prototype.setCustomMesh=function(e){Ms.Tools.Error(\"Custom meshes are not supported on this gizmo\")},g._PivotCached=0,g._OldPivotPoint=new Ms.Vector3,g._PivotTranslation=new Ms.Vector3,g._PivotTmpVector=new Ms.Vector3,g})(Ms.Gizmo),Ms.BoundingBoxGizmo=Rs,Cs=$a||($a={}),Os=(function(){function e(e){var n=this;this.scene=e,this._gizmosEnabled={positionGizmo:!1,rotationGizmo:!1,scaleGizmo:!1,boundingBoxGizmo:!1},this._pointerObserver=null,this._attachedMesh=null,this._boundingBoxColor=Cs.Color3.FromHexString(\"#0984e3\"),this.boundingBoxDragBehavior=new Cs.SixDofDragBehavior,this.attachableMeshes=null,this.usePointerToAttachGizmos=!0,this._defaultKeepDepthUtilityLayer=new Cs.UtilityLayerRenderer(e),this._defaultKeepDepthUtilityLayer.utilityLayerScene.autoClearDepthAndStencil=!1,this._defaultUtilityLayer=new Cs.UtilityLayerRenderer(e),this.gizmos={positionGizmo:null,rotationGizmo:null,scaleGizmo:null,boundingBoxGizmo:null},this._pointerObserver=e.onPointerObservable.add((function(e,t){if(n.usePointerToAttachGizmos&&e.type==Cs.PointerEventTypes.POINTERDOWN)if(e.pickInfo&&e.pickInfo.pickedMesh){var i=e.pickInfo.pickedMesh;if(null==n.attachableMeshes)for(;i&&null!=i.parent;)i=i.parent;else{var r=!1;n.attachableMeshes.forEach((function(e){i&&(i==e||i.isDescendantOf(e))&&(i=e,r=!0)})),r||(i=null)}i instanceof Cs.AbstractMesh?n._attachedMesh!=i&&n.attachToMesh(i):n.attachToMesh(null)}else n.attachToMesh(null)}))}return e.prototype.attachToMesh=function(e){for(var t in this._attachedMesh&&this._attachedMesh.removeBehavior(this.boundingBoxDragBehavior),this._attachedMesh=e,this.gizmos){var i=this.gizmos[t];i&&this._gizmosEnabled[t]&&(i.attachedMesh=e)}this.boundingBoxGizmoEnabled&&this._attachedMesh&&this._attachedMesh.addBehavior(this.boundingBoxDragBehavior)},Object.defineProperty(e.prototype,\"positionGizmoEnabled\",{get:function(){return this._gizmosEnabled.positionGizmo},set:function(e){e?(this.gizmos.positionGizmo||(this.gizmos.positionGizmo=new Cs.PositionGizmo(this._defaultUtilityLayer)),this.gizmos.positionGizmo.attachedMesh=this._attachedMesh):this.gizmos.positionGizmo&&(this.gizmos.positionGizmo.attachedMesh=null),this._gizmosEnabled.positionGizmo=e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,\"rotationGizmoEnabled\",{get:function(){return this._gizmosEnabled.rotationGizmo},set:function(e){e?(this.gizmos.rotationGizmo||(this.gizmos.rotationGizmo=new Cs.RotationGizmo(this._defaultUtilityLayer)),this.gizmos.rotationGizmo.attachedMesh=this._attachedMesh):this.gizmos.rotationGizmo&&(this.gizmos.rotationGizmo.attachedMesh=null),this._gizmosEnabled.rotationGizmo=e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,\"scaleGizmoEnabled\",{get:function(){return this._gizmosEnabled.scaleGizmo},set:function(e){e?(this.gizmos.scaleGizmo=this.gizmos.scaleGizmo||new Cs.ScaleGizmo(this._defaultUtilityLayer),this.gizmos.scaleGizmo.attachedMesh=this._attachedMesh):this.gizmos.scaleGizmo&&(this.gizmos.scaleGizmo.attachedMesh=null),this._gizmosEnabled.scaleGizmo=e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,\"boundingBoxGizmoEnabled\",{get:function(){return this._gizmosEnabled.boundingBoxGizmo},set:function(e){e?(this.gizmos.boundingBoxGizmo=this.gizmos.boundingBoxGizmo||new Cs.BoundingBoxGizmo(this._boundingBoxColor,this._defaultKeepDepthUtilityLayer),this.gizmos.boundingBoxGizmo.attachedMesh=this._attachedMesh,this._attachedMesh&&(this._attachedMesh.removeBehavior(this.boundingBoxDragBehavior),this._attachedMesh.addBehavior(this.boundingBoxDragBehavior))):this.gizmos.boundingBoxGizmo&&(this.gizmos.boundingBoxGizmo.attachedMesh=null),this._gizmosEnabled.boundingBoxGizmo=e},enumerable:!0,configurable:!0}),e.prototype.dispose=function(){for(var e in this.scene.onPointerObservable.remove(this._pointerObserver),this.gizmos){var t=this.gizmos[e];t&&t.dispose()}this._defaultKeepDepthUtilityLayer.dispose(),this._defaultUtilityLayer.dispose(),this.boundingBoxDragBehavior.detach()},e})(),Cs.GizmoManager=Os,Ds=$a||($a={}),Is=(function(){function n(e,t,i){void 0===t&&(t=0),void 0===i&&(i=null),this.name=e,this.animations=new Array,this._positions=null,this._normals=null,this._tangents=null,this.onInfluenceChanged=new Ds.Observable,this._onDataLayoutChanged=new Ds.Observable,this._animationPropertiesOverride=null,this._scene=i||Ds.Engine.LastCreatedScene,this.influence=t}return Object.defineProperty(n.prototype,\"influence\",{get:function(){return this._influence},set:function(e){if(this._influence!==e){var t=this._influence;this._influence=e,this.onInfluenceChanged.hasObservers&&this.onInfluenceChanged.notifyObservers(0===t||0===e)}},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,\"animationPropertiesOverride\",{get:function(){return!this._animationPropertiesOverride&&this._scene?this._scene.animationPropertiesOverride:this._animationPropertiesOverride},set:function(e){this._animationPropertiesOverride=e},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,\"hasPositions\",{get:function(){return!!this._positions},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,\"hasNormals\",{get:function(){return!!this._normals},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,\"hasTangents\",{get:function(){return!!this._tangents},enumerable:!0,configurable:!0}),n.prototype.setPositions=function(e){var t=this.hasPositions;this._positions=e,t!==this.hasPositions&&this._onDataLayoutChanged.notifyObservers(void 0)},n.prototype.getPositions=function(){return this._positions},n.prototype.setNormals=function(e){var t=this.hasNormals;this._normals=e,t!==this.hasNormals&&this._onDataLayoutChanged.notifyObservers(void 0)},n.prototype.getNormals=function(){return this._normals},n.prototype.setTangents=function(e){var t=this.hasTangents;this._tangents=e,t!==this.hasTangents&&this._onDataLayoutChanged.notifyObservers(void 0)},n.prototype.getTangents=function(){return this._tangents},n.prototype.serialize=function(){var e={};return e.name=this.name,e.influence=this.influence,e.positions=Array.prototype.slice.call(this.getPositions()),this.hasNormals&&(e.normals=Array.prototype.slice.call(this.getNormals())),this.hasTangents&&(e.tangents=Array.prototype.slice.call(this.getTangents())),Ds.Animation.AppendSerializedAnimations(this,e),e},n.Parse=function(e){var t=new n(e.name,e.influence);if(t.setPositions(e.positions),e.normals&&t.setNormals(e.normals),e.tangents&&t.setTangents(e.tangents),e.animations)for(var i=0;i<e.animations.length;i++){var r=e.animations[i];t.animations.push(Ds.Animation.Parse(r))}return t},n.FromMesh=function(e,t,i){t||(t=e.name);var r=new n(t,i,e.getScene());return r.setPositions(e.getVerticesData(Ds.VertexBuffer.PositionKind)),e.isVerticesDataPresent(Ds.VertexBuffer.NormalKind)&&r.setNormals(e.getVerticesData(Ds.VertexBuffer.NormalKind)),e.isVerticesDataPresent(Ds.VertexBuffer.TangentKind)&&r.setTangents(e.getVerticesData(Ds.VertexBuffer.TangentKind)),r},n})(),Ds.MorphTarget=Is,ws=$a||($a={}),Ls=(function(){function s(e){void 0===e&&(e=null),this._targets=new Array,this._targetInfluenceChangedObservers=new Array,this._targetDataLayoutChangedObservers=new Array,this._activeTargets=new ws.SmartArray(16),this._supportsNormals=!1,this._supportsTangents=!1,this._vertexCount=0,this._uniqueId=0,this._tempInfluences=new Array,e||(e=ws.Engine.LastCreatedScene),this._scene=e,this._scene&&(this._scene.morphTargetManagers.push(this),this._uniqueId=this._scene.getUniqueId())}return Object.defineProperty(s.prototype,\"uniqueId\",{get:function(){return this._uniqueId},enumerable:!0,configurable:!0}),Object.defineProperty(s.prototype,\"vertexCount\",{get:function(){return this._vertexCount},enumerable:!0,configurable:!0}),Object.defineProperty(s.prototype,\"supportsNormals\",{get:function(){return this._supportsNormals},enumerable:!0,configurable:!0}),Object.defineProperty(s.prototype,\"supportsTangents\",{get:function(){return this._supportsTangents},enumerable:!0,configurable:!0}),Object.defineProperty(s.prototype,\"numTargets\",{get:function(){return this._targets.length},enumerable:!0,configurable:!0}),Object.defineProperty(s.prototype,\"numInfluencers\",{get:function(){return this._activeTargets.length},enumerable:!0,configurable:!0}),Object.defineProperty(s.prototype,\"influences\",{get:function(){return this._influences},enumerable:!0,configurable:!0}),s.prototype.getActiveTarget=function(e){return this._activeTargets.data[e]},s.prototype.getTarget=function(e){return this._targets[e]},s.prototype.addTarget=function(e){var t=this;this._targets.push(e),this._targetInfluenceChangedObservers.push(e.onInfluenceChanged.add((function(e){t._syncActiveTargets(e)}))),this._targetDataLayoutChangedObservers.push(e._onDataLayoutChanged.add((function(){t._syncActiveTargets(!0)}))),this._syncActiveTargets(!0)},s.prototype.removeTarget=function(e){var t=this._targets.indexOf(e);0<=t&&(this._targets.splice(t,1),e.onInfluenceChanged.remove(this._targetInfluenceChangedObservers.splice(t,1)[0]),e._onDataLayoutChanged.remove(this._targetDataLayoutChangedObservers.splice(t,1)[0]),this._syncActiveTargets(!0))},s.prototype.serialize=function(){var e={};e.id=this.uniqueId,e.targets=[];for(var t=0,i=this._targets;t<i.length;t++){var r=i[t];e.targets.push(r.serialize())}return e},s.prototype._syncActiveTargets=function(e){var t=0;this._activeTargets.reset(),this._supportsNormals=!0,this._supportsTangents=!0;for(var i=this._vertexCount=0,r=this._targets;i<r.length;i++){var n=r[i];if(0!==n.influence){this._activeTargets.push(n),this._tempInfluences[t++]=n.influence,this._supportsNormals=this._supportsNormals&&n.hasNormals,this._supportsTangents=this._supportsTangents&&n.hasTangents;var o=n.getPositions();if(o){var s=o.length/3;if(0===this._vertexCount)this._vertexCount=s;else if(this._vertexCount!==s)return void ws.Tools.Error(\"Incompatible target. Targets must all have the same vertices count.\")}}}this._influences&&this._influences.length===t||(this._influences=new Float32Array(t));for(var a=0;a<t;a++)this._influences[a]=this._tempInfluences[a];e&&this.synchronize()},s.prototype.synchronize=function(){if(this._scene)for(var e=0,t=this._scene.meshes;e<t.length;e++){var i=t[e];i.morphTargetManager===this&&i._syncGeometryWithMorphTargetManager()}},s.Parse=function(e,t){var i=new s(t);i._uniqueId=e.id;for(var r=0,n=e.targets;r<n.length;r++){var o=n[r];i.addTarget(ws.MorphTarget.Parse(o))}return i},s})(),ws.MorphTargetManager=Ls,Fs=$a||($a={}),Bs=(function(){function r(e,t,i){void 0===i&&(i=2),this.maxDepth=i,this.dynamicContent=new Array,this._maxBlockCapacity=t||64,this._selectionContent=new Fs.SmartArrayNoDuplicate(1024),this._creationFunc=e}return r.prototype.update=function(e,t,i){r._CreateBlocks(e,t,i,this._maxBlockCapacity,0,this.maxDepth,this,this._creationFunc)},r.prototype.addMesh=function(e){for(var t=0;t<this.blocks.length;t++){this.blocks[t].addEntry(e)}},r.prototype.select=function(e,t){this._selectionContent.reset();for(var i=0;i<this.blocks.length;i++){this.blocks[i].select(e,this._selectionContent,t)}return t?this._selectionContent.concat(this.dynamicContent):this._selectionContent.concatWithNoDuplicate(this.dynamicContent),this._selectionContent},r.prototype.intersects=function(e,t,i){this._selectionContent.reset();for(var r=0;r<this.blocks.length;r++){this.blocks[r].intersects(e,t,this._selectionContent,i)}return i?this._selectionContent.concat(this.dynamicContent):this._selectionContent.concatWithNoDuplicate(this.dynamicContent),this._selectionContent},r.prototype.intersectsRay=function(e){this._selectionContent.reset();for(var t=0;t<this.blocks.length;t++){this.blocks[t].intersectsRay(e,this._selectionContent)}return this._selectionContent.concatWithNoDuplicate(this.dynamicContent),this._selectionContent},r._CreateBlocks=function(e,t,i,r,n,o,s,a){s.blocks=new Array;for(var l=new Fs.Vector3((t.x-e.x)/2,(t.y-e.y)/2,(t.z-e.z)/2),c=0;c<2;c++)for(var h=0;h<2;h++)for(var u=0;u<2;u++){var d=e.add(l.multiplyByFloats(c,h,u)),f=e.add(l.multiplyByFloats(c+1,h+1,u+1)),p=new Fs.OctreeBlock(d,f,r,n+1,o,a);p.addEntries(i),s.blocks.push(p)}},r.CreationFuncForMeshes=function(e,t){var i=e.getBoundingInfo();!e.isBlocked&&i.boundingBox.intersectsMinMax(t.minPoint,t.maxPoint)&&t.entries.push(e)},r.CreationFuncForSubMeshes=function(e,t){e.getBoundingInfo().boundingBox.intersectsMinMax(t.minPoint,t.maxPoint)&&t.entries.push(e)},r})(),Fs.Octree=Bs,Ns=$a||($a={}),Vs=(function(){function e(e,t,i,r,n,o){this.entries=new Array,this._boundingVectors=new Array,this._capacity=i,this._depth=r,this._maxDepth=n,this._creationFunc=o,this._minPoint=e,this._maxPoint=t,this._boundingVectors.push(e.clone()),this._boundingVectors.push(t.clone()),this._boundingVectors.push(e.clone()),this._boundingVectors[2].x=t.x,this._boundingVectors.push(e.clone()),this._boundingVectors[3].y=t.y,this._boundingVectors.push(e.clone()),this._boundingVectors[4].z=t.z,this._boundingVectors.push(t.clone()),this._boundingVectors[5].z=e.z,this._boundingVectors.push(t.clone()),this._boundingVectors[6].x=e.x,this._boundingVectors.push(t.clone()),this._boundingVectors[7].y=e.y}return Object.defineProperty(e.prototype,\"capacity\",{get:function(){return this._capacity},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,\"minPoint\",{get:function(){return this._minPoint},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,\"maxPoint\",{get:function(){return this._maxPoint},enumerable:!0,configurable:!0}),e.prototype.addEntry=function(e){if(this.blocks)for(var t=0;t<this.blocks.length;t++){this.blocks[t].addEntry(e)}else this._creationFunc(e,this),this.entries.length>this.capacity&&this._depth<this._maxDepth&&this.createInnerBlocks()},e.prototype.addEntries=function(e){for(var t=0;t<e.length;t++){var i=e[t];this.addEntry(i)}},e.prototype.select=function(e,t,i){if(Ns.BoundingBox.IsInFrustum(this._boundingVectors,e)){if(this.blocks){for(var r=0;r<this.blocks.length;r++){this.blocks[r].select(e,t,i)}return}i?t.concat(this.entries):t.concatWithNoDuplicate(this.entries)}},e.prototype.intersects=function(e,t,i,r){if(Ns.BoundingBox.IntersectsSphere(this._minPoint,this._maxPoint,e,t)){if(this.blocks){for(var n=0;n<this.blocks.length;n++){this.blocks[n].intersects(e,t,i,r)}return}r?i.concat(this.entries):i.concatWithNoDuplicate(this.entries)}},e.prototype.intersectsRay=function(e,t){if(e.intersectsBoxMinMax(this._minPoint,this._maxPoint)){if(this.blocks){for(var i=0;i<this.blocks.length;i++){this.blocks[i].intersectsRay(e,t)}return}t.concatWithNoDuplicate(this.entries)}},e.prototype.createInnerBlocks=function(){Ns.Octree._CreateBlocks(this._minPoint,this._maxPoint,this.entries,this._capacity,this._depth,this._maxDepth,this,this._creationFunc)},e})(),Ns.OctreeBlock=Vs,(function(o){o.Scene.prototype.createOrUpdateSelectionOctree=function(e,t){void 0===e&&(e=64),void 0===t&&(t=2);var i=this._getComponent(o.SceneComponentConstants.NAME_OCTREE);i||(i=new s(this),this._addComponent(i)),this._selectionOctree||(this._selectionOctree=new o.Octree(o.Octree.CreationFuncForMeshes,e,t));var r=this.getWorldExtends();return this._selectionOctree.update(r.min,r.max,this.meshes),this._selectionOctree},Object.defineProperty(o.Scene.prototype,\"selectionOctree\",{get:function(){return this._selectionOctree},enumerable:!0,configurable:!0}),o.AbstractMesh.prototype.createOrUpdateSubmeshesOctree=function(e,t){void 0===e&&(e=64),void 0===t&&(t=2);var i=this.getScene(),r=i._getComponent(o.SceneComponentConstants.NAME_OCTREE);r||(r=new s(i),i._addComponent(r)),this._submeshesOctree||(this._submeshesOctree=new o.Octree(o.Octree.CreationFuncForSubMeshes,e,t)),this.computeWorldMatrix(!0);var n=this.getBoundingInfo().boundingBox;return this._submeshesOctree.update(n.minimumWorld,n.maximumWorld,this.subMeshes),this._submeshesOctree};var s=(function(){function e(e){this.name=o.SceneComponentConstants.NAME_OCTREE,this.checksIsEnabled=!0,this._tempRay=new o.Ray(o.Vector3.Zero(),new o.Vector3(1,1,1)),this.scene=e,this.scene.getActiveMeshCandidates=this.getActiveMeshCandidates.bind(this),this.scene.getActiveSubMeshCandidates=this.getActiveSubMeshCandidates.bind(this),this.scene.getCollidingSubMeshCandidates=this.getCollidingSubMeshCandidates.bind(this),this.scene.getIntersectingSubMeshCandidates=this.getIntersectingSubMeshCandidates.bind(this)}return e.prototype.register=function(){var r=this;this.scene.onMeshRemovedObservable.add((function(e){var t=r.scene.selectionOctree;if(null!=t){var i=t.dynamicContent.indexOf(e);-1!==i&&t.dynamicContent.splice(i,1)}})),this.scene.onMeshImportedObservable.add((function(e){var t=r.scene.selectionOctree;null!=t&&t.addMesh(e)}))},e.prototype.getActiveMeshCandidates=function(){return this.scene._selectionOctree?this.scene._selectionOctree.select(this.scene.frustumPlanes):this.scene._getDefaultMeshCandidates()},e.prototype.getActiveSubMeshCandidates=function(e){return e._submeshesOctree&&e.useOctreeForRenderingSelection?e._submeshesOctree.select(this.scene.frustumPlanes):this.scene._getDefaultSubMeshCandidates(e)},e.prototype.getIntersectingSubMeshCandidates=function(e,t){return e._submeshesOctree&&e.useOctreeForPicking?(o.Ray.TransformToRef(t,e.getWorldMatrix(),this._tempRay),e._submeshesOctree.intersectsRay(this._tempRay)):this.scene._getDefaultSubMeshCandidates(e)},e.prototype.getCollidingSubMeshCandidates=function(e,t){if(e._submeshesOctree&&e.useOctreeForCollisions){var i=t._velocityWorldLength+Math.max(t._radius.x,t._radius.y,t._radius.z);return e._submeshesOctree.intersects(t._basePointWorld,i)}return this.scene._getDefaultSubMeshCandidates(e)},e.prototype.rebuild=function(){},e.prototype.dispose=function(){},e})();o.OctreeSceneComponent=s})($a||($a={})),Us=$a||($a={}),zs=(function(a){function e(e,t,i,r,n,o){var s=a.call(this,e,\"anaglyph\",null,[\"leftSampler\"],t,i[1],r,n,o)||this;return s._passedProcess=i[0]._rigPostProcess,s.onApplyObservable.add((function(e){e.setTextureFromPostProcess(\"leftSampler\",s._passedProcess)})),s}return T(e,a),e})(Us.PostProcess),Us.AnaglyphPostProcess=zs,(function(c){c.Node.AddNodeConstructor(\"AnaglyphArcRotateCamera\",(function(e,t,i){return function(){return new r(e,0,0,1,c.Vector3.Zero(),i.interaxial_distance,t)}}));var r=(function(l){function e(e,t,i,r,n,o,s){var a=l.call(this,e,t,i,r,n,s)||this;return a.interaxialDistance=o,a.setCameraRigMode(c.Camera.RIG_MODE_STEREOSCOPIC_ANAGLYPH,{interaxialDistance:o}),a}return T(e,l),e.prototype.getClassName=function(){return\"AnaglyphArcRotateCamera\"},e})(c.ArcRotateCamera);c.AnaglyphArcRotateCamera=r})($a||($a={})),(function(s){s.Node.AddNodeConstructor(\"AnaglyphFreeCamera\",(function(e,t,i){return function(){return new r(e,s.Vector3.Zero(),i.interaxial_distance,t)}}));var r=(function(o){function e(e,t,i,r){var n=o.call(this,e,t,r)||this;return n.interaxialDistance=i,n.setCameraRigMode(s.Camera.RIG_MODE_STEREOSCOPIC_ANAGLYPH,{interaxialDistance:i}),n}return T(e,o),e.prototype.getClassName=function(){return\"AnaglyphFreeCamera\"},e})(s.FreeCamera);s.AnaglyphFreeCamera=r})($a||($a={})),(function(s){s.Node.AddNodeConstructor(\"AnaglyphGamepadCamera\",(function(e,t,i){return function(){return new r(e,s.Vector3.Zero(),i.interaxial_distance,t)}}));var r=(function(o){function e(e,t,i,r){var n=o.call(this,e,t,r)||this;return n.interaxialDistance=i,n.setCameraRigMode(s.Camera.RIG_MODE_STEREOSCOPIC_ANAGLYPH,{interaxialDistance:i}),n}return T(e,o),e.prototype.getClassName=function(){return\"AnaglyphGamepadCamera\"},e})(s.GamepadCamera);s.AnaglyphGamepadCamera=r})($a||($a={})),(function(s){s.Node.AddNodeConstructor(\"AnaglyphUniversalCamera\",(function(e,t,i){return function(){return new r(e,s.Vector3.Zero(),i.interaxial_distance,t)}}));var r=(function(o){function e(e,t,i,r){var n=o.call(this,e,t,r)||this;return n.interaxialDistance=i,n.setCameraRigMode(s.Camera.RIG_MODE_STEREOSCOPIC_ANAGLYPH,{interaxialDistance:i}),n}return T(e,o),e.prototype.getClassName=function(){return\"AnaglyphUniversalCamera\"},e})(s.UniversalCamera);s.AnaglyphUniversalCamera=r})($a||($a={})),Gs=$a||($a={}),ks=(function(a){function e(e,t,i,r,n,o){var s=a.call(this,e,\"stereoscopicInterlace\",[\"stepSize\"],[\"camASampler\"],1,t[1],r,n,o,i?\"#define IS_STEREOSCOPIC_HORIZ 1\":void 0)||this;return s._passedProcess=t[0]._rigPostProcess,s._stepSize=new Gs.Vector2(1/s.width,1/s.height),s.onSizeChangedObservable.add((function(){s._stepSize=new Gs.Vector2(1/s.width,1/s.height)})),s.onApplyObservable.add((function(e){e.setTextureFromPostProcess(\"camASampler\",s._passedProcess),e.setFloat2(\"stepSize\",s._stepSize.x,s._stepSize.y)})),s}return T(e,a),e})(Gs.PostProcess),Gs.StereoscopicInterlacePostProcess=ks,(function(h){h.Node.AddNodeConstructor(\"StereoscopicArcRotateCamera\",(function(e,t,i){return function(){return new r(e,0,0,1,h.Vector3.Zero(),i.interaxial_distance,i.isStereoscopicSideBySide,t)}}));var r=(function(c){function e(e,t,i,r,n,o,s,a){var l=c.call(this,e,t,i,r,n,a)||this;return l.interaxialDistance=o,l.isStereoscopicSideBySide=s,l.setCameraRigMode(s?h.Camera.RIG_MODE_STEREOSCOPIC_SIDEBYSIDE_PARALLEL:h.Camera.RIG_MODE_STEREOSCOPIC_OVERUNDER,{interaxialDistance:o}),l}return T(e,c),e.prototype.getClassName=function(){return\"StereoscopicArcRotateCamera\"},e})(h.ArcRotateCamera);h.StereoscopicArcRotateCamera=r})($a||($a={})),(function(a){a.Node.AddNodeConstructor(\"StereoscopicFreeCamera\",(function(e,t,i){return function(){return new r(e,a.Vector3.Zero(),i.interaxial_distance,i.isStereoscopicSideBySide,t)}}));var r=(function(s){function e(e,t,i,r,n){var o=s.call(this,e,t,n)||this;return o.interaxialDistance=i,o.isStereoscopicSideBySide=r,o.setCameraRigMode(r?a.Camera.RIG_MODE_STEREOSCOPIC_SIDEBYSIDE_PARALLEL:a.Camera.RIG_MODE_STEREOSCOPIC_OVERUNDER,{interaxialDistance:i}),o}return T(e,s),e.prototype.getClassName=function(){return\"StereoscopicFreeCamera\"},e})(a.FreeCamera);a.StereoscopicFreeCamera=r})($a||($a={})),(function(a){a.Node.AddNodeConstructor(\"StereoscopicGamepadCamera\",(function(e,t,i){return function(){return new r(e,a.Vector3.Zero(),i.interaxial_distance,i.isStereoscopicSideBySide,t)}}));var r=(function(s){function e(e,t,i,r,n){var o=s.call(this,e,t,n)||this;return o.interaxialDistance=i,o.isStereoscopicSideBySide=r,o.setCameraRigMode(r?a.Camera.RIG_MODE_STEREOSCOPIC_SIDEBYSIDE_PARALLEL:a.Camera.RIG_MODE_STEREOSCOPIC_OVERUNDER,{interaxialDistance:i}),o}return T(e,s),e.prototype.getClassName=function(){return\"StereoscopicGamepadCamera\"},e})(a.GamepadCamera);a.StereoscopicGamepadCamera=r})($a||($a={})),(function(a){a.Node.AddNodeConstructor(\"StereoscopicFreeCamera\",(function(e,t,i){return function(){return new r(e,a.Vector3.Zero(),i.interaxial_distance,i.isStereoscopicSideBySide,t)}}));var r=(function(s){function e(e,t,i,r,n){var o=s.call(this,e,t,n)||this;return o.interaxialDistance=i,o.isStereoscopicSideBySide=r,o.setCameraRigMode(r?a.Camera.RIG_MODE_STEREOSCOPIC_SIDEBYSIDE_PARALLEL:a.Camera.RIG_MODE_STEREOSCOPIC_OVERUNDER,{interaxialDistance:i}),o}return T(e,s),e.prototype.getClassName=function(){return\"StereoscopicUniversalCamera\"},e})(a.UniversalCamera);a.StereoscopicUniversalCamera=r})($a||($a={})),Ws=$a||($a={}),Hs=(function(o){function e(e,t,i,r){var n=o.call(this,e,\"vrDistortionCorrection\",[\"LensCenter\",\"Scale\",\"ScaleIn\",\"HmdWarpParam\"],null,r.postProcessScaleFactor,t,Ws.Texture.BILINEAR_SAMPLINGMODE)||this;return n._isRightEye=i,n._distortionFactors=r.distortionK,n._postProcessScaleFactor=r.postProcessScaleFactor,n._lensCenterOffset=r.lensCenterOffset,n.adaptScaleToCurrentViewport=!0,n.onSizeChangedObservable.add((function(){n._scaleIn=new Ws.Vector2(2,2/n.aspectRatio),n._scaleFactor=new Ws.Vector2(1/n._postProcessScaleFactor*.5,1/n._postProcessScaleFactor*.5*n.aspectRatio),n._lensCenter=new Ws.Vector2(n._isRightEye?.5-.5*n._lensCenterOffset:.5+.5*n._lensCenterOffset,.5)})),n.onApplyObservable.add((function(e){e.setFloat2(\"LensCenter\",n._lensCenter.x,n._lensCenter.y),e.setFloat2(\"Scale\",n._scaleFactor.x,n._scaleFactor.y),e.setFloat2(\"ScaleIn\",n._scaleIn.x,n._scaleIn.y),e.setFloat4(\"HmdWarpParam\",n._distortionFactors[0],n._distortionFactors[1],n._distortionFactors[2],n._distortionFactors[3])})),n}return T(e,o),e})(Ws.PostProcess),Ws.VRDistortionCorrectionPostProcess=Hs,Xs=$a||($a={}),js=(function(){function e(){var t=this;this._screenOrientationAngle=0,this._screenQuaternion=new Xs.Quaternion,this._alpha=0,this._beta=0,this._gamma=0,this._orientationChanged=function(){t._screenOrientationAngle=void 0!==window.orientation?+window.orientation:window.screen.orientation&&window.screen.orientation.angle?window.screen.orientation.angle:0,t._screenOrientationAngle=-Xs.Tools.ToRadians(t._screenOrientationAngle/2),t._screenQuaternion.copyFromFloats(0,Math.sin(t._screenOrientationAngle),0,Math.cos(t._screenOrientationAngle))},this._deviceOrientation=function(e){t._alpha=null!==e.alpha?e.alpha:0,t._beta=null!==e.beta?e.beta:0,t._gamma=null!==e.gamma?e.gamma:0},this._constantTranform=new Xs.Quaternion(-Math.sqrt(.5),0,0,Math.sqrt(.5)),this._orientationChanged()}return Object.defineProperty(e.prototype,\"camera\",{get:function(){return this._camera},set:function(e){this._camera=e,null==this._camera||this._camera.rotationQuaternion||(this._camera.rotationQuaternion=new Xs.Quaternion)},enumerable:!0,configurable:!0}),e.prototype.attachControl=function(e,t){window.addEventListener(\"orientationchange\",this._orientationChanged),window.addEventListener(\"deviceorientation\",this._deviceOrientation),this._orientationChanged()},e.prototype.detachControl=function(e){window.removeEventListener(\"orientationchange\",this._orientationChanged),window.removeEventListener(\"deviceorientation\",this._deviceOrientation)},e.prototype.checkInputs=function(){this._alpha&&(Xs.Quaternion.RotationYawPitchRollToRef(Xs.Tools.ToRadians(this._alpha),Xs.Tools.ToRadians(this._beta),-Xs.Tools.ToRadians(this._gamma),this.camera.rotationQuaternion),this._camera.rotationQuaternion.multiplyInPlace(this._screenQuaternion),this._camera.rotationQuaternion.multiplyInPlace(this._constantTranform),this._camera.rotationQuaternion.z*=-1,this._camera.rotationQuaternion.w*=-1)},e.prototype.getClassName=function(){return\"FreeCameraDeviceOrientationInput\"},e.prototype.getSimpleName=function(){return\"deviceOrientation\"},e})(),Xs.FreeCameraDeviceOrientationInput=js,Xs.CameraInputTypes.FreeCameraDeviceOrientationInput=js,Ys=$a||($a={}),Ks=(function(){function e(){this.alphaCorrection=1,this.betaCorrection=1,this.gammaCorrection=1,this._alpha=0,this._gamma=0,this._dirty=!1,this._deviceOrientationHandler=this._onOrientationEvent.bind(this)}return e.prototype.attachControl=function(e,t){this.camera.attachControl(e,t),window.addEventListener(\"deviceorientation\",this._deviceOrientationHandler)},e.prototype._onOrientationEvent=function(e){null!==e.alpha&&(this._alpha=0|+e.alpha),null!==e.gamma&&(this._gamma=0|+e.gamma),this._dirty=!0},e.prototype.checkInputs=function(){this._dirty&&(this._dirty=!1,this._gamma<0&&(this._gamma=180+this._gamma),this.camera.alpha=-this._alpha/180*Math.PI%Math.PI*2,this.camera.beta=this._gamma/180*Math.PI)},e.prototype.detachControl=function(e){window.removeEventListener(\"deviceorientation\",this._deviceOrientationHandler)},e.prototype.getClassName=function(){return\"ArcRotateCameraVRDeviceOrientationInput\"},e.prototype.getSimpleName=function(){return\"VRDeviceOrientation\"},e})(),Ys.ArcRotateCameraVRDeviceOrientationInput=Ks,Ys.CameraInputTypes.ArcRotateCameraVRDeviceOrientationInput=Ks,Qs=$a||($a={}),Zs=(function(){function t(){this.compensateDistortion=!0}return Object.defineProperty(t.prototype,\"aspectRatio\",{get:function(){return this.hResolution/(2*this.vResolution)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,\"aspectRatioFov\",{get:function(){return 2*Math.atan(this.postProcessScaleFactor*this.vScreenSize/(2*this.eyeToScreenDistance))},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,\"leftHMatrix\",{get:function(){var e=4*(this.hScreenSize/4-this.lensSeparationDistance/2)/this.hScreenSize;return Qs.Matrix.Translation(e,0,0)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,\"rightHMatrix\",{get:function(){var e=4*(this.hScreenSize/4-this.lensSeparationDistance/2)/this.hScreenSize;return Qs.Matrix.Translation(-e,0,0)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,\"leftPreViewMatrix\",{get:function(){return Qs.Matrix.Translation(.5*this.interpupillaryDistance,0,0)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,\"rightPreViewMatrix\",{get:function(){return Qs.Matrix.Translation(-.5*this.interpupillaryDistance,0,0)},enumerable:!0,configurable:!0}),t.GetDefault=function(){var e=new t;return e.hResolution=1280,e.vResolution=800,e.hScreenSize=.149759993,e.vScreenSize=.0935999975,e.vScreenCenter=.0467999987,e.eyeToScreenDistance=.0410000011,e.lensSeparationDistance=.063500002,e.interpupillaryDistance=.064000003,e.distortionK=[1,.219999999,.239999995,0],e.chromaAbCorrection=[.995999992,-.00400000019,1.01400006,0],e.postProcessScaleFactor=1.714605507808412,e.lensCenterOffset=.151976421,e},t})(),Qs.VRCameraMetrics=Zs,(function(a){a.Node.AddNodeConstructor(\"WebVRFreeCamera\",(function(e,t){return function(){return new i(e,a.Vector3.Zero(),t)}})),a.Node.AddNodeConstructor(\"WebVRGamepadCamera\",(function(e,t){return function(){return new i(e,a.Vector3.Zero(),t)}}));var i=(function(s){function e(e,t,i,r){void 0===r&&(r={});var n=s.call(this,e,t,i)||this;n.webVROptions=r,n._vrDevice=null,n.rawPose=null,n._specsVersion=\"1.1\",n._attached=!1,n._descendants=[],n._deviceRoomPosition=a.Vector3.Zero(),n._deviceRoomRotationQuaternion=a.Quaternion.Identity(),n._standingMatrix=null,n.devicePosition=a.Vector3.Zero(),n.deviceRotationQuaternion=a.Quaternion.Identity(),n.deviceScaleFactor=1,n._deviceToWorld=a.Matrix.Identity(),n._worldToDevice=a.Matrix.Identity(),n.controllers=[],n.onControllersAttachedObservable=new a.Observable,n.onControllerMeshLoadedObservable=new a.Observable,n.onPoseUpdatedFromDeviceObservable=new a.Observable,n._poseSet=!1,n.rigParenting=!0,n._defaultHeight=void 0,n._htmlElementAttached=null,n._detachIfAttached=function(){var e=n.getEngine().getVRDevice();e&&!e.isPresenting&&n._htmlElementAttached&&n.detachControl(n._htmlElementAttached)},n._workingVector=a.Vector3.Zero(),n._oneVector=a.Vector3.One(),n._workingMatrix=a.Matrix.Identity(),n._tmpMatrix=new a.Matrix,n._cache.position=a.Vector3.Zero(),r.defaultHeight&&(n._defaultHeight=r.defaultHeight,n.position.y=n._defaultHeight),n.minZ=.1,5===arguments.length&&(n.webVROptions=arguments[4]),null==n.webVROptions.trackPosition&&(n.webVROptions.trackPosition=!0),null==n.webVROptions.controllerMeshes&&(n.webVROptions.controllerMeshes=!0),null==n.webVROptions.defaultLightingOnControllers&&(n.webVROptions.defaultLightingOnControllers=!0),n.rotationQuaternion=new a.Quaternion,n.webVROptions&&n.webVROptions.positionScale&&(n.deviceScaleFactor=n.webVROptions.positionScale);var o=n.getEngine();return n._onVREnabled=function(e){e&&n.initControllers()},o.onVRRequestPresentComplete.add(n._onVREnabled),o.initWebVR().add((function(e){e.vrDisplay&&n._vrDevice!==e.vrDisplay&&(n._vrDevice=e.vrDisplay,n.setCameraRigMode(a.Camera.RIG_MODE_WEBVR,{parentCamera:n,vrDisplay:n._vrDevice,frameData:n._frameData,specs:n._specsVersion}),n._attached&&n.getEngine().enableVR())})),\"undefined\"!=typeof VRFrameData&&(n._frameData=new VRFrameData),i.onBeforeCameraRenderObservable.add((function(t){t.parent===n&&n.rigParenting&&(n._descendants=n.getDescendants(!0,(function(t){var e=n.controllers.some((function(e){return e._mesh===t})),i=-1!==n._rigCameras.indexOf(t);return!e&&!i})),n._descendants.forEach((function(e){e.parent=t})))})),i.onAfterCameraRenderObservable.add((function(e){e.parent===n&&n.rigParenting&&n._descendants.forEach((function(e){e.parent=n}))})),n}return T(e,s),e.prototype.deviceDistanceToRoomGround=function(){return this._standingMatrix?(this._standingMatrix.getTranslationToRef(this._workingVector),this._deviceRoomPosition.y+this._workingVector.y):this._defaultHeight||0},e.prototype.useStandingMatrix=function(t){var i=this;void 0===t&&(t=function(e){}),this.getEngine().initWebVRAsync().then((function(e){e.vrDisplay&&e.vrDisplay.stageParameters&&e.vrDisplay.stageParameters.sittingToStandingTransform&&i.webVROptions.trackPosition?(i._standingMatrix=new a.Matrix,a.Matrix.FromFloat32ArrayToRefScaled(e.vrDisplay.stageParameters.sittingToStandingTransform,0,1,i._standingMatrix),i.getScene().useRightHandedSystem||[2,6,8,9,14].forEach((function(e){i._standingMatrix&&(i._standingMatrix.m[e]*=-1)})),t(!0)):t(!1)}))},e.prototype.useStandingMatrixAsync=function(){var i=this;return new Promise(function(t,e){i.useStandingMatrix((function(e){t(e)}))})},e.prototype.dispose=function(){this._detachIfAttached(),this.getEngine().onVRRequestPresentComplete.removeCallback(this._onVREnabled),this._updateCacheWhenTrackingDisabledObserver&&this._scene.onBeforeRenderObservable.remove(this._updateCacheWhenTrackingDisabledObserver),s.prototype.dispose.call(this)},e.prototype.getControllerByName=function(e){for(var t=0,i=this.controllers;t<i.length;t++){var r=i[t];if(r.hand===e)return r}return null},Object.defineProperty(e.prototype,\"leftController\",{get:function(){return this._leftController||(this._leftController=this.getControllerByName(\"left\")),this._leftController},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,\"rightController\",{get:function(){return this._rightController||(this._rightController=this.getControllerByName(\"right\")),this._rightController},enumerable:!0,configurable:!0}),e.prototype.getForwardRay=function(e){return void 0===e&&(e=100),this.leftCamera?s.prototype.getForwardRay.call(this,e,this.leftCamera.getWorldMatrix(),this.leftCamera.globalPosition):s.prototype.getForwardRay.call(this,e)},e.prototype._checkInputs=function(){this._vrDevice&&this._vrDevice.isPresenting&&(this._vrDevice.getFrameData(this._frameData),this.updateFromDevice(this._frameData.pose)),s.prototype._checkInputs.call(this)},e.prototype.updateFromDevice=function(e){e&&e.orientation&&(this.rawPose=e,this._deviceRoomRotationQuaternion.copyFromFloats(e.orientation[0],e.orientation[1],-e.orientation[2],-e.orientation[3]),this.getScene().useRightHandedSystem&&(this._deviceRoomRotationQuaternion.z*=-1,this._deviceRoomRotationQuaternion.w*=-1),this.webVROptions.trackPosition&&this.rawPose.position&&(this._deviceRoomPosition.copyFromFloats(this.rawPose.position[0],this.rawPose.position[1],-this.rawPose.position[2]),this.getScene().useRightHandedSystem&&(this._deviceRoomPosition.z*=-1)),this._poseSet=!0)},e.prototype.attachControl=function(e,t){s.prototype.attachControl.call(this,e,t),this._attached=!0,this._htmlElementAttached=e,t=!a.Camera.ForceAttachControlToAlwaysPreventDefault&&t,this._vrDevice&&this.getEngine().enableVR(),window.addEventListener(\"vrdisplaypresentchange\",this._detachIfAttached)},e.prototype.detachControl=function(e){this.getScene().gamepadManager.onGamepadConnectedObservable.remove(this._onGamepadConnectedObserver),this.getScene().gamepadManager.onGamepadDisconnectedObservable.remove(this._onGamepadDisconnectedObserver),s.prototype.detachControl.call(this,e),this._attached=!1,this.getEngine().disableVR(),window.removeEventListener(\"vrdisplaypresentchange\",this._detachIfAttached)},e.prototype.getClassName=function(){return\"WebVRFreeCamera\"},e.prototype.resetToCurrentRotation=function(){this._vrDevice.resetPose()},e.prototype._updateRigCameras=function(){var e=this._rigCameras[0],t=this._rigCameras[1];e.rotationQuaternion.copyFrom(this._deviceRoomRotationQuaternion),t.rotationQuaternion.copyFrom(this._deviceRoomRotationQuaternion),e.position.copyFrom(this._deviceRoomPosition),t.position.copyFrom(this._deviceRoomPosition)},e.prototype._correctPositionIfNotTrackPosition=function(e,t){void 0===t&&(t=!1),this.rawPose&&this.rawPose.position&&!this.webVROptions.trackPosition&&(a.Matrix.TranslationToRef(this.rawPose.position[0],this.rawPose.position[1],-this.rawPose.position[2],this._tmpMatrix),t||this._tmpMatrix.invert(),this._tmpMatrix.multiplyToRef(e,e))},e.prototype._updateCache=function(e){var t=this;this.rotationQuaternion.equals(this._cache.rotationQuaternion)&&this.position.equals(this._cache.position)||(this.updateCacheCalled||(this.updateCacheCalled=!0,this.update()),this.rotationQuaternion.toRotationMatrix(this._workingMatrix),a.Vector3.TransformCoordinatesToRef(this._deviceRoomPosition,this._workingMatrix,this._workingVector),this.devicePosition.subtractToRef(this._workingVector,this._workingVector),a.Matrix.ComposeToRef(this._oneVector,this.rotationQuaternion,this._workingVector,this._deviceToWorld),this._deviceToWorld.getTranslationToRef(this._workingVector),this._workingVector.addInPlace(this.position),this._workingVector.subtractInPlace(this._cache.position),this._deviceToWorld.setTranslation(this._workingVector),this._deviceToWorld.invertToRef(this._worldToDevice),this.controllers.forEach((function(e){e._deviceToWorld.copyFrom(t._deviceToWorld),t._correctPositionIfNotTrackPosition(e._deviceToWorld),e.update()}))),e||s.prototype._updateCache.call(this),this.updateCacheCalled=!1},e.prototype._computeDevicePosition=function(){a.Vector3.TransformCoordinatesToRef(this._deviceRoomPosition,this._deviceToWorld,this.devicePosition)},e.prototype.update=function(){this._computeDevicePosition(),a.Matrix.FromQuaternionToRef(this._deviceRoomRotationQuaternion,this._workingMatrix),this._workingMatrix.multiplyToRef(this._deviceToWorld,this._workingMatrix),a.Quaternion.FromRotationMatrixToRef(this._workingMatrix,this.deviceRotationQuaternion),this._poseSet&&this.onPoseUpdatedFromDeviceObservable.notifyObservers(null),s.prototype.update.call(this)},e.prototype._getViewMatrix=function(){return a.Matrix.Identity()},e.prototype._getWebVRViewMatrix=function(){var t=this,e=this._cameraRigParams.parentCamera;e._updateCache();var i=this._cameraRigParams.left?this._cameraRigParams.frameData.leftViewMatrix:this._cameraRigParams.frameData.rightViewMatrix;return a.Matrix.FromArrayToRef(i,0,this._webvrViewMatrix),this.getScene().useRightHandedSystem||[2,6,8,9,14].forEach((function(e){t._webvrViewMatrix.m[e]*=-1})),this._webvrViewMatrix.getRotationMatrixToRef(this._cameraRotationMatrix),a.Vector3.TransformCoordinatesToRef(this._referencePoint,this._cameraRotationMatrix,this._transformedReferencePoint),this.position.addToRef(this._transformedReferencePoint,this._currentTarget),1!==e.deviceScaleFactor&&(this._webvrViewMatrix.invert(),e.deviceScaleFactor&&(this._webvrViewMatrix.m[12]*=e.deviceScaleFactor,this._webvrViewMatrix.m[13]*=e.deviceScaleFactor,this._webvrViewMatrix.m[14]*=e.deviceScaleFactor),this._webvrViewMatrix.invert()),e._correctPositionIfNotTrackPosition(this._webvrViewMatrix,!0),e._worldToDevice.multiplyToRef(this._webvrViewMatrix,this._webvrViewMatrix),this._workingMatrix=this._workingMatrix||a.Matrix.Identity(),this._webvrViewMatrix.invertToRef(this._workingMatrix),this._workingMatrix.multiplyToRef(e.getWorldMatrix(),this._workingMatrix),this._workingMatrix.getTranslationToRef(this._globalPosition),this._markSyncedWithParent(),this._webvrViewMatrix},e.prototype._getWebVRProjectionMatrix=function(){var t=this,e=this.parent;e._vrDevice.depthNear=e.minZ,e._vrDevice.depthFar=e.maxZ;var i=this._cameraRigParams.left?this._cameraRigParams.frameData.leftProjectionMatrix:this._cameraRigParams.frameData.rightProjectionMatrix;return a.Matrix.FromArrayToRef(i,0,this._projectionMatrix),this.getScene().useRightHandedSystem||[8,9,10,11].forEach((function(e){t._projectionMatrix.m[e]*=-1})),this._projectionMatrix},e.prototype.initControllers=function(){var n=this;this.controllers=[];var e=this.getScene().gamepadManager;this._onGamepadDisconnectedObserver=e.onGamepadDisconnectedObservable.add((function(e){if(e.type===a.Gamepad.POSE_ENABLED){var t=e;t.defaultModel&&t.defaultModel.setEnabled(!1),\"right\"===t.hand&&(n._rightController=null),\"left\"===t.hand&&(n._leftController=null);var i=n.controllers.indexOf(t);-1!==i&&n.controllers.splice(i,1)}})),this._onGamepadConnectedObserver=e.onGamepadConnectedObservable.add((function(e){if(e.type===a.Gamepad.POSE_ENABLED){var t=e;if(n.webVROptions.trackPosition||(t._disableTrackPosition(new a.Vector3(\"left\"==t.hand?-.15:.15,-.5,.25)),n._updateCacheWhenTrackingDisabledObserver||(n._updateCacheWhenTrackingDisabledObserver=n._scene.onBeforeRenderObservable.add((function(){n._updateCache()})))),t.deviceScaleFactor=n.deviceScaleFactor,t._deviceToWorld.copyFrom(n._deviceToWorld),n._correctPositionIfNotTrackPosition(t._deviceToWorld),n.webVROptions.controllerMeshes&&(t.defaultModel?t.defaultModel.setEnabled(!0):t.initControllerMesh(n.getScene(),(function(e){if(e.scaling.scaleInPlace(n.deviceScaleFactor),n.onControllerMeshLoadedObservable.notifyObservers(t),n.webVROptions.defaultLightingOnControllers){n._lightOnControllers||(n._lightOnControllers=new a.HemisphericLight(\"vrControllersLight\",new a.Vector3(0,1,0),n.getScene()));var r=function(e,t){var i=e.getChildren();i&&0!==i.length&&i.forEach((function(e){t.includedOnlyMeshes.push(e),r(e,t)}))};n._lightOnControllers.includedOnlyMeshes.push(e),r(e,n._lightOnControllers)}}))),t.attachToPoseControlledCamera(n),-1===n.controllers.indexOf(t)){n.controllers.push(t);for(var i=!1,r=0;r<n.controllers.length;r++)n.controllers[r].controllerType===a.PoseEnabledControllerType.VIVE&&(i?n.controllers[r].hand=\"right\":(i=!0,n.controllers[r].hand=\"left\"));2<=n.controllers.length&&n.onControllersAttachedObservable.notifyObservers(n.controllers)}}}))},e})(a.FreeCamera);a.WebVRFreeCamera=i})($a||($a={})),(function(o){o.Node.AddNodeConstructor(\"DeviceOrientationCamera\",(function(e,t){return function(){return new i(e,o.Vector3.Zero(),t)}}));var i=(function(n){function e(e,t,i){var r=n.call(this,e,t,i)||this;return r._quaternionCache=new o.Quaternion,r.inputs.addDeviceOrientation(),r}return T(e,n),e.prototype.getClassName=function(){return\"DeviceOrientationCamera\"},e.prototype._checkInputs=function(){n.prototype._checkInputs.call(this),this._quaternionCache.copyFrom(this.rotationQuaternion),this._initialQuaternion&&this._initialQuaternion.multiplyToRef(this.rotationQuaternion,this.rotationQuaternion)},e.prototype.resetToCurrentRotation=function(t){var i=this;void 0===t&&(t=o.Axis.Y),this.rotationQuaternion&&(this._initialQuaternion||(this._initialQuaternion=new o.Quaternion),this._initialQuaternion.copyFrom(this._quaternionCache||this.rotationQuaternion),[\"x\",\"y\",\"z\"].forEach((function(e){t[e]?i._initialQuaternion[e]*=-1:i._initialQuaternion[e]=0})),this._initialQuaternion.normalize(),this._initialQuaternion.multiplyToRef(this.rotationQuaternion,this.rotationQuaternion))},e})(o.FreeCamera);o.DeviceOrientationCamera=i})($a||($a={})),(function(a){a.Node.AddNodeConstructor(\"VRDeviceOrientationFreeCamera\",(function(e,t){return function(){return new i(e,a.Vector3.Zero(),t)}}));var i=(function(s){function e(e,t,i,r,n){void 0===r&&(r=!0),void 0===n&&(n=a.VRCameraMetrics.GetDefault());var o=s.call(this,e,t,i)||this;return n.compensateDistortion=r,o.setCameraRigMode(a.Camera.RIG_MODE_VR,{vrCameraMetrics:n}),o}return T(e,s),e.prototype.getClassName=function(){return\"VRDeviceOrientationFreeCamera\"},e})(a.DeviceOrientationCamera);a.VRDeviceOrientationFreeCamera=i})($a||($a={})),(function(h){h.Node.AddNodeConstructor(\"VRDeviceOrientationFreeCamera\",(function(e,t){return function(){return new i(e,0,0,1,h.Vector3.Zero(),t)}}));var i=(function(c){function e(e,t,i,r,n,o,s,a){void 0===s&&(s=!0),void 0===a&&(a=h.VRCameraMetrics.GetDefault());var l=c.call(this,e,t,i,r,n,o)||this;return a.compensateDistortion=s,l.setCameraRigMode(h.Camera.RIG_MODE_VR,{vrCameraMetrics:a}),l.inputs.addVRDeviceOrientation(),l}return T(e,c),e.prototype.getClassName=function(){return\"VRDeviceOrientationArcRotateCamera\"},e})(h.ArcRotateCamera);h.VRDeviceOrientationArcRotateCamera=i})($a||($a={})),(function(a){a.Node.AddNodeConstructor(\"VRDeviceOrientationGamepadCamera\",(function(e,t){return function(){return new i(e,a.Vector3.Zero(),t)}}));var i=(function(s){function e(e,t,i,r,n){void 0===r&&(r=!0),void 0===n&&(n=a.VRCameraMetrics.GetDefault());var o=s.call(this,e,t,i,r,n)||this;return o.inputs.addGamepad(),o}return T(e,s),e.prototype.getClassName=function(){return\"VRDeviceOrientationGamepadCamera\"},e})(a.VRDeviceOrientationFreeCamera);a.VRDeviceOrientationGamepadCamera=i})($a||($a={})),qs=$a||($a={}),Js=(function(){function r(e,t){if(void 0===t&&(t=null),this.scene=e,this._pointerDownOnMeshAsked=!1,this._isActionableMesh=!1,this._teleportationRequestInitiated=!1,this._teleportationBackRequestInitiated=!1,this._rotationRightAsked=!1,this._rotationLeftAsked=!1,this._dpadPressed=!0,this._activePointer=!1,this._id=r._idCounter++,t)this._gazeTracker=t.clone(\"gazeTracker\");else{this._gazeTracker=qs.Mesh.CreateTorus(\"gazeTracker\",.0035,.0025,20,e,!1),this._gazeTracker.bakeCurrentTransformIntoVertices(),this._gazeTracker.isPickable=!1,this._gazeTracker.isVisible=!1;var i=new qs.StandardMaterial(\"targetMat\",e);i.specularColor=qs.Color3.Black(),i.emissiveColor=new qs.Color3(.7,.7,.7),i.backFaceCulling=!1,this._gazeTracker.material=i}}return r.prototype._getForwardRay=function(e){return new qs.Ray(qs.Vector3.Zero(),new qs.Vector3(0,0,e))},r.prototype._selectionPointerDown=function(){this._pointerDownOnMeshAsked=!0,this._currentHit&&this.scene.simulatePointerDown(this._currentHit,{pointerId:this._id})},r.prototype._selectionPointerUp=function(){this._currentHit&&this.scene.simulatePointerUp(this._currentHit,{pointerId:this._id}),this._pointerDownOnMeshAsked=!1},r.prototype._activatePointer=function(){this._activePointer=!0},r.prototype._deactivatePointer=function(){this._activePointer=!1},r.prototype._updatePointerDistance=function(e){void 0===e&&(e=100)},r.prototype.dispose=function(){this._interactionsEnabled=!1,this._teleportationEnabled=!1,this._gazeTracker&&this._gazeTracker.dispose()},r._idCounter=0,r})(),$s=(function(a){function e(e,t,i){var r=a.call(this,t,i)||this;r.webVRController=e,r._laserPointer=qs.Mesh.CreateCylinder(\"laserPointer\",1,.004,2e-4,20,1,t,!1);var n=new qs.StandardMaterial(\"laserPointerMat\",t);if(n.emissiveColor=new qs.Color3(.7,.7,.7),n.alpha=.6,r._laserPointer.material=n,r._laserPointer.rotation.x=Math.PI/2,r._laserPointer.position.z=-.5,r._laserPointer.isVisible=!1,r._laserPointer.isPickable=!1,!e.mesh){var o=new qs.Mesh(\"preloadControllerMesh\",t),s=new qs.Mesh(qs.PoseEnabledController.POINTING_POSE,t);s.rotation.x=-.7,o.addChild(s),e.attachToMesh(o)}return r._setLaserPointerParent(e.mesh),r._meshAttachedObserver=e._meshAttachedObservable.add((function(e){r._setLaserPointerParent(e)})),r}return T(e,a),e.prototype._getForwardRay=function(e){return this.webVRController.getForwardRay(e)},e.prototype._activatePointer=function(){a.prototype._activatePointer.call(this),this._laserPointer.isVisible=!0},e.prototype._deactivatePointer=function(){a.prototype._deactivatePointer.call(this),this._laserPointer.isVisible=!1},e.prototype._setLaserPointerColor=function(e){this._laserPointer.material.emissiveColor=e},e.prototype._setLaserPointerParent=function(e){var t=function(e){e.isPickable=!1,e.getChildMeshes().forEach((function(e){t(e)}))};t(e);var i=e.getChildMeshes();this.webVRController._pointingPoseNode=null;for(var r=0;r<i.length;r++)if(i[r].name&&0<=i[r].name.indexOf(qs.PoseEnabledController.POINTING_POSE)){e=i[r],this.webVRController._pointingPoseNode=e;break}this._laserPointer.parent=e},e.prototype._updatePointerDistance=function(e){void 0===e&&(e=100),this._laserPointer.scaling.y=e,this._laserPointer.position.z=-e/2},e.prototype.dispose=function(){a.prototype.dispose.call(this),this._laserPointer.dispose(),this._meshAttachedObserver&&this.webVRController._meshAttachedObservable.remove(this._meshAttachedObserver)},e})(Js),ea=(function(r){function e(e,t){var i=r.call(this,t)||this;return i.getCamera=e,i}return T(e,r),e.prototype._getForwardRay=function(e){var t=this.getCamera();return t?t.getForwardRay(e):new qs.Ray(qs.Vector3.Zero(),qs.Vector3.Forward())},e})(Js),ta=(function(){function e(e,t){void 0===t&&(t={});var r=this;if(this.webVROptions=t,this._webVRsupported=!1,this._webVRready=!1,this._webVRrequesting=!1,this._webVRpresenting=!1,this._fullscreenVRpresenting=!1,this.onEnteringVRObservable=new qs.Observable,this.onExitingVRObservable=new qs.Observable,this.onControllerMeshLoadedObservable=new qs.Observable,this._useCustomVRButton=!1,this._teleportationRequested=!1,this._teleportActive=!1,this._floorMeshesCollection=[],this._rotationAllowed=!0,this._teleportBackwardsVector=new qs.Vector3(0,-1,-1),this._isDefaultTeleportationTarget=!0,this._teleportationFillColor=\"#444444\",this._teleportationBorderColor=\"#FFFFFF\",this._rotationAngle=0,this._haloCenter=new qs.Vector3(0,0,0),this._padSensibilityUp=.65,this._padSensibilityDown=.35,this._leftController=null,this._rightController=null,this.onNewMeshSelected=new qs.Observable,this.onNewMeshPicked=new qs.Observable,this.onBeforeCameraTeleport=new qs.Observable,this.onAfterCameraTeleport=new qs.Observable,this.onSelectedMeshUnselected=new qs.Observable,this.teleportationEnabled=!0,this._teleportationInitialized=!1,this._interactionsEnabled=!1,this._interactionsRequested=!1,this._displayGaze=!0,this._displayLaserPointer=!0,this.updateGazeTrackerScale=!0,this._onResize=function(){r.moveButtonToBottomRight(),r._fullscreenVRpresenting&&r._webVRready&&r.exitVR()},this._onFullscreenChange=function(){void 0!==document.fullscreen?r._fullscreenVRpresenting=document.fullscreen:void 0!==document.mozFullScreen?r._fullscreenVRpresenting=document.mozFullScreen:void 0!==document.webkitIsFullScreen?r._fullscreenVRpresenting=document.webkitIsFullScreen:void 0!==document.msIsFullScreen?r._fullscreenVRpresenting=document.msIsFullScreen:void 0!==document.msFullscreenElement&&(r._fullscreenVRpresenting=document.msFullscreenElement),!r._fullscreenVRpresenting&&r._canvas&&(r.exitVR(),r._useCustomVRButton||(r._btnVR.style.top=r._canvas.offsetTop+r._canvas.offsetHeight-70+\"px\",r._btnVR.style.left=r._canvas.offsetLeft+r._canvas.offsetWidth-100+\"px\"))},this.beforeRender=function(){r._leftController&&r._leftController._activePointer&&r._castRayAndSelectObject(r._leftController),r._rightController&&r._rightController._activePointer&&r._castRayAndSelectObject(r._rightController),r._noControllerIsActive?r._castRayAndSelectObject(r._cameraGazer):r._cameraGazer._gazeTracker.isVisible=!1},this._onNewGamepadConnected=function(e){if(e.type!==qs.Gamepad.POSE_ENABLED)e.leftStick&&e.onleftstickchanged((function(e){r._teleportationInitialized&&r.teleportationEnabled&&(!r._leftController&&!r._rightController||r._leftController&&!r._leftController._activePointer&&r._rightController&&!r._rightController._activePointer)&&(r._checkTeleportWithRay(e,r._cameraGazer),r._checkTeleportBackwards(e,r._cameraGazer))})),e.rightStick&&e.onrightstickchanged((function(e){r._teleportationInitialized&&r._checkRotate(e,r._cameraGazer)})),e.type===qs.Gamepad.XBOX&&(e.onbuttondown((function(e){r._interactionsEnabled&&e===qs.Xbox360Button.A&&r._cameraGazer._selectionPointerDown()})),e.onbuttonup((function(e){r._interactionsEnabled&&e===qs.Xbox360Button.A&&r._cameraGazer._selectionPointerUp()})));else{var t=e,i=new $s(t,r._scene,r._cameraGazer._gazeTracker);\"right\"===t.hand||r._leftController&&r._leftController.webVRController!=t?r._rightController=i:r._leftController=i,r._tryEnableInteractionOnController(i)}},this._tryEnableInteractionOnController=function(e){r._interactionsRequested&&!e._interactionsEnabled&&r._enableInteractionOnController(e),r._teleportationRequested&&!e._teleportationEnabled&&r._enableTeleportationOnController(e)},this._onNewGamepadDisconnected=function(e){e instanceof qs.WebVRController&&(\"left\"===e.hand&&null!=r._leftController&&(r._leftController.dispose(),r._leftController=null),\"right\"===e.hand&&null!=r._rightController&&(r._rightController.dispose(),r._rightController=null))},this._workingVector=qs.Vector3.Zero(),this._workingQuaternion=qs.Quaternion.Identity(),this._workingMatrix=qs.Matrix.Identity(),this._scene=e,this._canvas=e.getEngine().getRenderingCanvas(),void 0===t.createFallbackVRDeviceOrientationFreeCamera&&(t.createFallbackVRDeviceOrientationFreeCamera=!0),void 0===t.createDeviceOrientationCamera&&(t.createDeviceOrientationCamera=!0),void 0===t.laserToggle&&(t.laserToggle=!0),void 0===t.defaultHeight&&(t.defaultHeight=1.7),t.useCustomVRButton&&(this._useCustomVRButton=!0,t.customVRButton&&(this._btnVR=t.customVRButton)),t.rayLength&&(this._rayLength=t.rayLength),this._defaultHeight=t.defaultHeight,t.positionScale&&(this._rayLength*=t.positionScale,this._defaultHeight*=t.positionScale),this._hasEnteredVR=!1,this._scene.activeCamera?this._position=this._scene.activeCamera.position.clone():this._position=new qs.Vector3(0,this._defaultHeight,0),t.createDeviceOrientationCamera||!this._scene.activeCamera){if(this._deviceOrientationCamera=new qs.DeviceOrientationCamera(\"deviceOrientationVRHelper\",this._position.clone(),e),this._scene.activeCamera&&(this._deviceOrientationCamera.minZ=this._scene.activeCamera.minZ,this._deviceOrientationCamera.maxZ=this._scene.activeCamera.maxZ,this._scene.activeCamera instanceof qs.TargetCamera&&this._scene.activeCamera.rotation)){var i=this._scene.activeCamera;i.rotationQuaternion?this._deviceOrientationCamera.rotationQuaternion.copyFrom(i.rotationQuaternion):this._deviceOrientationCamera.rotationQuaternion.copyFrom(qs.Quaternion.RotationYawPitchRoll(i.rotation.y,i.rotation.x,i.rotation.z)),this._deviceOrientationCamera.rotation=i.rotation.clone()}this._scene.activeCamera=this._deviceOrientationCamera,this._canvas&&this._scene.activeCamera.attachControl(this._canvas)}else this._existingCamera=this._scene.activeCamera;if(t.createFallbackVRDeviceOrientationFreeCamera&&(this._vrDeviceOrientationCamera=new qs.VRDeviceOrientationFreeCamera(\"VRDeviceOrientationVRHelper\",this._position,this._scene)),this._webVRCamera=new qs.WebVRFreeCamera(\"WebVRHelper\",this._position,this._scene,t),this._webVRCamera.useStandingMatrix(),this._cameraGazer=new ea(function(){return r.currentVRCamera},e),!this._useCustomVRButton){this._btnVR=document.createElement(\"BUTTON\"),this._btnVR.className=\"babylonVRicon\",this._btnVR.id=\"babylonVRiconbtn\",this._btnVR.title=\"Click to switch to VR\";\".babylonVRicon.vrdisplaypresenting { display: none; }\";var n=document.createElement(\"style\");n.appendChild(document.createTextNode(\".babylonVRicon { position: absolute; right: 20px; height: 50px; width: 80px; background-color: rgba(51,51,51,0.7); background-image: url(data:image/svg+xml;charset=UTF-8,%3Csvg%20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%20width%3D%222048%22%20height%3D%221152%22%20viewBox%3D%220%200%202048%201152%22%20version%3D%221.1%22%3E%3Cpath%20transform%3D%22rotate%28180%201024%2C576.0000000000001%29%22%20d%3D%22m1109%2C896q17%2C0%2030%2C-12t13%2C-30t-12.5%2C-30.5t-30.5%2C-12.5l-170%2C0q-18%2C0%20-30.5%2C12.5t-12.5%2C30.5t13%2C30t30%2C12l170%2C0zm-85%2C256q59%2C0%20132.5%2C-1.5t154.5%2C-5.5t164.5%2C-11.5t163%2C-20t150%2C-30t124.5%2C-41.5q23%2C-11%2042%2C-24t38%2C-30q27%2C-25%2041%2C-61.5t14%2C-72.5l0%2C-257q0%2C-123%20-47%2C-232t-128%2C-190t-190%2C-128t-232%2C-47l-81%2C0q-37%2C0%20-68.5%2C14t-60.5%2C34.5t-55.5%2C45t-53%2C45t-53%2C34.5t-55.5%2C14t-55.5%2C-14t-53%2C-34.5t-53%2C-45t-55.5%2C-45t-60.5%2C-34.5t-68.5%2C-14l-81%2C0q-123%2C0%20-232%2C47t-190%2C128t-128%2C190t-47%2C232l0%2C257q0%2C68%2038%2C115t97%2C73q54%2C24%20124.5%2C41.5t150%2C30t163%2C20t164.5%2C11.5t154.5%2C5.5t132.5%2C1.5zm939%2C-298q0%2C39%20-24.5%2C67t-58.5%2C42q-54%2C23%20-122%2C39.5t-143.5%2C28t-155.5%2C19t-157%2C11t-148.5%2C5t-129.5%2C1.5q-59%2C0%20-130%2C-1.5t-148%2C-5t-157%2C-11t-155.5%2C-19t-143.5%2C-28t-122%2C-39.5q-34%2C-14%20-58.5%2C-42t-24.5%2C-67l0%2C-257q0%2C-106%2040.5%2C-199t110%2C-162.5t162.5%2C-109.5t199%2C-40l81%2C0q27%2C0%2052%2C14t50%2C34.5t51%2C44.5t55.5%2C44.5t63.5%2C34.5t74%2C14t74%2C-14t63.5%2C-34.5t55.5%2C-44.5t51%2C-44.5t50%2C-34.5t52%2C-14l14%2C0q37%2C0%2070%2C0.5t64.5%2C4.5t63.5%2C12t68%2C23q71%2C30%20128.5%2C78.5t98.5%2C110t63.5%2C133.5t22.5%2C149l0%2C257z%22%20fill%3D%22white%22%20/%3E%3C/svg%3E%0A); background-size: 80%; background-repeat:no-repeat; background-position: center; border: none; outline: none; transition: transform 0.125s ease-out } .babylonVRicon:hover { transform: scale(1.05) } .babylonVRicon:active {background-color: rgba(51,51,51,1) } .babylonVRicon:focus {background-color: rgba(51,51,51,1) }.babylonVRicon.vrdisplaypresenting { display: none; }\")),document.getElementsByTagName(\"head\")[0].appendChild(n),this.moveButtonToBottomRight()}this._btnVR&&this._btnVR.addEventListener(\"click\",(function(){r.isInVRMode?r.exitVR():r.enterVR()})),window.addEventListener(\"resize\",this._onResize),document.addEventListener(\"fullscreenchange\",this._onFullscreenChange,!1),document.addEventListener(\"mozfullscreenchange\",this._onFullscreenChange,!1),document.addEventListener(\"webkitfullscreenchange\",this._onFullscreenChange,!1),document.addEventListener(\"msfullscreenchange\",this._onFullscreenChange,!1),document.onmsfullscreenchange=this._onFullscreenChange,t.createFallbackVRDeviceOrientationFreeCamera?this.displayVRButton():this._scene.getEngine().onVRDisplayChangedObservable.add((function(e){e.vrDisplay&&r.displayVRButton()})),this._onKeyDown=function(e){27===e.keyCode&&r.isInVRMode&&r.exitVR()},document.addEventListener(\"keydown\",this._onKeyDown),this._scene.onPrePointerObservable.add((function(e,t){r.isInVRMode&&(r.exitVR(),r._fullscreenVRpresenting&&r._scene.getEngine().switchFullscreen(!0))}),qs.PointerEventTypes.POINTERDOUBLETAP,!1),this._onVRDisplayChanged=function(e){return r.onVRDisplayChanged(e)},this._onVrDisplayPresentChange=function(){return r.onVrDisplayPresentChange()},this._onVRRequestPresentStart=function(){r._webVRrequesting=!0,r.updateButtonVisibility()},this._onVRRequestPresentComplete=function(e){r._webVRrequesting=!1,r.updateButtonVisibility()},e.getEngine().onVRDisplayChangedObservable.add(this._onVRDisplayChanged),e.getEngine().onVRRequestPresentStart.add(this._onVRRequestPresentStart),e.getEngine().onVRRequestPresentComplete.add(this._onVRRequestPresentComplete),window.addEventListener(\"vrdisplaypresentchange\",this._onVrDisplayPresentChange),e.onDisposeObservable.add((function(){r.dispose()})),this._webVRCamera.onControllerMeshLoadedObservable.add((function(e){return r._onDefaultMeshLoaded(e)})),this._scene.gamepadManager.onGamepadConnectedObservable.add(this._onNewGamepadConnected),this._scene.gamepadManager.onGamepadDisconnectedObservable.add(this._onNewGamepadDisconnected),this.updateButtonVisibility(),this._circleEase=new qs.CircleEase,this._circleEase.setEasingMode(qs.EasingFunction.EASINGMODE_EASEINOUT),this.webVROptions.floorMeshes&&this.enableTeleportation({floorMeshes:this.webVROptions.floorMeshes})}return Object.defineProperty(e.prototype,\"onEnteringVR\",{get:function(){return this.onEnteringVRObservable},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,\"onExitingVR\",{get:function(){return this.onExitingVRObservable},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,\"onControllerMeshLoaded\",{get:function(){return this.onControllerMeshLoadedObservable},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,\"teleportationTarget\",{get:function(){return this._teleportationTarget},set:function(e){e&&(e.name=\"teleportationTarget\",this._isDefaultTeleportationTarget=!1,this._teleportationTarget=e)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,\"gazeTrackerMesh\",{get:function(){return this._cameraGazer._gazeTracker},set:function(e){e&&(this._cameraGazer._gazeTracker&&this._cameraGazer._gazeTracker.dispose(),this._leftController&&this._leftController._gazeTracker&&this._leftController._gazeTracker.dispose(),this._rightController&&this._rightController._gazeTracker&&this._rightController._gazeTracker.dispose(),this._cameraGazer._gazeTracker=e,this._cameraGazer._gazeTracker.bakeCurrentTransformIntoVertices(),this._cameraGazer._gazeTracker.isPickable=!1,this._cameraGazer._gazeTracker.isVisible=!1,this._cameraGazer._gazeTracker.name=\"gazeTracker\",this._leftController&&(this._leftController._gazeTracker=this._cameraGazer._gazeTracker.clone(\"gazeTracker\")),this._rightController&&(this._rightController._gazeTracker=this._cameraGazer._gazeTracker.clone(\"gazeTracker\")))},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,\"leftControllerGazeTrackerMesh\",{get:function(){return this._leftController?this._leftController._gazeTracker:null},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,\"rightControllerGazeTrackerMesh\",{get:function(){return this._rightController?this._rightController._gazeTracker:null},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,\"displayGaze\",{get:function(){return this._displayGaze},set:function(e){(this._displayGaze=e)||(this._cameraGazer._gazeTracker.isVisible=!1,this._leftController&&(this._leftController._gazeTracker.isVisible=!1),this._rightController&&(this._rightController._gazeTracker.isVisible=!1))},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,\"displayLaserPointer\",{get:function(){return this._displayLaserPointer},set:function(e){(this._displayLaserPointer=e)?(this._rightController&&this._rightController._activatePointer(),this._leftController&&this._leftController._activatePointer()):(this._rightController&&(this._rightController._deactivatePointer(),this._rightController._gazeTracker.isVisible=!1),this._leftController&&(this._leftController._deactivatePointer(),this._leftController._gazeTracker.isVisible=!1))},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,\"deviceOrientationCamera\",{get:function(){return this._deviceOrientationCamera},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,\"currentVRCamera\",{get:function(){return this._webVRready?this._webVRCamera:this._scene.activeCamera},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,\"webVRCamera\",{get:function(){return this._webVRCamera},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,\"vrDeviceOrientationCamera\",{get:function(){return this._vrDeviceOrientationCamera},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,\"_teleportationRequestInitiated\",{get:function(){return this._cameraGazer._teleportationRequestInitiated||null!==this._leftController&&this._leftController._teleportationRequestInitiated||null!==this._rightController&&this._rightController._teleportationRequestInitiated},enumerable:!0,configurable:!0}),e.prototype._onDefaultMeshLoaded=function(e){this._leftController&&this._leftController.webVRController==e&&e.mesh&&this._leftController._setLaserPointerParent(e.mesh),this._rightController&&this._rightController.webVRController==e&&e.mesh&&this._rightController._setLaserPointerParent(e.mesh);try{this.onControllerMeshLoadedObservable.notifyObservers(e)}catch(e){qs.Tools.Warn(\"Error in your custom logic onControllerMeshLoaded: \"+e)}},Object.defineProperty(e.prototype,\"isInVRMode\",{get:function(){return this._webVRpresenting||this._fullscreenVRpresenting},enumerable:!0,configurable:!0}),e.prototype.onVrDisplayPresentChange=function(){var e=this._scene.getEngine().getVRDevice();if(e){var t=this._webVRpresenting;this._webVRpresenting=e.isPresenting,t&&!this._webVRpresenting&&this.exitVR()}else qs.Tools.Warn(\"Detected VRDisplayPresentChange on an unknown VRDisplay. Did you can enterVR on the vrExperienceHelper?\");this.updateButtonVisibility()},e.prototype.onVRDisplayChanged=function(e){this._webVRsupported=e.vrSupported,this._webVRready=!!e.vrDisplay,this._webVRpresenting=e.vrDisplay&&e.vrDisplay.isPresenting,this.updateButtonVisibility()},e.prototype.moveButtonToBottomRight=function(){this._canvas&&!this._useCustomVRButton&&(this._btnVR.style.top=this._canvas.offsetTop+this._canvas.offsetHeight-70+\"px\",this._btnVR.style.left=this._canvas.offsetLeft+this._canvas.offsetWidth-100+\"px\")},e.prototype.displayVRButton=function(){this._useCustomVRButton||this._btnVRDisplayed||(document.body.appendChild(this._btnVR),this._btnVRDisplayed=!0)},e.prototype.updateButtonVisibility=function(){this._btnVR&&!this._useCustomVRButton&&(this._btnVR.className=\"babylonVRicon\",this.isInVRMode?this._btnVR.className+=\" vrdisplaypresenting\":(this._webVRready&&(this._btnVR.className+=\" vrdisplayready\"),this._webVRsupported&&(this._btnVR.className+=\" vrdisplaysupported\"),this._webVRrequesting&&(this._btnVR.className+=\" vrdisplayrequesting\")))},e.prototype.enterVR=function(){if(this.onEnteringVRObservable)try{this.onEnteringVRObservable.notifyObservers(this)}catch(e){qs.Tools.Warn(\"Error in your custom logic onEnteringVR: \"+e)}this._scene.activeCamera&&(this._position=this._scene.activeCamera.position.clone(),this._existingCamera=this._scene.activeCamera),this._webVRrequesting||(this._webVRready?this._webVRpresenting||(this._webVRCamera.position=this._position,this._scene.activeCamera=this._webVRCamera):this._vrDeviceOrientationCamera&&(this._vrDeviceOrientationCamera.position=this._position,this._scene.activeCamera&&(this._vrDeviceOrientationCamera.minZ=this._scene.activeCamera.minZ),this._scene.activeCamera=this._vrDeviceOrientationCamera,this._scene.getEngine().switchFullscreen(!0),this.updateButtonVisibility()),this._scene.activeCamera&&this._canvas&&this._scene.activeCamera.attachControl(this._canvas),this._interactionsEnabled&&this._scene.registerBeforeRender(this.beforeRender),this._hasEnteredVR=!0)},e.prototype.exitVR=function(){if(this._hasEnteredVR){if(this.onExitingVRObservable)try{this.onExitingVRObservable.notifyObservers(this)}catch(e){qs.Tools.Warn(\"Error in your custom logic onExitingVR: \"+e)}this._webVRpresenting&&this._scene.getEngine().disableVR(),this._scene.activeCamera&&(this._position=this._scene.activeCamera.position.clone()),this._deviceOrientationCamera?(this._deviceOrientationCamera.position=this._position,this._scene.activeCamera=this._deviceOrientationCamera,this._canvas&&this._scene.activeCamera.attachControl(this._canvas)):this._existingCamera&&(this._existingCamera.position=this._position,this._scene.activeCamera=this._existingCamera),this.updateButtonVisibility(),this._interactionsEnabled&&(this._scene.unregisterBeforeRender(this.beforeRender),this._cameraGazer._gazeTracker.isVisible=!1,this._leftController&&(this._leftController._gazeTracker.isVisible=!1),this._rightController&&(this._rightController._gazeTracker.isVisible=!1)),this._scene.getEngine().resize(),this._hasEnteredVR=!1}},Object.defineProperty(e.prototype,\"position\",{get:function(){return this._position},set:function(e){this._position=e,this._scene.activeCamera&&(this._scene.activeCamera.position=e)},enumerable:!0,configurable:!0}),e.prototype.enableInteractions=function(){var t=this;this._interactionsEnabled||(this._interactionsRequested=!0,this._leftController&&this._enableInteractionOnController(this._leftController),this._rightController&&this._enableInteractionOnController(this._rightController),this.raySelectionPredicate=function(e){return e.isVisible&&(e.isPickable||e.name===t._floorMeshName)},this.meshSelectionPredicate=function(e){return!0},this._raySelectionPredicate=function(e){return!!(t._isTeleportationFloor(e)||-1===e.name.indexOf(\"gazeTracker\")&&-1===e.name.indexOf(\"teleportationTarget\")&&-1===e.name.indexOf(\"torusTeleportation\"))&&t.raySelectionPredicate(e)},this._interactionsEnabled=!0)},Object.defineProperty(e.prototype,\"_noControllerIsActive\",{get:function(){return!(this._leftController&&this._leftController._activePointer||this._rightController&&this._rightController._activePointer)},enumerable:!0,configurable:!0}),e.prototype._isTeleportationFloor=function(e){for(var t=0;t<this._floorMeshesCollection.length;t++)if(this._floorMeshesCollection[t].id===e.id)return!0;return!(!this._floorMeshName||e.name!==this._floorMeshName)},e.prototype.addFloorMesh=function(e){this._floorMeshesCollection&&(-1<this._floorMeshesCollection.indexOf(e)||this._floorMeshesCollection.push(e))},e.prototype.removeFloorMesh=function(e){if(this._floorMeshesCollection){var t=this._floorMeshesCollection.indexOf(e);-1!==t&&this._floorMeshesCollection.splice(t,1)}},e.prototype.enableTeleportation=function(e){if(void 0===e&&(e={}),!this._teleportationInitialized){this._teleportationRequested=!0,this.enableInteractions(),e.floorMeshName&&(this._floorMeshName=e.floorMeshName),e.floorMeshes&&(this._floorMeshesCollection=e.floorMeshes),null!=this._leftController&&this._enableTeleportationOnController(this._leftController),null!=this._rightController&&this._enableTeleportationOnController(this._rightController);var t=new qs.ImageProcessingConfiguration;t.vignetteColor=new qs.Color4(0,0,0,0),t.vignetteEnabled=!0,this._postProcessMove=new qs.ImageProcessingPostProcess(\"postProcessMove\",1,this._webVRCamera,void 0,void 0,void 0,void 0,t),this._webVRCamera.detachPostProcess(this._postProcessMove),this._teleportationInitialized=!0,this._isDefaultTeleportationTarget&&(this._createTeleportationCircles(),this._teleportationTarget.scaling.scaleInPlace(this._webVRCamera.deviceScaleFactor))}},e.prototype._enableInteractionOnController=function(i){var r=this;i.webVRController.mesh&&(i._interactionsEnabled=!0,i._activatePointer(),this.webVROptions.laserToggle&&i.webVRController.onMainButtonStateChangedObservable.add((function(e){r._displayLaserPointer&&1===e.value&&(i._activePointer?i._deactivatePointer():i._activatePointer(),r.displayGaze&&(i._gazeTracker.isVisible=i._activePointer))})),i.webVRController.onTriggerStateChangedObservable.add((function(e){var t=i;r._noControllerIsActive&&(t=r._cameraGazer),t._pointerDownOnMeshAsked?e.value<r._padSensibilityDown&&t._selectionPointerUp():e.value>r._padSensibilityUp&&t._selectionPointerDown()})))},e.prototype._checkTeleportWithRay=function(e,t){this._teleportationRequestInitiated&&!t._teleportationRequestInitiated||(t._teleportationRequestInitiated?Math.sqrt(e.y*e.y+e.x*e.x)<this._padSensibilityDown&&(this._teleportActive&&this.teleportCamera(this._haloCenter),t._teleportationRequestInitiated=!1):e.y<-this._padSensibilityUp&&t._dpadPressed&&(t._activatePointer(),t._teleportationRequestInitiated=!0))},e.prototype._checkRotate=function(e,t){t._teleportationRequestInitiated||(t._rotationLeftAsked?e.x>-this._padSensibilityDown&&(t._rotationLeftAsked=!1):e.x<-this._padSensibilityUp&&t._dpadPressed&&(t._rotationLeftAsked=!0,this._rotationAllowed&&this._rotateCamera(!1)),t._rotationRightAsked?e.x<this._padSensibilityDown&&(t._rotationRightAsked=!1):e.x>this._padSensibilityUp&&t._dpadPressed&&(t._rotationRightAsked=!0,this._rotationAllowed&&this._rotateCamera(!0)))},e.prototype._checkTeleportBackwards=function(e,t){if(!t._teleportationRequestInitiated)if(e.y>this._padSensibilityUp&&t._dpadPressed){if(!t._teleportationBackRequestInitiated){if(!this.currentVRCamera)return;var i=qs.Quaternion.FromRotationMatrix(this.currentVRCamera.getWorldMatrix().getRotationMatrix()),r=this.currentVRCamera.position;this.currentVRCamera.devicePosition&&this.currentVRCamera.deviceRotationQuaternion&&(i=this.currentVRCamera.deviceRotationQuaternion,r=this.currentVRCamera.devicePosition),i.toEulerAnglesToRef(this._workingVector),this._workingVector.z=0,this._workingVector.x=0,qs.Quaternion.RotationYawPitchRollToRef(this._workingVector.y,this._workingVector.x,this._workingVector.z,this._workingQuaternion),this._workingQuaternion.toRotationMatrix(this._workingMatrix),qs.Vector3.TransformCoordinatesToRef(this._teleportBackwardsVector,this._workingMatrix,this._workingVector);var n=new qs.Ray(r,this._workingVector),o=this._scene.pickWithRay(n,this._raySelectionPredicate);o&&o.pickedPoint&&o.pickedMesh&&this._isTeleportationFloor(o.pickedMesh)&&o.distance<5&&this.teleportCamera(o.pickedPoint),t._teleportationBackRequestInitiated=!0}}else t._teleportationBackRequestInitiated=!1},e.prototype._enableTeleportationOnController=function(t){var i=this;t.webVRController.mesh&&(t._interactionsEnabled||this._enableInteractionOnController(t),t._interactionsEnabled=!0,t._teleportationEnabled=!0,t.webVRController.controllerType===qs.PoseEnabledControllerType.VIVE&&(t._dpadPressed=!1,t.webVRController.onPadStateChangedObservable.add((function(e){t._dpadPressed=e.pressed,t._dpadPressed||(t._rotationLeftAsked=!1,t._rotationRightAsked=!1,t._teleportationBackRequestInitiated=!1)}))),t.webVRController.onPadValuesChangedObservable.add((function(e){i.teleportationEnabled&&(i._checkTeleportBackwards(e,t),i._checkTeleportWithRay(e,t)),i._checkRotate(e,t)})))},e.prototype._createTeleportationCircles=function(){this._teleportationTarget=qs.Mesh.CreateGround(\"teleportationTarget\",2,2,2,this._scene),this._teleportationTarget.isPickable=!1;var e=new qs.DynamicTexture(\"DynamicTexture\",512,this._scene,!0);e.hasAlpha=!0;var t=e.getContext();t.beginPath(),t.arc(256,256,200,0,2*Math.PI,!1),t.fillStyle=this._teleportationFillColor,t.fill(),t.lineWidth=10,t.strokeStyle=this._teleportationBorderColor,t.stroke(),t.closePath(),e.update();var i=new qs.StandardMaterial(\"TextPlaneMaterial\",this._scene);i.diffuseTexture=e,this._teleportationTarget.material=i;var r=qs.Mesh.CreateTorus(\"torusTeleportation\",.75,.1,25,this._scene,!1);r.isPickable=!1,r.parent=this._teleportationTarget;var n=new qs.Animation(\"animationInnerCircle\",\"position.y\",30,qs.Animation.ANIMATIONTYPE_FLOAT,qs.Animation.ANIMATIONLOOPMODE_CYCLE),o=[];o.push({frame:0,value:0}),o.push({frame:30,value:.4}),o.push({frame:60,value:0}),n.setKeys(o);var s=new qs.SineEase;s.setEasingMode(qs.EasingFunction.EASINGMODE_EASEINOUT),n.setEasingFunction(s),r.animations=[],r.animations.push(n),this._scene.beginAnimation(r,0,60,!0),this._hideTeleportationTarget()},e.prototype._displayTeleportationTarget=function(){this._teleportActive=!0,this._teleportationInitialized&&(this._teleportationTarget.isVisible=!0,this._isDefaultTeleportationTarget&&(this._teleportationTarget.getChildren()[0].isVisible=!0))},e.prototype._hideTeleportationTarget=function(){this._teleportActive=!1,this._teleportationInitialized&&(this._teleportationTarget.isVisible=!1,this._isDefaultTeleportationTarget&&(this._teleportationTarget.getChildren()[0].isVisible=!1))},e.prototype._rotateCamera=function(e){var t=this;if(this.currentVRCamera instanceof qs.FreeCamera){e?this._rotationAngle++:this._rotationAngle--,this.currentVRCamera.animations=[];var i=qs.Quaternion.FromRotationMatrix(qs.Matrix.RotationY(Math.PI/4*this._rotationAngle)),r=new qs.Animation(\"animationRotation\",\"rotationQuaternion\",90,qs.Animation.ANIMATIONTYPE_QUATERNION,qs.Animation.ANIMATIONLOOPMODE_CONSTANT),n=[];n.push({frame:0,value:this.currentVRCamera.rotationQuaternion}),n.push({frame:6,value:i}),r.setKeys(n),r.setEasingFunction(this._circleEase),this.currentVRCamera.animations.push(r),this._postProcessMove.animations=[];var o=new qs.Animation(\"animationPP\",\"vignetteWeight\",90,qs.Animation.ANIMATIONTYPE_FLOAT,qs.Animation.ANIMATIONLOOPMODE_CONSTANT),s=[];s.push({frame:0,value:0}),s.push({frame:3,value:4}),s.push({frame:6,value:0}),o.setKeys(s),o.setEasingFunction(this._circleEase),this._postProcessMove.animations.push(o);var a=new qs.Animation(\"animationPP2\",\"vignetteStretch\",90,qs.Animation.ANIMATIONTYPE_FLOAT,qs.Animation.ANIMATIONLOOPMODE_CONSTANT),l=[];l.push({frame:0,value:0}),l.push({frame:3,value:10}),l.push({frame:6,value:0}),a.setKeys(l),a.setEasingFunction(this._circleEase),this._postProcessMove.animations.push(a),this._postProcessMove.imageProcessingConfiguration.vignetteWeight=0,this._postProcessMove.imageProcessingConfiguration.vignetteStretch=0,this._postProcessMove.samples=4,this._webVRCamera.attachPostProcess(this._postProcessMove),this._scene.beginAnimation(this._postProcessMove,0,6,!1,1,(function(){t._webVRCamera.detachPostProcess(t._postProcessMove)})),this._scene.beginAnimation(this.currentVRCamera,0,6,!1,1)}},e.prototype._moveTeleportationSelectorTo=function(e,t,i){if(e.pickedPoint){t._teleportationRequestInitiated&&(this._displayTeleportationTarget(),this._haloCenter.copyFrom(e.pickedPoint),this._teleportationTarget.position.copyFrom(e.pickedPoint));var r=this._convertNormalToDirectionOfRay(e.getNormal(!0,!1),i);if(r){var n=qs.Vector3.Cross(qs.Axis.Y,r),o=qs.Vector3.Cross(r,n);qs.Vector3.RotationFromAxisToRef(o,r,n,this._teleportationTarget.rotation)}this._teleportationTarget.position.y+=.1}},e.prototype.teleportCamera=function(e){var t=this;if(this.currentVRCamera instanceof qs.FreeCamera){this.webVRCamera.leftCamera?(this._workingVector.copyFrom(this.webVRCamera.leftCamera.globalPosition),this._workingVector.subtractInPlace(this.webVRCamera.position),e.subtractToRef(this._workingVector,this._workingVector)):this._workingVector.copyFrom(e),this.isInVRMode?this._workingVector.y+=this.webVRCamera.deviceDistanceToRoomGround()*this._webVRCamera.deviceScaleFactor:this._workingVector.y+=this._defaultHeight,this.onBeforeCameraTeleport.notifyObservers(this._workingVector),this.currentVRCamera.animations=[];var i=new qs.Animation(\"animationCameraTeleportation\",\"position\",90,qs.Animation.ANIMATIONTYPE_VECTOR3,qs.Animation.ANIMATIONLOOPMODE_CONSTANT),r=[{frame:0,value:this.currentVRCamera.position},{frame:11,value:this._workingVector}];i.setKeys(r),i.setEasingFunction(this._circleEase),this.currentVRCamera.animations.push(i),this._postProcessMove.animations=[];var n=new qs.Animation(\"animationPP\",\"vignetteWeight\",90,qs.Animation.ANIMATIONTYPE_FLOAT,qs.Animation.ANIMATIONLOOPMODE_CONSTANT),o=[];o.push({frame:0,value:0}),o.push({frame:5,value:8}),o.push({frame:11,value:0}),n.setKeys(o),this._postProcessMove.animations.push(n);var s=new qs.Animation(\"animationPP2\",\"vignetteStretch\",90,qs.Animation.ANIMATIONTYPE_FLOAT,qs.Animation.ANIMATIONLOOPMODE_CONSTANT),a=[];a.push({frame:0,value:0}),a.push({frame:5,value:10}),a.push({frame:11,value:0}),s.setKeys(a),this._postProcessMove.animations.push(s),this._postProcessMove.imageProcessingConfiguration.vignetteWeight=0,this._postProcessMove.imageProcessingConfiguration.vignetteStretch=0,this._webVRCamera.attachPostProcess(this._postProcessMove),this._scene.beginAnimation(this._postProcessMove,0,11,!1,1,(function(){t._webVRCamera.detachPostProcess(t._postProcessMove)})),this._scene.beginAnimation(this.currentVRCamera,0,11,!1,1,(function(){t.onAfterCameraTeleport.notifyObservers(t._workingVector)})),this._hideTeleportationTarget()}},e.prototype._convertNormalToDirectionOfRay=function(e,t){e&&(Math.acos(qs.Vector3.Dot(e,t.direction))<Math.PI/2&&e.scaleInPlace(-1));return e},e.prototype._castRayAndSelectObject=function(e){if(this.currentVRCamera instanceof qs.FreeCamera){var t=e._getForwardRay(this._rayLength),i=this._scene.pickWithRay(t,this._raySelectionPredicate);if(i&&(e._laserPointer&&(i.originMesh=e._laserPointer.parent),this._scene.simulatePointerMove(i,{pointerId:e._id})),(e._currentHit=i)&&i.pickedPoint){if(this._displayGaze){var r=1;e._gazeTracker.isVisible=!0,e._isActionableMesh&&(r=3),this.updateGazeTrackerScale&&(e._gazeTracker.scaling.x=i.distance*r,e._gazeTracker.scaling.y=i.distance*r,e._gazeTracker.scaling.z=i.distance*r);var n=this._convertNormalToDirectionOfRay(i.getNormal(),t);if(n){var o=qs.Vector3.Cross(qs.Axis.Y,n),s=qs.Vector3.Cross(n,o);qs.Vector3.RotationFromAxisToRef(s,n,o,e._gazeTracker.rotation)}e._gazeTracker.position.copyFrom(i.pickedPoint),e._gazeTracker.position.x<0?e._gazeTracker.position.x+=.002:e._gazeTracker.position.x-=.002,e._gazeTracker.position.y<0?e._gazeTracker.position.y+=.002:e._gazeTracker.position.y-=.002,e._gazeTracker.position.z<0?e._gazeTracker.position.z+=.002:e._gazeTracker.position.z-=.002}e._updatePointerDistance(i.distance)}else e._updatePointerDistance(),e._gazeTracker.isVisible=!1;if(i&&i.pickedMesh){if(this._teleportationInitialized&&this._isTeleportationFloor(i.pickedMesh)&&i.pickedPoint)return e._currentMeshSelected&&!this._isTeleportationFloor(e._currentMeshSelected)&&this._notifySelectedMeshUnselected(e._currentMeshSelected),e._currentMeshSelected=null,void(e._teleportationRequestInitiated&&this._moveTeleportationSelectorTo(i,e,t));if(i.pickedMesh!==e._currentMeshSelected)if(this.meshSelectionPredicate(i.pickedMesh)){this.onNewMeshPicked.notifyObservers(i),e._currentMeshSelected=i.pickedMesh,i.pickedMesh.isPickable&&i.pickedMesh.actionManager?(this.changeGazeColor(new qs.Color3(0,0,1)),this.changeLaserColor(new qs.Color3(.2,.2,1)),e._isActionableMesh=!0):(this.changeGazeColor(new qs.Color3(.7,.7,.7)),this.changeLaserColor(new qs.Color3(.7,.7,.7)),e._isActionableMesh=!1);try{this.onNewMeshSelected.notifyObservers(i.pickedMesh)}catch(e){qs.Tools.Warn(\"Error in your custom logic onNewMeshSelected: \"+e)}}else this._notifySelectedMeshUnselected(e._currentMeshSelected),e._currentMeshSelected=null,this.changeGazeColor(new qs.Color3(.7,.7,.7)),this.changeLaserColor(new qs.Color3(.7,.7,.7))}else this._notifySelectedMeshUnselected(e._currentMeshSelected),e._currentMeshSelected=null,this.changeGazeColor(new qs.Color3(.7,.7,.7)),this.changeLaserColor(new qs.Color3(.7,.7,.7))}},e.prototype._notifySelectedMeshUnselected=function(e){e&&this.onSelectedMeshUnselected.notifyObservers(e)},e.prototype.changeLaserColor=function(e){this._leftController&&this._leftController._setLaserPointerColor(e),this._rightController&&this._rightController._setLaserPointerColor(e)},e.prototype.changeGazeColor=function(e){this._cameraGazer._gazeTracker.material&&(this._cameraGazer._gazeTracker.material.emissiveColor=e,this._leftController&&(this._leftController._gazeTracker.material.emissiveColor=e),this._rightController&&(this._rightController._gazeTracker.material.emissiveColor=e))},e.prototype.dispose=function(){this.isInVRMode&&this.exitVR(),this._postProcessMove&&this._postProcessMove.dispose(),this._webVRCamera&&this._webVRCamera.dispose(),this._vrDeviceOrientationCamera&&this._vrDeviceOrientationCamera.dispose(),!this._useCustomVRButton&&this._btnVR.parentNode&&document.body.removeChild(this._btnVR),this._deviceOrientationCamera&&this._scene.activeCamera!=this._deviceOrientationCamera&&this._deviceOrientationCamera.dispose(),this._cameraGazer&&this._cameraGazer.dispose(),this._leftController&&this._leftController.dispose(),this._rightController&&this._rightController.dispose(),this._teleportationTarget&&this._teleportationTarget.dispose(),this._floorMeshesCollection=[],document.removeEventListener(\"keydown\",this._onKeyDown),window.removeEventListener(\"vrdisplaypresentchange\",this._onVrDisplayPresentChange),window.removeEventListener(\"resize\",this._onResize),document.removeEventListener(\"fullscreenchange\",this._onFullscreenChange),document.removeEventListener(\"mozfullscreenchange\",this._onFullscreenChange),document.removeEventListener(\"webkitfullscreenchange\",this._onFullscreenChange),document.removeEventListener(\"msfullscreenchange\",this._onFullscreenChange),document.onmsfullscreenchange=null,this._scene.getEngine().onVRDisplayChangedObservable.removeCallback(this._onVRDisplayChanged),this._scene.getEngine().onVRRequestPresentStart.removeCallback(this._onVRRequestPresentStart),this._scene.getEngine().onVRRequestPresentComplete.removeCallback(this._onVRRequestPresentComplete),window.removeEventListener(\"vrdisplaypresentchange\",this._onVrDisplayPresentChange),this._scene.gamepadManager.onGamepadConnectedObservable.removeCallback(this._onNewGamepadConnected),this._scene.gamepadManager.onGamepadDisconnectedObservable.removeCallback(this._onNewGamepadDisconnected),this._scene.unregisterBeforeRender(this.beforeRender)},e.prototype.getClassName=function(){return\"VRExperienceHelper\"},e})(),qs.VRExperienceHelper=ta,(function(n){var o,e;(e=o=n.JoystickAxis||(n.JoystickAxis={}))[e.X=0]=\"X\",e[e.Y=1]=\"Y\",e[e.Z=2]=\"Z\";var t=(function(){function r(e){var t=this;if(this._leftJoystick=!!e,r._globalJoystickIndex++,this._axisTargetedByLeftAndRight=o.X,this._axisTargetedByUpAndDown=o.Y,this.reverseLeftRight=!1,this.reverseUpDown=!1,this._touches=new n.StringDictionary,this.deltaPosition=n.Vector3.Zero(),this._joystickSensibility=25,this._inversedSensibility=1/(this._joystickSensibility/1e3),this._onResize=function(e){r.vjCanvasWidth=window.innerWidth,r.vjCanvasHeight=window.innerHeight,r.vjCanvas&&(r.vjCanvas.width=r.vjCanvasWidth,r.vjCanvas.height=r.vjCanvasHeight),r.halfWidth=r.vjCanvasWidth/2},!r.vjCanvas){window.addEventListener(\"resize\",this._onResize,!1),r.vjCanvas=document.createElement(\"canvas\"),r.vjCanvasWidth=window.innerWidth,r.vjCanvasHeight=window.innerHeight,r.vjCanvas.width=window.innerWidth,r.vjCanvas.height=window.innerHeight,r.vjCanvas.style.width=\"100%\",r.vjCanvas.style.height=\"100%\",r.vjCanvas.style.position=\"absolute\",r.vjCanvas.style.backgroundColor=\"transparent\",r.vjCanvas.style.top=\"0px\",r.vjCanvas.style.left=\"0px\",r.vjCanvas.style.zIndex=\"5\",r.vjCanvas.style.msTouchAction=\"none\",r.vjCanvas.setAttribute(\"touch-action\",\"none\");var i=r.vjCanvas.getContext(\"2d\");if(!i)throw new Error(\"Unable to create canvas for virtual joystick\");(r.vjCanvasContext=i).strokeStyle=\"#ffffff\",r.vjCanvasContext.lineWidth=2,document.body.appendChild(r.vjCanvas)}r.halfWidth=r.vjCanvas.width/2,this.pressed=!1,this._joystickColor=\"cyan\",this._joystickPointerID=-1,this._joystickPointerPos=new n.Vector2(0,0),this._joystickPreviousPointerPos=new n.Vector2(0,0),this._joystickPointerStartPos=new n.Vector2(0,0),this._deltaJoystickVector=new n.Vector2(0,0),this._onPointerDownHandlerRef=function(e){t._onPointerDown(e)},this._onPointerMoveHandlerRef=function(e){t._onPointerMove(e)},this._onPointerUpHandlerRef=function(e){t._onPointerUp(e)},r.vjCanvas.addEventListener(\"pointerdown\",this._onPointerDownHandlerRef,!1),r.vjCanvas.addEventListener(\"pointermove\",this._onPointerMoveHandlerRef,!1),r.vjCanvas.addEventListener(\"pointerup\",this._onPointerUpHandlerRef,!1),r.vjCanvas.addEventListener(\"pointerout\",this._onPointerUpHandlerRef,!1),r.vjCanvas.addEventListener(\"contextmenu\",(function(e){e.preventDefault()}),!1),requestAnimationFrame((function(){t._drawVirtualJoystick()}))}return r.prototype.setJoystickSensibility=function(e){this._joystickSensibility=e,this._inversedSensibility=1/(this._joystickSensibility/1e3)},r.prototype._onPointerDown=function(e){e.preventDefault(),(!0===this._leftJoystick?e.clientX<r.halfWidth:e.clientX>r.halfWidth)&&this._joystickPointerID<0?(this._joystickPointerID=e.pointerId,this._joystickPointerStartPos.x=e.clientX,this._joystickPointerStartPos.y=e.clientY,this._joystickPointerPos=this._joystickPointerStartPos.clone(),this._joystickPreviousPointerPos=this._joystickPointerStartPos.clone(),this._deltaJoystickVector.x=0,this._deltaJoystickVector.y=0,this.pressed=!0,this._touches.add(e.pointerId.toString(),e)):r._globalJoystickIndex<2&&this._action&&(this._action(),this._touches.add(e.pointerId.toString(),{x:e.clientX,y:e.clientY,prevX:e.clientX,prevY:e.clientY}))},r.prototype._onPointerMove=function(e){if(this._joystickPointerID==e.pointerId){this._joystickPointerPos.x=e.clientX,this._joystickPointerPos.y=e.clientY,this._deltaJoystickVector=this._joystickPointerPos.clone(),this._deltaJoystickVector=this._deltaJoystickVector.subtract(this._joystickPointerStartPos);var t=(this.reverseLeftRight?-1:1)*this._deltaJoystickVector.x/this._inversedSensibility;switch(this._axisTargetedByLeftAndRight){case o.X:this.deltaPosition.x=Math.min(1,Math.max(-1,t));break;case o.Y:this.deltaPosition.y=Math.min(1,Math.max(-1,t));break;case o.Z:this.deltaPosition.z=Math.min(1,Math.max(-1,t))}var i=(this.reverseUpDown?1:-1)*this._deltaJoystickVector.y/this._inversedSensibility;switch(this._axisTargetedByUpAndDown){case o.X:this.deltaPosition.x=Math.min(1,Math.max(-1,i));break;case o.Y:this.deltaPosition.y=Math.min(1,Math.max(-1,i));break;case o.Z:this.deltaPosition.z=Math.min(1,Math.max(-1,i))}}else{var r=this._touches.get(e.pointerId.toString());r&&(r.x=e.clientX,r.y=e.clientY)}},r.prototype._onPointerUp=function(e){if(this._joystickPointerID==e.pointerId)r.vjCanvasContext.clearRect(this._joystickPointerStartPos.x-64,this._joystickPointerStartPos.y-64,128,128),r.vjCanvasContext.clearRect(this._joystickPreviousPointerPos.x-42,this._joystickPreviousPointerPos.y-42,84,84),this._joystickPointerID=-1,this.pressed=!1;else{var t=this._touches.get(e.pointerId.toString());t&&r.vjCanvasContext.clearRect(t.prevX-44,t.prevY-44,88,88)}this._deltaJoystickVector.x=0,this._deltaJoystickVector.y=0,this._touches.remove(e.pointerId.toString())},r.prototype.setJoystickColor=function(e){this._joystickColor=e},r.prototype.setActionOnTouch=function(e){this._action=e},r.prototype.setAxisForLeftRight=function(e){switch(e){case o.X:case o.Y:case o.Z:this._axisTargetedByLeftAndRight=e;break;default:this._axisTargetedByLeftAndRight=o.X}},r.prototype.setAxisForUpDown=function(e){switch(e){case o.X:case o.Y:case o.Z:this._axisTargetedByUpAndDown=e;break;default:this._axisTargetedByUpAndDown=o.Y}},r.prototype._drawVirtualJoystick=function(){var i=this;this.pressed&&this._touches.forEach((function(e,t){t.pointerId===i._joystickPointerID?(r.vjCanvasContext.clearRect(i._joystickPointerStartPos.x-64,i._joystickPointerStartPos.y-64,128,128),r.vjCanvasContext.clearRect(i._joystickPreviousPointerPos.x-42,i._joystickPreviousPointerPos.y-42,84,84),r.vjCanvasContext.beginPath(),r.vjCanvasContext.lineWidth=6,r.vjCanvasContext.strokeStyle=i._joystickColor,r.vjCanvasContext.arc(i._joystickPointerStartPos.x,i._joystickPointerStartPos.y,40,0,2*Math.PI,!0),r.vjCanvasContext.stroke(),r.vjCanvasContext.closePath(),r.vjCanvasContext.beginPath(),r.vjCanvasContext.strokeStyle=i._joystickColor,r.vjCanvasContext.lineWidth=2,r.vjCanvasContext.arc(i._joystickPointerStartPos.x,i._joystickPointerStartPos.y,60,0,2*Math.PI,!0),r.vjCanvasContext.stroke(),r.vjCanvasContext.closePath(),r.vjCanvasContext.beginPath(),r.vjCanvasContext.strokeStyle=i._joystickColor,r.vjCanvasContext.arc(i._joystickPointerPos.x,i._joystickPointerPos.y,40,0,2*Math.PI,!0),r.vjCanvasContext.stroke(),r.vjCanvasContext.closePath(),i._joystickPreviousPointerPos=i._joystickPointerPos.clone()):(r.vjCanvasContext.clearRect(t.prevX-44,t.prevY-44,88,88),r.vjCanvasContext.beginPath(),r.vjCanvasContext.fillStyle=\"white\",r.vjCanvasContext.beginPath(),r.vjCanvasContext.strokeStyle=\"red\",r.vjCanvasContext.lineWidth=6,r.vjCanvasContext.arc(t.x,t.y,40,0,2*Math.PI,!0),r.vjCanvasContext.stroke(),r.vjCanvasContext.closePath(),t.prevX=t.x,t.prevY=t.y)})),requestAnimationFrame((function(){i._drawVirtualJoystick()}))},r.prototype.releaseCanvas=function(){r.vjCanvas&&(r.vjCanvas.removeEventListener(\"pointerdown\",this._onPointerDownHandlerRef),r.vjCanvas.removeEventListener(\"pointermove\",this._onPointerMoveHandlerRef),r.vjCanvas.removeEventListener(\"pointerup\",this._onPointerUpHandlerRef),r.vjCanvas.removeEventListener(\"pointerout\",this._onPointerUpHandlerRef),window.removeEventListener(\"resize\",this._onResize),document.body.removeChild(r.vjCanvas),r.vjCanvas=null)},r._globalJoystickIndex=0,r})();n.VirtualJoystick=t})($a||($a={})),(function(i){i.Node.AddNodeConstructor(\"VirtualJoysticksCamera\",(function(e,t){return function(){return new r(e,i.Vector3.Zero(),t)}}));var r=(function(n){function e(e,t,i){var r=n.call(this,e,t,i)||this;return r.inputs.addVirtualJoystick(),r}return T(e,n),e.prototype.getClassName=function(){return\"VirtualJoysticksCamera\"},e})(i.FreeCamera);i.VirtualJoysticksCamera=r})($a||($a={})),ia=$a||($a={}),ra=(function(){function e(){}return e.prototype.getLeftJoystick=function(){return this._leftjoystick},e.prototype.getRightJoystick=function(){return this._rightjoystick},e.prototype.checkInputs=function(){if(this._leftjoystick){var e=this.camera,t=50*e._computeLocalCameraSpeed(),i=ia.Matrix.RotationYawPitchRoll(e.rotation.y,e.rotation.x,0),r=ia.Vector3.TransformCoordinates(new ia.Vector3(this._leftjoystick.deltaPosition.x*t,this._leftjoystick.deltaPosition.y*t,this._leftjoystick.deltaPosition.z*t),i);e.cameraDirection=e.cameraDirection.add(r),e.cameraRotation=e.cameraRotation.addVector3(this._rightjoystick.deltaPosition),this._leftjoystick.pressed||(this._leftjoystick.deltaPosition=this._leftjoystick.deltaPosition.scale(.9)),this._rightjoystick.pressed||(this._rightjoystick.deltaPosition=this._rightjoystick.deltaPosition.scale(.9))}},e.prototype.attachControl=function(e,t){this._leftjoystick=new ia.VirtualJoystick(!0),this._leftjoystick.setAxisForUpDown(ia.JoystickAxis.Z),this._leftjoystick.setAxisForLeftRight(ia.JoystickAxis.X),this._leftjoystick.setJoystickSensibility(.15),this._rightjoystick=new ia.VirtualJoystick(!1),this._rightjoystick.setAxisForUpDown(ia.JoystickAxis.X),this._rightjoystick.setAxisForLeftRight(ia.JoystickAxis.Y),this._rightjoystick.reverseUpDown=!0,this._rightjoystick.setJoystickSensibility(.05),this._rightjoystick.setJoystickColor(\"yellow\")},e.prototype.detachControl=function(e){this._leftjoystick.releaseCanvas(),this._rightjoystick.releaseCanvas()},e.prototype.getClassName=function(){return\"FreeCameraVirtualJoystickInput\"},e.prototype.getSimpleName=function(){return\"virtualJoystick\"},e})(),ia.FreeCameraVirtualJoystickInput=ra,ia.CameraInputTypes.FreeCameraVirtualJoystickInput=ra,(function(b){var e=function(e,t,i){this.quality=e,this.distance=t,this.optimizeMesh=i};b.SimplificationSettings=e;var t,i,r=(function(){function e(){this.running=!1,this._simplificationArray=[]}return e.prototype.addTask=function(e){this._simplificationArray.push(e)},e.prototype.executeNext=function(){var e=this._simplificationArray.pop();e?(this.running=!0,this.runSimplification(e)):this.running=!1},e.prototype.runSimplification=function(r){var i=this;if(r.parallelProcessing)r.settings.forEach((function(t){i.getSimplifier(r).simplify(t,(function(e){r.mesh.addLODLevel(t.distance,e),e.isVisible=!0,t.quality===r.settings[r.settings.length-1].quality&&r.successCallback&&r.successCallback(),i.executeNext()}))}));else{var n=this.getSimplifier(r);b.AsyncLoop.Run(r.settings.length,(function(e){var t,i;t=r.settings[e.index],i=function(){e.executeNext()},n.simplify(t,(function(e){r.mesh.addLODLevel(t.distance,e),e.isVisible=!0,i()}))}),(function(){r.successCallback&&r.successCallback(),i.executeNext()}))}},e.prototype.getSimplifier=function(e){switch(e.simplificationType){case t.QUADRATIC:default:return new o(e.mesh)}},e})();b.SimplificationQueue=r,(i=t=b.SimplificationType||(b.SimplificationType={}))[i.QUADRATIC=0]=\"QUADRATIC\";var f=function(e){this.vertices=e,this.error=new Array(4),this.deleted=!1,this.isDirty=!1,this.deletePending=!1,this.borderFactor=0},s=(function(){function e(e,t){this.position=e,this.id=t,this.isBorder=!0,this.q=new n,this.triangleCount=0,this.triangleStart=0,this.originalOffsets=[]}return e.prototype.updatePosition=function(e){this.position.copyFrom(e)},e})(),n=(function(){function n(e){this.data=new Array(10);for(var t=0;t<10;++t)e&&e[t]?this.data[t]=e[t]:this.data[t]=0}return n.prototype.det=function(e,t,i,r,n,o,s,a,l){return this.data[e]*this.data[n]*this.data[l]+this.data[i]*this.data[r]*this.data[a]+this.data[t]*this.data[o]*this.data[s]-this.data[i]*this.data[n]*this.data[s]-this.data[e]*this.data[o]*this.data[a]-this.data[t]*this.data[r]*this.data[l]},n.prototype.addInPlace=function(e){for(var t=0;t<10;++t)this.data[t]+=e.data[t]},n.prototype.addArrayInPlace=function(e){for(var t=0;t<10;++t)this.data[t]+=e[t]},n.prototype.add=function(e){for(var t=new n,i=0;i<10;++i)t.data[i]=this.data[i]+e.data[i];return t},n.FromData=function(e,t,i,r){return new n(n.DataFromNumbers(e,t,i,r))},n.DataFromNumbers=function(e,t,i,r){return[e*e,e*t,e*i,e*r,t*t,t*i,t*r,i*i,i*r,r*r]},n})(),l=function(e,t){this.vertexId=e,this.triangleId=t},o=(function(){function e(e){this._mesh=e,this.syncIterations=5e3,this.aggressiveness=7,this.decimationIterations=100,this.boundingBoxEpsilon=b.Epsilon}return e.prototype.simplify=function(t,e){var i=this;this.initDecimatedMesh(),b.AsyncLoop.Run(this._mesh.subMeshes.length,(function(e){i.initWithMesh(e.index,(function(){i.runDecimation(t,e.index,(function(){e.executeNext()}))}),t.optimizeMesh)}),(function(){setTimeout((function(){e(i._reconstructedMesh)}),0)}))},e.prototype.runDecimation=function(e,t,i){var v=this,r=~~(this.triangles.length*e.quality),y=0,n=this.triangles.length;b.AsyncLoop.Run(this.decimationIterations,(function(e){var t,i;n-y<=r?e.breakLoop():(t=e.index,i=function(){e.executeNext()},setTimeout((function(){t%5==0&&v.updateMesh(0===t);for(var e=0;e<v.triangles.length;++e)v.triangles[e].isDirty=!1;var g=1e-9*Math.pow(t+3,v.aggressiveness);b.AsyncLoop.SyncAsyncForLoop(v.triangles.length,v.syncIterations,(function(e){var t=~~((v.triangles.length/2+e)%v.triangles.length),i=v.triangles[t];if(i&&!(i.error[3]>g||i.deleted||i.isDirty))for(var r=0;r<3;++r)if(i.error[r]<g){var n=[],o=[],s=i.vertices[r],a=i.vertices[(r+1)%3];if(s.isBorder||a.isBorder)continue;var l=b.Vector3.Zero(),c=b.Vector3.Zero(),h=b.Vector2.Zero(),u=new b.Color4(0,0,0,1);v.calculateError(s,a,l,c,h,u);var d=new Array;if(v.isFlipped(s,a,l,n,i.borderFactor,d))continue;if(v.isFlipped(a,s,l,o,i.borderFactor,d))continue;if(n.indexOf(!0)<0||o.indexOf(!0)<0)continue;var f=new Array;if(d.forEach((function(e){-1===f.indexOf(e)&&(e.deletePending=!0,f.push(e))})),f.length%2!=0)continue;s.q=a.q.add(s.q),s.updatePosition(l);var p=v.references.length;y=v.updateTriangles(s,s,n,y),y=v.updateTriangles(s,a,o,y);var _=v.references.length-p;if(_<=s.triangleCount){if(_)for(var m=0;m<_;m++)v.references[s.triangleStart+m]=v.references[p+m]}else s.triangleStart=p;s.triangleCount=_;break}}),i,(function(){return n-y<=r}))}),0))}),(function(){setTimeout((function(){v.reconstructMesh(t),i()}),0)}))},e.prototype.initWithMesh=function(e,t,n){var c=this;this.vertices=[],this.triangles=[];var o=this._mesh.getVerticesData(b.VertexBuffer.PositionKind),h=this._mesh.getIndices(),u=this._mesh.subMeshes[e],d=[],i=u.verticesCount;b.AsyncLoop.SyncAsyncForLoop(i,this.syncIterations/4>>0,(function(e){if(o){var t=e+u.verticesStart,i=b.Vector3.FromArray(o,3*t),r=(function(e){if(n)for(var t=0;t<c.vertices.length;++t)if(c.vertices[t].position.equals(e))return c.vertices[t];return null})(i)||new s(i,c.vertices.length);r.originalOffsets.push(t),r.id===c.vertices.length&&c.vertices.push(r),d.push(r.id)}}),(function(){b.AsyncLoop.SyncAsyncForLoop(u.indexCount/3,c.syncIterations,(function(e){if(h){var t=3*(u.indexStart/3+e),i=h[t+0],r=h[t+1],n=h[t+2],o=c.vertices[d[i-u.verticesStart]],s=c.vertices[d[r-u.verticesStart]],a=c.vertices[d[n-u.verticesStart]],l=new f([o,s,a]);l.originalOffset=t,c.triangles.push(l)}}),(function(){c.init(t)}))}))},e.prototype.init=function(e){var r=this;b.AsyncLoop.SyncAsyncForLoop(this.triangles.length,this.syncIterations,(function(e){var t=r.triangles[e];t.normal=b.Vector3.Cross(t.vertices[1].position.subtract(t.vertices[0].position),t.vertices[2].position.subtract(t.vertices[0].position)).normalize();for(var i=0;i<3;i++)t.vertices[i].q.addArrayInPlace(n.DataFromNumbers(t.normal.x,t.normal.y,t.normal.z,-b.Vector3.Dot(t.normal,t.vertices[0].position)))}),(function(){b.AsyncLoop.SyncAsyncForLoop(r.triangles.length,r.syncIterations,(function(e){for(var t=r.triangles[e],i=0;i<3;++i)t.error[i]=r.calculateError(t.vertices[i],t.vertices[(i+1)%3]);t.error[3]=Math.min(t.error[0],t.error[1],t.error[2])}),(function(){e()}))}))},e.prototype.reconstructMesh=function(e){var t,r,i,n=[];for(t=0;t<this.vertices.length;++t)this.vertices[t].triangleCount=0;for(t=0;t<this.triangles.length;++t)if(!this.triangles[t].deleted){for(r=this.triangles[t],i=0;i<3;++i)r.vertices[i].triangleCount=1;n.push(r)}var o=this._reconstructedMesh.getVerticesData(b.VertexBuffer.PositionKind)||[],s=this._reconstructedMesh.getVerticesData(b.VertexBuffer.NormalKind)||[],a=this._reconstructedMesh.getVerticesData(b.VertexBuffer.UVKind)||[],l=this._reconstructedMesh.getVerticesData(b.VertexBuffer.ColorKind)||[],c=this._mesh.getVerticesData(b.VertexBuffer.NormalKind),h=this._mesh.getVerticesData(b.VertexBuffer.UVKind),u=this._mesh.getVerticesData(b.VertexBuffer.ColorKind),d=0;for(t=0;t<this.vertices.length;++t){var f=this.vertices[t];f.id=d,f.triangleCount&&f.originalOffsets.forEach((function(e){c&&(o.push(f.position.x),o.push(f.position.y),o.push(f.position.z),s.push(c[3*e]),s.push(c[3*e+1]),s.push(c[3*e+2]),h&&h.length?(a.push(h[2*e]),a.push(h[2*e+1])):u&&u.length&&(l.push(u[4*e]),l.push(u[4*e+1]),l.push(u[4*e+2]),l.push(u[4*e+3])),++d)}))}var p=this._reconstructedMesh.getTotalIndices(),_=this._reconstructedMesh.getTotalVertices(),m=this._reconstructedMesh.subMeshes;this._reconstructedMesh.subMeshes=[];var g=this._reconstructedMesh.getIndices(),v=this._mesh.getIndices();for(t=0;t<n.length;++t)r=n[t],[0,1,2].forEach((function(e){var t=v[r.originalOffset+e],i=r.vertices[e].originalOffsets.indexOf(t);i<0&&(i=0),g.push(r.vertices[e].id+i+_)}));this._reconstructedMesh.setIndices(g),this._reconstructedMesh.setVerticesData(b.VertexBuffer.PositionKind,o),this._reconstructedMesh.setVerticesData(b.VertexBuffer.NormalKind,s),0<a.length&&this._reconstructedMesh.setVerticesData(b.VertexBuffer.UVKind,a),0<l.length&&this._reconstructedMesh.setVerticesData(b.VertexBuffer.ColorKind,l);var y=this._mesh.subMeshes[e];0<e&&(this._reconstructedMesh.subMeshes=[],m.forEach((function(e){b.SubMesh.AddToMesh(e.materialIndex,e.verticesStart,e.verticesCount,e.indexStart,e.indexCount,e.getMesh())})),b.SubMesh.AddToMesh(y.materialIndex,_,d,p,3*n.length,this._reconstructedMesh))},e.prototype.initDecimatedMesh=function(){this._reconstructedMesh=new b.Mesh(this._mesh.name+\"Decimated\",this._mesh.getScene()),this._reconstructedMesh.material=this._mesh.material,this._reconstructedMesh.parent=this._mesh.parent,this._reconstructedMesh.isVisible=!1,this._reconstructedMesh.renderingGroupId=this._mesh.renderingGroupId},e.prototype.isFlipped=function(e,t,i,r,n,o){for(var s=0;s<e.triangleCount;++s){var a=this.triangles[this.references[e.triangleStart+s].triangleId];if(!a.deleted){var l=this.references[e.triangleStart+s].vertexId,c=a.vertices[(l+1)%3],h=a.vertices[(l+2)%3];if(c!==t&&h!==t){var u=c.position.subtract(i);u=u.normalize();var d=h.position.subtract(i);if(d=d.normalize(),.999<Math.abs(b.Vector3.Dot(u,d)))return!0;var f=b.Vector3.Cross(u,d).normalize();if(r[s]=!1,b.Vector3.Dot(f,a.normal)<.2)return!0}else r[s]=!0,o.push(a)}}return!1},e.prototype.updateTriangles=function(e,t,i,r){for(var n=r,o=0;o<t.triangleCount;++o){var s=this.references[t.triangleStart+o],a=this.triangles[s.triangleId];a.deleted||(i[o]&&a.deletePending?(a.deleted=!0,n++):(a.vertices[s.vertexId]=e,a.isDirty=!0,a.error[0]=this.calculateError(a.vertices[0],a.vertices[1])+a.borderFactor/2,a.error[1]=this.calculateError(a.vertices[1],a.vertices[2])+a.borderFactor/2,a.error[2]=this.calculateError(a.vertices[2],a.vertices[0])+a.borderFactor/2,a.error[3]=Math.min(a.error[0],a.error[1],a.error[2]),this.references.push(s)))}return n},e.prototype.identifyBorder=function(){for(var e=0;e<this.vertices.length;++e){var t,i=[],r=[],n=this.vertices[e];for(t=0;t<n.triangleCount;++t)for(var o=this.triangles[this.references[n.triangleStart+t].triangleId],s=0;s<3;s++){for(var a=0,l=o.vertices[s];a<i.length&&r[a]!==l.id;)++a;a===i.length?(i.push(1),r.push(l.id)):i[a]++}for(t=0;t<i.length;++t)1===i[t]?this.vertices[r[t]].isBorder=!0:this.vertices[r[t]].isBorder=!1}},e.prototype.updateMesh=function(e){var t,i,r,n;if(void 0===e&&(e=!1),!e){var o=[];for(t=0;t<this.triangles.length;++t)this.triangles[t].deleted||o.push(this.triangles[t]);this.triangles=o}for(t=0;t<this.vertices.length;++t)this.vertices[t].triangleCount=0,this.vertices[t].triangleStart=0;for(t=0;t<this.triangles.length;++t)for(i=this.triangles[t],r=0;r<3;++r)(n=i.vertices[r]).triangleCount++;var s=0;for(t=0;t<this.vertices.length;++t)this.vertices[t].triangleStart=s,s+=this.vertices[t].triangleCount,this.vertices[t].triangleCount=0;var a=new Array(3*this.triangles.length);for(t=0;t<this.triangles.length;++t)for(i=this.triangles[t],r=0;r<3;++r)a[(n=i.vertices[r]).triangleStart+n.triangleCount]=new l(r,t),n.triangleCount++;this.references=a,e&&this.identifyBorder()},e.prototype.vertexError=function(e,t){var i=t.x,r=t.y,n=t.z;return e.data[0]*i*i+2*e.data[1]*i*r+2*e.data[2]*i*n+2*e.data[3]*i+e.data[4]*r*r+2*e.data[5]*r*n+2*e.data[6]*r+e.data[7]*n*n+2*e.data[8]*n+e.data[9]},e.prototype.calculateError=function(e,t,i,r,n,o){var s=e.q.add(t.q),a=e.isBorder&&t.isBorder,l=0,c=s.det(0,1,2,1,4,5,2,5,7);if(0===c||a){var h=e.position.add(t.position).divide(new b.Vector3(2,2,2)),u=this.vertexError(s,e.position),d=this.vertexError(s,t.position),f=this.vertexError(s,h);(l=Math.min(u,d,f))===u?i&&i.copyFrom(e.position):l===d?i&&i.copyFrom(t.position):i&&i.copyFrom(h)}else i||(i=b.Vector3.Zero()),i.x=-1/c*s.det(1,2,3,4,5,6,5,7,8),i.y=1/c*s.det(0,2,3,1,5,6,2,7,8),i.z=-1/c*s.det(0,1,3,1,4,6,2,5,8),l=this.vertexError(s,i);return l},e})()})($a||($a={})),(function(n){Object.defineProperty(n.Scene.prototype,\"simplificationQueue\",{get:function(){if(!this._simplificationQueue){this._simplificationQueue=new n.SimplificationQueue;var e=this._getComponent(n.SceneComponentConstants.NAME_SIMPLIFICATIONQUEUE);e||(e=new t(this),this._addComponent(e))}return this._simplificationQueue},set:function(e){this._simplificationQueue=e},enumerable:!0,configurable:!0}),n.Mesh.prototype.simplify=function(e,t,i,r){return void 0===t&&(t=!0),void 0===i&&(i=n.SimplificationType.QUADRATIC),this.getScene().simplificationQueue.addTask({settings:e,parallelProcessing:t,mesh:this,simplificationType:i,successCallback:r}),this};var t=(function(){function e(e){this.name=n.SceneComponentConstants.NAME_SIMPLIFICATIONQUEUE,this.scene=e}return e.prototype.register=function(){this.scene._beforeCameraUpdateStage.registerStep(n.SceneComponentConstants.STEP_BEFORECAMERAUPDATE_SIMPLIFICATIONQUEUE,this,this._beforeCameraUpdate)},e.prototype.rebuild=function(){},e.prototype.dispose=function(){},e.prototype._beforeCameraUpdate=function(){this.scene._simplificationQueue&&!this.scene._simplificationQueue.running&&this.scene._simplificationQueue.executeNext()},e})();n.SimplicationQueueSceneComponent=t})($a||($a={})),na=function(e,t){this.distance=e,this.mesh=t},($a||($a={})).MeshLODLevel=na,(function(d){var e=(function(){function e(e){void 0===e&&(e=0),this.priority=e}return e.prototype.getDescription=function(){return\"\"},e.prototype.apply=function(e,t){return!0},e})(),n=(function(n){function e(e,t,i){void 0===e&&(e=0),void 0===t&&(t=1024),void 0===i&&(i=.5);var r=n.call(this,e)||this;return r.priority=e,r.maximumSize=t,r.step=i,r}return T(e,n),e.prototype.getDescription=function(){return\"Reducing render target texture size to \"+this.maximumSize},e.prototype.apply=function(e,t){for(var i=!0,r=0;r<e.textures.length;r++){var n=e.textures[r];if(n.canRescale&&!n.getContext){var o=n.getSize();Math.max(o.width,o.height)>this.maximumSize&&(n.scale(this.step),i=!1)}}return i},e})(d.SceneOptimization=e);d.TextureOptimization=n;var o=(function(n){function e(e,t,i){void 0===e&&(e=0),void 0===t&&(t=2),void 0===i&&(i=.25);var r=n.call(this,e)||this;return r.priority=e,r.maximumScale=t,r.step=i,r._currentScale=-1,r._directionOffset=1,r}return T(e,n),e.prototype.getDescription=function(){return\"Setting hardware scaling level to \"+this._currentScale},e.prototype.apply=function(e,t){return-1===this._currentScale&&(this._currentScale=e.getEngine().getHardwareScalingLevel(),this._currentScale>this.maximumScale&&(this._directionOffset=-1)),this._currentScale+=this._directionOffset*this.step,e.getEngine().setHardwareScalingLevel(this._currentScale),1===this._directionOffset?this._currentScale>=this.maximumScale:this._currentScale<=this.maximumScale},e})(e);d.HardwareScalingOptimization=o;var s=(function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return T(t,e),t.prototype.getDescription=function(){return\"Turning shadows on/off\"},t.prototype.apply=function(e,t){return e.shadowsEnabled=t.isInImprovementMode,!0},t})(e);d.ShadowsOptimization=s;var a=(function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return T(t,e),t.prototype.getDescription=function(){return\"Turning post-processes on/off\"},t.prototype.apply=function(e,t){return e.postProcessesEnabled=t.isInImprovementMode,!0},t})(e);d.PostProcessesOptimization=a;var l=(function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return T(t,e),t.prototype.getDescription=function(){return\"Turning lens flares on/off\"},t.prototype.apply=function(e,t){return e.lensFlaresEnabled=t.isInImprovementMode,!0},t})(e);d.LensFlaresOptimization=l;var c=(function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return T(t,e),t.prototype.getDescription=function(){return this.onGetDescription?this.onGetDescription():\"Running user defined callback\"},t.prototype.apply=function(e,t){return!this.onApply||this.onApply(e,t)},t})(e);d.CustomOptimization=c;var h=(function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return T(t,e),t.prototype.getDescription=function(){return\"Turning particles on/off\"},t.prototype.apply=function(e,t){return e.particlesEnabled=t.isInImprovementMode,!0},t})(e);d.ParticlesOptimization=h;var u=(function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return T(t,e),t.prototype.getDescription=function(){return\"Turning render targets off\"},t.prototype.apply=function(e,t){return e.renderTargetsEnabled=t.isInImprovementMode,!0},t})(e);d.RenderTargetsOptimization=u;var f=(function(t){function u(){var e=null!==t&&t.apply(this,arguments)||this;return e._canBeMerged=function(e){if(!(e instanceof d.Mesh))return!1;var t=e;return!t.isDisposed()&&(!(!t.isVisible||!t.isEnabled())&&(!(0<t.instances.length)&&(!t.skeleton&&!t.hasLODLevels)))},e}return T(u,t),Object.defineProperty(u,\"UpdateSelectionTree\",{get:function(){return u._UpdateSelectionTree},set:function(e){u._UpdateSelectionTree=e},enumerable:!0,configurable:!0}),u.prototype.getDescription=function(){return\"Merging similar meshes together\"},u.prototype.apply=function(e,t,i){for(var r=e.meshes.slice(0),n=r.length,o=0;o<n;o++){var s=new Array,a=r[o];if(this._canBeMerged(a)){s.push(a);for(var l=o+1;l<n;l++){var c=r[l];this._canBeMerged(c)&&(c.material===a.material&&c.checkCollisions===a.checkCollisions&&(s.push(c),n--,r.splice(l,1),l--))}s.length<2||d.Mesh.MergeMeshes(s,void 0,!0)}}var h=e;return h.createOrUpdateSelectionOctree&&(null!=i?i&&h.createOrUpdateSelectionOctree():u.UpdateSelectionTree&&h.createOrUpdateSelectionOctree()),!0},u._UpdateSelectionTree=!1,u})(e);d.MergeMeshesOptimization=f;var p=(function(){function r(e,t){void 0===e&&(e=60),void 0===t&&(t=2e3),this.targetFrameRate=e,this.trackerDuration=t,this.optimizations=new Array}return r.prototype.addOptimization=function(e){return this.optimizations.push(e),this},r.prototype.addCustomOptimization=function(e,t,i){void 0===i&&(i=0);var r=new c(i);return r.onApply=e,r.onGetDescription=t,this.optimizations.push(r),this},r.LowDegradationAllowed=function(e){var t=new r(e),i=0;return t.addOptimization(new f(i)),t.addOptimization(new s(i)),t.addOptimization(new l(i)),i++,t.addOptimization(new a(i)),t.addOptimization(new h(i)),i++,t.addOptimization(new n(i,1024)),t},r.ModerateDegradationAllowed=function(e){var t=new r(e),i=0;return t.addOptimization(new f(i)),t.addOptimization(new s(i)),t.addOptimization(new l(i)),i++,t.addOptimization(new a(i)),t.addOptimization(new h(i)),i++,t.addOptimization(new n(i,512)),i++,t.addOptimization(new u(i)),i++,t.addOptimization(new o(i,2)),t},r.HighDegradationAllowed=function(e){var t=new r(e),i=0;return t.addOptimization(new f(i)),t.addOptimization(new s(i)),t.addOptimization(new l(i)),i++,t.addOptimization(new a(i)),t.addOptimization(new h(i)),i++,t.addOptimization(new n(i,256)),i++,t.addOptimization(new u(i)),i++,t.addOptimization(new o(i,4)),t},r})();d.SceneOptimizerOptions=p;var t=(function(){function o(e,t,i,r){void 0===i&&(i=!0),void 0===r&&(r=!1);var n=this;if(this._isRunning=!1,this._currentPriorityLevel=0,this._targetFrameRate=60,this._trackerDuration=2e3,this._currentFrameRate=0,this._improvementMode=!1,this.onSuccessObservable=new d.Observable,this.onNewOptimizationAppliedObservable=new d.Observable,this.onFailureObservable=new d.Observable,this._options=t||new p,this._options.targetFrameRate&&(this._targetFrameRate=this._options.targetFrameRate),this._options.trackerDuration&&(this._trackerDuration=this._options.trackerDuration),i)for(var o=0,s=0,a=this._options.optimizations;s<a.length;s++){a[s].priority=o++}this._improvementMode=r,this._scene=e||d.Engine.LastCreatedScene,this._sceneDisposeObserver=this._scene.onDisposeObservable.add((function(){n._sceneDisposeObserver=null,n.dispose()}))}return Object.defineProperty(o.prototype,\"isInImprovementMode\",{get:function(){return this._improvementMode},enumerable:!0,configurable:!0}),Object.defineProperty(o.prototype,\"currentPriorityLevel\",{get:function(){return this._currentPriorityLevel},enumerable:!0,configurable:!0}),Object.defineProperty(o.prototype,\"currentFrameRate\",{get:function(){return this._currentFrameRate},enumerable:!0,configurable:!0}),Object.defineProperty(o.prototype,\"targetFrameRate\",{get:function(){return this._targetFrameRate},set:function(e){this._targetFrameRate=e},enumerable:!0,configurable:!0}),Object.defineProperty(o.prototype,\"trackerDuration\",{get:function(){return this._trackerDuration},set:function(e){this._trackerDuration=e},enumerable:!0,configurable:!0}),Object.defineProperty(o.prototype,\"optimizations\",{get:function(){return this._options.optimizations},enumerable:!0,configurable:!0}),o.prototype.stop=function(){this._isRunning=!1},o.prototype.reset=function(){this._currentPriorityLevel=0},o.prototype.start=function(){var e=this;this._isRunning||(this._isRunning=!0,this._scene.executeWhenReady((function(){setTimeout((function(){e._checkCurrentState()}),e._trackerDuration)})))},o.prototype._checkCurrentState=function(){var e=this;if(this._isRunning){var t=this._scene,i=this._options;if(this._currentFrameRate=Math.round(t.getEngine().getFps()),this._improvementMode&&this._currentFrameRate<=this._targetFrameRate||!this._improvementMode&&this._currentFrameRate>=this._targetFrameRate)return this._isRunning=!1,void this.onSuccessObservable.notifyObservers(this);for(var r=!0,n=!0,o=0;o<i.optimizations.length;o++){var s=i.optimizations[o];s.priority===this._currentPriorityLevel&&(n=!1,r=r&&s.apply(t,this),this.onNewOptimizationAppliedObservable.notifyObservers(s))}if(n)return this._isRunning=!1,void this.onFailureObservable.notifyObservers(this);r&&this._currentPriorityLevel++,t.executeWhenReady((function(){setTimeout((function(){e._checkCurrentState()}),e._trackerDuration)}))}},o.prototype.dispose=function(){this.stop(),this.onSuccessObservable.clear(),this.onFailureObservable.clear(),this.onNewOptimizationAppliedObservable.clear(),this._sceneDisposeObserver&&this._scene.onDisposeObservable.remove(this._sceneDisposeObserver)},o.OptimizeAsync=function(e,t,i,r){var n=new o(e,t||p.ModerateDegradationAllowed(),!1);return i&&n.onSuccessObservable.add((function(){i()})),r&&n.onFailureObservable.add((function(){r()})),n.start(),n},o})();d.SceneOptimizer=t})($a||($a={})),(function(h){h.Scene.prototype.getOutlineRenderer=function(){return this._outlineRenderer||(this._outlineRenderer=new e(this)),this._outlineRenderer},Object.defineProperty(h.AbstractMesh.prototype,\"renderOutline\",{get:function(){return this._renderOutline},set:function(e){e&&this.getScene().getOutlineRenderer(),this._renderOutline=e},enumerable:!0,configurable:!0}),Object.defineProperty(h.AbstractMesh.prototype,\"renderOverlay\",{get:function(){return this._renderOverlay},set:function(e){e&&this.getScene().getOutlineRenderer(),this._renderOverlay=e},enumerable:!0,configurable:!0});var e=(function(){function e(e){this.name=h.SceneComponentConstants.NAME_OUTLINERENDERER,this.zOffset=1,this.scene=e,this._engine=e.getEngine(),this.scene._addComponent(this)}return e.prototype.register=function(){this.scene._beforeRenderingMeshStage.registerStep(h.SceneComponentConstants.STEP_BEFORERENDERINGMESH_OUTLINE,this,this._beforeRenderingMesh),this.scene._afterRenderingMeshStage.registerStep(h.SceneComponentConstants.STEP_AFTERRENDERINGMESH_OUTLINE,this,this._afterRenderingMesh)},e.prototype.rebuild=function(){},e.prototype.dispose=function(){},e.prototype.render=function(e,t,i){var r=this;void 0===i&&(i=!1);var n=this.scene,o=n.getEngine(),s=o.getCaps().instancedArrays&&null!==t.visibleInstances[e._id]&&void 0!==t.visibleInstances[e._id];if(this.isReady(e,s)){var a=e.getRenderingMesh(),l=e.getMaterial();if(l&&n.activeCamera){if(o.enableEffect(this._effect),l.useLogarithmicDepth&&this._effect.setFloat(\"logarithmicDepthConstant\",2/(Math.log(n.activeCamera.maxZ+1)/Math.LN2)),this._effect.setFloat(\"offset\",i?0:a.outlineWidth),this._effect.setColor4(\"color\",i?a.overlayColor:a.outlineColor,i?a.overlayAlpha:l.alpha),this._effect.setMatrix(\"viewProjection\",n.getTransformMatrix()),a.useBones&&a.computeBonesUsingShaders&&a.skeleton&&this._effect.setMatrices(\"mBones\",a.skeleton.getTransformMatrices(a)),a._bind(e,this._effect,h.Material.TriangleFillMode),l&&l.needAlphaTesting()){var c=l.getAlphaTestTexture();c&&(this._effect.setTexture(\"diffuseSampler\",c),this._effect.setMatrix(\"diffuseMatrix\",c.getTextureMatrix()))}o.setZOffset(-this.zOffset),a._processRendering(e,this._effect,h.Material.TriangleFillMode,t,s,(function(e,t){r._effect.setMatrix(\"world\",t)})),o.setZOffset(0)}}},e.prototype.isReady=function(e,t){var i=[],r=[h.VertexBuffer.PositionKind,h.VertexBuffer.NormalKind],n=e.getMesh(),o=e.getMaterial();o&&(o.needAlphaTesting()&&(i.push(\"#define ALPHATEST\"),n.isVerticesDataPresent(h.VertexBuffer.UVKind)&&(r.push(h.VertexBuffer.UVKind),i.push(\"#define UV1\")),n.isVerticesDataPresent(h.VertexBuffer.UV2Kind)&&(r.push(h.VertexBuffer.UV2Kind),i.push(\"#define UV2\"))),o.useLogarithmicDepth&&i.push(\"#define LOGARITHMICDEPTH\")),n.useBones&&n.computeBonesUsingShaders?(r.push(h.VertexBuffer.MatricesIndicesKind),r.push(h.VertexBuffer.MatricesWeightsKind),4<n.numBoneInfluencers&&(r.push(h.VertexBuffer.MatricesIndicesExtraKind),r.push(h.VertexBuffer.MatricesWeightsExtraKind)),i.push(\"#define NUM_BONE_INFLUENCERS \"+n.numBoneInfluencers),i.push(\"#define BonesPerMesh \"+(n.skeleton?n.skeleton.bones.length+1:0))):i.push(\"#define NUM_BONE_INFLUENCERS 0\"),t&&(i.push(\"#define INSTANCES\"),r.push(\"world0\"),r.push(\"world1\"),r.push(\"world2\"),r.push(\"world3\"));var s=i.join(\"\\n\");return this._cachedDefines!==s&&(this._cachedDefines=s,this._effect=this.scene.getEngine().createEffect(\"outline\",r,[\"world\",\"mBones\",\"viewProjection\",\"diffuseMatrix\",\"offset\",\"color\",\"logarithmicDepthConstant\"],[\"diffuseSampler\"],s)),this._effect.isReady()},e.prototype._beforeRenderingMesh=function(e,t,i){this._savedDepthWrite=this._engine.getDepthWrite(),e.renderOutline&&(this._engine.setDepthWrite(!1),this.render(t,i),this._engine.setDepthWrite(this._savedDepthWrite))},e.prototype._afterRenderingMesh=function(e,t,i){if(e.renderOutline&&this._savedDepthWrite&&(this._engine.setDepthWrite(!0),this._engine.setColorWrite(!1),this.render(t,i),this._engine.setColorWrite(!0)),e.renderOverlay){var r=this._engine.getAlphaMode();this._engine.setAlphaMode(h.Engine.ALPHA_COMBINE),this.render(t,i,!0),this._engine.setAlphaMode(r)}},e})();h.OutlineRenderer=e})($a||($a={})),(function(y){y.AbstractMesh.prototype.disableEdgesRendering=function(){return this._edgesRenderer&&(this._edgesRenderer.dispose(),this._edgesRenderer=null),this},y.AbstractMesh.prototype.enableEdgesRendering=function(e,t){return void 0===e&&(e=.95),void 0===t&&(t=!1),this.disableEdgesRendering(),this._edgesRenderer=new i(this,e,t),this},Object.defineProperty(y.AbstractMesh.prototype,\"edgesRenderer\",{get:function(){return this._edgesRenderer},enumerable:!0,configurable:!0}),y.LinesMesh.prototype.enableEdgesRendering=function(e,t){return void 0===e&&(e=.95),void 0===t&&(t=!1),this.disableEdgesRendering(),this._edgesRenderer=new y.LineEdgesRenderer(this,e,t),this};var b=function(){this.edges=new Array,this.edgesConnectedCount=0},i=(function(){function e(e,t,i,r){void 0===t&&(t=.95),void 0===i&&(i=!1),void 0===r&&(r=!0);var n=this;this.edgesWidthScalerForOrthographic=1e3,this.edgesWidthScalerForPerspective=50,this._linesPositions=new Array,this._linesNormals=new Array,this._linesIndices=new Array,this._buffers={},this._checkVerticesInsteadOfIndices=!1,this.isEnabled=!0,this._source=e,this._checkVerticesInsteadOfIndices=i,this._epsilon=t,this._prepareRessources(),r&&this._generateEdgesLines(),this._meshRebuildObserver=this._source.onRebuildObservable.add((function(){n._rebuild()})),this._meshDisposeObserver=this._source.onDisposeObservable.add((function(){n.dispose()}))}return e.prototype._prepareRessources=function(){this._lineShader||(this._lineShader=new y.ShaderMaterial(\"lineShader\",this._source.getScene(),\"line\",{attributes:[\"position\",\"normal\"],uniforms:[\"worldViewProjection\",\"color\",\"width\",\"aspectRatio\"]}),this._lineShader.disableDepthWrite=!0,this._lineShader.backFaceCulling=!1)},e.prototype._rebuild=function(){var e=this._buffers[y.VertexBuffer.PositionKind];e&&e._rebuild(),(e=this._buffers[y.VertexBuffer.NormalKind])&&e._rebuild();var t=this._source.getScene().getEngine();this._ib=t.createIndexBuffer(this._linesIndices)},e.prototype.dispose=function(){this._source.onRebuildObservable.remove(this._meshRebuildObserver),this._source.onDisposeObservable.remove(this._meshDisposeObserver);var e=this._buffers[y.VertexBuffer.PositionKind];e&&(e.dispose(),this._buffers[y.VertexBuffer.PositionKind]=null),(e=this._buffers[y.VertexBuffer.NormalKind])&&(e.dispose(),this._buffers[y.VertexBuffer.NormalKind]=null),this._source.getScene().getEngine()._releaseBuffer(this._ib),this._lineShader.dispose()},e.prototype._processEdgeForAdjacencies=function(e,t,i,r,n){return e===i&&t===r||e===r&&t===i?0:e===r&&t===n||e===n&&t===r?1:e===n&&t===i||e===i&&t===n?2:-1},e.prototype._processEdgeForAdjacenciesWithVertices=function(e,t,i,r,n){return e.equalsWithEpsilon(i)&&t.equalsWithEpsilon(r)||e.equalsWithEpsilon(r)&&t.equalsWithEpsilon(i)?0:e.equalsWithEpsilon(r)&&t.equalsWithEpsilon(n)||e.equalsWithEpsilon(n)&&t.equalsWithEpsilon(r)?1:e.equalsWithEpsilon(n)&&t.equalsWithEpsilon(i)||e.equalsWithEpsilon(i)&&t.equalsWithEpsilon(n)?2:-1},e.prototype._checkEdge=function(e,t,i,r,n){var o;void 0===t?o=!0:o=y.Vector3.Dot(i[e],i[t])<this._epsilon;if(o){var s=this._linesPositions.length/3;r.subtract(n).normalize(),this._linesPositions.push(r.x),this._linesPositions.push(r.y),this._linesPositions.push(r.z),this._linesPositions.push(r.x),this._linesPositions.push(r.y),this._linesPositions.push(r.z),this._linesPositions.push(n.x),this._linesPositions.push(n.y),this._linesPositions.push(n.z),this._linesPositions.push(n.x),this._linesPositions.push(n.y),this._linesPositions.push(n.z),this._linesNormals.push(n.x),this._linesNormals.push(n.y),this._linesNormals.push(n.z),this._linesNormals.push(-1),this._linesNormals.push(n.x),this._linesNormals.push(n.y),this._linesNormals.push(n.z),this._linesNormals.push(1),this._linesNormals.push(r.x),this._linesNormals.push(r.y),this._linesNormals.push(r.z),this._linesNormals.push(-1),this._linesNormals.push(r.x),this._linesNormals.push(r.y),this._linesNormals.push(r.z),this._linesNormals.push(1),this._linesIndices.push(s),this._linesIndices.push(s+1),this._linesIndices.push(s+2),this._linesIndices.push(s),this._linesIndices.push(s+2),this._linesIndices.push(s+3)}},e.prototype._generateEdgesLines=function(){var e=this._source.getVerticesData(y.VertexBuffer.PositionKind),t=this._source.getIndices();if(t&&e){var i,r,n=new Array,o=new Array;for(i=0;i<t.length;i+=3){r=new b;var s=t[i],a=t[i+1],l=t[i+2];r.p0=new y.Vector3(e[3*s],e[3*s+1],e[3*s+2]),r.p1=new y.Vector3(e[3*a],e[3*a+1],e[3*a+2]),r.p2=new y.Vector3(e[3*l],e[3*l+1],e[3*l+2]);var c=y.Vector3.Cross(r.p1.subtract(r.p0),r.p2.subtract(r.p1));c.normalize(),o.push(c),n.push(r)}for(i=0;i<n.length;i++){r=n[i];for(var h=i+1;h<n.length;h++){var u=n[h];if(3===r.edgesConnectedCount)break;if(3!==u.edgesConnectedCount)for(var d=t[3*h],f=t[3*h+1],p=t[3*h+2],_=0;_<3;_++){var m=0;if(void 0===r.edges[_]){switch(_){case 0:m=this._checkVerticesInsteadOfIndices?this._processEdgeForAdjacenciesWithVertices(r.p0,r.p1,u.p0,u.p1,u.p2):this._processEdgeForAdjacencies(t[3*i],t[3*i+1],d,f,p);break;case 1:m=this._checkVerticesInsteadOfIndices?this._processEdgeForAdjacenciesWithVertices(r.p1,r.p2,u.p0,u.p1,u.p2):this._processEdgeForAdjacencies(t[3*i+1],t[3*i+2],d,f,p);break;case 2:m=this._checkVerticesInsteadOfIndices?this._processEdgeForAdjacenciesWithVertices(r.p2,r.p0,u.p0,u.p1,u.p2):this._processEdgeForAdjacencies(t[3*i+2],t[3*i],d,f,p)}if(-1!==m&&(r.edges[_]=h,u.edges[m]=i,r.edgesConnectedCount++,u.edgesConnectedCount++,3===r.edgesConnectedCount))break}}}}for(i=0;i<n.length;i++){var g=n[i];this._checkEdge(i,g.edges[0],o,g.p0,g.p1),this._checkEdge(i,g.edges[1],o,g.p1,g.p2),this._checkEdge(i,g.edges[2],o,g.p2,g.p0)}var v=this._source.getScene().getEngine();this._buffers[y.VertexBuffer.PositionKind]=new y.VertexBuffer(v,this._linesPositions,y.VertexBuffer.PositionKind,!1),this._buffers[y.VertexBuffer.NormalKind]=new y.VertexBuffer(v,this._linesNormals,y.VertexBuffer.NormalKind,!1,!1,4),this._ib=v.createIndexBuffer(this._linesIndices),this._indicesCount=this._linesIndices.length}},e.prototype.isReady=function(){return this._lineShader.isReady()},e.prototype.render=function(){var e=this._source.getScene();if(this.isReady()&&e.activeCamera){var t=e.getEngine();this._lineShader._preBind(),1!==this._source.edgesColor.a?t.setAlphaMode(y.Engine.ALPHA_COMBINE):t.setAlphaMode(y.Engine.ALPHA_DISABLE),t.bindBuffers(this._buffers,this._ib,this._lineShader.getEffect()),e.resetCachedMaterial(),this._lineShader.setColor4(\"color\",this._source.edgesColor),e.activeCamera.mode===y.Camera.ORTHOGRAPHIC_CAMERA?this._lineShader.setFloat(\"width\",this._source.edgesWidth/this.edgesWidthScalerForOrthographic):this._lineShader.setFloat(\"width\",this._source.edgesWidth/this.edgesWidthScalerForPerspective),this._lineShader.setFloat(\"aspectRatio\",t.getAspectRatio(e.activeCamera)),this._lineShader.bind(this._source.getWorldMatrix()),t.drawElementsType(y.Material.TriangleFillMode,0,this._indicesCount),this._lineShader.unbind()}},e})();y.EdgesRenderer=i})($a||($a={})),oa=$a||($a={}),sa=function(){this.edges=new Array,this.edgesConnectedCount=0},aa=(function(n){function e(e,t,i){void 0===t&&(t=.95),void 0===i&&(i=!1);var r=n.call(this,e,t,i,!1)||this;return r._generateEdgesLines(),r}return T(e,n),e.prototype._checkEdge=function(e,t,i,r,n){var o=this._linesPositions.length/3;r.subtract(n).normalize(),this._linesPositions.push(r.x),this._linesPositions.push(r.y),this._linesPositions.push(r.z),this._linesPositions.push(r.x),this._linesPositions.push(r.y),this._linesPositions.push(r.z),this._linesPositions.push(n.x),this._linesPositions.push(n.y),this._linesPositions.push(n.z),this._linesPositions.push(n.x),this._linesPositions.push(n.y),this._linesPositions.push(n.z),this._linesNormals.push(n.x),this._linesNormals.push(n.y),this._linesNormals.push(n.z),this._linesNormals.push(-1),this._linesNormals.push(n.x),this._linesNormals.push(n.y),this._linesNormals.push(n.z),this._linesNormals.push(1),this._linesNormals.push(r.x),this._linesNormals.push(r.y),this._linesNormals.push(r.z),this._linesNormals.push(-1),this._linesNormals.push(r.x),this._linesNormals.push(r.y),this._linesNormals.push(r.z),this._linesNormals.push(1),this._linesIndices.push(o),this._linesIndices.push(o+1),this._linesIndices.push(o+2),this._linesIndices.push(o),this._linesIndices.push(o+2),this._linesIndices.push(o+3)},e.prototype._generateEdgesLines=function(){var e=this._source.getVerticesData(oa.VertexBuffer.PositionKind);if(this._source.getIndices()&&e){for(var t,i=new Array,r=new Array,n=0;n<e.length/3-1;n++){var o=new sa;o.p0=new oa.Vector3(e[3*n],e[3*n+1],e[3*n+2]),o.p1=new oa.Vector3(e[3*(n+1)],e[3*(n+1)+1],e[3*(n+1)+2]),i.push(o)}for(t=0;t<i.length;t++){var s=i[t];this._checkEdge(t,s.edges[0],r,s.p0,s.p1)}var a=this._source.getScene().getEngine();this._buffers[oa.VertexBuffer.PositionKind]=new oa.VertexBuffer(a,this._linesPositions,oa.VertexBuffer.PositionKind,!1),this._buffers[oa.VertexBuffer.NormalKind]=new oa.VertexBuffer(a,this._linesNormals,oa.VertexBuffer.NormalKind,!1,!1,4),this._ib=a.createIndexBuffer(this._linesIndices),this._indicesCount=this._linesIndices.length}},e})(oa.EdgesRenderer),oa.LineEdgesRenderer=aa,(function(s){s.AbstractScene.AddParser(s.SceneComponentConstants.NAME_EFFECTLAYER,(function(e,t,i,r){if(e.effectLayers){i.effectLayers||(i.effectLayers=new Array);for(var n=0;n<e.effectLayers.length;n++){var o=s.EffectLayer.Parse(e.effectLayers[n],t,r);i.effectLayers.push(o)}}})),s.AbstractScene.prototype.removeEffectLayer=function(e){var t=this.effectLayers.indexOf(e);return-1!==t&&this.effectLayers.splice(t,1),t},s.AbstractScene.prototype.addEffectLayer=function(e){this.effectLayers.push(e)};var e=(function(){function e(e){this.name=s.SceneComponentConstants.NAME_EFFECTLAYER,this._renderEffects=!1,this._needStencil=!1,this._previousStencilState=!1,this.scene=e,this._engine=e.getEngine(),e.effectLayers=new Array}return e.prototype.register=function(){this.scene._isReadyForMeshStage.registerStep(s.SceneComponentConstants.STEP_ISREADYFORMESH_EFFECTLAYER,this,this._isReadyForMesh),this.scene._cameraDrawRenderTargetStage.registerStep(s.SceneComponentConstants.STEP_CAMERADRAWRENDERTARGET_EFFECTLAYER,this,this._renderMainTexture),this.scene._beforeCameraDrawStage.registerStep(s.SceneComponentConstants.STEP_BEFORECAMERADRAW_EFFECTLAYER,this,this._setStencil),this.scene._afterRenderingGroupDrawStage.registerStep(s.SceneComponentConstants.STEP_AFTERRENDERINGGROUPDRAW_EFFECTLAYER_DRAW,this,this._drawRenderingGroup),this.scene._afterCameraDrawStage.registerStep(s.SceneComponentConstants.STEP_AFTERCAMERADRAW_EFFECTLAYER,this,this._setStencilBack),this.scene._afterCameraDrawStage.registerStep(s.SceneComponentConstants.STEP_AFTERCAMERADRAW_EFFECTLAYER_DRAW,this,this._drawCamera)},e.prototype.rebuild=function(){for(var e=0,t=this.scene.effectLayers;e<t.length;e++){t[e]._rebuild()}},e.prototype.serialize=function(e){e.effectLayers=[];for(var t=0,i=this.scene.effectLayers;t<i.length;t++){var r=i[t];r.serialize&&e.effectLayers.push(r.serialize())}},e.prototype.addFromContainer=function(e){var t=this;e.effectLayers&&e.effectLayers.forEach((function(e){t.scene.addEffectLayer(e)}))},e.prototype.removeFromContainer=function(e){var t=this;e.effectLayers&&e.effectLayers.forEach((function(e){t.scene.removeEffectLayer(e)}))},e.prototype.dispose=function(){for(var e=this.scene.effectLayers;e.length;)e[0].dispose()},e.prototype._isReadyForMesh=function(e,t){for(var i=0,r=this.scene.effectLayers;i<r.length;i++){var n=r[i];if(n.hasMesh(e))for(var o=0,s=e.subMeshes;o<s.length;o++){var a=s[o];if(!n.isReady(a,t))return!1}}return!0},e.prototype._renderMainTexture=function(e){this._renderEffects=!1,this._needStencil=!1;var t=this.scene.effectLayers;if(t&&0<t.length){this._previousStencilState=this._engine.getStencilBuffer();for(var i=0,r=t;i<r.length;i++){var n=r[i];if(n.shouldRender()&&(!n.camera||n.camera.cameraRigMode===s.Camera.RIG_MODE_NONE&&e===n.camera||n.camera.cameraRigMode!==s.Camera.RIG_MODE_NONE&&-1<n.camera._rigCameras.indexOf(e))){this._renderEffects=!0,this._needStencil=this._needStencil||n.needStencil();var o=n._mainTexture;o._shouldRender()&&(this.scene.incrementRenderId(),o.render(!1,!1))}}this.scene.incrementRenderId()}},e.prototype._setStencil=function(e){this._needStencil&&this._engine.setStencilBuffer(!0)},e.prototype._setStencilBack=function(e){this._needStencil&&this._engine.setStencilBuffer(this._previousStencilState)},e.prototype._draw=function(e){if(this._renderEffects){this._engine.setDepthBuffer(!1);for(var t=this.scene.effectLayers,i=0;i<t.length;i++){var r=t[i];r.renderingGroupId===e&&r.shouldRender()&&r.render()}this._engine.setDepthBuffer(!0)}},e.prototype._drawCamera=function(e){this._renderEffects&&this._draw(-1)},e.prototype._drawRenderingGroup=function(e){!this.scene._isInIntermediateRendering()&&this._renderEffects&&this._draw(e)},e})();s.EffectLayerSceneComponent=e})($a||($a={}));var la,ca,ha,ua,da,fa,pa,_a,ma,ga,va,ya,ba,Ta,Ea,xa,Pa,Aa,Sa,Ma,Ra,Ca,Oa,Da,Ia,wa,La,Fa,Ba;ae=this&&this.__assign||function(){return(ae=Object.assign||function(e){for(var t,i=1,r=arguments.length;i<r;i++)for(var n in t=arguments[i])Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e}).apply(this,arguments)};la=$a||($a={}),ca=(function(){function e(e,t){this._vertexBuffers={},this._maxSize=0,this._mainTextureDesiredSize={width:0,height:0},this._shouldRender=!0,this._postProcesses=[],this._textures=[],this._emissiveTextureAndColor={texture:null,color:new la.Color4},this.neutralColor=new la.Color4,this.isEnabled=!0,this.onDisposeObservable=new la.Observable,this.onBeforeRenderMainTextureObservable=new la.Observable,this.onBeforeComposeObservable=new la.Observable,this.onAfterComposeObservable=new la.Observable,this.onSizeChangedObservable=new la.Observable,this.name=e,this._scene=t||la.Engine.LastCreatedScene;var i=this._scene._getComponent(la.SceneComponentConstants.NAME_EFFECTLAYER);i||(i=new la.EffectLayerSceneComponent(this._scene),this._scene._addComponent(i)),this._engine=this._scene.getEngine(),this._maxSize=this._engine.getCaps().maxTextureSize,this._scene.effectLayers.push(this),this._generateIndexBuffer(),this._genrateVertexBuffer()}return Object.defineProperty(e.prototype,\"camera\",{get:function(){return this._effectLayerOptions.camera},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,\"renderingGroupId\",{get:function(){return this._effectLayerOptions.renderingGroupId},enumerable:!0,configurable:!0}),e.prototype._init=function(e){this._effectLayerOptions=ae({mainTextureRatio:.5,alphaBlendingMode:la.Engine.ALPHA_COMBINE,camera:null,renderingGroupId:-1},e),this._setMainTextureSize(),this._createMainTexture(),this._createTextureAndPostProcesses(),this._mergeEffect=this._createMergeEffect()},e.prototype._generateIndexBuffer=function(){var e=[];e.push(0),e.push(1),e.push(2),e.push(0),e.push(2),e.push(3),this._indexBuffer=this._engine.createIndexBuffer(e)},e.prototype._genrateVertexBuffer=function(){var e=[];e.push(1,1),e.push(-1,1),e.push(-1,-1),e.push(1,-1);var t=new la.VertexBuffer(this._engine,e,la.VertexBuffer.PositionKind,!1,!1,2);this._vertexBuffers[la.VertexBuffer.PositionKind]=t},e.prototype._setMainTextureSize=function(){this._effectLayerOptions.mainTextureFixedSize?(this._mainTextureDesiredSize.width=this._effectLayerOptions.mainTextureFixedSize,this._mainTextureDesiredSize.height=this._effectLayerOptions.mainTextureFixedSize):(this._mainTextureDesiredSize.width=this._engine.getRenderWidth()*this._effectLayerOptions.mainTextureRatio,this._mainTextureDesiredSize.height=this._engine.getRenderHeight()*this._effectLayerOptions.mainTextureRatio,this._mainTextureDesiredSize.width=this._engine.needPOTTextures?la.Tools.GetExponentOfTwo(this._mainTextureDesiredSize.width,this._maxSize):this._mainTextureDesiredSize.width,this._mainTextureDesiredSize.height=this._engine.needPOTTextures?la.Tools.GetExponentOfTwo(this._mainTextureDesiredSize.height,this._maxSize):this._mainTextureDesiredSize.height),this._mainTextureDesiredSize.width=Math.floor(this._mainTextureDesiredSize.width),this._mainTextureDesiredSize.height=Math.floor(this._mainTextureDesiredSize.height)},e.prototype._createMainTexture=function(){var s=this;this._mainTexture=new la.RenderTargetTexture(\"HighlightLayerMainRTT\",{width:this._mainTextureDesiredSize.width,height:this._mainTextureDesiredSize.height},this._scene,!1,!0,la.Engine.TEXTURETYPE_UNSIGNED_INT),this._mainTexture.activeCamera=this._effectLayerOptions.camera,this._mainTexture.wrapU=la.Texture.CLAMP_ADDRESSMODE,this._mainTexture.wrapV=la.Texture.CLAMP_ADDRESSMODE,this._mainTexture.anisotropicFilteringLevel=1,this._mainTexture.updateSamplingMode(la.Texture.BILINEAR_SAMPLINGMODE),this._mainTexture.renderParticles=!1,this._mainTexture.renderList=null,this._mainTexture.ignoreCameraViewport=!0,this._mainTexture.customRenderFunction=function(e,t,i,r){var n;s.onBeforeRenderMainTextureObservable.notifyObservers(s);var o=s._scene.getEngine();if(r.length){for(o.setColorWrite(!1),n=0;n<r.length;n++)s._renderSubMesh(r.data[n]);o.setColorWrite(!0)}for(n=0;n<e.length;n++)s._renderSubMesh(e.data[n]);for(n=0;n<t.length;n++)s._renderSubMesh(t.data[n]);for(n=0;n<i.length;n++)s._renderSubMesh(i.data[n])},this._mainTexture.onClearObservable.add((function(e){e.clear(s.neutralColor,!0,!0,!0)}))},e.prototype._isReady=function(e,t,i){var r=e.getMaterial();if(!r)return!1;if(!r.isReady(e.getMesh(),t))return!1;var n=[],o=[la.VertexBuffer.PositionKind],s=e.getMesh(),a=!1,l=!1;if(r&&r.needAlphaTesting()){var c=r.getAlphaTestTexture();c&&(n.push(\"#define ALPHATEST\"),s.isVerticesDataPresent(la.VertexBuffer.UV2Kind)&&1===c.coordinatesIndex?(n.push(\"#define DIFFUSEUV2\"),l=!0):s.isVerticesDataPresent(la.VertexBuffer.UVKind)&&(n.push(\"#define DIFFUSEUV1\"),a=!0))}i&&(n.push(\"#define EMISSIVE\"),s.isVerticesDataPresent(la.VertexBuffer.UV2Kind)&&1===i.coordinatesIndex?(n.push(\"#define EMISSIVEUV2\"),l=!0):s.isVerticesDataPresent(la.VertexBuffer.UVKind)&&(n.push(\"#define EMISSIVEUV1\"),a=!0)),a&&(o.push(la.VertexBuffer.UVKind),n.push(\"#define UV1\")),l&&(o.push(la.VertexBuffer.UV2Kind),n.push(\"#define UV2\")),s.useBones&&s.computeBonesUsingShaders?(o.push(la.VertexBuffer.MatricesIndicesKind),o.push(la.VertexBuffer.MatricesWeightsKind),4<s.numBoneInfluencers&&(o.push(la.VertexBuffer.MatricesIndicesExtraKind),o.push(la.VertexBuffer.MatricesWeightsExtraKind)),n.push(\"#define NUM_BONE_INFLUENCERS \"+s.numBoneInfluencers),n.push(\"#define BonesPerMesh \"+(s.skeleton?s.skeleton.bones.length+1:0))):n.push(\"#define NUM_BONE_INFLUENCERS 0\");var h=s.morphTargetManager,u=0;h&&0<h.numInfluencers&&(n.push(\"#define MORPHTARGETS\"),u=h.numInfluencers,n.push(\"#define NUM_MORPH_INFLUENCERS \"+u),la.MaterialHelper.PrepareAttributesForMorphTargets(o,s,{NUM_MORPH_INFLUENCERS:u})),t&&(n.push(\"#define INSTANCES\"),o.push(\"world0\"),o.push(\"world1\"),o.push(\"world2\"),o.push(\"world3\"));var d=n.join(\"\\n\");return this._cachedDefines!==d&&(this._cachedDefines=d,this._effectLayerMapGenerationEffect=this._scene.getEngine().createEffect(\"glowMapGeneration\",o,[\"world\",\"mBones\",\"viewProjection\",\"diffuseMatrix\",\"color\",\"emissiveMatrix\",\"morphTargetInfluences\"],[\"diffuseSampler\",\"emissiveSampler\"],d,void 0,void 0,void 0,{maxSimultaneousMorphTargets:u})),this._effectLayerMapGenerationEffect.isReady()},e.prototype.render=function(){var e=this._mergeEffect;if(e.isReady()){for(var t=0;t<this._postProcesses.length;t++)if(!this._postProcesses[t].isReady())return;var i=this._scene.getEngine();this.onBeforeComposeObservable.notifyObservers(this),i.enableEffect(e),i.setState(!1),i.bindBuffers(this._vertexBuffers,this._indexBuffer,e);var r=i.getAlphaMode();i.setAlphaMode(this._effectLayerOptions.alphaBlendingMode),this._internalRender(e),i.setAlphaMode(r),this.onAfterComposeObservable.notifyObservers(this);var n=this._mainTexture.getSize();this._setMainTextureSize(),n.width===this._mainTextureDesiredSize.width&&n.height===this._mainTextureDesiredSize.height||(this.onSizeChangedObservable.notifyObservers(this),this._disposeTextureAndPostProcesses(),this._createMainTexture(),this._createTextureAndPostProcesses())}},e.prototype.hasMesh=function(e){return-1===this.renderingGroupId||e.renderingGroupId===this.renderingGroupId},e.prototype.shouldRender=function(){return this.isEnabled&&this._shouldRender},e.prototype._shouldRenderMesh=function(e){return!0},e.prototype._shouldRenderEmissiveTextureForMesh=function(e){return!0},e.prototype._renderSubMesh=function(e){var i=this;if(this.shouldRender()){var t=e.getMaterial(),r=e.getRenderingMesh(),n=this._scene,o=n.getEngine();if(t&&!t.needAlphaBlendingForMesh(r)){o.setState(t.backFaceCulling);var s=r._getInstancesRenderList(e._id);if(!s.mustReturn&&this._shouldRenderMesh(r)){var a=o.getCaps().instancedArrays&&null!==s.visibleInstances[e._id]&&void 0!==s.visibleInstances[e._id];if(this._setEmissiveTextureAndColor(r,e,t),this._isReady(e,a,this._emissiveTextureAndColor.texture)){if(o.enableEffect(this._effectLayerMapGenerationEffect),r._bind(e,this._effectLayerMapGenerationEffect,la.Material.TriangleFillMode),this._effectLayerMapGenerationEffect.setMatrix(\"viewProjection\",n.getTransformMatrix()),this._effectLayerMapGenerationEffect.setFloat4(\"color\",this._emissiveTextureAndColor.color.r,this._emissiveTextureAndColor.color.g,this._emissiveTextureAndColor.color.b,this._emissiveTextureAndColor.color.a),t&&t.needAlphaTesting()){var l=t.getAlphaTestTexture();if(l){this._effectLayerMapGenerationEffect.setTexture(\"diffuseSampler\",l);var c=l.getTextureMatrix();c&&this._effectLayerMapGenerationEffect.setMatrix(\"diffuseMatrix\",c)}}this._emissiveTextureAndColor.texture&&(this._effectLayerMapGenerationEffect.setTexture(\"emissiveSampler\",this._emissiveTextureAndColor.texture),this._effectLayerMapGenerationEffect.setMatrix(\"emissiveMatrix\",this._emissiveTextureAndColor.texture.getTextureMatrix())),r.useBones&&r.computeBonesUsingShaders&&r.skeleton&&this._effectLayerMapGenerationEffect.setMatrices(\"mBones\",r.skeleton.getTransformMatrices(r)),la.MaterialHelper.BindMorphTargetParameters(r,this._effectLayerMapGenerationEffect),r._processRendering(e,this._effectLayerMapGenerationEffect,la.Material.TriangleFillMode,s,a,(function(e,t){return i._effectLayerMapGenerationEffect.setMatrix(\"world\",t)}))}else this._mainTexture.resetRefreshCounter()}}}},e.prototype._rebuild=function(){var e=this._vertexBuffers[la.VertexBuffer.PositionKind];e&&e._rebuild(),this._generateIndexBuffer()},e.prototype._disposeTextureAndPostProcesses=function(){this._mainTexture.dispose();for(var e=0;e<this._postProcesses.length;e++)this._postProcesses[e]&&this._postProcesses[e].dispose();this._postProcesses=[];for(e=0;e<this._textures.length;e++)this._textures[e]&&this._textures[e].dispose();this._textures=[]},e.prototype.dispose=function(){var e=this._vertexBuffers[la.VertexBuffer.PositionKind];e&&(e.dispose(),this._vertexBuffers[la.VertexBuffer.PositionKind]=null),this._indexBuffer&&(this._scene.getEngine()._releaseBuffer(this._indexBuffer),this._indexBuffer=null),this._disposeTextureAndPostProcesses();var t=this._scene.effectLayers.indexOf(this,0);-1<t&&this._scene.effectLayers.splice(t,1),this.onDisposeObservable.notifyObservers(this),this.onDisposeObservable.clear(),this.onBeforeRenderMainTextureObservable.clear(),this.onBeforeComposeObservable.clear(),this.onAfterComposeObservable.clear(),this.onSizeChangedObservable.clear()},e.prototype.getClassName=function(){return\"EffectLayer\"},e.Parse=function(e,t,i){return la.Tools.Instantiate(e.customType).Parse(e,t,i)},b([la.serialize()],e.prototype,\"name\",void 0),b([la.serializeAsColor4()],e.prototype,\"neutralColor\",void 0),b([la.serialize()],e.prototype,\"isEnabled\",void 0),b([la.serializeAsCameraReference()],e.prototype,\"camera\",null),b([la.serialize()],e.prototype,\"renderingGroupId\",null),e})(),la.EffectLayer=ca,(function(h){h.AbstractScene.prototype.getHighlightLayerByName=function(e){for(var t=0;t<this.effectLayers.length;t++)if(this.effectLayers[t].name===e&&this.effectLayers[t].getEffectName()===i.EffectName)return this.effectLayers[t];return null};var n=(function(c){function e(e,t,i,r,n,o,s,a){void 0===o&&(o=h.Texture.BILINEAR_SAMPLINGMODE);var l=c.call(this,e,\"glowBlurPostProcess\",[\"screenSize\",\"direction\",\"blurWidth\"],null,r,n,o,s,a)||this;return l.direction=t,l.kernel=i,l.onApplyObservable.add((function(e){e.setFloat2(\"screenSize\",l.width,l.height),e.setVector2(\"direction\",l.direction),e.setFloat(\"blurWidth\",l.kernel)})),l}return T(e,c),e})(h.PostProcess),i=(function(s){function a(e,t,i){var r=s.call(this,e,t)||this;return r.name=e,r.innerGlow=!0,r.outerGlow=!0,r.onBeforeBlurObservable=new h.Observable,r.onAfterBlurObservable=new h.Observable,r._instanceGlowingMeshStencilReference=a.GlowingMeshStencilReference++,r._meshes={},r._excludedMeshes={},r.neutralColor=a.NeutralColor,r._engine.isStencilEnable||h.Tools.Warn(\"Rendering the Highlight Layer requires the stencil to be active on the canvas. var engine = new BABYLON.Engine(canvas, antialias, { stencil: true }\"),r._options=ae({mainTextureRatio:.5,blurTextureSizeRatio:.5,blurHorizontalSize:1,blurVerticalSize:1,alphaBlendingMode:h.Engine.ALPHA_COMBINE,camera:null,renderingGroupId:-1},i),r._init({alphaBlendingMode:r._options.alphaBlendingMode,camera:r._options.camera,mainTextureFixedSize:r._options.mainTextureFixedSize,mainTextureRatio:r._options.mainTextureRatio,renderingGroupId:r._options.renderingGroupId}),r._shouldRender=!1,r}return T(a,s),Object.defineProperty(a.prototype,\"blurHorizontalSize\",{get:function(){return this._horizontalBlurPostprocess.kernel},set:function(e){this._horizontalBlurPostprocess.kernel=e},enumerable:!0,configurable:!0}),Object.defineProperty(a.prototype,\"blurVerticalSize\",{get:function(){return this._verticalBlurPostprocess.kernel},set:function(e){this._verticalBlurPostprocess.kernel=e},enumerable:!0,configurable:!0}),a.prototype.getEffectName=function(){return a.EffectName},a.prototype._createMergeEffect=function(){return this._engine.createEffect(\"glowMapMerge\",[h.VertexBuffer.PositionKind],[\"offset\"],[\"textureSampler\"],this._options.isStroke?\"#define STROKE \\n\":void 0)},a.prototype._createTextureAndPostProcesses=function(){var t=this,i=this._mainTextureDesiredSize.width*this._options.blurTextureSizeRatio,r=this._mainTextureDesiredSize.height*this._options.blurTextureSizeRatio;i=this._engine.needPOTTextures?h.Tools.GetExponentOfTwo(i,this._maxSize):i,r=this._engine.needPOTTextures?h.Tools.GetExponentOfTwo(r,this._maxSize):r;var e=0;e=this._engine.getCaps().textureHalfFloatRender?h.Engine.TEXTURETYPE_HALF_FLOAT:h.Engine.TEXTURETYPE_UNSIGNED_INT,this._blurTexture=new h.RenderTargetTexture(\"HighlightLayerBlurRTT\",{width:i,height:r},this._scene,!1,!0,e),this._blurTexture.wrapU=h.Texture.CLAMP_ADDRESSMODE,this._blurTexture.wrapV=h.Texture.CLAMP_ADDRESSMODE,this._blurTexture.anisotropicFilteringLevel=16,this._blurTexture.updateSamplingMode(h.Texture.TRILINEAR_SAMPLINGMODE),this._blurTexture.renderParticles=!1,this._blurTexture.ignoreCameraViewport=!0,this._textures=[this._blurTexture],this._options.alphaBlendingMode===h.Engine.ALPHA_COMBINE?(this._downSamplePostprocess=new h.PassPostProcess(\"HighlightLayerPPP\",this._options.blurTextureSizeRatio,null,h.Texture.BILINEAR_SAMPLINGMODE,this._scene.getEngine()),this._downSamplePostprocess.onApplyObservable.add((function(e){e.setTexture(\"textureSampler\",t._mainTexture)})),this._horizontalBlurPostprocess=new n(\"HighlightLayerHBP\",new h.Vector2(1,0),this._options.blurHorizontalSize,1,null,h.Texture.BILINEAR_SAMPLINGMODE,this._scene.getEngine()),this._horizontalBlurPostprocess.onApplyObservable.add((function(e){e.setFloat2(\"screenSize\",i,r)})),this._verticalBlurPostprocess=new n(\"HighlightLayerVBP\",new h.Vector2(0,1),this._options.blurVerticalSize,1,null,h.Texture.BILINEAR_SAMPLINGMODE,this._scene.getEngine()),this._verticalBlurPostprocess.onApplyObservable.add((function(e){e.setFloat2(\"screenSize\",i,r)})),this._postProcesses=[this._downSamplePostprocess,this._horizontalBlurPostprocess,this._verticalBlurPostprocess]):(this._horizontalBlurPostprocess=new h.BlurPostProcess(\"HighlightLayerHBP\",new h.Vector2(1,0),this._options.blurHorizontalSize/2,{width:i,height:r},null,h.Texture.BILINEAR_SAMPLINGMODE,this._scene.getEngine(),!1,e),this._horizontalBlurPostprocess.width=i,this._horizontalBlurPostprocess.height=r,this._horizontalBlurPostprocess.onApplyObservable.add((function(e){e.setTexture(\"textureSampler\",t._mainTexture)})),this._verticalBlurPostprocess=new h.BlurPostProcess(\"HighlightLayerVBP\",new h.Vector2(0,1),this._options.blurVerticalSize/2,{width:i,height:r},null,h.Texture.BILINEAR_SAMPLINGMODE,this._scene.getEngine(),!1,e),this._postProcesses=[this._horizontalBlurPostprocess,this._verticalBlurPostprocess]),this._mainTexture.onAfterUnbindObservable.add((function(){t.onBeforeBlurObservable.notifyObservers(t);var e=t._blurTexture.getInternalTexture();e&&t._scene.postProcessManager.directRender(t._postProcesses,e,!0),t.onAfterBlurObservable.notifyObservers(t)})),this._postProcesses.map((function(e){e.autoClear=!1}))},a.prototype.needStencil=function(){return!0},a.prototype.isReady=function(e,t){var i=e.getMaterial(),r=e.getRenderingMesh();if(!i||!r||!this._meshes)return!1;var n=null,o=this._meshes[r.uniqueId];return o&&o.glowEmissiveOnly&&i&&(n=i.emissiveTexture),s.prototype._isReady.call(this,e,t,n)},a.prototype._internalRender=function(e){e.setTexture(\"textureSampler\",this._blurTexture);var t=this._engine,i=t.getStencilBuffer(),r=t.getStencilFunction(),n=t.getStencilMask(),o=t.getStencilOperationPass(),s=t.getStencilOperationFail(),a=t.getStencilOperationDepthFail(),l=t.getStencilFunctionReference();t.setStencilOperationPass(h.Engine.REPLACE),t.setStencilOperationFail(h.Engine.KEEP),t.setStencilOperationDepthFail(h.Engine.KEEP),t.setStencilMask(0),t.setStencilBuffer(!0),t.setStencilFunctionReference(this._instanceGlowingMeshStencilReference),this.outerGlow&&(e.setFloat(\"offset\",0),t.setStencilFunction(h.Engine.NOTEQUAL),t.drawElementsType(h.Material.TriangleFillMode,0,6)),this.innerGlow&&(e.setFloat(\"offset\",1),t.setStencilFunction(h.Engine.EQUAL),t.drawElementsType(h.Material.TriangleFillMode,0,6)),t.setStencilFunction(r),t.setStencilMask(n),t.setStencilBuffer(i),t.setStencilOperationPass(o),t.setStencilOperationFail(s),t.setStencilOperationDepthFail(a),t.setStencilFunctionReference(l)},a.prototype.shouldRender=function(){return!!s.prototype.shouldRender.call(this)&&!!this._meshes},a.prototype._shouldRenderMesh=function(e){return(!this._excludedMeshes||!this._excludedMeshes[e.uniqueId])&&!!s.prototype.hasMesh.call(this,e)},a.prototype._setEmissiveTextureAndColor=function(e,t,i){var r=this._meshes[e.uniqueId];r?this._emissiveTextureAndColor.color.set(r.color.r,r.color.g,r.color.b,1):this._emissiveTextureAndColor.color.set(this.neutralColor.r,this.neutralColor.g,this.neutralColor.b,this.neutralColor.a),r&&r.glowEmissiveOnly&&i?(this._emissiveTextureAndColor.texture=i.emissiveTexture,this._emissiveTextureAndColor.color.set(1,1,1,1)):this._emissiveTextureAndColor.texture=null},a.prototype.addExcludedMesh=function(e){this._excludedMeshes&&(this._excludedMeshes[e.uniqueId]||(this._excludedMeshes[e.uniqueId]={mesh:e,beforeRender:e.onBeforeRenderObservable.add((function(e){e.getEngine().setStencilBuffer(!1)})),afterRender:e.onAfterRenderObservable.add((function(e){e.getEngine().setStencilBuffer(!0)}))}))},a.prototype.removeExcludedMesh=function(e){if(this._excludedMeshes){var t=this._excludedMeshes[e.uniqueId];t&&(t.beforeRender&&e.onBeforeRenderObservable.remove(t.beforeRender),t.afterRender&&e.onAfterRenderObservable.remove(t.afterRender)),this._excludedMeshes[e.uniqueId]=null}},a.prototype.hasMesh=function(e){return!!this._meshes&&(!!s.prototype.hasMesh.call(this,e)&&(void 0!==this._meshes[e.uniqueId]&&null!==this._meshes[e.uniqueId]))},a.prototype.addMesh=function(e,t,i){var r=this;if(void 0===i&&(i=!1),this._meshes){var n=this._meshes[e.uniqueId];n?n.color=t:(this._meshes[e.uniqueId]={mesh:e,color:t,observerHighlight:e.onBeforeRenderObservable.add((function(e){r._excludedMeshes&&r._excludedMeshes[e.uniqueId]?r._defaultStencilReference(e):e.getScene().getEngine().setStencilFunctionReference(r._instanceGlowingMeshStencilReference)})),observerDefault:e.onAfterRenderObservable.add(this._defaultStencilReference),glowEmissiveOnly:i},e.onDisposeObservable.add((function(){r._disposeMesh(e)}))),this._shouldRender=!0}},a.prototype.removeMesh=function(e){if(this._meshes){var t=this._meshes[e.uniqueId];for(var i in t&&(t.observerHighlight&&e.onBeforeRenderObservable.remove(t.observerHighlight),t.observerDefault&&e.onAfterRenderObservable.remove(t.observerDefault),delete this._meshes[e.uniqueId]),this._shouldRender=!1,this._meshes)if(this._meshes[i]){this._shouldRender=!0;break}}},a.prototype._defaultStencilReference=function(e){e.getScene().getEngine().setStencilFunctionReference(a.NormalMeshStencilReference)},a.prototype._disposeMesh=function(e){this.removeMesh(e),this.removeExcludedMesh(e)},a.prototype.dispose=function(){if(this._meshes){for(var e in this._meshes){(t=this._meshes[e])&&t.mesh&&(t.observerHighlight&&t.mesh.onBeforeRenderObservable.remove(t.observerHighlight),t.observerDefault&&t.mesh.onAfterRenderObservable.remove(t.observerDefault))}this._meshes=null}if(this._excludedMeshes){for(var e in this._excludedMeshes){var t;(t=this._excludedMeshes[e])&&(t.beforeRender&&t.mesh.onBeforeRenderObservable.remove(t.beforeRender),t.afterRender&&t.mesh.onAfterRenderObservable.remove(t.afterRender))}this._excludedMeshes=null}s.prototype.dispose.call(this)},a.prototype.getClassName=function(){return\"HighlightLayer\"},a.prototype.serialize=function(){var e=h.SerializationHelper.Serialize(this);if(e.customType=\"BABYLON.HighlightLayer\",e.meshes=[],this._meshes)for(var t in this._meshes){var i=this._meshes[t];i&&e.meshes.push({glowEmissiveOnly:i.glowEmissiveOnly,color:i.color.asArray(),meshId:i.mesh.id})}if(e.excludedMeshes=[],this._excludedMeshes)for(var r in this._excludedMeshes){var n=this._excludedMeshes[r];n&&e.excludedMeshes.push(n.mesh.id)}return e},a.Parse=function(e,t,i){var r,n=h.SerializationHelper.Parse((function(){return new a(e.name,t,e.options)}),e,t,i);for(r=0;r<e.excludedMeshes.length;r++){(o=t.getMeshByID(e.excludedMeshes[r]))&&n.addExcludedMesh(o)}for(r=0;r<e.meshes.length;r++){var o,s=e.meshes[r];(o=t.getMeshByID(s.meshId))&&n.addMesh(o,h.Color3.FromArray(s.color),s.glowEmissiveOnly)}return n},a.EffectName=\"HighlightLayer\",a.NeutralColor=new h.Color4(0,0,0,0),a.GlowingMeshStencilReference=2,a.NormalMeshStencilReference=1,b([h.serialize()],a.prototype,\"innerGlow\",void 0),b([h.serialize()],a.prototype,\"outerGlow\",void 0),b([h.serialize()],a.prototype,\"blurHorizontalSize\",null),b([h.serialize()],a.prototype,\"blurVerticalSize\",null),b([h.serialize(\"options\")],a.prototype,\"_options\",void 0),a})(h.EffectLayer);h.HighlightLayer=i})($a||($a={})),(function(a){a.AbstractScene.prototype.getGlowLayerByName=function(e){for(var t=0;t<this.effectLayers.length;t++)if(this.effectLayers[t].name===e&&this.effectLayers[t].getEffectName()===i.EffectName)return this.effectLayers[t];return null};var i=(function(o){function s(e,t,i){var r=o.call(this,e,t)||this;return r._intensity=1,r._includedOnlyMeshes=[],r._excludedMeshes=[],r.neutralColor=new a.Color4(0,0,0,1),r._options=ae({mainTextureRatio:s.DefaultTextureRatio,blurKernelSize:32,mainTextureFixedSize:void 0,camera:null,mainTextureSamples:1,renderingGroupId:-1},i),r._init({alphaBlendingMode:a.Engine.ALPHA_ADD,camera:r._options.camera,mainTextureFixedSize:r._options.mainTextureFixedSize,mainTextureRatio:r._options.mainTextureRatio,renderingGroupId:r._options.renderingGroupId}),r}return T(s,o),Object.defineProperty(s.prototype,\"blurKernelSize\",{get:function(){return this._horizontalBlurPostprocess1.kernel},set:function(e){this._horizontalBlurPostprocess1.kernel=e,this._verticalBlurPostprocess1.kernel=e,this._horizontalBlurPostprocess2.kernel=e,this._verticalBlurPostprocess2.kernel=e},enumerable:!0,configurable:!0}),Object.defineProperty(s.prototype,\"intensity\",{get:function(){return this._intensity},set:function(e){this._intensity=e},enumerable:!0,configurable:!0}),s.prototype.getEffectName=function(){return s.EffectName},s.prototype._createMergeEffect=function(){return this._engine.createEffect(\"glowMapMerge\",[a.VertexBuffer.PositionKind],[\"offset\"],[\"textureSampler\",\"textureSampler2\"],\"#define EMISSIVE \\n\")},s.prototype._createTextureAndPostProcesses=function(){var t=this,e=this._mainTextureDesiredSize.width,i=this._mainTextureDesiredSize.height;e=this._engine.needPOTTextures?a.Tools.GetExponentOfTwo(e,this._maxSize):e,i=this._engine.needPOTTextures?a.Tools.GetExponentOfTwo(i,this._maxSize):i;var r=0;r=this._engine.getCaps().textureHalfFloatRender?a.Engine.TEXTURETYPE_HALF_FLOAT:a.Engine.TEXTURETYPE_UNSIGNED_INT,this._blurTexture1=new a.RenderTargetTexture(\"GlowLayerBlurRTT\",{width:e,height:i},this._scene,!1,!0,r),this._blurTexture1.wrapU=a.Texture.CLAMP_ADDRESSMODE,this._blurTexture1.wrapV=a.Texture.CLAMP_ADDRESSMODE,this._blurTexture1.updateSamplingMode(a.Texture.BILINEAR_SAMPLINGMODE),this._blurTexture1.renderParticles=!1,this._blurTexture1.ignoreCameraViewport=!0;var n=Math.floor(e/2),o=Math.floor(i/2);this._blurTexture2=new a.RenderTargetTexture(\"GlowLayerBlurRTT2\",{width:n,height:o},this._scene,!1,!0,r),this._blurTexture2.wrapU=a.Texture.CLAMP_ADDRESSMODE,this._blurTexture2.wrapV=a.Texture.CLAMP_ADDRESSMODE,this._blurTexture2.updateSamplingMode(a.Texture.BILINEAR_SAMPLINGMODE),this._blurTexture2.renderParticles=!1,this._blurTexture2.ignoreCameraViewport=!0,this._textures=[this._blurTexture1,this._blurTexture2],this._horizontalBlurPostprocess1=new a.BlurPostProcess(\"GlowLayerHBP1\",new a.Vector2(1,0),this._options.blurKernelSize/2,{width:e,height:i},null,a.Texture.BILINEAR_SAMPLINGMODE,this._scene.getEngine(),!1,r),this._horizontalBlurPostprocess1.width=e,this._horizontalBlurPostprocess1.height=i,this._horizontalBlurPostprocess1.onApplyObservable.add((function(e){e.setTexture(\"textureSampler\",t._mainTexture)})),this._verticalBlurPostprocess1=new a.BlurPostProcess(\"GlowLayerVBP1\",new a.Vector2(0,1),this._options.blurKernelSize/2,{width:e,height:i},null,a.Texture.BILINEAR_SAMPLINGMODE,this._scene.getEngine(),!1,r),this._horizontalBlurPostprocess2=new a.BlurPostProcess(\"GlowLayerHBP2\",new a.Vector2(1,0),this._options.blurKernelSize/2,{width:n,height:o},null,a.Texture.BILINEAR_SAMPLINGMODE,this._scene.getEngine(),!1,r),this._horizontalBlurPostprocess2.width=n,this._horizontalBlurPostprocess2.height=o,this._horizontalBlurPostprocess2.onApplyObservable.add((function(e){e.setTexture(\"textureSampler\",t._blurTexture1)})),this._verticalBlurPostprocess2=new a.BlurPostProcess(\"GlowLayerVBP2\",new a.Vector2(0,1),this._options.blurKernelSize/2,{width:n,height:o},null,a.Texture.BILINEAR_SAMPLINGMODE,this._scene.getEngine(),!1,r),this._postProcesses=[this._horizontalBlurPostprocess1,this._verticalBlurPostprocess1,this._horizontalBlurPostprocess2,this._verticalBlurPostprocess2],this._postProcesses1=[this._horizontalBlurPostprocess1,this._verticalBlurPostprocess1],this._postProcesses2=[this._horizontalBlurPostprocess2,this._verticalBlurPostprocess2],this._mainTexture.samples=this._options.mainTextureSamples,this._mainTexture.onAfterUnbindObservable.add((function(){var e=t._blurTexture1.getInternalTexture();e&&(t._scene.postProcessManager.directRender(t._postProcesses1,e,!0),(e=t._blurTexture2.getInternalTexture())&&t._scene.postProcessManager.directRender(t._postProcesses2,e,!0))})),this._postProcesses.map((function(e){e.autoClear=!1}))},s.prototype.isReady=function(e,t){var i=e.getMaterial(),r=e.getRenderingMesh();if(!i||!r)return!1;var n=i.emissiveTexture;return o.prototype._isReady.call(this,e,t,n)},s.prototype.needStencil=function(){return!1},s.prototype._internalRender=function(e){e.setTexture(\"textureSampler\",this._blurTexture1),e.setTexture(\"textureSampler2\",this._blurTexture2),e.setFloat(\"offset\",this._intensity);var t=this._engine,i=t.getStencilBuffer();t.setStencilBuffer(!1),t.drawElementsType(a.Material.TriangleFillMode,0,6),t.setStencilBuffer(i)},s.prototype._setEmissiveTextureAndColor=function(e,t,i){var r=1;this.customEmissiveTextureSelector?this._emissiveTextureAndColor.texture=this.customEmissiveTextureSelector(e,t,i):i?(this._emissiveTextureAndColor.texture=i.emissiveTexture,this._emissiveTextureAndColor.texture&&(r=this._emissiveTextureAndColor.texture.level)):this._emissiveTextureAndColor.texture=null,this.customEmissiveColorSelector?this.customEmissiveColorSelector(e,t,i,this._emissiveTextureAndColor.color):i.emissiveColor?this._emissiveTextureAndColor.color.set(i.emissiveColor.r*r,i.emissiveColor.g*r,i.emissiveColor.b*r,1):this._emissiveTextureAndColor.color.set(this.neutralColor.r,this.neutralColor.g,this.neutralColor.b,this.neutralColor.a)},s.prototype._shouldRenderMesh=function(e){return this.hasMesh(e)},s.prototype.addExcludedMesh=function(e){-1===this._excludedMeshes.indexOf(e.uniqueId)&&this._excludedMeshes.push(e.uniqueId)},s.prototype.removeExcludedMesh=function(e){var t=this._excludedMeshes.indexOf(e.uniqueId);-1!==t&&this._excludedMeshes.splice(t,1)},s.prototype.addIncludedOnlyMesh=function(e){-1===this._includedOnlyMeshes.indexOf(e.uniqueId)&&this._includedOnlyMeshes.push(e.uniqueId)},s.prototype.removeIncludedOnlyMesh=function(e){var t=this._includedOnlyMeshes.indexOf(e.uniqueId);-1!==t&&this._includedOnlyMeshes.splice(t,1)},s.prototype.hasMesh=function(e){return!!o.prototype.hasMesh.call(this,e)&&(this._includedOnlyMeshes.length?-1!==this._includedOnlyMeshes.indexOf(e.uniqueId):!this._excludedMeshes.length||-1===this._excludedMeshes.indexOf(e.uniqueId))},s.prototype._disposeMesh=function(e){this.removeIncludedOnlyMesh(e),this.removeExcludedMesh(e)},s.prototype.getClassName=function(){return\"GlowLayer\"},s.prototype.serialize=function(){var e,t=a.SerializationHelper.Serialize(this);if(t.customType=\"BABYLON.GlowLayer\",t.includedMeshes=[],this._includedOnlyMeshes.length)for(e=0;e<this._includedOnlyMeshes.length;e++){(i=this._scene.getMeshByUniqueID(this._includedOnlyMeshes[e]))&&t.includedMeshes.push(i.id)}if(t.excludedMeshes=[],this._excludedMeshes.length)for(e=0;e<this._excludedMeshes.length;e++){var i;(i=this._scene.getMeshByUniqueID(this._excludedMeshes[e]))&&t.excludedMeshes.push(i.id)}return t},s.Parse=function(e,t,i){var r,n=a.SerializationHelper.Parse((function(){return new s(e.name,t,e.options)}),e,t,i);for(r=0;r<e.excludedMeshes.length;r++){(o=t.getMeshByID(e.excludedMeshes[r]))&&n.addExcludedMesh(o)}for(r=0;r<e.includedMeshes.length;r++){var o;(o=t.getMeshByID(e.includedMeshes[r]))&&n.addIncludedOnlyMesh(o)}return n},s.EffectName=\"GlowLayer\",s.DefaultBlurKernelSize=32,s.DefaultTextureRatio=.5,b([a.serialize()],s.prototype,\"blurKernelSize\",null),b([a.serialize()],s.prototype,\"intensity\",null),b([a.serialize(\"options\")],s.prototype,\"_options\",void 0),s})(a.EffectLayer);a.GlowLayer=i})($a||($a={})),(function(a){var o,e;(e=o=a.AssetTaskState||(a.AssetTaskState={}))[e.INIT=0]=\"INIT\",e[e.RUNNING=1]=\"RUNNING\",e[e.DONE=2]=\"DONE\",e[e.ERROR=3]=\"ERROR\";var t=(function(){function e(e){this.name=e,this._isCompleted=!1,this._taskState=o.INIT}return Object.defineProperty(e.prototype,\"isCompleted\",{get:function(){return this._isCompleted},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,\"taskState\",{get:function(){return this._taskState},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,\"errorObject\",{get:function(){return this._errorObject},enumerable:!0,configurable:!0}),e.prototype._setErrorObject=function(e,t){this._errorObject||(this._errorObject={message:e,exception:t})},e.prototype.run=function(e,t,i){var r=this;this._taskState=o.RUNNING,this.runTask(e,(function(){r.onDoneCallback(t,i)}),(function(e,t){r.onErrorCallback(i,e,t)}))},e.prototype.runTask=function(e,t,i){throw new Error(\"runTask is not implemented\")},e.prototype.reset=function(){this._taskState=o.INIT},e.prototype.onErrorCallback=function(e,t,i){this._taskState=o.ERROR,this._errorObject={message:t,exception:i},this.onError&&this.onError(this,t,i),e()},e.prototype.onDoneCallback=function(e,t){try{this._taskState=o.DONE,this._isCompleted=!0,this.onSuccess&&this.onSuccess(this),e()}catch(e){this.onErrorCallback(t,\"Task is done, error executing success callback(s)\",e)}},e})();a.AbstractAssetTask=t;var s=function(e,t,i){this.remainingCount=e,this.totalCount=t,this.task=i};a.AssetsProgressEvent=s;var l=(function(o){function e(e,t,i,r){var n=o.call(this,e)||this;return n.name=e,n.meshesNames=t,n.rootUrl=i,n.sceneFilename=r,n}return T(e,o),e.prototype.runTask=function(e,r,n){var o=this;a.SceneLoader.ImportMesh(this.meshesNames,this.rootUrl,this.sceneFilename,e,(function(e,t,i){o.loadedMeshes=e,o.loadedParticleSystems=t,o.loadedSkeletons=i,r()}),null,(function(e,t,i){n(t,i)}))},e})(t);a.MeshAssetTask=l;var r=(function(r){function e(e,t){var i=r.call(this,e)||this;return i.name=e,i.url=t,i}return T(e,r),e.prototype.runTask=function(e,t,i){var r=this;e._loadFile(this.url,(function(e){r.text=e,t()}),void 0,!1,!1,(function(e,t){e&&i(e.status+\" \"+e.statusText,t)}))},e})(t);a.TextFileAssetTask=r;var n=(function(r){function e(e,t){var i=r.call(this,e)||this;return i.name=e,i.url=t,i}return T(e,r),e.prototype.runTask=function(e,t,i){var r=this;e._loadFile(this.url,(function(e){r.data=e,t()}),void 0,!0,!0,(function(e,t){e&&i(e.status+\" \"+e.statusText,t)}))},e})(t);a.BinaryFileAssetTask=n;var c=(function(r){function e(e,t){var i=r.call(this,e)||this;return i.name=e,i.url=t,i}return T(e,r),e.prototype.runTask=function(e,t,i){var r=this,n=new Image;a.Tools.SetCorsBehavior(this.url,n),n.onload=function(){r.image=n,t()},n.onerror=function(e){i(\"Error loading image\",e)},n.src=this.url},e})(t);a.ImageAssetTask=c;var h=(function(s){function e(e,t,i,r,n){void 0===n&&(n=a.Texture.TRILINEAR_SAMPLINGMODE);var o=s.call(this,e)||this;return o.name=e,o.url=t,o.noMipmap=i,o.invertY=r,o.samplingMode=n,o}return T(e,s),e.prototype.runTask=function(e,t,i){this.texture=new a.Texture(this.url,e,this.noMipmap,this.invertY,this.samplingMode,function(){t()},function(e,t){i(e,t)})},e})(t);a.TextureAssetTask=h;var u=(function(s){function e(e,t,i,r,n){var o=s.call(this,e)||this;return o.name=e,o.url=t,o.extensions=i,o.noMipmap=r,o.files=n,o}return T(e,s),e.prototype.runTask=function(e,t,i){this.texture=new a.CubeTexture(this.url,e,this.extensions,this.noMipmap,this.files,function(){t()},function(e,t){i(e,t)})},e})(t);a.CubeTextureAssetTask=u;var d=(function(l){function e(e,t,i,r,n,o,s){void 0===r&&(r=!1),void 0===n&&(n=!0),void 0===o&&(o=!1),void 0===s&&(s=!1);var a=l.call(this,e)||this;return a.name=e,a.url=t,a.size=i,a.noMipmap=r,a.generateHarmonics=n,a.gammaSpace=o,a.reserved=s,a}return T(e,l),e.prototype.run=function(e,t,i){this.texture=new a.HDRCubeTexture(this.url,e,this.size,this.noMipmap,this.generateHarmonics,this.gammaSpace,this.reserved,function(){t()},function(e,t){i(e,t)})},e})(t);a.HDRCubeTextureAssetTask=d;var i=(function(){function e(e){this._isLoading=!1,this._tasks=new Array,this._waitingTasksCount=0,this._totalTasksCount=0,this.onTaskSuccessObservable=new a.Observable,this.onTaskErrorObservable=new a.Observable,this.onTasksDoneObservable=new a.Observable,this.onProgressObservable=new a.Observable,this.useDefaultLoadingScreen=!0,this._scene=e}return e.prototype.addMeshTask=function(e,t,i,r){var n=new l(e,t,i,r);return this._tasks.push(n),n},e.prototype.addTextFileTask=function(e,t){var i=new r(e,t);return this._tasks.push(i),i},e.prototype.addBinaryFileTask=function(e,t){var i=new n(e,t);return this._tasks.push(i),i},e.prototype.addImageTask=function(e,t){var i=new c(e,t);return this._tasks.push(i),i},e.prototype.addTextureTask=function(e,t,i,r,n){void 0===n&&(n=a.Texture.TRILINEAR_SAMPLINGMODE);var o=new h(e,t,i,r,n);return this._tasks.push(o),o},e.prototype.addCubeTextureTask=function(e,t,i,r,n){var o=new u(e,t,i,r,n);return this._tasks.push(o),o},e.prototype.addHDRCubeTextureTask=function(e,t,i,r,n,o,s){void 0===r&&(r=!1),void 0===n&&(n=!0),void 0===o&&(o=!1),void 0===s&&(s=!1);var a=new d(e,t,i,r,n,o,s);return this._tasks.push(a),a},e.prototype.removeTask=function(e){var t=this._tasks.indexOf(e);-1<t&&this._tasks.splice(t,1)},e.prototype._decreaseWaitingTasksCount=function(e){this._waitingTasksCount--;try{this.onProgress&&this.onProgress(this._waitingTasksCount,this._totalTasksCount,e),this.onProgressObservable.notifyObservers(new s(this._waitingTasksCount,this._totalTasksCount,e))}catch(e){a.Tools.Error(\"Error running progress callbacks.\"),console.log(e)}if(0===this._waitingTasksCount){try{this.onFinish&&this.onFinish(this._tasks);for(var t=this._tasks.slice(),i=0,r=t;i<r.length;i++){if((e=r[i]).taskState===o.DONE){var n=this._tasks.indexOf(e);-1<n&&this._tasks.splice(n,1)}}this.onTasksDoneObservable.notifyObservers(this._tasks)}catch(e){a.Tools.Error(\"Error running tasks-done callbacks.\"),console.log(e)}this._isLoading=!1,this._scene.getEngine().hideLoadingUI()}},e.prototype._runTask=function(i){var r=this,t=function(e,t){i._setErrorObject(e,t),r.onTaskError&&r.onTaskError(i),r.onTaskErrorObservable.notifyObservers(i),r._decreaseWaitingTasksCount(i)};i.run(this._scene,(function(){try{r.onTaskSuccess&&r.onTaskSuccess(i),r.onTaskSuccessObservable.notifyObservers(i),r._decreaseWaitingTasksCount(i)}catch(e){t(\"Error executing task success callbacks\",e)}}),t)},e.prototype.reset=function(){return this._isLoading=!1,this._tasks=new Array,this},e.prototype.load=function(){if(this._isLoading)return this;if(this._isLoading=!0,this._waitingTasksCount=this._tasks.length,this._totalTasksCount=this._tasks.length,0===this._waitingTasksCount)return this._isLoading=!1,this.onFinish&&this.onFinish(this._tasks),this.onTasksDoneObservable.notifyObservers(this._tasks),this;this.useDefaultLoadingScreen&&this._scene.getEngine().displayLoadingUI();for(var e=0;e<this._tasks.length;e++){var t=this._tasks[e];t.taskState===o.INIT&&this._runTask(t)}return this},e})();a.AssetsManager=i})($a||($a={})),ha=$a||($a={}),ua=[],da=function(e,t){if(!ua[e.id]&&!e.doNotSerialize){if(e instanceof ha.BoxGeometry)t.boxes.push(e.serialize());else if(e instanceof ha.SphereGeometry)t.spheres.push(e.serialize());else if(e instanceof ha.CylinderGeometry)t.cylinders.push(e.serialize());else if(e instanceof ha.TorusGeometry)t.toruses.push(e.serialize());else if(e instanceof ha.GroundGeometry)t.grounds.push(e.serialize());else if(e instanceof ha.Plane)t.planes.push(e.serialize());else if(e instanceof ha.TorusKnotGeometry)t.torusKnots.push(e.serialize());else{if(e instanceof ha._PrimitiveGeometry)throw new Error(\"Unknown primitive type\");t.vertexData.push(e.serializeVerticeData())}ua[e.id]=!0}},fa=function(e,t){var i={},r=e._geometry;return r&&(e.getScene().getGeometryByID(r.id)||da(r,t.geometries)),e.serialize&&e.serialize(i),i},pa=(function(){function v(){}return v.ClearCache=function(){ua=[]},v.Serialize=function(e){var t,i,r,n={};if(v.ClearCache(),n.useDelayedTextureLoading=e.useDelayedTextureLoading,n.autoClear=e.autoClear,n.clearColor=e.clearColor.asArray(),n.ambientColor=e.ambientColor.asArray(),n.gravity=e.gravity.asArray(),n.collisionsEnabled=e.collisionsEnabled,n.workerCollisions=e.workerCollisions,e.fogMode&&0!==e.fogMode&&(n.fogMode=e.fogMode,n.fogColor=e.fogColor.asArray(),n.fogStart=e.fogStart,n.fogEnd=e.fogEnd,n.fogDensity=e.fogDensity),e.isPhysicsEnabled()){var o=e.getPhysicsEngine();o&&(n.physicsEnabled=!0,n.physicsGravity=o.gravity.asArray(),n.physicsEngine=o.getPhysicsPluginName())}e.metadata&&(n.metadata=e.metadata),n.morphTargetManagers=[];for(var s=0,a=e.meshes;s<a.length;s++){var l=(p=a[s]).morphTargetManager;l&&n.morphTargetManagers.push(l.serialize())}for(n.lights=[],t=0;t<e.lights.length;t++)(i=e.lights[t]).doNotSerialize||n.lights.push(i.serialize());for(n.cameras=[],t=0;t<e.cameras.length;t++){var c=e.cameras[t];c.doNotSerialize||n.cameras.push(c.serialize())}for(e.activeCamera&&(n.activeCameraID=e.activeCamera.id),ha.Animation.AppendSerializedAnimations(e,n),n.materials=[],n.multiMaterials=[],t=0;t<e.materials.length;t++)(r=e.materials[t]).doNotSerialize||n.materials.push(r.serialize());for(n.multiMaterials=[],t=0;t<e.multiMaterials.length;t++){var h=e.multiMaterials[t];n.multiMaterials.push(h.serialize())}for(e.environmentTexture&&(n.environmentTexture=e.environmentTexture.name),n.skeletons=[],t=0;t<e.skeletons.length;t++){var u=e.skeletons[t];u.doNotSerialize||n.skeletons.push(u.serialize())}for(n.transformNodes=[],t=0;t<e.transformNodes.length;t++)n.transformNodes.push(e.transformNodes[t].serialize());n.geometries={},n.geometries.boxes=[],n.geometries.spheres=[],n.geometries.cylinders=[],n.geometries.toruses=[],n.geometries.grounds=[],n.geometries.planes=[],n.geometries.torusKnots=[],n.geometries.vertexData=[],ua=[];var d=e.getGeometries();for(t=0;t<d.length;t++){var f=d[t];f.isReady()&&da(f,n.geometries)}for(n.meshes=[],t=0;t<e.meshes.length;t++){var p;if((p=e.meshes[t])instanceof ha.Mesh){var _=p;_.doNotSerialize||_.delayLoadState!==ha.Engine.DELAYLOADSTATE_LOADED&&_.delayLoadState!==ha.Engine.DELAYLOADSTATE_NONE||n.meshes.push(fa(_,n))}}for(n.particleSystems=[],t=0;t<e.particleSystems.length;t++)n.particleSystems.push(e.particleSystems[t].serialize());e.actionManager&&(n.actions=e.actionManager.serialize(\"scene\"));for(var m=0,g=e._serializableComponents;m<g.length;m++){g[m].serialize(n)}return n},v.SerializeMesh=function(t,e,i){void 0===e&&(e=!1),void 0===i&&(i=!1);var r={};if(v.ClearCache(),t=t instanceof Array?t:[t],e||i)for(var n=0;n<t.length;++n)i&&t[n].getDescendants().forEach((function(e){e instanceof ha.Mesh&&t.indexOf(e)<0&&t.push(e)})),e&&t[n].parent&&t.indexOf(t[n].parent)<0&&t.push(t[n].parent);return t.forEach((function(e){!(function(t,e){if(t.delayLoadState===ha.Engine.DELAYLOADSTATE_LOADED||t.delayLoadState===ha.Engine.DELAYLOADSTATE_NONE){if(t.material)if(t.material instanceof ha.MultiMaterial){if(e.multiMaterials=e.multiMaterials||[],e.materials=e.materials||[],!e.multiMaterials.some((function(e){return e.id===t.material.id}))){e.multiMaterials.push(t.material.serialize());for(var i=function(t){t&&(e.materials.some((function(e){return e.id===t.id}))||e.materials.push(t.serialize()))},r=0,n=t.material.subMaterials;r<n.length;r++)i(n[r])}}else e.materials=e.materials||[],e.materials.some((function(e){return e.id===t.material.id}))||e.materials.push(t.material.serialize());var o=t._geometry;o&&(e.geometries||(e.geometries={},e.geometries.boxes=[],e.geometries.spheres=[],e.geometries.cylinders=[],e.geometries.toruses=[],e.geometries.grounds=[],e.geometries.planes=[],e.geometries.torusKnots=[],e.geometries.vertexData=[]),da(o,e.geometries)),t.skeleton&&(e.skeletons=e.skeletons||[],e.skeletons.push(t.skeleton.serialize())),e.meshes=e.meshes||[],e.meshes.push(fa(t,e))}})(e,r)})),r},v})(),ha.SceneSerializer=pa,_a=$a||($a={}),ma=(function(){function e(e,t,i,r,n){void 0===r&&(r=!0),void 0===n&&(n=!1);var o=this;this.name=e,this._viewMatrix=_a.Matrix.Identity(),this._target=_a.Vector3.Zero(),this._add=_a.Vector3.Zero(),this._invertYAxis=!1,this.position=_a.Vector3.Zero(),this._scene=i,this._scene.reflectionProbes||(this._scene.reflectionProbes=new Array),this._scene.reflectionProbes.push(this),this._renderTargetTexture=new _a.RenderTargetTexture(e,t,i,r,!0,n?_a.Engine.TEXTURETYPE_FLOAT:_a.Engine.TEXTURETYPE_UNSIGNED_INT,!0),this._renderTargetTexture.onBeforeRenderObservable.add((function(e){switch(e){case 0:o._add.copyFromFloats(1,0,0);break;case 1:o._add.copyFromFloats(-1,0,0);break;case 2:o._add.copyFromFloats(0,o._invertYAxis?1:-1,0);break;case 3:o._add.copyFromFloats(0,o._invertYAxis?-1:1,0);break;case 4:o._add.copyFromFloats(0,0,1);break;case 5:o._add.copyFromFloats(0,0,-1)}o._attachedMesh&&o.position.copyFrom(o._attachedMesh.getAbsolutePosition()),o.position.addToRef(o._add,o._target),_a.Matrix.LookAtLHToRef(o.position,o._target,_a.Vector3.Up(),o._viewMatrix),i.setTransformMatrix(o._viewMatrix,o._projectionMatrix),i._forcedViewPosition=o.position})),this._renderTargetTexture.onAfterUnbindObservable.add((function(){i._forcedViewPosition=null,i.updateTransformMatrix(!0)})),i.activeCamera&&(this._projectionMatrix=_a.Matrix.PerspectiveFovLH(Math.PI/2,1,i.activeCamera.minZ,i.activeCamera.maxZ))}return Object.defineProperty(e.prototype,\"samples\",{get:function(){return this._renderTargetTexture.samples},set:function(e){this._renderTargetTexture.samples=e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,\"refreshRate\",{get:function(){return this._renderTargetTexture.refreshRate},set:function(e){this._renderTargetTexture.refreshRate=e},enumerable:!0,configurable:!0}),e.prototype.getScene=function(){return this._scene},Object.defineProperty(e.prototype,\"cubeTexture\",{get:function(){return this._renderTargetTexture},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,\"renderList\",{get:function(){return this._renderTargetTexture.renderList},enumerable:!0,configurable:!0}),e.prototype.attachToMesh=function(e){this._attachedMesh=e},e.prototype.setRenderingAutoClearDepthStencil=function(e,t){this._renderTargetTexture.setRenderingAutoClearDepthStencil(e,t)},e.prototype.dispose=function(){var e=this._scene.reflectionProbes.indexOf(this);-1!==e&&this._scene.reflectionProbes.splice(e,1),this._renderTargetTexture&&(this._renderTargetTexture.dispose(),this._renderTargetTexture=null)},e})(),_a.ReflectionProbe=ma,ga=$a||($a={}),va=(function(){function e(e){this.name=ga.SceneComponentConstants.NAME_LAYER,this.scene=e,this._engine=e.getEngine(),e.layers=new Array}return e.prototype.register=function(){this.scene._beforeCameraDrawStage.registerStep(ga.SceneComponentConstants.STEP_BEFORECAMERADRAW_LAYER,this,this._drawBackground),this.scene._afterCameraDrawStage.registerStep(ga.SceneComponentConstants.STEP_AFTERCAMERADRAW_LAYER,this,this._drawForeground)},e.prototype.rebuild=function(){for(var e=0,t=this.scene.layers;e<t.length;e++){t[e]._rebuild()}},e.prototype.dispose=function(){for(var e=this.scene.layers;e.length;)e[0].dispose()},e.prototype._draw=function(e,t){var i=this.scene.layers;if(i.length){this._engine.setDepthBuffer(!1);for(var r=e.layerMask,n=0,o=i;n<o.length;n++){var s=o[n];s.isBackground===t&&0!=(s.layerMask&r)&&s.render()}this._engine.setDepthBuffer(!0)}},e.prototype._drawBackground=function(e){this._draw(e,!0)},e.prototype._drawForeground=function(e){this._draw(e,!1)},e})(),ga.LayerSceneComponent=va,ya=$a||($a={}),ba=(function(){function e(e,t,i,r,n){this.name=e,this.scale=new ya.Vector2(1,1),this.offset=new ya.Vector2(0,0),this.alphaBlendingMode=ya.Engine.ALPHA_COMBINE,this.layerMask=268435455,this._vertexBuffers={},this.onDisposeObservable=new ya.Observable,this.onBeforeRenderObservable=new ya.Observable,this.onAfterRenderObservable=new ya.Observable,this.texture=t?new ya.Texture(t,i,!0):null,this.isBackground=void 0===r||r,this.color=void 0===n?new ya.Color4(1,1,1,1):n,this._scene=i||ya.Engine.LastCreatedScene;var o=this._scene._getComponent(ya.SceneComponentConstants.NAME_LAYER);o||(o=new ya.LayerSceneComponent(this._scene),this._scene._addComponent(o)),this._scene.layers.push(this);var s=this._scene.getEngine(),a=[];a.push(1,1),a.push(-1,1),a.push(-1,-1),a.push(1,-1);var l=new ya.VertexBuffer(s,a,ya.VertexBuffer.PositionKind,!1,!1,2);this._vertexBuffers[ya.VertexBuffer.PositionKind]=l,this._createIndexBuffer(),this._effect=s.createEffect(\"layer\",[ya.VertexBuffer.PositionKind],[\"textureMatrix\",\"color\",\"scale\",\"offset\"],[\"textureSampler\"],\"\"),this._alphaTestEffect=s.createEffect(\"layer\",[ya.VertexBuffer.PositionKind],[\"textureMatrix\",\"color\",\"scale\",\"offset\"],[\"textureSampler\"],\"#define ALPHATEST\")}return Object.defineProperty(e.prototype,\"onDispose\",{set:function(e){this._onDisposeObserver&&this.onDisposeObservable.remove(this._onDisposeObserver),this._onDisposeObserver=this.onDisposeObservable.add(e)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,\"onBeforeRender\",{set:function(e){this._onBeforeRenderObserver&&this.onBeforeRenderObservable.remove(this._onBeforeRenderObserver),this._onBeforeRenderObserver=this.onBeforeRenderObservable.add(e)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,\"onAfterRender\",{set:function(e){this._onAfterRenderObserver&&this.onAfterRenderObservable.remove(this._onAfterRenderObserver),this._onAfterRenderObserver=this.onAfterRenderObservable.add(e)},enumerable:!0,configurable:!0}),e.prototype._createIndexBuffer=function(){var e=this._scene.getEngine(),t=[];t.push(0),t.push(1),t.push(2),t.push(0),t.push(2),t.push(3),this._indexBuffer=e.createIndexBuffer(t)},e.prototype._rebuild=function(){var e=this._vertexBuffers[ya.VertexBuffer.PositionKind];e&&e._rebuild(),this._createIndexBuffer()},e.prototype.render=function(){var e=this.alphaTest?this._alphaTestEffect:this._effect;if(e.isReady()&&this.texture&&this.texture.isReady()){var t=this._scene.getEngine();this.onBeforeRenderObservable.notifyObservers(this),t.enableEffect(e),t.setState(!1),e.setTexture(\"textureSampler\",this.texture),e.setMatrix(\"textureMatrix\",this.texture.getTextureMatrix()),e.setFloat4(\"color\",this.color.r,this.color.g,this.color.b,this.color.a),e.setVector2(\"offset\",this.offset),e.setVector2(\"scale\",this.scale),t.bindBuffers(this._vertexBuffers,this._indexBuffer,e),this.alphaTest?t.drawElementsType(ya.Material.TriangleFillMode,0,6):(t.setAlphaMode(this.alphaBlendingMode),t.drawElementsType(ya.Material.TriangleFillMode,0,6),t.setAlphaMode(ya.Engine.ALPHA_DISABLE)),this.onAfterRenderObservable.notifyObservers(this)}},e.prototype.dispose=function(){var e=this._vertexBuffers[ya.VertexBuffer.PositionKind];e&&(e.dispose(),this._vertexBuffers[ya.VertexBuffer.PositionKind]=null),this._indexBuffer&&(this._scene.getEngine()._releaseBuffer(this._indexBuffer),this._indexBuffer=null),this.texture&&(this.texture.dispose(),this.texture=null);var t=this._scene.layers.indexOf(this);this._scene.layers.splice(t,1),this.onDisposeObservable.notifyObservers(this),this.onDisposeObservable.clear(),this.onAfterRenderObservable.clear(),this.onBeforeRenderObservable.clear()},e})(),ya.Layer=ba,Ta=$a||($a={}),Ea=(function(){function e(){}return e.CreateResizedCopy=function(t,e,i,r){void 0===r&&(r=!0);var n=t.getScene(),o=n.getEngine(),s=new Ta.RenderTargetTexture(\"resized\"+t.name,{width:e,height:i},n,!t.noMipmap,!0,t._texture.type,!1,t._samplingMode,!1);s.wrapU=t.wrapU,s.wrapV=t.wrapV,s.uOffset=t.uOffset,s.vOffset=t.vOffset,s.uScale=t.uScale,s.vScale=t.vScale,s.uAng=t.uAng,s.vAng=t.vAng,s.wAng=t.wAng,s.coordinatesIndex=t.coordinatesIndex,s.level=t.level,s.anisotropicFilteringLevel=t.anisotropicFilteringLevel,s._texture.isReady=!1,t.wrapU=Ta.Texture.CLAMP_ADDRESSMODE,t.wrapV=Ta.Texture.CLAMP_ADDRESSMODE;var a=new Ta.PassPostProcess(\"pass\",1,null,r?Ta.Texture.BILINEAR_SAMPLINGMODE:Ta.Texture.NEAREST_SAMPLINGMODE,o,!1,Ta.Engine.TEXTURETYPE_UNSIGNED_INT);return a.getEffect().executeWhenCompiled((function(){a.onApply=function(e){e.setTexture(\"textureSampler\",t)};var e=s.getInternalTexture();e&&(n.postProcessManager.directRender([a],e),o.unBindFramebuffer(e),s.disposeFramebufferObjects(),a.dispose(),e.isReady=!0)})),s},e.GetEnvironmentBRDFTexture=function(e){if(!e._environmentBRDFTexture){var t=Ta.Texture.CreateFromBase64String(this._environmentBRDFBase64Texture,\"EnvironmentBRDFTexture\",e,!0,!1,Ta.Texture.BILINEAR_SAMPLINGMODE);t.wrapU=Ta.Texture.CLAMP_ADDRESSMODE,t.wrapV=Ta.Texture.CLAMP_ADDRESSMODE,e._environmentBRDFTexture=t}return e._environmentBRDFTexture},e._environmentBRDFBase64Texture=\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAQAAAAEACAYAAABccqhmAAAgAElEQVR4Xu19Z7PtTHbW1g3jMMbGmGDAZAMm5xxMLDAU0WSKWOQcCoqccw6eGdtgk4yNbZxnvvAL+Af8Af6AsQl+06ako9X36dXPSi3pnPu+cz/cOntL3S1pq5+w1mrpLs/eud9fvn27rf9evPPwFz+v22S7fGZ/n7/70G79J5/Xv/qzbLP+Pnvvoc/6Tz7jX/15/c62LfeH7fofbpfP3l/ct36Wf+u4+D37+XYb++G26LPsr/zFttnPuh37bm1bt0f7MvtlnOx4uv0H4fty8UUsz77rfn/57u32cgXvDv72eQf0tl0+G38b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ZZpT8L5CgQlAA85a2qtwZ6RflDB5AEfwT4aL+21Fb7LIhn+kfAzfzHIhVgR22j8zmq/BVQZc61SgKV41fH9n6bWXI4q9/y5SoJiAMfBb9Xm7ccwXB8cQVE7QayIW8groI0s5KwOmYEHm9Cm/suUP+MEp/V5oiaV8B6VdsZEphR9Jk+FXLYCMAE0oTtb2OpCZoBq+kAjLFMsgDP4x33TOsfugohMnJuEUEM56lmRaSIV+/PnP8RwGfHrxzjyrZnksPlBPBlRhlwxrpnwW8CnWXJC0RymBCS5b4zwV5Wf+hwBNhH+lqW9rHdwVF1P9r/dQZ6ljiWlQC0SjIbPLRRilYFv0cC7Yc9WOrLAFWf94y9n+ljnZurdie8YnzquMS9PAUJHAVshqCs63oMsFeuzzvPaB8eZ/lS7QCU4jJVNckgUGurH1XuiVJfilSYFTdUtUIgR0nA67/tU7OjouBll2GEKVnQZ4EWXUPFps8es3KM15EEskoPt3T7KP02AojUO0UCk+CnoCWAzII7Au2w3yG8o6COzoUBioKCnKPrFBjJqRlQcQLVY2WJIjNuBaCvIwlUVX0G0NVjdATwMXEAAYBdEnhC8Ecgc/efGPNH5xFNdhOQRdt/ptpHCh3tj675CFE8JTFUjv2UriFz7GUlgOp/DNKRwUHwdxPfUeMjDoCCq5BfOOoEZvpr2x+BLavolXEyAM6obnTMzHEqoMuc09HxKv2rbTPAVYZO/ydUbXfkKP4/BnecprBuissAAAAASUVORK5CYII=\",e})(),Ta.TextureTools=Ea,xa=$a||($a={}),Pa=(function(){function p(){this._mode=p.FitFrustumSidesMode,this._radiusScale=1,this._positionScale=.5,this._defaultElevation=.3,this._elevationReturnTime=1500,this._elevationReturnWaitTime=1e3,this._zoomStopsAnimation=!1,this._framingTime=1500,this.autoCorrectCameraLimitsAndSensibility=!0,this._isPointerDown=!1,this._lastInteractionTime=-1/0,this._animatables=new Array,this._betaIsAnimating=!1}return Object.defineProperty(p.prototype,\"name\",{get:function(){return\"Framing\"},enumerable:!0,configurable:!0}),Object.defineProperty(p.prototype,\"mode\",{get:function(){return this._mode},set:function(e){this._mode=e},enumerable:!0,configurable:!0}),Object.defineProperty(p.prototype,\"radiusScale\",{get:function(){return this._radiusScale},set:function(e){this._radiusScale=e},enumerable:!0,configurable:!0}),Object.defineProperty(p.prototype,\"positionScale\",{get:function(){return this._positionScale},set:function(e){this._positionScale=e},enumerable:!0,configurable:!0}),Object.defineProperty(p.prototype,\"defaultElevation\",{get:function(){return this._defaultElevation},set:function(e){this._defaultElevation=e},enumerable:!0,configurable:!0}),Object.defineProperty(p.prototype,\"elevationReturnTime\",{get:function(){return this._elevationReturnTime},set:function(e){this._elevationReturnTime=e},enumerable:!0,configurable:!0}),Object.defineProperty(p.prototype,\"elevationReturnWaitTime\",{get:function(){return this._elevationReturnWaitTime},set:function(e){this._elevationReturnWaitTime=e},enumerable:!0,configurable:!0}),Object.defineProperty(p.prototype,\"zoomStopsAnimation\",{get:function(){return this._zoomStopsAnimation},set:function(e){this._zoomStopsAnimation=e},enumerable:!0,configurable:!0}),Object.defineProperty(p.prototype,\"framingTime\",{get:function(){return this._framingTime},set:function(e){this._framingTime=e},enumerable:!0,configurable:!0}),p.prototype.init=function(){},p.prototype.attach=function(e){var t=this;this._attachedCamera=e;var i=this._attachedCamera.getScene();p.EasingFunction.setEasingMode(p.EasingMode),this._onPrePointerObservableObserver=i.onPrePointerObservable.add((function(e){e.type!==xa.PointerEventTypes.POINTERDOWN?e.type===xa.PointerEventTypes.POINTERUP&&(t._isPointerDown=!1):t._isPointerDown=!0})),this._onMeshTargetChangedObserver=e.onMeshTargetChangedObservable.add((function(e){e&&t.zoomOnMesh(e)})),this._onAfterCheckInputsObserver=e.onAfterCheckInputsObservable.add((function(){t._applyUserInteraction(),t._maintainCameraAboveGround()}))},p.prototype.detach=function(){if(this._attachedCamera){var e=this._attachedCamera.getScene();this._onPrePointerObservableObserver&&e.onPrePointerObservable.remove(this._onPrePointerObservableObserver),this._onAfterCheckInputsObserver&&this._attachedCamera.onAfterCheckInputsObservable.remove(this._onAfterCheckInputsObserver),this._onMeshTargetChangedObserver&&this._attachedCamera.onMeshTargetChangedObservable.remove(this._onMeshTargetChangedObserver),this._attachedCamera=null}},p.prototype.zoomOnMesh=function(e,t,i){void 0===t&&(t=!1),void 0===i&&(i=null),e.computeWorldMatrix(!0);var r=e.getBoundingInfo().boundingBox;this.zoomOnBoundingInfo(r.minimumWorld,r.maximumWorld,t,i)},p.prototype.zoomOnMeshHierarchy=function(e,t,i){void 0===t&&(t=!1),void 0===i&&(i=null),e.computeWorldMatrix(!0);var r=e.getHierarchyBoundingVectors(!0);this.zoomOnBoundingInfo(r.min,r.max,t,i)},p.prototype.zoomOnMeshesHierarchy=function(e,t,i){void 0===t&&(t=!1),void 0===i&&(i=null);for(var r=new xa.Vector3(Number.MAX_VALUE,Number.MAX_VALUE,Number.MAX_VALUE),n=new xa.Vector3(-Number.MAX_VALUE,-Number.MAX_VALUE,-Number.MAX_VALUE),o=0;o<e.length;o++){var s=e[o].getHierarchyBoundingVectors(!0);xa.Tools.CheckExtends(s.min,r,n),xa.Tools.CheckExtends(s.max,r,n)}this.zoomOnBoundingInfo(r,n,t,i)},p.prototype.zoomOnBoundingInfo=function(e,t,i,r){var n,o=this;if(void 0===i&&(i=!1),void 0===r&&(r=null),this._attachedCamera){var s=e.y,a=s+(t.y-s)*this._positionScale,l=t.subtract(e).scale(.5);if(i)n=new xa.Vector3(0,a,0);else{var c=e.add(l);n=new xa.Vector3(c.x,a,c.z)}this._vectorTransition||(this._vectorTransition=xa.Animation.CreateAnimation(\"target\",xa.Animation.ANIMATIONTYPE_VECTOR3,60,p.EasingFunction)),this._betaIsAnimating=!0;var h=xa.Animation.TransitionTo(\"target\",n,this._attachedCamera,this._attachedCamera.getScene(),60,this._vectorTransition,this._framingTime);h&&this._animatables.push(h);var u=0;if(this._mode===p.FitFrustumSidesMode){var d=this._calculateLowerRadiusFromModelBoundingSphere(e,t);this.autoCorrectCameraLimitsAndSensibility&&(this._attachedCamera.lowerRadiusLimit=l.length()+this._attachedCamera.minZ),u=d}else this._mode===p.IgnoreBoundsSizeMode&&(u=this._calculateLowerRadiusFromModelBoundingSphere(e,t),this.autoCorrectCameraLimitsAndSensibility&&null===this._attachedCamera.lowerRadiusLimit&&(this._attachedCamera.lowerRadiusLimit=this._attachedCamera.minZ));if(this.autoCorrectCameraLimitsAndSensibility){var f=t.subtract(e).length();this._attachedCamera.panningSensibility=5e3/f,this._attachedCamera.wheelPrecision=100/u}this._radiusTransition||(this._radiusTransition=xa.Animation.CreateAnimation(\"radius\",xa.Animation.ANIMATIONTYPE_FLOAT,60,p.EasingFunction)),(h=xa.Animation.TransitionTo(\"radius\",u,this._attachedCamera,this._attachedCamera.getScene(),60,this._radiusTransition,this._framingTime,(function(){o.stopAllAnimations(),r&&r(),o._attachedCamera&&o._attachedCamera.useInputToRestoreState&&o._attachedCamera.storeState()})))&&this._animatables.push(h)}},p.prototype._calculateLowerRadiusFromModelBoundingSphere=function(e,t){var i=t.subtract(e).length(),r=this._getFrustumSlope(),n=.5*i*this._radiusScale,o=n*Math.sqrt(1+1/(r.x*r.x)),s=n*Math.sqrt(1+1/(r.y*r.y)),a=Math.max(o,s),l=this._attachedCamera;return l?(l.lowerRadiusLimit&&this._mode===p.IgnoreBoundsSizeMode&&(a=a<l.lowerRadiusLimit?l.lowerRadiusLimit:a),l.upperRadiusLimit&&(a=a>l.upperRadiusLimit?l.upperRadiusLimit:a),a):0},p.prototype._maintainCameraAboveGround=function(){var e=this;if(!(this._elevationReturnTime<0)){var t=xa.Tools.Now-this._lastInteractionTime,i=.5*Math.PI-this._defaultElevation,r=.5*Math.PI;if(this._attachedCamera&&!this._betaIsAnimating&&this._attachedCamera.beta>r&&t>=this._elevationReturnWaitTime){this._betaIsAnimating=!0,this.stopAllAnimations(),this._betaTransition||(this._betaTransition=xa.Animation.CreateAnimation(\"beta\",xa.Animation.ANIMATIONTYPE_FLOAT,60,p.EasingFunction));var n=xa.Animation.TransitionTo(\"beta\",i,this._attachedCamera,this._attachedCamera.getScene(),60,this._betaTransition,this._elevationReturnTime,(function(){e._clearAnimationLocks(),e.stopAllAnimations()}));n&&this._animatables.push(n)}}},p.prototype._getFrustumSlope=function(){var e=this._attachedCamera;if(!e)return xa.Vector2.Zero();var t=e.getScene().getEngine().getAspectRatio(e),i=Math.tan(e.fov/2),r=i*t;return new xa.Vector2(r,i)},p.prototype._clearAnimationLocks=function(){this._betaIsAnimating=!1},p.prototype._applyUserInteraction=function(){this.isUserIsMoving&&(this._lastInteractionTime=xa.Tools.Now,this.stopAllAnimations(),this._clearAnimationLocks())},p.prototype.stopAllAnimations=function(){for(this._attachedCamera&&(this._attachedCamera.animations=[]);this._animatables.length;)this._animatables[0]&&(this._animatables[0].onAnimationEnd=null,this._animatables[0].stop()),this._animatables.shift()},Object.defineProperty(p.prototype,\"isUserIsMoving\",{get:function(){return!!this._attachedCamera&&(0!==this._attachedCamera.inertialAlphaOffset||0!==this._attachedCamera.inertialBetaOffset||0!==this._attachedCamera.inertialRadiusOffset||0!==this._attachedCamera.inertialPanningX||0!==this._attachedCamera.inertialPanningY||this._isPointerDown)},enumerable:!0,configurable:!0}),p.EasingFunction=new xa.ExponentialEase,p.EasingMode=xa.EasingFunction.EASINGMODE_EASEINOUT,p.IgnoreBoundsSizeMode=0,p.FitFrustumSidesMode=1,p})(),xa.FramingBehavior=Pa,Aa=$a||($a={}),Sa=(function(){function r(){this.transitionDuration=450,this.lowerRadiusTransitionRange=2,this.upperRadiusTransitionRange=-2,this._autoTransitionRange=!1,this._radiusIsAnimating=!1,this._radiusBounceTransition=null,this._animatables=new Array}return Object.defineProperty(r.prototype,\"name\",{get:function(){return\"Bouncing\"},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,\"autoTransitionRange\",{get:function(){return this._autoTransitionRange},set:function(e){var i=this;if(this._autoTransitionRange!==e){this._autoTransitionRange=e;var t=this._attachedCamera;t&&(e?this._onMeshTargetChangedObserver=t.onMeshTargetChangedObservable.add((function(e){if(e){e.computeWorldMatrix(!0);var t=e.getBoundingInfo().diagonalLength;i.lowerRadiusTransitionRange=.05*t,i.upperRadiusTransitionRange=.05*t}})):this._onMeshTargetChangedObserver&&t.onMeshTargetChangedObservable.remove(this._onMeshTargetChangedObserver))}},enumerable:!0,configurable:!0}),r.prototype.init=function(){},r.prototype.attach=function(e){var t=this;this._attachedCamera=e,this._onAfterCheckInputsObserver=e.onAfterCheckInputsObservable.add((function(){t._attachedCamera&&(t._isRadiusAtLimit(t._attachedCamera.lowerRadiusLimit)&&t._applyBoundRadiusAnimation(t.lowerRadiusTransitionRange),t._isRadiusAtLimit(t._attachedCamera.upperRadiusLimit)&&t._applyBoundRadiusAnimation(t.upperRadiusTransitionRange))}))},r.prototype.detach=function(){this._attachedCamera&&(this._onAfterCheckInputsObserver&&this._attachedCamera.onAfterCheckInputsObservable.remove(this._onAfterCheckInputsObserver),this._onMeshTargetChangedObserver&&this._attachedCamera.onMeshTargetChangedObservable.remove(this._onMeshTargetChangedObserver),this._attachedCamera=null)},r.prototype._isRadiusAtLimit=function(e){return!!this._attachedCamera&&(this._attachedCamera.radius===e&&!this._radiusIsAnimating)},r.prototype._applyBoundRadiusAnimation=function(e){var t=this;if(this._attachedCamera){this._radiusBounceTransition||(r.EasingFunction.setEasingMode(r.EasingMode),this._radiusBounceTransition=Aa.Animation.CreateAnimation(\"radius\",Aa.Animation.ANIMATIONTYPE_FLOAT,60,r.EasingFunction)),this._cachedWheelPrecision=this._attachedCamera.wheelPrecision,this._attachedCamera.wheelPrecision=1/0,this._attachedCamera.inertialRadiusOffset=0,this.stopAllAnimations(),this._radiusIsAnimating=!0;var i=Aa.Animation.TransitionTo(\"radius\",this._attachedCamera.radius+e,this._attachedCamera,this._attachedCamera.getScene(),60,this._radiusBounceTransition,this.transitionDuration,(function(){return t._clearAnimationLocks()}));i&&this._animatables.push(i)}},r.prototype._clearAnimationLocks=function(){this._radiusIsAnimating=!1,this._attachedCamera&&(this._attachedCamera.wheelPrecision=this._cachedWheelPrecision)},r.prototype.stopAllAnimations=function(){for(this._attachedCamera&&(this._attachedCamera.animations=[]);this._animatables.length;)this._animatables[0].onAnimationEnd=null,this._animatables[0].stop(),this._animatables.shift()},r.EasingFunction=new Aa.BackEase(.3),r.EasingMode=Aa.EasingFunction.EASINGMODE_EASEOUT,r})(),Aa.BouncingBehavior=Sa,Ma=$a||($a={}),Ra=(function(){function e(){this._zoomStopsAnimation=!1,this._idleRotationSpeed=.05,this._idleRotationWaitTime=2e3,this._idleRotationSpinupTime=2e3,this._isPointerDown=!1,this._lastFrameTime=null,this._lastInteractionTime=-1/0,this._cameraRotationSpeed=0,this._lastFrameRadius=0}return Object.defineProperty(e.prototype,\"name\",{get:function(){return\"AutoRotation\"},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,\"zoomStopsAnimation\",{get:function(){return this._zoomStopsAnimation},set:function(e){this._zoomStopsAnimation=e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,\"idleRotationSpeed\",{get:function(){return this._idleRotationSpeed},set:function(e){this._idleRotationSpeed=e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,\"idleRotationWaitTime\",{get:function(){return this._idleRotationWaitTime},set:function(e){this._idleRotationWaitTime=e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,\"idleRotationSpinupTime\",{get:function(){return this._idleRotationSpinupTime},set:function(e){this._idleRotationSpinupTime=e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,\"rotationInProgress\",{get:function(){return 0<Math.abs(this._cameraRotationSpeed)},enumerable:!0,configurable:!0}),e.prototype.init=function(){},e.prototype.attach=function(e){var n=this;this._attachedCamera=e;var t=this._attachedCamera.getScene();this._onPrePointerObservableObserver=t.onPrePointerObservable.add((function(e){e.type!==Ma.PointerEventTypes.POINTERDOWN?e.type===Ma.PointerEventTypes.POINTERUP&&(n._isPointerDown=!1):n._isPointerDown=!0})),this._onAfterCheckInputsObserver=e.onAfterCheckInputsObservable.add((function(){var e=Ma.Tools.Now,t=0;null!=n._lastFrameTime&&(t=e-n._lastFrameTime),n._lastFrameTime=e,n._applyUserInteraction();var i=e-n._lastInteractionTime-n._idleRotationWaitTime,r=Math.max(Math.min(i/n._idleRotationSpinupTime,1),0);n._cameraRotationSpeed=n._idleRotationSpeed*r,n._attachedCamera&&(n._attachedCamera.alpha-=n._cameraRotationSpeed*(t/1e3))}))},e.prototype.detach=function(){if(this._attachedCamera){var e=this._attachedCamera.getScene();this._onPrePointerObservableObserver&&e.onPrePointerObservable.remove(this._onPrePointerObservableObserver),this._attachedCamera.onAfterCheckInputsObservable.remove(this._onAfterCheckInputsObserver),this._attachedCamera=null}},e.prototype._userIsZooming=function(){return!!this._attachedCamera&&0!==this._attachedCamera.inertialRadiusOffset},e.prototype._shouldAnimationStopForInteraction=function(){if(!this._attachedCamera)return!1;var e=!1;return this._lastFrameRadius===this._attachedCamera.radius&&0!==this._attachedCamera.inertialRadiusOffset&&(e=!0),this._lastFrameRadius=this._attachedCamera.radius,this._zoomStopsAnimation?e:this._userIsZooming()},e.prototype._applyUserInteraction=function(){this._userIsMoving()&&!this._shouldAnimationStopForInteraction()&&(this._lastInteractionTime=Ma.Tools.Now)},e.prototype._userIsMoving=function(){return!!this._attachedCamera&&(0!==this._attachedCamera.inertialAlphaOffset||0!==this._attachedCamera.inertialBetaOffset||0!==this._attachedCamera.inertialRadiusOffset||0!==this._attachedCamera.inertialPanningX||0!==this._attachedCamera.inertialPanningY||this._isPointerDown)},e})(),Ma.AutoRotationBehavior=Ra,(function(d){var r=function(){this.renderWidth=512,this.renderHeight=256,this.textureSize=512,this.deterministicLockstep=!1,this.lockstepMaxSteps=4};d.NullEngineOptions=r;var e=(function(i){function e(e){void 0===e&&(e=new r);var t=i.call(this,null)||this;return void 0===e.deterministicLockstep&&(e.deterministicLockstep=!1),void 0===e.lockstepMaxSteps&&(e.lockstepMaxSteps=4),t._options=e,t._caps=new d.EngineCapabilities,t._caps.maxTexturesImageUnits=16,t._caps.maxVertexTextureImageUnits=16,t._caps.maxTextureSize=512,t._caps.maxCubemapTextureSize=512,t._caps.maxRenderTextureSize=512,t._caps.maxVertexAttribs=16,t._caps.maxVaryingVectors=16,t._caps.maxFragmentUniformVectors=16,t._caps.maxVertexUniformVectors=16,t._caps.standardDerivatives=!1,t._caps.astc=null,t._caps.s3tc=null,t._caps.pvrtc=null,t._caps.etc1=null,t._caps.etc2=null,t._caps.textureAnisotropicFilterExtension=null,t._caps.maxAnisotropy=0,t._caps.uintIndices=!1,t._caps.fragmentDepthSupported=!1,t._caps.highPrecisionShaderSupported=!0,t._caps.colorBufferFloat=!1,t._caps.textureFloat=!1,t._caps.textureFloatLinearFiltering=!1,t._caps.textureFloatRender=!1,t._caps.textureHalfFloat=!1,t._caps.textureHalfFloatLinearFiltering=!1,t._caps.textureHalfFloatRender=!1,t._caps.textureLOD=!1,t._caps.drawBuffersExtension=!1,t._caps.depthTextureExtension=!1,t._caps.vertexArrayObject=!1,t._caps.instancedArrays=!1,d.Tools.Log(\"Babylon.js null engine (v\"+d.Engine.Version+\") launched\"),\"undefined\"==typeof URL&&(URL={createObjectURL:function(){},revokeObjectURL:function(){}}),\"undefined\"==typeof Blob&&(Blob=function(){}),t}return T(e,i),e.prototype.isDeterministicLockStep=function(){return this._options.deterministicLockstep},e.prototype.getLockstepMaxSteps=function(){return this._options.lockstepMaxSteps},e.prototype.getHardwareScalingLevel=function(){return 1},e.prototype.createVertexBuffer=function(e){return{capacity:0,references:1,is32Bits:!1}},e.prototype.createIndexBuffer=function(e){return{capacity:0,references:1,is32Bits:!1}},e.prototype.clear=function(e,t,i,r){void 0===r&&(r=!1)},e.prototype.getRenderWidth=function(e){return void 0===e&&(e=!1),!e&&this._currentRenderTarget?this._currentRenderTarget.width:this._options.renderWidth},e.prototype.getRenderHeight=function(e){return void 0===e&&(e=!1),!e&&this._currentRenderTarget?this._currentRenderTarget.height:this._options.renderHeight},e.prototype.setViewport=function(e,t,i){this._cachedViewport=e},e.prototype.createShaderProgram=function(e,t,i,r){return{transformFeedback:null,__SPECTOR_rebuildProgram:null}},e.prototype.getUniforms=function(e,t){return[]},e.prototype.getAttributes=function(e,t){return[]},e.prototype.bindSamplers=function(e){this._currentEffect=null},e.prototype.enableEffect=function(e){(this._currentEffect=e).onBind&&e.onBind(e),e._onBindObservable&&e._onBindObservable.notifyObservers(e)},e.prototype.setState=function(e,t,i,r){void 0===t&&(t=0),void 0===r&&(r=!1)},e.prototype.setIntArray=function(e,t){},e.prototype.setIntArray2=function(e,t){},e.prototype.setIntArray3=function(e,t){},e.prototype.setIntArray4=function(e,t){},e.prototype.setFloatArray=function(e,t){},e.prototype.setFloatArray2=function(e,t){},e.prototype.setFloatArray3=function(e,t){},e.prototype.setFloatArray4=function(e,t){},e.prototype.setArray=function(e,t){},e.prototype.setArray2=function(e,t){},e.prototype.setArray3=function(e,t){},e.prototype.setArray4=function(e,t){},e.prototype.setMatrices=function(e,t){},e.prototype.setMatrix=function(e,t){},e.prototype.setMatrix3x3=function(e,t){},e.prototype.setMatrix2x2=function(e,t){},e.prototype.setFloat=function(e,t){},e.prototype.setFloat2=function(e,t,i){},e.prototype.setFloat3=function(e,t,i,r){},e.prototype.setBool=function(e,t){},e.prototype.setFloat4=function(e,t,i,r,n){},e.prototype.setColor3=function(e,t){},e.prototype.setColor4=function(e,t,i){},e.prototype.setAlphaMode=function(e,t){void 0===t&&(t=!1),this._alphaMode!==e&&(this._alphaState.alphaBlend=e!==d.Engine.ALPHA_DISABLE,t||this.setDepthWrite(e===d.Engine.ALPHA_DISABLE),this._alphaMode=e)},e.prototype.bindBuffers=function(e,t,i){},e.prototype.wipeCaches=function(e){this.preventCacheWipeBetweenFrames||(this.resetTextureCache(),this._currentEffect=null,e&&(this._currentProgram=null,this._stencilState.reset(),this._depthCullingState.reset(),this._alphaState.reset()),this._cachedVertexBuffers=null,this._cachedIndexBuffer=null,this._cachedEffectForVertexBuffers=null)},e.prototype.draw=function(e,t,i,r){},e.prototype.drawElementsType=function(e,t,i,r){},e.prototype.drawArraysType=function(e,t,i,r){},e.prototype._createTexture=function(){return{}},e.prototype._releaseTexture=function(e){},e.prototype.createTexture=function(e,t,i,r,n,o,s,a,l,c){void 0===n&&(n=d.Texture.TRILINEAR_SAMPLINGMODE),void 0===o&&(o=null),void 0===s&&(s=null),void 0===a&&(a=null);var h=new d.InternalTexture(this,d.InternalTexture.DATASOURCE_URL),u=String(e);return h.url=u,h.generateMipMaps=!t,h.samplingMode=n,h.invertY=i,h.baseWidth=this._options.textureSize,h.baseHeight=this._options.textureSize,h.width=this._options.textureSize,h.height=this._options.textureSize,c&&(h.format=c),h.isReady=!0,o&&o(),this._internalTexturesCache.push(h),h},e.prototype.createRenderTargetTexture=function(e,t){var i=new d.RenderTargetCreationOptions;void 0!==t&&\"object\"==typeof t?(i.generateMipMaps=t.generateMipMaps,i.generateDepthBuffer=void 0===t.generateDepthBuffer||t.generateDepthBuffer,i.generateStencilBuffer=i.generateDepthBuffer&&t.generateStencilBuffer,i.type=void 0===t.type?d.Engine.TEXTURETYPE_UNSIGNED_INT:t.type,i.samplingMode=void 0===t.samplingMode?d.Texture.TRILINEAR_SAMPLINGMODE:t.samplingMode):(i.generateMipMaps=t,i.generateDepthBuffer=!0,i.generateStencilBuffer=!1,i.type=d.Engine.TEXTURETYPE_UNSIGNED_INT,i.samplingMode=d.Texture.TRILINEAR_SAMPLINGMODE);var r=new d.InternalTexture(this,d.InternalTexture.DATASOURCE_RENDERTARGET),n=e.width||e,o=e.height||e;return r._depthStencilBuffer={},r._framebuffer={},r.baseWidth=n,r.baseHeight=o,r.width=n,r.height=o,r.isReady=!0,r.samples=1,r.generateMipMaps=!!i.generateMipMaps,r.samplingMode=i.samplingMode,r.type=i.type,r._generateDepthBuffer=i.generateDepthBuffer,r._generateStencilBuffer=!!i.generateStencilBuffer,this._internalTexturesCache.push(r),r},e.prototype.updateTextureSamplingMode=function(e,t){t.samplingMode=e},e.prototype.bindFramebuffer=function(e,t,i,r,n){this._currentRenderTarget&&this.unBindFramebuffer(this._currentRenderTarget),this._currentRenderTarget=e,this._currentFramebuffer=e._MSAAFramebuffer?e._MSAAFramebuffer:e._framebuffer,this._cachedViewport&&!n&&this.setViewport(this._cachedViewport,i,r)},e.prototype.unBindFramebuffer=function(e,t,i){void 0===t&&(t=!1),this._currentRenderTarget=null,i&&(e._MSAAFramebuffer&&(this._currentFramebuffer=e._framebuffer),i()),this._currentFramebuffer=null},e.prototype.createDynamicVertexBuffer=function(e){return{capacity:1,references:1,is32Bits:!1}},e.prototype.updateDynamicTexture=function(e,t,i,r,n){void 0===r&&(r=!1)},e.prototype.getError=function(){return 0},e.prototype._getUnpackAlignement=function(){return 1},e.prototype._unpackFlipY=function(e){},e.prototype.updateDynamicIndexBuffer=function(e,t,i){void 0===i&&(i=0)},e.prototype.updateDynamicVertexBuffer=function(e,t,i,r){},e.prototype._bindTextureDirectly=function(e,t){return this._boundTexturesCache[this._activeChannel]!==t&&(this._boundTexturesCache[this._activeChannel]=t,!0)},e.prototype._bindTexture=function(e,t){e<0||this._bindTextureDirectly(0,t)},e.prototype._releaseBuffer=function(e){return e.references--,0===e.references},e.prototype.releaseEffects=function(){},e.prototype.displayLoadingUI=function(){},e.prototype.hideLoadingUI=function(){},e.prototype._uploadCompressedDataToTextureDirectly=function(e,t,i,r,n,o,s){void 0===o&&(o=0),void 0===s&&(s=0)},e.prototype._uploadDataToTextureDirectly=function(e,t,i,r){void 0===i&&(i=0),void 0===r&&(r=0)},e.prototype._uploadArrayBufferViewToTexture=function(e,t,i,r){void 0===i&&(i=0),void 0===r&&(r=0)},e.prototype._uploadImageToTexture=function(e,t,i,r){void 0===i&&(i=0),void 0===r&&(r=0)},e})(d.Engine);d.NullEngine=e})($a||($a={})),Ca=$a||($a={}),Oa=(function(){function e(e){this.engine=e,this._captureGPUFrameTime=!1,this._gpuFrameTime=new Ca.PerfCounter,this._captureShaderCompilationTime=!1,this._shaderCompilationTime=new Ca.PerfCounter,this._onBeginFrameObserver=null,this._onEndFrameObserver=null,this._onBeforeShaderCompilationObserver=null,this._onAfterShaderCompilationObserver=null}return Object.defineProperty(e.prototype,\"gpuFrameTimeCounter\",{get:function(){return this._gpuFrameTime},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,\"captureGPUFrameTime\",{get:function(){return this._captureGPUFrameTime},set:function(e){var t=this;e!==this._captureGPUFrameTime&&((this._captureGPUFrameTime=e)?(this._onBeginFrameObserver=this.engine.onBeginFrameObservable.add((function(){t._gpuFrameTimeToken||(t._gpuFrameTimeToken=t.engine.startTimeQuery())})),this._onEndFrameObserver=this.engine.onEndFrameObservable.add((function(){if(t._gpuFrameTimeToken){var e=t.engine.endTimeQuery(t._gpuFrameTimeToken);-1<e&&(t._gpuFrameTimeToken=null,t._gpuFrameTime.fetchNewFrame(),t._gpuFrameTime.addCount(e,!0))}}))):(this.engine.onBeginFrameObservable.remove(this._onBeginFrameObserver),this._onBeginFrameObserver=null,this.engine.onEndFrameObservable.remove(this._onEndFrameObserver),this._onEndFrameObserver=null))},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,\"shaderCompilationTimeCounter\",{get:function(){return this._shaderCompilationTime},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,\"captureShaderCompilationTime\",{get:function(){return this._captureShaderCompilationTime},set:function(e){var t=this;e!==this._captureShaderCompilationTime&&((this._captureShaderCompilationTime=e)?(this._onBeforeShaderCompilationObserver=this.engine.onBeforeShaderCompilationObservable.add((function(){t._shaderCompilationTime.fetchNewFrame(),t._shaderCompilationTime.beginMonitoring()})),this._onAfterShaderCompilationObserver=this.engine.onAfterShaderCompilationObservable.add((function(){t._shaderCompilationTime.endMonitoring()}))):(this.engine.onBeforeShaderCompilationObservable.remove(this._onBeforeShaderCompilationObserver),this._onBeforeShaderCompilationObserver=null,this.engine.onAfterShaderCompilationObservable.remove(this._onAfterShaderCompilationObserver),this._onAfterShaderCompilationObserver=null))},enumerable:!0,configurable:!0}),e.prototype.dispose=function(){this.engine.onBeginFrameObservable.remove(this._onBeginFrameObserver),this._onBeginFrameObserver=null,this.engine.onEndFrameObservable.remove(this._onEndFrameObserver),this._onEndFrameObserver=null,this.engine.onBeforeShaderCompilationObservable.remove(this._onBeforeShaderCompilationObserver),this._onBeforeShaderCompilationObserver=null,this.engine.onAfterShaderCompilationObservable.remove(this._onAfterShaderCompilationObserver),this._onAfterShaderCompilationObserver=null,this.engine=null},e})(),Ca.EngineInstrumentation=Oa,Da=$a||($a={}),Ia=(function(){function e(e){var t=this;this.scene=e,this._captureActiveMeshesEvaluationTime=!1,this._activeMeshesEvaluationTime=new Da.PerfCounter,this._captureRenderTargetsRenderTime=!1,this._renderTargetsRenderTime=new Da.PerfCounter,this._captureFrameTime=!1,this._frameTime=new Da.PerfCounter,this._captureRenderTime=!1,this._renderTime=new Da.PerfCounter,this._captureInterFrameTime=!1,this._interFrameTime=new Da.PerfCounter,this._captureParticlesRenderTime=!1,this._particlesRenderTime=new Da.PerfCounter,this._captureSpritesRenderTime=!1,this._spritesRenderTime=new Da.PerfCounter,this._capturePhysicsTime=!1,this._physicsTime=new Da.PerfCounter,this._captureAnimationsTime=!1,this._animationsTime=new Da.PerfCounter,this._captureCameraRenderTime=!1,this._cameraRenderTime=new Da.PerfCounter,this._onBeforeActiveMeshesEvaluationObserver=null,this._onAfterActiveMeshesEvaluationObserver=null,this._onBeforeRenderTargetsRenderObserver=null,this._onAfterRenderTargetsRenderObserver=null,this._onAfterRenderObserver=null,this._onBeforeDrawPhaseObserver=null,this._onAfterDrawPhaseObserver=null,this._onBeforeAnimationsObserver=null,this._onBeforeParticlesRenderingObserver=null,this._onAfterParticlesRenderingObserver=null,this._onBeforeSpritesRenderingObserver=null,this._onAfterSpritesRenderingObserver=null,this._onBeforePhysicsObserver=null,this._onAfterPhysicsObserver=null,this._onAfterAnimationsObserver=null,this._onBeforeCameraRenderObserver=null,this._onAfterCameraRenderObserver=null,this._onBeforeAnimationsObserver=e.onBeforeAnimationsObservable.add((function(){t._captureActiveMeshesEvaluationTime&&t._activeMeshesEvaluationTime.fetchNewFrame(),t._captureRenderTargetsRenderTime&&t._renderTargetsRenderTime.fetchNewFrame(),t._captureFrameTime&&(Da.Tools.StartPerformanceCounter(\"Scene rendering\"),t._frameTime.beginMonitoring()),t._captureInterFrameTime&&t._interFrameTime.endMonitoring(),t._captureParticlesRenderTime&&t._particlesRenderTime.fetchNewFrame(),t._captureSpritesRenderTime&&t._spritesRenderTime.fetchNewFrame(),t._captureAnimationsTime&&t._animationsTime.beginMonitoring(),t.scene.getEngine()._drawCalls.fetchNewFrame(),t.scene.getEngine()._textureCollisions.fetchNewFrame()})),this._onAfterRenderObserver=e.onAfterRenderObservable.add((function(){t._captureFrameTime&&(Da.Tools.EndPerformanceCounter(\"Scene rendering\"),t._frameTime.endMonitoring()),t._captureRenderTime&&t._renderTime.endMonitoring(!1),t._captureInterFrameTime&&t._interFrameTime.beginMonitoring()}))}return Object.defineProperty(e.prototype,\"activeMeshesEvaluationTimeCounter\",{get:function(){return this._activeMeshesEvaluationTime},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,\"captureActiveMeshesEvaluationTime\",{get:function(){return this._captureActiveMeshesEvaluationTime},set:function(e){var t=this;e!==this._captureActiveMeshesEvaluationTime&&((this._captureActiveMeshesEvaluationTime=e)?(this._onBeforeActiveMeshesEvaluationObserver=this.scene.onBeforeActiveMeshesEvaluationObservable.add((function(){Da.Tools.StartPerformanceCounter(\"Active meshes evaluation\"),t._activeMeshesEvaluationTime.beginMonitoring()})),this._onAfterActiveMeshesEvaluationObserver=this.scene.onAfterActiveMeshesEvaluationObservable.add((function(){Da.Tools.EndPerformanceCounter(\"Active meshes evaluation\"),t._activeMeshesEvaluationTime.endMonitoring()}))):(this.scene.onBeforeActiveMeshesEvaluationObservable.remove(this._onBeforeActiveMeshesEvaluationObserver),this._onBeforeActiveMeshesEvaluationObserver=null,this.scene.onAfterActiveMeshesEvaluationObservable.remove(this._onAfterActiveMeshesEvaluationObserver),this._onAfterActiveMeshesEvaluationObserver=null))},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,\"renderTargetsRenderTimeCounter\",{get:function(){return this._renderTargetsRenderTime},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,\"captureRenderTargetsRenderTime\",{get:function(){return this._captureRenderTargetsRenderTime},set:function(e){var t=this;e!==this._captureRenderTargetsRenderTime&&((this._captureRenderTargetsRenderTime=e)?(this._onBeforeRenderTargetsRenderObserver=this.scene.onBeforeRenderTargetsRenderObservable.add((function(){Da.Tools.StartPerformanceCounter(\"Render targets rendering\"),t._renderTargetsRenderTime.beginMonitoring()})),this._onAfterRenderTargetsRenderObserver=this.scene.onAfterRenderTargetsRenderObservable.add((function(){Da.Tools.EndPerformanceCounter(\"Render targets rendering\"),t._renderTargetsRenderTime.endMonitoring(!1)}))):(this.scene.onBeforeRenderTargetsRenderObservable.remove(this._onBeforeRenderTargetsRenderObserver),this._onBeforeRenderTargetsRenderObserver=null,this.scene.onAfterRenderTargetsRenderObservable.remove(this._onAfterRenderTargetsRenderObserver),this._onAfterRenderTargetsRenderObserver=null))},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,\"particlesRenderTimeCounter\",{get:function(){return this._particlesRenderTime},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,\"captureParticlesRenderTime\",{get:function(){return this._captureParticlesRenderTime},set:function(e){var t=this;e!==this._captureParticlesRenderTime&&((this._captureParticlesRenderTime=e)?(this._onBeforeParticlesRenderingObserver=this.scene.onBeforeParticlesRenderingObservable.add((function(){Da.Tools.StartPerformanceCounter(\"Particles\"),t._particlesRenderTime.beginMonitoring()})),this._onAfterParticlesRenderingObserver=this.scene.onAfterParticlesRenderingObservable.add((function(){Da.Tools.EndPerformanceCounter(\"Particles\"),t._particlesRenderTime.endMonitoring(!1)}))):(this.scene.onBeforeParticlesRenderingObservable.remove(this._onBeforeParticlesRenderingObserver),this._onBeforeParticlesRenderingObserver=null,this.scene.onAfterParticlesRenderingObservable.remove(this._onAfterParticlesRenderingObserver),this._onAfterParticlesRenderingObserver=null))},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,\"spritesRenderTimeCounter\",{get:function(){return this._spritesRenderTime},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,\"captureSpritesRenderTime\",{get:function(){return this._captureSpritesRenderTime},set:function(e){var t=this;e!==this._captureSpritesRenderTime&&(this._captureSpritesRenderTime=e,this.scene.spriteManagers&&(e?(this._onBeforeSpritesRenderingObserver=this.scene.onBeforeSpritesRenderingObservable.add((function(){Da.Tools.StartPerformanceCounter(\"Sprites\"),t._spritesRenderTime.beginMonitoring()})),this._onAfterSpritesRenderingObserver=this.scene.onAfterSpritesRenderingObservable.add((function(){Da.Tools.EndPerformanceCounter(\"Sprites\"),t._spritesRenderTime.endMonitoring(!1)}))):(this.scene.onBeforeSpritesRenderingObservable.remove(this._onBeforeSpritesRenderingObserver),this._onBeforeSpritesRenderingObserver=null,this.scene.onAfterSpritesRenderingObservable.remove(this._onAfterSpritesRenderingObserver),this._onAfterSpritesRenderingObserver=null)))},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,\"physicsTimeCounter\",{get:function(){return this._physicsTime},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,\"capturePhysicsTime\",{get:function(){return this._capturePhysicsTime},set:function(e){var t=this;e!==this._capturePhysicsTime&&this.scene.onBeforePhysicsObservable&&((this._capturePhysicsTime=e)?(this._onBeforePhysicsObserver=this.scene.onBeforePhysicsObservable.add((function(){Da.Tools.StartPerformanceCounter(\"Physics\"),t._physicsTime.beginMonitoring()})),this._onAfterPhysicsObserver=this.scene.onAfterPhysicsObservable.add((function(){Da.Tools.EndPerformanceCounter(\"Physics\"),t._physicsTime.endMonitoring()}))):(this.scene.onBeforePhysicsObservable.remove(this._onBeforePhysicsObserver),this._onBeforePhysicsObserver=null,this.scene.onAfterPhysicsObservable.remove(this._onAfterPhysicsObserver),this._onAfterPhysicsObserver=null))},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,\"animationsTimeCounter\",{get:function(){return this._animationsTime},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,\"captureAnimationsTime\",{get:function(){return this._captureAnimationsTime},set:function(e){var t=this;e!==this._captureAnimationsTime&&((this._captureAnimationsTime=e)?this._onAfterAnimationsObserver=this.scene.onAfterAnimationsObservable.add((function(){t._animationsTime.endMonitoring()})):(this.scene.onAfterAnimationsObservable.remove(this._onAfterAnimationsObserver),this._onAfterAnimationsObserver=null))},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,\"frameTimeCounter\",{get:function(){return this._frameTime},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,\"captureFrameTime\",{get:function(){return this._captureFrameTime},set:function(e){this._captureFrameTime=e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,\"interFrameTimeCounter\",{get:function(){return this._interFrameTime},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,\"captureInterFrameTime\",{get:function(){return this._captureInterFrameTime},set:function(e){this._captureInterFrameTime=e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,\"renderTimeCounter\",{get:function(){return this._renderTime},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,\"captureRenderTime\",{get:function(){return this._captureRenderTime},set:function(e){var t=this;e!==this._captureRenderTime&&((this._captureRenderTime=e)?(this._onBeforeDrawPhaseObserver=this.scene.onBeforeDrawPhaseObservable.add((function(){t._renderTime.beginMonitoring(),Da.Tools.StartPerformanceCounter(\"Main render\")})),this._onAfterDrawPhaseObserver=this.scene.onAfterDrawPhaseObservable.add((function(){t._renderTime.endMonitoring(!1),Da.Tools.EndPerformanceCounter(\"Main render\")}))):(this.scene.onBeforeDrawPhaseObservable.remove(this._onBeforeDrawPhaseObserver),this._onBeforeDrawPhaseObserver=null,this.scene.onAfterDrawPhaseObservable.remove(this._onAfterDrawPhaseObserver),this._onAfterDrawPhaseObserver=null))},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,\"cameraRenderTimeCounter\",{get:function(){return this._cameraRenderTime},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,\"captureCameraRenderTime\",{get:function(){return this._captureCameraRenderTime},set:function(e){var t=this;e!==this._captureCameraRenderTime&&((this._captureCameraRenderTime=e)?(this._onBeforeCameraRenderObserver=this.scene.onBeforeCameraRenderObservable.add((function(e){t._cameraRenderTime.beginMonitoring(),Da.Tools.StartPerformanceCounter(\"Rendering camera \"+e.name)})),this._onAfterCameraRenderObserver=this.scene.onAfterCameraRenderObservable.add((function(e){t._cameraRenderTime.endMonitoring(!1),Da.Tools.EndPerformanceCounter(\"Rendering camera \"+e.name)}))):(this.scene.onBeforeCameraRenderObservable.remove(this._onBeforeCameraRenderObserver),this._onBeforeCameraRenderObserver=null,this.scene.onAfterCameraRenderObservable.remove(this._onAfterCameraRenderObserver),this._onAfterCameraRenderObserver=null))},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,\"drawCallsCounter\",{get:function(){return this.scene.getEngine()._drawCalls},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,\"textureCollisionsCounter\",{get:function(){return this.scene.getEngine()._textureCollisions},enumerable:!0,configurable:!0}),e.prototype.dispose=function(){this.scene.onAfterRenderObservable.remove(this._onAfterRenderObserver),this._onAfterRenderObserver=null,this.scene.onBeforeActiveMeshesEvaluationObservable.remove(this._onBeforeActiveMeshesEvaluationObserver),this._onBeforeActiveMeshesEvaluationObserver=null,this.scene.onAfterActiveMeshesEvaluationObservable.remove(this._onAfterActiveMeshesEvaluationObserver),this._onAfterActiveMeshesEvaluationObserver=null,this.scene.onBeforeRenderTargetsRenderObservable.remove(this._onBeforeRenderTargetsRenderObserver),this._onBeforeRenderTargetsRenderObserver=null,this.scene.onAfterRenderTargetsRenderObservable.remove(this._onAfterRenderTargetsRenderObserver),this._onAfterRenderTargetsRenderObserver=null,this.scene.onBeforeAnimationsObservable.remove(this._onBeforeAnimationsObserver),this._onBeforeAnimationsObserver=null,this.scene.onBeforeParticlesRenderingObservable.remove(this._onBeforeParticlesRenderingObserver),this._onBeforeParticlesRenderingObserver=null,this.scene.onAfterParticlesRenderingObservable.remove(this._onAfterParticlesRenderingObserver),this._onAfterParticlesRenderingObserver=null,this._onBeforeSpritesRenderingObserver&&(this.scene.onBeforeSpritesRenderingObservable.remove(this._onBeforeSpritesRenderingObserver),this._onBeforeSpritesRenderingObserver=null),this._onAfterSpritesRenderingObserver&&(this.scene.onAfterSpritesRenderingObservable.remove(this._onAfterSpritesRenderingObserver),this._onAfterSpritesRenderingObserver=null),this.scene.onBeforeDrawPhaseObservable.remove(this._onBeforeDrawPhaseObserver),this._onBeforeDrawPhaseObserver=null,this.scene.onAfterDrawPhaseObservable.remove(this._onAfterDrawPhaseObserver),this._onAfterDrawPhaseObserver=null,this._onBeforePhysicsObserver&&(this.scene.onBeforePhysicsObservable.remove(this._onBeforePhysicsObserver),this._onBeforePhysicsObserver=null),this._onAfterPhysicsObserver&&(this.scene.onAfterPhysicsObservable.remove(this._onAfterPhysicsObserver),this._onAfterPhysicsObserver=null),this.scene.onAfterAnimationsObservable.remove(this._onAfterAnimationsObserver),this._onAfterAnimationsObserver=null,this.scene.onBeforeCameraRenderObservable.remove(this._onBeforeCameraRenderObserver),this._onBeforeCameraRenderObserver=null,this.scene.onAfterCameraRenderObservable.remove(this._onAfterCameraRenderObserver),this._onAfterCameraRenderObserver=null,this.scene=null},e})(),Da.SceneInstrumentation=Ia,wa=function(){this._timeElapsedQueryEnded=!1},($a||($a={}))._TimeToken=wa,La=$a||($a={}),Fa=(function(t){function e(){var e=t.call(this)||this;return e.DIFFUSE=!1,e.DIFFUSEDIRECTUV=0,e.GAMMADIFFUSE=!1,e.DIFFUSEHASALPHA=!1,e.OPACITYFRESNEL=!1,e.REFLECTIONBLUR=!1,e.REFLECTIONFRESNEL=!1,e.REFLECTIONFALLOFF=!1,e.TEXTURELODSUPPORT=!1,e.PREMULTIPLYALPHA=!1,e.USERGBCOLOR=!1,e.USEHIGHLIGHTANDSHADOWCOLORS=!1,e.NOISE=!1,e.REFLECTIONBGR=!1,e.IMAGEPROCESSING=!1,e.VIGNETTE=!1,e.VIGNETTEBLENDMODEMULTIPLY=!1,e.VIGNETTEBLENDMODEOPAQUE=!1,e.TONEMAPPING=!1,e.TONEMAPPING_ACES=!1,e.CONTRAST=!1,e.COLORCURVES=!1,e.COLORGRADING=!1,e.COLORGRADING3D=!1,e.SAMPLER3DGREENDEPTH=!1,e.SAMPLER3DBGRMAP=!1,e.IMAGEPROCESSINGPOSTPROCESS=!1,e.EXPOSURE=!1,e.REFLECTION=!1,e.REFLECTIONMAP_3D=!1,e.REFLECTIONMAP_SPHERICAL=!1,e.REFLECTIONMAP_PLANAR=!1,e.REFLECTIONMAP_CUBIC=!1,e.REFLECTIONMAP_PROJECTION=!1,e.REFLECTIONMAP_SKYBOX=!1,e.REFLECTIONMAP_SKYBOX_TRANSFORMED=!1,e.REFLECTIONMAP_EXPLICIT=!1,e.REFLECTIONMAP_EQUIRECTANGULAR=!1,e.REFLECTIONMAP_EQUIRECTANGULAR_FIXED=!1,e.REFLECTIONMAP_MIRROREDEQUIRECTANGULAR_FIXED=!1,e.INVERTCUBICMAP=!1,e.REFLECTIONMAP_OPPOSITEZ=!1,e.LODINREFLECTIONALPHA=!1,e.GAMMAREFLECTION=!1,e.RGBDREFLECTION=!1,e.EQUIRECTANGULAR_RELFECTION_FOV=!1,e.MAINUV1=!1,e.MAINUV2=!1,e.UV1=!1,e.UV2=!1,e.CLIPPLANE=!1,e.CLIPPLANE2=!1,e.CLIPPLANE3=!1,e.CLIPPLANE4=!1,e.POINTSIZE=!1,e.FOG=!1,e.NORMAL=!1,e.NUM_BONE_INFLUENCERS=0,e.BonesPerMesh=0,e.INSTANCES=!1,e.SHADOWFLOAT=!1,e.rebuild(),e}return T(e,t),e})(La.MaterialDefines),Ba=(function(r){function n(e,t){var i=r.call(this,e,t)||this;return i.primaryColor=La.Color3.White(),i._primaryColorShadowLevel=0,i._primaryColorHighlightLevel=0,i.reflectionTexture=null,i.reflectionBlur=0,i.diffuseTexture=null,i._shadowLights=null,i.shadowLights=null,i.shadowLevel=0,i.sceneCenter=La.Vector3.Zero(),i.opacityFresnel=!0,i.reflectionFresnel=!1,i.reflectionFalloffDistance=0,i.reflectionAmount=1,i.reflectionReflectance0=.05,i.reflectionReflectance90=.5,i.useRGBColor=!0,i.enableNoise=!1,i._fovMultiplier=1,i.useEquirectangularFOV=!1,i._maxSimultaneousLights=4,i.maxSimultaneousLights=4,i._imageProcessingObserver=null,i.switchToBGR=!1,i._renderTargets=new La.SmartArray(16),i._reflectionControls=La.Vector4.Zero(),i._white=La.Color3.White(),i._primaryShadowColor=La.Color3.Black(),i._primaryHighlightColor=La.Color3.Black(),i._attachImageProcessingConfiguration(null),i.getRenderTargetTextures=function(){return i._renderTargets.reset(),i._diffuseTexture&&i._diffuseTexture.isRenderTarget&&i._renderTargets.push(i._diffuseTexture),i._reflectionTexture&&i._reflectionTexture.isRenderTarget&&i._renderTargets.push(i._reflectionTexture),i._renderTargets},i}return T(n,r),Object.defineProperty(n.prototype,\"_perceptualColor\",{get:function(){return this.__perceptualColor},set:function(e){this.__perceptualColor=e,this._computePrimaryColorFromPerceptualColor(),this._markAllSubMeshesAsLightsDirty()},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,\"primaryColorShadowLevel\",{get:function(){return this._primaryColorShadowLevel},set:function(e){this._primaryColorShadowLevel=e,this._computePrimaryColors(),this._markAllSubMeshesAsLightsDirty()},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,\"primaryColorHighlightLevel\",{get:function(){return this._primaryColorHighlightLevel},set:function(e){this._primaryColorHighlightLevel=e,this._computePrimaryColors(),this._markAllSubMeshesAsLightsDirty()},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,\"reflectionStandardFresnelWeight\",{set:function(e){var t=e;t<.5?(t*=2,this.reflectionReflectance0=n.StandardReflectance0*t,this.reflectionReflectance90=n.StandardReflectance90*t):(t=2*t-1,this.reflectionReflectance0=n.StandardReflectance0+(1-n.StandardReflectance0)*t,this.reflectionReflectance90=n.StandardReflectance90+(1-n.StandardReflectance90)*t)},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,\"fovMultiplier\",{get:function(){return this._fovMultiplier},set:function(e){isNaN(e)&&(e=1),this._fovMultiplier=Math.max(0,Math.min(2,e))},enumerable:!0,configurable:!0}),n.prototype._attachImageProcessingConfiguration=function(e){var t=this;e!==this._imageProcessingConfiguration&&(this._imageProcessingConfiguration&&this._imageProcessingObserver&&this._imageProcessingConfiguration.onUpdateParameters.remove(this._imageProcessingObserver),this._imageProcessingConfiguration=e||this.getScene().imageProcessingConfiguration,this._imageProcessingConfiguration&&(this._imageProcessingObserver=this._imageProcessingConfiguration.onUpdateParameters.add((function(e){t._computePrimaryColorFromPerceptualColor(),t._markAllSubMeshesAsImageProcessingDirty()}))))},Object.defineProperty(n.prototype,\"imageProcessingConfiguration\",{get:function(){return this._imageProcessingConfiguration},set:function(e){this._attachImageProcessingConfiguration(e),this._markAllSubMeshesAsTexturesDirty()},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,\"cameraColorCurvesEnabled\",{get:function(){return this.imageProcessingConfiguration.colorCurvesEnabled},set:function(e){this.imageProcessingConfiguration.colorCurvesEnabled=e},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,\"cameraColorGradingEnabled\",{get:function(){return this.imageProcessingConfiguration.colorGradingEnabled},set:function(e){this.imageProcessingConfiguration.colorGradingEnabled=e},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,\"cameraToneMappingEnabled\",{get:function(){return this._imageProcessingConfiguration.toneMappingEnabled},set:function(e){this._imageProcessingConfiguration.toneMappingEnabled=e},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,\"cameraExposure\",{get:function(){return this._imageProcessingConfiguration.exposure},set:function(e){this._imageProcessingConfiguration.exposure=e},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,\"cameraContrast\",{get:function(){return this._imageProcessingConfiguration.contrast},set:function(e){this._imageProcessingConfiguration.contrast=e},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,\"cameraColorGradingTexture\",{get:function(){return this._imageProcessingConfiguration.colorGradingTexture},set:function(e){this.imageProcessingConfiguration.colorGradingTexture=e},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,\"cameraColorCurves\",{get:function(){return this.imageProcessingConfiguration.colorCurves},set:function(e){this.imageProcessingConfiguration.colorCurves=e},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,\"hasRenderTargetTextures\",{get:function(){return!(!this._diffuseTexture||!this._diffuseTexture.isRenderTarget)||!(!this._reflectionTexture||!this._reflectionTexture.isRenderTarget)},enumerable:!0,configurable:!0}),n.prototype.needAlphaTesting=function(){return!0},n.prototype.needAlphaBlending=function(){return this.alpha<0||null!=this._diffuseTexture&&this._diffuseTexture.hasAlpha},n.prototype.isReadyForSubMesh=function(e,t,i){var r=this;if(void 0===i&&(i=!1),t.effect&&this.isFrozen&&this._wasPreviouslyReady)return!0;t._materialDefines||(t._materialDefines=new Fa);var n=this.getScene(),o=t._materialDefines;if(!this.checkReadyOnEveryCall&&t.effect&&o._renderId===n.getRenderId())return!0;var s=n.getEngine();if(La.MaterialHelper.PrepareDefinesForLights(n,e,o,!1,this._maxSimultaneousLights),o._needNormals=!0,o._areTexturesDirty){if(o._needUVs=!1,n.texturesEnabled){if(n.getEngine().getCaps().textureLOD&&(o.TEXTURELODSUPPORT=!0),this._diffuseTexture&&La.StandardMaterial.DiffuseTextureEnabled){if(!this._diffuseTexture.isReadyOrNotBlocking())return!1;La.MaterialHelper.PrepareDefinesForMergedUV(this._diffuseTexture,o,\"DIFFUSE\"),o.DIFFUSEHASALPHA=this._diffuseTexture.hasAlpha,o.GAMMADIFFUSE=this._diffuseTexture.gammaSpace,o.OPACITYFRESNEL=this._opacityFresnel}else o.DIFFUSE=!1,o.DIFFUSEHASALPHA=!1,o.GAMMADIFFUSE=!1,o.OPACITYFRESNEL=!1;var a=this._reflectionTexture;if(a&&La.StandardMaterial.ReflectionTextureEnabled){if(!a.isReadyOrNotBlocking())return!1;switch(o.REFLECTION=!0,o.GAMMAREFLECTION=a.gammaSpace,o.RGBDREFLECTION=a.isRGBD,o.REFLECTIONBLUR=0<this._reflectionBlur,o.REFLECTIONMAP_OPPOSITEZ=this.getScene().useRightHandedSystem?!a.invertZ:a.invertZ,o.LODINREFLECTIONALPHA=a.lodLevelInAlpha,o.EQUIRECTANGULAR_RELFECTION_FOV=this.useEquirectangularFOV,o.REFLECTIONBGR=this.switchToBGR,a.coordinatesMode===La.Texture.INVCUBIC_MODE&&(o.INVERTCUBICMAP=!0),o.REFLECTIONMAP_3D=a.isCube,a.coordinatesMode){case La.Texture.EXPLICIT_MODE:o.REFLECTIONMAP_EXPLICIT=!0;break;case La.Texture.PLANAR_MODE:o.REFLECTIONMAP_PLANAR=!0;break;case La.Texture.PROJECTION_MODE:o.REFLECTIONMAP_PROJECTION=!0;break;case La.Texture.SKYBOX_MODE:o.REFLECTIONMAP_SKYBOX=!0,o.REFLECTIONMAP_SKYBOX_TRANSFORMED=!a.getReflectionTextureMatrix().isIdentity();break;case La.Texture.SPHERICAL_MODE:o.REFLECTIONMAP_SPHERICAL=!0;break;case La.Texture.EQUIRECTANGULAR_MODE:o.REFLECTIONMAP_EQUIRECTANGULAR=!0;break;case La.Texture.FIXED_EQUIRECTANGULAR_MODE:o.REFLECTIONMAP_EQUIRECTANGULAR_FIXED=!0;break;case La.Texture.FIXED_EQUIRECTANGULAR_MIRRORED_MODE:o.REFLECTIONMAP_MIRROREDEQUIRECTANGULAR_FIXED=!0;break;case La.Texture.CUBIC_MODE:case La.Texture.INVCUBIC_MODE:default:o.REFLECTIONMAP_CUBIC=!0}this.reflectionFresnel?(o.REFLECTIONFRESNEL=!0,o.REFLECTIONFALLOFF=0<this.reflectionFalloffDistance,this._reflectionControls.x=this.reflectionAmount,this._reflectionControls.y=this.reflectionReflectance0,this._reflectionControls.z=this.reflectionReflectance90,this._reflectionControls.w=1/this.reflectionFalloffDistance):(o.REFLECTIONFRESNEL=!1,o.REFLECTIONFALLOFF=!1)}else o.REFLECTION=!1,o.REFLECTIONFRESNEL=!1,o.REFLECTIONFALLOFF=!1,o.REFLECTIONBLUR=!1,o.REFLECTIONMAP_3D=!1,o.REFLECTIONMAP_SPHERICAL=!1,o.REFLECTIONMAP_PLANAR=!1,o.REFLECTIONMAP_CUBIC=!1,o.REFLECTIONMAP_PROJECTION=!1,o.REFLECTIONMAP_SKYBOX=!1,o.REFLECTIONMAP_SKYBOX_TRANSFORMED=!1,o.REFLECTIONMAP_EXPLICIT=!1,o.REFLECTIONMAP_EQUIRECTANGULAR=!1,o.REFLECTIONMAP_EQUIRECTANGULAR_FIXED=!1,o.REFLECTIONMAP_MIRROREDEQUIRECTANGULAR_FIXED=!1,o.INVERTCUBICMAP=!1,o.REFLECTIONMAP_OPPOSITEZ=!1,o.LODINREFLECTIONALPHA=!1,o.GAMMAREFLECTION=!1,o.RGBDREFLECTION=!1}o.PREMULTIPLYALPHA=this.alphaMode===La.Engine.ALPHA_PREMULTIPLIED||this.alphaMode===La.Engine.ALPHA_PREMULTIPLIED_PORTERDUFF,o.USERGBCOLOR=this._useRGBColor,o.NOISE=this._enableNoise}if(o._areLightsDirty&&(o.USEHIGHLIGHTANDSHADOWCOLORS=!this._useRGBColor&&(0!==this._primaryColorShadowLevel||0!==this._primaryColorHighlightLevel)),o._areImageProcessingDirty&&this._imageProcessingConfiguration){if(!this._imageProcessingConfiguration.isReady())return!1;this._imageProcessingConfiguration.prepareDefines(o)}if(La.MaterialHelper.PrepareDefinesForMisc(e,n,!1,this.pointsCloud,this.fogEnabled,this._shouldTurnAlphaTestOn(e),o),La.MaterialHelper.PrepareDefinesForFrameBoundValues(n,s,o,i),La.MaterialHelper.PrepareDefinesForAttributes(e,o,!1,!0,!1)&&e&&(n.getEngine().getCaps().standardDerivatives||e.isVerticesDataPresent(La.VertexBuffer.NormalKind)||(e.createNormals(!0),La.Tools.Warn(\"BackgroundMaterial: Normals have been created for the mesh: \"+e.name))),o.isDirty){o.markAsProcessed(),n.resetCachedMaterial();var l=new La.EffectFallbacks;o.FOG&&l.addFallback(0,\"FOG\"),o.POINTSIZE&&l.addFallback(1,\"POINTSIZE\"),La.MaterialHelper.HandleFallbacksForShadows(o,l,this._maxSimultaneousLights),0<o.NUM_BONE_INFLUENCERS&&l.addCPUSkinningFallback(0,e);var c=[La.VertexBuffer.PositionKind];o.NORMAL&&c.push(La.VertexBuffer.NormalKind),o.UV1&&c.push(La.VertexBuffer.UVKind),o.UV2&&c.push(La.VertexBuffer.UV2Kind),La.MaterialHelper.PrepareAttributesForBones(c,e,o,l),La.MaterialHelper.PrepareAttributesForInstances(c,o);var h=[\"world\",\"view\",\"viewProjection\",\"vEyePosition\",\"vLightsType\",\"vFogInfos\",\"vFogColor\",\"pointSize\",\"vClipPlane\",\"vClipPlane2\",\"vClipPlane3\",\"vClipPlane4\",\"mBones\",\"vPrimaryColor\",\"vPrimaryColorShadow\",\"vReflectionInfos\",\"reflectionMatrix\",\"vReflectionMicrosurfaceInfos\",\"fFovMultiplier\",\"shadowLevel\",\"alpha\",\"vBackgroundCenter\",\"vReflectionControl\",\"vDiffuseInfos\",\"diffuseMatrix\"],u=[\"diffuseSampler\",\"reflectionSampler\",\"reflectionSamplerLow\",\"reflectionSamplerHigh\"],d=[\"Material\",\"Scene\"];La.ImageProcessingConfiguration&&(La.ImageProcessingConfiguration.PrepareUniforms(h,o),La.ImageProcessingConfiguration.PrepareSamplers(u,o)),La.MaterialHelper.PrepareUniformsAndSamplersList({uniformsNames:h,uniformBuffersNames:d,samplers:u,defines:o,maxSimultaneousLights:this._maxSimultaneousLights});var f=o.toString();t.setEffect(n.getEngine().createEffect(\"background\",{attributes:c,uniformsNames:h,uniformBuffersNames:d,samplers:u,defines:f,fallbacks:l,onCompiled:function(e){r.onCompiled&&r.onCompiled(e),r.bindSceneUniformBuffer(e,n.getSceneUniformBuffer())},onError:this.onError,indexParameters:{maxSimultaneousLights:this._maxSimultaneousLights}},s),o),this.buildUniformLayout()}return!(!t.effect||!t.effect.isReady())&&(o._renderId=n.getRenderId(),this._wasPreviouslyReady=!0)},n.prototype._computePrimaryColorFromPerceptualColor=function(){this.__perceptualColor&&(this._primaryColor.copyFrom(this.__perceptualColor),this._primaryColor.toLinearSpaceToRef(this._primaryColor),this._imageProcessingConfiguration&&this._primaryColor.scaleToRef(1/this._imageProcessingConfiguration.exposure,this._primaryColor),this._computePrimaryColors())},n.prototype._computePrimaryColors=function(){0===this._primaryColorShadowLevel&&0===this._primaryColorHighlightLevel||(this._primaryColor.scaleToRef(this._primaryColorShadowLevel,this._primaryShadowColor),this._primaryColor.subtractToRef(this._primaryShadowColor,this._primaryShadowColor),this._white.subtractToRef(this._primaryColor,this._primaryHighlightColor),this._primaryHighlightColor.scaleToRef(this._primaryColorHighlightLevel,this._primaryHighlightColor),this._primaryColor.addToRef(this._primaryHighlightColor,this._primaryHighlightColor))},n.prototype.buildUniformLayout=function(){this._uniformBuffer.addUniform(\"vPrimaryColor\",4),this._uniformBuffer.addUniform(\"vPrimaryColorShadow\",4),this._uniformBuffer.addUniform(\"vDiffuseInfos\",2),this._uniformBuffer.addUniform(\"vReflectionInfos\",2),this._uniformBuffer.addUniform(\"diffuseMatrix\",16),this._uniformBuffer.addUniform(\"reflectionMatrix\",16),this._uniformBuffer.addUniform(\"vReflectionMicrosurfaceInfos\",3),this._uniformBuffer.addUniform(\"fFovMultiplier\",1),this._uniformBuffer.addUniform(\"pointSize\",1),this._uniformBuffer.addUniform(\"shadowLevel\",1),this._uniformBuffer.addUniform(\"alpha\",1),this._uniformBuffer.addUniform(\"vBackgroundCenter\",3),this._uniformBuffer.addUniform(\"vReflectionControl\",4),this._uniformBuffer.create()},n.prototype.unbind=function(){this._diffuseTexture&&this._diffuseTexture.isRenderTarget&&this._uniformBuffer.setTexture(\"diffuseSampler\",null),this._reflectionTexture&&this._reflectionTexture.isRenderTarget&&this._uniformBuffer.setTexture(\"reflectionSampler\",null),r.prototype.unbind.call(this)},n.prototype.bindOnlyWorldMatrix=function(e){this._activeEffect.setMatrix(\"world\",e)},n.prototype.bindForSubMesh=function(e,t,i){var r=this.getScene(),n=i._materialDefines;if(n){var o=i.effect;if(o){this._activeEffect=o,this.bindOnlyWorldMatrix(e),La.MaterialHelper.BindBonesParameters(t,this._activeEffect);var s=this._mustRebind(r,o,t.visibility);if(s){this._uniformBuffer.bindToEffect(o,\"Material\"),this.bindViewProjection(o);var a=this._reflectionTexture;this._uniformBuffer.useUbo&&this.isFrozen&&this._uniformBuffer.isSync||(r.texturesEnabled&&(this._diffuseTexture&&La.StandardMaterial.DiffuseTextureEnabled&&(this._uniformBuffer.updateFloat2(\"vDiffuseInfos\",this._diffuseTexture.coordinatesIndex,this._diffuseTexture.level),La.MaterialHelper.BindTextureMatrix(this._diffuseTexture,this._uniformBuffer,\"diffuse\")),a&&La.StandardMaterial.ReflectionTextureEnabled&&(this._uniformBuffer.updateMatrix(\"reflectionMatrix\",a.getReflectionTextureMatrix()),this._uniformBuffer.updateFloat2(\"vReflectionInfos\",a.level,this._reflectionBlur),this._uniformBuffer.updateFloat3(\"vReflectionMicrosurfaceInfos\",a.getSize().width,a.lodGenerationScale,a.lodGenerationOffset))),0<this.shadowLevel&&this._uniformBuffer.updateFloat(\"shadowLevel\",this.shadowLevel),this._uniformBuffer.updateFloat(\"alpha\",this.alpha),this.pointsCloud&&this._uniformBuffer.updateFloat(\"pointSize\",this.pointSize),n.USEHIGHLIGHTANDSHADOWCOLORS?(this._uniformBuffer.updateColor4(\"vPrimaryColor\",this._primaryHighlightColor,1),this._uniformBuffer.updateColor4(\"vPrimaryColorShadow\",this._primaryShadowColor,1)):this._uniformBuffer.updateColor4(\"vPrimaryColor\",this._primaryColor,1)),this._uniformBuffer.updateFloat(\"fFovMultiplier\",this._fovMultiplier),r.texturesEnabled&&(this._diffuseTexture&&La.StandardMaterial.DiffuseTextureEnabled&&this._uniformBuffer.setTexture(\"diffuseSampler\",this._diffuseTexture),a&&La.StandardMaterial.ReflectionTextureEnabled&&(n.REFLECTIONBLUR&&n.TEXTURELODSUPPORT?this._uniformBuffer.setTexture(\"reflectionSampler\",a):n.REFLECTIONBLUR?(this._uniformBuffer.setTexture(\"reflectionSampler\",a._lodTextureMid||a),this._uniformBuffer.setTexture(\"reflectionSamplerLow\",a._lodTextureLow||a),this._uniformBuffer.setTexture(\"reflectionSamplerHigh\",a._lodTextureHigh||a)):this._uniformBuffer.setTexture(\"reflectionSampler\",a),n.REFLECTIONFRESNEL&&(this._uniformBuffer.updateFloat3(\"vBackgroundCenter\",this.sceneCenter.x,this.sceneCenter.y,this.sceneCenter.z),this._uniformBuffer.updateFloat4(\"vReflectionControl\",this._reflectionControls.x,this._reflectionControls.y,this._reflectionControls.z,this._reflectionControls.w)))),La.MaterialHelper.BindClipPlane(this._activeEffect,r),La.MaterialHelper.BindEyePosition(o,r)}!s&&this.isFrozen||(r.lightsEnabled&&La.MaterialHelper.BindLights(r,t,this._activeEffect,n,this._maxSimultaneousLights,!1),this.bindView(o),La.MaterialHelper.BindFogParameters(r,t,this._activeEffect,!0),this._imageProcessingConfiguration&&this._imageProcessingConfiguration.bind(this._activeEffect)),this._uniformBuffer.update(),this._afterBind(t,this._activeEffect)}}},n.prototype.dispose=function(e,t){void 0===e&&(e=!1),void 0===t&&(t=!1),t&&(this.diffuseTexture&&this.diffuseTexture.dispose(),this.reflectionTexture&&this.reflectionTexture.dispose()),this._renderTargets.dispose(),this._imageProcessingConfiguration&&this._imageProcessingObserver&&this._imageProcessingConfiguration.onUpdateParameters.remove(this._imageProcessingObserver),r.prototype.dispose.call(this,e)},n.prototype.clone=function(e){var t=this;return La.SerializationHelper.Clone((function(){return new n(e,t.getScene())}),this)},n.prototype.serialize=function(){var e=La.SerializationHelper.Serialize(this);return e.customType=\"BABYLON.BackgroundMaterial\",e},n.prototype.getClassName=function(){return\"BackgroundMaterial\"},n.Parse=function(e,t,i){return La.SerializationHelper.Parse((function(){return new n(e.name,t)}),e,t,i)},n.StandardReflectance0=.05,n.StandardReflectance90=.5,b([La.serializeAsColor3()],n.prototype,\"_primaryColor\",void 0),b([La.expandToProperty(\"_markAllSubMeshesAsLightsDirty\")],n.prototype,\"primaryColor\",void 0),b([La.serializeAsColor3()],n.prototype,\"__perceptualColor\",void 0),b([La.serialize()],n.prototype,\"_primaryColorShadowLevel\",void 0),b([La.serialize()],n.prototype,\"_primaryColorHighlightLevel\",void 0),b([La.expandToProperty(\"_markAllSubMeshesAsLightsDirty\")],n.prototype,\"primaryColorHighlightLevel\",null),b([La.serializeAsTexture()],n.prototype,\"_reflectionTexture\",void 0),b([La.expandToProperty(\"_markAllSubMeshesAsTexturesDirty\")],n.prototype,\"reflectionTexture\",void 0),b([La.serialize()],n.prototype,\"_reflectionBlur\",void 0),b([La.expandToProperty(\"_markAllSubMeshesAsTexturesDirty\")],n.prototype,\"reflectionBlur\",void 0),b([La.serializeAsTexture()],n.prototype,\"_diffuseTexture\",void 0),b([La.expandToProperty(\"_markAllSubMeshesAsTexturesDirty\")],n.prototype,\"diffuseTexture\",void 0),b([La.expandToProperty(\"_markAllSubMeshesAsTexturesDirty\")],n.prototype,\"shadowLights\",void 0),b([La.serialize()],n.prototype,\"_shadowLevel\",void 0),b([La.expandToProperty(\"_markAllSubMeshesAsTexturesDirty\")],n.prototype,\"shadowLevel\",void 0),b([La.serializeAsVector3()],n.prototype,\"_sceneCenter\",void 0),b([La.expandToProperty(\"_markAllSubMeshesAsTexturesDirty\")],n.prototype,\"sceneCenter\",void 0),b([La.serialize()],n.prototype,\"_opacityFresnel\",void 0),b([La.expandToProperty(\"_markAllSubMeshesAsTexturesDirty\")],n.prototype,\"opacityFresnel\",void 0),b([La.serialize()],n.prototype,\"_reflectionFresnel\",void 0),b([La.expandToProperty(\"_markAllSubMeshesAsTexturesDirty\")],n.prototype,\"reflectionFresnel\",void 0),b([La.serialize()],n.prototype,\"_reflectionFalloffDistance\",void 0),b([La.expandToProperty(\"_markAllSubMeshesAsTexturesDirty\")],n.prototype,\"reflectionFalloffDistance\",void 0),b([La.serialize()],n.prototype,\"_reflectionAmount\",void 0),b([La.expandToProperty(\"_markAllSubMeshesAsTexturesDirty\")],n.prototype,\"reflectionAmount\",void 0),b([La.serialize()],n.prototype,\"_reflectionReflectance0\",void 0),b([La.expandToProperty(\"_markAllSubMeshesAsTexturesDirty\")],n.prototype,\"reflectionReflectance0\",void 0),b([La.serialize()],n.prototype,\"_reflectionReflectance90\",void 0),b([La.expandToProperty(\"_markAllSubMeshesAsTexturesDirty\")],n.prototype,\"reflectionReflectance90\",void 0),b([La.serialize()],n.prototype,\"_useRGBColor\",void 0),b([La.expandToProperty(\"_markAllSubMeshesAsTexturesDirty\")],n.prototype,\"useRGBColor\",void 0),b([La.serialize()],n.prototype,\"_enableNoise\",void 0),b([La.expandToProperty(\"_markAllSubMeshesAsTexturesDirty\")],n.prototype,\"enableNoise\",void 0),b([La.serialize()],n.prototype,\"_maxSimultaneousLights\",void 0),b([La.expandToProperty(\"_markAllSubMeshesAsTexturesDirty\")],n.prototype,\"maxSimultaneousLights\",void 0),b([La.serializeAsImageProcessingConfiguration()],n.prototype,\"_imageProcessingConfiguration\",void 0),n})(La.PushMaterial),La.BackgroundMaterial=Ba;var Na,Va,Ua,za,Ga,ka,Wa,Ha,Xa,ja,Ya,Ka,Qa,Za;ae=this&&this.__assign||function(){return(ae=Object.assign||function(e){for(var t,i=1,r=arguments.length;i<r;i++)for(var n in t=arguments[i])Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e}).apply(this,arguments)};Na=$a||($a={}),Va=(function(){function r(e,t){var i=this;this._errorHandler=function(e,t){i.onErrorObservable.notifyObservers({message:e,exception:t})},this._options=ae({},r._getDefaultOptions(),e),this._scene=t,this.onErrorObservable=new Na.Observable,this._setupBackground(),this._setupImageProcessing()}return r._getDefaultOptions=function(){return{createGround:!0,groundSize:15,groundTexture:this._groundTextureCDNUrl,groundColor:new Na.Color3(.2,.2,.3).toLinearSpace().scale(3),groundOpacity:.9,enableGroundShadow:!0,groundShadowLevel:.5,enableGroundMirror:!1,groundMirrorSizeRatio:.3,groundMirrorBlurKernel:64,groundMirrorAmount:1,groundMirrorFresnelWeight:1,groundMirrorFallOffDistance:0,groundMirrorTextureType:Na.Engine.TEXTURETYPE_UNSIGNED_INT,groundYBias:1e-5,createSkybox:!0,skyboxSize:20,skyboxTexture:this._skyboxTextureCDNUrl,skyboxColor:new Na.Color3(.2,.2,.3).toLinearSpace().scale(3),backgroundYRotation:0,sizeAuto:!0,rootPosition:Na.Vector3.Zero(),setupImageProcessing:!0,environmentTexture:this._environmentTextureCDNUrl,cameraExposure:.8,cameraContrast:1.2,toneMappingEnabled:!0}},Object.defineProperty(r.prototype,\"rootMesh\",{get:function(){return this._rootMesh},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,\"skybox\",{get:function(){return this._skybox},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,\"skyboxTexture\",{get:function(){return this._skyboxTexture},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,\"skyboxMaterial\",{get:function(){return this._skyboxMaterial},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,\"ground\",{get:function(){return this._ground},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,\"groundTexture\",{get:function(){return this._groundTexture},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,\"groundMirror\",{get:function(){return this._groundMirror},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,\"groundMirrorRenderList\",{get:function(){return this._groundMirror?this._groundMirror.renderList:null},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,\"groundMaterial\",{get:function(){return this._groundMaterial},enumerable:!0,configurable:!0}),r.prototype.updateOptions=function(e){var t=ae({},this._options,e);this._ground&&!t.createGround&&(this._ground.dispose(),this._ground=null),this._groundMaterial&&!t.createGround&&(this._groundMaterial.dispose(),this._groundMaterial=null),this._groundTexture&&this._options.groundTexture!=t.groundTexture&&(this._groundTexture.dispose(),this._groundTexture=null),this._skybox&&!t.createSkybox&&(this._skybox.dispose(),this._skybox=null),this._skyboxMaterial&&!t.createSkybox&&(this._skyboxMaterial.dispose(),this._skyboxMaterial=null),this._skyboxTexture&&this._options.skyboxTexture!=t.skyboxTexture&&(this._skyboxTexture.dispose(),this._skyboxTexture=null),this._groundMirror&&!t.enableGroundMirror&&(this._groundMirror.dispose(),this._groundMirror=null),this._scene.environmentTexture&&this._options.environmentTexture!=t.environmentTexture&&this._scene.environmentTexture.dispose(),this._options=t,this._setupBackground(),this._setupImageProcessing()},r.prototype.setMainColor=function(e){this.groundMaterial&&(this.groundMaterial.primaryColor=e),this.skyboxMaterial&&(this.skyboxMaterial.primaryColor=e),this.groundMirror&&(this.groundMirror.clearColor=new Na.Color4(e.r,e.g,e.b,1))},r.prototype._setupImageProcessing=function(){this._options.setupImageProcessing&&(this._scene.imageProcessingConfiguration.contrast=this._options.cameraContrast,this._scene.imageProcessingConfiguration.exposure=this._options.cameraExposure,this._scene.imageProcessingConfiguration.toneMappingEnabled=this._options.toneMappingEnabled,this._setupEnvironmentTexture())},r.prototype._setupEnvironmentTexture=function(){if(!this._scene.environmentTexture)if(this._options.environmentTexture instanceof Na.BaseTexture)this._scene.environmentTexture=this._options.environmentTexture;else{var e=Na.CubeTexture.CreateFromPrefilteredData(this._options.environmentTexture,this._scene);this._scene.environmentTexture=e}},r.prototype._setupBackground=function(){this._rootMesh||(this._rootMesh=new Na.Mesh(\"BackgroundHelper\",this._scene)),this._rootMesh.rotation.y=this._options.backgroundYRotation;var e=this._getSceneSize();this._options.createGround&&(this._setupGround(e),this._setupGroundMaterial(),this._setupGroundDiffuseTexture(),this._options.enableGroundMirror&&this._setupGroundMirrorTexture(e),this._setupMirrorInGroundMaterial()),this._options.createSkybox&&(this._setupSkybox(e),this._setupSkyboxMaterial(),this._setupSkyboxReflectionTexture()),this._rootMesh.position.x=e.rootPosition.x,this._rootMesh.position.z=e.rootPosition.z,this._rootMesh.position.y=e.rootPosition.y},r.prototype._getSceneSize=function(){var t=this,e=this._options.groundSize,i=this._options.skyboxSize,r=this._options.rootPosition;if(!this._scene.meshes||1===this._scene.meshes.length)return{groundSize:e,skyboxSize:i,rootPosition:r};var n=this._scene.getWorldExtends((function(e){return e!==t._ground&&e!==t._rootMesh&&e!==t._skybox})),o=n.max.subtract(n.min);if(this._options.sizeAuto){this._scene.activeCamera instanceof Na.ArcRotateCamera&&this._scene.activeCamera.upperRadiusLimit&&(i=e=2*this._scene.activeCamera.upperRadiusLimit);var s=o.length();e<s&&(i=e=2*s),e*=1.1,i*=1.5,(r=n.min.add(o.scale(.5))).y=n.min.y-this._options.groundYBias}return{groundSize:e,skyboxSize:i,rootPosition:r}},r.prototype._setupGround=function(e){var t=this;this._ground&&!this._ground.isDisposed()||(this._ground=Na.Mesh.CreatePlane(\"BackgroundPlane\",e.groundSize,this._scene),this._ground.rotation.x=Math.PI/2,this._ground.parent=this._rootMesh,this._ground.onDisposeObservable.add((function(){t._ground=null}))),this._ground.receiveShadows=this._options.enableGroundShadow},r.prototype._setupGroundMaterial=function(){this._groundMaterial||(this._groundMaterial=new Na.BackgroundMaterial(\"BackgroundPlaneMaterial\",this._scene)),this._groundMaterial.alpha=this._options.groundOpacity,this._groundMaterial.alphaMode=Na.Engine.ALPHA_PREMULTIPLIED_PORTERDUFF,this._groundMaterial.shadowLevel=this._options.groundShadowLevel,this._groundMaterial.primaryColor=this._options.groundColor,this._groundMaterial.useRGBColor=!1,this._groundMaterial.enableNoise=!0,this._ground&&(this._ground.material=this._groundMaterial)},r.prototype._setupGroundDiffuseTexture=function(){if(this._groundMaterial&&!this._groundTexture)if(this._options.groundTexture instanceof Na.BaseTexture)this._groundMaterial.diffuseTexture=this._options.groundTexture;else{var e=new Na.Texture(this._options.groundTexture,this._scene,void 0,void 0,void 0,void 0,this._errorHandler);e.gammaSpace=!1,e.hasAlpha=!0,this._groundMaterial.diffuseTexture=e}},r.prototype._setupGroundMirrorTexture=function(e){var t=Na.Texture.CLAMP_ADDRESSMODE;if(!this._groundMirror&&(this._groundMirror=new Na.MirrorTexture(\"BackgroundPlaneMirrorTexture\",{ratio:this._options.groundMirrorSizeRatio},this._scene,!1,this._options.groundMirrorTextureType,Na.Texture.BILINEAR_SAMPLINGMODE,!0),this._groundMirror.mirrorPlane=new Na.Plane(0,-1,0,e.rootPosition.y),this._groundMirror.anisotropicFilteringLevel=1,this._groundMirror.wrapU=t,this._groundMirror.wrapV=t,this._groundMirror.gammaSpace=!1,this._groundMirror.renderList))for(var i=0;i<this._scene.meshes.length;i++){var r=this._scene.meshes[i];r!==this._ground&&r!==this._skybox&&r!==this._rootMesh&&this._groundMirror.renderList.push(r)}this._groundMirror.clearColor=new Na.Color4(this._options.groundColor.r,this._options.groundColor.g,this._options.groundColor.b,1),this._groundMirror.adaptiveBlurKernel=this._options.groundMirrorBlurKernel},r.prototype._setupMirrorInGroundMaterial=function(){this._groundMaterial&&(this._groundMaterial.reflectionTexture=this._groundMirror,this._groundMaterial.reflectionFresnel=!0,this._groundMaterial.reflectionAmount=this._options.groundMirrorAmount,this._groundMaterial.reflectionStandardFresnelWeight=this._options.groundMirrorFresnelWeight,this._groundMaterial.reflectionFalloffDistance=this._options.groundMirrorFallOffDistance)},r.prototype._setupSkybox=function(e){var t=this;this._skybox&&!this._skybox.isDisposed()||(this._skybox=Na.Mesh.CreateBox(\"BackgroundSkybox\",e.skyboxSize,this._scene,void 0,Na.Mesh.BACKSIDE),this._skybox.onDisposeObservable.add((function(){t._skybox=null}))),this._skybox.parent=this._rootMesh},r.prototype._setupSkyboxMaterial=function(){this._skybox&&(this._skyboxMaterial||(this._skyboxMaterial=new Na.BackgroundMaterial(\"BackgroundSkyboxMaterial\",this._scene)),this._skyboxMaterial.useRGBColor=!1,this._skyboxMaterial.primaryColor=this._options.skyboxColor,this._skyboxMaterial.enableNoise=!0,this._skybox.material=this._skyboxMaterial)},r.prototype._setupSkyboxReflectionTexture=function(){this._skyboxMaterial&&(this._skyboxTexture||(this._options.skyboxTexture instanceof Na.BaseTexture?this._skyboxMaterial.reflectionTexture=this._options.skyboxTexture:(this._skyboxTexture=new Na.CubeTexture(this._options.skyboxTexture,this._scene,void 0,void 0,void 0,void 0,this._errorHandler),this._skyboxTexture.coordinatesMode=Na.Texture.SKYBOX_MODE,this._skyboxTexture.gammaSpace=!1,this._skyboxMaterial.reflectionTexture=this._skyboxTexture)))},r.prototype.dispose=function(){this._groundMaterial&&this._groundMaterial.dispose(!0,!0),this._skyboxMaterial&&this._skyboxMaterial.dispose(!0,!0),this._rootMesh.dispose(!1)},r._groundTextureCDNUrl=\"https://assets.babylonjs.com/environments/backgroundGround.png\",r._skyboxTextureCDNUrl=\"https://assets.babylonjs.com/environments/backgroundSkybox.dds\",r._environmentTextureCDNUrl=\"https://assets.babylonjs.com/environments/environmentSpecular.env\",r})(),Na.EnvironmentHelper=Va,Ua=$a||($a={}),za=(function(){function c(){this.systems=new Array}return Object.defineProperty(c.prototype,\"emitterNode\",{get:function(){return this._emitterNode},enumerable:!0,configurable:!0}),c.prototype.setEmitterAsSphere=function(e,t,i){this._emitterNode&&this._emitterNode.dispose(),this._emitterCreationOptions={kind:\"Sphere\",options:e,renderingGroupId:t};var r=Ua.MeshBuilder.CreateSphere(\"emitterSphere\",{diameter:e.diameter,segments:e.segments},i);r.renderingGroupId=t;var n=new Ua.StandardMaterial(\"emitterSphereMaterial\",i);n.emissiveColor=e.color,r.material=n;for(var o=0,s=this.systems;o<s.length;o++){s[o].emitter=r}this._emitterNode=r},c.prototype.start=function(e){for(var t=0,i=this.systems;t<i.length;t++){var r=i[t];e&&(r.emitter=e),r.start()}},c.prototype.dispose=function(){for(var e=0,t=this.systems;e<t.length;e++){t[e].dispose()}this.systems=[],this._emitterNode&&(this._emitterNode.dispose(),this._emitterNode=null)},c.prototype.serialize=function(){for(var e={systems:[]},t=0,i=this.systems;t<i.length;t++){var r=i[t];e.systems.push(r.serialize())}return this._emitterNode&&(e.emitter=this._emitterCreationOptions),e},c.Parse=function(e,t,i){void 0===i&&(i=!1);var r=new c,n=Ua.ParticleHelper.BaseAssetsUrl+\"/textures/\";t=t||Ua.Engine.LastCreatedScene;for(var o=0,s=e.systems;o<s.length;o++){var a=s[o];r.systems.push(i?Ua.GPUParticleSystem.Parse(a,t,n,!0):Ua.ParticleSystem.Parse(a,t,n,!0))}if(e.emitter){var l=e.emitter.options;switch(e.emitter.kind){case\"Sphere\":r.setEmitterAsSphere({diameter:l.diameter,segments:l.segments,color:Ua.Color3.FromArray(l.color)},e.emitter.renderingGroupId,t)}}return r},c})(),Ua.ParticleSystemSet=za,Ga=$a||($a={}),ka=(function(){function e(){}return e.CreateDefault=function(e,t,i,r){var n;return void 0===t&&(t=500),void 0===r&&(r=!1),(n=r?new Ga.GPUParticleSystem(\"default system\",{capacity:t},i):new Ga.ParticleSystem(\"default system\",t,i)).emitter=e,n.particleTexture=new Ga.Texture(\"https://www.babylonjs.com/assets/Flare.png\",n.getScene()),n.createConeEmitter(.1,Math.PI/4),n.color1=new Ga.Color4(1,1,1,1),n.color2=new Ga.Color4(1,1,1,1),n.colorDead=new Ga.Color4(1,1,1,0),n.minSize=.1,n.maxSize=.1,n.minEmitPower=2,n.maxEmitPower=2,n.updateSpeed=1/60,n.emitRate=30,n},e.CreateAsync=function(n,o,s){void 0===s&&(s=!1),o||(o=Ga.Engine.LastCreatedScene);var a={};return o._addPendingData(a),new Promise(function(r,i){if(s&&!Ga.GPUParticleSystem.IsSupported)return o._removePendingData(a),i(\"Particle system with GPU is not supported.\");Ga.Tools.LoadFile(e.BaseAssetsUrl+\"/systems/\"+n+\".json\",(function(e,t){o._removePendingData(a);var i=JSON.parse(e.toString());return r(Ga.ParticleSystemSet.Parse(i,o,s))}),void 0,void 0,void 0,(function(e,t){return o._removePendingData(a),i(\"An error occured while the creation of your particle system. Check if your type '\"+n+\"' exists.\")}))})},e.ExportSet=function(e){for(var t=new Ga.ParticleSystemSet,i=0,r=e;i<r.length;i++){var n=r[i];t.systems.push(n)}return t},e.BaseAssetsUrl=\"https://assets.babylonjs.com/particles\",e})(),Ga.ParticleHelper=ka,Wa=$a||($a={}),Ha=(function(l){function e(e,t,i,r){var n=l.call(this,e,r)||this;n._useDirectMapping=!1,e=e||\"videoDome\",i.resolution=0|Math.abs(i.resolution)||32,i.clickToPlay=Boolean(i.clickToPlay),i.autoPlay=void 0===i.autoPlay||Boolean(i.autoPlay),i.loop=void 0===i.loop||Boolean(i.loop),i.size=Math.abs(i.size)||(r.activeCamera?.48*r.activeCamera.maxZ:1e3),void 0===i.useDirectMapping?n._useDirectMapping=!0:n._useDirectMapping=i.useDirectMapping,n._setReady(!1);var o={loop:i.loop,autoPlay:i.autoPlay,autoUpdateTexture:!0,poster:i.poster},s=n._material=new Wa.BackgroundMaterial(e+\"_material\",r),a=n._videoTexture=new Wa.VideoTexture(e+\"_texture\",t,r,!1,n._useDirectMapping,Wa.Texture.TRILINEAR_SAMPLINGMODE,o);return n._mesh=Wa.Mesh.CreateSphere(e+\"_mesh\",i.resolution,i.size,r,!1,Wa.Mesh.BACKSIDE),a.onLoadObservable.addOnce((function(){n._setReady(!0)})),s.useEquirectangularFOV=!0,s.fovMultiplier=1,s.opacityFresnel=!1,n._useDirectMapping?(a.wrapU=Wa.Texture.CLAMP_ADDRESSMODE,a.wrapV=Wa.Texture.CLAMP_ADDRESSMODE,s.diffuseTexture=a):(a.coordinatesMode=Wa.Texture.FIXED_EQUIRECTANGULAR_MIRRORED_MODE,a.wrapV=Wa.Texture.CLAMP_ADDRESSMODE,s.reflectionTexture=a),n._mesh.material=s,n._mesh.parent=n,i.clickToPlay&&(r.onPointerUp=function(){n._videoTexture.video.play()}),n}return T(e,l),Object.defineProperty(e.prototype,\"videoTexture\",{get:function(){return this._videoTexture},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,\"fovMultiplier\",{get:function(){return this._material.fovMultiplier},set:function(e){this._material.fovMultiplier=e},enumerable:!0,configurable:!0}),e.prototype.dispose=function(e,t){void 0===t&&(t=!1),this._videoTexture.dispose(),this._mesh.dispose(),this._material.dispose(),l.prototype.dispose.call(this,e,t)},e})(Wa.TransformNode),Wa.VideoDome=Ha,Xa=$a||($a={}),ja=(function(a){function e(e,t,i,r,n){void 0===n&&(n=null);var o=a.call(this,e,r)||this;o._useDirectMapping=!1,o.onLoadErrorObservable=new Xa.Observable,e=e||\"photoDome\",i.resolution=0|Math.abs(i.resolution)||32,i.size=Math.abs(i.size)||(r.activeCamera?.48*r.activeCamera.maxZ:1e3),void 0===i.useDirectMapping?o._useDirectMapping=!0:o._useDirectMapping=i.useDirectMapping,o._setReady(!1);var s=o._material=new Xa.BackgroundMaterial(e+\"_material\",r);return o._mesh=Xa.Mesh.CreateSphere(e+\"_mesh\",i.resolution,i.size,r,!1,Xa.Mesh.BACKSIDE),s.opacityFresnel=!1,s.useEquirectangularFOV=!0,s.fovMultiplier=1,o.photoTexture=new Xa.Texture(t,r,!0,!o._useDirectMapping,void 0,void 0,function(e,t){o.onLoadErrorObservable.notifyObservers(e||\"Unknown error occured\"),n&&n(e,t)}),o.photoTexture.onLoadObservable.addOnce((function(){o._setReady(!0)})),o._mesh.material=s,o._mesh.parent=o}return T(e,a),Object.defineProperty(e.prototype,\"photoTexture\",{get:function(){return this._photoTexture},set:function(e){this._photoTexture!==e&&(this._photoTexture=e,this._useDirectMapping?(this._photoTexture.wrapU=Xa.Texture.CLAMP_ADDRESSMODE,this._photoTexture.wrapV=Xa.Texture.CLAMP_ADDRESSMODE,this._material.diffuseTexture=this._photoTexture):(this._photoTexture.coordinatesMode=Xa.Texture.FIXED_EQUIRECTANGULAR_MIRRORED_MODE,this._photoTexture.wrapV=Xa.Texture.CLAMP_ADDRESSMODE,this._material.reflectionTexture=this._photoTexture))},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,\"fovMultiplier\",{get:function(){return this._material.fovMultiplier},set:function(e){this._material.fovMultiplier=e},enumerable:!0,configurable:!0}),e.prototype.dispose=function(e,t){void 0===t&&(t=!1),this._photoTexture.dispose(),this._mesh.dispose(),this._material.dispose(),this.onLoadErrorObservable.clear(),a.prototype.dispose.call(this,e,t)},e})(Xa.TransformNode),Xa.PhotoDome=ja,Ya=$a||($a={}),Ka=function(){this.occlusionInternalRetryCounter=0,this.isOcclusionQueryInProgress=!1,this.isOccluded=!1,this.occlusionRetryCount=-1,this.occlusionType=Ya.AbstractMesh.OCCLUSION_TYPE_NONE,this.occlusionQueryAlgorithmType=Ya.AbstractMesh.OCCLUSION_ALGORITHM_TYPE_CONSERVATIVE},Ya.Engine.prototype.createQuery=function(){return this._gl.createQuery()},Ya.Engine.prototype.deleteQuery=function(e){return this._gl.deleteQuery(e),this},Ya.Engine.prototype.isQueryResultAvailable=function(e){return this._gl.getQueryParameter(e,this._gl.QUERY_RESULT_AVAILABLE)},Ya.Engine.prototype.getQueryResult=function(e){return this._gl.getQueryParameter(e,this._gl.QUERY_RESULT)},Ya.Engine.prototype.beginOcclusionQuery=function(e,t){var i=this._getGlAlgorithmType(e);return this._gl.beginQuery(i,t),this},Ya.Engine.prototype.endOcclusionQuery=function(e){var t=this._getGlAlgorithmType(e);return this._gl.endQuery(t),this},Ya.Engine.prototype._createTimeQuery=function(){var e=this.getCaps().timerQuery;return e.createQueryEXT?e.createQueryEXT():this.createQuery()},Ya.Engine.prototype._deleteTimeQuery=function(e){var t=this.getCaps().timerQuery;t.deleteQueryEXT?t.deleteQueryEXT(e):this.deleteQuery(e)},Ya.Engine.prototype._getTimeQueryResult=function(e){var t=this.getCaps().timerQuery;return t.getQueryObjectEXT?t.getQueryObjectEXT(e,t.QUERY_RESULT_EXT):this.getQueryResult(e)},Ya.Engine.prototype._getTimeQueryAvailability=function(e){var t=this.getCaps().timerQuery;return t.getQueryObjectEXT?t.getQueryObjectEXT(e,t.QUERY_RESULT_AVAILABLE_EXT):this.isQueryResultAvailable(e)},Ya.Engine.prototype.startTimeQuery=function(){var e=this.getCaps(),t=e.timerQuery;if(!t)return null;var i=new Ya._TimeToken;if(this._gl.getParameter(t.GPU_DISJOINT_EXT),e.canUseTimestampForTimerQuery)i._startTimeQuery=this._createTimeQuery(),t.queryCounterEXT(i._startTimeQuery,t.TIMESTAMP_EXT);else{if(this._currentNonTimestampToken)return this._currentNonTimestampToken;i._timeElapsedQuery=this._createTimeQuery(),t.beginQueryEXT?t.beginQueryEXT(t.TIME_ELAPSED_EXT,i._timeElapsedQuery):this._gl.beginQuery(t.TIME_ELAPSED_EXT,i._timeElapsedQuery),this._currentNonTimestampToken=i}return i},Ya.Engine.prototype.endTimeQuery=function(e){var t=this.getCaps(),i=t.timerQuery;if(!i||!e)return-1;if(t.canUseTimestampForTimerQuery){if(!e._startTimeQuery)return-1;e._endTimeQuery||(e._endTimeQuery=this._createTimeQuery(),i.queryCounterEXT(e._endTimeQuery,i.TIMESTAMP_EXT))}else if(!e._timeElapsedQueryEnded){if(!e._timeElapsedQuery)return-1;i.endQueryEXT?i.endQueryEXT(i.TIME_ELAPSED_EXT):this._gl.endQuery(i.TIME_ELAPSED_EXT),e._timeElapsedQueryEnded=!0}var r=this._gl.getParameter(i.GPU_DISJOINT_EXT),n=!1;if(e._endTimeQuery?n=this._getTimeQueryAvailability(e._endTimeQuery):e._timeElapsedQuery&&(n=this._getTimeQueryAvailability(e._timeElapsedQuery)),n&&!r){var o=0;if(t.canUseTimestampForTimerQuery){if(!e._startTimeQuery||!e._endTimeQuery)return-1;var s=this._getTimeQueryResult(e._startTimeQuery);o=this._getTimeQueryResult(e._endTimeQuery)-s,this._deleteTimeQuery(e._startTimeQuery),this._deleteTimeQuery(e._endTimeQuery),e._startTimeQuery=null,e._endTimeQuery=null}else{if(!e._timeElapsedQuery)return-1;o=this._getTimeQueryResult(e._timeElapsedQuery),this._deleteTimeQuery(e._timeElapsedQuery),e._timeElapsedQuery=null,e._timeElapsedQueryEnded=!1,this._currentNonTimestampToken=null}return o}return-1},Ya.Engine.prototype._getGlAlgorithmType=function(e){return e===Ya.AbstractMesh.OCCLUSION_ALGORITHM_TYPE_CONSERVATIVE?this._gl.ANY_SAMPLES_PASSED_CONSERVATIVE:this._gl.ANY_SAMPLES_PASSED},Object.defineProperty(Ya.AbstractMesh.prototype,\"isOcclusionQueryInProgress\",{get:function(){return this._occlusionDataStorage.isOcclusionQueryInProgress},enumerable:!1,configurable:!0}),Object.defineProperty(Ya.AbstractMesh.prototype,\"_occlusionDataStorage\",{get:function(){return this.__occlusionDataStorage||(this.__occlusionDataStorage=new Ka),this.__occlusionDataStorage},enumerable:!1,configurable:!0}),Object.defineProperty(Ya.AbstractMesh.prototype,\"isOccluded\",{get:function(){return this._occlusionDataStorage.isOccluded},set:function(e){this._occlusionDataStorage.isOccluded=e},enumerable:!0,configurable:!0}),Object.defineProperty(Ya.AbstractMesh.prototype,\"occlusionQueryAlgorithmType\",{get:function(){return this._occlusionDataStorage.occlusionQueryAlgorithmType},set:function(e){this._occlusionDataStorage.occlusionQueryAlgorithmType=e},enumerable:!0,configurable:!0}),Object.defineProperty(Ya.AbstractMesh.prototype,\"occlusionType\",{get:function(){return this._occlusionDataStorage.occlusionType},set:function(e){this._occlusionDataStorage.occlusionType=e},enumerable:!0,configurable:!0}),Object.defineProperty(Ya.AbstractMesh.prototype,\"occlusionRetryCount\",{get:function(){return this._occlusionDataStorage.occlusionRetryCount},set:function(e){this._occlusionDataStorage.occlusionRetryCount=e},enumerable:!0,configurable:!0}),Ya.AbstractMesh.prototype._checkOcclusionQuery=function(){var e=this._occlusionDataStorage;if(e.occlusionType===Ya.AbstractMesh.OCCLUSION_TYPE_NONE)return e.isOccluded=!1;var t=this.getEngine();if(t.webGLVersion<2)return e.isOccluded=!1;if(!t.isQueryResultAvailable)return e.isOccluded=!1;if(this.isOcclusionQueryInProgress&&this._occlusionQuery)if(t.isQueryResultAvailable(this._occlusionQuery)){var i=t.getQueryResult(this._occlusionQuery);e.isOcclusionQueryInProgress=!1,e.occlusionInternalRetryCounter=0,e.isOccluded=1!==i}else{if(e.occlusionInternalRetryCounter++,!(-1!==e.occlusionRetryCount&&e.occlusionInternalRetryCounter>e.occlusionRetryCount))return!1;e.isOcclusionQueryInProgress=!1,e.occlusionInternalRetryCounter=0,e.isOccluded=e.occlusionType!==Ya.AbstractMesh.OCCLUSION_TYPE_OPTIMISTIC&&e.isOccluded}var r=this.getScene();if(r.getBoundingBoxRenderer){var n=r.getBoundingBoxRenderer();this._occlusionQuery||(this._occlusionQuery=t.createQuery()),t.beginOcclusionQuery(e.occlusionQueryAlgorithmType,this._occlusionQuery),n.renderOcclusionBoundingBox(this),t.endOcclusionQuery(e.occlusionQueryAlgorithmType),this._occlusionDataStorage.isOcclusionQueryInProgress=!0}return e.isOccluded},Qa=$a||($a={}),Za=(function(s){function n(e,t,i,r,n){void 0===t&&(t=256),void 0===i&&(i=Qa.Engine.LastCreatedScene);var o=s.call(this,e,t,\"noise\",i,r,n)||this;return o._time=0,o.brightness=.2,o.octaves=3,o.persistence=.8,o.animationSpeedFactor=1,o.autoClear=!1,o._updateShaderUniforms(),o}return T(n,s),n.prototype._updateShaderUniforms=function(){var e=this.getScene();e&&(this._time+=e.getAnimationRatio()*this.animationSpeedFactor*.01,this.setFloat(\"brightness\",this.brightness),this.setFloat(\"persistence\",this.persistence),this.setFloat(\"timeScale\",this._time))},n.prototype._getDefines=function(){return\"#define OCTAVES \"+(0|this.octaves)},n.prototype.render=function(e){this._updateShaderUniforms(),s.prototype.render.call(this,e)},n.prototype.serialize=function(){var e={customType:\"BABYLON.NoiseProceduralTexture\"};return e.brightness=this.brightness,e.octaves=this.octaves,e.persistence=this.persistence,e.animationSpeedFactor=this.animationSpeedFactor,e.size=this.getSize().width,e.generateMipMaps=this._generateMipMaps,e},n.Parse=function(e,t,i){var r=new n(e.name,e.size,t,void 0,e.generateMipMaps);return r.brightness=e.brightness,r.octaves=e.octaves,r.persistence=e.persistence,r.animationSpeedFactor=e.animationSpeedFactor,r},n})(Qa.ProceduralTexture),Qa.NoiseProceduralTexture=Za;var qa,Ja,$a,el;ae=this&&this.__assign||function(){return(ae=Object.assign||function(e){for(var t,i=1,r=arguments.length;i<r;i++)for(var n in t=arguments[i])Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e}).apply(this,arguments)};qa=$a||($a={}),Ja=(function(){function n(e,t){if(void 0===t&&(t=null),!n.IsSupported(e))throw\"Your browser does not support recording so far.\";var i=e.getRenderingCanvas();if(!i)throw\"The babylon engine must have a canvas to be recorded\";this._canvas=i,this._canvas.isRecording=!1,this._options=ae({},n._defaultOptions,t);var r=this._canvas.captureStream(this._options.fps);this._mediaRecorder=new MediaRecorder(r,{mimeType:this._options.mimeType}),this._mediaRecorder.ondataavailable=this._handleDataAvailable.bind(this),this._mediaRecorder.onerror=this._handleError.bind(this),this._mediaRecorder.onstop=this._handleStop.bind(this)}return n.IsSupported=function(e){var t=e.getRenderingCanvas();return!!t&&\"function\"==typeof t.captureStream},Object.defineProperty(n.prototype,\"isRecording\",{get:function(){return!!this._canvas&&this._canvas.isRecording},enumerable:!0,configurable:!0}),n.prototype.stopRecording=function(){this._canvas&&this._mediaRecorder&&this.isRecording&&(this._canvas.isRecording=!1,this._mediaRecorder.stop())},n.prototype.startRecording=function(e,t){var i=this;if(void 0===e&&(e=\"babylonjs.webm\"),void 0===t&&(t=7),!this._canvas||!this._mediaRecorder)throw\"Recorder has already been disposed\";if(this.isRecording)throw\"Recording already in progress\";return 0<t&&setTimeout((function(){i.stopRecording()}),1e3*t),this._fileName=e,this._recordedChunks=[],this._resolve=null,this._reject=null,this._canvas.isRecording=!0,this._mediaRecorder.start(this._options.recordChunckSize),new Promise(function(e,t){i._resolve=e,i._reject=t})},n.prototype.dispose=function(){this._canvas=null,this._mediaRecorder=null,this._recordedChunks=[],this._fileName=null,this._resolve=null,this._reject=null},n.prototype._handleDataAvailable=function(e){0<e.data.size&&this._recordedChunks.push(e.data)},n.prototype._handleError=function(e){if(this.stopRecording(),!this._reject)throw new e.error;this._reject(e.error)},n.prototype._handleStop=function(){this.stopRecording();var e=new Blob(this._recordedChunks);this._resolve&&this._resolve(e),window.URL.createObjectURL(e),this._fileName&&qa.Tools.Download(e,this._fileName)},n._defaultOptions={mimeType:\"video/webm\",fps:25,recordChunckSize:3e3},n})(),qa.VideoRecorder=Ja,(el=$a||($a={})).Scene.prototype.createDefaultLight=function(e){if(void 0===e&&(e=!1),e&&this.lights)for(var t=0;t<this.lights.length;t++)this.lights[t].dispose();0===this.lights.length&&new el.HemisphericLight(\"default light\",el.Vector3.Up(),this)},el.Scene.prototype.createDefaultCamera=function(e,t,i){if(void 0===e&&(e=!1),void 0===t&&(t=!1),void 0===i&&(i=!1),t&&this.activeCamera&&(this.activeCamera.dispose(),this.activeCamera=null),!this.activeCamera){var r,n=this.getWorldExtends(),o=n.max.subtract(n.min),s=n.min.add(o.scale(.5)),a=1.5*o.length();if(isFinite(a)||(a=1,s.copyFromFloats(0,0,0)),e){var l=new el.ArcRotateCamera(\"default camera\",-Math.PI/2,Math.PI/2,a,s,this);l.lowerRadiusLimit=.01*a,l.wheelPrecision=100/a,r=l}else{var c=new el.FreeCamera(\"default camera\",new el.Vector3(s.x,s.y,-a),this);c.setTarget(s),r=c}r.minZ=.01*a,r.maxZ=1e3*a,r.speed=.2*a,this.activeCamera=r;var h=this.getEngine().getRenderingCanvas();i&&h&&r.attachControl(h)}},el.Scene.prototype.createDefaultCameraOrLight=function(e,t,i){void 0===e&&(e=!1),void 0===t&&(t=!1),void 0===i&&(i=!1),this.createDefaultLight(t),this.createDefaultCamera(e,t,i)},el.Scene.prototype.createDefaultSkybox=function(e,t,i,r,n){if(void 0===t&&(t=!1),void 0===i&&(i=1e3),void 0===r&&(r=0),void 0===n&&(n=!0),!e)return el.Tools.Warn(\"Can not create default skybox without environment texture.\"),null;n&&e&&(this.environmentTexture=e);var o=el.Mesh.CreateBox(\"hdrSkyBox\",i,this);if(t){var s=new el.PBRMaterial(\"skyBox\",this);s.backFaceCulling=!1,s.reflectionTexture=e.clone(),s.reflectionTexture&&(s.reflectionTexture.coordinatesMode=el.Texture.SKYBOX_MODE),s.microSurface=1-r,s.disableLighting=!0,s.twoSidedLighting=!0,o.infiniteDistance=!0,o.material=s}else{var a=new el.StandardMaterial(\"skyBox\",this);a.backFaceCulling=!1,a.reflectionTexture=e.clone(),a.reflectionTexture&&(a.reflectionTexture.coordinatesMode=el.Texture.SKYBOX_MODE),a.disableLighting=!0,o.infiniteDistance=!0,o.material=a}return o},el.Scene.prototype.createDefaultEnvironment=function(e){return el.EnvironmentHelper?new el.EnvironmentHelper(e,this):null},el.Scene.prototype.createDefaultVRExperience=function(e){return void 0===e&&(e={}),new el.VRExperienceHelper(this,e)},$a.Effect.ShadersStore={defaultVertexShader:\"#include<__decl__defaultVertex>\\n\\n#define CUSTOM_VERTEX_BEGIN\\nattribute vec3 position;\\n#ifdef NORMAL\\nattribute vec3 normal;\\n#endif\\n#ifdef TANGENT\\nattribute vec4 tangent;\\n#endif\\n#ifdef UV1\\nattribute vec2 uv;\\n#endif\\n#ifdef UV2\\nattribute vec2 uv2;\\n#endif\\n#ifdef VERTEXCOLOR\\nattribute vec4 color;\\n#endif\\n#include<helperFunctions>\\n#include<bonesDeclaration>\\n\\n#include<instancesDeclaration>\\n#ifdef MAINUV1\\nvarying vec2 vMainUV1;\\n#endif\\n#ifdef MAINUV2\\nvarying vec2 vMainUV2;\\n#endif\\n#if defined(DIFFUSE) && DIFFUSEDIRECTUV == 0\\nvarying vec2 vDiffuseUV;\\n#endif\\n#if defined(AMBIENT) && AMBIENTDIRECTUV == 0\\nvarying vec2 vAmbientUV;\\n#endif\\n#if defined(OPACITY) && OPACITYDIRECTUV == 0\\nvarying vec2 vOpacityUV;\\n#endif\\n#if defined(EMISSIVE) && EMISSIVEDIRECTUV == 0\\nvarying vec2 vEmissiveUV;\\n#endif\\n#if defined(LIGHTMAP) && LIGHTMAPDIRECTUV == 0\\nvarying vec2 vLightmapUV;\\n#endif\\n#if defined(SPECULAR) && defined(SPECULARTERM) && SPECULARDIRECTUV == 0\\nvarying vec2 vSpecularUV;\\n#endif\\n#if defined(BUMP) && BUMPDIRECTUV == 0\\nvarying vec2 vBumpUV;\\n#endif\\n\\nvarying vec3 vPositionW;\\n#ifdef NORMAL\\nvarying vec3 vNormalW;\\n#endif\\n#ifdef VERTEXCOLOR\\nvarying vec4 vColor;\\n#endif\\n#include<bumpVertexDeclaration>\\n#include<clipPlaneVertexDeclaration>\\n#include<fogVertexDeclaration>\\n#include<__decl__lightFragment>[0..maxSimultaneousLights]\\n#include<morphTargetsVertexGlobalDeclaration>\\n#include<morphTargetsVertexDeclaration>[0..maxSimultaneousMorphTargets]\\n#ifdef REFLECTIONMAP_SKYBOX\\nvarying vec3 vPositionUVW;\\n#endif\\n#if defined(REFLECTIONMAP_EQUIRECTANGULAR_FIXED) || defined(REFLECTIONMAP_MIRROREDEQUIRECTANGULAR_FIXED)\\nvarying vec3 vDirectionW;\\n#endif\\n#include<logDepthDeclaration>\\n#define CUSTOM_VERTEX_DEFINITIONS\\nvoid main(void) {\\n#define CUSTOM_VERTEX_MAIN_BEGIN\\nvec3 positionUpdated=position;\\n#ifdef NORMAL \\nvec3 normalUpdated=normal;\\n#endif\\n#ifdef TANGENT\\nvec4 tangentUpdated=tangent;\\n#endif\\n#include<morphTargetsVertex>[0..maxSimultaneousMorphTargets]\\n#ifdef REFLECTIONMAP_SKYBOX\\n#ifdef REFLECTIONMAP_SKYBOX_TRANSFORMED\\nvPositionUVW=(reflectionMatrix*vec4(position,1.0)).xyz;\\n#else\\nvPositionUVW=position;\\n#endif\\n#endif \\n#define CUSTOM_VERTEX_UPDATE_POSITION\\n#define CUSTOM_VERTEX_UPDATE_NORMAL\\n#include<instancesVertex>\\n#include<bonesVertex>\\ngl_Position=viewProjection*finalWorld*vec4(positionUpdated,1.0);\\nvec4 worldPos=finalWorld*vec4(positionUpdated,1.0);\\nvPositionW=vec3(worldPos);\\n#ifdef NORMAL\\nmat3 normalWorld=mat3(finalWorld);\\n#ifdef NONUNIFORMSCALING\\nnormalWorld=transposeMat3(inverseMat3(normalWorld));\\n#endif\\nvNormalW=normalize(normalWorld*normalUpdated);\\n#endif\\n#if defined(REFLECTIONMAP_EQUIRECTANGULAR_FIXED) || defined(REFLECTIONMAP_MIRROREDEQUIRECTANGULAR_FIXED)\\nvDirectionW=normalize(vec3(finalWorld*vec4(positionUpdated,0.0)));\\n#endif\\n\\n#ifndef UV1\\nvec2 uv=vec2(0.,0.);\\n#endif\\n#ifndef UV2\\nvec2 uv2=vec2(0.,0.);\\n#endif\\n#ifdef MAINUV1\\nvMainUV1=uv;\\n#endif\\n#ifdef MAINUV2\\nvMainUV2=uv2;\\n#endif\\n#if defined(DIFFUSE) && DIFFUSEDIRECTUV == 0\\nif (vDiffuseInfos.x == 0.)\\n{\\nvDiffuseUV=vec2(diffuseMatrix*vec4(uv,1.0,0.0));\\n}\\nelse\\n{\\nvDiffuseUV=vec2(diffuseMatrix*vec4(uv2,1.0,0.0));\\n}\\n#endif\\n#if defined(AMBIENT) && AMBIENTDIRECTUV == 0\\nif (vAmbientInfos.x == 0.)\\n{\\nvAmbientUV=vec2(ambientMatrix*vec4(uv,1.0,0.0));\\n}\\nelse\\n{\\nvAmbientUV=vec2(ambientMatrix*vec4(uv2,1.0,0.0));\\n}\\n#endif\\n#if defined(OPACITY) && OPACITYDIRECTUV == 0\\nif (vOpacityInfos.x == 0.)\\n{\\nvOpacityUV=vec2(opacityMatrix*vec4(uv,1.0,0.0));\\n}\\nelse\\n{\\nvOpacityUV=vec2(opacityMatrix*vec4(uv2,1.0,0.0));\\n}\\n#endif\\n#if defined(EMISSIVE) && EMISSIVEDIRECTUV == 0\\nif (vEmissiveInfos.x == 0.)\\n{\\nvEmissiveUV=vec2(emissiveMatrix*vec4(uv,1.0,0.0));\\n}\\nelse\\n{\\nvEmissiveUV=vec2(emissiveMatrix*vec4(uv2,1.0,0.0));\\n}\\n#endif\\n#if defined(LIGHTMAP) && LIGHTMAPDIRECTUV == 0\\nif (vLightmapInfos.x == 0.)\\n{\\nvLightmapUV=vec2(lightmapMatrix*vec4(uv,1.0,0.0));\\n}\\nelse\\n{\\nvLightmapUV=vec2(lightmapMatrix*vec4(uv2,1.0,0.0));\\n}\\n#endif\\n#if defined(SPECULAR) && defined(SPECULARTERM) && SPECULARDIRECTUV == 0\\nif (vSpecularInfos.x == 0.)\\n{\\nvSpecularUV=vec2(specularMatrix*vec4(uv,1.0,0.0));\\n}\\nelse\\n{\\nvSpecularUV=vec2(specularMatrix*vec4(uv2,1.0,0.0));\\n}\\n#endif\\n#if defined(BUMP) && BUMPDIRECTUV == 0\\nif (vBumpInfos.x == 0.)\\n{\\nvBumpUV=vec2(bumpMatrix*vec4(uv,1.0,0.0));\\n}\\nelse\\n{\\nvBumpUV=vec2(bumpMatrix*vec4(uv2,1.0,0.0));\\n}\\n#endif\\n#include<bumpVertex>\\n#include<clipPlaneVertex>\\n#include<fogVertex>\\n#include<shadowsVertex>[0..maxSimultaneousLights]\\n#ifdef VERTEXCOLOR\\n\\nvColor=color;\\n#endif\\n#include<pointCloudVertex>\\n#include<logDepthVertex>\\n#define CUSTOM_VERTEX_MAIN_END\\n}\\n\",defaultPixelShader:\"#include<__decl__defaultFragment>\\n#if defined(BUMP) || !defined(NORMAL)\\n#extension GL_OES_standard_derivatives : enable\\n#endif\\n#define CUSTOM_FRAGMENT_BEGIN\\n#ifdef LOGARITHMICDEPTH\\n#extension GL_EXT_frag_depth : enable\\n#endif\\n\\n#define RECIPROCAL_PI2 0.15915494\\nuniform vec3 vEyePosition;\\nuniform vec3 vAmbientColor;\\n\\nvarying vec3 vPositionW;\\n#ifdef NORMAL\\nvarying vec3 vNormalW;\\n#endif\\n#ifdef VERTEXCOLOR\\nvarying vec4 vColor;\\n#endif\\n#ifdef MAINUV1\\nvarying vec2 vMainUV1;\\n#endif\\n#ifdef MAINUV2\\nvarying vec2 vMainUV2;\\n#endif\\n\\n#include<helperFunctions>\\n\\n#include<__decl__lightFragment>[0..maxSimultaneousLights]\\n#include<lightsFragmentFunctions>\\n#include<shadowsFragmentFunctions>\\n\\n#ifdef DIFFUSE\\n#if DIFFUSEDIRECTUV == 1\\n#define vDiffuseUV vMainUV1\\n#elif DIFFUSEDIRECTUV == 2\\n#define vDiffuseUV vMainUV2\\n#else\\nvarying vec2 vDiffuseUV;\\n#endif\\nuniform sampler2D diffuseSampler;\\n#endif\\n#ifdef AMBIENT\\n#if AMBIENTDIRECTUV == 1\\n#define vAmbientUV vMainUV1\\n#elif AMBIENTDIRECTUV == 2\\n#define vAmbientUV vMainUV2\\n#else\\nvarying vec2 vAmbientUV;\\n#endif\\nuniform sampler2D ambientSampler;\\n#endif\\n#ifdef OPACITY \\n#if OPACITYDIRECTUV == 1\\n#define vOpacityUV vMainUV1\\n#elif OPACITYDIRECTUV == 2\\n#define vOpacityUV vMainUV2\\n#else\\nvarying vec2 vOpacityUV;\\n#endif\\nuniform sampler2D opacitySampler;\\n#endif\\n#ifdef EMISSIVE\\n#if EMISSIVEDIRECTUV == 1\\n#define vEmissiveUV vMainUV1\\n#elif EMISSIVEDIRECTUV == 2\\n#define vEmissiveUV vMainUV2\\n#else\\nvarying vec2 vEmissiveUV;\\n#endif\\nuniform sampler2D emissiveSampler;\\n#endif\\n#ifdef LIGHTMAP\\n#if LIGHTMAPDIRECTUV == 1\\n#define vLightmapUV vMainUV1\\n#elif LIGHTMAPDIRECTUV == 2\\n#define vLightmapUV vMainUV2\\n#else\\nvarying vec2 vLightmapUV;\\n#endif\\nuniform sampler2D lightmapSampler;\\n#endif\\n#ifdef REFRACTION\\n#ifdef REFRACTIONMAP_3D\\nuniform samplerCube refractionCubeSampler;\\n#else\\nuniform sampler2D refraction2DSampler;\\n#endif\\n#endif\\n#if defined(SPECULAR) && defined(SPECULARTERM)\\n#if SPECULARDIRECTUV == 1\\n#define vSpecularUV vMainUV1\\n#elif SPECULARDIRECTUV == 2\\n#define vSpecularUV vMainUV2\\n#else\\nvarying vec2 vSpecularUV;\\n#endif\\nuniform sampler2D specularSampler;\\n#endif\\n#ifdef ALPHATEST\\nuniform float alphaCutOff;\\n#endif\\n\\n#include<fresnelFunction>\\n\\n#ifdef REFLECTION\\n#ifdef REFLECTIONMAP_3D\\nuniform samplerCube reflectionCubeSampler;\\n#else\\nuniform sampler2D reflection2DSampler;\\n#endif\\n#ifdef REFLECTIONMAP_SKYBOX\\nvarying vec3 vPositionUVW;\\n#else\\n#if defined(REFLECTIONMAP_EQUIRECTANGULAR_FIXED) || defined(REFLECTIONMAP_MIRROREDEQUIRECTANGULAR_FIXED)\\nvarying vec3 vDirectionW;\\n#endif\\n#endif\\n#include<reflectionFunction>\\n#endif\\n#include<imageProcessingDeclaration>\\n#include<imageProcessingFunctions>\\n#include<bumpFragmentFunctions>\\n#include<clipPlaneFragmentDeclaration>\\n#include<logDepthDeclaration>\\n#include<fogFragmentDeclaration>\\n#define CUSTOM_FRAGMENT_DEFINITIONS\\nvoid main(void) {\\n#define CUSTOM_FRAGMENT_MAIN_BEGIN\\n#include<clipPlaneFragment>\\nvec3 viewDirectionW=normalize(vEyePosition-vPositionW);\\n\\nvec4 baseColor=vec4(1.,1.,1.,1.);\\nvec3 diffuseColor=vDiffuseColor.rgb;\\n\\nfloat alpha=vDiffuseColor.a;\\n\\n#ifdef NORMAL\\nvec3 normalW=normalize(vNormalW);\\n#else\\nvec3 normalW=normalize(-cross(dFdx(vPositionW),dFdy(vPositionW)));\\n#endif\\n#include<bumpFragment>\\n#ifdef TWOSIDEDLIGHTING\\nnormalW=gl_FrontFacing ? normalW : -normalW;\\n#endif\\n#ifdef DIFFUSE\\nbaseColor=texture2D(diffuseSampler,vDiffuseUV+uvOffset);\\n#ifdef ALPHATEST\\nif (baseColor.a<alphaCutOff)\\ndiscard;\\n#endif\\n#ifdef ALPHAFROMDIFFUSE\\nalpha*=baseColor.a;\\n#endif\\n#define CUSTOM_FRAGMENT_UPDATE_ALPHA\\nbaseColor.rgb*=vDiffuseInfos.y;\\n#endif\\n#include<depthPrePass>\\n#ifdef VERTEXCOLOR\\nbaseColor.rgb*=vColor.rgb;\\n#endif\\n#define CUSTOM_FRAGMENT_UPDATE_DIFFUSE\\n\\nvec3 baseAmbientColor=vec3(1.,1.,1.);\\n#ifdef AMBIENT\\nbaseAmbientColor=texture2D(ambientSampler,vAmbientUV+uvOffset).rgb*vAmbientInfos.y;\\n#endif\\n#define CUSTOM_FRAGMENT_BEFORE_LIGHTS\\n\\n#ifdef SPECULARTERM\\nfloat glossiness=vSpecularColor.a;\\nvec3 specularColor=vSpecularColor.rgb;\\n#ifdef SPECULAR\\nvec4 specularMapColor=texture2D(specularSampler,vSpecularUV+uvOffset);\\nspecularColor=specularMapColor.rgb;\\n#ifdef GLOSSINESS\\nglossiness=glossiness*specularMapColor.a;\\n#endif\\n#endif\\n#else\\nfloat glossiness=0.;\\n#endif\\n\\nvec3 diffuseBase=vec3(0.,0.,0.);\\nlightingInfo info;\\n#ifdef SPECULARTERM\\nvec3 specularBase=vec3(0.,0.,0.);\\n#endif\\nfloat shadow=1.;\\n#ifdef LIGHTMAP\\nvec3 lightmapColor=texture2D(lightmapSampler,vLightmapUV+uvOffset).rgb*vLightmapInfos.y;\\n#endif\\n#include<lightFragment>[0..maxSimultaneousLights]\\n\\nvec3 refractionColor=vec3(0.,0.,0.);\\n#ifdef REFRACTION\\nvec3 refractionVector=normalize(refract(-viewDirectionW,normalW,vRefractionInfos.y));\\n#ifdef REFRACTIONMAP_3D\\nrefractionVector.y=refractionVector.y*vRefractionInfos.w;\\nif (dot(refractionVector,viewDirectionW)<1.0) {\\nrefractionColor=textureCube(refractionCubeSampler,refractionVector).rgb;\\n}\\n#else\\nvec3 vRefractionUVW=vec3(refractionMatrix*(view*vec4(vPositionW+refractionVector*vRefractionInfos.z,1.0)));\\nvec2 refractionCoords=vRefractionUVW.xy/vRefractionUVW.z;\\nrefractionCoords.y=1.0-refractionCoords.y;\\nrefractionColor=texture2D(refraction2DSampler,refractionCoords).rgb;\\n#endif\\n#ifdef IS_REFRACTION_LINEAR\\nrefractionColor=toGammaSpace(refractionColor);\\n#endif\\nrefractionColor*=vRefractionInfos.x;\\n#endif\\n\\nvec3 reflectionColor=vec3(0.,0.,0.);\\n#ifdef REFLECTION\\nvec3 vReflectionUVW=computeReflectionCoords(vec4(vPositionW,1.0),normalW);\\n#ifdef REFLECTIONMAP_3D\\n#ifdef ROUGHNESS\\nfloat bias=vReflectionInfos.y;\\n#ifdef SPECULARTERM\\n#ifdef SPECULAR\\n#ifdef GLOSSINESS\\nbias*=(1.0-specularMapColor.a);\\n#endif\\n#endif\\n#endif\\nreflectionColor=textureCube(reflectionCubeSampler,vReflectionUVW,bias).rgb;\\n#else\\nreflectionColor=textureCube(reflectionCubeSampler,vReflectionUVW).rgb;\\n#endif\\n#else\\nvec2 coords=vReflectionUVW.xy;\\n#ifdef REFLECTIONMAP_PROJECTION\\ncoords/=vReflectionUVW.z;\\n#endif\\ncoords.y=1.0-coords.y;\\nreflectionColor=texture2D(reflection2DSampler,coords).rgb;\\n#endif\\n#ifdef IS_REFLECTION_LINEAR\\nreflectionColor=toGammaSpace(reflectionColor);\\n#endif\\nreflectionColor*=vReflectionInfos.x;\\n#ifdef REFLECTIONFRESNEL\\nfloat reflectionFresnelTerm=computeFresnelTerm(viewDirectionW,normalW,reflectionRightColor.a,reflectionLeftColor.a);\\n#ifdef REFLECTIONFRESNELFROMSPECULAR\\n#ifdef SPECULARTERM\\nreflectionColor*=specularColor.rgb*(1.0-reflectionFresnelTerm)+reflectionFresnelTerm*reflectionRightColor.rgb;\\n#else\\nreflectionColor*=reflectionLeftColor.rgb*(1.0-reflectionFresnelTerm)+reflectionFresnelTerm*reflectionRightColor.rgb;\\n#endif\\n#else\\nreflectionColor*=reflectionLeftColor.rgb*(1.0-reflectionFresnelTerm)+reflectionFresnelTerm*reflectionRightColor.rgb;\\n#endif\\n#endif\\n#endif\\n#ifdef REFRACTIONFRESNEL\\nfloat refractionFresnelTerm=computeFresnelTerm(viewDirectionW,normalW,refractionRightColor.a,refractionLeftColor.a);\\nrefractionColor*=refractionLeftColor.rgb*(1.0-refractionFresnelTerm)+refractionFresnelTerm*refractionRightColor.rgb;\\n#endif\\n#ifdef OPACITY\\nvec4 opacityMap=texture2D(opacitySampler,vOpacityUV+uvOffset);\\n#ifdef OPACITYRGB\\nopacityMap.rgb=opacityMap.rgb*vec3(0.3,0.59,0.11);\\nalpha*=(opacityMap.x+opacityMap.y+opacityMap.z)* vOpacityInfos.y;\\n#else\\nalpha*=opacityMap.a*vOpacityInfos.y;\\n#endif\\n#endif\\n#ifdef VERTEXALPHA\\nalpha*=vColor.a;\\n#endif\\n#ifdef OPACITYFRESNEL\\nfloat opacityFresnelTerm=computeFresnelTerm(viewDirectionW,normalW,opacityParts.z,opacityParts.w);\\nalpha+=opacityParts.x*(1.0-opacityFresnelTerm)+opacityFresnelTerm*opacityParts.y;\\n#endif\\n\\nvec3 emissiveColor=vEmissiveColor;\\n#ifdef EMISSIVE\\nemissiveColor+=texture2D(emissiveSampler,vEmissiveUV+uvOffset).rgb*vEmissiveInfos.y;\\n#endif\\n#ifdef EMISSIVEFRESNEL\\nfloat emissiveFresnelTerm=computeFresnelTerm(viewDirectionW,normalW,emissiveRightColor.a,emissiveLeftColor.a);\\nemissiveColor*=emissiveLeftColor.rgb*(1.0-emissiveFresnelTerm)+emissiveFresnelTerm*emissiveRightColor.rgb;\\n#endif\\n\\n#ifdef DIFFUSEFRESNEL\\nfloat diffuseFresnelTerm=computeFresnelTerm(viewDirectionW,normalW,diffuseRightColor.a,diffuseLeftColor.a);\\ndiffuseBase*=diffuseLeftColor.rgb*(1.0-diffuseFresnelTerm)+diffuseFresnelTerm*diffuseRightColor.rgb;\\n#endif\\n\\n#ifdef EMISSIVEASILLUMINATION\\nvec3 finalDiffuse=clamp(diffuseBase*diffuseColor+vAmbientColor,0.0,1.0)*baseColor.rgb;\\n#else\\n#ifdef LINKEMISSIVEWITHDIFFUSE\\nvec3 finalDiffuse=clamp((diffuseBase+emissiveColor)*diffuseColor+vAmbientColor,0.0,1.0)*baseColor.rgb;\\n#else\\nvec3 finalDiffuse=clamp(diffuseBase*diffuseColor+emissiveColor+vAmbientColor,0.0,1.0)*baseColor.rgb;\\n#endif\\n#endif\\n#ifdef SPECULARTERM\\nvec3 finalSpecular=specularBase*specularColor;\\n#ifdef SPECULAROVERALPHA\\nalpha=clamp(alpha+dot(finalSpecular,vec3(0.3,0.59,0.11)),0.,1.);\\n#endif\\n#else\\nvec3 finalSpecular=vec3(0.0);\\n#endif\\n#ifdef REFLECTIONOVERALPHA\\nalpha=clamp(alpha+dot(reflectionColor,vec3(0.3,0.59,0.11)),0.,1.);\\n#endif\\n\\n#ifdef EMISSIVEASILLUMINATION\\nvec4 color=vec4(clamp(finalDiffuse*baseAmbientColor+finalSpecular+reflectionColor+emissiveColor+refractionColor,0.0,1.0),alpha);\\n#else\\nvec4 color=vec4(finalDiffuse*baseAmbientColor+finalSpecular+reflectionColor+refractionColor,alpha);\\n#endif\\n\\n#ifdef LIGHTMAP\\n#ifndef LIGHTMAPEXCLUDED\\n#ifdef USELIGHTMAPASSHADOWMAP\\ncolor.rgb*=lightmapColor;\\n#else\\ncolor.rgb+=lightmapColor;\\n#endif\\n#endif\\n#endif\\n#define CUSTOM_FRAGMENT_BEFORE_FOG\\ncolor.rgb=max(color.rgb,0.);\\n#include<logDepthFragment>\\n#include<fogFragment>\\n\\n\\n#ifdef IMAGEPROCESSINGPOSTPROCESS\\ncolor.rgb=toLinearSpace(color.rgb);\\n#else\\n#ifdef IMAGEPROCESSING\\ncolor.rgb=toLinearSpace(color.rgb);\\ncolor=applyImageProcessing(color);\\n#endif\\n#endif\\n#ifdef PREMULTIPLYALPHA\\n\\ncolor.rgb*=color.a;\\n#endif\\n#define CUSTOM_FRAGMENT_BEFORE_FRAGCOLOR\\ngl_FragColor=color;\\n}\\n\",pbrVertexShader:\"precision highp float;\\n#include<__decl__pbrVertex>\\n\\nattribute vec3 position;\\n#ifdef NORMAL\\nattribute vec3 normal;\\n#endif\\n#ifdef TANGENT\\nattribute vec4 tangent;\\n#endif\\n#ifdef UV1\\nattribute vec2 uv;\\n#endif\\n#ifdef UV2\\nattribute vec2 uv2;\\n#endif\\n#ifdef MAINUV1\\nvarying vec2 vMainUV1;\\n#endif\\n#ifdef MAINUV2\\nvarying vec2 vMainUV2; \\n#endif \\n#ifdef VERTEXCOLOR\\nattribute vec4 color;\\n#endif\\n#include<helperFunctions>\\n#include<bonesDeclaration>\\n\\n#include<instancesDeclaration>\\n#if defined(ALBEDO) && ALBEDODIRECTUV == 0\\nvarying vec2 vAlbedoUV;\\n#endif\\n#if defined(AMBIENT) && AMBIENTDIRECTUV == 0\\nvarying vec2 vAmbientUV;\\n#endif\\n#if defined(OPACITY) && OPACITYDIRECTUV == 0\\nvarying vec2 vOpacityUV;\\n#endif\\n#if defined(EMISSIVE) && EMISSIVEDIRECTUV == 0\\nvarying vec2 vEmissiveUV;\\n#endif\\n#if defined(LIGHTMAP) && LIGHTMAPDIRECTUV == 0\\nvarying vec2 vLightmapUV;\\n#endif\\n#if defined(REFLECTIVITY) && REFLECTIVITYDIRECTUV == 0\\nvarying vec2 vReflectivityUV;\\n#endif\\n#if defined(MICROSURFACEMAP) && MICROSURFACEMAPDIRECTUV == 0\\nvarying vec2 vMicroSurfaceSamplerUV;\\n#endif\\n#if defined(BUMP) && BUMPDIRECTUV == 0\\nvarying vec2 vBumpUV;\\n#endif\\n\\nvarying vec3 vPositionW;\\n#ifdef NORMAL\\nvarying vec3 vNormalW;\\n#if defined(USESPHERICALFROMREFLECTIONMAP) && defined(USESPHERICALINVERTEX)\\nvarying vec3 vEnvironmentIrradiance;\\n#include<harmonicsFunctions>\\n#endif\\n#endif\\n#ifdef VERTEXCOLOR\\nvarying vec4 vColor;\\n#endif\\n#include<bumpVertexDeclaration>\\n#include<clipPlaneVertexDeclaration>\\n#include<fogVertexDeclaration>\\n#include<__decl__lightFragment>[0..maxSimultaneousLights]\\n#include<morphTargetsVertexGlobalDeclaration>\\n#include<morphTargetsVertexDeclaration>[0..maxSimultaneousMorphTargets]\\n#ifdef REFLECTIONMAP_SKYBOX\\nvarying vec3 vPositionUVW;\\n#endif\\n#if defined(REFLECTIONMAP_EQUIRECTANGULAR_FIXED) || defined(REFLECTIONMAP_MIRROREDEQUIRECTANGULAR_FIXED)\\nvarying vec3 vDirectionW;\\n#endif\\n#include<logDepthDeclaration>\\nvoid main(void) {\\nvec3 positionUpdated=position;\\n#ifdef NORMAL\\nvec3 normalUpdated=normal;\\n#endif\\n#ifdef TANGENT\\nvec4 tangentUpdated=tangent;\\n#endif\\n#include<morphTargetsVertex>[0..maxSimultaneousMorphTargets]\\n#ifdef REFLECTIONMAP_SKYBOX\\n#ifdef REFLECTIONMAP_SKYBOX_TRANSFORMED\\nvPositionUVW=(reflectionMatrix*vec4(positionUpdated,1.0)).xyz;\\n#else\\nvPositionUVW=positionUpdated;\\n#endif\\n#endif \\n#include<instancesVertex>\\n#include<bonesVertex>\\ngl_Position=viewProjection*finalWorld*vec4(positionUpdated,1.0);\\nvec4 worldPos=finalWorld*vec4(positionUpdated,1.0);\\nvPositionW=vec3(worldPos);\\n#ifdef NORMAL\\nmat3 normalWorld=mat3(finalWorld);\\n#ifdef NONUNIFORMSCALING\\nnormalWorld=transposeMat3(inverseMat3(normalWorld));\\n#endif\\nvNormalW=normalize(normalWorld*normalUpdated);\\n#if defined(USESPHERICALFROMREFLECTIONMAP) && defined(USESPHERICALINVERTEX)\\nvec3 reflectionVector=vec3(reflectionMatrix*vec4(vNormalW,0)).xyz;\\n#ifdef REFLECTIONMAP_OPPOSITEZ\\nreflectionVector.z*=-1.0;\\n#endif\\nvEnvironmentIrradiance=environmentIrradianceJones(reflectionVector);\\n#endif\\n#endif\\n#if defined(REFLECTIONMAP_EQUIRECTANGULAR_FIXED) || defined(REFLECTIONMAP_MIRROREDEQUIRECTANGULAR_FIXED)\\nvDirectionW=normalize(vec3(finalWorld*vec4(positionUpdated,0.0)));\\n#endif\\n\\n#ifndef UV1\\nvec2 uv=vec2(0.,0.);\\n#endif\\n#ifndef UV2\\nvec2 uv2=vec2(0.,0.);\\n#endif\\n#ifdef MAINUV1\\nvMainUV1=uv;\\n#endif \\n#ifdef MAINUV2\\nvMainUV2=uv2;\\n#endif \\n#if defined(ALBEDO) && ALBEDODIRECTUV == 0 \\nif (vAlbedoInfos.x == 0.)\\n{\\nvAlbedoUV=vec2(albedoMatrix*vec4(uv,1.0,0.0));\\n}\\nelse\\n{\\nvAlbedoUV=vec2(albedoMatrix*vec4(uv2,1.0,0.0));\\n}\\n#endif\\n#if defined(AMBIENT) && AMBIENTDIRECTUV == 0 \\nif (vAmbientInfos.x == 0.)\\n{\\nvAmbientUV=vec2(ambientMatrix*vec4(uv,1.0,0.0));\\n}\\nelse\\n{\\nvAmbientUV=vec2(ambientMatrix*vec4(uv2,1.0,0.0));\\n}\\n#endif\\n#if defined(OPACITY) && OPACITYDIRECTUV == 0 \\nif (vOpacityInfos.x == 0.)\\n{\\nvOpacityUV=vec2(opacityMatrix*vec4(uv,1.0,0.0));\\n}\\nelse\\n{\\nvOpacityUV=vec2(opacityMatrix*vec4(uv2,1.0,0.0));\\n}\\n#endif\\n#if defined(EMISSIVE) && EMISSIVEDIRECTUV == 0 \\nif (vEmissiveInfos.x == 0.)\\n{\\nvEmissiveUV=vec2(emissiveMatrix*vec4(uv,1.0,0.0));\\n}\\nelse\\n{\\nvEmissiveUV=vec2(emissiveMatrix*vec4(uv2,1.0,0.0));\\n}\\n#endif\\n#if defined(LIGHTMAP) && LIGHTMAPDIRECTUV == 0 \\nif (vLightmapInfos.x == 0.)\\n{\\nvLightmapUV=vec2(lightmapMatrix*vec4(uv,1.0,0.0));\\n}\\nelse\\n{\\nvLightmapUV=vec2(lightmapMatrix*vec4(uv2,1.0,0.0));\\n}\\n#endif\\n#if defined(REFLECTIVITY) && REFLECTIVITYDIRECTUV == 0 \\nif (vReflectivityInfos.x == 0.)\\n{\\nvReflectivityUV=vec2(reflectivityMatrix*vec4(uv,1.0,0.0));\\n}\\nelse\\n{\\nvReflectivityUV=vec2(reflectivityMatrix*vec4(uv2,1.0,0.0));\\n}\\n#endif\\n#if defined(MICROSURFACEMAP) && MICROSURFACEMAPDIRECTUV == 0 \\nif (vMicroSurfaceSamplerInfos.x == 0.)\\n{\\nvMicroSurfaceSamplerUV=vec2(microSurfaceSamplerMatrix*vec4(uv,1.0,0.0));\\n}\\nelse\\n{\\nvMicroSurfaceSamplerUV=vec2(microSurfaceSamplerMatrix*vec4(uv2,1.0,0.0));\\n}\\n#endif\\n#if defined(BUMP) && BUMPDIRECTUV == 0 \\nif (vBumpInfos.x == 0.)\\n{\\nvBumpUV=vec2(bumpMatrix*vec4(uv,1.0,0.0));\\n}\\nelse\\n{\\nvBumpUV=vec2(bumpMatrix*vec4(uv2,1.0,0.0));\\n}\\n#endif\\n\\n#include<bumpVertex>\\n\\n#include<clipPlaneVertex>\\n\\n#include<fogVertex>\\n\\n#include<shadowsVertex>[0..maxSimultaneousLights]\\n\\n#ifdef VERTEXCOLOR\\nvColor=color;\\n#endif\\n\\n#ifdef POINTSIZE\\ngl_PointSize=pointSize;\\n#endif\\n\\n#include<logDepthVertex>\\n}\",pbrPixelShader:\"#if defined(BUMP) || !defined(NORMAL) || defined(FORCENORMALFORWARD) || defined(SPECULARAA)\\n#extension GL_OES_standard_derivatives : enable\\n#endif\\n#ifdef LODBASEDMICROSFURACE\\n#extension GL_EXT_shader_texture_lod : enable\\n#endif\\n#ifdef LOGARITHMICDEPTH\\n#extension GL_EXT_frag_depth : enable\\n#endif\\nprecision highp float;\\n#include<__decl__pbrFragment>\\nuniform vec4 vEyePosition;\\nuniform vec3 vAmbientColor;\\nuniform vec4 vCameraInfos;\\n\\nvarying vec3 vPositionW;\\n#ifdef MAINUV1\\nvarying vec2 vMainUV1;\\n#endif \\n#ifdef MAINUV2 \\nvarying vec2 vMainUV2;\\n#endif \\n#ifdef NORMAL\\nvarying vec3 vNormalW;\\n#if defined(USESPHERICALFROMREFLECTIONMAP) && defined(USESPHERICALINVERTEX)\\nvarying vec3 vEnvironmentIrradiance;\\n#endif\\n#endif\\n#ifdef VERTEXCOLOR\\nvarying vec4 vColor;\\n#endif\\n\\n#include<__decl__lightFragment>[0..maxSimultaneousLights]\\n\\n#ifdef ALBEDO\\n#if ALBEDODIRECTUV == 1\\n#define vAlbedoUV vMainUV1\\n#elif ALBEDODIRECTUV == 2\\n#define vAlbedoUV vMainUV2\\n#else\\nvarying vec2 vAlbedoUV;\\n#endif\\nuniform sampler2D albedoSampler;\\n#endif\\n#ifdef AMBIENT\\n#if AMBIENTDIRECTUV == 1\\n#define vAmbientUV vMainUV1\\n#elif AMBIENTDIRECTUV == 2\\n#define vAmbientUV vMainUV2\\n#else\\nvarying vec2 vAmbientUV;\\n#endif\\nuniform sampler2D ambientSampler;\\n#endif\\n#ifdef OPACITY\\n#if OPACITYDIRECTUV == 1\\n#define vOpacityUV vMainUV1\\n#elif OPACITYDIRECTUV == 2\\n#define vOpacityUV vMainUV2\\n#else\\nvarying vec2 vOpacityUV;\\n#endif\\nuniform sampler2D opacitySampler;\\n#endif\\n#ifdef EMISSIVE\\n#if EMISSIVEDIRECTUV == 1\\n#define vEmissiveUV vMainUV1\\n#elif EMISSIVEDIRECTUV == 2\\n#define vEmissiveUV vMainUV2\\n#else\\nvarying vec2 vEmissiveUV;\\n#endif\\nuniform sampler2D emissiveSampler;\\n#endif\\n#ifdef LIGHTMAP\\n#if LIGHTMAPDIRECTUV == 1\\n#define vLightmapUV vMainUV1\\n#elif LIGHTMAPDIRECTUV == 2\\n#define vLightmapUV vMainUV2\\n#else\\nvarying vec2 vLightmapUV;\\n#endif\\nuniform sampler2D lightmapSampler;\\n#endif\\n#ifdef REFLECTIVITY\\n#if REFLECTIVITYDIRECTUV == 1\\n#define vReflectivityUV vMainUV1\\n#elif REFLECTIVITYDIRECTUV == 2\\n#define vReflectivityUV vMainUV2\\n#else\\nvarying vec2 vReflectivityUV;\\n#endif\\nuniform sampler2D reflectivitySampler;\\n#endif\\n#ifdef MICROSURFACEMAP\\n#if MICROSURFACEMAPDIRECTUV == 1\\n#define vMicroSurfaceSamplerUV vMainUV1\\n#elif MICROSURFACEMAPDIRECTUV == 2\\n#define vMicroSurfaceSamplerUV vMainUV2\\n#else\\nvarying vec2 vMicroSurfaceSamplerUV;\\n#endif\\nuniform sampler2D microSurfaceSampler;\\n#endif\\n\\n#ifdef REFRACTION\\n#ifdef REFRACTIONMAP_3D\\n#define sampleRefraction(s,c) textureCube(s,c)\\nuniform samplerCube refractionSampler;\\n#ifdef LODBASEDMICROSFURACE\\n#define sampleRefractionLod(s,c,l) textureCubeLodEXT(s,c,l)\\n#else\\nuniform samplerCube refractionSamplerLow;\\nuniform samplerCube refractionSamplerHigh;\\n#endif\\n#else\\n#define sampleRefraction(s,c) texture2D(s,c)\\nuniform sampler2D refractionSampler;\\n#ifdef LODBASEDMICROSFURACE\\n#define sampleRefractionLod(s,c,l) texture2DLodEXT(s,c,l)\\n#else\\nuniform samplerCube refractionSamplerLow;\\nuniform samplerCube refractionSamplerHigh;\\n#endif\\n#endif\\n#endif\\n\\n#ifdef REFLECTION\\n#ifdef REFLECTIONMAP_3D\\n#define sampleReflection(s,c) textureCube(s,c)\\nuniform samplerCube reflectionSampler;\\n#ifdef LODBASEDMICROSFURACE\\n#define sampleReflectionLod(s,c,l) textureCubeLodEXT(s,c,l)\\n#else\\nuniform samplerCube reflectionSamplerLow;\\nuniform samplerCube reflectionSamplerHigh;\\n#endif\\n#else\\n#define sampleReflection(s,c) texture2D(s,c)\\nuniform sampler2D reflectionSampler;\\n#ifdef LODBASEDMICROSFURACE\\n#define sampleReflectionLod(s,c,l) texture2DLodEXT(s,c,l)\\n#else\\nuniform samplerCube reflectionSamplerLow;\\nuniform samplerCube reflectionSamplerHigh;\\n#endif\\n#endif\\n#ifdef REFLECTIONMAP_SKYBOX\\nvarying vec3 vPositionUVW;\\n#else\\n#if defined(REFLECTIONMAP_EQUIRECTANGULAR_FIXED) || defined(REFLECTIONMAP_MIRROREDEQUIRECTANGULAR_FIXED)\\nvarying vec3 vDirectionW;\\n#endif\\n#endif\\n#include<reflectionFunction>\\n#endif\\n#ifdef ENVIRONMENTBRDF\\nuniform sampler2D environmentBrdfSampler;\\n#endif\\n\\n#ifndef FROMLINEARSPACE\\n#define FROMLINEARSPACE;\\n#endif\\n#include<imageProcessingDeclaration>\\n#include<helperFunctions>\\n#include<imageProcessingFunctions>\\n\\n#include<shadowsFragmentFunctions>\\n#include<pbrFunctions>\\n#include<harmonicsFunctions>\\n#include<pbrLightFunctions>\\n#include<bumpFragmentFunctions>\\n#include<clipPlaneFragmentDeclaration>\\n#include<logDepthDeclaration>\\n\\n#include<fogFragmentDeclaration>\\nvoid main(void) {\\n#include<clipPlaneFragment>\\n\\n\\nvec3 viewDirectionW=normalize(vEyePosition.xyz-vPositionW);\\n#ifdef NORMAL\\nvec3 normalW=normalize(vNormalW);\\n#else\\nvec3 normalW=normalize(cross(dFdx(vPositionW),dFdy(vPositionW)))*vEyePosition.w;\\n#endif\\n#include<bumpFragment>\\n#ifdef SPECULARAA\\nvec3 nDfdx=dFdx(normalW.xyz);\\nvec3 nDfdy=dFdy(normalW.xyz);\\nfloat slopeSquare=max(dot(nDfdx,nDfdx),dot(nDfdy,nDfdy));\\n\\nfloat geometricRoughnessFactor=pow(clamp(slopeSquare ,0.,1.),0.333);\\n\\nfloat geometricAlphaGFactor=sqrt(slopeSquare);\\n#else\\nfloat geometricRoughnessFactor=0.;\\n#endif\\n#if defined(FORCENORMALFORWARD) && defined(NORMAL)\\nvec3 faceNormal=normalize(cross(dFdx(vPositionW),dFdy(vPositionW)))*vEyePosition.w;\\n#if defined(TWOSIDEDLIGHTING)\\nfaceNormal=gl_FrontFacing ? faceNormal : -faceNormal;\\n#endif\\nnormalW*=sign(dot(normalW,faceNormal));\\n#endif\\n#if defined(TWOSIDEDLIGHTING) && defined(NORMAL)\\nnormalW=gl_FrontFacing ? normalW : -normalW;\\n#endif\\n\\n\\nvec3 surfaceAlbedo=vAlbedoColor.rgb;\\n\\nfloat alpha=vAlbedoColor.a;\\n#ifdef ALBEDO\\nvec4 albedoTexture=texture2D(albedoSampler,vAlbedoUV+uvOffset);\\n#if defined(ALPHAFROMALBEDO) || defined(ALPHATEST)\\nalpha*=albedoTexture.a;\\n#endif\\nsurfaceAlbedo*=toLinearSpace(albedoTexture.rgb);\\nsurfaceAlbedo*=vAlbedoInfos.y;\\n#endif\\n\\n#ifdef OPACITY\\nvec4 opacityMap=texture2D(opacitySampler,vOpacityUV+uvOffset);\\n#ifdef OPACITYRGB\\nalpha=getLuminance(opacityMap.rgb);\\n#else\\nalpha*=opacityMap.a;\\n#endif\\nalpha*=vOpacityInfos.y;\\n#endif\\n#ifdef VERTEXALPHA\\nalpha*=vColor.a;\\n#endif\\n#if !defined(LINKREFRACTIONTOTRANSPARENCY) && !defined(ALPHAFRESNEL)\\n#ifdef ALPHATEST\\nif (alpha<ALPHATESTVALUE)\\ndiscard;\\n#ifndef ALPHABLEND\\n\\nalpha=1.0;\\n#endif\\n#endif\\n#endif\\n#include<depthPrePass>\\n#ifdef VERTEXCOLOR\\nsurfaceAlbedo*=vColor.rgb;\\n#endif\\n\\nvec3 ambientOcclusionColor=vec3(1.,1.,1.);\\n#ifdef AMBIENT\\nvec3 ambientOcclusionColorMap=texture2D(ambientSampler,vAmbientUV+uvOffset).rgb*vAmbientInfos.y;\\n#ifdef AMBIENTINGRAYSCALE\\nambientOcclusionColorMap=vec3(ambientOcclusionColorMap.r,ambientOcclusionColorMap.r,ambientOcclusionColorMap.r);\\n#endif\\nambientOcclusionColor=mix(ambientOcclusionColor,ambientOcclusionColorMap,vAmbientInfos.z);\\n#endif\\n#ifdef UNLIT\\nvec3 diffuseBase=vec3(1.,1.,1.);\\n#else\\n\\nfloat microSurface=vReflectivityColor.a;\\nvec3 surfaceReflectivityColor=vReflectivityColor.rgb;\\n#ifdef METALLICWORKFLOW\\nvec2 metallicRoughness=surfaceReflectivityColor.rg;\\n#ifdef REFLECTIVITY\\nvec4 surfaceMetallicColorMap=texture2D(reflectivitySampler,vReflectivityUV+uvOffset);\\n#ifdef AOSTOREINMETALMAPRED\\nvec3 aoStoreInMetalMap=vec3(surfaceMetallicColorMap.r,surfaceMetallicColorMap.r,surfaceMetallicColorMap.r);\\nambientOcclusionColor=mix(ambientOcclusionColor,aoStoreInMetalMap,vReflectivityInfos.z);\\n#endif\\n#ifdef METALLNESSSTOREINMETALMAPBLUE\\nmetallicRoughness.r*=surfaceMetallicColorMap.b;\\n#else\\nmetallicRoughness.r*=surfaceMetallicColorMap.r;\\n#endif\\n#ifdef ROUGHNESSSTOREINMETALMAPALPHA\\nmetallicRoughness.g*=surfaceMetallicColorMap.a;\\n#else\\n#ifdef ROUGHNESSSTOREINMETALMAPGREEN\\nmetallicRoughness.g*=surfaceMetallicColorMap.g;\\n#endif\\n#endif\\n#endif\\n#ifdef MICROSURFACEMAP\\nvec4 microSurfaceTexel=texture2D(microSurfaceSampler,vMicroSurfaceSamplerUV+uvOffset)*vMicroSurfaceSamplerInfos.y;\\nmetallicRoughness.g*=microSurfaceTexel.r;\\n#endif\\n\\nmicroSurface=1.0-metallicRoughness.g;\\n\\nvec3 baseColor=surfaceAlbedo;\\n\\n\\nconst vec3 DefaultSpecularReflectanceDielectric=vec3(0.04,0.04,0.04);\\n\\nsurfaceAlbedo=mix(baseColor.rgb*(1.0-DefaultSpecularReflectanceDielectric.r),vec3(0.,0.,0.),metallicRoughness.r);\\n\\nsurfaceReflectivityColor=mix(DefaultSpecularReflectanceDielectric,baseColor,metallicRoughness.r);\\n#else\\n#ifdef REFLECTIVITY\\nvec4 surfaceReflectivityColorMap=texture2D(reflectivitySampler,vReflectivityUV+uvOffset);\\nsurfaceReflectivityColor*=toLinearSpace(surfaceReflectivityColorMap.rgb);\\nsurfaceReflectivityColor*=vReflectivityInfos.y;\\n#ifdef MICROSURFACEFROMREFLECTIVITYMAP\\nmicroSurface*=surfaceReflectivityColorMap.a;\\nmicroSurface*=vReflectivityInfos.z;\\n#else\\n#ifdef MICROSURFACEAUTOMATIC\\nmicroSurface*=computeDefaultMicroSurface(microSurface,surfaceReflectivityColor);\\n#endif\\n#ifdef MICROSURFACEMAP\\nvec4 microSurfaceTexel=texture2D(microSurfaceSampler,vMicroSurfaceSamplerUV+uvOffset)*vMicroSurfaceSamplerInfos.y;\\nmicroSurface*=microSurfaceTexel.r;\\n#endif\\n#endif\\n#endif\\n#endif\\n\\nmicroSurface=clamp(microSurface,0.,1.);\\n\\nfloat roughness=1.-microSurface;\\n\\n#ifdef ALPHAFRESNEL\\n#if defined(ALPHATEST) || defined(ALPHABLEND)\\n\\n\\n\\nfloat opacityPerceptual=alpha;\\n#ifdef LINEARALPHAFRESNEL\\nfloat opacity0=opacityPerceptual;\\n#else\\nfloat opacity0=opacityPerceptual*opacityPerceptual;\\n#endif\\nfloat opacity90=fresnelGrazingReflectance(opacity0);\\nvec3 normalForward=faceforward(normalW,-viewDirectionW,normalW);\\n\\nalpha=fresnelSchlickEnvironmentGGX(clamp(dot(viewDirectionW,normalForward),0.0,1.0),vec3(opacity0),vec3(opacity90),sqrt(microSurface)).x;\\n#ifdef ALPHATEST\\nif (alpha<ALPHATESTVALUE)\\ndiscard;\\n#ifndef ALPHABLEND\\n\\nalpha=1.0;\\n#endif\\n#endif\\n#endif\\n#endif\\n\\n\\nfloat NdotVUnclamped=dot(normalW,viewDirectionW);\\nfloat NdotV=clamp(NdotVUnclamped,0.,1.)+0.00001;\\nfloat alphaG=convertRoughnessToAverageSlope(roughness);\\n#ifdef SPECULARAA\\n\\n\\nalphaG+=(0.75*geometricAlphaGFactor);\\n#endif\\n\\n#ifdef REFRACTION\\nvec4 environmentRefraction=vec4(0.,0.,0.,0.);\\nvec3 refractionVector=refract(-viewDirectionW,normalW,vRefractionInfos.y);\\n#ifdef REFRACTIONMAP_OPPOSITEZ\\nrefractionVector.z*=-1.0;\\n#endif\\n\\n#ifdef REFRACTIONMAP_3D\\nrefractionVector.y=refractionVector.y*vRefractionInfos.w;\\nvec3 refractionCoords=refractionVector;\\nrefractionCoords=vec3(refractionMatrix*vec4(refractionCoords,0));\\n#else\\nvec3 vRefractionUVW=vec3(refractionMatrix*(view*vec4(vPositionW+refractionVector*vRefractionInfos.z,1.0)));\\nvec2 refractionCoords=vRefractionUVW.xy/vRefractionUVW.z;\\nrefractionCoords.y=1.0-refractionCoords.y;\\n#endif\\n#ifdef LODINREFRACTIONALPHA\\nfloat refractionLOD=getLodFromAlphaG(vRefractionMicrosurfaceInfos.x,alphaG,NdotVUnclamped);\\n#else\\nfloat refractionLOD=getLodFromAlphaG(vRefractionMicrosurfaceInfos.x,alphaG,1.0);\\n#endif\\n#ifdef LODBASEDMICROSFURACE\\n\\nrefractionLOD=refractionLOD*vRefractionMicrosurfaceInfos.y+vRefractionMicrosurfaceInfos.z;\\n#ifdef LODINREFRACTIONALPHA\\n\\n\\n\\n\\n\\n\\n\\n\\n\\nfloat automaticRefractionLOD=UNPACK_LOD(sampleRefraction(refractionSampler,refractionCoords).a);\\nfloat requestedRefractionLOD=max(automaticRefractionLOD,refractionLOD);\\n#else\\nfloat requestedRefractionLOD=refractionLOD;\\n#endif\\nenvironmentRefraction=sampleRefractionLod(refractionSampler,refractionCoords,requestedRefractionLOD);\\n#else\\nfloat lodRefractionNormalized=clamp(refractionLOD/log2(vRefractionMicrosurfaceInfos.x),0.,1.);\\nfloat lodRefractionNormalizedDoubled=lodRefractionNormalized*2.0;\\nvec4 environmentRefractionMid=sampleRefraction(refractionSampler,refractionCoords);\\nif(lodRefractionNormalizedDoubled<1.0){\\nenvironmentRefraction=mix(\\nsampleRefraction(refractionSamplerHigh,refractionCoords),\\nenvironmentRefractionMid,\\nlodRefractionNormalizedDoubled\\n);\\n}else{\\nenvironmentRefraction=mix(\\nenvironmentRefractionMid,\\nsampleRefraction(refractionSamplerLow,refractionCoords),\\nlodRefractionNormalizedDoubled-1.0\\n);\\n}\\n#endif\\n#ifdef GAMMAREFRACTION\\nenvironmentRefraction.rgb=fromRGBD(environmentRefraction);\\n#endif\\n#ifdef RGBDREFRACTION\\nenvironmentRefraction.rgb=toLinearSpace(environmentRefraction.rgb);\\n#endif\\n\\nenvironmentRefraction.rgb*=vRefractionInfos.x;\\n#endif\\n\\n#ifdef REFLECTION\\nvec4 environmentRadiance=vec4(0.,0.,0.,0.);\\nvec3 environmentIrradiance=vec3(0.,0.,0.);\\nvec3 reflectionVector=computeReflectionCoords(vec4(vPositionW,1.0),normalW);\\n#ifdef REFLECTIONMAP_OPPOSITEZ\\nreflectionVector.z*=-1.0;\\n#endif\\n\\n#ifdef REFLECTIONMAP_3D\\nvec3 reflectionCoords=reflectionVector;\\n#else\\nvec2 reflectionCoords=reflectionVector.xy;\\n#ifdef REFLECTIONMAP_PROJECTION\\nreflectionCoords/=reflectionVector.z;\\n#endif\\nreflectionCoords.y=1.0-reflectionCoords.y;\\n#endif\\n#if defined(LODINREFLECTIONALPHA) && !defined(REFLECTIONMAP_SKYBOX)\\nfloat reflectionLOD=getLodFromAlphaG(vReflectionMicrosurfaceInfos.x,alphaG,NdotVUnclamped);\\n#else\\nfloat reflectionLOD=getLodFromAlphaG(vReflectionMicrosurfaceInfos.x,alphaG,1.);\\n#endif\\n#ifdef LODBASEDMICROSFURACE\\n\\nreflectionLOD=reflectionLOD*vReflectionMicrosurfaceInfos.y+vReflectionMicrosurfaceInfos.z;\\n#ifdef LODINREFLECTIONALPHA\\n\\n\\n\\n\\n\\n\\n\\n\\n\\nfloat automaticReflectionLOD=UNPACK_LOD(sampleReflection(reflectionSampler,reflectionCoords).a);\\nfloat requestedReflectionLOD=max(automaticReflectionLOD,reflectionLOD);\\n#else\\nfloat requestedReflectionLOD=reflectionLOD;\\n#endif\\nenvironmentRadiance=sampleReflectionLod(reflectionSampler,reflectionCoords,requestedReflectionLOD);\\n#else\\nfloat lodReflectionNormalized=clamp(reflectionLOD/log2(vReflectionMicrosurfaceInfos.x),0.,1.);\\nfloat lodReflectionNormalizedDoubled=lodReflectionNormalized*2.0;\\nvec4 environmentSpecularMid=sampleReflection(reflectionSampler,reflectionCoords);\\nif(lodReflectionNormalizedDoubled<1.0){\\nenvironmentRadiance=mix(\\nsampleReflection(reflectionSamplerHigh,reflectionCoords),\\nenvironmentSpecularMid,\\nlodReflectionNormalizedDoubled\\n);\\n}else{\\nenvironmentRadiance=mix(\\nenvironmentSpecularMid,\\nsampleReflection(reflectionSamplerLow,reflectionCoords),\\nlodReflectionNormalizedDoubled-1.0\\n);\\n}\\n#endif\\n#ifdef RGBDREFLECTION\\nenvironmentRadiance.rgb=fromRGBD(environmentRadiance);\\n#endif\\n#ifdef GAMMAREFLECTION\\nenvironmentRadiance.rgb=toLinearSpace(environmentRadiance.rgb);\\n#endif\\n\\n#ifdef USESPHERICALFROMREFLECTIONMAP\\n#if defined(NORMAL) && defined(USESPHERICALINVERTEX)\\nenvironmentIrradiance=vEnvironmentIrradiance;\\n#else\\nvec3 irradianceVector=vec3(reflectionMatrix*vec4(normalW,0)).xyz;\\n#ifdef REFLECTIONMAP_OPPOSITEZ\\nirradianceVector.z*=-1.0;\\n#endif\\nenvironmentIrradiance=environmentIrradianceJones(irradianceVector);\\n#endif\\n#endif\\n\\nenvironmentRadiance.rgb*=vReflectionInfos.x;\\nenvironmentRadiance.rgb*=vReflectionColor.rgb;\\nenvironmentIrradiance*=vReflectionColor.rgb;\\n#endif\\n\\n\\n\\nfloat reflectance=max(max(surfaceReflectivityColor.r,surfaceReflectivityColor.g),surfaceReflectivityColor.b);\\nfloat reflectance90=fresnelGrazingReflectance(reflectance);\\nvec3 specularEnvironmentR0=surfaceReflectivityColor.rgb;\\nvec3 specularEnvironmentR90=vec3(1.0,1.0,1.0)*reflectance90;\\n\\nvec3 diffuseBase=vec3(0.,0.,0.);\\n#ifdef SPECULARTERM\\nvec3 specularBase=vec3(0.,0.,0.);\\n#endif\\n#ifdef LIGHTMAP\\nvec3 lightmapColor=texture2D(lightmapSampler,vLightmapUV+uvOffset).rgb;\\n#ifdef GAMMALIGHTMAP\\nlightmapColor=toLinearSpace(lightmapColor);\\n#endif\\nlightmapColor*=vLightmapInfos.y;\\n#endif\\nlightingInfo info;\\npointLightingInfo pointInfo;\\nspotLightingInfo spotInfo;\\nfloat shadow=1.; \\nfloat NdotL=-1.;\\n#include<lightFragment>[0..maxSimultaneousLights]\\n\\n#if defined(ENVIRONMENTBRDF) && !defined(REFLECTIONMAP_SKYBOX)\\n\\nvec2 brdfSamplerUV=vec2(NdotV,roughness);\\n\\nvec4 environmentBrdf=texture2D(environmentBrdfSampler,brdfSamplerUV);\\nvec3 specularEnvironmentReflectance=specularEnvironmentR0*environmentBrdf.x+environmentBrdf.y;\\n#ifdef RADIANCEOCCLUSION\\n#ifdef AMBIENTINGRAYSCALE\\nfloat ambientMonochrome=ambientOcclusionColor.r;\\n#else\\nfloat ambientMonochrome=getLuminance(ambientOcclusionColor);\\n#endif\\nfloat seo=environmentRadianceOcclusion(ambientMonochrome,NdotVUnclamped);\\nspecularEnvironmentReflectance*=seo;\\n#endif\\n#ifdef HORIZONOCCLUSION\\n#ifdef BUMP\\n#ifdef REFLECTIONMAP_3D\\nfloat eho=environmentHorizonOcclusion(-viewDirectionW,normalW);\\nspecularEnvironmentReflectance*=eho;\\n#endif\\n#endif\\n#endif\\n#else\\n\\nvec3 specularEnvironmentReflectance=fresnelSchlickEnvironmentGGX(NdotV,specularEnvironmentR0,specularEnvironmentR90,sqrt(microSurface));\\n#endif\\n\\n#ifdef REFRACTION\\nvec3 refractance=vec3(0.0,0.0,0.0);\\nvec3 transmission=vec3(1.0,1.0,1.0);\\n#ifdef LINKREFRACTIONTOTRANSPARENCY\\n\\ntransmission*=(1.0-alpha);\\n\\n\\nvec3 mixedAlbedo=surfaceAlbedo;\\nfloat maxChannel=max(max(mixedAlbedo.r,mixedAlbedo.g),mixedAlbedo.b);\\nvec3 tint=clamp(maxChannel*mixedAlbedo,0.0,1.0);\\n\\nsurfaceAlbedo*=alpha;\\n\\nenvironmentIrradiance*=alpha;\\n\\nenvironmentRefraction.rgb*=tint;\\n\\nalpha=1.0;\\n#endif\\n\\nvec3 bounceSpecularEnvironmentReflectance=(2.0*specularEnvironmentReflectance)/(1.0+specularEnvironmentReflectance);\\nspecularEnvironmentReflectance=mix(bounceSpecularEnvironmentReflectance,specularEnvironmentReflectance,alpha);\\n\\ntransmission*=1.0-specularEnvironmentReflectance;\\n\\nrefractance=transmission;\\n#endif\\n\\n\\n\\n\\nsurfaceAlbedo.rgb=(1.-reflectance)*surfaceAlbedo.rgb;\\n\\n#ifdef REFLECTION\\nvec3 finalIrradiance=environmentIrradiance;\\nfinalIrradiance*=surfaceAlbedo.rgb;\\n#endif\\n\\n#ifdef SPECULARTERM\\nvec3 finalSpecular=specularBase;\\nfinalSpecular=max(finalSpecular,0.0);\\n\\nvec3 finalSpecularScaled=finalSpecular*vLightingIntensity.x*vLightingIntensity.w;\\n#endif\\n\\n#ifdef REFLECTION\\nvec3 finalRadiance=environmentRadiance.rgb;\\nfinalRadiance*=specularEnvironmentReflectance;\\n\\nvec3 finalRadianceScaled=finalRadiance*vLightingIntensity.z;\\n#endif\\n\\n#ifdef REFRACTION\\nvec3 finalRefraction=environmentRefraction.rgb;\\nfinalRefraction*=refractance;\\n#endif\\n\\n#ifdef ALPHABLEND\\nfloat luminanceOverAlpha=0.0;\\n#if defined(REFLECTION) && defined(RADIANCEOVERALPHA)\\nluminanceOverAlpha+=getLuminance(finalRadianceScaled);\\n#endif\\n#if defined(SPECULARTERM) && defined(SPECULAROVERALPHA)\\nluminanceOverAlpha+=getLuminance(finalSpecularScaled);\\n#endif\\n#if defined(RADIANCEOVERALPHA) || defined(SPECULAROVERALPHA)\\nalpha=clamp(alpha+luminanceOverAlpha*luminanceOverAlpha,0.,1.);\\n#endif\\n#endif\\n#endif\\n\\nvec3 finalDiffuse=diffuseBase;\\nfinalDiffuse.rgb+=vAmbientColor;\\nfinalDiffuse*=surfaceAlbedo.rgb;\\nfinalDiffuse=max(finalDiffuse,0.0);\\n\\nvec3 finalEmissive=vEmissiveColor;\\n#ifdef EMISSIVE\\nvec3 emissiveColorTex=texture2D(emissiveSampler,vEmissiveUV+uvOffset).rgb;\\nfinalEmissive*=toLinearSpace(emissiveColorTex.rgb);\\nfinalEmissive*=vEmissiveInfos.y;\\n#endif\\n\\n#ifdef AMBIENT\\nvec3 ambientOcclusionForDirectDiffuse=mix(vec3(1.),ambientOcclusionColor,vAmbientInfos.w);\\n#else\\nvec3 ambientOcclusionForDirectDiffuse=ambientOcclusionColor;\\n#endif\\n\\n\\n\\nvec4 finalColor=vec4(\\nfinalDiffuse*ambientOcclusionForDirectDiffuse*vLightingIntensity.x +\\n#ifndef UNLIT\\n#ifdef REFLECTION\\nfinalIrradiance*ambientOcclusionColor*vLightingIntensity.z +\\n#endif\\n#ifdef SPECULARTERM\\n\\n\\nfinalSpecularScaled +\\n#endif\\n#ifdef REFLECTION\\n\\n\\nfinalRadianceScaled +\\n#endif\\n#ifdef REFRACTION\\nfinalRefraction*vLightingIntensity.z +\\n#endif\\n#endif\\nfinalEmissive*vLightingIntensity.y,\\nalpha);\\n\\n#ifdef LIGHTMAP\\n#ifndef LIGHTMAPEXCLUDED\\n#ifdef USELIGHTMAPASSHADOWMAP\\nfinalColor.rgb*=lightmapColor;\\n#else\\nfinalColor.rgb+=lightmapColor;\\n#endif\\n#endif\\n#endif\\n\\nfinalColor=max(finalColor,0.0);\\n#include<logDepthFragment>\\n#include<fogFragment>(color,finalColor)\\n#ifdef IMAGEPROCESSINGPOSTPROCESS\\n\\n\\nfinalColor.rgb=clamp(finalColor.rgb,0.,30.0);\\n#else\\n\\nfinalColor=applyImageProcessing(finalColor);\\n#endif\\n#ifdef PREMULTIPLYALPHA\\n\\nfinalColor.rgb*=finalColor.a;\\n#endif\\ngl_FragColor=finalColor;\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n}\",rgbdEncodePixelShader:\"\\nvarying vec2 vUV;\\nuniform sampler2D textureSampler;\\n#include<helperFunctions>\\nvoid main(void) \\n{\\ngl_FragColor=toRGBD(texture2D(textureSampler,vUV).rgb);\\n}\",rgbdDecodePixelShader:\"\\nvarying vec2 vUV;\\nuniform sampler2D textureSampler;\\n#include<helperFunctions>\\nvoid main(void) \\n{\\ngl_FragColor=vec4(fromRGBD(texture2D(textureSampler,vUV)),1.0);\\n}\",spritesVertexShader:\"\\nattribute vec4 position;\\nattribute vec4 options;\\nattribute vec4 cellInfo;\\nattribute vec4 color;\\n\\nuniform vec2 textureInfos;\\nuniform mat4 view;\\nuniform mat4 projection;\\n\\nvarying vec2 vUV;\\nvarying vec4 vColor;\\n#include<fogVertexDeclaration>\\nvoid main(void) { \\nvec3 viewPos=(view*vec4(position.xyz,1.0)).xyz; \\nvec2 cornerPos;\\nfloat angle=position.w;\\nvec2 size=vec2(options.x,options.y);\\nvec2 offset=options.zw;\\nvec2 uvScale=textureInfos.xy;\\ncornerPos=vec2(offset.x-0.5,offset.y-0.5)*size;\\n\\nvec3 rotatedCorner;\\nrotatedCorner.x=cornerPos.x*cos(angle)-cornerPos.y*sin(angle);\\nrotatedCorner.y=cornerPos.x*sin(angle)+cornerPos.y*cos(angle);\\nrotatedCorner.z=0.;\\n\\nviewPos+=rotatedCorner;\\ngl_Position=projection*vec4(viewPos,1.0); \\n\\nvColor=color;\\n\\nvec2 uvOffset=vec2(abs(offset.x-cellInfo.x),1.0-abs(offset.y-cellInfo.y));\\nvUV=(uvOffset+cellInfo.zw)*uvScale;\\n\\n#ifdef FOG\\nvFogDistance=viewPos;\\n#endif\\n}\",spritesPixelShader:\"uniform bool alphaTest;\\nvarying vec4 vColor;\\n\\nvarying vec2 vUV;\\nuniform sampler2D diffuseSampler;\\n\\n#include<fogFragmentDeclaration>\\nvoid main(void) {\\nvec4 color=texture2D(diffuseSampler,vUV);\\nif (alphaTest) \\n{\\nif (color.a<0.95)\\ndiscard;\\n}\\ncolor*=vColor;\\n#include<fogFragment>\\ngl_FragColor=color;\\n}\",particlesVertexShader:\"\\nattribute vec3 position;\\nattribute vec4 color;\\nattribute float angle;\\nattribute vec2 size;\\n#ifdef ANIMATESHEET \\nattribute float cellIndex;\\n#endif\\n#ifndef BILLBOARD \\nattribute vec3 direction;\\n#endif\\n#ifdef BILLBOARDSTRETCHED\\nattribute vec3 direction; \\n#endif\\n#ifdef RAMPGRADIENT\\nattribute vec4 remapData;\\n#endif\\nattribute vec2 offset;\\n\\nuniform mat4 view;\\nuniform mat4 projection;\\nuniform vec2 translationPivot;\\n#ifdef ANIMATESHEET \\nuniform vec3 particlesInfos; \\n#endif\\n\\nvarying vec2 vUV;\\nvarying vec4 vColor;\\n#ifdef RAMPGRADIENT\\nvarying vec4 remapRanges;\\n#endif\\n#if defined(CLIPPLANE) || defined(CLIPPLANE2) || defined(CLIPPLANE3) || defined(CLIPPLANE4)\\nuniform mat4 invView;\\n#endif\\n#include<clipPlaneVertexDeclaration>\\n#ifdef BILLBOARD\\nuniform vec3 eyePosition; \\n#endif\\nvec3 rotate(vec3 yaxis,vec3 rotatedCorner) {\\nvec3 xaxis=normalize(cross(vec3(0.,1.0,0.),yaxis));\\nvec3 zaxis=normalize(cross(yaxis,xaxis));\\nvec3 row0=vec3(xaxis.x,xaxis.y,xaxis.z);\\nvec3 row1=vec3(yaxis.x,yaxis.y,yaxis.z);\\nvec3 row2=vec3(zaxis.x,zaxis.y,zaxis.z);\\nmat3 rotMatrix=mat3(row0,row1,row2);\\nvec3 alignedCorner=rotMatrix*rotatedCorner;\\nreturn position+alignedCorner; \\n}\\n#ifdef BILLBOARDSTRETCHED\\nvec3 rotateAlign(vec3 toCamera,vec3 rotatedCorner) {\\nvec3 normalizedToCamera=normalize(toCamera);\\nvec3 normalizedCrossDirToCamera=normalize(cross(normalize(direction),normalizedToCamera));\\nvec3 crossProduct=normalize(cross(normalizedToCamera,normalizedCrossDirToCamera));\\nvec3 row0=vec3(normalizedCrossDirToCamera.x,normalizedCrossDirToCamera.y,normalizedCrossDirToCamera.z);\\nvec3 row1=vec3(crossProduct.x,crossProduct.y,crossProduct.z);\\nvec3 row2=vec3(normalizedToCamera.x,normalizedToCamera.y,normalizedToCamera.z);\\nmat3 rotMatrix=mat3(row0,row1,row2);\\nvec3 alignedCorner=rotMatrix*rotatedCorner;\\nreturn position+alignedCorner; \\n}\\n#endif\\nvoid main(void) { \\nvec2 cornerPos;\\ncornerPos=(vec2(offset.x-0.5,offset.y-0.5)-translationPivot)*size+translationPivot;\\n#ifdef BILLBOARD \\n\\nvec3 rotatedCorner;\\n#ifdef BILLBOARDY \\nrotatedCorner.x=cornerPos.x*cos(angle)-cornerPos.y*sin(angle);\\nrotatedCorner.z=cornerPos.x*sin(angle)+cornerPos.y*cos(angle);\\nrotatedCorner.y=0.;\\nvec3 yaxis=position-eyePosition;\\nyaxis.y=0.;\\nvec3 worldPos=rotate(normalize(yaxis),rotatedCorner);\\nvec3 viewPos=(view*vec4(worldPos,1.0)).xyz; \\n#elif defined(BILLBOARDSTRETCHED)\\nrotatedCorner.x=cornerPos.x*cos(angle)-cornerPos.y*sin(angle);\\nrotatedCorner.y=cornerPos.x*sin(angle)+cornerPos.y*cos(angle);\\nrotatedCorner.z=0.;\\nvec3 toCamera=position-eyePosition; \\nvec3 worldPos=rotateAlign(toCamera,rotatedCorner);\\nvec3 viewPos=(view*vec4(worldPos,1.0)).xyz; \\n#else\\nrotatedCorner.x=cornerPos.x*cos(angle)-cornerPos.y*sin(angle);\\nrotatedCorner.y=cornerPos.x*sin(angle)+cornerPos.y*cos(angle);\\nrotatedCorner.z=0.;\\nvec3 viewPos=(view*vec4(position,1.0)).xyz+rotatedCorner; \\n#endif\\n#ifdef RAMPGRADIENT\\nremapRanges=remapData;\\n#endif\\n\\ngl_Position=projection*vec4(viewPos,1.0); \\n#else\\n\\nvec3 rotatedCorner;\\nrotatedCorner.x=cornerPos.x*cos(angle)-cornerPos.y*sin(angle);\\nrotatedCorner.z=cornerPos.x*sin(angle)+cornerPos.y*cos(angle);\\nrotatedCorner.y=0.;\\nvec3 yaxis=normalize(direction);\\nvec3 worldPos=rotate(yaxis,rotatedCorner);\\ngl_Position=projection*view*vec4(worldPos,1.0); \\n#endif \\nvColor=color;\\n#ifdef ANIMATESHEET\\nfloat rowOffset=floor(cellIndex/particlesInfos.z);\\nfloat columnOffset=cellIndex-rowOffset*particlesInfos.z;\\nvec2 uvScale=particlesInfos.xy;\\nvec2 uvOffset=vec2(offset.x ,1.0-offset.y);\\nvUV=(uvOffset+vec2(columnOffset,rowOffset))*uvScale;\\n#else\\nvUV=offset;\\n#endif\\n\\n#if defined(CLIPPLANE) || defined(CLIPPLANE2) || defined(CLIPPLANE3) || defined(CLIPPLANE4)\\nvec4 worldPos=invView*vec4(viewPos,1.0);\\n#endif\\n#include<clipPlaneVertex>\\n}\",particlesPixelShader:\"\\nvarying vec2 vUV;\\nvarying vec4 vColor;\\nuniform vec4 textureMask;\\nuniform sampler2D diffuseSampler;\\n#include<clipPlaneFragmentDeclaration>\\n#include<imageProcessingDeclaration>\\n#include<helperFunctions>\\n#include<imageProcessingFunctions>\\n#ifdef RAMPGRADIENT\\nvarying vec4 remapRanges;\\nuniform sampler2D rampSampler;\\n#endif\\nvoid main(void) {\\n#include<clipPlaneFragment>\\nvec4 textureColor=texture2D(diffuseSampler,vUV);\\nvec4 baseColor=(textureColor*textureMask+(vec4(1.,1.,1.,1.)-textureMask))*vColor;\\n#ifdef RAMPGRADIENT\\nfloat alpha=baseColor.a;\\nfloat remappedColorIndex=clamp((alpha-remapRanges.x)/remapRanges.y,0.0,1.0);\\nvec4 rampColor=texture2D(rampSampler,vec2(1.0-remappedColorIndex,0.));\\nbaseColor.rgb*=rampColor.rgb;\\n\\nfloat finalAlpha=baseColor.a;\\nbaseColor.a=clamp((alpha*rampColor.a-remapRanges.z)/remapRanges.w,0.0,1.0);\\n#endif\\n#ifdef BLENDMULTIPLYMODE\\nfloat sourceAlpha=vColor.a*textureColor.a;\\nbaseColor.rgb=baseColor.rgb*sourceAlpha+vec3(1.0)*(1.0-sourceAlpha);\\n#endif\\n\\n\\n#ifdef IMAGEPROCESSINGPOSTPROCESS\\nbaseColor.rgb=toLinearSpace(baseColor.rgb);\\n#else\\n#ifdef IMAGEPROCESSING\\nbaseColor.rgb=toLinearSpace(baseColor.rgb);\\nbaseColor=applyImageProcessing(baseColor);\\n#endif\\n#endif\\ngl_FragColor=baseColor;\\n}\",colorVertexShader:\"\\nattribute vec3 position;\\n#ifdef VERTEXCOLOR\\nattribute vec4 color;\\n#endif\\n#include<bonesDeclaration>\\n\\n#include<instancesDeclaration>\\nuniform mat4 viewProjection;\\n\\n#ifdef VERTEXCOLOR\\nvarying vec4 vColor;\\n#endif\\nvoid main(void) {\\n#include<instancesVertex>\\n#include<bonesVertex>\\ngl_Position=viewProjection*finalWorld*vec4(position,1.0);\\n#ifdef VERTEXCOLOR\\n\\nvColor=color;\\n#endif\\n}\",colorPixelShader:\"#ifdef VERTEXCOLOR\\nvarying vec4 vColor;\\n#else\\nuniform vec4 color;\\n#endif\\nvoid main(void) {\\n#ifdef VERTEXCOLOR\\ngl_FragColor=vColor;\\n#else\\ngl_FragColor=color;\\n#endif\\n}\",gpuRenderParticlesVertexShader:\"#version 300 es\\nuniform mat4 view;\\nuniform mat4 projection;\\nuniform vec2 translationPivot;\\n\\nin vec3 position;\\nin float age;\\nin float life;\\nin vec3 size;\\n#ifndef BILLBOARD\\nin vec3 initialDirection;\\n#endif\\n#ifdef BILLBOARDSTRETCHED\\nin vec3 direction;\\n#endif\\nin float angle;\\n#ifdef ANIMATESHEET\\nin float cellIndex;\\n#endif\\nin vec2 offset;\\nin vec2 uv;\\nout vec2 vUV;\\nout vec4 vColor;\\n#if defined(CLIPPLANE) || defined(CLIPPLANE2) || defined(CLIPPLANE3) || defined(CLIPPLANE4)\\nuniform mat4 invView;\\n#endif\\n#include<clipPlaneVertexDeclaration2>\\n#ifdef COLORGRADIENTS\\nuniform sampler2D colorGradientSampler;\\n#else\\nuniform vec4 colorDead;\\nin vec4 color;\\n#endif\\n#ifdef ANIMATESHEET\\nuniform vec3 sheetInfos;\\n#endif\\n#ifdef BILLBOARD\\nuniform vec3 eyePosition; \\n#endif\\nvec3 rotate(vec3 yaxis,vec3 rotatedCorner) {\\nvec3 xaxis=normalize(cross(vec3(0.,1.0,0.),yaxis));\\nvec3 zaxis=normalize(cross(yaxis,xaxis));\\nvec3 row0=vec3(xaxis.x,xaxis.y,xaxis.z);\\nvec3 row1=vec3(yaxis.x,yaxis.y,yaxis.z);\\nvec3 row2=vec3(zaxis.x,zaxis.y,zaxis.z);\\nmat3 rotMatrix=mat3(row0,row1,row2);\\nvec3 alignedCorner=rotMatrix*rotatedCorner;\\nreturn position+alignedCorner;\\n}\\n#ifdef BILLBOARDSTRETCHED\\nvec3 rotateAlign(vec3 toCamera,vec3 rotatedCorner) {\\nvec3 normalizedToCamera=normalize(toCamera);\\nvec3 normalizedCrossDirToCamera=normalize(cross(normalize(direction),normalizedToCamera));\\nvec3 crossProduct=normalize(cross(normalizedToCamera,normalizedCrossDirToCamera));\\nvec3 row0=vec3(normalizedCrossDirToCamera.x,normalizedCrossDirToCamera.y,normalizedCrossDirToCamera.z);\\nvec3 row1=vec3(crossProduct.x,crossProduct.y,crossProduct.z);\\nvec3 row2=vec3(normalizedToCamera.x,normalizedToCamera.y,normalizedToCamera.z);\\nmat3 rotMatrix=mat3(row0,row1,row2);\\nvec3 alignedCorner=rotMatrix*rotatedCorner;\\nreturn position+alignedCorner; \\n}\\n#endif\\nvoid main() {\\n#ifdef ANIMATESHEET\\nfloat rowOffset=floor(cellIndex/sheetInfos.z);\\nfloat columnOffset=cellIndex-rowOffset*sheetInfos.z;\\nvec2 uvScale=sheetInfos.xy;\\nvec2 uvOffset=vec2(uv.x ,1.0-uv.y);\\nvUV=(uvOffset+vec2(columnOffset,rowOffset))*uvScale;\\n#else \\nvUV=uv;\\n#endif\\nfloat ratio=age/life;\\n#ifdef COLORGRADIENTS\\nvColor=texture(colorGradientSampler,vec2(ratio,0));\\n#else\\nvColor=color*vec4(1.0-ratio)+colorDead*vec4(ratio);\\n#endif\\nvec2 cornerPos=(offset-translationPivot)*size.yz*size.x+translationPivot;\\n#ifdef BILLBOARD\\nvec4 rotatedCorner;\\nrotatedCorner.w=0.;\\n#ifdef BILLBOARDY \\nrotatedCorner.x=cornerPos.x*cos(angle)-cornerPos.y*sin(angle);\\nrotatedCorner.z=cornerPos.x*sin(angle)+cornerPos.y*cos(angle);\\nrotatedCorner.y=0.;\\nvec3 yaxis=position-eyePosition;\\nyaxis.y=0.;\\nvec3 worldPos=rotate(normalize(yaxis),rotatedCorner.xyz);\\nvec4 viewPosition=(view*vec4(worldPos,1.0)); \\n#elif defined(BILLBOARDSTRETCHED)\\nrotatedCorner.x=cornerPos.x*cos(angle)-cornerPos.y*sin(angle);\\nrotatedCorner.y=cornerPos.x*sin(angle)+cornerPos.y*cos(angle);\\nrotatedCorner.z=0.;\\nvec3 toCamera=position-eyePosition; \\nvec3 worldPos=rotateAlign(toCamera,rotatedCorner.xyz);\\nvec4 viewPosition=(view*vec4(worldPos,1.0)); \\n#else\\n\\nrotatedCorner.x=cornerPos.x*cos(angle)-cornerPos.y*sin(angle);\\nrotatedCorner.y=cornerPos.x*sin(angle)+cornerPos.y*cos(angle);\\nrotatedCorner.z=0.;\\n\\nvec4 viewPosition=view*vec4(position,1.0)+rotatedCorner;\\n#endif\\n#else\\n\\nvec3 rotatedCorner;\\nrotatedCorner.x=cornerPos.x*cos(angle)-cornerPos.y*sin(angle);\\nrotatedCorner.y=0.;\\nrotatedCorner.z=cornerPos.x*sin(angle)+cornerPos.y*cos(angle);\\nvec3 yaxis=normalize(initialDirection);\\nvec3 worldPos=rotate(yaxis,rotatedCorner);\\n\\nvec4 viewPosition=view*vec4(worldPos,1.0); \\n#endif\\ngl_Position=projection*viewPosition;\\n\\n#if defined(CLIPPLANE) || defined(CLIPPLANE2) || defined(CLIPPLANE3) || defined(CLIPPLANE4)\\nvec4 worldPos=invView*viewPosition;\\n#endif \\n#include<clipPlaneVertex>\\n}\",gpuRenderParticlesPixelShader:\"#version 300 es\\nuniform sampler2D textureSampler;\\nin vec2 vUV;\\nin vec4 vColor;\\nout vec4 outFragColor;\\n#include<clipPlaneFragmentDeclaration2> \\n#include<imageProcessingDeclaration>\\n#include<helperFunctions>\\n#include<imageProcessingFunctions>\\nvoid main() {\\n#include<clipPlaneFragment> \\nvec4 textureColor=texture(textureSampler,vUV);\\noutFragColor=textureColor*vColor;\\n#ifdef BLENDMULTIPLYMODE\\nfloat alpha=vColor.a*textureColor.a;\\noutFragColor.rgb=outFragColor.rgb*alpha+vec3(1.0)*(1.0-alpha); \\n#endif \\n\\n\\n#ifdef IMAGEPROCESSINGPOSTPROCESS\\noutFragColor.rgb=toLinearSpace(outFragColor.rgb);\\n#else\\n#ifdef IMAGEPROCESSING\\noutFragColor.rgb=toLinearSpace(outFragColor.rgb);\\noutFragColor=applyImageProcessing(outFragColor);\\n#endif\\n#endif\\n}\\n\",gpuUpdateParticlesVertexShader:\"#version 300 es\\n#define PI 3.14159\\nuniform float currentCount;\\nuniform float timeDelta;\\nuniform float stopFactor;\\nuniform mat4 emitterWM;\\nuniform vec2 lifeTime;\\nuniform vec2 emitPower;\\nuniform vec2 sizeRange;\\nuniform vec4 scaleRange;\\n#ifndef COLORGRADIENTS\\nuniform vec4 color1;\\nuniform vec4 color2;\\n#endif\\nuniform vec3 gravity;\\nuniform sampler2D randomSampler;\\nuniform sampler2D randomSampler2;\\nuniform vec4 angleRange;\\n#ifdef BOXEMITTER\\nuniform vec3 direction1;\\nuniform vec3 direction2;\\nuniform vec3 minEmitBox;\\nuniform vec3 maxEmitBox;\\n#endif\\n#ifdef POINTEMITTER\\nuniform vec3 direction1;\\nuniform vec3 direction2;\\n#endif\\n#ifdef HEMISPHERICEMITTER\\nuniform float radius;\\nuniform float radiusRange;\\nuniform float directionRandomizer;\\n#endif\\n#ifdef SPHEREEMITTER\\nuniform float radius;\\nuniform float radiusRange;\\n#ifdef DIRECTEDSPHEREEMITTER\\nuniform vec3 direction1;\\nuniform vec3 direction2;\\n#else\\nuniform float directionRandomizer;\\n#endif\\n#endif\\n#ifdef CYLINDEREMITTER\\nuniform float radius;\\nuniform float height;\\nuniform float radiusRange;\\n#ifdef DIRECTEDCYLINDEREMITTER\\nuniform vec3 direction1;\\nuniform vec3 direction2;\\n#else\\nuniform float directionRandomizer;\\n#endif\\n#endif\\n#ifdef CONEEMITTER\\nuniform vec2 radius;\\nuniform float coneAngle;\\nuniform vec2 height;\\nuniform float directionRandomizer;\\n#endif\\n\\nin vec3 position;\\nin float age;\\nin float life;\\nin vec4 seed;\\nin vec3 size;\\n#ifndef COLORGRADIENTS\\nin vec4 color;\\n#endif\\nin vec3 direction;\\n#ifndef BILLBOARD\\nin vec3 initialDirection;\\n#endif\\n#ifdef ANGULARSPEEDGRADIENTS\\nin float angle;\\n#else\\nin vec2 angle;\\n#endif\\n#ifdef ANIMATESHEET\\nin float cellIndex;\\n#ifdef ANIMATESHEETRANDOMSTART\\nin float cellStartOffset;\\n#endif\\n#endif\\n#ifdef NOISE\\nin vec3 noiseCoordinates1;\\nin vec3 noiseCoordinates2;\\n#endif\\n\\nout vec3 outPosition;\\nout float outAge;\\nout float outLife;\\nout vec4 outSeed;\\nout vec3 outSize;\\n#ifndef COLORGRADIENTS\\nout vec4 outColor;\\n#endif\\nout vec3 outDirection;\\n#ifndef BILLBOARD\\nout vec3 outInitialDirection;\\n#endif\\n#ifdef ANGULARSPEEDGRADIENTS\\nout float outAngle;\\n#else\\nout vec2 outAngle;\\n#endif\\n#ifdef ANIMATESHEET\\nout float outCellIndex;\\n#ifdef ANIMATESHEETRANDOMSTART\\nout float outCellStartOffset;\\n#endif\\n#endif\\n#ifdef NOISE\\nout vec3 outNoiseCoordinates1;\\nout vec3 outNoiseCoordinates2;\\n#endif\\n#ifdef SIZEGRADIENTS\\nuniform sampler2D sizeGradientSampler;\\n#endif \\n#ifdef ANGULARSPEEDGRADIENTS\\nuniform sampler2D angularSpeedGradientSampler;\\n#endif \\n#ifdef VELOCITYGRADIENTS\\nuniform sampler2D velocityGradientSampler;\\n#endif\\n#ifdef LIMITVELOCITYGRADIENTS\\nuniform sampler2D limitVelocityGradientSampler;\\nuniform float limitVelocityDamping;\\n#endif\\n#ifdef DRAGGRADIENTS\\nuniform sampler2D dragGradientSampler;\\n#endif\\n#ifdef NOISE\\nuniform vec3 noiseStrength;\\nuniform sampler2D noiseSampler;\\n#endif\\n#ifdef ANIMATESHEET\\nuniform vec3 cellInfos;\\n#endif\\nvec3 getRandomVec3(float offset) {\\nreturn texture(randomSampler2,vec2(float(gl_VertexID)*offset/currentCount,0)).rgb;\\n}\\nvec4 getRandomVec4(float offset) {\\nreturn texture(randomSampler,vec2(float(gl_VertexID)*offset/currentCount,0));\\n}\\nvoid main() {\\nfloat newAge=age+timeDelta; \\n\\nif (newAge>=life && stopFactor != 0.) {\\nvec3 position;\\nvec3 direction;\\n\\nvec4 randoms=getRandomVec4(seed.x);\\n\\noutLife=lifeTime.x+(lifeTime.y-lifeTime.x)*randoms.r;\\noutAge=mod(newAge,outLife);\\n\\noutSeed=seed;\\n\\n#ifdef SIZEGRADIENTS \\noutSize.x=texture(sizeGradientSampler,vec2(0,0)).r;\\n#else\\noutSize.x=sizeRange.x+(sizeRange.y-sizeRange.x)*randoms.g;\\n#endif\\noutSize.y=scaleRange.x+(scaleRange.y-scaleRange.x)*randoms.b;\\noutSize.z=scaleRange.z+(scaleRange.w-scaleRange.z)*randoms.a; \\n#ifndef COLORGRADIENTS\\n\\noutColor=color1+(color2-color1)*randoms.b;\\n#endif\\n\\n#ifndef ANGULARSPEEDGRADIENTS \\noutAngle.y=angleRange.x+(angleRange.y-angleRange.x)*randoms.a;\\noutAngle.x=angleRange.z+(angleRange.w-angleRange.z)*randoms.r;\\n#else\\noutAngle=angleRange.z+(angleRange.w-angleRange.z)*randoms.r;\\n#endif \\n\\n#ifdef POINTEMITTER\\nvec3 randoms2=getRandomVec3(seed.y);\\nvec3 randoms3=getRandomVec3(seed.z);\\nposition=vec3(0,0,0);\\ndirection=direction1+(direction2-direction1)*randoms3;\\n#elif defined(BOXEMITTER)\\nvec3 randoms2=getRandomVec3(seed.y);\\nvec3 randoms3=getRandomVec3(seed.z);\\nposition=minEmitBox+(maxEmitBox-minEmitBox)*randoms2;\\ndirection=direction1+(direction2-direction1)*randoms3; \\n#elif defined(HEMISPHERICEMITTER)\\nvec3 randoms2=getRandomVec3(seed.y);\\nvec3 randoms3=getRandomVec3(seed.z);\\n\\nfloat phi=2.0*PI*randoms2.x;\\nfloat theta=acos(2.0*randoms2.y-1.0);\\nfloat randX=cos(phi)*sin(theta);\\nfloat randY=cos(theta);\\nfloat randZ=sin(phi)*sin(theta);\\nposition=(radius-(radius*radiusRange*randoms2.z))*vec3(randX,abs(randY),randZ);\\ndirection=position+directionRandomizer*randoms3; \\n#elif defined(SPHEREEMITTER)\\nvec3 randoms2=getRandomVec3(seed.y);\\nvec3 randoms3=getRandomVec3(seed.z);\\n\\nfloat phi=2.0*PI*randoms2.x;\\nfloat theta=acos(2.0*randoms2.y-1.0);\\nfloat randX=cos(phi)*sin(theta);\\nfloat randY=cos(theta);\\nfloat randZ=sin(phi)*sin(theta);\\nposition=(radius-(radius*radiusRange*randoms2.z))*vec3(randX,randY,randZ);\\n#ifdef DIRECTEDSPHEREEMITTER\\ndirection=direction1+(direction2-direction1)*randoms3;\\n#else\\n\\ndirection=position+directionRandomizer*randoms3;\\n#endif\\n#elif defined(CYLINDEREMITTER)\\nvec3 randoms2=getRandomVec3(seed.y);\\nvec3 randoms3=getRandomVec3(seed.z);\\n\\nfloat yPos=(randoms2.x-0.5)*height;\\nfloat angle=randoms2.y*PI*2.;\\nfloat inverseRadiusRangeSquared=((1.-radiusRange)*(1.-radiusRange));\\nfloat positionRadius=radius*sqrt(inverseRadiusRangeSquared+(randoms2.z*(1.-inverseRadiusRangeSquared)));\\nfloat xPos=positionRadius*cos(angle);\\nfloat zPos=positionRadius*sin(angle);\\nposition=vec3(xPos,yPos,zPos);\\n#ifdef DIRECTEDCYLINDEREMITTER\\ndirection=direction1+(direction2-direction1)*randoms3;\\n#else\\n\\nangle=angle+((randoms3.x-0.5)*PI);\\ndirection=vec3(cos(angle),randoms3.y-0.5,sin(angle));\\ndirection=normalize(direction);\\n#endif\\n#elif defined(CONEEMITTER)\\nvec3 randoms2=getRandomVec3(seed.y);\\nfloat s=2.0*PI*randoms2.x;\\n#ifdef CONEEMITTERSPAWNPOINT\\nfloat h=0.00001;\\n#else\\nfloat h=randoms2.y*height.y;\\n\\nh=1.-h*h; \\n#endif\\nfloat lRadius=radius.x-radius.x*randoms2.z*radius.y;\\nlRadius=lRadius*h;\\nfloat randX=lRadius*sin(s);\\nfloat randZ=lRadius*cos(s);\\nfloat randY=h*height.x;\\nposition=vec3(randX,randY,randZ); \\n\\nif (abs(cos(coneAngle)) == 1.0) {\\ndirection=vec3(0.,1.0,0.);\\n} else {\\nvec3 randoms3=getRandomVec3(seed.z);\\ndirection=position+directionRandomizer*randoms3;\\n}\\n#else \\n\\nposition=vec3(0.,0.,0.);\\n\\ndirection=2.0*(getRandomVec3(seed.w)-vec3(0.5,0.5,0.5));\\n#endif\\nfloat power=emitPower.x+(emitPower.y-emitPower.x)*randoms.a;\\noutPosition=(emitterWM*vec4(position,1.)).xyz;\\nvec3 initial=(emitterWM*vec4(direction,0.)).xyz;\\noutDirection=initial*power;\\n#ifndef BILLBOARD \\noutInitialDirection=initial;\\n#endif\\n#ifdef ANIMATESHEET \\noutCellIndex=cellInfos.x;\\n#ifdef ANIMATESHEETRANDOMSTART\\noutCellStartOffset=randoms.a*outLife;\\n#endif \\n#endif\\n#ifdef NOISE\\noutNoiseCoordinates1=noiseCoordinates1;\\noutNoiseCoordinates2=noiseCoordinates2;\\n#endif\\n} else {\\nfloat directionScale=timeDelta;\\noutAge=newAge;\\nfloat ageGradient=newAge/life;\\n#ifdef VELOCITYGRADIENTS\\ndirectionScale*=texture(velocityGradientSampler,vec2(ageGradient,0)).r;\\n#endif\\n#ifdef DRAGGRADIENTS\\ndirectionScale*=1.0-texture(dragGradientSampler,vec2(ageGradient,0)).r;\\n#endif\\noutPosition=position+direction*directionScale;\\noutLife=life;\\noutSeed=seed;\\n#ifndef COLORGRADIENTS \\noutColor=color;\\n#endif\\n#ifdef SIZEGRADIENTS\\noutSize.x=texture(sizeGradientSampler,vec2(ageGradient,0)).r;\\noutSize.yz=size.yz;\\n#else\\noutSize=size;\\n#endif \\n#ifndef BILLBOARD \\noutInitialDirection=initialDirection;\\n#endif\\nvec3 updatedDirection=direction+gravity*timeDelta;\\n#ifdef LIMITVELOCITYGRADIENTS\\nfloat limitVelocity=texture(limitVelocityGradientSampler,vec2(ageGradient,0)).r;\\nfloat currentVelocity=length(updatedDirection);\\nif (currentVelocity>limitVelocity) {\\nupdatedDirection=updatedDirection*limitVelocityDamping;\\n}\\n#endif\\noutDirection=updatedDirection;\\n#ifdef NOISE\\nvec3 localPosition=outPosition-emitterWM[3].xyz;\\nfloat fetchedR=texture(noiseSampler,vec2(noiseCoordinates1.x,noiseCoordinates1.y)*vec2(0.5)+vec2(0.5)).r;\\nfloat fetchedG=texture(noiseSampler,vec2(noiseCoordinates1.z,noiseCoordinates2.x)*vec2(0.5)+vec2(0.5)).r;\\nfloat fetchedB=texture(noiseSampler,vec2(noiseCoordinates2.y,noiseCoordinates2.z)*vec2(0.5)+vec2(0.5)).r;\\nvec3 force=vec3(2.*fetchedR-1.,2.*fetchedG-1.,2.*fetchedB-1.)*noiseStrength;\\noutDirection=outDirection+force*timeDelta;\\noutNoiseCoordinates1=noiseCoordinates1;\\noutNoiseCoordinates2=noiseCoordinates2;\\n#endif \\n#ifdef ANGULARSPEEDGRADIENTS\\nfloat angularSpeed=texture(angularSpeedGradientSampler,vec2(ageGradient,0)).r;\\noutAngle=angle+angularSpeed*timeDelta;\\n#else\\noutAngle=vec2(angle.x+angle.y*timeDelta,angle.y);\\n#endif\\n#ifdef ANIMATESHEET \\nfloat offsetAge=outAge;\\nfloat dist=cellInfos.y-cellInfos.x;\\n#ifdef ANIMATESHEETRANDOMSTART\\noutCellStartOffset=cellStartOffset;\\noffsetAge+=cellStartOffset;\\n#endif \\nfloat ratio=clamp(mod(offsetAge*cellInfos.z,life)/life,0.,1.0);\\noutCellIndex=float(int(cellInfos.x+ratio*dist));\\n#endif\\n}\\n}\",gpuUpdateParticlesPixelShader:\"#version 300 es\\nvoid main() {\\ndiscard;\\n}\\n\",postprocessVertexShader:\"\\nattribute vec2 position;\\nuniform vec2 scale;\\n\\nvarying vec2 vUV;\\nconst vec2 madd=vec2(0.5,0.5);\\nvoid main(void) { \\nvUV=(position*madd+madd)*scale;\\ngl_Position=vec4(position,0.0,1.0);\\n}\",passPixelShader:\"\\nvarying vec2 vUV;\\nuniform sampler2D textureSampler;\\nvoid main(void) \\n{\\ngl_FragColor=texture2D(textureSampler,vUV);\\n}\",shadowMapVertexShader:\"\\nattribute vec3 position;\\n#ifdef NORMAL\\nattribute vec3 normal;\\nuniform vec3 lightData;\\n#endif\\n#include<bonesDeclaration>\\n#include<morphTargetsVertexGlobalDeclaration>\\n#include<morphTargetsVertexDeclaration>[0..maxSimultaneousMorphTargets]\\n\\n#include<instancesDeclaration>\\n#include<helperFunctions>\\nuniform mat4 viewProjection;\\nuniform vec3 biasAndScale;\\nuniform vec2 depthValues;\\nvarying float vDepthMetric;\\n#ifdef ALPHATEST\\nvarying vec2 vUV;\\nuniform mat4 diffuseMatrix;\\n#ifdef UV1\\nattribute vec2 uv;\\n#endif\\n#ifdef UV2\\nattribute vec2 uv2;\\n#endif\\n#endif\\nvoid main(void)\\n{\\nvec3 positionUpdated=position;\\n#include<morphTargetsVertex>[0..maxSimultaneousMorphTargets]\\n#include<instancesVertex>\\n#include<bonesVertex>\\nvec4 worldPos=finalWorld*vec4(positionUpdated,1.0);\\n\\n#ifdef NORMAL\\nmat3 normalWorld=mat3(finalWorld);\\n#ifdef NONUNIFORMSCALING\\nnormalWorld=transposeMat3(inverseMat3(normalWorld));\\n#endif\\nvec3 worldNor=normalize(normalWorld*normal);\\n#ifdef DIRECTIONINLIGHTDATA\\nvec3 worldLightDir=normalize(-lightData.xyz);\\n#else\\nvec3 directionToLight=lightData.xyz-worldPos.xyz;\\nvec3 worldLightDir=normalize(directionToLight);\\n#endif\\nfloat ndl=dot(worldNor,worldLightDir);\\nfloat sinNL=sqrt(1.0-ndl*ndl);\\nfloat normalBias=biasAndScale.y*sinNL;\\nworldPos.xyz-=worldNor*normalBias;\\n#endif\\n\\ngl_Position=viewProjection*worldPos;\\n#ifdef DEPTHTEXTURE\\n\\ngl_Position.z+=biasAndScale.x*gl_Position.w;\\n#endif\\n\\nvDepthMetric=((gl_Position.z+depthValues.x)/(depthValues.y))+biasAndScale.x;\\n#ifdef ALPHATEST\\n#ifdef UV1\\nvUV=vec2(diffuseMatrix*vec4(uv,1.0,0.0));\\n#endif\\n#ifdef UV2\\nvUV=vec2(diffuseMatrix*vec4(uv2,1.0,0.0));\\n#endif\\n#endif\\n}\",shadowMapPixelShader:\"#ifndef FLOAT\\nvec4 pack(float depth)\\n{\\nconst vec4 bit_shift=vec4(255.0*255.0*255.0,255.0*255.0,255.0,1.0);\\nconst vec4 bit_mask=vec4(0.0,1.0/255.0,1.0/255.0,1.0/255.0);\\nvec4 res=fract(depth*bit_shift);\\nres-=res.xxyz*bit_mask;\\nreturn res;\\n}\\n#endif\\nvarying float vDepthMetric;\\n#ifdef ALPHATEST\\nvarying vec2 vUV;\\nuniform sampler2D diffuseSampler;\\n#endif\\nuniform vec3 biasAndScale;\\nuniform vec2 depthValues;\\nvoid main(void)\\n{\\n#ifdef ALPHATEST\\nif (texture2D(diffuseSampler,vUV).a<0.4)\\ndiscard;\\n#endif\\nfloat depth=vDepthMetric;\\n#ifdef ESM\\ndepth=clamp(exp(-min(87.,biasAndScale.z*depth)),0.,1.);\\n#endif\\n#ifdef FLOAT\\ngl_FragColor=vec4(depth,1.0,1.0,1.0);\\n#else\\ngl_FragColor=pack(depth);\\n#endif\\n}\",depthBoxBlurPixelShader:\"\\nvarying vec2 vUV;\\nuniform sampler2D textureSampler;\\n\\nuniform vec2 screenSize;\\nvoid main(void)\\n{\\nvec4 colorDepth=vec4(0.0);\\nfor (int x=-OFFSET; x<=OFFSET; x++)\\nfor (int y=-OFFSET; y<=OFFSET; y++)\\ncolorDepth+=texture2D(textureSampler,vUV+vec2(x,y)/screenSize);\\ngl_FragColor=(colorDepth/float((OFFSET*2+1)*(OFFSET*2+1)));\\n}\",proceduralVertexShader:\"\\nattribute vec2 position;\\n\\nvarying vec2 vPosition;\\nvarying vec2 vUV;\\nconst vec2 madd=vec2(0.5,0.5);\\nvoid main(void) { \\nvPosition=position;\\nvUV=position*madd+madd;\\ngl_Position=vec4(position,0.0,1.0);\\n}\",depthVertexShader:\"\\nattribute vec3 position;\\n#include<bonesDeclaration>\\n\\n#include<instancesDeclaration>\\nuniform mat4 viewProjection;\\nuniform vec2 depthValues;\\n#if defined(ALPHATEST) || defined(NEED_UV)\\nvarying vec2 vUV;\\nuniform mat4 diffuseMatrix;\\n#ifdef UV1\\nattribute vec2 uv;\\n#endif\\n#ifdef UV2\\nattribute vec2 uv2;\\n#endif\\n#endif\\nvarying float vDepthMetric;\\nvoid main(void)\\n{\\n#include<instancesVertex>\\n#include<bonesVertex>\\ngl_Position=viewProjection*finalWorld*vec4(position,1.0);\\nvDepthMetric=((gl_Position.z+depthValues.x)/(depthValues.y));\\n#if defined(ALPHATEST) || defined(BASIC_RENDER)\\n#ifdef UV1\\nvUV=vec2(diffuseMatrix*vec4(uv,1.0,0.0));\\n#endif\\n#ifdef UV2\\nvUV=vec2(diffuseMatrix*vec4(uv2,1.0,0.0));\\n#endif\\n#endif\\n}\",depthPixelShader:\"#ifdef ALPHATEST\\nvarying vec2 vUV;\\nuniform sampler2D diffuseSampler;\\n#endif\\nvarying float vDepthMetric;\\nvoid main(void)\\n{\\n#ifdef ALPHATEST\\nif (texture2D(diffuseSampler,vUV).a<0.4)\\ndiscard;\\n#endif\\ngl_FragColor=vec4(vDepthMetric,vDepthMetric*vDepthMetric,0.0,1.0);\\n}\",geometryVertexShader:\"precision highp float;\\nprecision highp int;\\n#include<bonesDeclaration>\\n#include<instancesDeclaration>\\nattribute vec3 position;\\nattribute vec3 normal;\\n#if defined(ALPHATEST) || defined(NEED_UV)\\nvarying vec2 vUV;\\nuniform mat4 diffuseMatrix;\\n#ifdef UV1\\nvarying vec2 uv;\\n#endif\\n#ifdef UV2\\nvarying vec2 uv2;\\n#endif\\n#endif\\n\\nuniform mat4 viewProjection;\\nuniform mat4 view;\\nvarying vec3 vNormalV;\\nvarying vec4 vViewPos;\\n#ifdef POSITION\\nvarying vec3 vPosition;\\n#endif\\nvoid main(void)\\n{\\n#include<instancesVertex>\\n#include<bonesVertex>\\nvec4 pos=vec4(finalWorld*vec4(position,1.0));\\nvNormalV=normalize(vec3((view*finalWorld)*vec4(normal,0.0)));\\nvViewPos=view*pos;\\n#ifdef POSITION\\nvPosition=pos.xyz/pos.w;\\n#endif\\ngl_Position=viewProjection*finalWorld*vec4(position,1.0);\\n#if defined(ALPHATEST) || defined(BASIC_RENDER)\\n#ifdef UV1\\nvUV=vec2(diffuseMatrix*vec4(uv,1.0,0.0));\\n#endif\\n#ifdef UV2\\nvUV=vec2(diffuseMatrix*vec4(uv2,1.0,0.0));\\n#endif\\n#endif\\n}\",geometryPixelShader:\"#extension GL_EXT_draw_buffers : require\\nprecision highp float;\\nprecision highp int;\\nvarying vec3 vNormalV;\\nvarying vec4 vViewPos;\\n#ifdef POSITION\\nvarying vec3 vPosition;\\n#endif\\n#ifdef ALPHATEST\\nvarying vec2 vUV;\\nuniform sampler2D diffuseSampler;\\n#endif\\n#ifdef POSITION\\n#include<mrtFragmentDeclaration>[3]\\n#else\\n#include<mrtFragmentDeclaration>[2]\\n#endif\\nvoid main() {\\n#ifdef ALPHATEST\\nif (texture2D(diffuseSampler,vUV).a<0.4)\\ndiscard;\\n#endif\\ngl_FragData[0]=vec4(vViewPos.z/vViewPos.w,0.0,0.0,1.0);\\n\\ngl_FragData[1]=vec4(normalize(vNormalV),1.0);\\n\\n#ifdef POSITION\\ngl_FragData[2]=vec4(vPosition,1.0);\\n#endif\\n}\",ssaoPixelShader:\"\\nuniform sampler2D textureSampler;\\nvarying vec2 vUV;\\n#ifdef SSAO\\nuniform sampler2D randomSampler;\\nuniform float randTextureTiles;\\nuniform float samplesFactor;\\nuniform vec3 sampleSphere[SAMPLES];\\nuniform float totalStrength;\\nuniform float radius;\\nuniform float area;\\nuniform float fallOff;\\nuniform float base;\\nvec3 normalFromDepth(float depth,vec2 coords)\\n{\\nvec2 offset1=vec2(0.0,radius);\\nvec2 offset2=vec2(radius,0.0);\\nfloat depth1=texture2D(textureSampler,coords+offset1).r;\\nfloat depth2=texture2D(textureSampler,coords+offset2).r;\\nvec3 p1=vec3(offset1,depth1-depth);\\nvec3 p2=vec3(offset2,depth2-depth);\\nvec3 normal=cross(p1,p2);\\nnormal.z=-normal.z;\\nreturn normalize(normal);\\n}\\nvoid main()\\n{\\nvec3 random=normalize(texture2D(randomSampler,vUV*randTextureTiles).rgb);\\nfloat depth=texture2D(textureSampler,vUV).r;\\nvec3 position=vec3(vUV,depth);\\nvec3 normal=normalFromDepth(depth,vUV);\\nfloat radiusDepth=radius/depth;\\nfloat occlusion=0.0;\\nvec3 ray;\\nvec3 hemiRay;\\nfloat occlusionDepth;\\nfloat difference;\\nfor (int i=0; i<SAMPLES; i++)\\n{\\nray=radiusDepth*reflect(sampleSphere[i],random);\\nhemiRay=position+sign(dot(ray,normal))*ray;\\nocclusionDepth=texture2D(textureSampler,clamp(hemiRay.xy,vec2(0.001,0.001),vec2(0.999,0.999))).r;\\ndifference=depth-occlusionDepth;\\nocclusion+=step(fallOff,difference)*(1.0-smoothstep(fallOff,area,difference));\\n}\\nfloat ao=1.0-totalStrength*occlusion*samplesFactor;\\nfloat result=clamp(ao+base,0.0,1.0);\\ngl_FragColor.r=result;\\ngl_FragColor.g=result;\\ngl_FragColor.b=result;\\ngl_FragColor.a=1.0;\\n}\\n#endif\\n\",ssao2PixelShader:\"\\nprecision highp float;\\nuniform sampler2D textureSampler;\\nuniform float near;\\nuniform float far;\\nuniform float radius;\\nfloat scales[16]=float[16](\\n0.1,\\n0.11406250000000001,\\n0.131640625,\\n0.15625,\\n0.187890625,\\n0.2265625,\\n0.272265625,\\n0.325,\\n0.384765625,\\n0.4515625,\\n0.525390625,\\n0.60625,\\n0.694140625,\\n0.7890625,\\n0.891015625,\\n1.0\\n);\\nvarying vec2 vUV;\\nfloat perspectiveDepthToViewZ( const in float invClipZ,const in float near,const in float far ) {\\nreturn ( near*far )/( ( far-near )*invClipZ-far );\\n}\\nfloat viewZToPerspectiveDepth( const in float viewZ,const in float near,const in float far ) {\\nreturn ( near*far/viewZ+far)/( far-near );\\n}\\nfloat viewZToOrthographicDepth( const in float viewZ,const in float near,const in float far ) {\\nreturn ( viewZ+near )/( near-far );\\n}\\n#ifdef SSAO\\nuniform sampler2D randomSampler;\\nuniform sampler2D normalSampler;\\nuniform float randTextureTiles;\\nuniform float samplesFactor;\\nuniform vec3 sampleSphere[SAMPLES];\\nuniform float totalStrength;\\nuniform float base;\\nuniform float xViewport;\\nuniform float yViewport;\\nuniform float maxZ;\\nuniform float minZAspect;\\nuniform vec2 texelSize;\\nuniform mat4 projection;\\nvoid main()\\n{\\nvec3 random=texture2D(randomSampler,vUV*randTextureTiles).rgb;\\nfloat depth=texture2D(textureSampler,vUV).r;\\nfloat depthSign=depth/abs(depth);\\ndepth=depth*depthSign;\\nvec3 normal=texture2D(normalSampler,vUV).rgb; \\nfloat occlusion=0.0;\\nfloat correctedRadius=min(radius,minZAspect*depth/near);\\nvec3 vViewRay=vec3((vUV.x*2.0-1.0)*xViewport,(vUV.y*2.0-1.0)*yViewport,depthSign);\\nvec3 origin=vViewRay*depth;\\nvec3 rvec=random*2.0-1.0;\\nrvec.z=0.0;\\n\\nfloat dotProduct=dot(rvec,normal);\\nrvec=1.0-abs(dotProduct)>1e-2 ? rvec : vec3(-rvec.y,0.0,rvec.x);\\nvec3 tangent=normalize(rvec-normal*dot(rvec,normal));\\nvec3 bitangent=cross(normal,tangent);\\nmat3 tbn=mat3(tangent,bitangent,normal);\\nfloat difference;\\nfor (int i=0; i<SAMPLES; ++i) {\\n\\nvec3 samplePosition=scales[(i+int(random.x*16.0)) % 16]*tbn*sampleSphere[(i+int(random.y*16.0)) % 16];\\nsamplePosition=samplePosition*correctedRadius+origin;\\n\\nvec4 offset=vec4(samplePosition,1.0);\\noffset=projection*offset;\\noffset.xyz/=offset.w;\\noffset.xy=offset.xy*0.5+0.5;\\nif (offset.x<0.0 || offset.y<0.0 || offset.x>1.0 || offset.y>1.0) {\\ncontinue;\\n}\\n\\nfloat sampleDepth=abs(texture2D(textureSampler,offset.xy).r);\\n\\ndifference=depthSign*samplePosition.z-sampleDepth;\\nfloat rangeCheck=1.0-smoothstep(correctedRadius*0.5,correctedRadius,difference);\\nocclusion+=(difference>=0.0 ? 1.0 : 0.0)*rangeCheck;\\n}\\nocclusion=occlusion*(1.0-smoothstep(maxZ*0.75,maxZ,depth));\\nfloat ao=1.0-totalStrength*occlusion*samplesFactor;\\nfloat result=clamp(ao+base,0.0,1.0);\\ngl_FragColor=vec4(vec3(result),1.0);\\n}\\n#endif\\n#ifdef BILATERAL_BLUR\\nuniform sampler2D depthSampler;\\nuniform float outSize;\\nuniform float samplerOffsets[SAMPLES];\\nvec4 blur9(sampler2D image,vec2 uv,float resolution,vec2 direction) {\\nvec4 color=vec4(0.0);\\nvec2 off1=vec2(1.3846153846)*direction;\\nvec2 off2=vec2(3.2307692308)*direction;\\ncolor+=texture2D(image,uv)*0.2270270270;\\ncolor+=texture2D(image,uv+(off1/resolution))*0.3162162162;\\ncolor+=texture2D(image,uv-(off1/resolution))*0.3162162162;\\ncolor+=texture2D(image,uv+(off2/resolution))*0.0702702703;\\ncolor+=texture2D(image,uv-(off2/resolution))*0.0702702703;\\nreturn color;\\n}\\nvec4 blur13(sampler2D image,vec2 uv,float resolution,vec2 direction) {\\nvec4 color=vec4(0.0);\\nvec2 off1=vec2(1.411764705882353)*direction;\\nvec2 off2=vec2(3.2941176470588234)*direction;\\nvec2 off3=vec2(5.176470588235294)*direction;\\ncolor+=texture2D(image,uv)*0.1964825501511404;\\ncolor+=texture2D(image,uv+(off1/resolution))*0.2969069646728344;\\ncolor+=texture2D(image,uv-(off1/resolution))*0.2969069646728344;\\ncolor+=texture2D(image,uv+(off2/resolution))*0.09447039785044732;\\ncolor+=texture2D(image,uv-(off2/resolution))*0.09447039785044732;\\ncolor+=texture2D(image,uv+(off3/resolution))*0.010381362401148057;\\ncolor+=texture2D(image,uv-(off3/resolution))*0.010381362401148057;\\nreturn color;\\n}\\nvec4 blur13Bilateral(sampler2D image,vec2 uv,float resolution,vec2 direction) {\\nvec4 color=vec4(0.0);\\nvec2 off1=vec2(1.411764705882353)*direction;\\nvec2 off2=vec2(3.2941176470588234)*direction;\\nvec2 off3=vec2(5.176470588235294)*direction;\\nfloat compareDepth=abs(texture2D(depthSampler,uv).r);\\nfloat sampleDepth;\\nfloat weight;\\nfloat weightSum=30.0;\\ncolor+=texture2D(image,uv)*30.0;\\nsampleDepth=abs(texture2D(depthSampler,uv+(off1/resolution)).r);\\nweight=clamp(1.0/( 0.003+abs(compareDepth-sampleDepth)),0.0,30.0);\\nweightSum+=weight;\\ncolor+=texture2D(image,uv+(off1/resolution))*weight;\\nsampleDepth=abs(texture2D(depthSampler,uv-(off1/resolution)).r);\\nweight=clamp(1.0/( 0.003+abs(compareDepth-sampleDepth)),0.0,30.0);\\nweightSum+=weight;\\ncolor+=texture2D(image,uv-(off1/resolution))*weight;\\nsampleDepth=abs(texture2D(depthSampler,uv+(off2/resolution)).r);\\nweight=clamp(1.0/( 0.003+abs(compareDepth-sampleDepth)),0.0,30.0);\\nweightSum+=weight;\\ncolor+=texture2D(image,uv+(off2/resolution))*weight;\\nsampleDepth=abs(texture2D(depthSampler,uv-(off2/resolution)).r);\\nweight=clamp(1.0/( 0.003+abs(compareDepth-sampleDepth)),0.0,30.0);\\nweightSum+=weight;\\ncolor+=texture2D(image,uv-(off2/resolution))*weight;\\nsampleDepth=abs(texture2D(depthSampler,uv+(off3/resolution)).r);\\nweight=clamp(1.0/( 0.003+abs(compareDepth-sampleDepth)),0.0,30.0);\\nweightSum+=weight;\\ncolor+=texture2D(image,uv+(off3/resolution))*weight;\\nsampleDepth=abs(texture2D(depthSampler,uv-(off3/resolution)).r);\\nweight=clamp(1.0/( 0.003+abs(compareDepth-sampleDepth)),0.0,30.0);\\nweightSum+=weight;\\ncolor+=texture2D(image,uv-(off3/resolution))*weight;\\nreturn color/weightSum;\\n}\\nvoid main()\\n{\\n#if EXPENSIVE\\nfloat compareDepth=abs(texture2D(depthSampler,vUV).r);\\nfloat texelsize=1.0/outSize;\\nfloat result=0.0;\\nfloat weightSum=0.0;\\nfor (int i=0; i<SAMPLES; ++i)\\n{\\n#ifdef BILATERAL_BLUR_H\\nvec2 direction=vec2(1.0,0.0);\\nvec2 sampleOffset=vec2(texelsize*samplerOffsets[i],0.0);\\n#else\\nvec2 direction=vec2(0.0,1.0);\\nvec2 sampleOffset=vec2(0.0,texelsize*samplerOffsets[i]);\\n#endif\\nvec2 samplePos=vUV+sampleOffset;\\nfloat sampleDepth=abs(texture2D(depthSampler,samplePos).r);\\nfloat weight=clamp(1.0/( 0.003+abs(compareDepth-sampleDepth)),0.0,30000.0);\\nresult+=texture2D(textureSampler,samplePos).r*weight;\\nweightSum+=weight;\\n}\\nresult/=weightSum;\\ngl_FragColor.rgb=vec3(result);\\ngl_FragColor.a=1.0;\\n#else\\nvec4 color;\\n#ifdef BILATERAL_BLUR_H\\nvec2 direction=vec2(1.0,0.0);\\ncolor=blur13Bilateral(textureSampler,vUV,outSize,direction);\\n#else\\nvec2 direction=vec2(0.0,1.0);\\ncolor=blur13Bilateral(textureSampler,vUV,outSize,direction);\\n#endif\\ngl_FragColor.rgb=vec3(color.r);\\ngl_FragColor.a=1.0;\\n#endif\\n}\\n#endif\\n\",ssaoCombinePixelShader:\"uniform sampler2D textureSampler;\\nuniform sampler2D originalColor;\\nuniform vec4 viewport;\\nvarying vec2 vUV;\\nvoid main(void) {\\nvec4 ssaoColor=texture2D(textureSampler,viewport.xy+vUV*viewport.zw);\\nvec4 sceneColor=texture2D(originalColor,vUV);\\ngl_FragColor=sceneColor*ssaoColor;\\n}\\n\",lensHighlightsPixelShader:\"\\nuniform sampler2D textureSampler; \\n\\nuniform float gain;\\nuniform float threshold;\\nuniform float screen_width;\\nuniform float screen_height;\\n\\nvarying vec2 vUV;\\n\\nvec4 highlightColor(vec4 color) {\\nvec4 highlight=color;\\nfloat luminance=dot(highlight.rgb,vec3(0.2125,0.7154,0.0721));\\nfloat lum_threshold;\\nif (threshold>1.0) { lum_threshold=0.94+0.01*threshold; }\\nelse { lum_threshold=0.5+0.44*threshold; }\\nluminance=clamp((luminance-lum_threshold)*(1.0/(1.0-lum_threshold)),0.0,1.0);\\nhighlight*=luminance*gain;\\nhighlight.a=1.0;\\nreturn highlight;\\n}\\nvoid main(void)\\n{\\nvec4 original=texture2D(textureSampler,vUV);\\n\\nif (gain == -1.0) {\\ngl_FragColor=vec4(0.0,0.0,0.0,1.0);\\nreturn;\\n}\\nfloat w=2.0/screen_width;\\nfloat h=2.0/screen_height;\\nfloat weight=1.0;\\n\\nvec4 blurred=vec4(0.0,0.0,0.0,0.0);\\n#ifdef PENTAGON\\nblurred+=highlightColor(texture2D(textureSampler,vUV+vec2(-0.84*w,0.43*h)));\\nblurred+=highlightColor(texture2D(textureSampler,vUV+vec2(0.48*w,-1.29*h)));\\nblurred+=highlightColor(texture2D(textureSampler,vUV+vec2(0.61*w,1.51*h)));\\nblurred+=highlightColor(texture2D(textureSampler,vUV+vec2(-1.55*w,-0.74*h)));\\nblurred+=highlightColor(texture2D(textureSampler,vUV+vec2(1.71*w,-0.52*h)));\\nblurred+=highlightColor(texture2D(textureSampler,vUV+vec2(-0.94*w,1.59*h)));\\nblurred+=highlightColor(texture2D(textureSampler,vUV+vec2(-0.40*w,-1.87*h)));\\nblurred+=highlightColor(texture2D(textureSampler,vUV+vec2(1.62*w,1.16*h)));\\nblurred+=highlightColor(texture2D(textureSampler,vUV+vec2(-2.09*w,0.25*h)));\\nblurred+=highlightColor(texture2D(textureSampler,vUV+vec2(1.46*w,-1.71*h)));\\nblurred+=highlightColor(texture2D(textureSampler,vUV+vec2(0.08*w,2.42*h)));\\nblurred+=highlightColor(texture2D(textureSampler,vUV+vec2(-1.85*w,-1.89*h)));\\nblurred+=highlightColor(texture2D(textureSampler,vUV+vec2(2.89*w,0.16*h)));\\nblurred+=highlightColor(texture2D(textureSampler,vUV+vec2(-2.29*w,1.88*h)));\\nblurred+=highlightColor(texture2D(textureSampler,vUV+vec2(0.40*w,-2.81*h)));\\nblurred+=highlightColor(texture2D(textureSampler,vUV+vec2(1.54*w,2.26*h)));\\nblurred+=highlightColor(texture2D(textureSampler,vUV+vec2(-2.60*w,-0.61*h)));\\nblurred+=highlightColor(texture2D(textureSampler,vUV+vec2(2.31*w,-1.30*h)));\\nblurred+=highlightColor(texture2D(textureSampler,vUV+vec2(-0.83*w,2.53*h)));\\nblurred+=highlightColor(texture2D(textureSampler,vUV+vec2(-1.12*w,-2.48*h)));\\nblurred+=highlightColor(texture2D(textureSampler,vUV+vec2(2.60*w,1.11*h)));\\nblurred+=highlightColor(texture2D(textureSampler,vUV+vec2(-2.82*w,0.99*h)));\\nblurred+=highlightColor(texture2D(textureSampler,vUV+vec2(1.50*w,-2.81*h)));\\nblurred+=highlightColor(texture2D(textureSampler,vUV+vec2(0.85*w,3.33*h)));\\nblurred+=highlightColor(texture2D(textureSampler,vUV+vec2(-2.94*w,-1.92*h)));\\nblurred+=highlightColor(texture2D(textureSampler,vUV+vec2(3.27*w,-0.53*h)));\\nblurred+=highlightColor(texture2D(textureSampler,vUV+vec2(-1.95*w,2.48*h)));\\nblurred+=highlightColor(texture2D(textureSampler,vUV+vec2(-0.23*w,-3.04*h)));\\nblurred+=highlightColor(texture2D(textureSampler,vUV+vec2(2.17*w,2.05*h)));\\nblurred+=highlightColor(texture2D(textureSampler,vUV+vec2(-2.97*w,-0.04*h)));\\nblurred+=highlightColor(texture2D(textureSampler,vUV+vec2(2.25*w,-2.00*h)));\\nblurred+=highlightColor(texture2D(textureSampler,vUV+vec2(-0.31*w,3.08*h)));\\nblurred+=highlightColor(texture2D(textureSampler,vUV+vec2(-1.94*w,-2.59*h)));\\nblurred+=highlightColor(texture2D(textureSampler,vUV+vec2(3.37*w,0.64*h)));\\nblurred+=highlightColor(texture2D(textureSampler,vUV+vec2(-3.13*w,1.93*h)));\\nblurred+=highlightColor(texture2D(textureSampler,vUV+vec2(1.03*w,-3.65*h)));\\nblurred+=highlightColor(texture2D(textureSampler,vUV+vec2(1.60*w,3.17*h)));\\nblurred+=highlightColor(texture2D(textureSampler,vUV+vec2(-3.14*w,-1.19*h)));\\nblurred+=highlightColor(texture2D(textureSampler,vUV+vec2(3.00*w,-1.19*h)));\\n#else\\nblurred+=highlightColor(texture2D(textureSampler,vUV+vec2(-0.85*w,0.36*h)));\\nblurred+=highlightColor(texture2D(textureSampler,vUV+vec2(0.52*w,-1.14*h)));\\nblurred+=highlightColor(texture2D(textureSampler,vUV+vec2(0.46*w,1.42*h)));\\nblurred+=highlightColor(texture2D(textureSampler,vUV+vec2(-1.46*w,-0.83*h)));\\nblurred+=highlightColor(texture2D(textureSampler,vUV+vec2(1.79*w,-0.42*h)));\\nblurred+=highlightColor(texture2D(textureSampler,vUV+vec2(-1.11*w,1.62*h)));\\nblurred+=highlightColor(texture2D(textureSampler,vUV+vec2(-0.29*w,-2.07*h)));\\nblurred+=highlightColor(texture2D(textureSampler,vUV+vec2(1.69*w,1.39*h)));\\nblurred+=highlightColor(texture2D(textureSampler,vUV+vec2(-2.28*w,0.12*h)));\\nblurred+=highlightColor(texture2D(textureSampler,vUV+vec2(1.65*w,-1.69*h)));\\nblurred+=highlightColor(texture2D(textureSampler,vUV+vec2(-0.08*w,2.44*h)));\\nblurred+=highlightColor(texture2D(textureSampler,vUV+vec2(-1.63*w,-1.90*h)));\\nblurred+=highlightColor(texture2D(textureSampler,vUV+vec2(2.55*w,0.31*h)));\\nblurred+=highlightColor(texture2D(textureSampler,vUV+vec2(-2.13*w,1.52*h)));\\nblurred+=highlightColor(texture2D(textureSampler,vUV+vec2(0.56*w,-2.61*h)));\\nblurred+=highlightColor(texture2D(textureSampler,vUV+vec2(1.38*w,2.34*h)));\\nblurred+=highlightColor(texture2D(textureSampler,vUV+vec2(-2.64*w,-0.81*h)));\\nblurred+=highlightColor(texture2D(textureSampler,vUV+vec2(2.53*w,-1.21*h)));\\nblurred+=highlightColor(texture2D(textureSampler,vUV+vec2(-1.06*w,2.63*h)));\\nblurred+=highlightColor(texture2D(textureSampler,vUV+vec2(-1.00*w,-2.69*h)));\\nblurred+=highlightColor(texture2D(textureSampler,vUV+vec2(2.59*w,1.32*h)));\\nblurred+=highlightColor(texture2D(textureSampler,vUV+vec2(-2.82*w,0.78*h)));\\nblurred+=highlightColor(texture2D(textureSampler,vUV+vec2(1.57*w,-2.50*h)));\\nblurred+=highlightColor(texture2D(textureSampler,vUV+vec2(0.54*w,2.93*h)));\\nblurred+=highlightColor(texture2D(textureSampler,vUV+vec2(-2.39*w,-1.81*h)));\\nblurred+=highlightColor(texture2D(textureSampler,vUV+vec2(3.01*w,-0.28*h)));\\nblurred+=highlightColor(texture2D(textureSampler,vUV+vec2(-2.04*w,2.25*h)));\\nblurred+=highlightColor(texture2D(textureSampler,vUV+vec2(-0.02*w,-3.05*h)));\\nblurred+=highlightColor(texture2D(textureSampler,vUV+vec2(2.09*w,2.25*h)));\\nblurred+=highlightColor(texture2D(textureSampler,vUV+vec2(-3.07*w,-0.25*h)));\\nblurred+=highlightColor(texture2D(textureSampler,vUV+vec2(2.44*w,-1.90*h)));\\nblurred+=highlightColor(texture2D(textureSampler,vUV+vec2(-0.52*w,3.05*h)));\\nblurred+=highlightColor(texture2D(textureSampler,vUV+vec2(-1.68*w,-2.61*h)));\\nblurred+=highlightColor(texture2D(textureSampler,vUV+vec2(3.01*w,0.79*h)));\\nblurred+=highlightColor(texture2D(textureSampler,vUV+vec2(-2.76*w,1.46*h)));\\nblurred+=highlightColor(texture2D(textureSampler,vUV+vec2(1.05*w,-2.94*h)));\\nblurred+=highlightColor(texture2D(textureSampler,vUV+vec2(1.21*w,2.88*h)));\\nblurred+=highlightColor(texture2D(textureSampler,vUV+vec2(-2.84*w,-1.30*h)));\\nblurred+=highlightColor(texture2D(textureSampler,vUV+vec2(2.98*w,-0.96*h)));\\n#endif\\nblurred/=39.0;\\ngl_FragColor=blurred;\\n\\n}\",depthOfFieldPixelShader:\"\\n\\n\\n\\n\\nuniform sampler2D textureSampler;\\nuniform sampler2D highlightsSampler;\\nuniform sampler2D depthSampler;\\nuniform sampler2D grainSampler;\\n\\nuniform float grain_amount;\\nuniform bool blur_noise;\\nuniform float screen_width;\\nuniform float screen_height;\\nuniform float distortion;\\nuniform bool dof_enabled;\\n\\nuniform float screen_distance; \\nuniform float aperture;\\nuniform float darken;\\nuniform float edge_blur;\\nuniform bool highlights;\\n\\nuniform float near;\\nuniform float far;\\n\\nvarying vec2 vUV;\\n\\n#define PI 3.14159265\\n#define TWOPI 6.28318530\\n#define inverse_focal_length 0.1 \\n\\nvec2 centered_screen_pos;\\nvec2 distorted_coords;\\nfloat radius2;\\nfloat radius;\\n\\nvec2 rand(vec2 co)\\n{\\nfloat noise1=(fract(sin(dot(co,vec2(12.9898,78.233)))*43758.5453));\\nfloat noise2=(fract(sin(dot(co,vec2(12.9898,78.233)*2.0))*43758.5453));\\nreturn clamp(vec2(noise1,noise2),0.0,1.0);\\n}\\n\\nvec2 getDistortedCoords(vec2 coords) {\\nif (distortion == 0.0) { return coords; }\\nvec2 direction=1.0*normalize(centered_screen_pos);\\nvec2 dist_coords=vec2(0.5,0.5);\\ndist_coords.x=0.5+direction.x*radius2*1.0;\\ndist_coords.y=0.5+direction.y*radius2*1.0;\\nfloat dist_amount=clamp(distortion*0.23,0.0,1.0);\\ndist_coords=mix(coords,dist_coords,dist_amount);\\nreturn dist_coords;\\n}\\n\\nfloat sampleScreen(inout vec4 color,const in vec2 offset,const in float weight) {\\n\\nvec2 coords=distorted_coords;\\nfloat angle=rand(coords*100.0).x*TWOPI;\\ncoords+=vec2(offset.x*cos(angle)-offset.y*sin(angle),offset.x*sin(angle)+offset.y*cos(angle));\\ncolor+=texture2D(textureSampler,coords)*weight;\\nreturn weight;\\n}\\n\\nfloat getBlurLevel(float size) {\\nreturn min(3.0,ceil(size/1.0));\\n}\\n\\nvec4 getBlurColor(float size) {\\nvec4 col=texture2D(textureSampler,distorted_coords);\\nif (size == 0.0) { return col; }\\n\\n\\nfloat blur_level=getBlurLevel(size);\\nfloat w=(size/screen_width);\\nfloat h=(size/screen_height);\\nfloat total_weight=1.0;\\nvec2 sample_coords;\\ntotal_weight+=sampleScreen(col,vec2(-0.50*w,0.24*h),0.93);\\ntotal_weight+=sampleScreen(col,vec2(0.30*w,-0.75*h),0.90);\\ntotal_weight+=sampleScreen(col,vec2(0.36*w,0.96*h),0.87);\\ntotal_weight+=sampleScreen(col,vec2(-1.08*w,-0.55*h),0.85);\\ntotal_weight+=sampleScreen(col,vec2(1.33*w,-0.37*h),0.83);\\ntotal_weight+=sampleScreen(col,vec2(-0.82*w,1.31*h),0.80);\\ntotal_weight+=sampleScreen(col,vec2(-0.31*w,-1.67*h),0.78);\\ntotal_weight+=sampleScreen(col,vec2(1.47*w,1.11*h),0.76);\\ntotal_weight+=sampleScreen(col,vec2(-1.97*w,0.19*h),0.74);\\ntotal_weight+=sampleScreen(col,vec2(1.42*w,-1.57*h),0.72);\\nif (blur_level>1.0) {\\ntotal_weight+=sampleScreen(col,vec2(0.01*w,2.25*h),0.70);\\ntotal_weight+=sampleScreen(col,vec2(-1.62*w,-1.74*h),0.67);\\ntotal_weight+=sampleScreen(col,vec2(2.49*w,0.20*h),0.65);\\ntotal_weight+=sampleScreen(col,vec2(-2.07*w,1.61*h),0.63);\\ntotal_weight+=sampleScreen(col,vec2(0.46*w,-2.70*h),0.61);\\ntotal_weight+=sampleScreen(col,vec2(1.55*w,2.40*h),0.59);\\ntotal_weight+=sampleScreen(col,vec2(-2.88*w,-0.75*h),0.56);\\ntotal_weight+=sampleScreen(col,vec2(2.73*w,-1.44*h),0.54);\\ntotal_weight+=sampleScreen(col,vec2(-1.08*w,3.02*h),0.52);\\ntotal_weight+=sampleScreen(col,vec2(-1.28*w,-3.05*h),0.49);\\n}\\nif (blur_level>2.0) {\\ntotal_weight+=sampleScreen(col,vec2(3.11*w,1.43*h),0.46);\\ntotal_weight+=sampleScreen(col,vec2(-3.36*w,1.08*h),0.44);\\ntotal_weight+=sampleScreen(col,vec2(1.80*w,-3.16*h),0.41);\\ntotal_weight+=sampleScreen(col,vec2(0.83*w,3.65*h),0.38);\\ntotal_weight+=sampleScreen(col,vec2(-3.16*w,-2.19*h),0.34);\\ntotal_weight+=sampleScreen(col,vec2(3.92*w,-0.53*h),0.31);\\ntotal_weight+=sampleScreen(col,vec2(-2.59*w,3.12*h),0.26);\\ntotal_weight+=sampleScreen(col,vec2(-0.20*w,-4.15*h),0.22);\\ntotal_weight+=sampleScreen(col,vec2(3.02*w,3.00*h),0.15);\\n}\\ncol/=total_weight; \\n\\nif (darken>0.0) {\\ncol.rgb*=clamp(0.3,1.0,1.05-size*0.5*darken);\\n}\\n\\n\\n\\n\\nreturn col;\\n}\\nvoid main(void)\\n{\\n\\ncentered_screen_pos=vec2(vUV.x-0.5,vUV.y-0.5);\\nradius2=centered_screen_pos.x*centered_screen_pos.x+centered_screen_pos.y*centered_screen_pos.y;\\nradius=sqrt(radius2);\\ndistorted_coords=getDistortedCoords(vUV); \\nvec2 texels_coords=vec2(vUV.x*screen_width,vUV.y*screen_height); \\nfloat depth=texture2D(depthSampler,distorted_coords).r; \\nfloat distance=near+(far-near)*depth; \\nvec4 color=texture2D(textureSampler,vUV); \\n\\n\\nfloat coc=abs(aperture*(screen_distance*(inverse_focal_length-1.0/distance)-1.0));\\n\\nif (dof_enabled == false || coc<0.07) { coc=0.0; }\\n\\nfloat edge_blur_amount=0.0;\\nif (edge_blur>0.0) {\\nedge_blur_amount=clamp((radius*2.0-1.0+0.15*edge_blur)*1.5,0.0,1.0)*1.3;\\n}\\n\\nfloat blur_amount=max(edge_blur_amount,coc);\\n\\nif (blur_amount == 0.0) {\\ngl_FragColor=texture2D(textureSampler,distorted_coords);\\n}\\nelse {\\n\\ngl_FragColor=getBlurColor(blur_amount*1.7);\\n\\nif (highlights) {\\ngl_FragColor.rgb+=clamp(coc,0.0,1.0)*texture2D(highlightsSampler,distorted_coords).rgb;\\n}\\nif (blur_noise) {\\n\\nvec2 noise=rand(distorted_coords)*0.01*blur_amount;\\nvec2 blurred_coord=vec2(distorted_coords.x+noise.x,distorted_coords.y+noise.y);\\ngl_FragColor=0.04*texture2D(textureSampler,blurred_coord)+0.96*gl_FragColor;\\n}\\n}\\n\\nif (grain_amount>0.0) {\\nvec4 grain_color=texture2D(grainSampler,texels_coords*0.003);\\ngl_FragColor.rgb+=(-0.5+grain_color.rgb)*0.30*grain_amount;\\n}\\n}\\n\",standardPixelShader:\"uniform sampler2D textureSampler;\\nvarying vec2 vUV;\\n#if defined(PASS_POST_PROCESS)\\nvoid main(void)\\n{\\nvec4 color=texture2D(textureSampler,vUV);\\ngl_FragColor=color;\\n}\\n#endif\\n#if defined(DOWN_SAMPLE_X4)\\nuniform vec2 dsOffsets[16];\\nvoid main(void)\\n{\\nvec4 average=vec4(0.0,0.0,0.0,0.0);\\naverage=texture2D(textureSampler,vUV+dsOffsets[0]);\\naverage+=texture2D(textureSampler,vUV+dsOffsets[1]);\\naverage+=texture2D(textureSampler,vUV+dsOffsets[2]);\\naverage+=texture2D(textureSampler,vUV+dsOffsets[3]);\\naverage+=texture2D(textureSampler,vUV+dsOffsets[4]);\\naverage+=texture2D(textureSampler,vUV+dsOffsets[5]);\\naverage+=texture2D(textureSampler,vUV+dsOffsets[6]);\\naverage+=texture2D(textureSampler,vUV+dsOffsets[7]);\\naverage+=texture2D(textureSampler,vUV+dsOffsets[8]);\\naverage+=texture2D(textureSampler,vUV+dsOffsets[9]);\\naverage+=texture2D(textureSampler,vUV+dsOffsets[10]);\\naverage+=texture2D(textureSampler,vUV+dsOffsets[11]);\\naverage+=texture2D(textureSampler,vUV+dsOffsets[12]);\\naverage+=texture2D(textureSampler,vUV+dsOffsets[13]);\\naverage+=texture2D(textureSampler,vUV+dsOffsets[14]);\\naverage+=texture2D(textureSampler,vUV+dsOffsets[15]);\\naverage/=16.0;\\ngl_FragColor=average;\\n}\\n#endif\\n#if defined(BRIGHT_PASS)\\nuniform vec2 dsOffsets[4];\\nuniform float brightThreshold;\\nvoid main(void)\\n{\\nvec4 average=vec4(0.0,0.0,0.0,0.0);\\naverage=texture2D(textureSampler,vUV+vec2(dsOffsets[0].x,dsOffsets[0].y));\\naverage+=texture2D(textureSampler,vUV+vec2(dsOffsets[1].x,dsOffsets[1].y));\\naverage+=texture2D(textureSampler,vUV+vec2(dsOffsets[2].x,dsOffsets[2].y));\\naverage+=texture2D(textureSampler,vUV+vec2(dsOffsets[3].x,dsOffsets[3].y));\\naverage*=0.25;\\nfloat luminance=length(average.rgb);\\nif (luminance<brightThreshold) {\\naverage=vec4(0.0,0.0,0.0,1.0);\\n}\\ngl_FragColor=average;\\n}\\n#endif\\n#if defined(TEXTURE_ADDER)\\nuniform sampler2D otherSampler;\\nuniform sampler2D lensSampler;\\nuniform float exposure;\\nvoid main(void)\\n{\\nvec3 colour=texture2D(textureSampler,vUV).rgb;\\ncolour*=exposure;\\nvec3 X=max(vec3(0.0,0.0,0.0),colour-0.004);\\nvec3 retColor=(X*(6.2*X+0.5))/(X*(6.2*X+1.7)+0.06);\\ncolour=retColor*retColor;\\ncolour+=colour*texture2D(lensSampler,vUV).rgb;\\nvec4 finalColor=vec4(colour.rgb,1.0)+texture2D(otherSampler,vUV);\\ngl_FragColor=finalColor;\\n}\\n#endif\\n#if defined(VLS)\\n#define PI 3.1415926535897932384626433832795\\nuniform mat4 shadowViewProjection;\\nuniform mat4 lightWorld;\\nuniform vec3 cameraPosition;\\nuniform vec3 sunDirection;\\nuniform vec3 sunColor;\\nuniform vec2 depthValues;\\nuniform float scatteringCoefficient;\\nuniform float scatteringPower;\\nuniform sampler2D shadowMapSampler;\\nuniform sampler2D positionSampler;\\nfloat computeScattering(float lightDotView)\\n{\\nfloat result=1.0-scatteringCoefficient*scatteringCoefficient;\\nresult/=(4.0*PI*pow(1.0+scatteringCoefficient*scatteringCoefficient-(2.0*scatteringCoefficient)*lightDotView,1.5));\\nreturn result;\\n}\\nvoid main(void)\\n{\\n\\nvec3 worldPos=texture2D(positionSampler,vUV).rgb;\\nvec3 startPosition=cameraPosition;\\nvec3 rayVector=worldPos-startPosition;\\nfloat rayLength=length(rayVector);\\nvec3 rayDirection=rayVector/rayLength;\\nfloat stepLength=rayLength/NB_STEPS;\\nvec3 stepL=rayDirection*stepLength;\\nvec3 currentPosition=startPosition;\\nvec3 accumFog=vec3(0.0);\\nfor (int i=0; i<int(NB_STEPS); i++)\\n{\\nvec4 worldInShadowCameraSpace=shadowViewProjection*vec4(currentPosition,1.0);\\nfloat depthMetric=(worldInShadowCameraSpace.z+depthValues.x)/(depthValues.y);\\nfloat shadowPixelDepth=clamp(depthMetric,0.0,1.0);\\nworldInShadowCameraSpace.xyz/=worldInShadowCameraSpace.w;\\nworldInShadowCameraSpace.xyz=0.5*worldInShadowCameraSpace.xyz+vec3(0.5);\\nfloat shadowMapValue=texture2D(shadowMapSampler,worldInShadowCameraSpace.xy).r;\\nif (shadowMapValue>shadowPixelDepth)\\naccumFog+=sunColor*computeScattering(dot(rayDirection,sunDirection));\\ncurrentPosition+=stepL;\\n}\\naccumFog/=NB_STEPS;\\nvec3 color=accumFog*scatteringPower;\\ngl_FragColor=vec4(color*exp(color) ,1.0);\\n}\\n#endif\\n#if defined(VLSMERGE)\\nuniform sampler2D originalSampler;\\nvoid main(void)\\n{\\ngl_FragColor=texture2D(originalSampler,vUV)+texture2D(textureSampler,vUV);\\n}\\n#endif\\n#if defined(LUMINANCE)\\nuniform vec2 lumOffsets[4];\\nvoid main()\\n{\\nfloat average=0.0;\\nvec4 color=vec4(0.0);\\nfloat maximum=-1e20;\\nvec3 weight=vec3(0.299,0.587,0.114);\\nfor (int i=0; i<4; i++)\\n{\\ncolor=texture2D(textureSampler,vUV+ lumOffsets[i]);\\n\\nfloat GreyValue=dot(color.rgb,vec3(0.33,0.33,0.33));\\n\\n#ifdef WEIGHTED_AVERAGE\\nfloat GreyValue=dot(color.rgb,weight);\\n#endif\\n#ifdef BRIGHTNESS\\nfloat GreyValue=max(color.r,max(color.g,color.b));\\n#endif\\n#ifdef HSL_COMPONENT\\nfloat GreyValue=0.5*(max(color.r,max(color.g,color.b))+min(color.r,min(color.g,color.b)));\\n#endif\\n#ifdef MAGNITUDE\\nfloat GreyValue=length(color.rgb);\\n#endif\\nmaximum=max(maximum,GreyValue);\\naverage+=(0.25*log(1e-5+GreyValue));\\n}\\naverage=exp(average);\\ngl_FragColor=vec4(average,maximum,0.0,1.0);\\n}\\n#endif\\n#if defined(LUMINANCE_DOWN_SAMPLE)\\nuniform vec2 dsOffsets[9];\\nuniform float halfDestPixelSize;\\n#ifdef FINAL_DOWN_SAMPLER\\nvec4 pack(float value) {\\nconst vec4 bit_shift=vec4(255.0*255.0*255.0,255.0*255.0,255.0,1.0);\\nconst vec4 bit_mask=vec4(0.0,1.0/255.0,1.0/255.0,1.0/255.0);\\nvec4 res=fract(value*bit_shift);\\nres-=res.xxyz*bit_mask;\\nreturn res;\\n}\\n#endif\\nvoid main()\\n{\\nvec4 color=vec4(0.0);\\nfloat average=0.0;\\nfor (int i=0; i<9; i++)\\n{\\ncolor=texture2D(textureSampler,vUV+vec2(halfDestPixelSize,halfDestPixelSize)+dsOffsets[i]);\\naverage+=color.r;\\n}\\naverage/=9.0;\\n#ifdef FINAL_DOWN_SAMPLER\\ngl_FragColor=pack(average);\\n#else\\ngl_FragColor=vec4(average,average,0.0,1.0);\\n#endif\\n}\\n#endif\\n#if defined(HDR)\\nuniform sampler2D textureAdderSampler;\\nuniform float averageLuminance;\\nvoid main()\\n{\\nvec4 color=texture2D(textureAdderSampler,vUV);\\nvec4 adjustedColor=color/averageLuminance;\\ncolor=adjustedColor;\\ncolor.a=1.0;\\ngl_FragColor=color;\\n}\\n#endif\\n#if defined(LENS_FLARE)\\n#define GHOSTS 3\\nuniform sampler2D lensColorSampler;\\nuniform float strength;\\nuniform float ghostDispersal;\\nuniform float haloWidth;\\nuniform vec2 resolution;\\nuniform float distortionStrength;\\nfloat hash(vec2 p)\\n{\\nfloat h=dot(p,vec2(127.1,311.7));\\nreturn -1.0+2.0*fract(sin(h)*43758.5453123);\\n}\\nfloat noise(in vec2 p)\\n{\\nvec2 i=floor(p);\\nvec2 f=fract(p);\\nvec2 u=f*f*(3.0-2.0*f);\\nreturn mix(mix(hash(i+vec2(0.0,0.0)),\\nhash(i+vec2(1.0,0.0)),u.x),\\nmix(hash(i+vec2(0.0,1.0)),\\nhash(i+vec2(1.0,1.0)),u.x),u.y);\\n}\\nfloat fbm(vec2 p)\\n{\\nfloat f=0.0;\\nf+=0.5000*noise(p); p*=2.02;\\nf+=0.2500*noise(p); p*=2.03;\\nf+=0.1250*noise(p); p*=2.01;\\nf+=0.0625*noise(p); p*=2.04;\\nf/=0.9375;\\nreturn f;\\n}\\nvec3 pattern(vec2 uv)\\n{\\nvec2 p=-1.0+2.0*uv;\\nfloat p2=dot(p,p);\\nfloat f=fbm(vec2(15.0*p2))/2.0;\\nfloat r=0.2+0.6*sin(12.5*length(uv-vec2(0.5)));\\nfloat g=0.2+0.6*sin(20.5*length(uv-vec2(0.5)));\\nfloat b=0.2+0.6*sin(17.2*length(uv-vec2(0.5)));\\nreturn (1.0-f)*vec3(r,g,b);\\n}\\nfloat luminance(vec3 color)\\n{\\nreturn dot(color.rgb,vec3(0.2126,0.7152,0.0722));\\n}\\nvec4 textureDistorted(sampler2D tex,vec2 texcoord,vec2 direction,vec3 distortion)\\n{\\nreturn vec4(\\ntexture2D(tex,texcoord+direction*distortion.r).r,\\ntexture2D(tex,texcoord+direction*distortion.g).g,\\ntexture2D(tex,texcoord+direction*distortion.b).b,\\n1.0\\n);\\n}\\nvoid main(void)\\n{\\nvec2 uv=-vUV+vec2(1.0);\\nvec2 ghostDir=(vec2(0.5)-uv)*ghostDispersal;\\nvec2 texelSize=1.0/resolution;\\nvec3 distortion=vec3(-texelSize.x*distortionStrength,0.0,texelSize.x*distortionStrength);\\nvec4 result=vec4(0.0);\\nfloat ghostIndice=1.0;\\nfor (int i=0; i<GHOSTS; ++i)\\n{\\nvec2 offset=fract(uv+ghostDir*ghostIndice);\\nfloat weight=length(vec2(0.5)-offset)/length(vec2(0.5));\\nweight=pow(1.0-weight,10.0);\\nresult+=textureDistorted(textureSampler,offset,normalize(ghostDir),distortion)*weight*strength;\\nghostIndice+=1.0;\\n}\\nvec2 haloVec=normalize(ghostDir)*haloWidth;\\nfloat weight=length(vec2(0.5)-fract(uv+haloVec))/length(vec2(0.5));\\nweight=pow(1.0-weight,10.0);\\nresult+=textureDistorted(textureSampler,fract(uv+haloVec),normalize(ghostDir),distortion)*weight*strength;\\nresult*=texture2D(lensColorSampler,vec2(length(vec2(0.5)-uv)/length(vec2(0.5))));\\ngl_FragColor=result;\\n}\\n#endif\\n#if defined(LENS_FLARE_COMPOSE)\\nuniform sampler2D otherSampler;\\nuniform sampler2D lensDirtSampler;\\nuniform sampler2D lensStarSampler;\\nuniform mat4 lensStarMatrix;\\nvoid main(void)\\n{\\nvec2 lensFlareCoords=(lensStarMatrix*vec4(vUV,1.0,1.0)).xy;\\nvec4 lensMod=texture2D(lensDirtSampler,vUV);\\nlensMod+=texture2D(lensStarSampler,vUV);\\nvec4 result=texture2D(textureSampler,vUV)*lensMod;\\ngl_FragColor=texture2D(otherSampler,vUV)+result;\\n}\\n#endif\\n#if defined(DEPTH_OF_FIELD)\\nuniform sampler2D otherSampler;\\nuniform sampler2D depthSampler;\\nuniform float distance;\\nvoid main(void)\\n{\\nvec4 sharp=texture2D(otherSampler,vUV);\\nvec4 blur=texture2D(textureSampler,vUV);\\nfloat dist=clamp(texture2D(depthSampler,vUV).r*distance,0.0,1.0);\\nfloat factor=0.0;\\nif (dist<0.05)\\nfactor=1.0;\\nelse if (dist<0.1)\\nfactor=20.0*(0.1-dist);\\nelse if (dist<0.5)\\nfactor=0.0;\\nelse\\nfactor=2.0*(dist-0.5);\\nfactor=clamp(factor,0.0,0.90);\\ngl_FragColor=mix(sharp,blur,factor);\\n}\\n#endif\\n#if defined(MOTION_BLUR)\\nuniform mat4 inverseViewProjection;\\nuniform mat4 prevViewProjection;\\nuniform vec2 screenSize;\\nuniform float motionScale;\\nuniform float motionStrength;\\nuniform sampler2D depthSampler;\\nvoid main(void)\\n{\\nvec2 texelSize=1.0/screenSize;\\nfloat depth=texture2D(depthSampler,vUV).r;\\nvec4 cpos=vec4(vUV*2.0-1.0,depth,1.0);\\ncpos=cpos*inverseViewProjection;\\nvec4 ppos=cpos*prevViewProjection;\\nppos.xyz/=ppos.w;\\nppos.xy=ppos.xy*0.5+0.5;\\nvec2 velocity=(ppos.xy-vUV)*motionScale*motionStrength;\\nfloat speed=length(velocity/texelSize);\\nint nSamples=int(clamp(speed,1.0,MAX_MOTION_SAMPLES));\\nvec4 result=texture2D(textureSampler,vUV);\\nfor (int i=1; i<int(MAX_MOTION_SAMPLES); ++i) {\\nif (i>=nSamples)\\nbreak;\\nvec2 offset1=vUV+velocity*(float(i)/float(nSamples-1)-0.5);\\nresult+=texture2D(textureSampler,offset1);\\n}\\ngl_FragColor=result/float(nSamples);\\n}\\n#endif\\n\",fxaaVertexShader:\"\\nattribute vec2 position;\\nuniform vec2 texelSize;\\n\\nvarying vec2 vUV;\\nvarying vec2 sampleCoordS;\\nvarying vec2 sampleCoordE;\\nvarying vec2 sampleCoordN;\\nvarying vec2 sampleCoordW;\\nvarying vec2 sampleCoordNW;\\nvarying vec2 sampleCoordSE;\\nvarying vec2 sampleCoordNE;\\nvarying vec2 sampleCoordSW;\\nconst vec2 madd=vec2(0.5,0.5);\\nvoid main(void) { \\nvUV=(position*madd+madd);\\nsampleCoordS=vUV+vec2( 0.0,1.0)*texelSize;\\nsampleCoordE=vUV+vec2( 1.0,0.0)*texelSize;\\nsampleCoordN=vUV+vec2( 0.0,-1.0)*texelSize;\\nsampleCoordW=vUV+vec2(-1.0,0.0)*texelSize;\\nsampleCoordNW=vUV+vec2(-1.0,-1.0)*texelSize;\\nsampleCoordSE=vUV+vec2( 1.0,1.0)*texelSize;\\nsampleCoordNE=vUV+vec2( 1.0,-1.0)*texelSize;\\nsampleCoordSW=vUV+vec2(-1.0,1.0)*texelSize;\\ngl_Position=vec4(position,0.0,1.0);\\n}\",fxaaPixelShader:\"uniform sampler2D textureSampler;\\nuniform vec2 texelSize;\\nvarying vec2 vUV;\\nvarying vec2 sampleCoordS;\\nvarying vec2 sampleCoordE;\\nvarying vec2 sampleCoordN;\\nvarying vec2 sampleCoordW;\\nvarying vec2 sampleCoordNW;\\nvarying vec2 sampleCoordSE;\\nvarying vec2 sampleCoordNE;\\nvarying vec2 sampleCoordSW;\\nconst float fxaaQualitySubpix=1.0;\\nconst float fxaaQualityEdgeThreshold=0.166;\\nconst float fxaaQualityEdgeThresholdMin=0.0833;\\nconst vec3 kLumaCoefficients=vec3(0.2126,0.7152,0.0722);\\n#define FxaaLuma(rgba) dot(rgba.rgb,kLumaCoefficients)\\nvoid main(){\\nvec2 posM;\\nposM.x=vUV.x;\\nposM.y=vUV.y;\\nvec4 rgbyM=texture2D(textureSampler,vUV,0.0);\\nfloat lumaM=FxaaLuma(rgbyM);\\nfloat lumaS=FxaaLuma(texture2D(textureSampler,sampleCoordS,0.0));\\nfloat lumaE=FxaaLuma(texture2D(textureSampler,sampleCoordE,0.0));\\nfloat lumaN=FxaaLuma(texture2D(textureSampler,sampleCoordN,0.0));\\nfloat lumaW=FxaaLuma(texture2D(textureSampler,sampleCoordW,0.0));\\nfloat maxSM=max(lumaS,lumaM);\\nfloat minSM=min(lumaS,lumaM);\\nfloat maxESM=max(lumaE,maxSM);\\nfloat minESM=min(lumaE,minSM);\\nfloat maxWN=max(lumaN,lumaW);\\nfloat minWN=min(lumaN,lumaW);\\nfloat rangeMax=max(maxWN,maxESM);\\nfloat rangeMin=min(minWN,minESM);\\nfloat rangeMaxScaled=rangeMax*fxaaQualityEdgeThreshold;\\nfloat range=rangeMax-rangeMin;\\nfloat rangeMaxClamped=max(fxaaQualityEdgeThresholdMin,rangeMaxScaled);\\n#ifndef MALI\\nif(range<rangeMaxClamped) \\n{\\ngl_FragColor=rgbyM;\\nreturn;\\n}\\n#endif\\nfloat lumaNW=FxaaLuma(texture2D(textureSampler,sampleCoordNW,0.0));\\nfloat lumaSE=FxaaLuma(texture2D(textureSampler,sampleCoordSE,0.0));\\nfloat lumaNE=FxaaLuma(texture2D(textureSampler,sampleCoordNE,0.0));\\nfloat lumaSW=FxaaLuma(texture2D(textureSampler,sampleCoordSW,0.0));\\nfloat lumaNS=lumaN+lumaS;\\nfloat lumaWE=lumaW+lumaE;\\nfloat subpixRcpRange=1.0/range;\\nfloat subpixNSWE=lumaNS+lumaWE;\\nfloat edgeHorz1=(-2.0*lumaM)+lumaNS;\\nfloat edgeVert1=(-2.0*lumaM)+lumaWE;\\nfloat lumaNESE=lumaNE+lumaSE;\\nfloat lumaNWNE=lumaNW+lumaNE;\\nfloat edgeHorz2=(-2.0*lumaE)+lumaNESE;\\nfloat edgeVert2=(-2.0*lumaN)+lumaNWNE;\\nfloat lumaNWSW=lumaNW+lumaSW;\\nfloat lumaSWSE=lumaSW+lumaSE;\\nfloat edgeHorz4=(abs(edgeHorz1)*2.0)+abs(edgeHorz2);\\nfloat edgeVert4=(abs(edgeVert1)*2.0)+abs(edgeVert2);\\nfloat edgeHorz3=(-2.0*lumaW)+lumaNWSW;\\nfloat edgeVert3=(-2.0*lumaS)+lumaSWSE;\\nfloat edgeHorz=abs(edgeHorz3)+edgeHorz4;\\nfloat edgeVert=abs(edgeVert3)+edgeVert4;\\nfloat subpixNWSWNESE=lumaNWSW+lumaNESE;\\nfloat lengthSign=texelSize.x;\\nbool horzSpan=edgeHorz>=edgeVert;\\nfloat subpixA=subpixNSWE*2.0+subpixNWSWNESE;\\nif (!horzSpan)\\n{\\nlumaN=lumaW;\\n}\\nif (!horzSpan) \\n{\\nlumaS=lumaE;\\n}\\nif (horzSpan) \\n{\\nlengthSign=texelSize.y;\\n}\\nfloat subpixB=(subpixA*(1.0/12.0))-lumaM;\\nfloat gradientN=lumaN-lumaM;\\nfloat gradientS=lumaS-lumaM;\\nfloat lumaNN=lumaN+lumaM;\\nfloat lumaSS=lumaS+lumaM;\\nbool pairN=abs(gradientN)>=abs(gradientS);\\nfloat gradient=max(abs(gradientN),abs(gradientS));\\nif (pairN)\\n{\\nlengthSign=-lengthSign;\\n}\\nfloat subpixC=clamp(abs(subpixB)*subpixRcpRange,0.0,1.0);\\nvec2 posB;\\nposB.x=posM.x;\\nposB.y=posM.y;\\nvec2 offNP;\\noffNP.x=(!horzSpan) ? 0.0 : texelSize.x;\\noffNP.y=(horzSpan) ? 0.0 : texelSize.y;\\nif (!horzSpan) \\n{\\nposB.x+=lengthSign*0.5;\\n}\\nif (horzSpan)\\n{\\nposB.y+=lengthSign*0.5;\\n}\\nvec2 posN;\\nposN.x=posB.x-offNP.x*1.5;\\nposN.y=posB.y-offNP.y*1.5;\\nvec2 posP;\\nposP.x=posB.x+offNP.x*1.5;\\nposP.y=posB.y+offNP.y*1.5;\\nfloat subpixD=((-2.0)*subpixC)+3.0;\\nfloat lumaEndN=FxaaLuma(texture2D(textureSampler,posN,0.0));\\nfloat subpixE=subpixC*subpixC;\\nfloat lumaEndP=FxaaLuma(texture2D(textureSampler,posP,0.0));\\nif (!pairN) \\n{\\nlumaNN=lumaSS;\\n}\\nfloat gradientScaled=gradient*1.0/4.0;\\nfloat lumaMM=lumaM-lumaNN*0.5;\\nfloat subpixF=subpixD*subpixE;\\nbool lumaMLTZero=lumaMM<0.0;\\nlumaEndN-=lumaNN*0.5;\\nlumaEndP-=lumaNN*0.5;\\nbool doneN=abs(lumaEndN)>=gradientScaled;\\nbool doneP=abs(lumaEndP)>=gradientScaled;\\nif (!doneN) \\n{\\nposN.x-=offNP.x*3.0;\\n}\\nif (!doneN) \\n{\\nposN.y-=offNP.y*3.0;\\n}\\nbool doneNP=(!doneN) || (!doneP);\\nif (!doneP) \\n{\\nposP.x+=offNP.x*3.0;\\n}\\nif (!doneP)\\n{\\nposP.y+=offNP.y*3.0;\\n}\\nif (doneNP)\\n{\\nif (!doneN) lumaEndN=FxaaLuma(texture2D(textureSampler,posN.xy,0.0));\\nif (!doneP) lumaEndP=FxaaLuma(texture2D(textureSampler,posP.xy,0.0));\\nif (!doneN) lumaEndN=lumaEndN-lumaNN*0.5;\\nif (!doneP) lumaEndP=lumaEndP-lumaNN*0.5;\\ndoneN=abs(lumaEndN)>=gradientScaled;\\ndoneP=abs(lumaEndP)>=gradientScaled;\\nif (!doneN) posN.x-=offNP.x*12.0;\\nif (!doneN) posN.y-=offNP.y*12.0;\\ndoneNP=(!doneN) || (!doneP);\\nif (!doneP) posP.x+=offNP.x*12.0;\\nif (!doneP) posP.y+=offNP.y*12.0;\\n}\\nfloat dstN=posM.x-posN.x;\\nfloat dstP=posP.x-posM.x;\\nif (!horzSpan)\\n{\\ndstN=posM.y-posN.y;\\n}\\nif (!horzSpan) \\n{\\ndstP=posP.y-posM.y;\\n}\\nbool goodSpanN=(lumaEndN<0.0) != lumaMLTZero;\\nfloat spanLength=(dstP+dstN);\\nbool goodSpanP=(lumaEndP<0.0) != lumaMLTZero;\\nfloat spanLengthRcp=1.0/spanLength;\\nbool directionN=dstN<dstP;\\nfloat dst=min(dstN,dstP);\\nbool goodSpan=directionN ? goodSpanN : goodSpanP;\\nfloat subpixG=subpixF*subpixF;\\nfloat pixelOffset=(dst*(-spanLengthRcp))+0.5;\\nfloat subpixH=subpixG*fxaaQualitySubpix;\\nfloat pixelOffsetGood=goodSpan ? pixelOffset : 0.0;\\nfloat pixelOffsetSubpix=max(pixelOffsetGood,subpixH);\\nif (!horzSpan)\\n{\\nposM.x+=pixelOffsetSubpix*lengthSign;\\n}\\nif (horzSpan)\\n{\\nposM.y+=pixelOffsetSubpix*lengthSign;\\n}\\n#ifdef MALI\\nif(range<rangeMaxClamped) \\n{\\ngl_FragColor=rgbyM;\\n}\\nelse\\n{\\ngl_FragColor=texture2D(textureSampler,posM,0.0);\\n}\\n#else\\ngl_FragColor=texture2D(textureSampler,posM,0.0);\\n#endif\\n}\",chromaticAberrationPixelShader:\"\\nuniform sampler2D textureSampler; \\n\\nuniform float chromatic_aberration;\\nuniform float radialIntensity;\\nuniform vec2 direction;\\nuniform vec2 centerPosition;\\nuniform float screen_width;\\nuniform float screen_height;\\n\\nvarying vec2 vUV;\\nvoid main(void)\\n{\\nvec2 centered_screen_pos=vec2(vUV.x-centerPosition.x,vUV.y-centerPosition.y);\\nvec2 directionOfEffect=direction;\\nif(directionOfEffect.x == 0. && directionOfEffect.y == 0.){\\ndirectionOfEffect=normalize(centered_screen_pos);\\n}\\nfloat radius2=centered_screen_pos.x*centered_screen_pos.x\\n+centered_screen_pos.y*centered_screen_pos.y;\\nfloat radius=sqrt(radius2);\\nvec4 original=texture2D(textureSampler,vUV);\\n\\nvec3 ref_indices=vec3(-0.3,0.0,0.3);\\nfloat ref_shiftX=chromatic_aberration*pow(radius,radialIntensity)*directionOfEffect.x/screen_width;\\nfloat ref_shiftY=chromatic_aberration*pow(radius,radialIntensity)*directionOfEffect.y/screen_height;\\n\\nvec2 ref_coords_r=vec2(vUV.x+ref_indices.r*ref_shiftX,vUV.y+ref_indices.r*ref_shiftY*0.5);\\nvec2 ref_coords_g=vec2(vUV.x+ref_indices.g*ref_shiftX,vUV.y+ref_indices.g*ref_shiftY*0.5);\\nvec2 ref_coords_b=vec2(vUV.x+ref_indices.b*ref_shiftX,vUV.y+ref_indices.b*ref_shiftY*0.5);\\noriginal.r=texture2D(textureSampler,ref_coords_r).r;\\noriginal.g=texture2D(textureSampler,ref_coords_g).g;\\noriginal.b=texture2D(textureSampler,ref_coords_b).b;\\noriginal.a=clamp(texture2D(textureSampler,ref_coords_r).a+texture2D(textureSampler,ref_coords_g).a+texture2D(textureSampler,ref_coords_b).a,0.,1.);\\ngl_FragColor=original;\\n}\",grainPixelShader:\"#include<helperFunctions>\\n\\nuniform sampler2D textureSampler; \\n\\nuniform float intensity;\\nuniform float animatedSeed;\\n\\nvarying vec2 vUV;\\nvoid main(void)\\n{\\ngl_FragColor=texture2D(textureSampler,vUV);\\nvec2 seed=vUV*(animatedSeed);\\nfloat grain=dither(seed,intensity);\\n\\nfloat lum=getLuminance(gl_FragColor.rgb);\\nfloat grainAmount=(cos(-PI+(lum*PI*2.))+1.)/2.;\\ngl_FragColor.rgb+=grain*grainAmount;\\ngl_FragColor.rgb=max(gl_FragColor.rgb,0.0);\\n}\",sharpenPixelShader:\"\\nvarying vec2 vUV;\\nuniform sampler2D textureSampler;\\nuniform vec2 screenSize;\\nuniform vec2 sharpnessAmounts;\\nvoid main(void)\\n{\\nvec2 onePixel=vec2(1.0,1.0)/screenSize;\\nvec4 color=texture2D(textureSampler,vUV);\\nvec4 edgeDetection=texture2D(textureSampler,vUV+onePixel*vec2(0,-1)) +\\ntexture2D(textureSampler,vUV+onePixel*vec2(-1,0)) +\\ntexture2D(textureSampler,vUV+onePixel*vec2(1,0)) +\\ntexture2D(textureSampler,vUV+onePixel*vec2(0,1)) -\\ncolor*4.0;\\ngl_FragColor=max(vec4(color.rgb*sharpnessAmounts.y,color.a)-(sharpnessAmounts.x*vec4(edgeDetection.rgb,0)),0.);\\n}\",kernelBlurVertexShader:\"\\nattribute vec2 position;\\n\\nuniform vec2 delta;\\n\\nvarying vec2 sampleCenter;\\n#include<kernelBlurVaryingDeclaration>[0..varyingCount]\\nconst vec2 madd=vec2(0.5,0.5);\\nvoid main(void) { \\nsampleCenter=(position*madd+madd);\\n#include<kernelBlurVertex>[0..varyingCount]\\ngl_Position=vec4(position,0.0,1.0);\\n}\",kernelBlurPixelShader:\"\\nuniform sampler2D textureSampler;\\nuniform vec2 delta;\\n\\nvarying vec2 sampleCenter;\\n#ifdef DOF\\nuniform sampler2D circleOfConfusionSampler;\\nuniform vec2 cameraMinMaxZ;\\nfloat sampleDistance(const in vec2 offset) {\\nfloat depth=texture2D(circleOfConfusionSampler,offset).g; \\nreturn cameraMinMaxZ.x+(cameraMinMaxZ.y-cameraMinMaxZ.x)*depth; \\n}\\nfloat sampleCoC(const in vec2 offset) {\\nfloat coc=texture2D(circleOfConfusionSampler,offset).r; \\nreturn coc; \\n}\\n#endif\\n#include<kernelBlurVaryingDeclaration>[0..varyingCount]\\n#ifdef PACKEDFLOAT\\nvec4 pack(float depth)\\n{\\nconst vec4 bit_shift=vec4(255.0*255.0*255.0,255.0*255.0,255.0,1.0);\\nconst vec4 bit_mask=vec4(0.0,1.0/255.0,1.0/255.0,1.0/255.0);\\nvec4 res=fract(depth*bit_shift);\\nres-=res.xxyz*bit_mask;\\nreturn res;\\n}\\nfloat unpack(vec4 color)\\n{\\nconst vec4 bit_shift=vec4(1.0/(255.0*255.0*255.0),1.0/(255.0*255.0),1.0/255.0,1.0);\\nreturn dot(color,bit_shift);\\n}\\n#endif\\nvoid main(void)\\n{\\nfloat computedWeight=0.0;\\n#ifdef PACKEDFLOAT \\nfloat blend=0.;\\n#else\\nvec4 blend=vec4(0.);\\n#endif\\n#ifdef DOF\\nfloat sumOfWeights=CENTER_WEIGHT; \\nfloat factor=0.0;\\n\\n#ifdef PACKEDFLOAT\\nblend+=unpack(texture2D(textureSampler,sampleCenter))*CENTER_WEIGHT;\\n#else\\nblend+=texture2D(textureSampler,sampleCenter)*CENTER_WEIGHT;\\n#endif\\n#endif\\n#include<kernelBlurFragment>[0..varyingCount]\\n#include<kernelBlurFragment2>[0..depCount]\\n#ifdef PACKEDFLOAT\\ngl_FragColor=pack(blend);\\n#else\\ngl_FragColor=blend;\\n#endif\\n#ifdef DOF\\ngl_FragColor/=sumOfWeights;\\n#endif\\n}\",depthOfFieldMergePixelShader:\"uniform sampler2D textureSampler;\\nvarying vec2 vUV;\\nuniform sampler2D circleOfConfusionSampler;\\nuniform sampler2D blurStep0;\\n#if BLUR_LEVEL>0\\nuniform sampler2D blurStep1;\\n#endif\\n#if BLUR_LEVEL>1\\nuniform sampler2D blurStep2;\\n#endif\\nvoid main(void)\\n{\\nfloat coc=texture2D(circleOfConfusionSampler,vUV).r;\\n#if BLUR_LEVEL == 0\\nvec4 original=texture2D(textureSampler,vUV);\\nvec4 blurred0=texture2D(blurStep0,vUV);\\ngl_FragColor=mix(original,blurred0,coc);\\n#endif\\n#if BLUR_LEVEL == 1\\nif(coc<0.5){\\nvec4 original=texture2D(textureSampler,vUV);\\nvec4 blurred1=texture2D(blurStep1,vUV);\\ngl_FragColor=mix(original,blurred1,coc/0.5);\\n}else{\\nvec4 blurred0=texture2D(blurStep0,vUV); \\nvec4 blurred1=texture2D(blurStep1,vUV);\\ngl_FragColor=mix(blurred1,blurred0,(coc-0.5)/0.5);\\n}\\n#endif\\n#if BLUR_LEVEL == 2\\nif(coc<0.33){\\nvec4 original=texture2D(textureSampler,vUV);\\nvec4 blurred2=texture2D(blurStep2,vUV);\\ngl_FragColor=mix(original,blurred2,coc/0.33);\\n}else if(coc<0.66){\\nvec4 blurred1=texture2D(blurStep1,vUV);\\nvec4 blurred2=texture2D(blurStep2,vUV);\\ngl_FragColor=mix(blurred2,blurred1,(coc-0.33)/0.33);\\n}else{\\nvec4 blurred0=texture2D(blurStep0,vUV);\\nvec4 blurred1=texture2D(blurStep1,vUV);\\ngl_FragColor=mix(blurred1,blurred0,(coc-0.66)/0.34);\\n}\\n#endif\\n}\\n\",circleOfConfusionPixelShader:\"\\nuniform sampler2D depthSampler;\\n\\nvarying vec2 vUV;\\n\\nuniform vec2 cameraMinMaxZ;\\n\\nuniform float focusDistance;\\nuniform float cocPrecalculation;\\nvoid main(void)\\n{\\nfloat depth=texture2D(depthSampler,vUV).r;\\nfloat pixelDistance=(cameraMinMaxZ.x+(cameraMinMaxZ.y-cameraMinMaxZ.x)*depth)*1000.0; \\nfloat coc=abs(cocPrecalculation* ((focusDistance-pixelDistance)/pixelDistance));\\ncoc=clamp(coc,0.0,1.0);\\ngl_FragColor=vec4(coc,depth,coc,1.0);\\n}\\n\",bloomMergePixelShader:\"uniform sampler2D textureSampler;\\nuniform sampler2D bloomBlur;\\nvarying vec2 vUV;\\nuniform float bloomWeight;\\nvoid main(void)\\n{\\ngl_FragColor=texture2D(textureSampler,vUV);\\nvec3 blurred=texture2D(bloomBlur,vUV).rgb;\\ngl_FragColor.rgb=gl_FragColor.rgb+(blurred.rgb*bloomWeight); \\n}\\n\",extractHighlightsPixelShader:\"#include<helperFunctions>\\n\\nvarying vec2 vUV;\\nuniform sampler2D textureSampler;\\nuniform float threshold;\\nuniform float exposure;\\nvoid main(void) \\n{\\ngl_FragColor=texture2D(textureSampler,vUV);\\nfloat luma=getLuminance(gl_FragColor.rgb*exposure);\\ngl_FragColor.rgb=step(threshold,luma)*gl_FragColor.rgb;\\n}\",refractionPixelShader:\"\\nvarying vec2 vUV;\\nuniform sampler2D textureSampler;\\nuniform sampler2D refractionSampler;\\n\\nuniform vec3 baseColor;\\nuniform float depth;\\nuniform float colorLevel;\\nvoid main() {\\nfloat ref=1.0-texture2D(refractionSampler,vUV).r;\\nvec2 uv=vUV-vec2(0.5);\\nvec2 offset=uv*depth*ref;\\nvec3 sourceColor=texture2D(textureSampler,vUV-offset).rgb;\\ngl_FragColor=vec4(sourceColor+sourceColor*ref*colorLevel,1.0);\\n}\",blackAndWhitePixelShader:\"\\nvarying vec2 vUV;\\nuniform sampler2D textureSampler;\\nuniform float degree;\\nvoid main(void) \\n{\\nvec3 color=texture2D(textureSampler,vUV).rgb;\\nfloat luminance=dot(color,vec3(0.3,0.59,0.11)); \\nvec3 blackAndWhite=vec3(luminance,luminance,luminance);\\ngl_FragColor=vec4(color-((color-blackAndWhite)*degree),1.0);\\n}\",convolutionPixelShader:\"\\nvarying vec2 vUV;\\nuniform sampler2D textureSampler;\\nuniform vec2 screenSize;\\nuniform float kernel[9];\\nvoid main(void)\\n{\\nvec2 onePixel=vec2(1.0,1.0)/screenSize;\\nvec4 colorSum =\\ntexture2D(textureSampler,vUV+onePixel*vec2(-1,-1))*kernel[0] +\\ntexture2D(textureSampler,vUV+onePixel*vec2(0,-1))*kernel[1] +\\ntexture2D(textureSampler,vUV+onePixel*vec2(1,-1))*kernel[2] +\\ntexture2D(textureSampler,vUV+onePixel*vec2(-1,0))*kernel[3] +\\ntexture2D(textureSampler,vUV+onePixel*vec2(0,0))*kernel[4] +\\ntexture2D(textureSampler,vUV+onePixel*vec2(1,0))*kernel[5] +\\ntexture2D(textureSampler,vUV+onePixel*vec2(-1,1))*kernel[6] +\\ntexture2D(textureSampler,vUV+onePixel*vec2(0,1))*kernel[7] +\\ntexture2D(textureSampler,vUV+onePixel*vec2(1,1))*kernel[8];\\nfloat kernelWeight =\\nkernel[0] +\\nkernel[1] +\\nkernel[2] +\\nkernel[3] +\\nkernel[4] +\\nkernel[5] +\\nkernel[6] +\\nkernel[7] +\\nkernel[8];\\nif (kernelWeight<=0.0) {\\nkernelWeight=1.0;\\n}\\ngl_FragColor=vec4((colorSum/kernelWeight).rgb,1);\\n}\",filterPixelShader:\"\\nvarying vec2 vUV;\\nuniform sampler2D textureSampler;\\nuniform mat4 kernelMatrix;\\nvoid main(void)\\n{\\nvec3 baseColor=texture2D(textureSampler,vUV).rgb;\\nvec3 updatedColor=(kernelMatrix*vec4(baseColor,1.0)).rgb;\\ngl_FragColor=vec4(updatedColor,1.0);\\n}\",volumetricLightScatteringPixelShader:\"uniform sampler2D textureSampler;\\nuniform sampler2D lightScatteringSampler;\\nuniform float decay;\\nuniform float exposure;\\nuniform float weight;\\nuniform float density;\\nuniform vec2 meshPositionOnScreen;\\nvarying vec2 vUV;\\nvoid main(void) {\\nvec2 tc=vUV;\\nvec2 deltaTexCoord=(tc-meshPositionOnScreen.xy);\\ndeltaTexCoord*=1.0/float(NUM_SAMPLES)*density;\\nfloat illuminationDecay=1.0;\\nvec4 color=texture2D(lightScatteringSampler,tc)*0.4;\\nfor(int i=0; i<NUM_SAMPLES; i++) {\\ntc-=deltaTexCoord;\\nvec4 dataSample=texture2D(lightScatteringSampler,tc)*0.4;\\ndataSample*=illuminationDecay*weight;\\ncolor+=dataSample;\\nilluminationDecay*=decay;\\n}\\nvec4 realColor=texture2D(textureSampler,vUV);\\ngl_FragColor=((vec4((vec3(color.r,color.g,color.b)*exposure),1))+(realColor*(1.5-0.4)));\\n}\\n\",volumetricLightScatteringPassPixelShader:\"#if defined(ALPHATEST) || defined(NEED_UV)\\nvarying vec2 vUV;\\n#endif\\n#if defined(ALPHATEST)\\nuniform sampler2D diffuseSampler;\\n#endif\\nvoid main(void)\\n{\\n#if defined(ALPHATEST)\\nvec4 diffuseColor=texture2D(diffuseSampler,vUV);\\nif (diffuseColor.a<0.4)\\ndiscard;\\n#endif\\ngl_FragColor=vec4(0.0,0.0,0.0,1.0);\\n}\\n\",colorCorrectionPixelShader:\"\\nuniform sampler2D textureSampler; \\nuniform sampler2D colorTable; \\n\\nvarying vec2 vUV;\\n\\nconst float SLICE_COUNT=16.0; \\n\\nvec4 sampleAs3DTexture(sampler2D textureSampler,vec3 uv,float width) {\\nfloat sliceSize=1.0/width; \\nfloat slicePixelSize=sliceSize/width; \\nfloat sliceInnerSize=slicePixelSize*(width-1.0); \\nfloat zSlice0=min(floor(uv.z*width),width-1.0);\\nfloat zSlice1=min(zSlice0+1.0,width-1.0);\\nfloat xOffset=slicePixelSize*0.5+uv.x*sliceInnerSize;\\nfloat s0=xOffset+(zSlice0*sliceSize);\\nfloat s1=xOffset+(zSlice1*sliceSize);\\nvec4 slice0Color=texture2D(textureSampler,vec2(s0,uv.y));\\nvec4 slice1Color=texture2D(textureSampler,vec2(s1,uv.y));\\nfloat zOffset=mod(uv.z*width,1.0);\\nvec4 result=mix(slice0Color,slice1Color,zOffset);\\nreturn result;\\n}\\nvoid main(void)\\n{\\nvec4 screen_color=texture2D(textureSampler,vUV);\\ngl_FragColor=sampleAs3DTexture(colorTable,screen_color.rgb,SLICE_COUNT);\\n}\",tonemapPixelShader:\"\\nvarying vec2 vUV;\\nuniform sampler2D textureSampler;\\n\\nuniform float _ExposureAdjustment;\\n#if defined(HABLE_TONEMAPPING)\\nconst float A=0.15;\\nconst float B=0.50;\\nconst float C=0.10;\\nconst float D=0.20;\\nconst float E=0.02;\\nconst float F=0.30;\\nconst float W=11.2;\\n#endif\\nfloat Luminance(vec3 c)\\n{\\nreturn dot(c,vec3(0.22,0.707,0.071));\\n}\\nvoid main(void) \\n{\\nvec3 colour=texture2D(textureSampler,vUV).rgb;\\n#if defined(REINHARD_TONEMAPPING)\\nfloat lum=Luminance(colour.rgb); \\nfloat lumTm=lum*_ExposureAdjustment;\\nfloat scale=lumTm/(1.0+lumTm); \\ncolour*=scale/lum;\\n#elif defined(HABLE_TONEMAPPING)\\ncolour*=_ExposureAdjustment;\\nconst float ExposureBias=2.0;\\nvec3 x=ExposureBias*colour;\\nvec3 curr=((x*(A*x+C*B)+D*E)/(x*(A*x+B)+D*F))-E/F;\\nx=vec3(W,W,W);\\nvec3 whiteScale=1.0/(((x*(A*x+C*B)+D*E)/(x*(A*x+B)+D*F))-E/F);\\ncolour=curr*whiteScale;\\n#elif defined(OPTIMIZED_HEJIDAWSON_TONEMAPPING)\\ncolour*=_ExposureAdjustment;\\nvec3 X=max(vec3(0.0,0.0,0.0),colour-0.004);\\nvec3 retColor=(X*(6.2*X+0.5))/(X*(6.2*X+1.7)+0.06);\\ncolour=retColor*retColor;\\n#elif defined(PHOTOGRAPHIC_TONEMAPPING)\\ncolour=vec3(1.0,1.0,1.0)-exp2(-_ExposureAdjustment*colour);\\n#endif\\ngl_FragColor=vec4(colour.rgb,1.0);\\n}\",displayPassPixelShader:\"\\nvarying vec2 vUV;\\nuniform sampler2D textureSampler;\\nuniform sampler2D passSampler;\\nvoid main(void)\\n{\\ngl_FragColor=texture2D(passSampler,vUV);\\n}\",highlightsPixelShader:\"\\nvarying vec2 vUV;\\nuniform sampler2D textureSampler;\\nconst vec3 RGBLuminanceCoefficients=vec3(0.2126,0.7152,0.0722);\\nvoid main(void) \\n{\\nvec4 tex=texture2D(textureSampler,vUV);\\nvec3 c=tex.rgb;\\nfloat luma=dot(c.rgb,RGBLuminanceCoefficients);\\n\\n\\ngl_FragColor=vec4(pow(c,vec3(25.0-luma*15.0)),tex.a); \\n}\",imageProcessingPixelShader:\"\\nvarying vec2 vUV;\\nuniform sampler2D textureSampler;\\n#include<imageProcessingDeclaration>\\n#include<helperFunctions>\\n#include<imageProcessingFunctions>\\nvoid main(void)\\n{\\nvec4 result=texture2D(textureSampler,vUV);\\n#ifdef IMAGEPROCESSING\\n#ifndef FROMLINEARSPACE\\n\\nresult.rgb=toLinearSpace(result.rgb);\\n#endif\\nresult=applyImageProcessing(result);\\n#else\\n\\n#ifdef FROMLINEARSPACE\\nresult=applyImageProcessing(result);\\n#endif\\n#endif\\ngl_FragColor=result;\\n}\",lensFlareVertexShader:\"\\nattribute vec2 position;\\n\\nuniform mat4 viewportMatrix;\\n\\nvarying vec2 vUV;\\nconst vec2 madd=vec2(0.5,0.5);\\nvoid main(void) { \\nvUV=position*madd+madd;\\ngl_Position=viewportMatrix*vec4(position,0.0,1.0);\\n}\",lensFlarePixelShader:\"\\nvarying vec2 vUV;\\nuniform sampler2D textureSampler;\\n\\nuniform vec4 color;\\nvoid main(void) {\\nvec4 baseColor=texture2D(textureSampler,vUV);\\ngl_FragColor=baseColor*color;\\n}\",anaglyphPixelShader:\"\\nvarying vec2 vUV;\\nuniform sampler2D textureSampler;\\nuniform sampler2D leftSampler;\\nvoid main(void)\\n{\\nvec4 leftFrag=texture2D(leftSampler,vUV);\\nleftFrag=vec4(1.0,leftFrag.g,leftFrag.b,1.0);\\nvec4 rightFrag=texture2D(textureSampler,vUV);\\nrightFrag=vec4(rightFrag.r,1.0,1.0,1.0);\\ngl_FragColor=vec4(rightFrag.rgb*leftFrag.rgb,1.0);\\n}\",stereoscopicInterlacePixelShader:\"const vec3 TWO=vec3(2.0,2.0,2.0);\\nvarying vec2 vUV;\\nuniform sampler2D camASampler;\\nuniform sampler2D textureSampler;\\nuniform vec2 stepSize;\\nvoid main(void)\\n{\\nbool useCamB;\\nvec2 texCoord1;\\nvec2 texCoord2;\\nvec3 frag1;\\nvec3 frag2;\\n#ifdef IS_STEREOSCOPIC_HORIZ\\nuseCamB=vUV.x>0.5;\\ntexCoord1=vec2(useCamB ? (vUV.x-0.5)*2.0 : vUV.x*2.0,vUV.y);\\ntexCoord2=vec2(texCoord1.x+stepSize.x,vUV.y);\\n#else\\nuseCamB=vUV.y>0.5;\\ntexCoord1=vec2(vUV.x,useCamB ? (vUV.y-0.5)*2.0 : vUV.y*2.0);\\ntexCoord2=vec2(vUV.x,texCoord1.y+stepSize.y);\\n#endif\\n\\nif (useCamB){\\nfrag1=texture2D(textureSampler,texCoord1).rgb;\\nfrag2=texture2D(textureSampler,texCoord2).rgb;\\n}else{\\nfrag1=texture2D(camASampler ,texCoord1).rgb;\\nfrag2=texture2D(camASampler ,texCoord2).rgb;\\n}\\ngl_FragColor=vec4((frag1+frag2)/TWO,1.0);\\n}\",vrDistortionCorrectionPixelShader:\"\\nvarying vec2 vUV;\\nuniform sampler2D textureSampler;\\nuniform vec2 LensCenter;\\nuniform vec2 Scale;\\nuniform vec2 ScaleIn;\\nuniform vec4 HmdWarpParam;\\nvec2 HmdWarp(vec2 in01) {\\nvec2 theta=(in01-LensCenter)*ScaleIn; \\nfloat rSq=theta.x*theta.x+theta.y*theta.y;\\nvec2 rvector=theta*(HmdWarpParam.x+HmdWarpParam.y*rSq+HmdWarpParam.z*rSq*rSq+HmdWarpParam.w*rSq*rSq*rSq);\\nreturn LensCenter+Scale*rvector;\\n}\\nvoid main(void)\\n{\\nvec2 tc=HmdWarp(vUV);\\nif (tc.x <0.0 || tc.x>1.0 || tc.y<0.0 || tc.y>1.0)\\ngl_FragColor=vec4(0.0,0.0,0.0,0.0);\\nelse{\\ngl_FragColor=texture2D(textureSampler,tc);\\n}\\n}\",glowBlurPostProcessPixelShader:\"\\nvarying vec2 vUV;\\nuniform sampler2D textureSampler;\\n\\nuniform vec2 screenSize;\\nuniform vec2 direction;\\nuniform float blurWidth;\\n\\nfloat getLuminance(vec3 color)\\n{\\nreturn dot(color,vec3(0.2126,0.7152,0.0722));\\n}\\nvoid main(void)\\n{\\nfloat weights[7];\\nweights[0]=0.05;\\nweights[1]=0.1;\\nweights[2]=0.2;\\nweights[3]=0.3;\\nweights[4]=0.2;\\nweights[5]=0.1;\\nweights[6]=0.05;\\nvec2 texelSize=vec2(1.0/screenSize.x,1.0/screenSize.y);\\nvec2 texelStep=texelSize*direction*blurWidth;\\nvec2 start=vUV-3.0*texelStep;\\nvec4 baseColor=vec4(0.,0.,0.,0.);\\nvec2 texelOffset=vec2(0.,0.);\\nfor (int i=0; i<7; i++)\\n{\\n\\nvec4 texel=texture2D(textureSampler,start+texelOffset);\\nbaseColor.a+=texel.a*weights[i];\\n\\nfloat luminance=getLuminance(baseColor.rgb);\\nfloat luminanceTexel=getLuminance(texel.rgb);\\nfloat choice=step(luminanceTexel,luminance);\\nbaseColor.rgb=choice*baseColor.rgb+(1.0-choice)*texel.rgb;\\ntexelOffset+=texelStep;\\n}\\ngl_FragColor=baseColor;\\n}\",glowMapGenerationPixelShader:\"#ifdef ALPHATEST\\nvarying vec2 vUVDiffuse;\\nuniform sampler2D diffuseSampler;\\n#endif\\n#ifdef EMISSIVE\\nvarying vec2 vUVEmissive;\\nuniform sampler2D emissiveSampler;\\n#endif\\nuniform vec4 color;\\nvoid main(void)\\n{\\n#ifdef ALPHATEST\\nif (texture2D(diffuseSampler,vUVDiffuse).a<0.4)\\ndiscard;\\n#endif\\n#ifdef EMISSIVE\\ngl_FragColor=texture2D(emissiveSampler,vUVEmissive)*color;\\n#else\\ngl_FragColor=color;\\n#endif\\n}\",glowMapGenerationVertexShader:\"\\nattribute vec3 position;\\n#include<bonesDeclaration>\\n#include<morphTargetsVertexGlobalDeclaration>\\n#include<morphTargetsVertexDeclaration>[0..maxSimultaneousMorphTargets]\\n\\n#include<instancesDeclaration>\\nuniform mat4 viewProjection;\\nvarying vec4 vPosition;\\n#ifdef UV1\\nattribute vec2 uv;\\n#endif\\n#ifdef UV2\\nattribute vec2 uv2;\\n#endif\\n#ifdef ALPHATEST\\nvarying vec2 vUVDiffuse;\\nuniform mat4 diffuseMatrix;\\n#endif\\n#ifdef EMISSIVE\\nvarying vec2 vUVEmissive;\\nuniform mat4 emissiveMatrix;\\n#endif\\nvoid main(void)\\n{\\nvec3 positionUpdated=position;\\n#include<morphTargetsVertex>[0..maxSimultaneousMorphTargets]\\n#include<instancesVertex>\\n#include<bonesVertex>\\n#ifdef CUBEMAP\\nvPosition=finalWorld*vec4(positionUpdated,1.0);\\ngl_Position=viewProjection*finalWorld*vec4(position,1.0);\\n#else\\nvPosition=viewProjection*finalWorld*vec4(positionUpdated,1.0);\\ngl_Position=vPosition;\\n#endif\\n#ifdef ALPHATEST\\n#ifdef DIFFUSEUV1\\nvUVDiffuse=vec2(diffuseMatrix*vec4(uv,1.0,0.0));\\n#endif\\n#ifdef DIFFUSEUV2\\nvUVDiffuse=vec2(diffuseMatrix*vec4(uv2,1.0,0.0));\\n#endif\\n#endif\\n#ifdef EMISSIVE\\n#ifdef EMISSIVEUV1\\nvUVEmissive=vec2(emissiveMatrix*vec4(uv,1.0,0.0));\\n#endif\\n#ifdef EMISSIVEUV2\\nvUVEmissive=vec2(emissiveMatrix*vec4(uv2,1.0,0.0));\\n#endif\\n#endif\\n}\",glowMapMergePixelShader:\"\\nvarying vec2 vUV;\\nuniform sampler2D textureSampler;\\n#ifdef EMISSIVE\\nuniform sampler2D textureSampler2;\\n#endif\\n\\nuniform float offset;\\nvoid main(void) {\\nvec4 baseColor=texture2D(textureSampler,vUV);\\n#ifdef EMISSIVE\\nbaseColor+=texture2D(textureSampler2,vUV);\\nbaseColor*=offset;\\n#else\\nbaseColor.a=abs(offset-baseColor.a);\\n#ifdef STROKE\\nfloat alpha=smoothstep(.0,.1,baseColor.a);\\nbaseColor.a=alpha;\\nbaseColor.rgb=baseColor.rgb*alpha;\\n#endif\\n#endif\\ngl_FragColor=baseColor;\\n}\",glowMapMergeVertexShader:\"\\nattribute vec2 position;\\n\\nvarying vec2 vUV;\\nconst vec2 madd=vec2(0.5,0.5);\\nvoid main(void) {\\nvUV=position*madd+madd;\\ngl_Position=vec4(position,0.0,1.0);\\n}\",lineVertexShader:\"\\nattribute vec3 position;\\nattribute vec4 normal;\\n\\nuniform mat4 worldViewProjection;\\nuniform float width;\\nuniform float aspectRatio;\\nvoid main(void) {\\nvec4 viewPosition=worldViewProjection*vec4(position,1.0);\\nvec4 viewPositionNext=worldViewProjection*vec4(normal.xyz,1.0);\\nvec2 currentScreen=viewPosition.xy/viewPosition.w;\\nvec2 nextScreen=viewPositionNext.xy/viewPositionNext.w;\\ncurrentScreen.x*=aspectRatio;\\nnextScreen.x*=aspectRatio;\\nvec2 dir=normalize(nextScreen-currentScreen);\\nvec2 normalDir=vec2(-dir.y,dir.x);\\nnormalDir*=width/2.0;\\nnormalDir.x/=aspectRatio;\\nvec4 offset=vec4(normalDir*normal.w,0.0,0.0);\\ngl_Position=viewPosition+offset;\\n}\",linePixelShader:\"uniform vec4 color;\\nvoid main(void) {\\ngl_FragColor=color;\\n}\",outlineVertexShader:\"\\nattribute vec3 position;\\nattribute vec3 normal;\\n#include<bonesDeclaration>\\n\\nuniform float offset;\\n#include<instancesDeclaration>\\nuniform mat4 viewProjection;\\n#ifdef ALPHATEST\\nvarying vec2 vUV;\\nuniform mat4 diffuseMatrix;\\n#ifdef UV1\\nattribute vec2 uv;\\n#endif\\n#ifdef UV2\\nattribute vec2 uv2;\\n#endif\\n#endif\\n#include<logDepthDeclaration>\\nvoid main(void)\\n{\\nvec3 offsetPosition=position+normal*offset;\\n#include<instancesVertex>\\n#include<bonesVertex>\\ngl_Position=viewProjection*finalWorld*vec4(offsetPosition,1.0);\\n#ifdef ALPHATEST\\n#ifdef UV1\\nvUV=vec2(diffuseMatrix*vec4(uv,1.0,0.0));\\n#endif\\n#ifdef UV2\\nvUV=vec2(diffuseMatrix*vec4(uv2,1.0,0.0));\\n#endif\\n#endif\\n#include<logDepthVertex>\\n}\\n\",outlinePixelShader:\"#ifdef LOGARITHMICDEPTH\\n#extension GL_EXT_frag_depth : enable\\n#endif\\nuniform vec4 color;\\n#ifdef ALPHATEST\\nvarying vec2 vUV;\\nuniform sampler2D diffuseSampler;\\n#endif\\n#include<logDepthDeclaration>\\nvoid main(void) {\\n#ifdef ALPHATEST\\nif (texture2D(diffuseSampler,vUV).a<0.4)\\ndiscard;\\n#endif\\n#include<logDepthFragment>\\ngl_FragColor=color;\\n}\",layerVertexShader:\"\\nattribute vec2 position;\\n\\nuniform vec2 scale;\\nuniform vec2 offset;\\nuniform mat4 textureMatrix;\\n\\nvarying vec2 vUV;\\nconst vec2 madd=vec2(0.5,0.5);\\nvoid main(void) { \\nvec2 shiftedPosition=position*scale+offset;\\nvUV=vec2(textureMatrix*vec4(shiftedPosition*madd+madd,1.0,0.0));\\ngl_Position=vec4(shiftedPosition,0.0,1.0);\\n}\",layerPixelShader:\"\\nvarying vec2 vUV;\\nuniform sampler2D textureSampler;\\n\\nuniform vec4 color;\\nvoid main(void) {\\nvec4 baseColor=texture2D(textureSampler,vUV);\\n#ifdef ALPHATEST\\nif (baseColor.a<0.4)\\ndiscard;\\n#endif\\ngl_FragColor=baseColor*color;\\n}\",backgroundVertexShader:\"precision highp float;\\n#include<__decl__backgroundVertex>\\n#include<helperFunctions>\\n\\nattribute vec3 position;\\n#ifdef NORMAL\\nattribute vec3 normal;\\n#endif\\n#include<bonesDeclaration>\\n\\n#include<instancesDeclaration>\\n#ifdef POINTSIZE\\nuniform float pointSize;\\n#endif\\n\\nvarying vec3 vPositionW;\\n#ifdef NORMAL\\nvarying vec3 vNormalW;\\n#endif\\n#ifdef UV1\\nattribute vec2 uv;\\n#endif\\n#ifdef UV2\\nattribute vec2 uv2;\\n#endif\\n#ifdef MAINUV1\\nvarying vec2 vMainUV1;\\n#endif\\n#ifdef MAINUV2\\nvarying vec2 vMainUV2; \\n#endif\\n#if defined(DIFFUSE) && DIFFUSEDIRECTUV == 0\\nvarying vec2 vDiffuseUV;\\n#endif\\n#include<clipPlaneVertexDeclaration>\\n#include<fogVertexDeclaration>\\n#include<__decl__lightFragment>[0..maxSimultaneousLights]\\n#ifdef REFLECTIONMAP_SKYBOX\\nvarying vec3 vPositionUVW;\\n#endif\\n#if defined(REFLECTIONMAP_EQUIRECTANGULAR_FIXED) || defined(REFLECTIONMAP_MIRROREDEQUIRECTANGULAR_FIXED)\\nvarying vec3 vDirectionW;\\n#endif\\nvoid main(void) {\\n#ifdef REFLECTIONMAP_SKYBOX\\n#ifdef REFLECTIONMAP_SKYBOX_TRANSFORMED\\nvPositionUVW=(reflectionMatrix*vec4(position,1.0)).xyz;\\n#else\\nvPositionUVW=position;\\n#endif\\n#endif \\n#include<instancesVertex>\\n#include<bonesVertex>\\ngl_Position=viewProjection*finalWorld*vec4(position,1.0);\\nvec4 worldPos=finalWorld*vec4(position,1.0);\\nvPositionW=vec3(worldPos);\\n#ifdef NORMAL\\nmat3 normalWorld=mat3(finalWorld);\\n#ifdef NONUNIFORMSCALING\\nnormalWorld=transposeMat3(inverseMat3(normalWorld));\\n#endif\\nvNormalW=normalize(normalWorld*normal);\\n#endif\\n#if defined(REFLECTIONMAP_EQUIRECTANGULAR_FIXED) || defined(REFLECTIONMAP_MIRROREDEQUIRECTANGULAR_FIXED)\\nvDirectionW=normalize(vec3(finalWorld*vec4(position,0.0)));\\n#ifdef EQUIRECTANGULAR_RELFECTION_FOV\\nmat3 screenToWorld=inverseMat3(mat3(finalWorld*viewProjection));\\nvec3 segment=mix(vDirectionW,screenToWorld*vec3(0.0,0.0,1.0),abs(fFovMultiplier-1.0));\\nif (fFovMultiplier<=1.0) {\\nvDirectionW=normalize(segment);\\n} else {\\nvDirectionW=normalize(vDirectionW+(vDirectionW-segment));\\n}\\n#endif\\n#endif\\n#ifndef UV1\\nvec2 uv=vec2(0.,0.);\\n#endif\\n#ifndef UV2\\nvec2 uv2=vec2(0.,0.);\\n#endif\\n#ifdef MAINUV1\\nvMainUV1=uv;\\n#endif \\n#ifdef MAINUV2\\nvMainUV2=uv2;\\n#endif\\n#if defined(DIFFUSE) && DIFFUSEDIRECTUV == 0 \\nif (vDiffuseInfos.x == 0.)\\n{\\nvDiffuseUV=vec2(diffuseMatrix*vec4(uv,1.0,0.0));\\n}\\nelse\\n{\\nvDiffuseUV=vec2(diffuseMatrix*vec4(uv2,1.0,0.0));\\n}\\n#endif\\n\\n#include<clipPlaneVertex>\\n\\n#include<fogVertex>\\n\\n#include<shadowsVertex>[0..maxSimultaneousLights]\\n\\n#ifdef VERTEXCOLOR\\nvColor=color;\\n#endif\\n\\n#ifdef POINTSIZE\\ngl_PointSize=pointSize;\\n#endif\\n}\\n\",backgroundPixelShader:\"#ifdef TEXTURELODSUPPORT\\n#extension GL_EXT_shader_texture_lod : enable\\n#endif\\nprecision highp float;\\n#include<__decl__backgroundFragment>\\n#define RECIPROCAL_PI2 0.15915494\\n\\nuniform vec3 vEyePosition;\\n\\nvarying vec3 vPositionW;\\n#ifdef MAINUV1\\nvarying vec2 vMainUV1;\\n#endif \\n#ifdef MAINUV2 \\nvarying vec2 vMainUV2; \\n#endif \\n#ifdef NORMAL\\nvarying vec3 vNormalW;\\n#endif\\n#ifdef DIFFUSE\\n#if DIFFUSEDIRECTUV == 1\\n#define vDiffuseUV vMainUV1\\n#elif DIFFUSEDIRECTUV == 2\\n#define vDiffuseUV vMainUV2\\n#else\\nvarying vec2 vDiffuseUV;\\n#endif\\nuniform sampler2D diffuseSampler;\\n#endif\\n\\n#ifdef REFLECTION\\n#ifdef REFLECTIONMAP_3D\\n#define sampleReflection(s,c) textureCube(s,c)\\nuniform samplerCube reflectionSampler;\\n#ifdef TEXTURELODSUPPORT\\n#define sampleReflectionLod(s,c,l) textureCubeLodEXT(s,c,l)\\n#else\\nuniform samplerCube reflectionSamplerLow;\\nuniform samplerCube reflectionSamplerHigh;\\n#endif\\n#else\\n#define sampleReflection(s,c) texture2D(s,c)\\nuniform sampler2D reflectionSampler;\\n#ifdef TEXTURELODSUPPORT\\n#define sampleReflectionLod(s,c,l) texture2DLodEXT(s,c,l)\\n#else\\nuniform samplerCube reflectionSamplerLow;\\nuniform samplerCube reflectionSamplerHigh;\\n#endif\\n#endif\\n#ifdef REFLECTIONMAP_SKYBOX\\nvarying vec3 vPositionUVW;\\n#else\\n#if defined(REFLECTIONMAP_EQUIRECTANGULAR_FIXED) || defined(REFLECTIONMAP_MIRROREDEQUIRECTANGULAR_FIXED)\\nvarying vec3 vDirectionW;\\n#endif\\n#endif\\n#include<reflectionFunction>\\n#endif\\n\\n#ifndef FROMLINEARSPACE\\n#define FROMLINEARSPACE;\\n#endif\\n\\n#ifndef SHADOWONLY\\n#define SHADOWONLY;\\n#endif\\n#include<imageProcessingDeclaration>\\n\\n#include<__decl__lightFragment>[0..maxSimultaneousLights]\\n#include<helperFunctions>\\n#include<lightsFragmentFunctions>\\n#include<shadowsFragmentFunctions>\\n#include<imageProcessingFunctions>\\n#include<clipPlaneFragmentDeclaration>\\n\\n#include<fogFragmentDeclaration>\\n#ifdef REFLECTIONFRESNEL\\n#define FRESNEL_MAXIMUM_ON_ROUGH 0.25\\nvec3 fresnelSchlickEnvironmentGGX(float VdotN,vec3 reflectance0,vec3 reflectance90,float smoothness)\\n{\\n\\nfloat weight=mix(FRESNEL_MAXIMUM_ON_ROUGH,1.0,smoothness);\\nreturn reflectance0+weight*(reflectance90-reflectance0)*pow(clamp(1.0-VdotN,0.,1.),5.0);\\n}\\n#endif\\nvoid main(void) {\\n#include<clipPlaneFragment>\\nvec3 viewDirectionW=normalize(vEyePosition-vPositionW);\\n\\n#ifdef NORMAL\\nvec3 normalW=normalize(vNormalW);\\n#else\\nvec3 normalW=vec3(0.0,1.0,0.0);\\n#endif\\n\\nfloat shadow=1.;\\nfloat globalShadow=0.;\\nfloat shadowLightCount=0.;\\n#include<lightFragment>[0..maxSimultaneousLights]\\n#ifdef SHADOWINUSE\\nglobalShadow/=shadowLightCount;\\n#else\\nglobalShadow=1.0;\\n#endif\\n\\nvec4 reflectionColor=vec4(1.,1.,1.,1.);\\n#ifdef REFLECTION\\nvec3 reflectionVector=computeReflectionCoords(vec4(vPositionW,1.0),normalW);\\n#ifdef REFLECTIONMAP_OPPOSITEZ\\nreflectionVector.z*=-1.0;\\n#endif\\n\\n#ifdef REFLECTIONMAP_3D\\nvec3 reflectionCoords=reflectionVector;\\n#else\\nvec2 reflectionCoords=reflectionVector.xy;\\n#ifdef REFLECTIONMAP_PROJECTION\\nreflectionCoords/=reflectionVector.z;\\n#endif\\nreflectionCoords.y=1.0-reflectionCoords.y;\\n#endif\\n#ifdef REFLECTIONBLUR\\nfloat reflectionLOD=vReflectionInfos.y;\\n#ifdef TEXTURELODSUPPORT\\n\\nreflectionLOD=reflectionLOD*log2(vReflectionMicrosurfaceInfos.x)*vReflectionMicrosurfaceInfos.y+vReflectionMicrosurfaceInfos.z;\\nreflectionColor=sampleReflectionLod(reflectionSampler,reflectionCoords,reflectionLOD);\\n#else\\nfloat lodReflectionNormalized=clamp(reflectionLOD,0.,1.);\\nfloat lodReflectionNormalizedDoubled=lodReflectionNormalized*2.0;\\nvec4 reflectionSpecularMid=sampleReflection(reflectionSampler,reflectionCoords);\\nif(lodReflectionNormalizedDoubled<1.0){\\nreflectionColor=mix(\\nsampleReflection(reflectionSamplerHigh,reflectionCoords),\\nreflectionSpecularMid,\\nlodReflectionNormalizedDoubled\\n);\\n} else {\\nreflectionColor=mix(\\nreflectionSpecularMid,\\nsampleReflection(reflectionSamplerLow,reflectionCoords),\\nlodReflectionNormalizedDoubled-1.0\\n);\\n}\\n#endif\\n#else\\nvec4 reflectionSample=sampleReflection(reflectionSampler,reflectionCoords);\\nreflectionColor=reflectionSample;\\n#endif\\n#ifdef RGBDREFLECTION\\nreflectionColor.rgb=fromRGBD(reflectionColor);\\n#endif\\n#ifdef GAMMAREFLECTION\\nreflectionColor.rgb=toLinearSpace(reflectionColor.rgb);\\n#endif\\n#ifdef REFLECTIONBGR\\nreflectionColor.rgb=reflectionColor.bgr;\\n#endif\\n\\nreflectionColor.rgb*=vReflectionInfos.x;\\n#endif\\n\\nvec3 diffuseColor=vec3(1.,1.,1.);\\nfloat finalAlpha=alpha;\\n#ifdef DIFFUSE\\nvec4 diffuseMap=texture2D(diffuseSampler,vDiffuseUV);\\n#ifdef GAMMADIFFUSE\\ndiffuseMap.rgb=toLinearSpace(diffuseMap.rgb);\\n#endif\\n\\ndiffuseMap.rgb*=vDiffuseInfos.y;\\n#ifdef DIFFUSEHASALPHA\\nfinalAlpha*=diffuseMap.a;\\n#endif\\ndiffuseColor=diffuseMap.rgb;\\n#endif\\n\\n#ifdef REFLECTIONFRESNEL\\nvec3 colorBase=diffuseColor;\\n#else\\nvec3 colorBase=reflectionColor.rgb*diffuseColor;\\n#endif\\ncolorBase=max(colorBase,0.0);\\n\\n#ifdef USERGBCOLOR\\nvec3 finalColor=colorBase;\\n#else\\n#ifdef USEHIGHLIGHTANDSHADOWCOLORS\\nvec3 mainColor=mix(vPrimaryColorShadow.rgb,vPrimaryColor.rgb,colorBase);\\n#else\\nvec3 mainColor=vPrimaryColor.rgb;\\n#endif\\nvec3 finalColor=colorBase*mainColor;\\n#endif\\n\\n#ifdef REFLECTIONFRESNEL\\nvec3 reflectionAmount=vReflectionControl.xxx;\\nvec3 reflectionReflectance0=vReflectionControl.yyy;\\nvec3 reflectionReflectance90=vReflectionControl.zzz;\\nfloat VdotN=dot(normalize(vEyePosition),normalW);\\nvec3 planarReflectionFresnel=fresnelSchlickEnvironmentGGX(clamp(VdotN,0.0,1.0),reflectionReflectance0,reflectionReflectance90,1.0);\\nreflectionAmount*=planarReflectionFresnel;\\n#ifdef REFLECTIONFALLOFF\\nfloat reflectionDistanceFalloff=1.0-clamp(length(vPositionW.xyz-vBackgroundCenter)*vReflectionControl.w,0.0,1.0);\\nreflectionDistanceFalloff*=reflectionDistanceFalloff;\\nreflectionAmount*=reflectionDistanceFalloff;\\n#endif\\nfinalColor=mix(finalColor,reflectionColor.rgb,clamp(reflectionAmount,0.,1.));\\n#endif\\n#ifdef OPACITYFRESNEL\\nfloat viewAngleToFloor=dot(normalW,normalize(vEyePosition-vBackgroundCenter));\\n\\nconst float startAngle=0.1;\\nfloat fadeFactor=clamp(viewAngleToFloor/startAngle,0.0,1.0);\\nfinalAlpha*=fadeFactor*fadeFactor;\\n#endif\\n\\n#ifdef SHADOWINUSE\\nfinalColor=mix(finalColor*shadowLevel,finalColor,globalShadow);\\n#endif\\n\\nvec4 color=vec4(finalColor,finalAlpha);\\n#include<fogFragment>\\n#ifdef IMAGEPROCESSINGPOSTPROCESS\\n\\n\\ncolor.rgb=clamp(color.rgb,0.,30.0);\\n#else\\n\\ncolor=applyImageProcessing(color);\\n#endif\\n#ifdef PREMULTIPLYALPHA\\n\\ncolor.rgb*=color.a;\\n#endif\\n#ifdef NOISE\\ncolor.rgb+=dither(vPositionW.xy,0.5);\\ncolor=max(color,0.0);\\n#endif\\ngl_FragColor=color;\\n}\\n\",noisePixelShader:\"\\n\\nuniform float brightness;\\nuniform float persistence;\\nuniform float timeScale;\\n\\nvarying vec2 vUV;\\n\\nvec2 hash22(vec2 p)\\n{\\np=p*mat2(127.1,311.7,269.5,183.3);\\np=-1.0+2.0*fract(sin(p)*43758.5453123);\\nreturn sin(p*6.283+timeScale);\\n}\\nfloat interpolationNoise(vec2 p)\\n{\\nvec2 pi=floor(p);\\nvec2 pf=p-pi;\\nvec2 w=pf*pf*(3.-2.*pf);\\nfloat f00=dot(hash22(pi+vec2(.0,.0)),pf-vec2(.0,.0));\\nfloat f01=dot(hash22(pi+vec2(.0,1.)),pf-vec2(.0,1.));\\nfloat f10=dot(hash22(pi+vec2(1.0,0.)),pf-vec2(1.0,0.));\\nfloat f11=dot(hash22(pi+vec2(1.0,1.)),pf-vec2(1.0,1.));\\nfloat xm1=mix(f00,f10,w.x);\\nfloat xm2=mix(f01,f11,w.x);\\nfloat ym=mix(xm1,xm2,w.y); \\nreturn ym;\\n}\\nfloat perlinNoise2D(float x,float y)\\n{\\nfloat sum=0.0;\\nfloat frequency=0.0;\\nfloat amplitude=0.0;\\nfor(int i=0; i<OCTAVES; i++)\\n{\\nfrequency=pow(2.0,float(i));\\namplitude=pow(persistence,float(i));\\nsum=sum+interpolationNoise(vec2(x*frequency,y*frequency))*amplitude;\\n}\\nreturn sum;\\n}\\n\\nvoid main(void)\\n{\\nfloat x=abs(vUV.x);\\nfloat y=abs(vUV.y);\\nfloat noise=brightness+(1.0-brightness)*perlinNoise2D(x,y);\\ngl_FragColor=vec4(noise,noise,noise,1.0);\\n}\\n\"},$a.Effect.IncludesShadersStore={depthPrePass:\"#ifdef DEPTHPREPASS\\ngl_FragColor=vec4(0.,0.,0.,1.0);\\nreturn;\\n#endif\",bonesDeclaration:\"#if NUM_BONE_INFLUENCERS>0\\nuniform mat4 mBones[BonesPerMesh];\\nattribute vec4 matricesIndices;\\nattribute vec4 matricesWeights;\\n#if NUM_BONE_INFLUENCERS>4\\nattribute vec4 matricesIndicesExtra;\\nattribute vec4 matricesWeightsExtra;\\n#endif\\n#endif\",instancesDeclaration:\"#ifdef INSTANCES\\nattribute vec4 world0;\\nattribute vec4 world1;\\nattribute vec4 world2;\\nattribute vec4 world3;\\n#else\\nuniform mat4 world;\\n#endif\",pointCloudVertexDeclaration:\"#ifdef POINTSIZE\\nuniform float pointSize;\\n#endif\",bumpVertexDeclaration:\"#if defined(BUMP) || defined(PARALLAX)\\n#if defined(TANGENT) && defined(NORMAL) \\nvarying mat3 vTBN;\\n#endif\\n#endif\\n\",clipPlaneVertexDeclaration:\"#ifdef CLIPPLANE\\nuniform vec4 vClipPlane;\\nvarying float fClipDistance;\\n#endif\\n#ifdef CLIPPLANE2\\nuniform vec4 vClipPlane2;\\nvarying float fClipDistance2;\\n#endif\\n#ifdef CLIPPLANE3\\nuniform vec4 vClipPlane3;\\nvarying float fClipDistance3;\\n#endif\\n#ifdef CLIPPLANE4\\nuniform vec4 vClipPlane4;\\nvarying float fClipDistance4;\\n#endif\",fogVertexDeclaration:\"#ifdef FOG\\nvarying vec3 vFogDistance;\\n#endif\",morphTargetsVertexGlobalDeclaration:\"#ifdef MORPHTARGETS\\nuniform float morphTargetInfluences[NUM_MORPH_INFLUENCERS];\\n#endif\",morphTargetsVertexDeclaration:\"#ifdef MORPHTARGETS\\nattribute vec3 position{X};\\n#ifdef MORPHTARGETS_NORMAL\\nattribute vec3 normal{X};\\n#endif\\n#ifdef MORPHTARGETS_TANGENT\\nattribute vec3 tangent{X};\\n#endif\\n#endif\",logDepthDeclaration:\"#ifdef LOGARITHMICDEPTH\\nuniform float logarithmicDepthConstant;\\nvarying float vFragmentDepth;\\n#endif\",morphTargetsVertex:\"#ifdef MORPHTARGETS\\npositionUpdated+=(position{X}-position)*morphTargetInfluences[{X}];\\n#ifdef MORPHTARGETS_NORMAL\\nnormalUpdated+=(normal{X}-normal)*morphTargetInfluences[{X}];\\n#endif\\n#ifdef MORPHTARGETS_TANGENT\\ntangentUpdated.xyz+=(tangent{X}-tangent.xyz)*morphTargetInfluences[{X}];\\n#endif\\n#endif\",instancesVertex:\"#ifdef INSTANCES\\nmat4 finalWorld=mat4(world0,world1,world2,world3);\\n#else\\nmat4 finalWorld=world;\\n#endif\",bonesVertex:\"#if NUM_BONE_INFLUENCERS>0\\nmat4 influence;\\ninfluence=mBones[int(matricesIndices[0])]*matricesWeights[0];\\n#if NUM_BONE_INFLUENCERS>1\\ninfluence+=mBones[int(matricesIndices[1])]*matricesWeights[1];\\n#endif \\n#if NUM_BONE_INFLUENCERS>2\\ninfluence+=mBones[int(matricesIndices[2])]*matricesWeights[2];\\n#endif \\n#if NUM_BONE_INFLUENCERS>3\\ninfluence+=mBones[int(matricesIndices[3])]*matricesWeights[3];\\n#endif \\n#if NUM_BONE_INFLUENCERS>4\\ninfluence+=mBones[int(matricesIndicesExtra[0])]*matricesWeightsExtra[0];\\n#endif \\n#if NUM_BONE_INFLUENCERS>5\\ninfluence+=mBones[int(matricesIndicesExtra[1])]*matricesWeightsExtra[1];\\n#endif \\n#if NUM_BONE_INFLUENCERS>6\\ninfluence+=mBones[int(matricesIndicesExtra[2])]*matricesWeightsExtra[2];\\n#endif \\n#if NUM_BONE_INFLUENCERS>7\\ninfluence+=mBones[int(matricesIndicesExtra[3])]*matricesWeightsExtra[3];\\n#endif \\nfinalWorld=finalWorld*influence;\\n#endif\",bumpVertex:\"#if defined(BUMP) || defined(PARALLAX)\\n#if defined(TANGENT) && defined(NORMAL)\\nvec3 tbnNormal=normalize(normalUpdated);\\nvec3 tbnTangent=normalize(tangentUpdated.xyz);\\nvec3 tbnBitangent=cross(tbnNormal,tbnTangent)*tangentUpdated.w;\\nvTBN=mat3(finalWorld)*mat3(tbnTangent,tbnBitangent,tbnNormal);\\n#endif\\n#endif\",clipPlaneVertex:\"#ifdef CLIPPLANE\\nfClipDistance=dot(worldPos,vClipPlane);\\n#endif\\n#ifdef CLIPPLANE2\\nfClipDistance2=dot(worldPos,vClipPlane2);\\n#endif\\n#ifdef CLIPPLANE3\\nfClipDistance3=dot(worldPos,vClipPlane3);\\n#endif\\n#ifdef CLIPPLANE4\\nfClipDistance4=dot(worldPos,vClipPlane4);\\n#endif\",fogVertex:\"#ifdef FOG\\nvFogDistance=(view*worldPos).xyz;\\n#endif\",shadowsVertex:\"#ifdef SHADOWS\\n#if defined(SHADOW{X}) && !defined(SHADOWCUBE{X})\\nvPositionFromLight{X}=lightMatrix{X}*worldPos;\\nvDepthMetric{X}=((vPositionFromLight{X}.z+light{X}.depthValues.x)/(light{X}.depthValues.y));\\n#endif\\n#endif\",pointCloudVertex:\"#ifdef POINTSIZE\\ngl_PointSize=pointSize;\\n#endif\",logDepthVertex:\"#ifdef LOGARITHMICDEPTH\\nvFragmentDepth=1.0+gl_Position.w;\\ngl_Position.z=log2(max(0.000001,vFragmentDepth))*logarithmicDepthConstant;\\n#endif\",helperFunctions:\"const float PI=3.1415926535897932384626433832795;\\nconst float LinearEncodePowerApprox=2.2;\\nconst float GammaEncodePowerApprox=1.0/LinearEncodePowerApprox;\\nconst vec3 LuminanceEncodeApprox=vec3(0.2126,0.7152,0.0722);\\nmat3 transposeMat3(mat3 inMatrix) {\\nvec3 i0=inMatrix[0];\\nvec3 i1=inMatrix[1];\\nvec3 i2=inMatrix[2];\\nmat3 outMatrix=mat3(\\nvec3(i0.x,i1.x,i2.x),\\nvec3(i0.y,i1.y,i2.y),\\nvec3(i0.z,i1.z,i2.z)\\n);\\nreturn outMatrix;\\n}\\n\\nmat3 inverseMat3(mat3 inMatrix) {\\nfloat a00=inMatrix[0][0],a01=inMatrix[0][1],a02=inMatrix[0][2];\\nfloat a10=inMatrix[1][0],a11=inMatrix[1][1],a12=inMatrix[1][2];\\nfloat a20=inMatrix[2][0],a21=inMatrix[2][1],a22=inMatrix[2][2];\\nfloat b01=a22*a11-a12*a21;\\nfloat b11=-a22*a10+a12*a20;\\nfloat b21=a21*a10-a11*a20;\\nfloat det=a00*b01+a01*b11+a02*b21;\\nreturn mat3(b01,(-a22*a01+a02*a21),(a12*a01-a02*a11),\\nb11,(a22*a00-a02*a20),(-a12*a00+a02*a10),\\nb21,(-a21*a00+a01*a20),(a11*a00-a01*a10))/det;\\n}\\nfloat computeFallOff(float value,vec2 clipSpace,float frustumEdgeFalloff)\\n{\\nfloat mask=smoothstep(1.0-frustumEdgeFalloff,1.0,clamp(dot(clipSpace,clipSpace),0.,1.));\\nreturn mix(value,1.0,mask);\\n}\\nvec3 applyEaseInOut(vec3 x){\\nreturn x*x*(3.0-2.0*x);\\n}\\nvec3 toLinearSpace(vec3 color)\\n{\\nreturn pow(color,vec3(LinearEncodePowerApprox));\\n}\\nvec3 toGammaSpace(vec3 color)\\n{\\nreturn pow(color,vec3(GammaEncodePowerApprox));\\n}\\nfloat square(float value)\\n{\\nreturn value*value;\\n}\\nfloat getLuminance(vec3 color)\\n{\\nreturn clamp(dot(color,LuminanceEncodeApprox),0.,1.);\\n}\\n\\nfloat getRand(vec2 seed) {\\nreturn fract(sin(dot(seed.xy ,vec2(12.9898,78.233)))*43758.5453);\\n}\\nfloat dither(vec2 seed,float varianceAmount) {\\nfloat rand=getRand(seed);\\nfloat dither=mix(-varianceAmount/255.0,varianceAmount/255.0,rand);\\nreturn dither;\\n}\\n\\nconst float rgbdMaxRange=255.0;\\nvec4 toRGBD(vec3 color) {\\nfloat maxRGB=max(0.0000001,max(color.r,max(color.g,color.b)));\\nfloat D=max(rgbdMaxRange/maxRGB,1.);\\nD=clamp(floor(D)/255.0,0.,1.);\\n\\nvec3 rgb=color.rgb*D;\\n\\nrgb=toGammaSpace(rgb);\\nreturn vec4(rgb,D); \\n}\\nvec3 fromRGBD(vec4 rgbd) {\\n\\nrgbd.rgb=toLinearSpace(rgbd.rgb);\\n\\nreturn rgbd.rgb/rgbd.a;\\n}\",lightFragmentDeclaration:\"#ifdef LIGHT{X}\\nuniform vec4 vLightData{X};\\nuniform vec4 vLightDiffuse{X};\\n#ifdef SPECULARTERM\\nuniform vec3 vLightSpecular{X};\\n#else\\nvec3 vLightSpecular{X}=vec3(0.);\\n#endif\\n#ifdef SHADOW{X}\\n#if defined(SHADOWCUBE{X})\\nuniform samplerCube shadowSampler{X};\\n#else\\nvarying vec4 vPositionFromLight{X};\\nvarying float vDepthMetric{X};\\n#if defined(SHADOWPCSS{X})\\nuniform highp sampler2DShadow shadowSampler{X};\\nuniform highp sampler2D depthSampler{X};\\n#elif defined(SHADOWPCF{X})\\nuniform highp sampler2DShadow shadowSampler{X};\\n#else\\nuniform sampler2D shadowSampler{X};\\n#endif\\nuniform mat4 lightMatrix{X};\\n#endif\\nuniform vec4 shadowsInfo{X};\\nuniform vec2 depthValues{X};\\n#endif\\n#ifdef SPOTLIGHT{X}\\nuniform vec4 vLightDirection{X};\\nuniform vec4 vLightFalloff{X};\\n#elif defined(POINTLIGHT{X})\\nuniform vec4 vLightFalloff{X};\\n#elif defined(HEMILIGHT{X})\\nuniform vec3 vLightGround{X};\\n#endif\\n#ifdef PROJECTEDLIGHTTEXTURE{X}\\nuniform mat4 textureProjectionMatrix{X};\\nuniform sampler2D projectionLightSampler{X};\\n#endif\\n#endif\",lightsFragmentFunctions:\"\\nstruct lightingInfo\\n{\\nvec3 diffuse;\\n#ifdef SPECULARTERM\\nvec3 specular;\\n#endif\\n#ifdef NDOTL\\nfloat ndl;\\n#endif\\n};\\nlightingInfo computeLighting(vec3 viewDirectionW,vec3 vNormal,vec4 lightData,vec3 diffuseColor,vec3 specularColor,float range,float glossiness) {\\nlightingInfo result;\\nvec3 lightVectorW;\\nfloat attenuation=1.0;\\nif (lightData.w == 0.)\\n{\\nvec3 direction=lightData.xyz-vPositionW;\\nattenuation=max(0.,1.0-length(direction)/range);\\nlightVectorW=normalize(direction);\\n}\\nelse\\n{\\nlightVectorW=normalize(-lightData.xyz);\\n}\\n\\nfloat ndl=max(0.,dot(vNormal,lightVectorW));\\n#ifdef NDOTL\\nresult.ndl=ndl;\\n#endif\\nresult.diffuse=ndl*diffuseColor*attenuation;\\n#ifdef SPECULARTERM\\n\\nvec3 angleW=normalize(viewDirectionW+lightVectorW);\\nfloat specComp=max(0.,dot(vNormal,angleW));\\nspecComp=pow(specComp,max(1.,glossiness));\\nresult.specular=specComp*specularColor*attenuation;\\n#endif\\nreturn result;\\n}\\nlightingInfo computeSpotLighting(vec3 viewDirectionW,vec3 vNormal,vec4 lightData,vec4 lightDirection,vec3 diffuseColor,vec3 specularColor,float range,float glossiness) {\\nlightingInfo result;\\nvec3 direction=lightData.xyz-vPositionW;\\nvec3 lightVectorW=normalize(direction);\\nfloat attenuation=max(0.,1.0-length(direction)/range);\\n\\nfloat cosAngle=max(0.,dot(lightDirection.xyz,-lightVectorW));\\nif (cosAngle>=lightDirection.w)\\n{\\ncosAngle=max(0.,pow(cosAngle,lightData.w));\\nattenuation*=cosAngle;\\n\\nfloat ndl=max(0.,dot(vNormal,lightVectorW));\\n#ifdef NDOTL\\nresult.ndl=ndl;\\n#endif\\nresult.diffuse=ndl*diffuseColor*attenuation;\\n#ifdef SPECULARTERM\\n\\nvec3 angleW=normalize(viewDirectionW+lightVectorW);\\nfloat specComp=max(0.,dot(vNormal,angleW));\\nspecComp=pow(specComp,max(1.,glossiness));\\nresult.specular=specComp*specularColor*attenuation;\\n#endif\\nreturn result;\\n}\\nresult.diffuse=vec3(0.);\\n#ifdef SPECULARTERM\\nresult.specular=vec3(0.);\\n#endif\\n#ifdef NDOTL\\nresult.ndl=0.;\\n#endif\\nreturn result;\\n}\\nlightingInfo computeHemisphericLighting(vec3 viewDirectionW,vec3 vNormal,vec4 lightData,vec3 diffuseColor,vec3 specularColor,vec3 groundColor,float glossiness) {\\nlightingInfo result;\\n\\nfloat ndl=dot(vNormal,lightData.xyz)*0.5+0.5;\\n#ifdef NDOTL\\nresult.ndl=ndl;\\n#endif\\nresult.diffuse=mix(groundColor,diffuseColor,ndl);\\n#ifdef SPECULARTERM\\n\\nvec3 angleW=normalize(viewDirectionW+lightData.xyz);\\nfloat specComp=max(0.,dot(vNormal,angleW));\\nspecComp=pow(specComp,max(1.,glossiness));\\nresult.specular=specComp*specularColor;\\n#endif\\nreturn result;\\n}\\nvec3 computeProjectionTextureDiffuseLighting(sampler2D projectionLightSampler,mat4 textureProjectionMatrix){\\nvec4 strq=textureProjectionMatrix*vec4(vPositionW,1.0);\\nstrq/=strq.w;\\nvec3 textureColor=texture2D(projectionLightSampler,strq.xy).rgb;\\nreturn textureColor;\\n}\",lightUboDeclaration:\"#ifdef LIGHT{X}\\nuniform Light{X}\\n{\\nvec4 vLightData;\\nvec4 vLightDiffuse;\\nvec3 vLightSpecular;\\n#ifdef SPOTLIGHT{X}\\nvec4 vLightDirection;\\nvec4 vLightFalloff;\\n#elif defined(POINTLIGHT{X})\\nvec4 vLightFalloff;\\n#elif defined(HEMILIGHT{X})\\nvec3 vLightGround;\\n#endif\\nvec4 shadowsInfo;\\nvec2 depthValues;\\n} light{X};\\n#ifdef PROJECTEDLIGHTTEXTURE{X}\\nuniform mat4 textureProjectionMatrix{X};\\nuniform sampler2D projectionLightSampler{X};\\n#endif\\n#ifdef SHADOW{X}\\n#if defined(SHADOWCUBE{X})\\nuniform samplerCube shadowSampler{X}; \\n#else\\nvarying vec4 vPositionFromLight{X};\\nvarying float vDepthMetric{X};\\n#if defined(SHADOWPCSS{X})\\nuniform highp sampler2DShadow shadowSampler{X};\\nuniform highp sampler2D depthSampler{X};\\n#elif defined(SHADOWPCF{X})\\nuniform highp sampler2DShadow shadowSampler{X};\\n#else\\nuniform sampler2D shadowSampler{X};\\n#endif\\nuniform mat4 lightMatrix{X};\\n#endif\\n#endif\\n#endif\",defaultVertexDeclaration:\"\\nuniform mat4 viewProjection;\\nuniform mat4 view;\\n#ifdef DIFFUSE\\nuniform mat4 diffuseMatrix;\\nuniform vec2 vDiffuseInfos;\\n#endif\\n#ifdef AMBIENT\\nuniform mat4 ambientMatrix;\\nuniform vec2 vAmbientInfos;\\n#endif\\n#ifdef OPACITY\\nuniform mat4 opacityMatrix;\\nuniform vec2 vOpacityInfos;\\n#endif\\n#ifdef EMISSIVE\\nuniform vec2 vEmissiveInfos;\\nuniform mat4 emissiveMatrix;\\n#endif\\n#ifdef LIGHTMAP\\nuniform vec2 vLightmapInfos;\\nuniform mat4 lightmapMatrix;\\n#endif\\n#if defined(SPECULAR) && defined(SPECULARTERM)\\nuniform vec2 vSpecularInfos;\\nuniform mat4 specularMatrix;\\n#endif\\n#ifdef BUMP\\nuniform vec3 vBumpInfos;\\nuniform mat4 bumpMatrix;\\n#endif\\n#ifdef REFLECTION\\nuniform mat4 reflectionMatrix;\\n#endif\\n#ifdef POINTSIZE\\nuniform float pointSize;\\n#endif\\n\",defaultFragmentDeclaration:\"uniform vec4 vDiffuseColor;\\n#ifdef SPECULARTERM\\nuniform vec4 vSpecularColor;\\n#endif\\nuniform vec3 vEmissiveColor;\\n\\n#ifdef DIFFUSE\\nuniform vec2 vDiffuseInfos;\\n#endif\\n#ifdef AMBIENT\\nuniform vec2 vAmbientInfos;\\n#endif\\n#ifdef OPACITY \\nuniform vec2 vOpacityInfos;\\n#endif\\n#ifdef EMISSIVE\\nuniform vec2 vEmissiveInfos;\\n#endif\\n#ifdef LIGHTMAP\\nuniform vec2 vLightmapInfos;\\n#endif\\n#ifdef BUMP\\nuniform vec3 vBumpInfos;\\nuniform vec2 vTangentSpaceParams;\\n#endif\\n#if defined(REFLECTIONMAP_SPHERICAL) || defined(REFLECTIONMAP_PROJECTION) || defined(REFRACTION)\\nuniform mat4 view;\\n#endif\\n#ifdef REFRACTION\\nuniform vec4 vRefractionInfos;\\n#ifndef REFRACTIONMAP_3D\\nuniform mat4 refractionMatrix;\\n#endif\\n#ifdef REFRACTIONFRESNEL\\nuniform vec4 refractionLeftColor;\\nuniform vec4 refractionRightColor;\\n#endif\\n#endif\\n#if defined(SPECULAR) && defined(SPECULARTERM)\\nuniform vec2 vSpecularInfos;\\n#endif\\n#ifdef DIFFUSEFRESNEL\\nuniform vec4 diffuseLeftColor;\\nuniform vec4 diffuseRightColor;\\n#endif\\n#ifdef OPACITYFRESNEL\\nuniform vec4 opacityParts;\\n#endif\\n#ifdef EMISSIVEFRESNEL\\nuniform vec4 emissiveLeftColor;\\nuniform vec4 emissiveRightColor;\\n#endif\\n\\n#ifdef REFLECTION\\nuniform vec2 vReflectionInfos;\\n#ifdef REFLECTIONMAP_SKYBOX\\n#else\\n#if defined(REFLECTIONMAP_PLANAR) || defined(REFLECTIONMAP_CUBIC) || defined(REFLECTIONMAP_PROJECTION)\\nuniform mat4 reflectionMatrix;\\n#endif\\n#if defined(USE_LOCAL_REFLECTIONMAP_CUBIC) && defined(REFLECTIONMAP_CUBIC)\\nuniform vec3 vReflectionPosition;\\nuniform vec3 vReflectionSize; \\n#endif\\n#endif\\n#ifdef REFLECTIONFRESNEL\\nuniform vec4 reflectionLeftColor;\\nuniform vec4 reflectionRightColor;\\n#endif\\n#endif\",defaultUboDeclaration:\"layout(std140,column_major) uniform;\\nuniform Material\\n{\\nvec4 diffuseLeftColor;\\nvec4 diffuseRightColor;\\nvec4 opacityParts;\\nvec4 reflectionLeftColor;\\nvec4 reflectionRightColor;\\nvec4 refractionLeftColor;\\nvec4 refractionRightColor;\\nvec4 emissiveLeftColor; \\nvec4 emissiveRightColor;\\nvec2 vDiffuseInfos;\\nvec2 vAmbientInfos;\\nvec2 vOpacityInfos;\\nvec2 vReflectionInfos;\\nvec3 vReflectionPosition;\\nvec3 vReflectionSize;\\nvec2 vEmissiveInfos;\\nvec2 vLightmapInfos;\\nvec2 vSpecularInfos;\\nvec3 vBumpInfos;\\nmat4 diffuseMatrix;\\nmat4 ambientMatrix;\\nmat4 opacityMatrix;\\nmat4 reflectionMatrix;\\nmat4 emissiveMatrix;\\nmat4 lightmapMatrix;\\nmat4 specularMatrix;\\nmat4 bumpMatrix; \\nvec4 vTangentSpaceParams;\\nmat4 refractionMatrix;\\nvec4 vRefractionInfos;\\nvec4 vSpecularColor;\\nvec3 vEmissiveColor;\\nvec4 vDiffuseColor;\\nfloat pointSize; \\n};\\nuniform Scene {\\nmat4 viewProjection;\\nmat4 view;\\n};\",shadowsFragmentFunctions:\"#ifdef SHADOWS\\n#ifndef SHADOWFLOAT\\nfloat unpack(vec4 color)\\n{\\nconst vec4 bit_shift=vec4(1.0/(255.0*255.0*255.0),1.0/(255.0*255.0),1.0/255.0,1.0);\\nreturn dot(color,bit_shift);\\n}\\n#endif\\nfloat computeShadowCube(vec3 lightPosition,samplerCube shadowSampler,float darkness,vec2 depthValues)\\n{\\nvec3 directionToLight=vPositionW-lightPosition;\\nfloat depth=length(directionToLight);\\ndepth=(depth+depthValues.x)/(depthValues.y);\\ndepth=clamp(depth,0.,1.0);\\ndirectionToLight=normalize(directionToLight);\\ndirectionToLight.y=-directionToLight.y;\\n#ifndef SHADOWFLOAT\\nfloat shadow=unpack(textureCube(shadowSampler,directionToLight));\\n#else\\nfloat shadow=textureCube(shadowSampler,directionToLight).x;\\n#endif\\nif (depth>shadow)\\n{\\nreturn darkness;\\n}\\nreturn 1.0;\\n}\\nfloat computeShadowWithPoissonSamplingCube(vec3 lightPosition,samplerCube shadowSampler,float mapSize,float darkness,vec2 depthValues)\\n{\\nvec3 directionToLight=vPositionW-lightPosition;\\nfloat depth=length(directionToLight);\\ndepth=(depth+depthValues.x)/(depthValues.y);\\ndepth=clamp(depth,0.,1.0);\\ndirectionToLight=normalize(directionToLight);\\ndirectionToLight.y=-directionToLight.y;\\nfloat visibility=1.;\\nvec3 poissonDisk[4];\\npoissonDisk[0]=vec3(-1.0,1.0,-1.0);\\npoissonDisk[1]=vec3(1.0,-1.0,-1.0);\\npoissonDisk[2]=vec3(-1.0,-1.0,-1.0);\\npoissonDisk[3]=vec3(1.0,-1.0,1.0);\\n\\n#ifndef SHADOWFLOAT\\nif (unpack(textureCube(shadowSampler,directionToLight+poissonDisk[0]*mapSize))<depth) visibility-=0.25;\\nif (unpack(textureCube(shadowSampler,directionToLight+poissonDisk[1]*mapSize))<depth) visibility-=0.25;\\nif (unpack(textureCube(shadowSampler,directionToLight+poissonDisk[2]*mapSize))<depth) visibility-=0.25;\\nif (unpack(textureCube(shadowSampler,directionToLight+poissonDisk[3]*mapSize))<depth) visibility-=0.25;\\n#else\\nif (textureCube(shadowSampler,directionToLight+poissonDisk[0]*mapSize).x<depth) visibility-=0.25;\\nif (textureCube(shadowSampler,directionToLight+poissonDisk[1]*mapSize).x<depth) visibility-=0.25;\\nif (textureCube(shadowSampler,directionToLight+poissonDisk[2]*mapSize).x<depth) visibility-=0.25;\\nif (textureCube(shadowSampler,directionToLight+poissonDisk[3]*mapSize).x<depth) visibility-=0.25;\\n#endif\\nreturn min(1.0,visibility+darkness);\\n}\\nfloat computeShadowWithESMCube(vec3 lightPosition,samplerCube shadowSampler,float darkness,float depthScale,vec2 depthValues)\\n{\\nvec3 directionToLight=vPositionW-lightPosition;\\nfloat depth=length(directionToLight);\\ndepth=(depth+depthValues.x)/(depthValues.y);\\nfloat shadowPixelDepth=clamp(depth,0.,1.0);\\ndirectionToLight=normalize(directionToLight);\\ndirectionToLight.y=-directionToLight.y;\\n#ifndef SHADOWFLOAT\\nfloat shadowMapSample=unpack(textureCube(shadowSampler,directionToLight));\\n#else\\nfloat shadowMapSample=textureCube(shadowSampler,directionToLight).x;\\n#endif\\nfloat esm=1.0-clamp(exp(min(87.,depthScale*shadowPixelDepth))*shadowMapSample,0.,1.-darkness); \\nreturn esm;\\n}\\nfloat computeShadowWithCloseESMCube(vec3 lightPosition,samplerCube shadowSampler,float darkness,float depthScale,vec2 depthValues)\\n{\\nvec3 directionToLight=vPositionW-lightPosition;\\nfloat depth=length(directionToLight);\\ndepth=(depth+depthValues.x)/(depthValues.y);\\nfloat shadowPixelDepth=clamp(depth,0.,1.0);\\ndirectionToLight=normalize(directionToLight);\\ndirectionToLight.y=-directionToLight.y;\\n#ifndef SHADOWFLOAT\\nfloat shadowMapSample=unpack(textureCube(shadowSampler,directionToLight));\\n#else\\nfloat shadowMapSample=textureCube(shadowSampler,directionToLight).x;\\n#endif\\nfloat esm=clamp(exp(min(87.,-depthScale*(shadowPixelDepth-shadowMapSample))),darkness,1.);\\nreturn esm;\\n}\\nfloat computeShadow(vec4 vPositionFromLight,float depthMetric,sampler2D shadowSampler,float darkness,float frustumEdgeFalloff)\\n{\\nvec3 clipSpace=vPositionFromLight.xyz/vPositionFromLight.w;\\nvec2 uv=0.5*clipSpace.xy+vec2(0.5);\\nif (uv.x<0. || uv.x>1.0 || uv.y<0. || uv.y>1.0)\\n{\\nreturn 1.0;\\n}\\nfloat shadowPixelDepth=clamp(depthMetric,0.,1.0);\\n#ifndef SHADOWFLOAT\\nfloat shadow=unpack(texture2D(shadowSampler,uv));\\n#else\\nfloat shadow=texture2D(shadowSampler,uv).x;\\n#endif\\nif (shadowPixelDepth>shadow)\\n{\\nreturn computeFallOff(darkness,clipSpace.xy,frustumEdgeFalloff);\\n}\\nreturn 1.;\\n}\\nfloat computeShadowWithPoissonSampling(vec4 vPositionFromLight,float depthMetric,sampler2D shadowSampler,float mapSize,float darkness,float frustumEdgeFalloff)\\n{\\nvec3 clipSpace=vPositionFromLight.xyz/vPositionFromLight.w;\\nvec2 uv=0.5*clipSpace.xy+vec2(0.5);\\nif (uv.x<0. || uv.x>1.0 || uv.y<0. || uv.y>1.0)\\n{\\nreturn 1.0;\\n}\\nfloat shadowPixelDepth=clamp(depthMetric,0.,1.0);\\nfloat visibility=1.;\\nvec2 poissonDisk[4];\\npoissonDisk[0]=vec2(-0.94201624,-0.39906216);\\npoissonDisk[1]=vec2(0.94558609,-0.76890725);\\npoissonDisk[2]=vec2(-0.094184101,-0.92938870);\\npoissonDisk[3]=vec2(0.34495938,0.29387760);\\n\\n#ifndef SHADOWFLOAT\\nif (unpack(texture2D(shadowSampler,uv+poissonDisk[0]*mapSize))<shadowPixelDepth) visibility-=0.25;\\nif (unpack(texture2D(shadowSampler,uv+poissonDisk[1]*mapSize))<shadowPixelDepth) visibility-=0.25;\\nif (unpack(texture2D(shadowSampler,uv+poissonDisk[2]*mapSize))<shadowPixelDepth) visibility-=0.25;\\nif (unpack(texture2D(shadowSampler,uv+poissonDisk[3]*mapSize))<shadowPixelDepth) visibility-=0.25;\\n#else\\nif (texture2D(shadowSampler,uv+poissonDisk[0]*mapSize).x<shadowPixelDepth) visibility-=0.25;\\nif (texture2D(shadowSampler,uv+poissonDisk[1]*mapSize).x<shadowPixelDepth) visibility-=0.25;\\nif (texture2D(shadowSampler,uv+poissonDisk[2]*mapSize).x<shadowPixelDepth) visibility-=0.25;\\nif (texture2D(shadowSampler,uv+poissonDisk[3]*mapSize).x<shadowPixelDepth) visibility-=0.25;\\n#endif\\nreturn computeFallOff(min(1.0,visibility+darkness),clipSpace.xy,frustumEdgeFalloff);\\n}\\nfloat computeShadowWithESM(vec4 vPositionFromLight,float depthMetric,sampler2D shadowSampler,float darkness,float depthScale,float frustumEdgeFalloff)\\n{\\nvec3 clipSpace=vPositionFromLight.xyz/vPositionFromLight.w;\\nvec2 uv=0.5*clipSpace.xy+vec2(0.5);\\nif (uv.x<0. || uv.x>1.0 || uv.y<0. || uv.y>1.0)\\n{\\nreturn 1.0;\\n}\\nfloat shadowPixelDepth=clamp(depthMetric,0.,1.0);\\n#ifndef SHADOWFLOAT\\nfloat shadowMapSample=unpack(texture2D(shadowSampler,uv));\\n#else\\nfloat shadowMapSample=texture2D(shadowSampler,uv).x;\\n#endif\\nfloat esm=1.0-clamp(exp(min(87.,depthScale*shadowPixelDepth))*shadowMapSample,0.,1.-darkness);\\nreturn computeFallOff(esm,clipSpace.xy,frustumEdgeFalloff);\\n}\\nfloat computeShadowWithCloseESM(vec4 vPositionFromLight,float depthMetric,sampler2D shadowSampler,float darkness,float depthScale,float frustumEdgeFalloff)\\n{\\nvec3 clipSpace=vPositionFromLight.xyz/vPositionFromLight.w;\\nvec2 uv=0.5*clipSpace.xy+vec2(0.5);\\nif (uv.x<0. || uv.x>1.0 || uv.y<0. || uv.y>1.0)\\n{\\nreturn 1.0;\\n}\\nfloat shadowPixelDepth=clamp(depthMetric,0.,1.0); \\n#ifndef SHADOWFLOAT\\nfloat shadowMapSample=unpack(texture2D(shadowSampler,uv));\\n#else\\nfloat shadowMapSample=texture2D(shadowSampler,uv).x;\\n#endif\\nfloat esm=clamp(exp(min(87.,-depthScale*(shadowPixelDepth-shadowMapSample))),darkness,1.);\\nreturn computeFallOff(esm,clipSpace.xy,frustumEdgeFalloff);\\n}\\n#ifdef WEBGL2\\n\\nfloat computeShadowWithPCF1(vec4 vPositionFromLight,float depthMetric,sampler2DShadow shadowSampler,float darkness,float frustumEdgeFalloff)\\n{\\nif (depthMetric>1.0 || depthMetric<0.0) {\\nreturn 1.0;\\n}\\nvec3 clipSpace=vPositionFromLight.xyz/vPositionFromLight.w;\\nvec3 uvDepth=vec3(0.5*clipSpace.xyz+vec3(0.5));\\nfloat shadow=texture2D(shadowSampler,uvDepth);\\nshadow=mix(darkness,1.,shadow);\\nreturn computeFallOff(shadow,clipSpace.xy,frustumEdgeFalloff);\\n}\\n\\n\\n\\nfloat computeShadowWithPCF3(vec4 vPositionFromLight,float depthMetric,sampler2DShadow shadowSampler,vec2 shadowMapSizeAndInverse,float darkness,float frustumEdgeFalloff)\\n{\\nif (depthMetric>1.0 || depthMetric<0.0) {\\nreturn 1.0;\\n}\\nvec3 clipSpace=vPositionFromLight.xyz/vPositionFromLight.w;\\nvec3 uvDepth=vec3(0.5*clipSpace.xyz+vec3(0.5));\\nvec2 uv=uvDepth.xy*shadowMapSizeAndInverse.x; \\nuv+=0.5; \\nvec2 st=fract(uv); \\nvec2 base_uv=floor(uv)-0.5; \\nbase_uv*=shadowMapSizeAndInverse.y; \\n\\n\\n\\n\\nvec2 uvw0=3.-2.*st;\\nvec2 uvw1=1.+2.*st;\\nvec2 u=vec2((2.-st.x)/uvw0.x-1.,st.x/uvw1.x+1.)*shadowMapSizeAndInverse.y;\\nvec2 v=vec2((2.-st.y)/uvw0.y-1.,st.y/uvw1.y+1.)*shadowMapSizeAndInverse.y;\\nfloat shadow=0.;\\nshadow+=uvw0.x*uvw0.y*texture2D(shadowSampler,vec3(base_uv.xy+vec2(u[0],v[0]),uvDepth.z));\\nshadow+=uvw1.x*uvw0.y*texture2D(shadowSampler,vec3(base_uv.xy+vec2(u[1],v[0]),uvDepth.z));\\nshadow+=uvw0.x*uvw1.y*texture2D(shadowSampler,vec3(base_uv.xy+vec2(u[0],v[1]),uvDepth.z));\\nshadow+=uvw1.x*uvw1.y*texture2D(shadowSampler,vec3(base_uv.xy+vec2(u[1],v[1]),uvDepth.z));\\nshadow=shadow/16.;\\nshadow=mix(darkness,1.,shadow);\\nreturn computeFallOff(shadow,clipSpace.xy,frustumEdgeFalloff);\\n}\\n\\n\\n\\nfloat computeShadowWithPCF5(vec4 vPositionFromLight,float depthMetric,sampler2DShadow shadowSampler,vec2 shadowMapSizeAndInverse,float darkness,float frustumEdgeFalloff)\\n{\\nif (depthMetric>1.0 || depthMetric<0.0) {\\nreturn 1.0;\\n}\\nvec3 clipSpace=vPositionFromLight.xyz/vPositionFromLight.w;\\nvec3 uvDepth=vec3(0.5*clipSpace.xyz+vec3(0.5));\\nvec2 uv=uvDepth.xy*shadowMapSizeAndInverse.x; \\nuv+=0.5; \\nvec2 st=fract(uv); \\nvec2 base_uv=floor(uv)-0.5; \\nbase_uv*=shadowMapSizeAndInverse.y; \\n\\n\\nvec2 uvw0=4.-3.*st;\\nvec2 uvw1=vec2(7.);\\nvec2 uvw2=1.+3.*st;\\nvec3 u=vec3((3.-2.*st.x)/uvw0.x-2.,(3.+st.x)/uvw1.x,st.x/uvw2.x+2.)*shadowMapSizeAndInverse.y;\\nvec3 v=vec3((3.-2.*st.y)/uvw0.y-2.,(3.+st.y)/uvw1.y,st.y/uvw2.y+2.)*shadowMapSizeAndInverse.y;\\nfloat shadow=0.;\\nshadow+=uvw0.x*uvw0.y*texture2D(shadowSampler,vec3(base_uv.xy+vec2(u[0],v[0]),uvDepth.z));\\nshadow+=uvw1.x*uvw0.y*texture2D(shadowSampler,vec3(base_uv.xy+vec2(u[1],v[0]),uvDepth.z));\\nshadow+=uvw2.x*uvw0.y*texture2D(shadowSampler,vec3(base_uv.xy+vec2(u[2],v[0]),uvDepth.z));\\nshadow+=uvw0.x*uvw1.y*texture2D(shadowSampler,vec3(base_uv.xy+vec2(u[0],v[1]),uvDepth.z));\\nshadow+=uvw1.x*uvw1.y*texture2D(shadowSampler,vec3(base_uv.xy+vec2(u[1],v[1]),uvDepth.z));\\nshadow+=uvw2.x*uvw1.y*texture2D(shadowSampler,vec3(base_uv.xy+vec2(u[2],v[1]),uvDepth.z));\\nshadow+=uvw0.x*uvw2.y*texture2D(shadowSampler,vec3(base_uv.xy+vec2(u[0],v[2]),uvDepth.z));\\nshadow+=uvw1.x*uvw2.y*texture2D(shadowSampler,vec3(base_uv.xy+vec2(u[1],v[2]),uvDepth.z));\\nshadow+=uvw2.x*uvw2.y*texture2D(shadowSampler,vec3(base_uv.xy+vec2(u[2],v[2]),uvDepth.z));\\nshadow=shadow/144.;\\nshadow=mix(darkness,1.,shadow);\\nreturn computeFallOff(shadow,clipSpace.xy,frustumEdgeFalloff);\\n}\\nconst vec3 PoissonSamplers32[64]=vec3[64](\\nvec3(0.06407013,0.05409927,0.),\\nvec3(0.7366577,0.5789394,0.),\\nvec3(-0.6270542,-0.5320278,0.),\\nvec3(-0.4096107,0.8411095,0.),\\nvec3(0.6849564,-0.4990818,0.),\\nvec3(-0.874181,-0.04579735,0.),\\nvec3(0.9989998,0.0009880066,0.),\\nvec3(-0.004920578,-0.9151649,0.),\\nvec3(0.1805763,0.9747483,0.),\\nvec3(-0.2138451,0.2635818,0.),\\nvec3(0.109845,0.3884785,0.),\\nvec3(0.06876755,-0.3581074,0.),\\nvec3(0.374073,-0.7661266,0.),\\nvec3(0.3079132,-0.1216763,0.),\\nvec3(-0.3794335,-0.8271583,0.),\\nvec3(-0.203878,-0.07715034,0.),\\nvec3(0.5912697,0.1469799,0.),\\nvec3(-0.88069,0.3031784,0.),\\nvec3(0.5040108,0.8283722,0.),\\nvec3(-0.5844124,0.5494877,0.),\\nvec3(0.6017799,-0.1726654,0.),\\nvec3(-0.5554981,0.1559997,0.),\\nvec3(-0.3016369,-0.3900928,0.),\\nvec3(-0.5550632,-0.1723762,0.),\\nvec3(0.925029,0.2995041,0.),\\nvec3(-0.2473137,0.5538505,0.),\\nvec3(0.9183037,-0.2862392,0.),\\nvec3(0.2469421,0.6718712,0.),\\nvec3(0.3916397,-0.4328209,0.),\\nvec3(-0.03576927,-0.6220032,0.),\\nvec3(-0.04661255,0.7995201,0.),\\nvec3(0.4402924,0.3640312,0.),\\nvec3(0.,0.,0.),\\nvec3(0.,0.,0.),\\nvec3(0.,0.,0.),\\nvec3(0.,0.,0.),\\nvec3(0.,0.,0.),\\nvec3(0.,0.,0.),\\nvec3(0.,0.,0.),\\nvec3(0.,0.,0.),\\nvec3(0.,0.,0.),\\nvec3(0.,0.,0.),\\nvec3(0.,0.,0.),\\nvec3(0.,0.,0.),\\nvec3(0.,0.,0.),\\nvec3(0.,0.,0.),\\nvec3(0.,0.,0.),\\nvec3(0.,0.,0.),\\nvec3(0.,0.,0.),\\nvec3(0.,0.,0.),\\nvec3(0.,0.,0.),\\nvec3(0.,0.,0.),\\nvec3(0.,0.,0.),\\nvec3(0.,0.,0.),\\nvec3(0.,0.,0.),\\nvec3(0.,0.,0.),\\nvec3(0.,0.,0.),\\nvec3(0.,0.,0.),\\nvec3(0.,0.,0.),\\nvec3(0.,0.,0.),\\nvec3(0.,0.,0.),\\nvec3(0.,0.,0.),\\nvec3(0.,0.,0.),\\nvec3(0.,0.,0.)\\n);\\nconst vec3 PoissonSamplers64[64]=vec3[64](\\nvec3(-0.613392,0.617481,0.),\\nvec3(0.170019,-0.040254,0.),\\nvec3(-0.299417,0.791925,0.),\\nvec3(0.645680,0.493210,0.),\\nvec3(-0.651784,0.717887,0.),\\nvec3(0.421003,0.027070,0.),\\nvec3(-0.817194,-0.271096,0.),\\nvec3(-0.705374,-0.668203,0.),\\nvec3(0.977050,-0.108615,0.),\\nvec3(0.063326,0.142369,0.),\\nvec3(0.203528,0.214331,0.),\\nvec3(-0.667531,0.326090,0.),\\nvec3(-0.098422,-0.295755,0.),\\nvec3(-0.885922,0.215369,0.),\\nvec3(0.566637,0.605213,0.),\\nvec3(0.039766,-0.396100,0.),\\nvec3(0.751946,0.453352,0.),\\nvec3(0.078707,-0.715323,0.),\\nvec3(-0.075838,-0.529344,0.),\\nvec3(0.724479,-0.580798,0.),\\nvec3(0.222999,-0.215125,0.),\\nvec3(-0.467574,-0.405438,0.),\\nvec3(-0.248268,-0.814753,0.),\\nvec3(0.354411,-0.887570,0.),\\nvec3(0.175817,0.382366,0.),\\nvec3(0.487472,-0.063082,0.),\\nvec3(-0.084078,0.898312,0.),\\nvec3(0.488876,-0.783441,0.),\\nvec3(0.470016,0.217933,0.),\\nvec3(-0.696890,-0.549791,0.),\\nvec3(-0.149693,0.605762,0.),\\nvec3(0.034211,0.979980,0.),\\nvec3(0.503098,-0.308878,0.),\\nvec3(-0.016205,-0.872921,0.),\\nvec3(0.385784,-0.393902,0.),\\nvec3(-0.146886,-0.859249,0.),\\nvec3(0.643361,0.164098,0.),\\nvec3(0.634388,-0.049471,0.),\\nvec3(-0.688894,0.007843,0.),\\nvec3(0.464034,-0.188818,0.),\\nvec3(-0.440840,0.137486,0.),\\nvec3(0.364483,0.511704,0.),\\nvec3(0.034028,0.325968,0.),\\nvec3(0.099094,-0.308023,0.),\\nvec3(0.693960,-0.366253,0.),\\nvec3(0.678884,-0.204688,0.),\\nvec3(0.001801,0.780328,0.),\\nvec3(0.145177,-0.898984,0.),\\nvec3(0.062655,-0.611866,0.),\\nvec3(0.315226,-0.604297,0.),\\nvec3(-0.780145,0.486251,0.),\\nvec3(-0.371868,0.882138,0.),\\nvec3(0.200476,0.494430,0.),\\nvec3(-0.494552,-0.711051,0.),\\nvec3(0.612476,0.705252,0.),\\nvec3(-0.578845,-0.768792,0.),\\nvec3(-0.772454,-0.090976,0.),\\nvec3(0.504440,0.372295,0.),\\nvec3(0.155736,0.065157,0.),\\nvec3(0.391522,0.849605,0.),\\nvec3(-0.620106,-0.328104,0.),\\nvec3(0.789239,-0.419965,0.),\\nvec3(-0.545396,0.538133,0.),\\nvec3(-0.178564,-0.596057,0.)\\n);\\n\\n\\n\\n\\n\\nfloat computeShadowWithPCSS(vec4 vPositionFromLight,float depthMetric,sampler2D depthSampler,sampler2DShadow shadowSampler,float shadowMapSizeInverse,float lightSizeUV,float darkness,float frustumEdgeFalloff,int searchTapCount,int pcfTapCount,vec3[64] poissonSamplers)\\n{\\nif (depthMetric>1.0 || depthMetric<0.0) {\\nreturn 1.0;\\n}\\nvec3 clipSpace=vPositionFromLight.xyz/vPositionFromLight.w;\\nvec3 uvDepth=vec3(0.5*clipSpace.xyz+vec3(0.5));\\nfloat blockerDepth=0.0;\\nfloat sumBlockerDepth=0.0;\\nfloat numBlocker=0.0;\\nfor (int i=0; i<searchTapCount; i ++) {\\nblockerDepth=texture(depthSampler,uvDepth.xy+(lightSizeUV*shadowMapSizeInverse*PoissonSamplers32[i].xy)).r;\\nif (blockerDepth<depthMetric) {\\nsumBlockerDepth+=blockerDepth;\\nnumBlocker++;\\n}\\n}\\nif (numBlocker<1.0) {\\nreturn 1.0;\\n}\\nfloat avgBlockerDepth=sumBlockerDepth/numBlocker;\\n\\nfloat AAOffset=shadowMapSizeInverse*10.;\\n\\n\\nfloat penumbraRatio=((depthMetric-avgBlockerDepth)+AAOffset);\\nfloat filterRadius=penumbraRatio*lightSizeUV*shadowMapSizeInverse;\\nfloat random=getRand(vPositionFromLight.xy);\\nfloat rotationAngle=random*3.1415926;\\nvec2 rotationVector=vec2(cos(rotationAngle),sin(rotationAngle));\\nfloat shadow=0.;\\nfor (int i=0; i<pcfTapCount; i++) {\\nvec3 offset=poissonSamplers[i];\\n\\noffset=vec3(offset.x*rotationVector.x-offset.y*rotationVector.y,offset.y*rotationVector.x+offset.x*rotationVector.y,0.);\\nshadow+=texture2D(shadowSampler,uvDepth+offset*filterRadius);\\n}\\nshadow/=float(pcfTapCount);\\n\\nshadow=mix(shadow,1.,depthMetric-avgBlockerDepth);\\n\\nshadow=mix(darkness,1.,shadow);\\n\\nreturn computeFallOff(shadow,clipSpace.xy,frustumEdgeFalloff);\\n}\\nfloat computeShadowWithPCSS16(vec4 vPositionFromLight,float depthMetric,sampler2D depthSampler,sampler2DShadow shadowSampler,float shadowMapSizeInverse,float lightSizeUV,float darkness,float frustumEdgeFalloff)\\n{\\nreturn computeShadowWithPCSS(vPositionFromLight,depthMetric,depthSampler,shadowSampler,shadowMapSizeInverse,lightSizeUV,darkness,frustumEdgeFalloff,16,16,PoissonSamplers32);\\n}\\nfloat computeShadowWithPCSS32(vec4 vPositionFromLight,float depthMetric,sampler2D depthSampler,sampler2DShadow shadowSampler,float shadowMapSizeInverse,float lightSizeUV,float darkness,float frustumEdgeFalloff)\\n{\\nreturn computeShadowWithPCSS(vPositionFromLight,depthMetric,depthSampler,shadowSampler,shadowMapSizeInverse,lightSizeUV,darkness,frustumEdgeFalloff,16,32,PoissonSamplers32);\\n}\\nfloat computeShadowWithPCSS64(vec4 vPositionFromLight,float depthMetric,sampler2D depthSampler,sampler2DShadow shadowSampler,float shadowMapSizeInverse,float lightSizeUV,float darkness,float frustumEdgeFalloff)\\n{\\nreturn computeShadowWithPCSS(vPositionFromLight,depthMetric,depthSampler,shadowSampler,shadowMapSizeInverse,lightSizeUV,darkness,frustumEdgeFalloff,32,64,PoissonSamplers64);\\n}\\n#endif\\n#endif\\n\",fresnelFunction:\"#ifdef FRESNEL\\nfloat computeFresnelTerm(vec3 viewDirection,vec3 worldNormal,float bias,float power)\\n{\\nfloat fresnelTerm=pow(bias+abs(dot(viewDirection,worldNormal)),power);\\nreturn clamp(fresnelTerm,0.,1.);\\n}\\n#endif\",reflectionFunction:\"#ifdef USE_LOCAL_REFLECTIONMAP_CUBIC\\nvec3 parallaxCorrectNormal( vec3 vertexPos,vec3 origVec,vec3 cubeSize,vec3 cubePos ) {\\n\\nvec3 invOrigVec=vec3(1.0,1.0,1.0)/origVec;\\nvec3 halfSize=cubeSize*0.5;\\nvec3 intersecAtMaxPlane=(cubePos+halfSize-vertexPos)*invOrigVec;\\nvec3 intersecAtMinPlane=(cubePos-halfSize-vertexPos)*invOrigVec;\\n\\nvec3 largestIntersec=max(intersecAtMaxPlane,intersecAtMinPlane);\\n\\nfloat distance=min(min(largestIntersec.x,largestIntersec.y),largestIntersec.z);\\n\\nvec3 intersectPositionWS=vertexPos+origVec*distance;\\n\\nreturn intersectPositionWS-cubePos;\\n}\\n#endif\\nvec3 computeReflectionCoords(vec4 worldPos,vec3 worldNormal)\\n{\\n#if defined(REFLECTIONMAP_EQUIRECTANGULAR_FIXED) || defined(REFLECTIONMAP_MIRROREDEQUIRECTANGULAR_FIXED)\\nvec3 direction=normalize(vDirectionW);\\nfloat lon=atan(direction.z,direction.x);\\nfloat lat=acos(direction.y);\\nvec2 sphereCoords=vec2(lon,lat)*RECIPROCAL_PI2*2.0;\\nfloat s=sphereCoords.x*0.5+0.5;\\nfloat t=sphereCoords.y; \\n#ifdef REFLECTIONMAP_MIRROREDEQUIRECTANGULAR_FIXED\\nreturn vec3(1.0-s,t,0);\\n#else\\nreturn vec3(s,t,0);\\n#endif\\n#endif\\n#ifdef REFLECTIONMAP_EQUIRECTANGULAR\\nvec3 cameraToVertex=normalize(worldPos.xyz-vEyePosition.xyz);\\nvec3 r=normalize(reflect(cameraToVertex,worldNormal));\\nfloat lon=atan(r.z,r.x);\\nfloat lat=acos(r.y);\\nvec2 sphereCoords=vec2(lon,lat)*RECIPROCAL_PI2*2.0;\\nfloat s=sphereCoords.x*0.5+0.5;\\nfloat t=sphereCoords.y; \\nreturn vec3(s,t,0);\\n#endif\\n#ifdef REFLECTIONMAP_SPHERICAL\\nvec3 viewDir=normalize(vec3(view*worldPos));\\nvec3 viewNormal=normalize(vec3(view*vec4(worldNormal,0.0)));\\nvec3 r=reflect(viewDir,viewNormal);\\nr.z=r.z-1.0;\\nfloat m=2.0*length(r);\\nreturn vec3(r.x/m+0.5,1.0-r.y/m-0.5,0);\\n#endif\\n#ifdef REFLECTIONMAP_PLANAR\\nvec3 viewDir=worldPos.xyz-vEyePosition.xyz;\\nvec3 coords=normalize(reflect(viewDir,worldNormal));\\nreturn vec3(reflectionMatrix*vec4(coords,1));\\n#endif\\n#ifdef REFLECTIONMAP_CUBIC\\nvec3 viewDir=normalize(worldPos.xyz-vEyePosition.xyz);\\n\\nvec3 coords=reflect(viewDir,worldNormal);\\n#ifdef USE_LOCAL_REFLECTIONMAP_CUBIC\\ncoords=parallaxCorrectNormal(worldPos.xyz,coords,vReflectionSize,vReflectionPosition);\\n#endif\\ncoords=vec3(reflectionMatrix*vec4(coords,0));\\n#ifdef INVERTCUBICMAP\\ncoords.y*=-1.0;\\n#endif\\nreturn coords;\\n#endif\\n#ifdef REFLECTIONMAP_PROJECTION\\nreturn vec3(reflectionMatrix*(view*worldPos));\\n#endif\\n#ifdef REFLECTIONMAP_SKYBOX\\nreturn vPositionUVW;\\n#endif\\n#ifdef REFLECTIONMAP_EXPLICIT\\nreturn vec3(0,0,0);\\n#endif\\n}\",imageProcessingDeclaration:\"#ifdef EXPOSURE\\nuniform float exposureLinear;\\n#endif\\n#ifdef CONTRAST\\nuniform float contrast;\\n#endif\\n#ifdef VIGNETTE\\nuniform vec2 vInverseScreenSize;\\nuniform vec4 vignetteSettings1;\\nuniform vec4 vignetteSettings2;\\n#endif\\n#ifdef COLORCURVES\\nuniform vec4 vCameraColorCurveNegative;\\nuniform vec4 vCameraColorCurveNeutral;\\nuniform vec4 vCameraColorCurvePositive;\\n#endif\\n#ifdef COLORGRADING\\n#ifdef COLORGRADING3D\\nuniform highp sampler3D txColorTransform;\\n#else\\nuniform sampler2D txColorTransform;\\n#endif\\nuniform vec4 colorTransformSettings;\\n#endif\",imageProcessingFunctions:\"#if defined(COLORGRADING) && !defined(COLORGRADING3D)\\n\\nvec3 sampleTexture3D(sampler2D colorTransform,vec3 color,vec2 sampler3dSetting)\\n{\\nfloat sliceSize=2.0*sampler3dSetting.x; \\n#ifdef SAMPLER3DGREENDEPTH\\nfloat sliceContinuous=(color.g-sampler3dSetting.x)*sampler3dSetting.y;\\n#else\\nfloat sliceContinuous=(color.b-sampler3dSetting.x)*sampler3dSetting.y;\\n#endif\\nfloat sliceInteger=floor(sliceContinuous);\\n\\n\\nfloat sliceFraction=sliceContinuous-sliceInteger;\\n#ifdef SAMPLER3DGREENDEPTH\\nvec2 sliceUV=color.rb;\\n#else\\nvec2 sliceUV=color.rg;\\n#endif\\nsliceUV.x*=sliceSize;\\nsliceUV.x+=sliceInteger*sliceSize;\\nsliceUV=clamp(sliceUV,0.,1.);\\nvec4 slice0Color=texture2D(colorTransform,sliceUV);\\nsliceUV.x+=sliceSize;\\nsliceUV=clamp(sliceUV,0.,1.);\\nvec4 slice1Color=texture2D(colorTransform,sliceUV);\\nvec3 result=mix(slice0Color.rgb,slice1Color.rgb,sliceFraction);\\n#ifdef SAMPLER3DBGRMAP\\ncolor.rgb=result.rgb;\\n#else\\ncolor.rgb=result.bgr;\\n#endif\\nreturn color;\\n}\\n#endif\\n#ifdef TONEMAPPING_ACES\\n\\n\\n\\n\\n\\nconst mat3 ACESInputMat=mat3(\\nvec3(0.59719,0.07600,0.02840),\\nvec3(0.35458,0.90834,0.13383),\\nvec3(0.04823,0.01566,0.83777)\\n);\\n\\nconst mat3 ACESOutputMat=mat3(\\nvec3( 1.60475,-0.10208,-0.00327),\\nvec3(-0.53108,1.10813,-0.07276),\\nvec3(-0.07367,-0.00605,1.07602)\\n);\\nvec3 RRTAndODTFit(vec3 v)\\n{\\nvec3 a=v*(v+0.0245786)-0.000090537;\\nvec3 b=v*(0.983729*v+0.4329510)+0.238081;\\nreturn a/b;\\n}\\nvec3 ACESFitted(vec3 color)\\n{\\ncolor=ACESInputMat*color;\\n\\ncolor=RRTAndODTFit(color);\\ncolor=ACESOutputMat*color;\\n\\ncolor=clamp(color,0.0,1.0);\\nreturn color;\\n}\\n#endif\\nvec4 applyImageProcessing(vec4 result) {\\n#ifdef EXPOSURE\\nresult.rgb*=exposureLinear;\\n#endif\\n#ifdef VIGNETTE\\n\\nvec2 viewportXY=gl_FragCoord.xy*vInverseScreenSize;\\nviewportXY=viewportXY*2.0-1.0;\\nvec3 vignetteXY1=vec3(viewportXY*vignetteSettings1.xy+vignetteSettings1.zw,1.0);\\nfloat vignetteTerm=dot(vignetteXY1,vignetteXY1);\\nfloat vignette=pow(vignetteTerm,vignetteSettings2.w);\\n\\nvec3 vignetteColor=vignetteSettings2.rgb;\\n#ifdef VIGNETTEBLENDMODEMULTIPLY\\nvec3 vignetteColorMultiplier=mix(vignetteColor,vec3(1,1,1),vignette);\\nresult.rgb*=vignetteColorMultiplier;\\n#endif\\n#ifdef VIGNETTEBLENDMODEOPAQUE\\nresult.rgb=mix(vignetteColor,result.rgb,vignette);\\n#endif\\n#endif\\n#ifdef TONEMAPPING\\n#ifdef TONEMAPPING_ACES\\nresult.rgb=ACESFitted(result.rgb);\\n#else\\nconst float tonemappingCalibration=1.590579;\\nresult.rgb=1.0-exp2(-tonemappingCalibration*result.rgb);\\n#endif\\n#endif\\n\\nresult.rgb=toGammaSpace(result.rgb);\\nresult.rgb=clamp(result.rgb,0.0,1.0);\\n#ifdef CONTRAST\\n\\nvec3 resultHighContrast=applyEaseInOut(result.rgb);\\nif (contrast<1.0) {\\n\\nresult.rgb=mix(vec3(0.5,0.5,0.5),result.rgb,contrast);\\n} else {\\n\\nresult.rgb=mix(result.rgb,resultHighContrast,contrast-1.0);\\n}\\n#endif\\n\\n#ifdef COLORGRADING\\nvec3 colorTransformInput=result.rgb*colorTransformSettings.xxx+colorTransformSettings.yyy;\\n#ifdef COLORGRADING3D\\nvec3 colorTransformOutput=texture(txColorTransform,colorTransformInput).rgb;\\n#else\\nvec3 colorTransformOutput=sampleTexture3D(txColorTransform,colorTransformInput,colorTransformSettings.yz).rgb;\\n#endif\\nresult.rgb=mix(result.rgb,colorTransformOutput,colorTransformSettings.www);\\n#endif\\n#ifdef COLORCURVES\\n\\nfloat luma=getLuminance(result.rgb);\\nvec2 curveMix=clamp(vec2(luma*3.0-1.5,luma*-3.0+1.5),vec2(0.0),vec2(1.0));\\nvec4 colorCurve=vCameraColorCurveNeutral+curveMix.x*vCameraColorCurvePositive-curveMix.y*vCameraColorCurveNegative;\\nresult.rgb*=colorCurve.rgb;\\nresult.rgb=mix(vec3(luma),result.rgb,colorCurve.a);\\n#endif\\nreturn result;\\n}\",bumpFragmentFunctions:\"#ifdef BUMP\\n#if BUMPDIRECTUV == 1\\n#define vBumpUV vMainUV1\\n#elif BUMPDIRECTUV == 2\\n#define vBumpUV vMainUV2\\n#else\\nvarying vec2 vBumpUV;\\n#endif\\nuniform sampler2D bumpSampler;\\n#if defined(TANGENT) && defined(NORMAL) \\nvarying mat3 vTBN;\\n#endif\\n#ifdef OBJECTSPACE_NORMALMAP\\nuniform mat4 normalMatrix;\\n#endif\\n\\nmat3 cotangent_frame(vec3 normal,vec3 p,vec2 uv)\\n{\\n\\nuv=gl_FrontFacing ? uv : -uv;\\n\\nvec3 dp1=dFdx(p);\\nvec3 dp2=dFdy(p);\\nvec2 duv1=dFdx(uv);\\nvec2 duv2=dFdy(uv);\\n\\nvec3 dp2perp=cross(dp2,normal);\\nvec3 dp1perp=cross(normal,dp1);\\nvec3 tangent=dp2perp*duv1.x+dp1perp*duv2.x;\\nvec3 bitangent=dp2perp*duv1.y+dp1perp*duv2.y;\\n\\ntangent*=vTangentSpaceParams.x;\\nbitangent*=vTangentSpaceParams.y;\\n\\nfloat invmax=inversesqrt(max(dot(tangent,tangent),dot(bitangent,bitangent)));\\nreturn mat3(tangent*invmax,bitangent*invmax,normal);\\n}\\nvec3 perturbNormal(mat3 cotangentFrame,vec2 uv)\\n{\\nvec3 map=texture2D(bumpSampler,uv).xyz;\\nmap=map*2.0-1.0;\\n#ifdef NORMALXYSCALE\\nmap=normalize(map*vec3(vBumpInfos.y,vBumpInfos.y,1.0));\\n#endif\\nreturn normalize(cotangentFrame*map);\\n}\\n#ifdef PARALLAX\\nconst float minSamples=4.;\\nconst float maxSamples=15.;\\nconst int iMaxSamples=15;\\n\\nvec2 parallaxOcclusion(vec3 vViewDirCoT,vec3 vNormalCoT,vec2 texCoord,float parallaxScale) {\\nfloat parallaxLimit=length(vViewDirCoT.xy)/vViewDirCoT.z;\\nparallaxLimit*=parallaxScale;\\nvec2 vOffsetDir=normalize(vViewDirCoT.xy);\\nvec2 vMaxOffset=vOffsetDir*parallaxLimit;\\nfloat numSamples=maxSamples+(dot(vViewDirCoT,vNormalCoT)*(minSamples-maxSamples));\\nfloat stepSize=1.0/numSamples;\\n\\nfloat currRayHeight=1.0;\\nvec2 vCurrOffset=vec2(0,0);\\nvec2 vLastOffset=vec2(0,0);\\nfloat lastSampledHeight=1.0;\\nfloat currSampledHeight=1.0;\\nfor (int i=0; i<iMaxSamples; i++)\\n{\\ncurrSampledHeight=texture2D(bumpSampler,vBumpUV+vCurrOffset).w;\\n\\nif (currSampledHeight>currRayHeight)\\n{\\nfloat delta1=currSampledHeight-currRayHeight;\\nfloat delta2=(currRayHeight+stepSize)-lastSampledHeight;\\nfloat ratio=delta1/(delta1+delta2);\\nvCurrOffset=(ratio)* vLastOffset+(1.0-ratio)*vCurrOffset;\\n\\nbreak;\\n}\\nelse\\n{\\ncurrRayHeight-=stepSize;\\nvLastOffset=vCurrOffset;\\nvCurrOffset+=stepSize*vMaxOffset;\\nlastSampledHeight=currSampledHeight;\\n}\\n}\\nreturn vCurrOffset;\\n}\\nvec2 parallaxOffset(vec3 viewDir,float heightScale)\\n{\\n\\nfloat height=texture2D(bumpSampler,vBumpUV).w;\\nvec2 texCoordOffset=heightScale*viewDir.xy*height;\\nreturn -texCoordOffset;\\n}\\n#endif\\n#endif\",clipPlaneFragmentDeclaration:\"#ifdef CLIPPLANE\\nvarying float fClipDistance;\\n#endif\\n#ifdef CLIPPLANE2\\nvarying float fClipDistance2;\\n#endif\\n#ifdef CLIPPLANE3\\nvarying float fClipDistance3;\\n#endif\\n#ifdef CLIPPLANE4\\nvarying float fClipDistance4;\\n#endif\",fogFragmentDeclaration:\"#ifdef FOG\\n#define FOGMODE_NONE 0.\\n#define FOGMODE_EXP 1.\\n#define FOGMODE_EXP2 2.\\n#define FOGMODE_LINEAR 3.\\n#define E 2.71828\\nuniform vec4 vFogInfos;\\nuniform vec3 vFogColor;\\nvarying vec3 vFogDistance;\\nfloat CalcFogFactor()\\n{\\nfloat fogCoeff=1.0;\\nfloat fogStart=vFogInfos.y;\\nfloat fogEnd=vFogInfos.z;\\nfloat fogDensity=vFogInfos.w;\\nfloat fogDistance=length(vFogDistance);\\nif (FOGMODE_LINEAR == vFogInfos.x)\\n{\\nfogCoeff=(fogEnd-fogDistance)/(fogEnd-fogStart);\\n}\\nelse if (FOGMODE_EXP == vFogInfos.x)\\n{\\nfogCoeff=1.0/pow(E,fogDistance*fogDensity);\\n}\\nelse if (FOGMODE_EXP2 == vFogInfos.x)\\n{\\nfogCoeff=1.0/pow(E,fogDistance*fogDistance*fogDensity*fogDensity);\\n}\\nreturn clamp(fogCoeff,0.0,1.0);\\n}\\n#endif\",clipPlaneFragment:\"#ifdef CLIPPLANE\\nif (fClipDistance>0.0)\\n{\\ndiscard;\\n}\\n#endif\\n#ifdef CLIPPLANE2\\nif (fClipDistance2>0.0)\\n{\\ndiscard;\\n}\\n#endif\\n#ifdef CLIPPLANE3\\nif (fClipDistance3>0.0)\\n{\\ndiscard;\\n}\\n#endif\\n#ifdef CLIPPLANE4\\nif (fClipDistance4>0.0)\\n{\\ndiscard;\\n}\\n#endif\",bumpFragment:\"vec2 uvOffset=vec2(0.0,0.0);\\n#if defined(BUMP) || defined(PARALLAX)\\n#ifdef NORMALXYSCALE\\nfloat normalScale=1.0;\\n#else \\nfloat normalScale=vBumpInfos.y;\\n#endif\\n#if defined(TANGENT) && defined(NORMAL)\\nmat3 TBN=vTBN;\\n#else\\nmat3 TBN=cotangent_frame(normalW*normalScale,vPositionW,vBumpUV);\\n#endif\\n#endif\\n#ifdef PARALLAX\\nmat3 invTBN=transposeMat3(TBN);\\n#ifdef PARALLAXOCCLUSION\\nuvOffset=parallaxOcclusion(invTBN*-viewDirectionW,invTBN*normalW,vBumpUV,vBumpInfos.z);\\n#else\\nuvOffset=parallaxOffset(invTBN*viewDirectionW,vBumpInfos.z);\\n#endif\\n#endif\\n#ifdef BUMP\\n#ifdef OBJECTSPACE_NORMALMAP\\nnormalW=normalize(texture2D(bumpSampler,vBumpUV).xyz*2.0-1.0);\\nnormalW=normalize(mat3(normalMatrix)*normalW); \\n#else\\nnormalW=perturbNormal(TBN,vBumpUV+uvOffset);\\n#endif\\n#endif\",lightFragment:\"#ifdef LIGHT{X}\\n#if defined(SHADOWONLY) || (defined(LIGHTMAP) && defined(LIGHTMAPEXCLUDED{X}) && defined(LIGHTMAPNOSPECULAR{X}))\\n\\n#else\\n#ifdef PBR\\n#ifdef SPOTLIGHT{X}\\nspotInfo=computeSpotLightingInfo(light{X}.vLightData);\\n#ifdef LIGHT_FALLOFF_GLTF{X}\\nspotInfo.attenuation=computeDistanceLightFalloff_GLTF(spotInfo.lightDistanceSquared,light{X}.vLightFalloff.y);\\nspotInfo.attenuation*=computeDirectionalLightFalloff_GLTF(light{X}.vLightDirection.xyz,spotInfo.directionToLightCenterW,light{X}.vLightFalloff.z,light{X}.vLightFalloff.w);\\n#elif defined(LIGHT_FALLOFF_PHYSICAL{X})\\nspotInfo.attenuation=computeDistanceLightFalloff_Physical(spotInfo.lightDistanceSquared);\\nspotInfo.attenuation*=computeDirectionalLightFalloff_Physical(light{X}.vLightDirection.xyz,spotInfo.directionToLightCenterW,light{X}.vLightDirection.w);\\n#elif defined(LIGHT_FALLOFF_STANDARD{X})\\nspotInfo.attenuation=computeDistanceLightFalloff_Standard(spotInfo.lightOffset,light{X}.vLightFalloff.x);\\nspotInfo.attenuation*=computeDirectionalLightFalloff_Standard(light{X}.vLightDirection.xyz,spotInfo.directionToLightCenterW,light{X}.vLightDirection.w,light{X}.vLightData.w);\\n#else\\nspotInfo.attenuation=computeDistanceLightFalloff(spotInfo.lightOffset,spotInfo.lightDistanceSquared,light{X}.vLightFalloff.x,light{X}.vLightFalloff.y);\\nspotInfo.attenuation*=computeDirectionalLightFalloff(light{X}.vLightDirection.xyz,spotInfo.directionToLightCenterW,light{X}.vLightDirection.w,light{X}.vLightData.w,light{X}.vLightFalloff.z,light{X}.vLightFalloff.w);\\n#endif\\ninfo=computeSpotLighting(spotInfo,viewDirectionW,normalW,light{X}.vLightDirection,light{X}.vLightDiffuse.rgb,light{X}.vLightDiffuse.a,roughness,NdotV,specularEnvironmentR0,specularEnvironmentR90,geometricRoughnessFactor,NdotL);\\n#elif defined(POINTLIGHT{X})\\npointInfo=computePointLightingInfo(light{X}.vLightData);\\n#ifdef LIGHT_FALLOFF_GLTF{X}\\npointInfo.attenuation=computeDistanceLightFalloff_GLTF(pointInfo.lightDistanceSquared,light{X}.vLightFalloff.y);\\n#elif defined(LIGHT_FALLOFF_PHYSICAL{X})\\npointInfo.attenuation=computeDistanceLightFalloff_Physical(pointInfo.lightDistanceSquared);\\n#elif defined(LIGHT_FALLOFF_STANDARD{X})\\npointInfo.attenuation=computeDistanceLightFalloff_Standard(pointInfo.lightOffset,light{X}.vLightFalloff.x);\\n#else\\npointInfo.attenuation=computeDistanceLightFalloff(pointInfo.lightOffset,pointInfo.lightDistanceSquared,light{X}.vLightFalloff.x,light{X}.vLightFalloff.y);\\n#endif\\ninfo=computePointLighting(pointInfo,viewDirectionW,normalW,light{X}.vLightDiffuse.rgb,light{X}.vLightDiffuse.a,roughness,NdotV,specularEnvironmentR0,specularEnvironmentR90,geometricRoughnessFactor,NdotL);\\n#elif defined(HEMILIGHT{X})\\ninfo=computeHemisphericLighting(viewDirectionW,normalW,light{X}.vLightData,light{X}.vLightDiffuse.rgb,light{X}.vLightSpecular,light{X}.vLightGround,roughness,NdotV,specularEnvironmentR0,specularEnvironmentR90,geometricRoughnessFactor,NdotL);\\n#elif defined(DIRLIGHT{X})\\ninfo=computeDirectionalLighting(viewDirectionW,normalW,light{X}.vLightData,light{X}.vLightDiffuse.rgb,light{X}.vLightSpecular,light{X}.vLightDiffuse.a,roughness,NdotV,specularEnvironmentR0,specularEnvironmentR90,geometricRoughnessFactor,NdotL);\\n#endif\\n#else\\n#ifdef SPOTLIGHT{X}\\ninfo=computeSpotLighting(viewDirectionW,normalW,light{X}.vLightData,light{X}.vLightDirection,light{X}.vLightDiffuse.rgb,light{X}.vLightSpecular,light{X}.vLightDiffuse.a,glossiness);\\n#elif defined(HEMILIGHT{X})\\ninfo=computeHemisphericLighting(viewDirectionW,normalW,light{X}.vLightData,light{X}.vLightDiffuse.rgb,light{X}.vLightSpecular,light{X}.vLightGround,glossiness);\\n#elif defined(POINTLIGHT{X}) || defined(DIRLIGHT{X})\\ninfo=computeLighting(viewDirectionW,normalW,light{X}.vLightData,light{X}.vLightDiffuse.rgb,light{X}.vLightSpecular,light{X}.vLightDiffuse.a,glossiness);\\n#endif\\n#endif\\n#ifdef PROJECTEDLIGHTTEXTURE{X}\\ninfo.diffuse*=computeProjectionTextureDiffuseLighting(projectionLightSampler{X},textureProjectionMatrix{X});\\n#endif\\n#endif\\n#ifdef SHADOW{X}\\n#ifdef SHADOWCLOSEESM{X}\\n#if defined(SHADOWCUBE{X})\\nshadow=computeShadowWithCloseESMCube(light{X}.vLightData.xyz,shadowSampler{X},light{X}.shadowsInfo.x,light{X}.shadowsInfo.z,light{X}.depthValues);\\n#else\\nshadow=computeShadowWithCloseESM(vPositionFromLight{X},vDepthMetric{X},shadowSampler{X},light{X}.shadowsInfo.x,light{X}.shadowsInfo.z,light{X}.shadowsInfo.w);\\n#endif\\n#elif defined(SHADOWESM{X})\\n#if defined(SHADOWCUBE{X})\\nshadow=computeShadowWithESMCube(light{X}.vLightData.xyz,shadowSampler{X},light{X}.shadowsInfo.x,light{X}.shadowsInfo.z,light{X}.depthValues);\\n#else\\nshadow=computeShadowWithESM(vPositionFromLight{X},vDepthMetric{X},shadowSampler{X},light{X}.shadowsInfo.x,light{X}.shadowsInfo.z,light{X}.shadowsInfo.w);\\n#endif\\n#elif defined(SHADOWPOISSON{X})\\n#if defined(SHADOWCUBE{X})\\nshadow=computeShadowWithPoissonSamplingCube(light{X}.vLightData.xyz,shadowSampler{X},light{X}.shadowsInfo.y,light{X}.shadowsInfo.x,light{X}.depthValues);\\n#else\\nshadow=computeShadowWithPoissonSampling(vPositionFromLight{X},vDepthMetric{X},shadowSampler{X},light{X}.shadowsInfo.y,light{X}.shadowsInfo.x,light{X}.shadowsInfo.w);\\n#endif\\n#elif defined(SHADOWPCF{X})\\n#if defined(SHADOWLOWQUALITY{X})\\nshadow=computeShadowWithPCF1(vPositionFromLight{X},vDepthMetric{X},shadowSampler{X},light{X}.shadowsInfo.x,light{X}.shadowsInfo.w);\\n#elif defined(SHADOWMEDIUMQUALITY{X})\\nshadow=computeShadowWithPCF3(vPositionFromLight{X},vDepthMetric{X},shadowSampler{X},light{X}.shadowsInfo.yz,light{X}.shadowsInfo.x,light{X}.shadowsInfo.w);\\n#else\\nshadow=computeShadowWithPCF5(vPositionFromLight{X},vDepthMetric{X},shadowSampler{X},light{X}.shadowsInfo.yz,light{X}.shadowsInfo.x,light{X}.shadowsInfo.w);\\n#endif\\n#elif defined(SHADOWPCSS{X})\\n#if defined(SHADOWLOWQUALITY{X})\\nshadow=computeShadowWithPCSS16(vPositionFromLight{X},vDepthMetric{X},depthSampler{X},shadowSampler{X},light{X}.shadowsInfo.y,light{X}.shadowsInfo.z,light{X}.shadowsInfo.x,light{X}.shadowsInfo.w);\\n#elif defined(SHADOWMEDIUMQUALITY{X})\\nshadow=computeShadowWithPCSS32(vPositionFromLight{X},vDepthMetric{X},depthSampler{X},shadowSampler{X},light{X}.shadowsInfo.y,light{X}.shadowsInfo.z,light{X}.shadowsInfo.x,light{X}.shadowsInfo.w);\\n#else\\nshadow=computeShadowWithPCSS64(vPositionFromLight{X},vDepthMetric{X},depthSampler{X},shadowSampler{X},light{X}.shadowsInfo.y,light{X}.shadowsInfo.z,light{X}.shadowsInfo.x,light{X}.shadowsInfo.w);\\n#endif\\n#else\\n#if defined(SHADOWCUBE{X})\\nshadow=computeShadowCube(light{X}.vLightData.xyz,shadowSampler{X},light{X}.shadowsInfo.x,light{X}.depthValues);\\n#else\\nshadow=computeShadow(vPositionFromLight{X},vDepthMetric{X},shadowSampler{X},light{X}.shadowsInfo.x,light{X}.shadowsInfo.w);\\n#endif\\n#endif\\n#ifdef SHADOWONLY\\n#ifndef SHADOWINUSE\\n#define SHADOWINUSE\\n#endif\\nglobalShadow+=shadow;\\nshadowLightCount+=1.0;\\n#endif\\n#else\\nshadow=1.;\\n#endif\\n#ifndef SHADOWONLY\\n#ifdef CUSTOMUSERLIGHTING\\ndiffuseBase+=computeCustomDiffuseLighting(info,diffuseBase,shadow);\\n#ifdef SPECULARTERM\\nspecularBase+=computeCustomSpecularLighting(info,specularBase,shadow);\\n#endif\\n#elif defined(LIGHTMAP) && defined(LIGHTMAPEXCLUDED{X})\\ndiffuseBase+=lightmapColor*shadow;\\n#ifdef SPECULARTERM\\n#ifndef LIGHTMAPNOSPECULAR{X}\\nspecularBase+=info.specular*shadow*lightmapColor;\\n#endif\\n#endif\\n#else\\ndiffuseBase+=info.diffuse*shadow;\\n#ifdef SPECULARTERM\\nspecularBase+=info.specular*shadow;\\n#endif\\n#endif\\n#endif\\n#endif\",logDepthFragment:\"#ifdef LOGARITHMICDEPTH\\ngl_FragDepthEXT=log2(vFragmentDepth)*logarithmicDepthConstant*0.5;\\n#endif\",fogFragment:\"#ifdef FOG\\nfloat fog=CalcFogFactor();\\ncolor.rgb=fog*color.rgb+(1.0-fog)*vFogColor;\\n#endif\",pbrVertexDeclaration:\"uniform mat4 view;\\nuniform mat4 viewProjection;\\n#ifdef ALBEDO\\nuniform mat4 albedoMatrix;\\nuniform vec2 vAlbedoInfos;\\n#endif\\n#ifdef AMBIENT\\nuniform mat4 ambientMatrix;\\nuniform vec4 vAmbientInfos;\\n#endif\\n#ifdef OPACITY\\nuniform mat4 opacityMatrix;\\nuniform vec2 vOpacityInfos;\\n#endif\\n#ifdef EMISSIVE\\nuniform vec2 vEmissiveInfos;\\nuniform mat4 emissiveMatrix;\\n#endif\\n#ifdef LIGHTMAP\\nuniform vec2 vLightmapInfos;\\nuniform mat4 lightmapMatrix;\\n#endif\\n#ifdef REFLECTIVITY \\nuniform vec3 vReflectivityInfos;\\nuniform mat4 reflectivityMatrix;\\n#endif\\n#ifdef MICROSURFACEMAP\\nuniform vec2 vMicroSurfaceSamplerInfos;\\nuniform mat4 microSurfaceSamplerMatrix;\\n#endif\\n#ifdef BUMP\\nuniform vec3 vBumpInfos;\\nuniform mat4 bumpMatrix;\\n#endif\\n#ifdef POINTSIZE\\nuniform float pointSize;\\n#endif\\n\\n#ifdef REFRACTION\\nuniform vec4 vRefractionInfos;\\nuniform mat4 refractionMatrix;\\nuniform vec3 vRefractionMicrosurfaceInfos;\\n#endif\\n\\n#ifdef REFLECTION\\nuniform vec2 vReflectionInfos;\\nuniform mat4 reflectionMatrix;\\nuniform vec3 vReflectionMicrosurfaceInfos;\\n#endif\\n\",pbrFragmentDeclaration:\"uniform vec3 vReflectionColor;\\nuniform vec4 vAlbedoColor;\\n\\nuniform vec4 vLightingIntensity;\\nuniform vec4 vReflectivityColor;\\nuniform vec3 vEmissiveColor;\\n\\n#ifdef ALBEDO\\nuniform vec2 vAlbedoInfos;\\n#endif\\n#ifdef AMBIENT\\nuniform vec4 vAmbientInfos;\\n#endif\\n#ifdef BUMP\\nuniform vec3 vBumpInfos;\\nuniform vec2 vTangentSpaceParams;\\n#endif\\n#ifdef OPACITY \\nuniform vec2 vOpacityInfos;\\n#endif\\n#ifdef EMISSIVE\\nuniform vec2 vEmissiveInfos;\\n#endif\\n#ifdef LIGHTMAP\\nuniform vec2 vLightmapInfos;\\n#endif\\n#ifdef REFLECTIVITY\\nuniform vec3 vReflectivityInfos;\\n#endif\\n#ifdef MICROSURFACEMAP\\nuniform vec2 vMicroSurfaceSamplerInfos;\\n#endif\\n\\n#if defined(REFLECTIONMAP_SPHERICAL) || defined(REFLECTIONMAP_PROJECTION) || defined(REFRACTION)\\nuniform mat4 view;\\n#endif\\n\\n#ifdef REFRACTION\\nuniform vec4 vRefractionInfos;\\nuniform mat4 refractionMatrix;\\nuniform vec3 vRefractionMicrosurfaceInfos;\\n#endif\\n\\n#ifdef REFLECTION\\nuniform vec2 vReflectionInfos;\\nuniform mat4 reflectionMatrix;\\nuniform vec3 vReflectionMicrosurfaceInfos;\\n#if defined(USE_LOCAL_REFLECTIONMAP_CUBIC) && defined(REFLECTIONMAP_CUBIC)\\nuniform vec3 vReflectionPosition;\\nuniform vec3 vReflectionSize; \\n#endif\\n#endif\",pbrUboDeclaration:\"layout(std140,column_major) uniform;\\nuniform Material\\n{\\nuniform vec2 vAlbedoInfos;\\nuniform vec4 vAmbientInfos;\\nuniform vec2 vOpacityInfos;\\nuniform vec2 vEmissiveInfos;\\nuniform vec2 vLightmapInfos;\\nuniform vec3 vReflectivityInfos;\\nuniform vec2 vMicroSurfaceSamplerInfos;\\nuniform vec4 vRefractionInfos;\\nuniform vec2 vReflectionInfos;\\nuniform vec3 vReflectionPosition;\\nuniform vec3 vReflectionSize; \\nuniform vec3 vBumpInfos;\\nuniform mat4 albedoMatrix;\\nuniform mat4 ambientMatrix;\\nuniform mat4 opacityMatrix;\\nuniform mat4 emissiveMatrix;\\nuniform mat4 lightmapMatrix;\\nuniform mat4 reflectivityMatrix;\\nuniform mat4 microSurfaceSamplerMatrix;\\nuniform mat4 bumpMatrix;\\nuniform vec2 vTangentSpaceParams;\\nuniform mat4 refractionMatrix;\\nuniform mat4 reflectionMatrix;\\nuniform vec3 vReflectionColor;\\nuniform vec4 vAlbedoColor;\\nuniform vec4 vLightingIntensity;\\nuniform vec3 vRefractionMicrosurfaceInfos;\\nuniform vec3 vReflectionMicrosurfaceInfos;\\nuniform vec4 vReflectivityColor;\\nuniform vec3 vEmissiveColor;\\nuniform float pointSize;\\n};\\nuniform Scene {\\nmat4 viewProjection;\\nmat4 view;\\n};\",pbrFunctions:\"\\n#define RECIPROCAL_PI2 0.15915494\\n#define FRESNEL_MAXIMUM_ON_ROUGH 0.25\\n\\nconst float kRougnhessToAlphaScale=0.1;\\nconst float kRougnhessToAlphaOffset=0.29248125;\\nfloat convertRoughnessToAverageSlope(float roughness)\\n{\\n\\nconst float kMinimumVariance=0.0005;\\nfloat alphaG=square(roughness)+kMinimumVariance;\\nreturn alphaG;\\n}\\n\\nfloat smithVisibilityG1_TrowbridgeReitzGGX(float dot,float alphaG)\\n{\\nfloat tanSquared=(1.0-dot*dot)/(dot*dot);\\nreturn 2.0/(1.0+sqrt(1.0+alphaG*alphaG*tanSquared));\\n}\\nfloat smithVisibilityG_TrowbridgeReitzGGX_Walter(float NdotL,float NdotV,float alphaG)\\n{\\nreturn smithVisibilityG1_TrowbridgeReitzGGX(NdotL,alphaG)*smithVisibilityG1_TrowbridgeReitzGGX(NdotV,alphaG);\\n}\\n\\n\\nfloat normalDistributionFunction_TrowbridgeReitzGGX(float NdotH,float alphaG)\\n{\\n\\n\\n\\nfloat a2=square(alphaG);\\nfloat d=NdotH*NdotH*(a2-1.0)+1.0;\\nreturn a2/(PI*d*d);\\n}\\nvec3 fresnelSchlickGGX(float VdotH,vec3 reflectance0,vec3 reflectance90)\\n{\\nreturn reflectance0+(reflectance90-reflectance0)*pow(clamp(1.0-VdotH,0.,1.),5.0);\\n}\\nvec3 fresnelSchlickEnvironmentGGX(float VdotN,vec3 reflectance0,vec3 reflectance90,float smoothness)\\n{\\n\\nfloat weight=mix(FRESNEL_MAXIMUM_ON_ROUGH,1.0,smoothness);\\nreturn reflectance0+weight*(reflectance90-reflectance0)*pow(clamp(1.0-VdotN,0.,1.),5.0);\\n}\\n\\nvec3 computeSpecularTerm(float NdotH,float NdotL,float NdotV,float VdotH,float roughness,vec3 reflectance0,vec3 reflectance90,float geometricRoughnessFactor)\\n{\\nroughness=max(roughness,geometricRoughnessFactor);\\nfloat alphaG=convertRoughnessToAverageSlope(roughness);\\nfloat distribution=normalDistributionFunction_TrowbridgeReitzGGX(NdotH,alphaG);\\nfloat visibility=smithVisibilityG_TrowbridgeReitzGGX_Walter(NdotL,NdotV,alphaG);\\nvisibility/=(4.0*NdotL*NdotV); \\nfloat specTerm=max(0.,visibility*distribution)*NdotL;\\nvec3 fresnel=fresnelSchlickGGX(VdotH,reflectance0,reflectance90);\\nreturn fresnel*specTerm;\\n}\\nfloat computeDiffuseTerm(float NdotL,float NdotV,float VdotH,float roughness)\\n{\\n\\n\\nfloat diffuseFresnelNV=pow(clamp(1.0-NdotL,0.000001,1.),5.0);\\nfloat diffuseFresnelNL=pow(clamp(1.0-NdotV,0.000001,1.),5.0);\\nfloat diffuseFresnel90=0.5+2.0*VdotH*VdotH*roughness;\\nfloat fresnel =\\n(1.0+(diffuseFresnel90-1.0)*diffuseFresnelNL) *\\n(1.0+(diffuseFresnel90-1.0)*diffuseFresnelNV);\\nreturn fresnel*NdotL/PI;\\n}\\nfloat adjustRoughnessFromLightProperties(float roughness,float lightRadius,float lightDistance)\\n{\\n#if defined(USEPHYSICALLIGHTFALLOFF) || defined(USEGLTFLIGHTFALLOFF)\\n\\nfloat lightRoughness=lightRadius/lightDistance;\\n\\nfloat totalRoughness=clamp(lightRoughness+roughness,0.,1.);\\nreturn totalRoughness;\\n#else\\nreturn roughness;\\n#endif\\n}\\nfloat computeDefaultMicroSurface(float microSurface,vec3 reflectivityColor)\\n{\\nconst float kReflectivityNoAlphaWorkflow_SmoothnessMax=0.95;\\nfloat reflectivityLuminance=getLuminance(reflectivityColor);\\nfloat reflectivityLuma=sqrt(reflectivityLuminance);\\nmicroSurface=reflectivityLuma*kReflectivityNoAlphaWorkflow_SmoothnessMax;\\nreturn microSurface;\\n}\\n\\n\\nfloat fresnelGrazingReflectance(float reflectance0) {\\nfloat reflectance90=clamp(reflectance0*25.0,0.0,1.0);\\nreturn reflectance90;\\n}\\n\\n\\n#define UNPACK_LOD(x) (1.0-x)*255.0\\nfloat getLodFromAlphaG(float cubeMapDimensionPixels,float alphaG,float NdotV) {\\nfloat microsurfaceAverageSlope=alphaG;\\n\\n\\n\\n\\n\\n\\nmicrosurfaceAverageSlope*=sqrt(abs(NdotV));\\nfloat microsurfaceAverageSlopeTexels=microsurfaceAverageSlope*cubeMapDimensionPixels;\\nfloat lod=log2(microsurfaceAverageSlopeTexels);\\nreturn lod;\\n}\\nfloat environmentRadianceOcclusion(float ambientOcclusion,float NdotVUnclamped) {\\n\\n\\nfloat temp=NdotVUnclamped+ambientOcclusion;\\nreturn clamp(square(temp)-1.0+ambientOcclusion,0.0,1.0);\\n}\\nfloat environmentHorizonOcclusion(vec3 view,vec3 normal) {\\n\\nvec3 reflection=reflect(view,normal);\\nfloat temp=clamp( 1.0+1.1*dot(reflection,normal),0.0,1.0);\\nreturn square(temp);\\n}\",harmonicsFunctions:\"#ifdef USESPHERICALFROMREFLECTIONMAP\\nuniform vec3 vSphericalX;\\nuniform vec3 vSphericalY;\\nuniform vec3 vSphericalZ;\\nuniform vec3 vSphericalXX_ZZ;\\nuniform vec3 vSphericalYY_ZZ;\\nuniform vec3 vSphericalZZ;\\nuniform vec3 vSphericalXY;\\nuniform vec3 vSphericalYZ;\\nuniform vec3 vSphericalZX;\\nvec3 quaternionVectorRotation_ScaledSqrtTwo(vec4 Q,vec3 V){\\nvec3 T=cross(Q.xyz,V);\\nT+=Q.www*V;\\nreturn cross(Q.xyz,T)+V;\\n}\\nvec3 environmentIrradianceJones(vec3 normal)\\n{\\n\\n\\n\\n\\n\\n\\n\\n\\n\\nfloat Nx=normal.x;\\nfloat Ny=normal.y;\\nfloat Nz=normal.z;\\nvec3 C1=vSphericalZZ.rgb;\\nvec3 Cx=vSphericalX.rgb;\\nvec3 Cy=vSphericalY.rgb;\\nvec3 Cz=vSphericalZ.rgb;\\nvec3 Cxx_zz=vSphericalXX_ZZ.rgb;\\nvec3 Cyy_zz=vSphericalYY_ZZ.rgb;\\nvec3 Cxy=vSphericalXY.rgb;\\nvec3 Cyz=vSphericalYZ.rgb;\\nvec3 Czx=vSphericalZX.rgb;\\nvec3 a1=Cyy_zz*Ny+Cy;\\nvec3 a2=Cyz*Nz+a1;\\nvec3 b1=Czx*Nz+Cx;\\nvec3 b2=Cxy*Ny+b1;\\nvec3 b3=Cxx_zz*Nx+b2;\\nvec3 t1=Cz*Nz+C1;\\nvec3 t2=a2*Ny+t1;\\nvec3 t3=b3*Nx+t2;\\nreturn t3;\\n}\\n#endif\",pbrLightFunctions:\"\\nstruct lightingInfo\\n{\\nvec3 diffuse;\\n#ifdef SPECULARTERM\\nvec3 specular;\\n#endif\\n};\\nstruct pointLightingInfo\\n{\\nvec3 lightOffset;\\nfloat lightDistanceSquared;\\nfloat attenuation;\\n};\\nstruct spotLightingInfo\\n{\\nvec3 lightOffset;\\nfloat lightDistanceSquared;\\nvec3 directionToLightCenterW;\\nfloat attenuation;\\n};\\nfloat computeDistanceLightFalloff_Standard(vec3 lightOffset,float range)\\n{\\nreturn max(0.,1.0-length(lightOffset)/range);\\n}\\nfloat computeDistanceLightFalloff_Physical(float lightDistanceSquared)\\n{\\nreturn 1.0/((lightDistanceSquared+0.001));\\n}\\nfloat computeDistanceLightFalloff_GLTF(float lightDistanceSquared,float inverseSquaredRange)\\n{\\nconst float minDistanceSquared=0.01*0.01;\\nfloat lightDistanceFalloff=1.0/(max(lightDistanceSquared,minDistanceSquared));\\nfloat factor=lightDistanceSquared*inverseSquaredRange;\\nfloat attenuation=clamp(1.0-factor*factor,0.,1.);\\nattenuation*=attenuation;\\n\\nlightDistanceFalloff*=attenuation;\\nreturn lightDistanceFalloff;\\n}\\nfloat computeDistanceLightFalloff(vec3 lightOffset,float lightDistanceSquared,float range,float inverseSquaredRange)\\n{ \\n#ifdef USEPHYSICALLIGHTFALLOFF\\nreturn computeDistanceLightFalloff_Physical(lightDistanceSquared);\\n#elif defined(USEGLTFLIGHTFALLOFF)\\nreturn computeDistanceLightFalloff_GLTF(lightDistanceSquared,inverseSquaredRange);\\n#else\\nreturn computeDistanceLightFalloff_Standard(lightOffset,range);\\n#endif\\n}\\nfloat computeDirectionalLightFalloff_Standard(vec3 lightDirection,vec3 directionToLightCenterW,float cosHalfAngle,float exponent)\\n{\\nfloat falloff=0.0;\\nfloat cosAngle=max(0.000000000000001,dot(-lightDirection,directionToLightCenterW));\\nif (cosAngle>=cosHalfAngle)\\n{\\nfalloff=max(0.,pow(cosAngle,exponent));\\n}\\nreturn falloff;\\n}\\nfloat computeDirectionalLightFalloff_Physical(vec3 lightDirection,vec3 directionToLightCenterW,float cosHalfAngle)\\n{\\nconst float kMinusLog2ConeAngleIntensityRatio=6.64385618977; \\n\\n\\n\\n\\n\\nfloat concentrationKappa=kMinusLog2ConeAngleIntensityRatio/(1.0-cosHalfAngle);\\n\\n\\nvec4 lightDirectionSpreadSG=vec4(-lightDirection*concentrationKappa,-concentrationKappa);\\nfloat falloff=exp2(dot(vec4(directionToLightCenterW,1.0),lightDirectionSpreadSG));\\nreturn falloff;\\n}\\nfloat computeDirectionalLightFalloff_GLTF(vec3 lightDirection,vec3 directionToLightCenterW,float lightAngleScale,float lightAngleOffset)\\n{\\n\\n\\n\\nfloat cd=dot(-lightDirection,directionToLightCenterW);\\nfloat falloff=clamp(cd*lightAngleScale+lightAngleOffset,0.,1.);\\n\\nfalloff*=falloff;\\nreturn falloff;\\n}\\nfloat computeDirectionalLightFalloff(vec3 lightDirection,vec3 directionToLightCenterW,float cosHalfAngle,float exponent,float lightAngleScale,float lightAngleOffset)\\n{\\n#ifdef USEPHYSICALLIGHTFALLOFF\\nreturn computeDirectionalLightFalloff_Physical(lightDirection,directionToLightCenterW,cosHalfAngle);\\n#elif defined(USEGLTFLIGHTFALLOFF)\\nreturn computeDirectionalLightFalloff_GLTF(lightDirection,directionToLightCenterW,lightAngleScale,lightAngleOffset);\\n#else\\nreturn computeDirectionalLightFalloff_Standard(lightDirection,directionToLightCenterW,cosHalfAngle,exponent);\\n#endif\\n}\\npointLightingInfo computePointLightingInfo(vec4 lightData) {\\npointLightingInfo result;\\nresult.lightOffset=lightData.xyz-vPositionW;\\nresult.lightDistanceSquared=dot(result.lightOffset,result.lightOffset);\\nreturn result;\\n}\\nspotLightingInfo computeSpotLightingInfo(vec4 lightData) {\\nspotLightingInfo result;\\nresult.lightOffset=lightData.xyz-vPositionW;\\nresult.directionToLightCenterW=normalize(result.lightOffset);\\nresult.lightDistanceSquared=dot(result.lightOffset,result.lightOffset);\\nreturn result;\\n}\\nlightingInfo computePointLighting(pointLightingInfo info,vec3 viewDirectionW,vec3 vNormal,vec3 diffuseColor,float lightRadius,float roughness,float NdotV,vec3 reflectance0,vec3 reflectance90,float geometricRoughnessFactor,out float NdotL) {\\nlightingInfo result;\\nfloat lightDistance=sqrt(info.lightDistanceSquared);\\nvec3 lightDirection=normalize(info.lightOffset);\\n\\nroughness=adjustRoughnessFromLightProperties(roughness,lightRadius,lightDistance);\\n\\nvec3 H=normalize(viewDirectionW+lightDirection);\\nNdotL=clamp(dot(vNormal,lightDirection),0.00000000001,1.0);\\nfloat VdotH=clamp(dot(viewDirectionW,H),0.0,1.0);\\nfloat diffuseTerm=computeDiffuseTerm(NdotL,NdotV,VdotH,roughness);\\nresult.diffuse=diffuseTerm*diffuseColor*info.attenuation;\\n#ifdef SPECULARTERM\\n\\nfloat NdotH=clamp(dot(vNormal,H),0.000000000001,1.0);\\nvec3 specTerm=computeSpecularTerm(NdotH,NdotL,NdotV,VdotH,roughness,reflectance0,reflectance90,geometricRoughnessFactor);\\nresult.specular=specTerm*diffuseColor*info.attenuation;\\n#endif\\nreturn result;\\n}\\nlightingInfo computeSpotLighting(spotLightingInfo info,vec3 viewDirectionW,vec3 vNormal,vec4 lightDirection,vec3 diffuseColor,float lightRadius,float roughness,float NdotV,vec3 reflectance0,vec3 reflectance90,float geometricRoughnessFactor,out float NdotL) {\\nlightingInfo result;\\n\\nfloat lightDistance=sqrt(info.lightDistanceSquared);\\nroughness=adjustRoughnessFromLightProperties(roughness,lightRadius,lightDistance);\\n\\nvec3 H=normalize(viewDirectionW+info.directionToLightCenterW);\\nNdotL=clamp(dot(vNormal,info.directionToLightCenterW),0.000000000001,1.0);\\nfloat VdotH=clamp(dot(viewDirectionW,H),0.0,1.0);\\nfloat diffuseTerm=computeDiffuseTerm(NdotL,NdotV,VdotH,roughness);\\nresult.diffuse=diffuseTerm*diffuseColor*info.attenuation;\\n#ifdef SPECULARTERM\\n\\nfloat NdotH=clamp(dot(vNormal,H),0.000000000001,1.0);\\nvec3 specTerm=computeSpecularTerm(NdotH,NdotL,NdotV,VdotH,roughness,reflectance0,reflectance90,geometricRoughnessFactor);\\nresult.specular=specTerm*diffuseColor*info.attenuation;\\n#endif\\nreturn result;\\n}\\nlightingInfo computeDirectionalLighting(vec3 viewDirectionW,vec3 vNormal,vec4 lightData,vec3 diffuseColor,vec3 specularColor,float lightRadius,float roughness,float NdotV,vec3 reflectance0,vec3 reflectance90,float geometricRoughnessFactor,out float NdotL) {\\nlightingInfo result;\\nfloat lightDistance=length(-lightData.xyz);\\nvec3 lightDirection=normalize(-lightData.xyz);\\n\\nroughness=adjustRoughnessFromLightProperties(roughness,lightRadius,lightDistance);\\n\\nvec3 H=normalize(viewDirectionW+lightDirection);\\nNdotL=clamp(dot(vNormal,lightDirection),0.00000000001,1.0);\\nfloat VdotH=clamp(dot(viewDirectionW,H),0.0,1.0);\\nfloat diffuseTerm=computeDiffuseTerm(NdotL,NdotV,VdotH,roughness);\\nresult.diffuse=diffuseTerm*diffuseColor;\\n#ifdef SPECULARTERM\\n\\nfloat NdotH=clamp(dot(vNormal,H),0.000000000001,1.0);\\nvec3 specTerm=computeSpecularTerm(NdotH,NdotL,NdotV,VdotH,roughness,reflectance0,reflectance90,geometricRoughnessFactor);\\nresult.specular=specTerm*diffuseColor;\\n#endif\\nreturn result;\\n}\\nlightingInfo computeHemisphericLighting(vec3 viewDirectionW,vec3 vNormal,vec4 lightData,vec3 diffuseColor,vec3 specularColor,vec3 groundColor,float roughness,float NdotV,vec3 reflectance0,vec3 reflectance90,float geometricRoughnessFactor,out float NdotL) {\\nlightingInfo result;\\n\\n\\n\\nNdotL=dot(vNormal,lightData.xyz)*0.5+0.5;\\nresult.diffuse=mix(groundColor,diffuseColor,NdotL);\\n#ifdef SPECULARTERM\\n\\nvec3 lightVectorW=normalize(lightData.xyz);\\nvec3 H=normalize(viewDirectionW+lightVectorW);\\nfloat NdotH=clamp(dot(vNormal,H),0.000000000001,1.0);\\nNdotL=clamp(NdotL,0.000000000001,1.0);\\nfloat VdotH=clamp(dot(viewDirectionW,H),0.0,1.0);\\nvec3 specTerm=computeSpecularTerm(NdotH,NdotL,NdotV,VdotH,roughness,reflectance0,reflectance90,geometricRoughnessFactor);\\nresult.specular=specTerm*diffuseColor;\\n#endif\\nreturn result;\\n}\\nvec3 computeProjectionTextureDiffuseLighting(sampler2D projectionLightSampler,mat4 textureProjectionMatrix){\\nvec4 strq=textureProjectionMatrix*vec4(vPositionW,1.0);\\nstrq/=strq.w;\\nvec3 textureColor=texture2D(projectionLightSampler,strq.xy).rgb;\\nreturn toLinearSpace(textureColor);\\n}\",clipPlaneVertexDeclaration2:\"#ifdef CLIPPLANE\\nuniform vec4 vClipPlane;\\nout float fClipDistance;\\n#endif\\n#ifdef CLIPPLANE2\\nuniform vec4 vClipPlane2;\\nout float fClipDistance2;\\n#endif\\n#ifdef CLIPPLANE3\\nuniform vec4 vClipPlane3;\\nout float fClipDistance3;\\n#endif\\n#ifdef CLIPPLANE4\\nuniform vec4 vClipPlane4;\\nout float fClipDistance4;\\n#endif\",clipPlaneFragmentDeclaration2:\"#ifdef CLIPPLANE\\nin float fClipDistance;\\n#endif\\n#ifdef CLIPPLANE2\\nin float fClipDistance2;\\n#endif\\n#ifdef CLIPPLANE3\\nin float fClipDistance3;\\n#endif\\n#ifdef CLIPPLANE4\\nin float fClipDistance4;\\n#endif\",mrtFragmentDeclaration:\"#if __VERSION__>=200\\nlayout(location=0) out vec4 glFragData[{X}];\\n#endif\\n\",bones300Declaration:\"#if NUM_BONE_INFLUENCERS>0\\nuniform mat4 mBones[BonesPerMesh];\\nin vec4 matricesIndices;\\nin vec4 matricesWeights;\\n#if NUM_BONE_INFLUENCERS>4\\nin vec4 matricesIndicesExtra;\\nin vec4 matricesWeightsExtra;\\n#endif\\n#endif\",instances300Declaration:\"#ifdef INSTANCES\\nin vec4 world0;\\nin vec4 world1;\\nin vec4 world2;\\nin vec4 world3;\\n#else\\nuniform mat4 world;\\n#endif\",kernelBlurFragment:\"#ifdef DOF\\nfactor=sampleCoC(sampleCoord{X}); \\ncomputedWeight=KERNEL_WEIGHT{X}*factor;\\nsumOfWeights+=computedWeight;\\n#else\\ncomputedWeight=KERNEL_WEIGHT{X};\\n#endif\\n#ifdef PACKEDFLOAT\\nblend+=unpack(texture2D(textureSampler,sampleCoord{X}))*computedWeight;\\n#else\\nblend+=texture2D(textureSampler,sampleCoord{X})*computedWeight;\\n#endif\",kernelBlurFragment2:\"#ifdef DOF\\nfactor=sampleCoC(sampleCenter+delta*KERNEL_DEP_OFFSET{X});\\ncomputedWeight=KERNEL_DEP_WEIGHT{X}*factor;\\nsumOfWeights+=computedWeight;\\n#else\\ncomputedWeight=KERNEL_DEP_WEIGHT{X};\\n#endif\\n#ifdef PACKEDFLOAT\\nblend+=unpack(texture2D(textureSampler,sampleCenter+delta*KERNEL_DEP_OFFSET{X}))*computedWeight;\\n#else\\nblend+=texture2D(textureSampler,sampleCenter+delta*KERNEL_DEP_OFFSET{X})*computedWeight;\\n#endif\",kernelBlurVaryingDeclaration:\"varying vec2 sampleCoord{X};\",kernelBlurVertex:\"sampleCoord{X}=sampleCenter+delta*KERNEL_OFFSET{X};\",backgroundVertexDeclaration:\"uniform mat4 view;\\nuniform mat4 viewProjection;\\nuniform float shadowLevel;\\n#ifdef DIFFUSE\\nuniform mat4 diffuseMatrix;\\nuniform vec2 vDiffuseInfos;\\n#endif\\n#ifdef REFLECTION\\nuniform vec2 vReflectionInfos;\\nuniform mat4 reflectionMatrix;\\nuniform vec3 vReflectionMicrosurfaceInfos;\\nuniform float fFovMultiplier;\\n#endif\\n#ifdef POINTSIZE\\nuniform float pointSize;\\n#endif\",backgroundFragmentDeclaration:\" uniform vec4 vPrimaryColor;\\n#ifdef USEHIGHLIGHTANDSHADOWCOLORS\\nuniform vec4 vPrimaryColorShadow;\\n#endif\\nuniform float shadowLevel;\\nuniform float alpha;\\n#ifdef DIFFUSE\\nuniform vec2 vDiffuseInfos;\\n#endif\\n#ifdef REFLECTION\\nuniform vec2 vReflectionInfos;\\nuniform mat4 reflectionMatrix;\\nuniform vec3 vReflectionMicrosurfaceInfos;\\n#endif\\n#if defined(REFLECTIONFRESNEL) || defined(OPACITYFRESNEL)\\nuniform vec3 vBackgroundCenter;\\n#endif\\n#ifdef REFLECTIONFRESNEL\\nuniform vec4 vReflectionControl;\\n#endif\\n#if defined(REFLECTIONMAP_SPHERICAL) || defined(REFLECTIONMAP_PROJECTION) || defined(REFRACTION)\\nuniform mat4 view;\\n#endif\",backgroundUboDeclaration:\"layout(std140,column_major) uniform;\\nuniform Material\\n{\\nuniform vec4 vPrimaryColor;\\nuniform vec4 vPrimaryColorShadow;\\nuniform vec2 vDiffuseInfos;\\nuniform vec2 vReflectionInfos;\\nuniform mat4 diffuseMatrix;\\nuniform mat4 reflectionMatrix;\\nuniform vec3 vReflectionMicrosurfaceInfos;\\nuniform float fFovMultiplier;\\nuniform float pointSize;\\nuniform float shadowLevel;\\nuniform float alpha;\\n#if defined(REFLECTIONFRESNEL) || defined(OPACITYFRESNEL)\\nuniform vec3 vBackgroundCenter;\\n#endif\\n#ifdef REFLECTIONFRESNEL\\nuniform vec4 vReflectionControl;\\n#endif\\n};\\nuniform Scene {\\nmat4 viewProjection;\\nmat4 view;\\n};\"};var tl=\"undefined\"!=typeof global?global:\"undefined\"!=typeof window?window:this;return tl.BABYLON=$a,void 0!==m&&(tl.Earcut={earcut:m}),$a}));","(function (global, factory) {\n\ttypeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/core'), require('@angular/common')) :\n\ttypeof define === 'function' && define.amd ? define(['exports', '@angular/core', '@angular/common'], factory) :\n\t(factory((global['ngx-device-detector'] = {}),global.core,global.common));\n}(this, (function (exports,core,common) { 'use strict';\n\n/**\n * @fileoverview added by tsickle\n * @suppress {checkTypes} checked by tsc\n */\n/**\n * Created by ahsanayaz on 08/11/2016.\n */\nvar BROWSERS = {\n CHROME: 'Chrome',\n FIREFOX: 'Firefox',\n SAFARI: 'Safari',\n OPERA: 'Opera',\n IE: 'IE',\n MS_EDGE: 'MS-Edge',\n FB_MESSANGER: 'FB-Messanger',\n SAMSUNG: 'Samsung',\n UCBROWSER: 'UC-Browser',\n UNKNOWN: 'Unknown'\n};\nvar DEVICES = {\n ANDROID: 'Android',\n I_PAD: 'iPad',\n IPHONE: 'iPhone',\n I_POD: 'iPod',\n BLACKBERRY: 'Blackberry',\n FIREFOX_OS: 'Firefox-OS',\n CHROME_BOOK: 'Chrome-Book',\n WINDOWS_PHONE: 'Windows-Phone',\n PS4: 'PS4',\n VITA: 'Vita',\n CHROMECAST: 'Chromecast',\n APPLE_TV: 'Apple-TV',\n GOOGLE_TV: 'Google-TV',\n UNKNOWN: 'Unknown'\n};\nvar OS = {\n WINDOWS: 'Windows',\n MAC: 'Mac',\n IOS: 'iOS',\n ANDROID: 'Android',\n LINUX: 'Linux',\n UNIX: 'Unix',\n FIREFOX_OS: 'Firefox-OS',\n CHROME_OS: 'Chrome-OS',\n WINDOWS_PHONE: 'Windows-Phone',\n UNKNOWN: 'Unknown'\n};\nvar OS_VERSIONS = {\n WINDOWS_3_11: 'windows-3-11',\n WINDOWS_95: 'windows-95',\n WINDOWS_ME: 'windows-me',\n WINDOWS_98: 'windows-98',\n WINDOWS_CE: 'windows-ce',\n WINDOWS_2000: 'windows-2000',\n WINDOWS_XP: 'windows-xp',\n WINDOWS_SERVER_2003: 'windows-server-2003',\n WINDOWS_VISTA: 'windows-vista',\n WINDOWS_7: 'windows-7',\n WINDOWS_8_1: 'windows-8-1',\n WINDOWS_8: 'windows-8',\n WINDOWS_10: 'windows-10',\n WINDOWS_PHONE_7_5: 'windows-phone-7-5',\n WINDOWS_PHONE_8_1: 'windows-phone-8-1',\n WINDOWS_PHONE_10: 'windows-phone-10',\n WINDOWS_NT_4_0: 'windows-nt-4-0',\n MACOSX_15: 'mac-os-x-15',\n MACOSX_14: 'mac-os-x-14',\n MACOSX_13: 'mac-os-x-13',\n MACOSX_12: 'mac-os-x-12',\n MACOSX_11: 'mac-os-x-11',\n MACOSX_10: 'mac-os-x-10',\n MACOSX_9: 'mac-os-x-9',\n MACOSX_8: 'mac-os-x-8',\n MACOSX_7: 'mac-os-x-7',\n MACOSX_6: 'mac-os-x-6',\n MACOSX_5: 'mac-os-x-5',\n MACOSX_4: 'mac-os-x-4',\n MACOSX_3: 'mac-os-x-3',\n MACOSX_2: 'mac-os-x-2',\n MACOSX: 'mac-os-x',\n UNKNOWN: 'unknown'\n};\nvar OS_RE = {\n WINDOWS: { and: [{ or: [/\\bWindows|(Win\\d\\d)\\b/, /\\bWin 9x\\b/] }, { not: /\\bWindows Phone\\b/ }] },\n MAC: { and: [/\\bMac OS\\b/, { not: { or: [/\\biPhone\\b/, /\\bWindows Phone\\b/] } }] },\n IOS: { and: [{ or: [/\\biPad\\b/, /\\biPhone\\b/, /\\biPod\\b/] }, { not: /\\bWindows Phone\\b/ }] },\n ANDROID: { and: [/\\bAndroid\\b/, { not: /\\bWindows Phone\\b/ }] },\n LINUX: /\\bLinux\\b/,\n UNIX: /\\bUNIX\\b/,\n FIREFOX_OS: { and: [/\\bFirefox\\b/, /Mobile\\b/] },\n CHROME_OS: /\\bCrOS\\b/,\n WINDOWS_PHONE: { or: [/\\bIEMobile\\b/, /\\bWindows Phone\\b/] },\n PS4: /\\bMozilla\\/5.0 \\(PlayStation 4\\b/,\n VITA: /\\bMozilla\\/5.0 \\(Play(S|s)tation Vita\\b/\n};\nvar BROWSERS_RE = {\n CHROME: { and: [{ or: [/\\bChrome\\b/, /\\bCriOS\\b/] }, { not: { or: [/\\bOPR\\b/, /\\bEdg(e|A|iOS)\\b/, /\\bSamsungBrowser\\b/, /\\bUCBrowser\\b/] } }] },\n FIREFOX: { or: [/\\bFirefox\\b/, /\\bFxiOS\\b/] },\n SAFARI: { and: [/^((?!CriOS).)*\\Safari\\b.*$/, { not: {\n or: [/\\bOPR\\b/, /\\bEdg(e|A|iOS)\\b/, /\\bWindows Phone\\b/, /\\bSamsungBrowser\\b/, /\\bUCBrowser\\b/]\n } }] },\n OPERA: { or: [/Opera\\b/, /\\bOPR\\b/] },\n IE: { or: [/\\bMSIE\\b/, /\\bTrident\\b/, /^Mozilla\\/5\\.0 \\(Windows NT 10\\.0; Win64; x64\\)$/] },\n MS_EDGE: { or: [/\\bEdg(e|A|iOS)\\b/] },\n PS4: /\\bMozilla\\/5.0 \\(PlayStation 4\\b/,\n VITA: /\\bMozilla\\/5.0 \\(Play(S|s)tation Vita\\b/,\n FB_MESSANGER: /\\bFBAN\\/MessengerForiOS\\b/,\n SAMSUNG: /\\bSamsungBrowser\\b/,\n UCBROWSER: /\\bUCBrowser\\b/,\n};\nvar DEVICES_RE = {\n ANDROID: { and: [/\\bAndroid\\b/, { not: /Windows Phone/ }] },\n I_PAD: /\\biPad\\b/,\n IPHONE: { and: [/\\biPhone\\b/, { not: /Windows Phone/ }] },\n I_POD: /\\biPod\\b/,\n BLACKBERRY: /\\bblackberry\\b/,\n FIREFOX_OS: { and: [/\\bFirefox\\b/, /\\bMobile\\b/] },\n CHROME_BOOK: /\\bCrOS\\b/,\n WINDOWS_PHONE: { or: [/\\bIEMobile\\b/, /\\bWindows Phone\\b/] },\n PS4: /\\bMozilla\\/5.0 \\(PlayStation 4\\b/,\n CHROMECAST: /\\bCrKey\\b/,\n APPLE_TV: /^iTunes-AppleTV\\/4.1$/,\n GOOGLE_TV: /\\bGoogleTV\\b/,\n VITA: /\\bMozilla\\/5.0 \\(Play(S|s)tation Vita\\b/\n};\nvar OS_VERSIONS_RE = {\n WINDOWS_3_11: /Win16/,\n WINDOWS_95: /(Windows 95|Win95|Windows_95)/,\n WINDOWS_ME: /(Win 9x 4.90|Windows ME)/,\n WINDOWS_98: /(Windows 98|Win98)/,\n WINDOWS_CE: /Windows CE/,\n WINDOWS_2000: /(Windows NT 5.0|Windows 2000)/,\n WINDOWS_XP: /(Windows NT 5.1|Windows XP)/,\n WINDOWS_SERVER_2003: /Windows NT 5.2/,\n WINDOWS_VISTA: /Windows NT 6.0/,\n WINDOWS_7: /(Windows 7|Windows NT 6.1)/,\n WINDOWS_8_1: /(Windows 8.1|Windows NT 6.3)/,\n WINDOWS_8: /(Windows 8|Windows NT 6.2)/,\n WINDOWS_10: /(Windows NT 10.0)/,\n WINDOWS_PHONE_7_5: /(Windows Phone OS 7.5)/,\n WINDOWS_PHONE_8_1: /(Windows Phone 8.1)/,\n WINDOWS_PHONE_10: /(Windows Phone 10)/,\n WINDOWS_NT_4_0: { and: [/(Windows NT 4.0|WinNT4.0|WinNT|Windows NT)/, { not: /Windows NT 10.0/ }] },\n MACOSX: /(MAC OS X\\s*[^ 0-9])/,\n MACOSX_3: /(Darwin 10.3|Mac OS X 10.3)/,\n MACOSX_4: /(Darwin 10.4|Mac OS X 10.4)/,\n MACOSX_5: /(Mac OS X 10.5)/,\n MACOSX_6: /(Mac OS X 10.6)/,\n MACOSX_7: /(Mac OS X 10.7)/,\n MACOSX_8: /(Mac OS X 10.8)/,\n MACOSX_9: /(Mac OS X 10.9)/,\n MACOSX_10: /(Mac OS X 10.10)/,\n MACOSX_11: /(Mac OS X 10.11)/,\n MACOSX_12: /(Mac OS X 10.12)/,\n MACOSX_13: /(Mac OS X 10.13)/,\n MACOSX_14: /(Mac OS X 10.14)/,\n MACOSX_15: /(Mac OS X 10.15)/\n};\nvar BROWSER_VERSIONS_RE_MAP = {\n CHROME: [/\\bChrome\\/([\\d\\.]+)\\b/, /\\bCriOS\\/([\\d\\.]+)\\b/],\n FIREFOX: /\\bFirefox\\/([\\d\\.]+)\\b/,\n SAFARI: /\\bVersion\\/([\\d\\.]+)\\b/,\n OPERA: [/\\bVersion\\/([\\d\\.]+)\\b/, /\\bOPR\\/([\\d\\.]+)\\b/],\n IE: [/\\bMSIE ([\\d\\.]+\\w?)\\b/, /\\brv:([\\d\\.]+\\w?)\\b/],\n MS_EDGE: /\\bEdg(?:e|A|iOS)\\/([\\d\\.]+)\\b/,\n SAMSUNG: /\\bSamsungBrowser\\/([\\d\\.]+)\\b/,\n UCBROWSER: /\\bUCBrowser\\/([\\d\\.]+)\\b/,\n};\nvar BROWSER_VERSIONS_RE = Object.keys(BROWSER_VERSIONS_RE_MAP).reduce(function (obj, key) {\n obj[BROWSERS[key]] = BROWSER_VERSIONS_RE_MAP[key];\n return obj;\n}, {});\n\n\nvar Constants = Object.freeze({\n\tBROWSERS: BROWSERS,\n\tDEVICES: DEVICES,\n\tOS: OS,\n\tOS_VERSIONS: OS_VERSIONS,\n\tOS_RE: OS_RE,\n\tBROWSERS_RE: BROWSERS_RE,\n\tDEVICES_RE: DEVICES_RE,\n\tOS_VERSIONS_RE: OS_VERSIONS_RE,\n\tBROWSER_VERSIONS_RE_MAP: BROWSER_VERSIONS_RE_MAP,\n\tBROWSER_VERSIONS_RE: BROWSER_VERSIONS_RE\n});\n\n/**\n * @fileoverview added by tsickle\n * @suppress {checkTypes} checked by tsc\n */\n/**\n * Created by ahsanayaz on 08/11/2016.\n */\nvar ReTree = /** @class */ (function () {\n function ReTree() {\n }\n /**\n * @param {?} string\n * @param {?} regex\n * @return {?}\n */\n ReTree.prototype.test = /**\n * @param {?} string\n * @param {?} regex\n * @return {?}\n */\n function (string, regex) {\n var /** @type {?} */ self = this;\n if (typeof regex === 'string') {\n regex = new RegExp(regex);\n }\n if (regex instanceof RegExp) {\n return regex.test(string);\n }\n else if (regex && Array.isArray(regex.and)) {\n return regex.and.every(function (item) {\n return self.test(string, item);\n });\n }\n else if (regex && Array.isArray(regex.or)) {\n return regex.or.some(function (item) {\n return self.test(string, item);\n });\n }\n else if (regex && regex.not) {\n return !self.test(string, regex.not);\n }\n else {\n return false;\n }\n };\n /**\n * @param {?} string\n * @param {?} regex\n * @return {?}\n */\n ReTree.prototype.exec = /**\n * @param {?} string\n * @param {?} regex\n * @return {?}\n */\n function (string, regex) {\n var /** @type {?} */ self = this;\n if (typeof regex === 'string') {\n regex = new RegExp(regex);\n }\n if (regex instanceof RegExp) {\n return regex.exec(string);\n }\n else if (regex && Array.isArray(regex)) {\n return regex.reduce(function (res, item) {\n return (!!res) ? res : self.exec(string, item);\n }, null);\n }\n else {\n return null;\n }\n };\n return ReTree;\n}());\n\n/**\n * @fileoverview added by tsickle\n * @suppress {checkTypes} checked by tsc\n */\n/**\n * @record\n */\n\nvar DeviceDetectorService = /** @class */ (function () {\n function DeviceDetectorService(platformId) {\n this.platformId = platformId;\n this.ua = '';\n this.userAgent = '';\n this.os = '';\n this.browser = '';\n this.device = '';\n this.os_version = '';\n this.browser_version = '';\n if (common.isPlatformBrowser(this.platformId)) {\n this.ua = window.navigator.userAgent;\n }\n this._setDeviceInfo();\n }\n /**\n * @author Ahsan Ayaz\n * @desc Sets the initial value of the device when the service is initiated.\n * This value is later accessible for usage\n * @return {?}\n */\n DeviceDetectorService.prototype._setDeviceInfo = /**\n * @author Ahsan Ayaz\n * @desc Sets the initial value of the device when the service is initiated.\n * This value is later accessible for usage\n * @return {?}\n */\n function () {\n var _this = this;\n var /** @type {?} */ reTree = new ReTree();\n var /** @type {?} */ ua = this.ua;\n this.userAgent = ua;\n var /** @type {?} */ mappings = [\n { const: 'OS', prop: 'os' },\n { const: 'BROWSERS', prop: 'browser' },\n { const: 'DEVICES', prop: 'device' },\n { const: 'OS_VERSIONS', prop: 'os_version' },\n ];\n mappings.forEach(function (mapping) {\n _this[mapping.prop] = Object.keys(Constants[mapping.const]).reduce(function (obj, item) {\n obj[Constants[mapping.const][item]] = reTree.test(ua, Constants[mapping.const + \"_RE\"][item]);\n return obj;\n }, {});\n });\n mappings.forEach(function (mapping) {\n _this[mapping.prop] = Object.keys(Constants[mapping.const])\n .map(function (key) {\n return Constants[mapping.const][key];\n }).reduce(function (previousValue, currentValue) {\n return (previousValue === Constants[mapping.const].UNKNOWN && _this[mapping.prop][currentValue])\n ? currentValue : previousValue;\n }, Constants[mapping.const].UNKNOWN);\n });\n this.browser_version = '0';\n if (this.browser !== BROWSERS.UNKNOWN) {\n var /** @type {?} */ re = BROWSER_VERSIONS_RE[this.browser];\n var /** @type {?} */ res = reTree.exec(ua, re);\n if (!!res) {\n this.browser_version = res[1];\n }\n }\n };\n /**\n * @author Ahsan Ayaz\n * @desc Returns the device information\n * @return {?} the device information object.\n */\n DeviceDetectorService.prototype.getDeviceInfo = /**\n * @author Ahsan Ayaz\n * @desc Returns the device information\n * @return {?} the device information object.\n */\n function () {\n var /** @type {?} */ deviceInfo = {\n userAgent: this.userAgent,\n os: this.os,\n browser: this.browser,\n device: this.device,\n os_version: this.os_version,\n browser_version: this.browser_version\n };\n return deviceInfo;\n };\n /**\n * @author Ahsan Ayaz\n * @desc Compares the current device info with the mobile devices to check\n * if the current device is a mobile.\n * @return {?} whether the current device is a mobile\n */\n DeviceDetectorService.prototype.isMobile = /**\n * @author Ahsan Ayaz\n * @desc Compares the current device info with the mobile devices to check\n * if the current device is a mobile.\n * @return {?} whether the current device is a mobile\n */\n function () {\n var _this = this;\n return [\n DEVICES.ANDROID,\n DEVICES.IPHONE,\n DEVICES.I_POD,\n DEVICES.BLACKBERRY,\n DEVICES.FIREFOX_OS,\n DEVICES.WINDOWS_PHONE,\n DEVICES.VITA\n ].some(function (item) {\n return _this.device === item;\n });\n };\n \n /**\n * @author Ahsan Ayaz\n * @desc Compares the current device info with the tablet devices to check\n * if the current device is a tablet.\n * @return {?} whether the current device is a tablet\n */\n DeviceDetectorService.prototype.isTablet = /**\n * @author Ahsan Ayaz\n * @desc Compares the current device info with the tablet devices to check\n * if the current device is a tablet.\n * @return {?} whether the current device is a tablet\n */\n function () {\n var _this = this;\n return [\n DEVICES.I_PAD,\n DEVICES.FIREFOX_OS\n ].some(function (item) {\n return _this.device === item;\n });\n };\n \n /**\n * @author Ahsan Ayaz\n * @desc Compares the current device info with the desktop devices to check\n * if the current device is a desktop device.\n * @return {?} whether the current device is a desktop device\n */\n DeviceDetectorService.prototype.isDesktop = /**\n * @author Ahsan Ayaz\n * @desc Compares the current device info with the desktop devices to check\n * if the current device is a desktop device.\n * @return {?} whether the current device is a desktop device\n */\n function () {\n var _this = this;\n return [\n DEVICES.PS4,\n DEVICES.CHROME_BOOK,\n DEVICES.UNKNOWN\n ].some(function (item) {\n return _this.device === item;\n });\n };\n \n DeviceDetectorService.decorators = [\n { type: core.Injectable },\n ];\n /** @nocollapse */\n DeviceDetectorService.ctorParameters = function () { return [\n { type: undefined, decorators: [{ type: core.Inject, args: [core.PLATFORM_ID,] },] },\n ]; };\n return DeviceDetectorService;\n}());\n\n/**\n * @fileoverview added by tsickle\n * @suppress {checkTypes} checked by tsc\n */\nvar DeviceDetectorModule = /** @class */ (function () {\n function DeviceDetectorModule() {\n }\n /**\n * @return {?}\n */\n DeviceDetectorModule.forRoot = /**\n * @return {?}\n */\n function () {\n return {\n ngModule: DeviceDetectorModule,\n providers: [DeviceDetectorService]\n };\n };\n DeviceDetectorModule.decorators = [\n { type: core.NgModule, args: [{\n imports: [\n common.CommonModule\n ]\n },] },\n ];\n return DeviceDetectorModule;\n}());\n\nexports.DeviceDetectorModule = DeviceDetectorModule;\nexports.DeviceDetectorService = DeviceDetectorService;\nexports.ReTree = ReTree;\nexports.BROWSERS = BROWSERS;\nexports.DEVICES = DEVICES;\nexports.OS = OS;\nexports.OS_VERSIONS = OS_VERSIONS;\nexports.OS_RE = OS_RE;\nexports.BROWSERS_RE = BROWSERS_RE;\nexports.DEVICES_RE = DEVICES_RE;\nexports.OS_VERSIONS_RE = OS_VERSIONS_RE;\nexports.BROWSER_VERSIONS_RE_MAP = BROWSER_VERSIONS_RE_MAP;\nexports.BROWSER_VERSIONS_RE = BROWSER_VERSIONS_RE;\n\nObject.defineProperty(exports, '__esModule', { value: true });\n\n})));\n","import { ChangeDetectionStrategy, ChangeDetectorRef, Component, Directive, EventEmitter, Input, NgModule, Output, Pipe, ViewEncapsulation } from '@angular/core';\nimport { CommonModule } from '@angular/common';\n\nvar PaginationService = (function () {\r\n function PaginationService() {\r\n this.change = new EventEmitter();\r\n this.instances = {};\r\n this.DEFAULT_ID = 'DEFAULT_PAGINATION_ID';\r\n }\r\n PaginationService.prototype.defaultId = function () { return this.DEFAULT_ID; };\r\n PaginationService.prototype.register = function (instance) {\r\n if (instance.id == null) {\r\n instance.id = this.DEFAULT_ID;\r\n }\r\n if (!this.instances[instance.id]) {\r\n this.instances[instance.id] = instance;\r\n this.change.emit(instance.id);\r\n }\r\n else {\r\n var changed = this.updateInstance(instance);\r\n if (changed) {\r\n this.change.emit(instance.id);\r\n }\r\n }\r\n };\r\n /**\r\n * Check each property of the instance and update any that have changed. Return\r\n * true if any changes were made, else return false.\r\n */\r\n PaginationService.prototype.updateInstance = function (instance) {\r\n var changed = false;\r\n for (var prop in this.instances[instance.id]) {\r\n if (instance[prop] !== this.instances[instance.id][prop]) {\r\n this.instances[instance.id][prop] = instance[prop];\r\n changed = true;\r\n }\r\n }\r\n return changed;\r\n };\r\n /**\r\n * Returns the current page number.\r\n */\r\n PaginationService.prototype.getCurrentPage = function (id) {\r\n if (this.instances[id]) {\r\n return this.instances[id].currentPage;\r\n }\r\n };\r\n /**\r\n * Sets the current page number.\r\n */\r\n PaginationService.prototype.setCurrentPage = function (id, page) {\r\n if (this.instances[id]) {\r\n var instance = this.instances[id];\r\n var maxPage = Math.ceil(instance.totalItems / instance.itemsPerPage);\r\n if (page <= maxPage && 1 <= page) {\r\n this.instances[id].currentPage = page;\r\n this.change.emit(id);\r\n }\r\n }\r\n };\r\n /**\r\n * Sets the value of instance.totalItems\r\n */\r\n PaginationService.prototype.setTotalItems = function (id, totalItems) {\r\n if (this.instances[id] && 0 <= totalItems) {\r\n this.instances[id].totalItems = totalItems;\r\n this.change.emit(id);\r\n }\r\n };\r\n /**\r\n * Sets the value of instance.itemsPerPage.\r\n */\r\n PaginationService.prototype.setItemsPerPage = function (id, itemsPerPage) {\r\n if (this.instances[id]) {\r\n this.instances[id].itemsPerPage = itemsPerPage;\r\n this.change.emit(id);\r\n }\r\n };\r\n /**\r\n * Returns a clone of the pagination instance object matching the id. If no\r\n * id specified, returns the instance corresponding to the default id.\r\n */\r\n PaginationService.prototype.getInstance = function (id) {\r\n if (id === void 0) { id = this.DEFAULT_ID; }\r\n if (this.instances[id]) {\r\n return this.clone(this.instances[id]);\r\n }\r\n return {};\r\n };\r\n /**\r\n * Perform a shallow clone of an object.\r\n */\r\n PaginationService.prototype.clone = function (obj) {\r\n var target = {};\r\n for (var i in obj) {\r\n if (obj.hasOwnProperty(i)) {\r\n target[i] = obj[i];\r\n }\r\n }\r\n return target;\r\n };\r\n return PaginationService;\r\n}());\n\nvar LARGE_NUMBER = Number.MAX_SAFE_INTEGER;\r\nvar PaginatePipe = (function () {\r\n function PaginatePipe(service) {\r\n this.service = service;\r\n // store the values from the last time the pipe was invoked\r\n this.state = {};\r\n }\r\n PaginatePipe.prototype.transform = function (collection, args) {\r\n // When an observable is passed through the AsyncPipe, it will output\r\n // `null` until the subscription resolves. In this case, we want to\r\n // use the cached data from the `state` object to prevent the NgFor\r\n // from flashing empty until the real values arrive.\r\n if (args instanceof Array) {\r\n // compatible with angular2 before beta16\r\n args = args[0];\r\n }\r\n if (!(collection instanceof Array)) {\r\n var _id = args.id || this.service.defaultId;\r\n if (this.state[_id]) {\r\n return this.state[_id].slice;\r\n }\r\n else {\r\n return collection;\r\n }\r\n }\r\n var serverSideMode = args.totalItems && args.totalItems !== collection.length;\r\n var instance = this.createInstance(collection, args);\r\n var id = instance.id;\r\n var start, end;\r\n var perPage = instance.itemsPerPage;\r\n this.service.register(instance);\r\n if (!serverSideMode && collection instanceof Array) {\r\n perPage = +perPage || LARGE_NUMBER;\r\n start = (instance.currentPage - 1) * perPage;\r\n end = start + perPage;\r\n var isIdentical = this.stateIsIdentical(id, collection, start, end);\r\n if (isIdentical) {\r\n return this.state[id].slice;\r\n }\r\n else {\r\n var slice = collection.slice(start, end);\r\n this.saveState(id, collection, slice, start, end);\r\n this.service.change.emit(id);\r\n return slice;\r\n }\r\n }\r\n // save the state for server-side collection to avoid null\r\n // flash as new data loads.\r\n this.saveState(id, collection, collection, start, end);\r\n return collection;\r\n };\r\n /**\r\n * Create an PaginationInstance object, using defaults for any optional properties not supplied.\r\n */\r\n PaginatePipe.prototype.createInstance = function (collection, args) {\r\n var config = args;\r\n this.checkConfig(config);\r\n return {\r\n id: config.id != null ? config.id : this.service.defaultId(),\r\n itemsPerPage: +config.itemsPerPage || 0,\r\n currentPage: +config.currentPage || 1,\r\n totalItems: +config.totalItems || collection.length\r\n };\r\n };\r\n /**\r\n * Ensure the argument passed to the filter contains the required properties.\r\n */\r\n PaginatePipe.prototype.checkConfig = function (config) {\r\n var required = ['itemsPerPage', 'currentPage'];\r\n var missing = required.filter(function (prop) { return !(prop in config); });\r\n if (0 < missing.length) {\r\n throw new Error(\"PaginatePipe: Argument is missing the following required properties: \" + missing.join(', '));\r\n }\r\n };\r\n /**\r\n * To avoid returning a brand new array each time the pipe is run, we store the state of the sliced\r\n * array for a given id. This means that the next time the pipe is run on this collection & id, we just\r\n * need to check that the collection, start and end points are all identical, and if so, return the\r\n * last sliced array.\r\n */\r\n PaginatePipe.prototype.saveState = function (id, collection, slice, start, end) {\r\n this.state[id] = {\r\n collection: collection,\r\n size: collection.length,\r\n slice: slice,\r\n start: start,\r\n end: end\r\n };\r\n };\r\n /**\r\n * For a given id, returns true if the collection, size, start and end values are identical.\r\n */\r\n PaginatePipe.prototype.stateIsIdentical = function (id, collection, start, end) {\r\n var state = this.state[id];\r\n if (!state) {\r\n return false;\r\n }\r\n var isMetaDataIdentical = state.size === collection.length &&\r\n state.start === start &&\r\n state.end === end;\r\n if (!isMetaDataIdentical) {\r\n return false;\r\n }\r\n return state.slice.every(function (element, index) { return element === collection[start + index]; });\r\n };\r\n PaginatePipe.decorators = [\r\n { type: Pipe, args: [{\r\n name: 'paginate',\r\n pure: false\r\n },] },\r\n ];\r\n /** @nocollapse */\r\n PaginatePipe.ctorParameters = function () { return [\r\n { type: PaginationService, },\r\n ]; };\r\n return PaginatePipe;\r\n}());\n\n/**\r\n * The default template and styles for the pagination links are borrowed directly\r\n * from Zurb Foundation 6: http://foundation.zurb.com/sites/docs/pagination.html\r\n */\r\nvar DEFAULT_TEMPLATE = \"\\n <pagination-template #p=\\\"paginationApi\\\"\\n [id]=\\\"id\\\"\\n [maxSize]=\\\"maxSize\\\"\\n (pageChange)=\\\"pageChange.emit($event)\\\">\\n <ul class=\\\"ngx-pagination\\\" \\n role=\\\"navigation\\\" \\n [attr.aria-label]=\\\"screenReaderPaginationLabel\\\" \\n [class.responsive]=\\\"responsive\\\"\\n *ngIf=\\\"!(autoHide && p.pages.length <= 1)\\\">\\n\\n <li class=\\\"pagination-previous\\\" [class.disabled]=\\\"p.isFirstPage()\\\" *ngIf=\\\"directionLinks\\\"> \\n <a tabindex=\\\"0\\\" *ngIf=\\\"1 < p.getCurrent()\\\" (keyup.enter)=\\\"p.previous()\\\" (click)=\\\"p.previous()\\\" [attr.aria-label]=\\\"previousLabel + ' ' + screenReaderPageLabel\\\">\\n {{ previousLabel }} <span class=\\\"show-for-sr\\\">{{ screenReaderPageLabel }}</span>\\n </a>\\n <span *ngIf=\\\"p.isFirstPage()\\\">\\n {{ previousLabel }} <span class=\\\"show-for-sr\\\">{{ screenReaderPageLabel }}</span>\\n </span>\\n </li> \\n\\n <li class=\\\"small-screen\\\">\\n {{ p.getCurrent() }} / {{ p.getLastPage() }}\\n </li>\\n\\n <li [class.current]=\\\"p.getCurrent() === page.value\\\" \\n [class.ellipsis]=\\\"page.label === '...'\\\"\\n *ngFor=\\\"let page of p.pages\\\">\\n <a tabindex=\\\"0\\\" (keyup.enter)=\\\"p.setCurrent(page.value)\\\" (click)=\\\"p.setCurrent(page.value)\\\" *ngIf=\\\"p.getCurrent() !== page.value\\\">\\n <span class=\\\"show-for-sr\\\">{{ screenReaderPageLabel }} </span>\\n <span>{{ page.label }}</span>\\n </a>\\n <ng-container *ngIf=\\\"p.getCurrent() === page.value\\\">\\n <span class=\\\"show-for-sr\\\">{{ screenReaderCurrentLabel }} </span>\\n <span>{{ page.label }}</span> \\n </ng-container>\\n </li>\\n\\n <li class=\\\"pagination-next\\\" [class.disabled]=\\\"p.isLastPage()\\\" *ngIf=\\\"directionLinks\\\">\\n <a tabindex=\\\"0\\\" *ngIf=\\\"!p.isLastPage()\\\" (keyup.enter)=\\\"p.next()\\\" (click)=\\\"p.next()\\\" [attr.aria-label]=\\\"nextLabel + ' ' + screenReaderPageLabel\\\">\\n {{ nextLabel }} <span class=\\\"show-for-sr\\\">{{ screenReaderPageLabel }}</span>\\n </a>\\n <span *ngIf=\\\"p.isLastPage()\\\">\\n {{ nextLabel }} <span class=\\\"show-for-sr\\\">{{ screenReaderPageLabel }}</span>\\n </span>\\n </li>\\n\\n </ul>\\n </pagination-template>\\n \";\r\nvar DEFAULT_STYLES = \"\\n.ngx-pagination {\\n margin-left: 0;\\n margin-bottom: 1rem; }\\n .ngx-pagination::before, .ngx-pagination::after {\\n content: ' ';\\n display: table; }\\n .ngx-pagination::after {\\n clear: both; }\\n .ngx-pagination li {\\n -moz-user-select: none;\\n -webkit-user-select: none;\\n -ms-user-select: none;\\n margin-right: 0.0625rem;\\n border-radius: 0; }\\n .ngx-pagination li {\\n display: inline-block; }\\n .ngx-pagination a,\\n .ngx-pagination button {\\n color: #0a0a0a; \\n display: block;\\n padding: 0.1875rem 0.625rem;\\n border-radius: 0; }\\n .ngx-pagination a:hover,\\n .ngx-pagination button:hover {\\n background: #e6e6e6; }\\n .ngx-pagination .current {\\n padding: 0.1875rem 0.625rem;\\n background: #2199e8;\\n color: #fefefe;\\n cursor: default; }\\n .ngx-pagination .disabled {\\n padding: 0.1875rem 0.625rem;\\n color: #cacaca;\\n cursor: default; } \\n .ngx-pagination .disabled:hover {\\n background: transparent; }\\n .ngx-pagination a, .ngx-pagination button {\\n cursor: pointer; }\\n\\n.ngx-pagination .pagination-previous a::before,\\n.ngx-pagination .pagination-previous.disabled::before { \\n content: '\\u00AB';\\n display: inline-block;\\n margin-right: 0.5rem; }\\n\\n.ngx-pagination .pagination-next a::after,\\n.ngx-pagination .pagination-next.disabled::after {\\n content: '\\u00BB';\\n display: inline-block;\\n margin-left: 0.5rem; }\\n\\n.ngx-pagination .show-for-sr {\\n position: absolute !important;\\n width: 1px;\\n height: 1px;\\n overflow: hidden;\\n clip: rect(0, 0, 0, 0); }\\n.ngx-pagination .small-screen {\\n display: none; }\\n@media screen and (max-width: 601px) {\\n .ngx-pagination.responsive .small-screen {\\n display: inline-block; } \\n .ngx-pagination.responsive li:not(.small-screen):not(.pagination-previous):not(.pagination-next) {\\n display: none; }\\n}\\n \";\n\nfunction coerceToBoolean(input) {\r\n return !!input && input !== 'false';\r\n}\r\n/**\r\n * The default pagination controls component. Actually just a default implementation of a custom template.\r\n */\r\nvar PaginationControlsComponent = (function () {\r\n function PaginationControlsComponent() {\r\n this.maxSize = 7;\r\n this.previousLabel = 'Previous';\r\n this.nextLabel = 'Next';\r\n this.screenReaderPaginationLabel = 'Pagination';\r\n this.screenReaderPageLabel = 'page';\r\n this.screenReaderCurrentLabel = \"You're on page\";\r\n this.pageChange = new EventEmitter();\r\n this._directionLinks = true;\r\n this._autoHide = false;\r\n this._responsive = false;\r\n }\r\n Object.defineProperty(PaginationControlsComponent.prototype, \"directionLinks\", {\r\n get: function () {\r\n return this._directionLinks;\r\n },\r\n set: function (value) {\r\n this._directionLinks = coerceToBoolean(value);\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(PaginationControlsComponent.prototype, \"autoHide\", {\r\n get: function () {\r\n return this._autoHide;\r\n },\r\n set: function (value) {\r\n this._autoHide = coerceToBoolean(value);\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(PaginationControlsComponent.prototype, \"responsive\", {\r\n get: function () {\r\n return this._responsive;\r\n },\r\n set: function (value) {\r\n this._responsive = coerceToBoolean(value);\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n PaginationControlsComponent.decorators = [\r\n { type: Component, args: [{\r\n selector: 'pagination-controls',\r\n template: DEFAULT_TEMPLATE,\r\n styles: [DEFAULT_STYLES],\r\n changeDetection: ChangeDetectionStrategy.OnPush,\r\n encapsulation: ViewEncapsulation.None\r\n },] },\r\n ];\r\n /** @nocollapse */\r\n PaginationControlsComponent.ctorParameters = function () { return []; };\r\n PaginationControlsComponent.propDecorators = {\r\n 'id': [{ type: Input },],\r\n 'maxSize': [{ type: Input },],\r\n 'directionLinks': [{ type: Input },],\r\n 'autoHide': [{ type: Input },],\r\n 'responsive': [{ type: Input },],\r\n 'previousLabel': [{ type: Input },],\r\n 'nextLabel': [{ type: Input },],\r\n 'screenReaderPaginationLabel': [{ type: Input },],\r\n 'screenReaderPageLabel': [{ type: Input },],\r\n 'screenReaderCurrentLabel': [{ type: Input },],\r\n 'pageChange': [{ type: Output },],\r\n };\r\n return PaginationControlsComponent;\r\n}());\n\n/**\r\n * This directive is what powers all pagination controls components, including the default one.\r\n * It exposes an API which is hooked up to the PaginationService to keep the PaginatePipe in sync\r\n * with the pagination controls.\r\n */\r\nvar PaginationControlsDirective = (function () {\r\n function PaginationControlsDirective(service, changeDetectorRef) {\r\n var _this = this;\r\n this.service = service;\r\n this.changeDetectorRef = changeDetectorRef;\r\n this.maxSize = 7;\r\n this.pageChange = new EventEmitter();\r\n this.pages = [];\r\n this.changeSub = this.service.change\r\n .subscribe(function (id) {\r\n if (_this.id === id) {\r\n _this.updatePageLinks();\r\n _this.changeDetectorRef.markForCheck();\r\n _this.changeDetectorRef.detectChanges();\r\n }\r\n });\r\n }\r\n PaginationControlsDirective.prototype.ngOnInit = function () {\r\n if (this.id === undefined) {\r\n this.id = this.service.defaultId();\r\n }\r\n this.updatePageLinks();\r\n };\r\n PaginationControlsDirective.prototype.ngOnChanges = function (changes) {\r\n this.updatePageLinks();\r\n };\r\n PaginationControlsDirective.prototype.ngOnDestroy = function () {\r\n this.changeSub.unsubscribe();\r\n };\r\n /**\r\n * Go to the previous page\r\n */\r\n PaginationControlsDirective.prototype.previous = function () {\r\n this.checkValidId();\r\n this.setCurrent(this.getCurrent() - 1);\r\n };\r\n /**\r\n * Go to the next page\r\n */\r\n PaginationControlsDirective.prototype.next = function () {\r\n this.checkValidId();\r\n this.setCurrent(this.getCurrent() + 1);\r\n };\r\n /**\r\n * Returns true if current page is first page\r\n */\r\n PaginationControlsDirective.prototype.isFirstPage = function () {\r\n return this.getCurrent() === 1;\r\n };\r\n /**\r\n * Returns true if current page is last page\r\n */\r\n PaginationControlsDirective.prototype.isLastPage = function () {\r\n return this.getLastPage() === this.getCurrent();\r\n };\r\n /**\r\n * Set the current page number.\r\n */\r\n PaginationControlsDirective.prototype.setCurrent = function (page) {\r\n this.pageChange.emit(page);\r\n };\r\n /**\r\n * Get the current page number.\r\n */\r\n PaginationControlsDirective.prototype.getCurrent = function () {\r\n return this.service.getCurrentPage(this.id);\r\n };\r\n /**\r\n * Returns the last page number\r\n */\r\n PaginationControlsDirective.prototype.getLastPage = function () {\r\n var inst = this.service.getInstance(this.id);\r\n if (inst.totalItems < 1) {\r\n // when there are 0 or fewer (an error case) items, there are no \"pages\" as such,\r\n // but it makes sense to consider a single, empty page as the last page.\r\n return 1;\r\n }\r\n return Math.ceil(inst.totalItems / inst.itemsPerPage);\r\n };\r\n PaginationControlsDirective.prototype.getTotalItems = function () {\r\n return this.service.getInstance(this.id).totalItems;\r\n };\r\n PaginationControlsDirective.prototype.checkValidId = function () {\r\n if (this.service.getInstance(this.id).id == null) {\r\n console.warn(\"PaginationControlsDirective: the specified id \\\"\" + this.id + \"\\\" does not match any registered PaginationInstance\");\r\n }\r\n };\r\n /**\r\n * Updates the page links and checks that the current page is valid. Should run whenever the\r\n * PaginationService.change stream emits a value matching the current ID, or when any of the\r\n * input values changes.\r\n */\r\n PaginationControlsDirective.prototype.updatePageLinks = function () {\r\n var _this = this;\r\n var inst = this.service.getInstance(this.id);\r\n var correctedCurrentPage = this.outOfBoundCorrection(inst);\r\n if (correctedCurrentPage !== inst.currentPage) {\r\n setTimeout(function () {\r\n _this.setCurrent(correctedCurrentPage);\r\n _this.pages = _this.createPageArray(inst.currentPage, inst.itemsPerPage, inst.totalItems, _this.maxSize);\r\n });\r\n }\r\n else {\r\n this.pages = this.createPageArray(inst.currentPage, inst.itemsPerPage, inst.totalItems, this.maxSize);\r\n }\r\n };\r\n /**\r\n * Checks that the instance.currentPage property is within bounds for the current page range.\r\n * If not, return a correct value for currentPage, or the current value if OK.\r\n */\r\n PaginationControlsDirective.prototype.outOfBoundCorrection = function (instance) {\r\n var totalPages = Math.ceil(instance.totalItems / instance.itemsPerPage);\r\n if (totalPages < instance.currentPage && 0 < totalPages) {\r\n return totalPages;\r\n }\r\n else if (instance.currentPage < 1) {\r\n return 1;\r\n }\r\n return instance.currentPage;\r\n };\r\n /**\r\n * Returns an array of Page objects to use in the pagination controls.\r\n */\r\n PaginationControlsDirective.prototype.createPageArray = function (currentPage, itemsPerPage, totalItems, paginationRange) {\r\n // paginationRange could be a string if passed from attribute, so cast to number.\r\n paginationRange = +paginationRange;\r\n var pages = [];\r\n var totalPages = Math.ceil(totalItems / itemsPerPage);\r\n var halfWay = Math.ceil(paginationRange / 2);\r\n var isStart = currentPage <= halfWay;\r\n var isEnd = totalPages - halfWay < currentPage;\r\n var isMiddle = !isStart && !isEnd;\r\n var ellipsesNeeded = paginationRange < totalPages;\r\n var i = 1;\r\n while (i <= totalPages && i <= paginationRange) {\r\n var label = void 0;\r\n var pageNumber = this.calculatePageNumber(i, currentPage, paginationRange, totalPages);\r\n var openingEllipsesNeeded = (i === 2 && (isMiddle || isEnd));\r\n var closingEllipsesNeeded = (i === paginationRange - 1 && (isMiddle || isStart));\r\n if (ellipsesNeeded && (openingEllipsesNeeded || closingEllipsesNeeded)) {\r\n label = '...';\r\n }\r\n else {\r\n label = pageNumber;\r\n }\r\n pages.push({\r\n label: label,\r\n value: pageNumber\r\n });\r\n i++;\r\n }\r\n return pages;\r\n };\r\n /**\r\n * Given the position in the sequence of pagination links [i],\r\n * figure out what page number corresponds to that position.\r\n */\r\n PaginationControlsDirective.prototype.calculatePageNumber = function (i, currentPage, paginationRange, totalPages) {\r\n var halfWay = Math.ceil(paginationRange / 2);\r\n if (i === paginationRange) {\r\n return totalPages;\r\n }\r\n else if (i === 1) {\r\n return i;\r\n }\r\n else if (paginationRange < totalPages) {\r\n if (totalPages - halfWay < currentPage) {\r\n return totalPages - paginationRange + i;\r\n }\r\n else if (halfWay < currentPage) {\r\n return currentPage - halfWay + i;\r\n }\r\n else {\r\n return i;\r\n }\r\n }\r\n else {\r\n return i;\r\n }\r\n };\r\n PaginationControlsDirective.decorators = [\r\n { type: Directive, args: [{\r\n selector: 'pagination-template,[pagination-template]',\r\n exportAs: 'paginationApi'\r\n },] },\r\n ];\r\n /** @nocollapse */\r\n PaginationControlsDirective.ctorParameters = function () { return [\r\n { type: PaginationService, },\r\n { type: ChangeDetectorRef, },\r\n ]; };\r\n PaginationControlsDirective.propDecorators = {\r\n 'id': [{ type: Input },],\r\n 'maxSize': [{ type: Input },],\r\n 'pageChange': [{ type: Output },],\r\n };\r\n return PaginationControlsDirective;\r\n}());\n\nvar NgxPaginationModule = (function () {\r\n function NgxPaginationModule() {\r\n }\r\n NgxPaginationModule.decorators = [\r\n { type: NgModule, args: [{\r\n imports: [CommonModule],\r\n declarations: [\r\n PaginatePipe,\r\n PaginationControlsComponent,\r\n PaginationControlsDirective\r\n ],\r\n providers: [PaginationService],\r\n exports: [PaginatePipe, PaginationControlsComponent, PaginationControlsDirective]\r\n },] },\r\n ];\r\n /** @nocollapse */\r\n NgxPaginationModule.ctorParameters = function () { return []; };\r\n return NgxPaginationModule;\r\n}());\n\n/**\r\n * Generated bundle index. Do not edit.\r\n */\n\nexport { DEFAULT_STYLES as ɵb, DEFAULT_TEMPLATE as ɵa, NgxPaginationModule, PaginationService, PaginationControlsComponent, PaginationControlsDirective, PaginatePipe };\n","import { Observable } from 'rxjs';\nimport { __assign } from 'tslib';\nimport { Injectable, NgModule, defineInjectable, Component, ElementRef, Input } from '@angular/core';\n\n/**\n * @fileoverview added by tsickle\n * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc\n */\nvar NgxTwitterTimelineService = /** @class */ (function () {\n function NgxTwitterTimelineService() {\n this.TWITTER_SCRIPT_ID = 'twitter-wjs';\n this.TWITTER_WIDGET_URL = 'https://platform.twitter.com/widgets.js';\n }\n /**\n * @return {?}\n */\n NgxTwitterTimelineService.prototype.loadScript = /**\n * @return {?}\n */\n function () {\n var _this = this;\n return Observable.create((/**\n * @param {?} observer\n * @return {?}\n */\n function (observer) {\n _this.startScriptLoad();\n window['twttr'].ready((/**\n * @param {?} twttr\n * @return {?}\n */\n function (twttr) {\n observer.next(twttr);\n observer.complete();\n }));\n }));\n };\n /**\n * @private\n * @return {?}\n */\n NgxTwitterTimelineService.prototype.startScriptLoad = /**\n * @private\n * @return {?}\n */\n function () {\n window['twttr'] = ((/**\n * @param {?} d\n * @param {?} s\n * @param {?} id\n * @param {?} url\n * @return {?}\n */\n function (d, s, id, url) {\n /** @type {?} */\n var script;\n /** @type {?} */\n var firstScriptEl = d.getElementsByTagName(s)[0];\n /** @type {?} */\n var twitterScript = window['twttr'] || {};\n if (d.getElementById(id)) {\n return twitterScript;\n }\n script = d.createElement(s);\n script.id = id;\n script.src = url;\n firstScriptEl.parentNode.insertBefore(script, firstScriptEl);\n twitterScript._e = [];\n twitterScript.ready = (/**\n * @param {?} f\n * @return {?}\n */\n function (f) {\n twitterScript._e.push(f);\n });\n return twitterScript;\n })(document, 'script', this.TWITTER_SCRIPT_ID, this.TWITTER_WIDGET_URL));\n };\n NgxTwitterTimelineService.decorators = [\n { type: Injectable, args: [{\n providedIn: 'root'\n },] }\n ];\n /** @nocollapse */\n NgxTwitterTimelineService.ctorParameters = function () { return []; };\n /** @nocollapse */ NgxTwitterTimelineService.ngInjectableDef = defineInjectable({ factory: function NgxTwitterTimelineService_Factory() { return new NgxTwitterTimelineService(); }, token: NgxTwitterTimelineService, providedIn: \"root\" });\n return NgxTwitterTimelineService;\n}());\n\n/**\n * @fileoverview added by tsickle\n * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc\n */\nvar NgxTwitterTimelineComponent = /** @class */ (function () {\n function NgxTwitterTimelineComponent(element, twitterTimelineService) {\n this.element = element;\n this.twitterTimelineService = twitterTimelineService;\n this.defaultOpts = {\n tweetLimit: 5\n };\n this.defaultData = {\n sourceType: 'url',\n url: 'https://twitter.com/twitterdev',\n screenName: 'twitterdev'\n };\n }\n /**\n * @return {?}\n */\n NgxTwitterTimelineComponent.prototype.ngOnChanges = /**\n * @return {?}\n */\n function () {\n if (this.data && this.data.sourceType) {\n switch (this.data.sourceType) {\n case 'url':\n delete this.defaultData.screenName;\n break;\n case 'profile':\n delete this.defaultData.url;\n break;\n default:\n break;\n }\n this.loadTwitterWidget();\n }\n };\n /**\n * @return {?}\n */\n NgxTwitterTimelineComponent.prototype.loadTwitterWidget = /**\n * @return {?}\n */\n function () {\n var _this = this;\n this.twitterTimelineService\n .loadScript()\n .subscribe((/**\n * @param {?} twttr\n * @return {?}\n */\n function (twttr) {\n /** @type {?} */\n var nativeElement = _this.element.nativeElement;\n nativeElement.innerHTML = \"\";\n window['twttr']\n .widgets\n .createTimeline(__assign({}, _this.defaultData, _this.data), nativeElement, __assign({}, _this.defaultOpts, _this.opts))\n .then((/**\n * @param {?} embed\n * @return {?}\n */\n function (embed) {\n // console.log(embed);\n }))\n .catch((/**\n * @param {?} error\n * @return {?}\n */\n function (error) { return console.error(error); }));\n }), (/**\n * @param {?} err\n * @return {?}\n */\n function (err) { return console.error(err); }));\n };\n NgxTwitterTimelineComponent.decorators = [\n { type: Component, args: [{\n selector: 'ngx-twitter-timeline',\n template: \"\"\n }] }\n ];\n /** @nocollapse */\n NgxTwitterTimelineComponent.ctorParameters = function () { return [\n { type: ElementRef },\n { type: NgxTwitterTimelineService }\n ]; };\n NgxTwitterTimelineComponent.propDecorators = {\n data: [{ type: Input }],\n opts: [{ type: Input }]\n };\n return NgxTwitterTimelineComponent;\n}());\n\n/**\n * @fileoverview added by tsickle\n * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc\n */\nvar NgxTwitterTimelineModule = /** @class */ (function () {\n function NgxTwitterTimelineModule() {\n }\n NgxTwitterTimelineModule.decorators = [\n { type: NgModule, args: [{\n declarations: [NgxTwitterTimelineComponent],\n imports: [],\n exports: [NgxTwitterTimelineComponent]\n },] }\n ];\n return NgxTwitterTimelineModule;\n}());\n\n/**\n * @fileoverview added by tsickle\n * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc\n */\n\n/**\n * @fileoverview added by tsickle\n * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc\n */\n\nexport { NgxTwitterTimelineService, NgxTwitterTimelineComponent, NgxTwitterTimelineModule };\n\n//# sourceMappingURL=ngx-twitter-timeline.js.map","/*!\n * PEP v0.5.1 | https://github.com/jquery/PEP\n * Copyright jQuery Foundation and other contributors | http://jquery.org/license\n */\n\n(function (global, factory) {\n typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :\n typeof define === 'function' && define.amd ? define(factory) :\n (global.PointerEventsPolyfill = factory());\n}(this, function () { 'use strict';\n\n /**\n * This is the constructor for new PointerEvents.\n *\n * New Pointer Events must be given a type, and an optional dictionary of\n * initialization properties.\n *\n * Due to certain platform requirements, events returned from the constructor\n * identify as MouseEvents.\n *\n * @constructor\n * @param {String} inType The type of the event to create.\n * @param {Object} [inDict] An optional dictionary of initial event properties.\n * @return {Event} A new PointerEvent of type `inType`, initialized with properties from `inDict`.\n */\n var MOUSE_PROPS = [\n 'bubbles',\n 'cancelable',\n 'view',\n 'screenX',\n 'screenY',\n 'clientX',\n 'clientY',\n 'ctrlKey',\n 'altKey',\n 'shiftKey',\n 'metaKey',\n 'button',\n 'relatedTarget',\n 'pageX',\n 'pageY'\n ];\n\n var MOUSE_DEFAULTS = [\n false,\n false,\n null,\n 0,\n 0,\n 0,\n 0,\n false,\n false,\n false,\n false,\n 0,\n null,\n 0,\n 0\n ];\n\n function PointerEvent(inType, inDict) {\n inDict = inDict || Object.create(null);\n\n var e = document.createEvent('Event');\n e.initEvent(inType, inDict.bubbles || false, inDict.cancelable || false);\n\n // define inherited MouseEvent properties\n // skip bubbles and cancelable since they're set above in initEvent()\n for (var i = 2, p; i < MOUSE_PROPS.length; i++) {\n p = MOUSE_PROPS[i];\n e[p] = inDict[p] || MOUSE_DEFAULTS[i];\n }\n e.buttons = inDict.buttons || 0;\n\n // Spec requires that pointers without pressure specified use 0.5 for down\n // state and 0 for up state.\n var pressure = 0;\n\n if (inDict.pressure !== undefined && e.buttons) {\n pressure = inDict.pressure;\n } else {\n pressure = e.buttons ? 0.5 : 0;\n }\n\n // add x/y properties aliased to clientX/Y\n e.x = e.clientX;\n e.y = e.clientY;\n\n // define the properties of the PointerEvent interface\n e.pointerId = inDict.pointerId || 0;\n e.width = inDict.width || 1;\n e.height = inDict.height || 1;\n e.pressure = pressure;\n e.tiltX = inDict.tiltX || 0;\n e.tiltY = inDict.tiltY || 0;\n e.twist = inDict.twist || 0;\n e.tangentialPressure = inDict.tangentialPressure || 0;\n e.pointerType = inDict.pointerType || '';\n e.hwTimestamp = inDict.hwTimestamp || 0;\n e.isPrimary = inDict.isPrimary || false;\n e.detail = 0;\n return e;\n }\n\n /**\n * This module implements a map of pointer states\n */\n var USE_MAP = window.Map && window.Map.prototype.forEach;\n var PointerMap = USE_MAP ? Map : SparseArrayMap;\n\n function SparseArrayMap() {\n this.array = [];\n this.size = 0;\n }\n\n SparseArrayMap.prototype = {\n set: function(k, v) {\n if (v === undefined) {\n return this.delete(k);\n }\n if (!this.has(k)) {\n this.size++;\n }\n this.array[k] = v;\n },\n has: function(k) {\n return this.array[k] !== undefined;\n },\n delete: function(k) {\n if (this.has(k)) {\n delete this.array[k];\n this.size--;\n }\n },\n get: function(k) {\n return this.array[k];\n },\n clear: function() {\n this.array.length = 0;\n this.size = 0;\n },\n\n // return value, key, map\n forEach: function(callback, thisArg) {\n return this.array.forEach(function(v, k) {\n callback.call(thisArg, v, k, this);\n }, this);\n }\n };\n\n var CLONE_PROPS = [\n\n // MouseEvent\n 'bubbles',\n 'cancelable',\n 'view',\n 'detail',\n 'screenX',\n 'screenY',\n 'clientX',\n 'clientY',\n 'ctrlKey',\n 'altKey',\n 'shiftKey',\n 'metaKey',\n 'button',\n 'relatedTarget',\n\n // DOM Level 3\n 'buttons',\n\n // PointerEvent\n 'pointerId',\n 'width',\n 'height',\n 'pressure',\n 'tiltX',\n 'tiltY',\n 'pointerType',\n 'hwTimestamp',\n 'isPrimary',\n\n // event instance\n 'type',\n 'target',\n 'currentTarget',\n 'which',\n 'pageX',\n 'pageY',\n 'timeStamp'\n ];\n\n var CLONE_DEFAULTS = [\n\n // MouseEvent\n false,\n false,\n null,\n null,\n 0,\n 0,\n 0,\n 0,\n false,\n false,\n false,\n false,\n 0,\n null,\n\n // DOM Level 3\n 0,\n\n // PointerEvent\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n '',\n 0,\n false,\n\n // event instance\n '',\n null,\n null,\n 0,\n 0,\n 0,\n 0\n ];\n\n var BOUNDARY_EVENTS = {\n 'pointerover': 1,\n 'pointerout': 1,\n 'pointerenter': 1,\n 'pointerleave': 1\n };\n\n var HAS_SVG_INSTANCE = (typeof SVGElementInstance !== 'undefined');\n\n /**\n * This module is for normalizing events. Mouse and Touch events will be\n * collected here, and fire PointerEvents that have the same semantics, no\n * matter the source.\n * Events fired:\n * - pointerdown: a pointing is added\n * - pointerup: a pointer is removed\n * - pointermove: a pointer is moved\n * - pointerover: a pointer crosses into an element\n * - pointerout: a pointer leaves an element\n * - pointercancel: a pointer will no longer generate events\n */\n var dispatcher = {\n pointermap: new PointerMap(),\n eventMap: Object.create(null),\n captureInfo: Object.create(null),\n\n // Scope objects for native events.\n // This exists for ease of testing.\n eventSources: Object.create(null),\n eventSourceList: [],\n /**\n * Add a new event source that will generate pointer events.\n *\n * `inSource` must contain an array of event names named `events`, and\n * functions with the names specified in the `events` array.\n * @param {string} name A name for the event source\n * @param {Object} source A new source of platform events.\n */\n registerSource: function(name, source) {\n var s = source;\n var newEvents = s.events;\n if (newEvents) {\n newEvents.forEach(function(e) {\n if (s[e]) {\n this.eventMap[e] = s[e].bind(s);\n }\n }, this);\n this.eventSources[name] = s;\n this.eventSourceList.push(s);\n }\n },\n register: function(element) {\n var l = this.eventSourceList.length;\n for (var i = 0, es; (i < l) && (es = this.eventSourceList[i]); i++) {\n\n // call eventsource register\n es.register.call(es, element);\n }\n },\n unregister: function(element) {\n var l = this.eventSourceList.length;\n for (var i = 0, es; (i < l) && (es = this.eventSourceList[i]); i++) {\n\n // call eventsource register\n es.unregister.call(es, element);\n }\n },\n contains: /*scope.external.contains || */function(container, contained) {\n try {\n return container.contains(contained);\n } catch (ex) {\n\n // most likely: https://bugzilla.mozilla.org/show_bug.cgi?id=208427\n return false;\n }\n },\n\n // EVENTS\n down: function(inEvent) {\n inEvent.bubbles = true;\n this.fireEvent('pointerdown', inEvent);\n },\n move: function(inEvent) {\n inEvent.bubbles = true;\n this.fireEvent('pointermove', inEvent);\n },\n up: function(inEvent) {\n inEvent.bubbles = true;\n this.fireEvent('pointerup', inEvent);\n },\n enter: function(inEvent) {\n inEvent.bubbles = false;\n this.fireEvent('pointerenter', inEvent);\n },\n leave: function(inEvent) {\n inEvent.bubbles = false;\n this.fireEvent('pointerleave', inEvent);\n },\n over: function(inEvent) {\n inEvent.bubbles = true;\n this.fireEvent('pointerover', inEvent);\n },\n out: function(inEvent) {\n inEvent.bubbles = true;\n this.fireEvent('pointerout', inEvent);\n },\n cancel: function(inEvent) {\n inEvent.bubbles = true;\n this.fireEvent('pointercancel', inEvent);\n },\n leaveOut: function(event) {\n this.out(event);\n this.propagate(event, this.leave, false);\n },\n enterOver: function(event) {\n this.over(event);\n this.propagate(event, this.enter, true);\n },\n\n // LISTENER LOGIC\n eventHandler: function(inEvent) {\n\n // This is used to prevent multiple dispatch of pointerevents from\n // platform events. This can happen when two elements in different scopes\n // are set up to create pointer events, which is relevant to Shadow DOM.\n if (inEvent._handledByPE) {\n return;\n }\n var type = inEvent.type;\n var fn = this.eventMap && this.eventMap[type];\n if (fn) {\n fn(inEvent);\n }\n inEvent._handledByPE = true;\n },\n\n // set up event listeners\n listen: function(target, events) {\n events.forEach(function(e) {\n this.addEvent(target, e);\n }, this);\n },\n\n // remove event listeners\n unlisten: function(target, events) {\n events.forEach(function(e) {\n this.removeEvent(target, e);\n }, this);\n },\n addEvent: /*scope.external.addEvent || */function(target, eventName) {\n target.addEventListener(eventName, this.boundHandler);\n },\n removeEvent: /*scope.external.removeEvent || */function(target, eventName) {\n target.removeEventListener(eventName, this.boundHandler);\n },\n\n // EVENT CREATION AND TRACKING\n /**\n * Creates a new Event of type `inType`, based on the information in\n * `inEvent`.\n *\n * @param {string} inType A string representing the type of event to create\n * @param {Event} inEvent A platform event with a target\n * @return {Event} A PointerEvent of type `inType`\n */\n makeEvent: function(inType, inEvent) {\n\n // relatedTarget must be null if pointer is captured\n if (this.captureInfo[inEvent.pointerId]) {\n inEvent.relatedTarget = null;\n }\n var e = new PointerEvent(inType, inEvent);\n if (inEvent.preventDefault) {\n e.preventDefault = inEvent.preventDefault;\n }\n e._target = e._target || inEvent.target;\n return e;\n },\n\n // make and dispatch an event in one call\n fireEvent: function(inType, inEvent) {\n var e = this.makeEvent(inType, inEvent);\n return this.dispatchEvent(e);\n },\n /**\n * Returns a snapshot of inEvent, with writable properties.\n *\n * @param {Event} inEvent An event that contains properties to copy.\n * @return {Object} An object containing shallow copies of `inEvent`'s\n * properties.\n */\n cloneEvent: function(inEvent) {\n var eventCopy = Object.create(null);\n var p;\n for (var i = 0; i < CLONE_PROPS.length; i++) {\n p = CLONE_PROPS[i];\n eventCopy[p] = inEvent[p] || CLONE_DEFAULTS[i];\n\n // Work around SVGInstanceElement shadow tree\n // Return the <use> element that is represented by the instance for Safari, Chrome, IE.\n // This is the behavior implemented by Firefox.\n if (HAS_SVG_INSTANCE && (p === 'target' || p === 'relatedTarget')) {\n if (eventCopy[p] instanceof SVGElementInstance) {\n eventCopy[p] = eventCopy[p].correspondingUseElement;\n }\n }\n }\n\n // keep the semantics of preventDefault\n if (inEvent.preventDefault) {\n eventCopy.preventDefault = function() {\n inEvent.preventDefault();\n };\n }\n return eventCopy;\n },\n getTarget: function(inEvent) {\n var capture = this.captureInfo[inEvent.pointerId];\n if (!capture) {\n return inEvent._target;\n }\n if (inEvent._target === capture || !(inEvent.type in BOUNDARY_EVENTS)) {\n return capture;\n }\n },\n propagate: function(event, fn, propagateDown) {\n var target = event.target;\n var targets = [];\n\n // Order of conditions due to document.contains() missing in IE.\n while (target != null && target !== document && !target.contains(event.relatedTarget)) {\n targets.push(target);\n target = target.parentNode;\n\n // Touch: Do not propagate if node is detached.\n if (!target) {\n return;\n }\n }\n if (propagateDown) {\n targets.reverse();\n }\n targets.forEach(function(target) {\n event.target = target;\n fn.call(this, event);\n }, this);\n },\n setCapture: function(inPointerId, inTarget, skipDispatch) {\n if (this.captureInfo[inPointerId]) {\n this.releaseCapture(inPointerId, skipDispatch);\n }\n\n this.captureInfo[inPointerId] = inTarget;\n this.implicitRelease = this.releaseCapture.bind(this, inPointerId, skipDispatch);\n document.addEventListener('pointerup', this.implicitRelease);\n document.addEventListener('pointercancel', this.implicitRelease);\n\n var e = new PointerEvent('gotpointercapture', { bubbles: true });\n e.pointerId = inPointerId;\n e._target = inTarget;\n\n if (!skipDispatch) {\n this.asyncDispatchEvent(e);\n }\n },\n releaseCapture: function(inPointerId, skipDispatch) {\n var t = this.captureInfo[inPointerId];\n if (!t) {\n return;\n }\n\n this.captureInfo[inPointerId] = undefined;\n document.removeEventListener('pointerup', this.implicitRelease);\n document.removeEventListener('pointercancel', this.implicitRelease);\n\n var e = new PointerEvent('lostpointercapture', { bubbles: true });\n e.pointerId = inPointerId;\n e._target = t;\n\n if (!skipDispatch) {\n this.asyncDispatchEvent(e);\n }\n },\n /**\n * Dispatches the event to its target.\n *\n * @param {Event} inEvent The event to be dispatched.\n * @return {Boolean} True if an event handler returns true, false otherwise.\n */\n dispatchEvent: /*scope.external.dispatchEvent || */function(inEvent) {\n var t = this.getTarget(inEvent);\n if (t) {\n return t.dispatchEvent(inEvent);\n }\n },\n asyncDispatchEvent: function(inEvent) {\n requestAnimationFrame(this.dispatchEvent.bind(this, inEvent));\n }\n };\n dispatcher.boundHandler = dispatcher.eventHandler.bind(dispatcher);\n\n var targeting = {\n shadow: function(inEl) {\n if (inEl) {\n return inEl.shadowRoot || inEl.webkitShadowRoot;\n }\n },\n canTarget: function(shadow) {\n return shadow && Boolean(shadow.elementFromPoint);\n },\n targetingShadow: function(inEl) {\n var s = this.shadow(inEl);\n if (this.canTarget(s)) {\n return s;\n }\n },\n olderShadow: function(shadow) {\n var os = shadow.olderShadowRoot;\n if (!os) {\n var se = shadow.querySelector('shadow');\n if (se) {\n os = se.olderShadowRoot;\n }\n }\n return os;\n },\n allShadows: function(element) {\n var shadows = [];\n var s = this.shadow(element);\n while (s) {\n shadows.push(s);\n s = this.olderShadow(s);\n }\n return shadows;\n },\n searchRoot: function(inRoot, x, y) {\n if (inRoot) {\n var t = inRoot.elementFromPoint(x, y);\n var st, sr;\n\n // is element a shadow host?\n sr = this.targetingShadow(t);\n while (sr) {\n\n // find the the element inside the shadow root\n st = sr.elementFromPoint(x, y);\n if (!st) {\n\n // check for older shadows\n sr = this.olderShadow(sr);\n } else {\n\n // shadowed element may contain a shadow root\n var ssr = this.targetingShadow(st);\n return this.searchRoot(ssr, x, y) || st;\n }\n }\n\n // light dom element is the target\n return t;\n }\n },\n owner: function(element) {\n var s = element;\n\n // walk up until you hit the shadow root or document\n while (s.parentNode) {\n s = s.parentNode;\n }\n\n // the owner element is expected to be a Document or ShadowRoot\n if (s.nodeType !== Node.DOCUMENT_NODE && s.nodeType !== Node.DOCUMENT_FRAGMENT_NODE) {\n s = document;\n }\n return s;\n },\n findTarget: function(inEvent) {\n var x = inEvent.clientX;\n var y = inEvent.clientY;\n\n // if the listener is in the shadow root, it is much faster to start there\n var s = this.owner(inEvent.target);\n\n // if x, y is not in this root, fall back to document search\n if (!s.elementFromPoint(x, y)) {\n s = document;\n }\n return this.searchRoot(s, x, y);\n }\n };\n\n var forEach = Array.prototype.forEach.call.bind(Array.prototype.forEach);\n var map = Array.prototype.map.call.bind(Array.prototype.map);\n var toArray = Array.prototype.slice.call.bind(Array.prototype.slice);\n var filter = Array.prototype.filter.call.bind(Array.prototype.filter);\n var MO = window.MutationObserver || window.WebKitMutationObserver;\n var SELECTOR = '[touch-action]';\n var OBSERVER_INIT = {\n subtree: true,\n childList: true,\n attributes: true,\n attributeOldValue: true,\n attributeFilter: ['touch-action']\n };\n\n function Installer(add, remove, changed, binder) {\n this.addCallback = add.bind(binder);\n this.removeCallback = remove.bind(binder);\n this.changedCallback = changed.bind(binder);\n if (MO) {\n this.observer = new MO(this.mutationWatcher.bind(this));\n }\n }\n\n Installer.prototype = {\n watchSubtree: function(target) {\n\n // Only watch scopes that can target find, as these are top-level.\n // Otherwise we can see duplicate additions and removals that add noise.\n //\n // TODO(dfreedman): For some instances with ShadowDOMPolyfill, we can see\n // a removal without an insertion when a node is redistributed among\n // shadows. Since it all ends up correct in the document, watching only\n // the document will yield the correct mutations to watch.\n if (this.observer && targeting.canTarget(target)) {\n this.observer.observe(target, OBSERVER_INIT);\n }\n },\n enableOnSubtree: function(target) {\n this.watchSubtree(target);\n if (target === document && document.readyState !== 'complete') {\n this.installOnLoad();\n } else {\n this.installNewSubtree(target);\n }\n },\n installNewSubtree: function(target) {\n forEach(this.findElements(target), this.addElement, this);\n },\n findElements: function(target) {\n if (target.querySelectorAll) {\n return target.querySelectorAll(SELECTOR);\n }\n return [];\n },\n removeElement: function(el) {\n this.removeCallback(el);\n },\n addElement: function(el) {\n this.addCallback(el);\n },\n elementChanged: function(el, oldValue) {\n this.changedCallback(el, oldValue);\n },\n concatLists: function(accum, list) {\n return accum.concat(toArray(list));\n },\n\n // register all touch-action = none nodes on document load\n installOnLoad: function() {\n document.addEventListener('readystatechange', function() {\n if (document.readyState === 'complete') {\n this.installNewSubtree(document);\n }\n }.bind(this));\n },\n isElement: function(n) {\n return n.nodeType === Node.ELEMENT_NODE;\n },\n flattenMutationTree: function(inNodes) {\n\n // find children with touch-action\n var tree = map(inNodes, this.findElements, this);\n\n // make sure the added nodes are accounted for\n tree.push(filter(inNodes, this.isElement));\n\n // flatten the list\n return tree.reduce(this.concatLists, []);\n },\n mutationWatcher: function(mutations) {\n mutations.forEach(this.mutationHandler, this);\n },\n mutationHandler: function(m) {\n if (m.type === 'childList') {\n var added = this.flattenMutationTree(m.addedNodes);\n added.forEach(this.addElement, this);\n var removed = this.flattenMutationTree(m.removedNodes);\n removed.forEach(this.removeElement, this);\n } else if (m.type === 'attributes') {\n this.elementChanged(m.target, m.oldValue);\n }\n }\n };\n\n function shadowSelector(s) {\n return 'body /shadow-deep/ ' + s;\n }\n function rule(v) {\n return '{ -ms-touch-action: ' + v + '; touch-action: ' + v + '; }';\n }\n var attrib2css = [\n { selector: '[touch-action=\"none\"]', value: 'none' },\n { selector: '[touch-action=\"auto\"]', value: 'auto' },\n { selector: '[touch-action~=\"pan-x\"]', value: 'pan-x' },\n { selector: '[touch-action~=\"pan-y\"]', value: 'pan-y' },\n { selector: '[touch-action~=\"pan-up\"]', value: 'pan-up' },\n { selector: '[touch-action~=\"pan-down\"]', value: 'pan-down' },\n { selector: '[touch-action~=\"pan-left\"]', value: 'pan-left' },\n { selector: '[touch-action~=\"pan-right\"]', value: 'pan-right' }\n ];\n var styles = '';\n\n // only install stylesheet if the browser has touch action support\n var hasNativePE = window.PointerEvent || window.MSPointerEvent;\n\n // only add shadow selectors if shadowdom is supported\n var hasShadowRoot = !window.ShadowDOMPolyfill && document.head.createShadowRoot;\n\n function applyAttributeStyles() {\n if (hasNativePE) {\n attrib2css.forEach(function(r) {\n styles += r.selector + rule(r.value) + '\\n';\n if (hasShadowRoot) {\n styles += shadowSelector(r.selector) + rule(r.value) + '\\n';\n }\n });\n\n var el = document.createElement('style');\n el.textContent = styles;\n document.head.appendChild(el);\n }\n }\n\n var pointermap = dispatcher.pointermap;\n\n // radius around touchend that swallows mouse events\n var DEDUP_DIST = 25;\n\n // left, middle, right, back, forward\n var BUTTON_TO_BUTTONS = [1, 4, 2, 8, 16];\n\n var HAS_BUTTONS = false;\n try {\n HAS_BUTTONS = new MouseEvent('test', { buttons: 1 }).buttons === 1;\n } catch (e) {}\n\n // handler block for native mouse events\n var mouseEvents = {\n POINTER_ID: 1,\n POINTER_TYPE: 'mouse',\n events: [\n 'mousedown',\n 'webkitmouseforcechanged',\n 'mousemove',\n 'mouseup',\n 'mouseover',\n 'mouseout'\n ],\n register: function(target) {\n dispatcher.listen(target, this.events);\n },\n unregister: function(target) {\n dispatcher.unlisten(target, this.events);\n },\n lastTouches: [],\n\n // collide with the global mouse listener\n isEventSimulatedFromTouch: function(inEvent) {\n var lts = this.lastTouches;\n var x = inEvent.clientX;\n var y = inEvent.clientY;\n for (var i = 0, l = lts.length, t; i < l && (t = lts[i]); i++) {\n\n // simulated mouse events will be swallowed near a primary touchend\n var dx = Math.abs(x - t.x);\n var dy = Math.abs(y - t.y);\n if (dx <= DEDUP_DIST && dy <= DEDUP_DIST) {\n return true;\n }\n }\n },\n prepareEvent: function(inEvent) {\n var e = dispatcher.cloneEvent(inEvent);\n\n // forward mouse preventDefault\n var pd = e.preventDefault;\n e.preventDefault = function() {\n inEvent.preventDefault();\n pd();\n };\n e.pointerId = this.POINTER_ID;\n e.isPrimary = true;\n e.pointerType = this.POINTER_TYPE;\n if ('webkitForce' in inEvent) {\n e.pressure = inEvent.webkitForce - MouseEvent.WEBKIT_FORCE_AT_MOUSE_DOWN;\n }\n return e;\n },\n prepareButtonsForMove: function(e, inEvent) {\n var p = pointermap.get(this.POINTER_ID);\n\n // Update buttons state after possible out-of-document mouseup.\n if (inEvent.which === 0 || !p) {\n e.buttons = 0;\n } else {\n e.buttons = p.buttons;\n }\n inEvent.buttons = e.buttons;\n },\n mousedown: function(inEvent) {\n if (!this.isEventSimulatedFromTouch(inEvent)) {\n var p = pointermap.get(this.POINTER_ID);\n var e = this.prepareEvent(inEvent);\n if (!HAS_BUTTONS) {\n e.buttons = BUTTON_TO_BUTTONS[e.button];\n if (p) { e.buttons |= p.buttons; }\n inEvent.buttons = e.buttons;\n }\n pointermap.set(this.POINTER_ID, inEvent);\n if (!p || p.buttons === 0) {\n dispatcher.down(e);\n } else {\n dispatcher.move(e);\n }\n }\n },\n\n // This is called when the user force presses without moving x/y\n webkitmouseforcechanged: function(inEvent) {\n this.mousemove(inEvent);\n },\n mousemove: function(inEvent) {\n if (!this.isEventSimulatedFromTouch(inEvent)) {\n var e = this.prepareEvent(inEvent);\n if (!HAS_BUTTONS) { this.prepareButtonsForMove(e, inEvent); }\n e.button = -1;\n pointermap.set(this.POINTER_ID, inEvent);\n dispatcher.move(e);\n }\n },\n mouseup: function(inEvent) {\n if (!this.isEventSimulatedFromTouch(inEvent)) {\n var p = pointermap.get(this.POINTER_ID);\n var e = this.prepareEvent(inEvent);\n if (!HAS_BUTTONS) {\n var up = BUTTON_TO_BUTTONS[e.button];\n\n // Produces wrong state of buttons in Browsers without `buttons` support\n // when a mouse button that was pressed outside the document is released\n // inside and other buttons are still pressed down.\n e.buttons = p ? p.buttons & ~up : 0;\n inEvent.buttons = e.buttons;\n }\n pointermap.set(this.POINTER_ID, inEvent);\n\n // Support: Firefox <=44 only\n // FF Ubuntu includes the lifted button in the `buttons` property on\n // mouseup.\n // https://bugzilla.mozilla.org/show_bug.cgi?id=1223366\n e.buttons &= ~BUTTON_TO_BUTTONS[e.button];\n if (e.buttons === 0) {\n dispatcher.up(e);\n } else {\n dispatcher.move(e);\n }\n }\n },\n mouseover: function(inEvent) {\n if (!this.isEventSimulatedFromTouch(inEvent)) {\n var e = this.prepareEvent(inEvent);\n if (!HAS_BUTTONS) { this.prepareButtonsForMove(e, inEvent); }\n e.button = -1;\n pointermap.set(this.POINTER_ID, inEvent);\n dispatcher.enterOver(e);\n }\n },\n mouseout: function(inEvent) {\n if (!this.isEventSimulatedFromTouch(inEvent)) {\n var e = this.prepareEvent(inEvent);\n if (!HAS_BUTTONS) { this.prepareButtonsForMove(e, inEvent); }\n e.button = -1;\n dispatcher.leaveOut(e);\n }\n },\n cancel: function(inEvent) {\n var e = this.prepareEvent(inEvent);\n dispatcher.cancel(e);\n this.deactivateMouse();\n },\n deactivateMouse: function() {\n pointermap.delete(this.POINTER_ID);\n }\n };\n\n var captureInfo = dispatcher.captureInfo;\n var findTarget = targeting.findTarget.bind(targeting);\n var allShadows = targeting.allShadows.bind(targeting);\n var pointermap$1 = dispatcher.pointermap;\n\n // this should be long enough to ignore compat mouse events made by touch\n var DEDUP_TIMEOUT = 2500;\n var ATTRIB = 'touch-action';\n var INSTALLER;\n\n // bitmask for _scrollType\n var UP = 1;\n var DOWN = 2;\n var LEFT = 4;\n var RIGHT = 8;\n var AUTO = UP | DOWN | LEFT | RIGHT;\n\n // handler block for native touch events\n var touchEvents = {\n events: [\n 'touchstart',\n 'touchmove',\n 'touchforcechange',\n 'touchend',\n 'touchcancel'\n ],\n register: function(target) {\n INSTALLER.enableOnSubtree(target);\n },\n unregister: function() {\n\n // TODO(dfreedman): is it worth it to disconnect the MO?\n },\n elementAdded: function(el) {\n var a = el.getAttribute(ATTRIB);\n var st = this.touchActionToScrollType(a);\n if (typeof st === \"number\") {\n el._scrollType = st;\n dispatcher.listen(el, this.events);\n\n // set touch-action on shadows as well\n allShadows(el).forEach(function(s) {\n s._scrollType = st;\n dispatcher.listen(s, this.events);\n }, this);\n }\n },\n elementRemoved: function(el) {\n\n // In some cases, an element is removed before a touchend.\n // When this is the case, we should wait for the touchend before unlistening,\n // because we still want pointer events to bubble up after removing from DOM.\n if (pointermap$1.size > 0) {\n var evts = this.events;\n el.addEventListener('touchend', function() {\n el._scrollType = undefined;\n dispatcher.unlisten(el, evts);\n });\n } else {\n el._scrollType = undefined;\n dispatcher.unlisten(el, this.events);\n }\n\n // remove touch-action from shadow\n allShadows(el).forEach(function(s) {\n s._scrollType = undefined;\n dispatcher.unlisten(s, this.events);\n }, this);\n },\n elementChanged: function(el, oldValue) {\n var a = el.getAttribute(ATTRIB);\n var st = this.touchActionToScrollType(a);\n var oldSt = this.touchActionToScrollType(oldValue);\n\n // simply update scrollType if listeners are already established\n if (typeof st === \"number\" && typeof oldSt === \"number\") {\n el._scrollType = st;\n allShadows(el).forEach(function(s) {\n s._scrollType = st;\n }, this);\n } else if (typeof oldSt === \"number\") {\n this.elementRemoved(el);\n } else if (typeof st === \"number\") {\n this.elementAdded(el);\n }\n },\n scrollTypes: {\n UP: function(s) {\n return s.includes('pan-y') || s.includes('pan-up') ? UP : 0;\n },\n DOWN: function(s) {\n return s.includes('pan-y') || s.includes('pan-down') ? DOWN : 0;\n },\n LEFT: function(s) {\n return s.includes('pan-x') || s.includes('pan-left') ? LEFT : 0;\n },\n RIGHT: function(s) {\n return s.includes('pan-x') || s.includes('pan-right') ? RIGHT : 0;\n }\n },\n touchActionToScrollType: function(touchAction) {\n if (!touchAction) {\n return;\n }\n\n if (touchAction === \"auto\") {\n return AUTO;\n }\n\n if (touchAction === \"none\") {\n return 0;\n }\n\n var s = touchAction.split(' ');\n var st = this.scrollTypes;\n\n // construct a bitmask of allowed scroll directions\n return st.UP(s) | st.DOWN(s) | st.LEFT(s) | st.RIGHT(s);\n },\n POINTER_TYPE: 'touch',\n firstTouch: null,\n isPrimaryTouch: function(inTouch) {\n return this.firstTouch === inTouch.identifier;\n },\n setPrimaryTouch: function(inTouch) {\n\n // set primary touch if there no pointers, or the only pointer is the mouse\n if (pointermap$1.size === 0 || (pointermap$1.size === 1 && pointermap$1.has(1))) {\n this.firstTouch = inTouch.identifier;\n this.firstXY = { X: inTouch.clientX, Y: inTouch.clientY };\n this.scrolling = false;\n }\n },\n removePrimaryPointer: function(inPointer) {\n if (inPointer.isPrimary) {\n this.firstTouch = null;\n this.firstXY = null;\n }\n },\n typeToButtons: function(type) {\n var ret = 0;\n if (type === 'touchstart' || type === 'touchmove' || type === 'touchforcechange') {\n ret = 1;\n }\n return ret;\n },\n touchToPointer: function(inTouch) {\n var cte = this.currentTouchEvent;\n var e = dispatcher.cloneEvent(inTouch);\n\n // We reserve pointerId 1 for Mouse.\n // Touch identifiers can start at 0.\n // Add 2 to the touch identifier for compatibility.\n var id = e.pointerId = inTouch.identifier + 2;\n e.target = captureInfo[id] || findTarget(e);\n e.bubbles = true;\n e.cancelable = true;\n e.button = 0;\n e.buttons = this.typeToButtons(cte.type);\n e.width = (inTouch.radiusX || inTouch.webkitRadiusX || 0) * 2;\n e.height = (inTouch.radiusY || inTouch.webkitRadiusY || 0) * 2;\n e.pressure = inTouch.force !== undefined ?\n inTouch.force :\n inTouch.webkitForce !== undefined ?\n inTouch.webkitForce : undefined;\n e.isPrimary = this.isPrimaryTouch(inTouch);\n if (inTouch.altitudeAngle) {\n const tan = Math.tan(inTouch.altitudeAngle);\n const radToDeg = 180 / Math.PI;\n e.tiltX = Math.atan(Math.cos(inTouch.azimuthAngle) / tan) * radToDeg;\n e.tiltY = Math.atan(Math.sin(inTouch.azimuthAngle) / tan) * radToDeg;\n } else {\n e.tiltX = 0;\n e.tiltY = 0;\n }\n if (inTouch.touchType === 'stylus') {\n e.pointerType = 'pen';\n } else {\n e.pointerType = this.POINTER_TYPE;\n }\n\n // forward modifier keys\n e.altKey = cte.altKey;\n e.ctrlKey = cte.ctrlKey;\n e.metaKey = cte.metaKey;\n e.shiftKey = cte.shiftKey;\n\n // forward touch preventDefaults\n var self = this;\n e.preventDefault = function() {\n self.scrolling = false;\n self.firstXY = null;\n cte.preventDefault();\n };\n return e;\n },\n processTouches: function(inEvent, inFunction) {\n var tl = inEvent.changedTouches;\n this.currentTouchEvent = inEvent;\n for (var i = 0, t; i < tl.length; i++) {\n t = tl[i];\n inFunction.call(this, this.touchToPointer(t));\n }\n },\n\n // For single axis scrollers, determines whether the element should emit\n // pointer events or behave as a scroller\n shouldScroll: function(inEvent) {\n if (this.firstXY) {\n var ret;\n var st = inEvent.currentTarget._scrollType;\n if (st === 0) {\n\n // this element is a `touch-action: none`, should never scroll\n ret = false;\n } else if (st === AUTO) {\n\n // this element is a `touch-action: auto`, should always scroll\n ret = true;\n } else {\n var t = inEvent.changedTouches[0];\n\n var dy = t.clientY - this.firstXY.Y;\n var dya = Math.abs(dy);\n var dx = t.clientX - this.firstXY.X;\n var dxa = Math.abs(dx);\n\n var up = st & UP;\n var down = st & DOWN;\n var left = st & LEFT;\n var right = st & RIGHT;\n\n if (left && right) {\n\n // should scroll on the x axis\n ret = dxa > dya;\n } else if (left) {\n\n // should scroll left\n ret = dxa > dya && dx > 0;\n } else if (right) {\n\n // should scroll right\n ret = dxa > dya && dx < 0;\n }\n\n if (!ret) {\n if (up && down) {\n\n // should scroll on the y axis\n ret = dxa < dya;\n } else if (up) {\n\n // should scroll up\n ret = dxa < dya && dy > 0;\n } else if (down) {\n\n // should scroll down\n ret = dxa < dya && dy < 0;\n }\n }\n\n }\n this.firstXY = null;\n return ret;\n }\n },\n findTouch: function(inTL, inId) {\n for (var i = 0, l = inTL.length, t; i < l && (t = inTL[i]); i++) {\n if (t.identifier === inId) {\n return true;\n }\n }\n },\n\n // In some instances, a touchstart can happen without a touchend. This\n // leaves the pointermap in a broken state.\n // Therefore, on every touchstart, we remove the touches that did not fire a\n // touchend event.\n // To keep state globally consistent, we fire a\n // pointercancel for this \"abandoned\" touch\n vacuumTouches: function(inEvent) {\n var tl = inEvent.touches;\n\n // pointermap.size should be < tl.length here, as the touchstart has not\n // been processed yet.\n if (pointermap$1.size >= tl.length) {\n var d = [];\n pointermap$1.forEach(function(value, key) {\n\n // Never remove pointerId == 1, which is mouse.\n // Touch identifiers are 2 smaller than their pointerId, which is the\n // index in pointermap.\n if (key !== 1 && !this.findTouch(tl, key - 2)) {\n var p = value.out;\n d.push(p);\n }\n }, this);\n d.forEach(this.cancelOut, this);\n }\n },\n touchstart: function(inEvent) {\n this.vacuumTouches(inEvent);\n this.setPrimaryTouch(inEvent.changedTouches[0]);\n this.dedupSynthMouse(inEvent);\n if (!this.scrolling) {\n this.processTouches(inEvent, this.overDown);\n }\n },\n overDown: function(inPointer) {\n pointermap$1.set(inPointer.pointerId, {\n target: inPointer.target,\n out: inPointer,\n outTarget: inPointer.target\n });\n dispatcher.enterOver(inPointer);\n dispatcher.down(inPointer);\n },\n\n // Called when pressure or tilt changes without the x/y changing\n touchforcechange: function(inEvent) {\n this.touchmove(inEvent);\n },\n touchmove: function(inEvent) {\n if (!this.scrolling) {\n if (this.shouldScroll(inEvent)) {\n this.scrolling = true;\n this.touchcancel(inEvent);\n } else {\n inEvent.preventDefault();\n this.processTouches(inEvent, this.moveOverOut);\n }\n }\n },\n moveOverOut: function(inPointer) {\n var event = inPointer;\n var pointer = pointermap$1.get(event.pointerId);\n\n // a finger drifted off the screen, ignore it\n if (!pointer) {\n return;\n }\n var outEvent = pointer.out;\n var outTarget = pointer.outTarget;\n dispatcher.move(event);\n if (outEvent && outTarget !== event.target) {\n outEvent.relatedTarget = event.target;\n event.relatedTarget = outTarget;\n\n // recover from retargeting by shadow\n outEvent.target = outTarget;\n if (event.target) {\n dispatcher.leaveOut(outEvent);\n dispatcher.enterOver(event);\n } else {\n\n // clean up case when finger leaves the screen\n event.target = outTarget;\n event.relatedTarget = null;\n this.cancelOut(event);\n }\n }\n pointer.out = event;\n pointer.outTarget = event.target;\n },\n touchend: function(inEvent) {\n this.dedupSynthMouse(inEvent);\n this.processTouches(inEvent, this.upOut);\n },\n upOut: function(inPointer) {\n if (!this.scrolling) {\n dispatcher.up(inPointer);\n dispatcher.leaveOut(inPointer);\n }\n this.cleanUpPointer(inPointer);\n },\n touchcancel: function(inEvent) {\n this.processTouches(inEvent, this.cancelOut);\n },\n cancelOut: function(inPointer) {\n dispatcher.cancel(inPointer);\n dispatcher.leaveOut(inPointer);\n this.cleanUpPointer(inPointer);\n },\n cleanUpPointer: function(inPointer) {\n pointermap$1.delete(inPointer.pointerId);\n this.removePrimaryPointer(inPointer);\n },\n\n // prevent synth mouse events from creating pointer events\n dedupSynthMouse: function(inEvent) {\n var lts = mouseEvents.lastTouches;\n var t = inEvent.changedTouches[0];\n\n // only the primary finger will synth mouse events\n if (this.isPrimaryTouch(t)) {\n\n // remember x/y of last touch\n var lt = { x: t.clientX, y: t.clientY };\n lts.push(lt);\n var fn = (function(lts, lt) {\n var i = lts.indexOf(lt);\n if (i > -1) {\n lts.splice(i, 1);\n }\n }).bind(null, lts, lt);\n setTimeout(fn, DEDUP_TIMEOUT);\n }\n }\n };\n\n INSTALLER = new Installer(touchEvents.elementAdded, touchEvents.elementRemoved,\n touchEvents.elementChanged, touchEvents);\n\n var pointermap$2 = dispatcher.pointermap;\n var HAS_BITMAP_TYPE = window.MSPointerEvent &&\n typeof window.MSPointerEvent.MSPOINTER_TYPE_MOUSE === 'number';\n var msEvents = {\n events: [\n 'MSPointerDown',\n 'MSPointerMove',\n 'MSPointerUp',\n 'MSPointerOut',\n 'MSPointerOver',\n 'MSPointerCancel',\n 'MSGotPointerCapture',\n 'MSLostPointerCapture'\n ],\n register: function(target) {\n dispatcher.listen(target, this.events);\n },\n unregister: function(target) {\n dispatcher.unlisten(target, this.events);\n },\n POINTER_TYPES: [\n '',\n 'unavailable',\n 'touch',\n 'pen',\n 'mouse'\n ],\n prepareEvent: function(inEvent) {\n var e = inEvent;\n if (HAS_BITMAP_TYPE) {\n e = dispatcher.cloneEvent(inEvent);\n e.pointerType = this.POINTER_TYPES[inEvent.pointerType];\n }\n return e;\n },\n cleanup: function(id) {\n pointermap$2.delete(id);\n },\n MSPointerDown: function(inEvent) {\n pointermap$2.set(inEvent.pointerId, inEvent);\n var e = this.prepareEvent(inEvent);\n dispatcher.down(e);\n },\n MSPointerMove: function(inEvent) {\n var e = this.prepareEvent(inEvent);\n dispatcher.move(e);\n },\n MSPointerUp: function(inEvent) {\n var e = this.prepareEvent(inEvent);\n dispatcher.up(e);\n this.cleanup(inEvent.pointerId);\n },\n MSPointerOut: function(inEvent) {\n var e = this.prepareEvent(inEvent);\n dispatcher.leaveOut(e);\n },\n MSPointerOver: function(inEvent) {\n var e = this.prepareEvent(inEvent);\n dispatcher.enterOver(e);\n },\n MSPointerCancel: function(inEvent) {\n var e = this.prepareEvent(inEvent);\n dispatcher.cancel(e);\n this.cleanup(inEvent.pointerId);\n },\n MSLostPointerCapture: function(inEvent) {\n var e = dispatcher.makeEvent('lostpointercapture', inEvent);\n dispatcher.dispatchEvent(e);\n },\n MSGotPointerCapture: function(inEvent) {\n var e = dispatcher.makeEvent('gotpointercapture', inEvent);\n dispatcher.dispatchEvent(e);\n }\n };\n\n function applyPolyfill() {\n\n // only activate if this platform does not have pointer events\n if (!window.PointerEvent) {\n window.PointerEvent = PointerEvent;\n\n if (window.navigator.msPointerEnabled) {\n var tp = window.navigator.msMaxTouchPoints;\n Object.defineProperty(window.navigator, 'maxTouchPoints', {\n value: tp,\n enumerable: true\n });\n dispatcher.registerSource('ms', msEvents);\n } else {\n Object.defineProperty(window.navigator, 'maxTouchPoints', {\n value: 0,\n enumerable: true\n });\n dispatcher.registerSource('mouse', mouseEvents);\n if (window.ontouchstart !== undefined) {\n dispatcher.registerSource('touch', touchEvents);\n }\n }\n\n dispatcher.register(document);\n }\n }\n\n var n = window.navigator;\n var s;\n var r;\n var h;\n function assertActive(id) {\n if (!dispatcher.pointermap.has(id)) {\n var error = new Error('NotFoundError');\n error.name = 'NotFoundError';\n throw error;\n }\n }\n function assertConnected(elem) {\n var parent = elem.parentNode;\n while (parent && parent !== elem.ownerDocument) {\n parent = parent.parentNode;\n }\n if (!parent) {\n var error = new Error('InvalidStateError');\n error.name = 'InvalidStateError';\n throw error;\n }\n }\n function inActiveButtonState(id) {\n var p = dispatcher.pointermap.get(id);\n return p.buttons !== 0;\n }\n if (n.msPointerEnabled) {\n s = function(pointerId) {\n assertActive(pointerId);\n assertConnected(this);\n if (inActiveButtonState(pointerId)) {\n dispatcher.setCapture(pointerId, this, true);\n this.msSetPointerCapture(pointerId);\n }\n };\n r = function(pointerId) {\n assertActive(pointerId);\n dispatcher.releaseCapture(pointerId, true);\n this.msReleasePointerCapture(pointerId);\n };\n } else {\n s = function setPointerCapture(pointerId) {\n assertActive(pointerId);\n assertConnected(this);\n if (inActiveButtonState(pointerId)) {\n dispatcher.setCapture(pointerId, this);\n }\n };\n r = function releasePointerCapture(pointerId) {\n assertActive(pointerId);\n dispatcher.releaseCapture(pointerId);\n };\n }\n h = function hasPointerCapture(pointerId) {\n return !!dispatcher.captureInfo[pointerId];\n };\n\n function applyPolyfill$1() {\n if (window.Element && !Element.prototype.setPointerCapture) {\n Object.defineProperties(Element.prototype, {\n 'setPointerCapture': {\n value: s\n },\n 'releasePointerCapture': {\n value: r\n },\n 'hasPointerCapture': {\n value: h\n }\n });\n }\n }\n\n applyAttributeStyles();\n applyPolyfill();\n applyPolyfill$1();\n\n var pointerevents = {\n dispatcher: dispatcher,\n Installer: Installer,\n PointerEvent: PointerEvent,\n PointerMap: PointerMap,\n targetFinding: targeting\n };\n\n return pointerevents;\n\n}));","/**\n * @fileoverview\n * - Using the 'QRCode for Javascript library'\n * - Fixed dataset of 'QRCode for Javascript library' for support full-spec.\n * - this library has no dependencies.\n *\n * @author davidshimjs\n * @see <a href=\"http://www.d-project.com/\" target=\"_blank\">http://www.d-project.com/</a>\n * @see <a href=\"http://jeromeetienne.github.com/jquery-qrcode/\" target=\"_blank\">http://jeromeetienne.github.com/jquery-qrcode/</a>\n */\nvar QRCode;\n\n(function (root, factory) {\n\n\t/* CommonJS */\n if (typeof exports == 'object') module.exports = factory()\n\n /* AMD module */\n else if (typeof define == 'function' && define.amd) define(factory)\n\n /* Global */\n else root.QRCode = factory()\n\n}(this, function () {\t//---------------------------------------------------------------------\n\t// QRCode for JavaScript\n\t//\n\t// Copyright (c) 2009 Kazuhiko Arase\n\t//\n\t// URL: http://www.d-project.com/\n\t//\n\t// Licensed under the MIT license:\n\t// http://www.opensource.org/licenses/mit-license.php\n\t//\n\t// The word \"QR Code\" is registered trademark of\n\t// DENSO WAVE INCORPORATED\n\t// http://www.denso-wave.com/qrcode/faqpatent-e.html\n\t//\n\t//---------------------------------------------------------------------\n\tfunction QR8bitByte(data) {\n\t\tthis.mode = QRMode.MODE_8BIT_BYTE;\n\t\tthis.data = data;\n\t\tthis.parsedData = [];\n\n\t\t// Added to support UTF-8 Characters\n\t\tfor (var i = 0, l = this.data.length; i < l; i++) {\n\t\t\tvar byteArray = [];\n\t\t\tvar code = this.data.charCodeAt(i);\n\n\t\t\tif (code > 0x10000) {\n\t\t\t\tbyteArray[0] = 0xF0 | ((code & 0x1C0000) >>> 18);\n\t\t\t\tbyteArray[1] = 0x80 | ((code & 0x3F000) >>> 12);\n\t\t\t\tbyteArray[2] = 0x80 | ((code & 0xFC0) >>> 6);\n\t\t\t\tbyteArray[3] = 0x80 | (code & 0x3F);\n\t\t\t} else if (code > 0x800) {\n\t\t\t\tbyteArray[0] = 0xE0 | ((code & 0xF000) >>> 12);\n\t\t\t\tbyteArray[1] = 0x80 | ((code & 0xFC0) >>> 6);\n\t\t\t\tbyteArray[2] = 0x80 | (code & 0x3F);\n\t\t\t} else if (code > 0x80) {\n\t\t\t\tbyteArray[0] = 0xC0 | ((code & 0x7C0) >>> 6);\n\t\t\t\tbyteArray[1] = 0x80 | (code & 0x3F);\n\t\t\t} else {\n\t\t\t\tbyteArray[0] = code;\n\t\t\t}\n\n\t\t\tthis.parsedData.push(byteArray);\n\t\t}\n\n\t\tthis.parsedData = Array.prototype.concat.apply([], this.parsedData);\n\n\t\tif (this.parsedData.length != this.data.length) {\n\t\t\tthis.parsedData.unshift(191);\n\t\t\tthis.parsedData.unshift(187);\n\t\t\tthis.parsedData.unshift(239);\n\t\t}\n\t}\n\n\tQR8bitByte.prototype = {\n\t\tgetLength: function (buffer) {\n\t\t\treturn this.parsedData.length;\n\t\t},\n\t\twrite: function (buffer) {\n\t\t\tfor (var i = 0, l = this.parsedData.length; i < l; i++) {\n\t\t\t\tbuffer.put(this.parsedData[i], 8);\n\t\t\t}\n\t\t}\n\t};\n\n\tfunction QRCodeModel(typeNumber, errorCorrectLevel) {\n\t\tthis.typeNumber = typeNumber;\n\t\tthis.errorCorrectLevel = errorCorrectLevel;\n\t\tthis.modules = null;\n\t\tthis.moduleCount = 0;\n\t\tthis.dataCache = null;\n\t\tthis.dataList = [];\n\t}\n\n\tQRCodeModel.prototype={addData:function(data){var newData=new QR8bitByte(data);this.dataList.push(newData);this.dataCache=null;},isDark:function(row,col){if(row<0||this.moduleCount<=row||col<0||this.moduleCount<=col){throw new Error(row+\",\"+col);}\n\treturn this.modules[row][col];},getModuleCount:function(){return this.moduleCount;},make:function(){this.makeImpl(false,this.getBestMaskPattern());},makeImpl:function(test,maskPattern){this.moduleCount=this.typeNumber*4+17;this.modules=new Array(this.moduleCount);for(var row=0;row<this.moduleCount;row++){this.modules[row]=new Array(this.moduleCount);for(var col=0;col<this.moduleCount;col++){this.modules[row][col]=null;}}\n\tthis.setupPositionProbePattern(0,0);this.setupPositionProbePattern(this.moduleCount-7,0);this.setupPositionProbePattern(0,this.moduleCount-7);this.setupPositionAdjustPattern();this.setupTimingPattern();this.setupTypeInfo(test,maskPattern);if(this.typeNumber>=7){this.setupTypeNumber(test);}\n\tif(this.dataCache==null){this.dataCache=QRCodeModel.createData(this.typeNumber,this.errorCorrectLevel,this.dataList);}\n\tthis.mapData(this.dataCache,maskPattern);},setupPositionProbePattern:function(row,col){for(var r=-1;r<=7;r++){if(row+r<=-1||this.moduleCount<=row+r)continue;for(var c=-1;c<=7;c++){if(col+c<=-1||this.moduleCount<=col+c)continue;if((0<=r&&r<=6&&(c==0||c==6))||(0<=c&&c<=6&&(r==0||r==6))||(2<=r&&r<=4&&2<=c&&c<=4)){this.modules[row+r][col+c]=true;}else{this.modules[row+r][col+c]=false;}}}},getBestMaskPattern:function(){var minLostPoint=0;var pattern=0;for(var i=0;i<8;i++){this.makeImpl(true,i);var lostPoint=QRUtil.getLostPoint(this);if(i==0||minLostPoint>lostPoint){minLostPoint=lostPoint;pattern=i;}}\n\treturn pattern;},createMovieClip:function(target_mc,instance_name,depth){var qr_mc=target_mc.createEmptyMovieClip(instance_name,depth);var cs=1;this.make();for(var row=0;row<this.modules.length;row++){var y=row*cs;for(var col=0;col<this.modules[row].length;col++){var x=col*cs;var dark=this.modules[row][col];if(dark){qr_mc.beginFill(0,100);qr_mc.moveTo(x,y);qr_mc.lineTo(x+cs,y);qr_mc.lineTo(x+cs,y+cs);qr_mc.lineTo(x,y+cs);qr_mc.endFill();}}}\n\treturn qr_mc;},setupTimingPattern:function(){for(var r=8;r<this.moduleCount-8;r++){if(this.modules[r][6]!=null){continue;}\n\tthis.modules[r][6]=(r%2==0);}\n\tfor(var c=8;c<this.moduleCount-8;c++){if(this.modules[6][c]!=null){continue;}\n\tthis.modules[6][c]=(c%2==0);}},setupPositionAdjustPattern:function(){var pos=QRUtil.getPatternPosition(this.typeNumber);for(var i=0;i<pos.length;i++){for(var j=0;j<pos.length;j++){var row=pos[i];var col=pos[j];if(this.modules[row][col]!=null){continue;}\n\tfor(var r=-2;r<=2;r++){for(var c=-2;c<=2;c++){if(r==-2||r==2||c==-2||c==2||(r==0&&c==0)){this.modules[row+r][col+c]=true;}else{this.modules[row+r][col+c]=false;}}}}}},setupTypeNumber:function(test){var bits=QRUtil.getBCHTypeNumber(this.typeNumber);for(var i=0;i<18;i++){var mod=(!test&&((bits>>i)&1)==1);this.modules[Math.floor(i/3)][i%3+this.moduleCount-8-3]=mod;}\n\tfor(var i=0;i<18;i++){var mod=(!test&&((bits>>i)&1)==1);this.modules[i%3+this.moduleCount-8-3][Math.floor(i/3)]=mod;}},setupTypeInfo:function(test,maskPattern){var data=(this.errorCorrectLevel<<3)|maskPattern;var bits=QRUtil.getBCHTypeInfo(data);for(var i=0;i<15;i++){var mod=(!test&&((bits>>i)&1)==1);if(i<6){this.modules[i][8]=mod;}else if(i<8){this.modules[i+1][8]=mod;}else{this.modules[this.moduleCount-15+i][8]=mod;}}\n\tfor(var i=0;i<15;i++){var mod=(!test&&((bits>>i)&1)==1);if(i<8){this.modules[8][this.moduleCount-i-1]=mod;}else if(i<9){this.modules[8][15-i-1+1]=mod;}else{this.modules[8][15-i-1]=mod;}}\n\tthis.modules[this.moduleCount-8][8]=(!test);},mapData:function(data,maskPattern){var inc=-1;var row=this.moduleCount-1;var bitIndex=7;var byteIndex=0;for(var col=this.moduleCount-1;col>0;col-=2){if(col==6)col--;while(true){for(var c=0;c<2;c++){if(this.modules[row][col-c]==null){var dark=false;if(byteIndex<data.length){dark=(((data[byteIndex]>>>bitIndex)&1)==1);}\n\tvar mask=QRUtil.getMask(maskPattern,row,col-c);if(mask){dark=!dark;}\n\tthis.modules[row][col-c]=dark;bitIndex--;if(bitIndex==-1){byteIndex++;bitIndex=7;}}}\n\trow+=inc;if(row<0||this.moduleCount<=row){row-=inc;inc=-inc;break;}}}}};QRCodeModel.PAD0=0xEC;QRCodeModel.PAD1=0x11;QRCodeModel.createData=function(typeNumber,errorCorrectLevel,dataList){var rsBlocks=QRRSBlock.getRSBlocks(typeNumber,errorCorrectLevel);var buffer=new QRBitBuffer();for(var i=0;i<dataList.length;i++){var data=dataList[i];buffer.put(data.mode,4);buffer.put(data.getLength(),QRUtil.getLengthInBits(data.mode,typeNumber));data.write(buffer);}\n\tvar totalDataCount=0;for(var i=0;i<rsBlocks.length;i++){totalDataCount+=rsBlocks[i].dataCount;}\n\tif(buffer.getLengthInBits()>totalDataCount*8){throw new Error(\"code length overflow. (\"\n\t+buffer.getLengthInBits()\n\t+\">\"\n\t+totalDataCount*8\n\t+\")\");}\n\tif(buffer.getLengthInBits()+4<=totalDataCount*8){buffer.put(0,4);}\n\twhile(buffer.getLengthInBits()%8!=0){buffer.putBit(false);}\n\twhile(true){if(buffer.getLengthInBits()>=totalDataCount*8){break;}\n\tbuffer.put(QRCodeModel.PAD0,8);if(buffer.getLengthInBits()>=totalDataCount*8){break;}\n\tbuffer.put(QRCodeModel.PAD1,8);}\n\treturn QRCodeModel.createBytes(buffer,rsBlocks);};QRCodeModel.createBytes=function(buffer,rsBlocks){var offset=0;var maxDcCount=0;var maxEcCount=0;var dcdata=new Array(rsBlocks.length);var ecdata=new Array(rsBlocks.length);for(var r=0;r<rsBlocks.length;r++){var dcCount=rsBlocks[r].dataCount;var ecCount=rsBlocks[r].totalCount-dcCount;maxDcCount=Math.max(maxDcCount,dcCount);maxEcCount=Math.max(maxEcCount,ecCount);dcdata[r]=new Array(dcCount);for(var i=0;i<dcdata[r].length;i++){dcdata[r][i]=0xff&buffer.buffer[i+offset];}\n\toffset+=dcCount;var rsPoly=QRUtil.getErrorCorrectPolynomial(ecCount);var rawPoly=new QRPolynomial(dcdata[r],rsPoly.getLength()-1);var modPoly=rawPoly.mod(rsPoly);ecdata[r]=new Array(rsPoly.getLength()-1);for(var i=0;i<ecdata[r].length;i++){var modIndex=i+modPoly.getLength()-ecdata[r].length;ecdata[r][i]=(modIndex>=0)?modPoly.get(modIndex):0;}}\n\tvar totalCodeCount=0;for(var i=0;i<rsBlocks.length;i++){totalCodeCount+=rsBlocks[i].totalCount;}\n\tvar data=new Array(totalCodeCount);var index=0;for(var i=0;i<maxDcCount;i++){for(var r=0;r<rsBlocks.length;r++){if(i<dcdata[r].length){data[index++]=dcdata[r][i];}}}\n\tfor(var i=0;i<maxEcCount;i++){for(var r=0;r<rsBlocks.length;r++){if(i<ecdata[r].length){data[index++]=ecdata[r][i];}}}\n\treturn data;};var QRMode={MODE_NUMBER:1<<0,MODE_ALPHA_NUM:1<<1,MODE_8BIT_BYTE:1<<2,MODE_KANJI:1<<3};var QRErrorCorrectLevel={L:1,M:0,Q:3,H:2};var QRMaskPattern={PATTERN000:0,PATTERN001:1,PATTERN010:2,PATTERN011:3,PATTERN100:4,PATTERN101:5,PATTERN110:6,PATTERN111:7};var QRUtil={PATTERN_POSITION_TABLE:[[],[6,18],[6,22],[6,26],[6,30],[6,34],[6,22,38],[6,24,42],[6,26,46],[6,28,50],[6,30,54],[6,32,58],[6,34,62],[6,26,46,66],[6,26,48,70],[6,26,50,74],[6,30,54,78],[6,30,56,82],[6,30,58,86],[6,34,62,90],[6,28,50,72,94],[6,26,50,74,98],[6,30,54,78,102],[6,28,54,80,106],[6,32,58,84,110],[6,30,58,86,114],[6,34,62,90,118],[6,26,50,74,98,122],[6,30,54,78,102,126],[6,26,52,78,104,130],[6,30,56,82,108,134],[6,34,60,86,112,138],[6,30,58,86,114,142],[6,34,62,90,118,146],[6,30,54,78,102,126,150],[6,24,50,76,102,128,154],[6,28,54,80,106,132,158],[6,32,58,84,110,136,162],[6,26,54,82,110,138,166],[6,30,58,86,114,142,170]],G15:(1<<10)|(1<<8)|(1<<5)|(1<<4)|(1<<2)|(1<<1)|(1<<0),G18:(1<<12)|(1<<11)|(1<<10)|(1<<9)|(1<<8)|(1<<5)|(1<<2)|(1<<0),G15_MASK:(1<<14)|(1<<12)|(1<<10)|(1<<4)|(1<<1),getBCHTypeInfo:function(data){var d=data<<10;while(QRUtil.getBCHDigit(d)-QRUtil.getBCHDigit(QRUtil.G15)>=0){d^=(QRUtil.G15<<(QRUtil.getBCHDigit(d)-QRUtil.getBCHDigit(QRUtil.G15)));}\n\treturn((data<<10)|d)^QRUtil.G15_MASK;},getBCHTypeNumber:function(data){var d=data<<12;while(QRUtil.getBCHDigit(d)-QRUtil.getBCHDigit(QRUtil.G18)>=0){d^=(QRUtil.G18<<(QRUtil.getBCHDigit(d)-QRUtil.getBCHDigit(QRUtil.G18)));}\n\treturn(data<<12)|d;},getBCHDigit:function(data){var digit=0;while(data!=0){digit++;data>>>=1;}\n\treturn digit;},getPatternPosition:function(typeNumber){return QRUtil.PATTERN_POSITION_TABLE[typeNumber-1];},getMask:function(maskPattern,i,j){switch(maskPattern){case QRMaskPattern.PATTERN000:return(i+j)%2==0;case QRMaskPattern.PATTERN001:return i%2==0;case QRMaskPattern.PATTERN010:return j%3==0;case QRMaskPattern.PATTERN011:return(i+j)%3==0;case QRMaskPattern.PATTERN100:return(Math.floor(i/2)+Math.floor(j/3))%2==0;case QRMaskPattern.PATTERN101:return(i*j)%2+(i*j)%3==0;case QRMaskPattern.PATTERN110:return((i*j)%2+(i*j)%3)%2==0;case QRMaskPattern.PATTERN111:return((i*j)%3+(i+j)%2)%2==0;default:throw new Error(\"bad maskPattern:\"+maskPattern);}},getErrorCorrectPolynomial:function(errorCorrectLength){var a=new QRPolynomial([1],0);for(var i=0;i<errorCorrectLength;i++){a=a.multiply(new QRPolynomial([1,QRMath.gexp(i)],0));}\n\treturn a;},getLengthInBits:function(mode,type){if(1<=type&&type<10){switch(mode){case QRMode.MODE_NUMBER:return 10;case QRMode.MODE_ALPHA_NUM:return 9;case QRMode.MODE_8BIT_BYTE:return 8;case QRMode.MODE_KANJI:return 8;default:throw new Error(\"mode:\"+mode);}}else if(type<27){switch(mode){case QRMode.MODE_NUMBER:return 12;case QRMode.MODE_ALPHA_NUM:return 11;case QRMode.MODE_8BIT_BYTE:return 16;case QRMode.MODE_KANJI:return 10;default:throw new Error(\"mode:\"+mode);}}else if(type<41){switch(mode){case QRMode.MODE_NUMBER:return 14;case QRMode.MODE_ALPHA_NUM:return 13;case QRMode.MODE_8BIT_BYTE:return 16;case QRMode.MODE_KANJI:return 12;default:throw new Error(\"mode:\"+mode);}}else{throw new Error(\"type:\"+type);}},getLostPoint:function(qrCode){var moduleCount=qrCode.getModuleCount();var lostPoint=0;for(var row=0;row<moduleCount;row++){for(var col=0;col<moduleCount;col++){var sameCount=0;var dark=qrCode.isDark(row,col);for(var r=-1;r<=1;r++){if(row+r<0||moduleCount<=row+r){continue;}\n\tfor(var c=-1;c<=1;c++){if(col+c<0||moduleCount<=col+c){continue;}\n\tif(r==0&&c==0){continue;}\n\tif(dark==qrCode.isDark(row+r,col+c)){sameCount++;}}}\n\tif(sameCount>5){lostPoint+=(3+sameCount-5);}}}\n\tfor(var row=0;row<moduleCount-1;row++){for(var col=0;col<moduleCount-1;col++){var count=0;if(qrCode.isDark(row,col))count++;if(qrCode.isDark(row+1,col))count++;if(qrCode.isDark(row,col+1))count++;if(qrCode.isDark(row+1,col+1))count++;if(count==0||count==4){lostPoint+=3;}}}\n\tfor(var row=0;row<moduleCount;row++){for(var col=0;col<moduleCount-6;col++){if(qrCode.isDark(row,col)&&!qrCode.isDark(row,col+1)&&qrCode.isDark(row,col+2)&&qrCode.isDark(row,col+3)&&qrCode.isDark(row,col+4)&&!qrCode.isDark(row,col+5)&&qrCode.isDark(row,col+6)){lostPoint+=40;}}}\n\tfor(var col=0;col<moduleCount;col++){for(var row=0;row<moduleCount-6;row++){if(qrCode.isDark(row,col)&&!qrCode.isDark(row+1,col)&&qrCode.isDark(row+2,col)&&qrCode.isDark(row+3,col)&&qrCode.isDark(row+4,col)&&!qrCode.isDark(row+5,col)&&qrCode.isDark(row+6,col)){lostPoint+=40;}}}\n\tvar darkCount=0;for(var col=0;col<moduleCount;col++){for(var row=0;row<moduleCount;row++){if(qrCode.isDark(row,col)){darkCount++;}}}\n\tvar ratio=Math.abs(100*darkCount/moduleCount/moduleCount-50)/5;lostPoint+=ratio*10;return lostPoint;}};var QRMath={glog:function(n){if(n<1){throw new Error(\"glog(\"+n+\")\");}\n\treturn QRMath.LOG_TABLE[n];},gexp:function(n){while(n<0){n+=255;}\n\twhile(n>=256){n-=255;}\n\treturn QRMath.EXP_TABLE[n];},EXP_TABLE:new Array(256),LOG_TABLE:new Array(256)};for(var i=0;i<8;i++){QRMath.EXP_TABLE[i]=1<<i;}\n\tfor(var i=8;i<256;i++){QRMath.EXP_TABLE[i]=QRMath.EXP_TABLE[i-4]^QRMath.EXP_TABLE[i-5]^QRMath.EXP_TABLE[i-6]^QRMath.EXP_TABLE[i-8];}\n\tfor(var i=0;i<255;i++){QRMath.LOG_TABLE[QRMath.EXP_TABLE[i]]=i;}\n\tfunction QRPolynomial(num,shift){if(num.length==undefined){throw new Error(num.length+\"/\"+shift);}\n\tvar offset=0;while(offset<num.length&&num[offset]==0){offset++;}\n\tthis.num=new Array(num.length-offset+shift);for(var i=0;i<num.length-offset;i++){this.num[i]=num[i+offset];}}\n\tQRPolynomial.prototype={get:function(index){return this.num[index];},getLength:function(){return this.num.length;},multiply:function(e){var num=new Array(this.getLength()+e.getLength()-1);for(var i=0;i<this.getLength();i++){for(var j=0;j<e.getLength();j++){num[i+j]^=QRMath.gexp(QRMath.glog(this.get(i))+QRMath.glog(e.get(j)));}}\n\treturn new QRPolynomial(num,0);},mod:function(e){if(this.getLength()-e.getLength()<0){return this;}\n\tvar ratio=QRMath.glog(this.get(0))-QRMath.glog(e.get(0));var num=new Array(this.getLength());for(var i=0;i<this.getLength();i++){num[i]=this.get(i);}\n\tfor(var i=0;i<e.getLength();i++){num[i]^=QRMath.gexp(QRMath.glog(e.get(i))+ratio);}\n\treturn new QRPolynomial(num,0).mod(e);}};function QRRSBlock(totalCount,dataCount){this.totalCount=totalCount;this.dataCount=dataCount;}\n\tQRRSBlock.RS_BLOCK_TABLE=[[1,26,19],[1,26,16],[1,26,13],[1,26,9],[1,44,34],[1,44,28],[1,44,22],[1,44,16],[1,70,55],[1,70,44],[2,35,17],[2,35,13],[1,100,80],[2,50,32],[2,50,24],[4,25,9],[1,134,108],[2,67,43],[2,33,15,2,34,16],[2,33,11,2,34,12],[2,86,68],[4,43,27],[4,43,19],[4,43,15],[2,98,78],[4,49,31],[2,32,14,4,33,15],[4,39,13,1,40,14],[2,121,97],[2,60,38,2,61,39],[4,40,18,2,41,19],[4,40,14,2,41,15],[2,146,116],[3,58,36,2,59,37],[4,36,16,4,37,17],[4,36,12,4,37,13],[2,86,68,2,87,69],[4,69,43,1,70,44],[6,43,19,2,44,20],[6,43,15,2,44,16],[4,101,81],[1,80,50,4,81,51],[4,50,22,4,51,23],[3,36,12,8,37,13],[2,116,92,2,117,93],[6,58,36,2,59,37],[4,46,20,6,47,21],[7,42,14,4,43,15],[4,133,107],[8,59,37,1,60,38],[8,44,20,4,45,21],[12,33,11,4,34,12],[3,145,115,1,146,116],[4,64,40,5,65,41],[11,36,16,5,37,17],[11,36,12,5,37,13],[5,109,87,1,110,88],[5,65,41,5,66,42],[5,54,24,7,55,25],[11,36,12],[5,122,98,1,123,99],[7,73,45,3,74,46],[15,43,19,2,44,20],[3,45,15,13,46,16],[1,135,107,5,136,108],[10,74,46,1,75,47],[1,50,22,15,51,23],[2,42,14,17,43,15],[5,150,120,1,151,121],[9,69,43,4,70,44],[17,50,22,1,51,23],[2,42,14,19,43,15],[3,141,113,4,142,114],[3,70,44,11,71,45],[17,47,21,4,48,22],[9,39,13,16,40,14],[3,135,107,5,136,108],[3,67,41,13,68,42],[15,54,24,5,55,25],[15,43,15,10,44,16],[4,144,116,4,145,117],[17,68,42],[17,50,22,6,51,23],[19,46,16,6,47,17],[2,139,111,7,140,112],[17,74,46],[7,54,24,16,55,25],[34,37,13],[4,151,121,5,152,122],[4,75,47,14,76,48],[11,54,24,14,55,25],[16,45,15,14,46,16],[6,147,117,4,148,118],[6,73,45,14,74,46],[11,54,24,16,55,25],[30,46,16,2,47,17],[8,132,106,4,133,107],[8,75,47,13,76,48],[7,54,24,22,55,25],[22,45,15,13,46,16],[10,142,114,2,143,115],[19,74,46,4,75,47],[28,50,22,6,51,23],[33,46,16,4,47,17],[8,152,122,4,153,123],[22,73,45,3,74,46],[8,53,23,26,54,24],[12,45,15,28,46,16],[3,147,117,10,148,118],[3,73,45,23,74,46],[4,54,24,31,55,25],[11,45,15,31,46,16],[7,146,116,7,147,117],[21,73,45,7,74,46],[1,53,23,37,54,24],[19,45,15,26,46,16],[5,145,115,10,146,116],[19,75,47,10,76,48],[15,54,24,25,55,25],[23,45,15,25,46,16],[13,145,115,3,146,116],[2,74,46,29,75,47],[42,54,24,1,55,25],[23,45,15,28,46,16],[17,145,115],[10,74,46,23,75,47],[10,54,24,35,55,25],[19,45,15,35,46,16],[17,145,115,1,146,116],[14,74,46,21,75,47],[29,54,24,19,55,25],[11,45,15,46,46,16],[13,145,115,6,146,116],[14,74,46,23,75,47],[44,54,24,7,55,25],[59,46,16,1,47,17],[12,151,121,7,152,122],[12,75,47,26,76,48],[39,54,24,14,55,25],[22,45,15,41,46,16],[6,151,121,14,152,122],[6,75,47,34,76,48],[46,54,24,10,55,25],[2,45,15,64,46,16],[17,152,122,4,153,123],[29,74,46,14,75,47],[49,54,24,10,55,25],[24,45,15,46,46,16],[4,152,122,18,153,123],[13,74,46,32,75,47],[48,54,24,14,55,25],[42,45,15,32,46,16],[20,147,117,4,148,118],[40,75,47,7,76,48],[43,54,24,22,55,25],[10,45,15,67,46,16],[19,148,118,6,149,119],[18,75,47,31,76,48],[34,54,24,34,55,25],[20,45,15,61,46,16]];QRRSBlock.getRSBlocks=function(typeNumber,errorCorrectLevel){var rsBlock=QRRSBlock.getRsBlockTable(typeNumber,errorCorrectLevel);if(rsBlock==undefined){throw new Error(\"bad rs block @ typeNumber:\"+typeNumber+\"/errorCorrectLevel:\"+errorCorrectLevel);}\n\tvar length=rsBlock.length/3;var list=[];for(var i=0;i<length;i++){var count=rsBlock[i*3+0];var totalCount=rsBlock[i*3+1];var dataCount=rsBlock[i*3+2];for(var j=0;j<count;j++){list.push(new QRRSBlock(totalCount,dataCount));}}\n\treturn list;};QRRSBlock.getRsBlockTable=function(typeNumber,errorCorrectLevel){switch(errorCorrectLevel){case QRErrorCorrectLevel.L:return QRRSBlock.RS_BLOCK_TABLE[(typeNumber-1)*4+0];case QRErrorCorrectLevel.M:return QRRSBlock.RS_BLOCK_TABLE[(typeNumber-1)*4+1];case QRErrorCorrectLevel.Q:return QRRSBlock.RS_BLOCK_TABLE[(typeNumber-1)*4+2];case QRErrorCorrectLevel.H:return QRRSBlock.RS_BLOCK_TABLE[(typeNumber-1)*4+3];default:return undefined;}};function QRBitBuffer(){this.buffer=[];this.length=0;}\n\tQRBitBuffer.prototype={get:function(index){var bufIndex=Math.floor(index/8);return((this.buffer[bufIndex]>>>(7-index%8))&1)==1;},put:function(num,length){for(var i=0;i<length;i++){this.putBit(((num>>>(length-i-1))&1)==1);}},getLengthInBits:function(){return this.length;},putBit:function(bit){var bufIndex=Math.floor(this.length/8);if(this.buffer.length<=bufIndex){this.buffer.push(0);}\n\tif(bit){this.buffer[bufIndex]|=(0x80>>>(this.length%8));}\n\tthis.length++;}};var QRCodeLimitLength=[[17,14,11,7],[32,26,20,14],[53,42,32,24],[78,62,46,34],[106,84,60,44],[134,106,74,58],[154,122,86,64],[192,152,108,84],[230,180,130,98],[271,213,151,119],[321,251,177,137],[367,287,203,155],[425,331,241,177],[458,362,258,194],[520,412,292,220],[586,450,322,250],[644,504,364,280],[718,560,394,310],[792,624,442,338],[858,666,482,382],[929,711,509,403],[1003,779,565,439],[1091,857,611,461],[1171,911,661,511],[1273,997,715,535],[1367,1059,751,593],[1465,1125,805,625],[1528,1190,868,658],[1628,1264,908,698],[1732,1370,982,742],[1840,1452,1030,790],[1952,1538,1112,842],[2068,1628,1168,898],[2188,1722,1228,958],[2303,1809,1283,983],[2431,1911,1351,1051],[2563,1989,1423,1093],[2699,2099,1499,1139],[2809,2213,1579,1219],[2953,2331,1663,1273]];\n\n\tfunction _isSupportCanvas() {\n\t\treturn typeof CanvasRenderingContext2D != \"undefined\";\n\t}\n\n\t// android 2.x doesn't support Data-URI spec\n\tfunction _getAndroid() {\n\t\tvar android = false;\n\t\tvar sAgent = navigator.userAgent;\n\n\t\tif (/android/i.test(sAgent)) { // android\n\t\t\tandroid = true;\n\t\t\tvar aMat = sAgent.toString().match(/android ([0-9]\\.[0-9])/i);\n\n\t\t\tif (aMat && aMat[1]) {\n\t\t\t\tandroid = parseFloat(aMat[1]);\n\t\t\t}\n\t\t}\n\n\t\treturn android;\n\t}\n\n\tvar svgDrawer = (function() {\n\n\t\tvar Drawing = function (el, htOption) {\n\t\t\tthis._el = el;\n\t\t\tthis._htOption = htOption;\n\t\t};\n\n\t\tDrawing.prototype.draw = function (oQRCode) {\n\t\t\tvar _htOption = this._htOption;\n\t\t\tvar _el = this._el;\n\t\t\tvar nCount = oQRCode.getModuleCount();\n\t\t\tvar nWidth = Math.floor(_htOption.width / nCount);\n\t\t\tvar nHeight = Math.floor(_htOption.height / nCount);\n\n\t\t\tthis.clear();\n\n\t\t\tfunction makeSVG(tag, attrs) {\n\t\t\t\tvar el = document.createElementNS('http://www.w3.org/2000/svg', tag);\n\t\t\t\tfor (var k in attrs)\n\t\t\t\t\tif (attrs.hasOwnProperty(k)) el.setAttribute(k, attrs[k]);\n\t\t\t\treturn el;\n\t\t\t}\n\n\t\t\tvar svg = makeSVG(\"svg\" , {'viewBox': '0 0 ' + String(nCount) + \" \" + String(nCount), 'width': '100%', 'height': '100%', 'fill': _htOption.colorLight});\n\t\t\tsvg.setAttributeNS(\"http://www.w3.org/2000/xmlns/\", \"xmlns:xlink\", \"http://www.w3.org/1999/xlink\");\n\t\t\t_el.appendChild(svg);\n\n\t\t\tsvg.appendChild(makeSVG(\"rect\", {\"fill\": _htOption.colorLight, \"width\": \"100%\", \"height\": \"100%\"}));\n\t\t\tsvg.appendChild(makeSVG(\"rect\", {\"fill\": _htOption.colorDark, \"width\": \"1\", \"height\": \"1\", \"id\": \"template\"}));\n\n\t\t\tfor (var row = 0; row < nCount; row++) {\n\t\t\t\tfor (var col = 0; col < nCount; col++) {\n\t\t\t\t\tif (oQRCode.isDark(row, col)) {\n\t\t\t\t\t\tvar child = makeSVG(\"use\", {\"x\": String(col), \"y\": String(row)});\n\t\t\t\t\t\tchild.setAttributeNS(\"http://www.w3.org/1999/xlink\", \"href\", \"#template\")\n\t\t\t\t\t\tsvg.appendChild(child);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t};\n\t\tDrawing.prototype.clear = function () {\n\t\t\twhile (this._el.hasChildNodes())\n\t\t\t\tthis._el.removeChild(this._el.lastChild);\n\t\t};\n\t\treturn Drawing;\n\t})();\n\n\tvar useSVG = document.documentElement.tagName.toLowerCase() === \"svg\";\n\n\t// Drawing in DOM by using Table tag\n\tvar Drawing = useSVG ? svgDrawer : !_isSupportCanvas() ? (function () {\n\t\tvar Drawing = function (el, htOption) {\n\t\t\tthis._el = el;\n\t\t\tthis._htOption = htOption;\n\t\t};\n\n\t\t/**\n\t\t * Draw the QRCode\n\t\t *\n\t\t * @param {QRCode} oQRCode\n\t\t */\n\t\tDrawing.prototype.draw = function (oQRCode) {\n var _htOption = this._htOption;\n var _el = this._el;\n\t\t\tvar nCount = oQRCode.getModuleCount();\n\t\t\tvar nWidth = Math.floor(_htOption.width / nCount);\n\t\t\tvar nHeight = Math.floor(_htOption.height / nCount);\n\t\t\tvar aHTML = ['<table style=\"border:0;border-collapse:collapse;\">'];\n\n\t\t\tfor (var row = 0; row < nCount; row++) {\n\t\t\t\taHTML.push('<tr>');\n\n\t\t\t\tfor (var col = 0; col < nCount; col++) {\n\t\t\t\t\taHTML.push('<td style=\"border:0;border-collapse:collapse;padding:0;margin:0;width:' + nWidth + 'px;height:' + nHeight + 'px;background-color:' + (oQRCode.isDark(row, col) ? _htOption.colorDark : _htOption.colorLight) + ';\"></td>');\n\t\t\t\t}\n\n\t\t\t\taHTML.push('</tr>');\n\t\t\t}\n\n\t\t\taHTML.push('</table>');\n\t\t\t_el.innerHTML = aHTML.join('');\n\n\t\t\t// Fix the margin values as real size.\n\t\t\tvar elTable = _el.childNodes[0];\n\t\t\tvar nLeftMarginTable = (_htOption.width - elTable.offsetWidth) / 2;\n\t\t\tvar nTopMarginTable = (_htOption.height - elTable.offsetHeight) / 2;\n\n\t\t\tif (nLeftMarginTable > 0 && nTopMarginTable > 0) {\n\t\t\t\telTable.style.margin = nTopMarginTable + \"px \" + nLeftMarginTable + \"px\";\n\t\t\t}\n\t\t};\n\n\t\t/**\n\t\t * Clear the QRCode\n\t\t */\n\t\tDrawing.prototype.clear = function () {\n\t\t\tthis._el.innerHTML = '';\n\t\t};\n\n\t\treturn Drawing;\n\t})() : (function () { // Drawing in Canvas\n\t\tfunction _onMakeImage() {\n\t\t\tthis._elImage.src = this._elCanvas.toDataURL(\"image/png\");\n\t\t\tthis._elImage.style.display = \"block\";\n\t\t\tthis._elCanvas.style.display = \"none\";\n\t\t}\n\n\t\t// Android 2.1 bug workaround\n\t\t// http://code.google.com/p/android/issues/detail?id=5141\n\t\tif (this._android && this._android <= 2.1) {\n\t \tvar factor = 1 / window.devicePixelRatio;\n\t var drawImage = CanvasRenderingContext2D.prototype.drawImage;\n\t \tCanvasRenderingContext2D.prototype.drawImage = function (image, sx, sy, sw, sh, dx, dy, dw, dh) {\n\t \t\tif ((\"nodeName\" in image) && /img/i.test(image.nodeName)) {\n\t\t \tfor (var i = arguments.length - 1; i >= 1; i--) {\n\t\t \targuments[i] = arguments[i] * factor;\n\t\t \t}\n\t \t\t} else if (typeof dw == \"undefined\") {\n\t \t\t\targuments[1] *= factor;\n\t \t\t\targuments[2] *= factor;\n\t \t\t\targuments[3] *= factor;\n\t \t\t\targuments[4] *= factor;\n\t \t\t}\n\n\t \tdrawImage.apply(this, arguments);\n\t \t};\n\t\t}\n\n\t\t/**\n\t\t * Check whether the user's browser supports Data URI or not\n\t\t *\n\t\t * @private\n\t\t * @param {Function} fSuccess Occurs if it supports Data URI\n\t\t * @param {Function} fFail Occurs if it doesn't support Data URI\n\t\t */\n\t\tfunction _safeSetDataURI(fSuccess, fFail) {\n var self = this;\n self._fFail = fFail;\n self._fSuccess = fSuccess;\n\n // Check it just once\n if (self._bSupportDataURI === null) {\n var el = document.createElement(\"img\");\n var fOnError = function() {\n self._bSupportDataURI = false;\n\n if (self._fFail) {\n self._fFail.call(self);\n }\n };\n var fOnSuccess = function() {\n self._bSupportDataURI = true;\n\n if (self._fSuccess) {\n self._fSuccess.call(self);\n }\n };\n\n el.onabort = fOnError;\n el.onerror = fOnError;\n el.onload = fOnSuccess;\n el.src = \"data:image/gif;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAAHElEQVQI12P4//8/w38GIAXDIBKE0DHxgljNBAAO9TXL0Y4OHwAAAABJRU5ErkJggg==\"; // the Image contains 1px data.\n return;\n } else if (self._bSupportDataURI === true && self._fSuccess) {\n self._fSuccess.call(self);\n } else if (self._bSupportDataURI === false && self._fFail) {\n self._fFail.call(self);\n }\n\t\t};\n\n\t\t/**\n\t\t * Drawing QRCode by using canvas\n\t\t *\n\t\t * @constructor\n\t\t * @param {HTMLElement} el\n\t\t * @param {Object} htOption QRCode Options\n\t\t */\n\t\tvar Drawing = function (el, htOption) {\n \t\tthis._bIsPainted = false;\n \t\tthis._android = _getAndroid();\n\n\t\t\tthis._htOption = htOption;\n\t\t\tthis._elCanvas = document.createElement(\"canvas\");\n\t\t\tthis._elCanvas.width = htOption.width;\n\t\t\tthis._elCanvas.height = htOption.height;\n\t\t\tel.appendChild(this._elCanvas);\n\t\t\tthis._el = el;\n\t\t\tthis._oContext = this._elCanvas.getContext(\"2d\");\n\t\t\tthis._bIsPainted = false;\n\t\t\tthis._elImage = document.createElement(\"img\");\n\t\t\tthis._elImage.alt = \"Scan me!\";\n\t\t\tthis._elImage.style.display = \"none\";\n\t\t\tthis._el.appendChild(this._elImage);\n\t\t\tthis._bSupportDataURI = null;\n\t\t};\n\n\t\t/**\n\t\t * Draw the QRCode\n\t\t *\n\t\t * @param {QRCode} oQRCode\n\t\t */\n\t\tDrawing.prototype.draw = function (oQRCode) {\n var _elImage = this._elImage;\n var _oContext = this._oContext;\n var _htOption = this._htOption;\n\n\t\t\tvar nCount = oQRCode.getModuleCount();\n\t\t\tvar nWidth = _htOption.width / nCount;\n\t\t\tvar nHeight = _htOption.height / nCount;\n\t\t\tvar nRoundedWidth = Math.round(nWidth);\n\t\t\tvar nRoundedHeight = Math.round(nHeight);\n\n\t\t\t_elImage.style.display = \"none\";\n\t\t\tthis.clear();\n\n\t\t\tfor (var row = 0; row < nCount; row++) {\n\t\t\t\tfor (var col = 0; col < nCount; col++) {\n\t\t\t\t\tvar bIsDark = oQRCode.isDark(row, col);\n\t\t\t\t\tvar nLeft = col * nWidth;\n\t\t\t\t\tvar nTop = row * nHeight;\n\t\t\t\t\t_oContext.strokeStyle = bIsDark ? _htOption.colorDark : _htOption.colorLight;\n\t\t\t\t\t_oContext.lineWidth = 1;\n\t\t\t\t\t_oContext.fillStyle = bIsDark ? _htOption.colorDark : _htOption.colorLight;\n\t\t\t\t\t_oContext.fillRect(nLeft, nTop, nWidth, nHeight);\n\n\t\t\t\t\t// 안티 앨리어싱 방지 처리\n\t\t\t\t\t_oContext.strokeRect(\n\t\t\t\t\t\tMath.floor(nLeft) + 0.5,\n\t\t\t\t\t\tMath.floor(nTop) + 0.5,\n\t\t\t\t\t\tnRoundedWidth,\n\t\t\t\t\t\tnRoundedHeight\n\t\t\t\t\t);\n\n\t\t\t\t\t_oContext.strokeRect(\n\t\t\t\t\t\tMath.ceil(nLeft) - 0.5,\n\t\t\t\t\t\tMath.ceil(nTop) - 0.5,\n\t\t\t\t\t\tnRoundedWidth,\n\t\t\t\t\t\tnRoundedHeight\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tthis._bIsPainted = true;\n\t\t};\n\n\t\t/**\n\t\t * Make the image from Canvas if the browser supports Data URI.\n\t\t */\n\t\tDrawing.prototype.makeImage = function () {\n\t\t\tif (this._bIsPainted) {\n\t\t\t\t_safeSetDataURI.call(this, _onMakeImage);\n\t\t\t}\n\t\t};\n\n\t\t/**\n\t\t * Return whether the QRCode is painted or not\n\t\t *\n\t\t * @return {Boolean}\n\t\t */\n\t\tDrawing.prototype.isPainted = function () {\n\t\t\treturn this._bIsPainted;\n\t\t};\n\n\t\t/**\n\t\t * Clear the QRCode\n\t\t */\n\t\tDrawing.prototype.clear = function () {\n\t\t\tthis._oContext.clearRect(0, 0, this._elCanvas.width, this._elCanvas.height);\n\t\t\tthis._bIsPainted = false;\n\t\t};\n\n\t\t/**\n\t\t * @private\n\t\t * @param {Number} nNumber\n\t\t */\n\t\tDrawing.prototype.round = function (nNumber) {\n\t\t\tif (!nNumber) {\n\t\t\t\treturn nNumber;\n\t\t\t}\n\n\t\t\treturn Math.floor(nNumber * 1000) / 1000;\n\t\t};\n\n\t\treturn Drawing;\n\t})();\n\n\t/**\n\t * Get the type by string length\n\t *\n\t * @private\n\t * @param {String} sText\n\t * @param {Number} nCorrectLevel\n\t * @return {Number} type\n\t */\n\tfunction _getTypeNumber(sText, nCorrectLevel) {\n\t\tvar nType = 1;\n\t\tvar length = _getUTF8Length(sText);\n\n\t\tfor (var i = 0, len = QRCodeLimitLength.length; i <= len; i++) {\n\t\t\tvar nLimit = 0;\n\n\t\t\tswitch (nCorrectLevel) {\n\t\t\t\tcase QRErrorCorrectLevel.L :\n\t\t\t\t\tnLimit = QRCodeLimitLength[i][0];\n\t\t\t\t\tbreak;\n\t\t\t\tcase QRErrorCorrectLevel.M :\n\t\t\t\t\tnLimit = QRCodeLimitLength[i][1];\n\t\t\t\t\tbreak;\n\t\t\t\tcase QRErrorCorrectLevel.Q :\n\t\t\t\t\tnLimit = QRCodeLimitLength[i][2];\n\t\t\t\t\tbreak;\n\t\t\t\tcase QRErrorCorrectLevel.H :\n\t\t\t\t\tnLimit = QRCodeLimitLength[i][3];\n\t\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\tif (length <= nLimit) {\n\t\t\t\tbreak;\n\t\t\t} else {\n\t\t\t\tnType++;\n\t\t\t}\n\t\t}\n\n\t\tif (nType > QRCodeLimitLength.length) {\n\t\t\tthrow new Error(\"Too long data\");\n\t\t}\n\n\t\treturn nType;\n\t}\n\n\tfunction _getUTF8Length(sText) {\n\t\tvar replacedText = encodeURI(sText).toString().replace(/\\%[0-9a-fA-F]{2}/g, 'a');\n\t\treturn replacedText.length + (replacedText.length != sText ? 3 : 0);\n\t}\n\n\t/**\n\t * @class QRCode\n\t * @constructor\n\t * @example\n\t * new QRCode(document.getElementById(\"test\"), \"http://jindo.dev.naver.com/collie\");\n\t *\n\t * @example\n\t * var oQRCode = new QRCode(\"test\", {\n\t * text : \"http://naver.com\",\n\t * width : 128,\n\t * height : 128\n\t * });\n\t *\n\t * oQRCode.clear(); // Clear the QRCode.\n\t * oQRCode.makeCode(\"http://map.naver.com\"); // Re-create the QRCode.\n\t *\n\t * @param {HTMLElement|String} el target element or 'id' attribute of element.\n\t * @param {Object|String} vOption\n\t * @param {String} vOption.text QRCode link data\n\t * @param {Number} [vOption.width=256]\n\t * @param {Number} [vOption.height=256]\n\t * @param {String} [vOption.colorDark=\"#000000\"]\n\t * @param {String} [vOption.colorLight=\"#ffffff\"]\n\t * @param {QRCode.CorrectLevel} [vOption.correctLevel=QRCode.CorrectLevel.H] [L|M|Q|H]\n\t */\n\tQRCode = function (el, vOption) {\n\t\tthis._htOption = {\n\t\t\twidth : 256,\n\t\t\theight : 256,\n\t\t\ttypeNumber : 4,\n\t\t\tcolorDark : \"#000000\",\n\t\t\tcolorLight : \"#ffffff\",\n\t\t\tcorrectLevel : QRErrorCorrectLevel.H\n\t\t};\n\n\t\tif (typeof vOption === 'string') {\n\t\t\tvOption\t= {\n\t\t\t\ttext : vOption\n\t\t\t};\n\t\t}\n\n\t\t// Overwrites options\n\t\tif (vOption) {\n\t\t\tfor (var i in vOption) {\n\t\t\t\tthis._htOption[i] = vOption[i];\n\t\t\t}\n\t\t}\n\n\t\tif (typeof el == \"string\") {\n\t\t\tel = document.getElementById(el);\n\t\t}\n\n\t\tif (this._htOption.useSVG) {\n\t\t\tDrawing = svgDrawer;\n\t\t}\n\n\t\tthis._android = _getAndroid();\n\t\tthis._el = el;\n\t\tthis._oQRCode = null;\n\t\tthis._oDrawing = new Drawing(this._el, this._htOption);\n\n\t\tif (this._htOption.text) {\n\t\t\tthis.makeCode(this._htOption.text);\n\t\t}\n\t};\n\n\t/**\n\t * Make the QRCode\n\t *\n\t * @param {String} sText link data\n\t */\n\tQRCode.prototype.makeCode = function (sText) {\n\t\tthis._oQRCode = new QRCodeModel(_getTypeNumber(sText, this._htOption.correctLevel), this._htOption.correctLevel);\n\t\tthis._oQRCode.addData(sText);\n\t\tthis._oQRCode.make();\n\t\tthis._el.title = sText;\n\t\tthis._oDrawing.draw(this._oQRCode);\n\t\tthis.makeImage();\n\t};\n\n\t/**\n\t * Make the Image from Canvas element\n\t * - It occurs automatically\n\t * - Android below 3 doesn't support Data-URI spec.\n\t *\n\t * @private\n\t */\n\tQRCode.prototype.makeImage = function () {\n\t\tif (typeof this._oDrawing.makeImage == \"function\" && (!this._android || this._android >= 3)) {\n\t\t\tthis._oDrawing.makeImage();\n\t\t}\n\t};\n\n\t/**\n\t * Clear the QRCode\n\t */\n\tQRCode.prototype.clear = function () {\n\t\tthis._oDrawing.clear();\n\t};\n\n\t/**\n\t * @name QRCode.CorrectLevel\n\t */\n\tQRCode.CorrectLevel = QRErrorCorrectLevel;\n\t\n\treturn QRCode;\n\t\n}));\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';\nexport { Subject } from './internal/Subject';\nexport { BehaviorSubject } from './internal/BehaviorSubject';\nexport { ReplaySubject } from './internal/ReplaySubject';\nexport { AsyncSubject } from './internal/AsyncSubject';\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';\nexport { Subscription } from './internal/Subscription';\nexport { Subscriber } from './internal/Subscriber';\nexport { Notification } from './internal/Notification';\nexport { pipe } from './internal/util/pipe';\nexport { noop } from './internal/util/noop';\nexport { identity } from './internal/util/identity';\nexport { isObservable } from './internal/util/isObservable';\nexport { ArgumentOutOfRangeError } from './internal/util/ArgumentOutOfRangeError';\nexport { EmptyError } from './internal/util/EmptyError';\nexport { ObjectUnsubscribedError } from './internal/util/ObjectUnsubscribedError';\nexport { UnsubscriptionError } from './internal/util/UnsubscriptionError';\nexport { TimeoutError } from './internal/util/TimeoutError';\nexport { bindCallback } from './internal/observable/bindCallback';\nexport { bindNodeCallback } from './internal/observable/bindNodeCallback';\nexport { combineLatest } from './internal/observable/combineLatest';\nexport { concat } from './internal/observable/concat';\nexport { defer } from './internal/observable/defer';\nexport { empty } from './internal/observable/empty';\nexport { forkJoin } from './internal/observable/forkJoin';\nexport { from } from './internal/observable/from';\nexport { fromEvent } from './internal/observable/fromEvent';\nexport { fromEventPattern } from './internal/observable/fromEventPattern';\nexport { generate } from './internal/observable/generate';\nexport { iif } from './internal/observable/iif';\nexport { interval } from './internal/observable/interval';\nexport { merge } from './internal/observable/merge';\nexport { never } from './internal/observable/never';\nexport { of } from './internal/observable/of';\nexport { onErrorResumeNext } from './internal/observable/onErrorResumeNext';\nexport { pairs } from './internal/observable/pairs';\nexport { race } from './internal/observable/race';\nexport { range } from './internal/observable/range';\nexport { throwError } from './internal/observable/throwError';\nexport { timer } from './internal/observable/timer';\nexport { using } from './internal/observable/using';\nexport { zip } from './internal/observable/zip';\nexport { EMPTY } from './internal/observable/empty';\nexport { NEVER } from './internal/observable/never';\nexport { config } from './internal/config';\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';\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 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';\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 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';\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';\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 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 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 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 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 Notification.createNext = function (value) {\n if (typeof value !== 'undefined') {\n return new Notification('N', value);\n }\n return Notification.undefinedValueNotification;\n };\n Notification.createError = function (err) {\n return new Notification('E', undefined, err);\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';\nvar Observable = /*@__PURE__*/ (function () {\n function Observable(subscribe) {\n this._isScalar = false;\n if (subscribe) {\n this._subscribe = subscribe;\n }\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 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 || (config.useDeprecatedSynchronousErrorHandling && !sink.syncErrorThrowable) ?\n this._subscribe(sink) :\n this._trySubscribe(sink));\n }\n if (config.useDeprecatedSynchronousErrorHandling) {\n if (sink.syncErrorThrowable) {\n sink.syncErrorThrowable = false;\n if (sink.syncErrorThrown) {\n throw sink.syncErrorValue;\n }\n }\n }\n return sink;\n };\n 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 Observable.prototype.forEach = function (next, promiseCtor) {\n var _this = this;\n promiseCtor = getPromiseCtor(promiseCtor);\n return new promiseCtor(function (resolve, reject) {\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 Observable.prototype._subscribe = function (subscriber) {\n var source = this.source;\n return source && source.subscribe(subscriber);\n };\n Observable.prototype[Symbol_observable] = function () {\n return this;\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 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 Observable.create = function (subscribe) {\n return new Observable(subscribe);\n };\n return Observable;\n}());\nexport { Observable };\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';\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';\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 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 ReplaySubject.prototype._subscribe = function (subscriber) {\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 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","var 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 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 Scheduler.now = function () { return Date.now(); };\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';\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 };\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 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 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 Subject.create = function (destination, source) {\n return new AnonymousSubject(destination, source);\n };\n return Subject;\n}(Observable));\nexport { Subject };\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 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';\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';\nvar Subscriber = /*@__PURE__*/ (function (_super) {\n tslib_1.__extends(Subscriber, _super);\n function Subscriber(destinationOrNext, error, complete) {\n var _this = _super.call(this) || this;\n _this.syncErrorValue = null;\n _this.syncErrorThrown = false;\n _this.syncErrorThrowable = false;\n _this.isStopped = false;\n switch (arguments.length) {\n case 0:\n _this.destination = emptyObserver;\n break;\n case 1:\n if (!destinationOrNext) {\n _this.destination = emptyObserver;\n break;\n }\n if (typeof destinationOrNext === 'object') {\n if (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 Subscriber.create = function (next, error, complete) {\n var subscriber = new Subscriber(next, error, complete);\n subscriber.syncErrorThrowable = false;\n return subscriber;\n };\n Subscriber.prototype.next = function (value) {\n if (!this.isStopped) {\n this._next(value);\n }\n };\n Subscriber.prototype.error = function (err) {\n if (!this.isStopped) {\n this.isStopped = true;\n this._error(err);\n }\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 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 };\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 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';\nvar Subscription = /*@__PURE__*/ (function () {\n function Subscription(unsubscribe) {\n this.closed = false;\n this._parent = null;\n this._parents = null;\n this._subscriptions = null;\n if (unsubscribe) {\n this._unsubscribe = unsubscribe;\n }\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 this._subscriptions = null;\n var index = -1;\n var len = _parents ? _parents.length : 0;\n while (_parent) {\n _parent.remove(this);\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 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') {\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 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 Subscription.prototype._addParent = function (parent) {\n var _a = this, _parent = _a._parent, _parents = _a._parents;\n if (!_parent || _parent === parent) {\n this._parent = parent;\n }\n else if (!_parents) {\n this._parents = [parent];\n }\n else if (_parents.indexOf(parent) === -1) {\n _parents.push(parent);\n }\n };\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;\nexport var config = {\n Promise: undefined,\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';\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 _this._isComplete = false;\n return _this;\n }\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 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';\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 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 SubscribeOnObservable.dispatch = function (arg) {\n var source = arg.source, subscriber = arg.subscriber;\n return this.add(source.subscribe(subscriber));\n };\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';\nexport function bindCallback(callbackFunc, resultSelector, scheduler) {\n if (resultSelector) {\n if (isScheduler(resultSelector)) {\n scheduler = resultSelector;\n }\n else {\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';\nexport function bindNodeCallback(callbackFunc, resultSelector, scheduler) {\n if (resultSelector) {\n if (isScheduler(resultSelector)) {\n scheduler = resultSelector;\n }\n else {\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 = {};\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 (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 };\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';\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';\nimport { empty } from './empty';\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 _Observable PURE_IMPORTS_END */\nimport { Observable } from '../Observable';\nexport var EMPTY = /*@__PURE__*/ new Observable(function (subscriber) { return subscriber.complete(); });\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';\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 resultSelector = sources.pop();\n }\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 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}\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_isInteropObservable,_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 { isInteropObservable } from '../util/isInteropObservable';\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 (isInteropObservable(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;\nexport function fromEvent(target, eventName, options, resultSelector) {\n if (isFunction(options)) {\n resultSelector = options;\n options = undefined;\n }\n if (resultSelector) {\n return fromEvent(target, eventName, options).pipe(map(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';\nexport function fromEventPattern(addHandler, removeHandler, resultSelector) {\n if (resultSelector) {\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 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';\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';\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';\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';\nexport var NEVER = /*@__PURE__*/ new Observable(noop);\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';\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';\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}\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 (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 };\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';\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 var current = start;\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(current++);\n if (subscriber.closed) {\n break;\n }\n } while (true);\n }\n return undefined;\n });\n}\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';\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';\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';\nimport { EMPTY } from './empty';\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';\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 };\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--;\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 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 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}());\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 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';\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}());\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 || 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';\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';\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}());\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';\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}());\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));\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';\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}());\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 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';\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}());\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';\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}());\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 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';\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}());\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 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 = {};\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 (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';\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';\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';\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';\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';\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}());\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';\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}());\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.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';\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}());\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.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';\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}());\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';\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}());\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 this.unsubscribe();\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';\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}());\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 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 if (subscriptionIdx !== -1) {\n this.delayNotifierSubscriptions.splice(subscriptionIdx, 1);\n }\n return subscription.outerValue;\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 };\n DelayWhenSubscriber.prototype.tryComplete = function () {\n if (this.completed && this.delayNotifierSubscriptions.length === 0) {\n this.destination.complete();\n }\n };\n return DelayWhenSubscriber;\n}(OuterSubscriber));\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 SubscriptionDelayObservable.prototype._subscribe = function (subscriber) {\n this.subscriptionDelay.subscribe(new SubscriptionDelaySubscriber(subscriber, this.source));\n };\n return SubscriptionDelayObservable;\n}(Observable));\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';\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}());\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';\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}());\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';\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}());\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';\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';\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 _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';\nexport function endWith() {\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(source, scalar(array[0]));\n }\n else if (len > 0) {\n return concatStatic(source, fromArray(array, scheduler));\n }\n else {\n return concatStatic(source, empty(scheduler));\n }\n };\n}\n//# sourceMappingURL=endWith.js.map\n","/** PURE_IMPORTS_START tslib,_Subscriber PURE_IMPORTS_END */\nimport * as tslib_1 from \"tslib\";\nimport { Subscriber } from '../Subscriber';\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}());\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';\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}());\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';\nexport function exhaustMap(project, resultSelector) {\n if (resultSelector) {\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}());\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';\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 };\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';\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}());\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 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';\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}());\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';\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 };\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';\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';\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';\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}());\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));\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 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));\nvar GroupedObservable = /*@__PURE__*/ (function (_super) {\n tslib_1.__extends(GroupedObservable, _super);\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 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 };\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';\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}());\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 };\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}());\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';\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';\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 };\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 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';\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}());\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';\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}());\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';\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';\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';\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';\nexport function mergeMap(project, resultSelector, concurrent) {\n if (concurrent === void 0) {\n concurrent = Number.POSITIVE_INFINITY;\n }\n if (typeof resultSelector === 'function') {\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 };\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';\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';\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 };\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';\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';\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';\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 };\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 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';\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}\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';\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}());\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';\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';\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';\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';\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';\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';\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 (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';\nexport function reduce(accumulator, seed) {\n if (arguments.length >= 2) {\n return function reduceOperatorFunctionWithSeed(source) {\n return pipe(scan(accumulator, seed), takeLast(1), defaultIfEmpty(seed))(source);\n };\n }\n return function reduceOperatorFunction(source) {\n return pipe(scan(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 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';\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}());\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';\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}());\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 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 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';\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}());\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';\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}());\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 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';\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}());\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';\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}());\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';\nexport function scan(accumulator, seed) {\n var hasSeed = false;\n if (arguments.length >= 2) {\n hasSeed = true;\n }\n return function scanOperatorFunction(source) {\n return source.lift(new ScanOperator(accumulator, seed, hasSeed));\n };\n}\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}());\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';\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 };\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}\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';\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';\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}());\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';\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}());\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';\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 return source.subscribe(new Subscriber(subscriber));\n }\n else {\n return source.subscribe(new SkipLastSubscriber(subscriber, this._skipCount));\n }\n };\n return SkipLastOperator;\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';\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}());\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 if (this.innerSubscription) {\n this.innerSubscription.unsubscribe();\n }\n };\n SkipUntilSubscriber.prototype.notifyComplete = function () {\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';\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}());\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';\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';\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';\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}());\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';\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';\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}());\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';\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}());\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';\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}());\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 };\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';\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}());\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';\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}());\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};\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}());\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';\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}());\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';\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(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';\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';\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}());\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 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 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';\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}\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';\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}());\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 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';\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}());\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));\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';\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}());\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 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';\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}());\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';\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}());\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 };\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';\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';\nvar Action = /*@__PURE__*/ (function (_super) {\n tslib_1.__extends(Action, _super);\n function Action(scheduler, work) {\n return _super.call(this) || this;\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';\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 !== null && delay > 0) {\n return _super.prototype.requestAsyncId.call(this, scheduler, id, delay);\n }\n scheduler.actions.push(this);\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 !== null && delay > 0) || (delay === null && this.delay > 0)) {\n return _super.prototype.recycleAsyncId.call(this, scheduler, id, delay);\n }\n if (scheduler.actions.length === 0) {\n cancelAnimationFrame(id);\n scheduler.scheduled = undefined;\n }\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';\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 !== null && delay > 0) {\n return _super.prototype.requestAsyncId.call(this, scheduler, id, delay);\n }\n scheduler.actions.push(this);\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 !== null && delay > 0) || (delay === null && this.delay > 0)) {\n return _super.prototype.recycleAsyncId.call(this, scheduler, id, delay);\n }\n if (scheduler.actions.length === 0) {\n Immediate.clearImmediate(id);\n scheduler.scheduled = undefined;\n }\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';\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 this.state = state;\n var id = this.id;\n var scheduler = this.scheduler;\n if (id != null) {\n this.id = this.recycleAsyncId(scheduler, id, delay);\n }\n this.pending = true;\n this.delay = delay;\n this.id = this.id || this.requestAsyncId(scheduler, this.id, delay);\n return this;\n };\n 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 (delay !== null && this.delay === delay && this.pending === false) {\n return id;\n }\n return clearInterval(id) && undefined || undefined;\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 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 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 _this.active = false;\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());\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';\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 !== null && delay > 0) || (delay === null && this.delay > 0)) {\n return _super.prototype.requestAsyncId.call(this, scheduler, id, delay);\n }\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 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 };\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 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';\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';\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';\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';\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();\nexport var $$iterator = iterator;\n//# sourceMappingURL=iterator.js.map\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';\nexport var $$rxSubscriber = rxSubscriber;\n//# sourceMappingURL=rxSubscriber.js.map\n","/** PURE_IMPORTS_START tslib PURE_IMPORTS_END */\nimport * as tslib_1 from \"tslib\";\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\";\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 = 1;\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\";\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\";\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 _this.name = 'TimeoutError';\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\";\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 var errorObject = { e: {} };\n//# sourceMappingURL=errorObject.js.map\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_observable PURE_IMPORTS_END */\nimport { observable as Symbol_observable } from '../symbol/observable';\nexport function isInteropObservable(input) {\n return input && typeof input[Symbol_observable] === 'function';\n}\n//# sourceMappingURL=isInteropObservable.js.map\n","/** PURE_IMPORTS_START _symbol_iterator PURE_IMPORTS_END */\nimport { iterator as Symbol_iterator } from '../symbol/iterator';\nexport function isIterable(input) {\n return input && typeof input[Symbol_iterator] === 'function';\n}\n//# sourceMappingURL=isIterable.js.map\n","/** PURE_IMPORTS_START _isArray PURE_IMPORTS_END */\nimport { isArray } from './isArray';\nexport function isNumeric(val) {\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 _Observable PURE_IMPORTS_END */\nimport { Observable } from '../Observable';\nexport function isObservable(obj) {\n return !!obj && (obj instanceof Observable || (typeof obj.lift === 'function' && typeof obj.subscribe === 'function'));\n}\n//# sourceMappingURL=isObservable.js.map\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","/** 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';\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}\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","/** 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 (result && typeof result[Symbol_observable] === 'function') {\n return subscribeToObservable(result);\n }\n else if (isArrayLike(result)) {\n return subscribeToArray(result);\n }\n else if (isPromise(result)) {\n return subscribeToPromise(result);\n }\n else if (result && typeof result[Symbol_iterator] === 'function') {\n return subscribeToIterable(result);\n }\n else {\n 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","/** 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 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';\nexport var subscribeToObservable = function (obj) {\n return function (subscriber) {\n var obs = obj[Symbol_observable]();\n if (typeof obs.subscribe !== 'function') {\n throw new TypeError('Provided object does not correctly implement Symbol.observable');\n }\n else {\n return obs.subscribe(subscriber);\n }\n };\n};\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","/** 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 { endWith } from '../internal/operators/endWith';\nexport { every } from '../internal/operators/every';\nexport { exhaust } from '../internal/operators/exhaust';\nexport { exhaustMap } from '../internal/operators/exhaustMap';\nexport { expand } from '../internal/operators/expand';\nexport { filter } from '../internal/operators/filter';\nexport { finalize } from '../internal/operators/finalize';\nexport { find } from '../internal/operators/find';\nexport { findIndex } from '../internal/operators/findIndex';\nexport { first } from '../internal/operators/first';\nexport { groupBy } from '../internal/operators/groupBy';\nexport { ignoreElements } from '../internal/operators/ignoreElements';\nexport { isEmpty } from '../internal/operators/isEmpty';\nexport { last } from '../internal/operators/last';\nexport { map } from '../internal/operators/map';\nexport { mapTo } from '../internal/operators/mapTo';\nexport { materialize } from '../internal/operators/materialize';\nexport { max } from '../internal/operators/max';\nexport { merge } from '../internal/operators/merge';\nexport { mergeAll } from '../internal/operators/mergeAll';\nexport { mergeMap } 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 = function(d, b) {\r\n extendStatics = Object.setPrototypeOf ||\r\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\r\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\r\n return extendStatics(d, b);\r\n};\r\n\r\nexport function __extends(d, b) {\r\n extendStatics(d, b);\r\n function __() { this.constructor = d; }\r\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\r\n}\r\n\r\nexport var __assign = function() {\r\n __assign = Object.assign || function __assign(t) {\r\n for (var s, i = 1, n = arguments.length; i < n; i++) {\r\n s = arguments[i];\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];\r\n }\r\n return t;\r\n }\r\n return __assign.apply(this, arguments);\r\n}\r\n\r\nexport function __rest(s, e) {\r\n var t = {};\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\r\n t[p] = s[p];\r\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\r\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) 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 = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\r\n if (y = 0, t) op = [op[0] & 2, t.value];\r\n switch (op[0]) {\r\n case 0: case 1: t = op; break;\r\n case 4: _.label++; return { value: op[1], done: false };\r\n case 5: _.label++; y = op[1]; op = [0]; continue;\r\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\r\n default:\r\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\r\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\r\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\r\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\r\n if (t[2]) _.ops.pop();\r\n _.trys.pop(); continue;\r\n }\r\n op = body.call(thisArg, _);\r\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\r\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\r\n }\r\n}\r\n\r\nexport 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) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: n === \"return\" } : f ? f(v) : v; } : f; }\r\n}\r\n\r\nexport function __asyncValues(o) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var m = o[Symbol.asyncIterator], i;\r\n return m ? m.call(o) : (o = typeof __values === \"function\" ? __values(o) : o[Symbol.iterator](), i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i);\r\n function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }\r\n function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }\r\n}\r\n\r\nexport function __makeTemplateObject(cooked, raw) {\r\n if (Object.defineProperty) { Object.defineProperty(cooked, \"raw\", { value: raw }); } else { cooked.raw = raw; }\r\n return cooked;\r\n};\r\n\r\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"],"sourceRoot":""} |