@progress/kendo-angular-conversational-ui 4.0.1 → 4.0.2-dev.202203091004
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cdn/js/kendo-angular-conversational-ui.js +2 -2
- package/dist/cdn/main.js +1 -1
- package/dist/es/package-metadata.js +1 -1
- package/dist/es2015/package-metadata.js +1 -1
- package/dist/fesm2015/index.js +1 -1
- package/dist/fesm5/index.js +1 -1
- package/dist/npm/package-metadata.js +1 -1
- package/dist/systemjs/kendo-angular-conversational-ui.js +1 -1
- package/package.json +2 -2
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* Copyright © 2021 Progress Software Corporation. All rights reserved.
|
|
3
3
|
* Licensed under commercial license. See LICENSE.md in the project root for more information
|
|
4
4
|
*-------------------------------------------------------------------------------------------*/
|
|
5
|
-
!function(t
|
|
5
|
+
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("@angular/core"),require("@progress/kendo-angular-l10n"),require("@progress/kendo-angular-intl"),require("@progress/kendo-licensing"),require("@progress/kendo-angular-buttons"),require("@angular/common"),require("@progress/kendo-angular-common"),require("rxjs"),require("rxjs/operators")):"function"==typeof define&&define.amd?define([,,,,,,,,],t):"object"==typeof exports?exports.KendoAngularConversationalUi=t(require("@angular/core"),require("@progress/kendo-angular-l10n"),require("@progress/kendo-angular-intl"),require("@progress/kendo-licensing"),require("@progress/kendo-angular-buttons"),require("@angular/common"),require("@progress/kendo-angular-common"),require("rxjs"),require("rxjs/operators")):e.KendoAngularConversationalUi=t(e.ng.core,e.KendoAngularL10N,e.KendoAngularIntl,e.KendoLicensing,e.KendoAngularButtons,e.ng.common,e.KendoAngularCommon,e.rxjs,e.rxjs.operators)}(window,(function(e,t,n,o,a,r,i,s,c){return function(e){var t={};function n(o){if(t[o])return t[o].exports;var a=t[o]={i:o,l:!1,exports:{}};return e[o].call(a.exports,a,a.exports,n),a.l=!0,a.exports}return n.m=e,n.c=t,n.d=function(e,t,o){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:o})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var o=Object.create(null);if(n.r(o),Object.defineProperty(o,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var a in e)n.d(o,a,function(t){return e[t]}.bind(null,a));return o},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=11)}([function(e,t,n){"use strict";n.r(t),n.d(t,"__extends",(function(){return a})),n.d(t,"__assign",(function(){return r})),n.d(t,"__rest",(function(){return i})),n.d(t,"__decorate",(function(){return s})),n.d(t,"__param",(function(){return c})),n.d(t,"__metadata",(function(){return u})),n.d(t,"__awaiter",(function(){return l})),n.d(t,"__generator",(function(){return d})),n.d(t,"__createBinding",(function(){return p})),n.d(t,"__exportStar",(function(){return m})),n.d(t,"__values",(function(){return f})),n.d(t,"__read",(function(){return g})),n.d(t,"__spread",(function(){return _})),n.d(t,"__spreadArrays",(function(){return h})),n.d(t,"__await",(function(){return y})),n.d(t,"__asyncGenerator",(function(){return v})),n.d(t,"__asyncDelegator",(function(){return b})),n.d(t,"__asyncValues",(function(){return k})),n.d(t,"__makeTemplateObject",(function(){return x})),n.d(t,"__importStar",(function(){return w})),n.d(t,"__importDefault",(function(){return C})),n.d(t,"__classPrivateFieldGet",(function(){return O})),n.d(t,"__classPrivateFieldSet",(function(){return S}));
|
|
6
6
|
/*! *****************************************************************************
|
|
7
7
|
Copyright (c) Microsoft Corporation.
|
|
8
8
|
|
|
@@ -17,4 +17,4 @@ LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
|
17
17
|
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
18
18
|
PERFORMANCE OF THIS SOFTWARE.
|
|
19
19
|
***************************************************************************** */
|
|
20
|
-
var r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(t,e)};function i(t,e){function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}var o=function(){return(o=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var i in e=arguments[n])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t}).apply(this,arguments)};function s(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]])}return n}function u(t,e,n,r){var i,o=arguments.length,s=o<3?e:null===r?r=Object.getOwnPropertyDescriptor(e,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(t,e,n,r);else for(var u=t.length-1;u>=0;u--)(i=t[u])&&(s=(o<3?i(s):o>3?i(e,n,s):i(e,n))||s);return o>3&&s&&Object.defineProperty(e,n,s),s}function c(t,e){return function(n,r){e(n,r,t)}}function a(t,e){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,e)}function l(t,e,n,r){return new(n||(n=Promise))((function(i,o){function s(t){try{c(r.next(t))}catch(t){o(t)}}function u(t){try{c(r.throw(t))}catch(t){o(t)}}function c(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(s,u)}c((r=r.apply(t,e||[])).next())}))}function h(t,e){var n,r,i,o,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function u(o){return function(u){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return s.label++,{value:o[1],done:!1};case 5:s.label++,r=o[1],o=[0];continue;case 7:o=s.ops.pop(),s.trys.pop();continue;default:if(!(i=s.trys,(i=i.length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){s=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){s.label=o[1];break}if(6===o[0]&&s.label<i[1]){s.label=i[1],i=o;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(o);break}i[2]&&s.ops.pop(),s.trys.pop();continue}o=e.call(t,s)}catch(t){o=[6,t],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,u])}}}function p(t,e,n,r){void 0===r&&(r=n),t[r]=e[n]}function f(t,e){for(var n in t)"default"===n||e.hasOwnProperty(n)||(e[n]=t[n])}function d(t){var e="function"==typeof Symbol&&Symbol.iterator,n=e&&t[e],r=0;if(n)return n.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}function y(t,e){var n="function"==typeof Symbol&&t[Symbol.iterator];if(!n)return t;var r,i,o=n.call(t),s=[];try{for(;(void 0===e||e-- >0)&&!(r=o.next()).done;)s.push(r.value)}catch(t){i={error:t}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return s}function b(){for(var t=[],e=0;e<arguments.length;e++)t=t.concat(y(arguments[e]));return t}function v(){for(var t=0,e=0,n=arguments.length;e<n;e++)t+=arguments[e].length;var r=Array(t),i=0;for(e=0;e<n;e++)for(var o=arguments[e],s=0,u=o.length;s<u;s++,i++)r[i]=o[s];return r}function _(t){return this instanceof _?(this.v=t,this):new _(t)}function m(t,e,n){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var r,i=n.apply(t,e||[]),o=[];return r={},s("next"),s("throw"),s("return"),r[Symbol.asyncIterator]=function(){return this},r;function s(t){i[t]&&(r[t]=function(e){return new Promise((function(n,r){o.push([t,e,n,r])>1||u(t,e)}))})}function u(t,e){try{(n=i[t](e)).value instanceof _?Promise.resolve(n.value.v).then(c,a):l(o[0][2],n)}catch(t){l(o[0][3],t)}var n}function c(t){u("next",t)}function a(t){u("throw",t)}function l(t,e){t(e),o.shift(),o.length&&u(o[0][0],o[0][1])}}function g(t){var e,n;return e={},r("next"),r("throw",(function(t){throw t})),r("return"),e[Symbol.iterator]=function(){return this},e;function r(r,i){e[r]=t[r]?function(e){return(n=!n)?{value:_(t[r](e)),done:"return"===r}:i?i(e):e}:i}}function w(t){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var e,n=t[Symbol.asyncIterator];return n?n.call(t):(t=d(t),e={},r("next"),r("throw"),r("return"),e[Symbol.asyncIterator]=function(){return this},e);function r(n){e[n]=t[n]&&function(e){return new Promise((function(r,i){(function(t,e,n,r){Promise.resolve(r).then((function(e){t({value:e,done:n})}),e)})(r,i,(e=t[n](e)).done,e.value)}))}}}function x(t,e){return Object.defineProperty?Object.defineProperty(t,"raw",{value:e}):t.raw=e,t}function S(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)Object.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e.default=t,e}function k(t){return t&&t.__esModule?t:{default:t}}function C(t,e){if(!e.has(t))throw new TypeError("attempted to get private field on non-instance");return e.get(t)}function T(t,e,n){if(!e.has(t))throw new TypeError("attempted to set private field on non-instance");return e.set(t,n),n}},function(e,n){e.exports=t},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(12);e.ChatComponent=r.ChatComponent;var i=n(7);e.AttachmentTemplateDirective=i.AttachmentTemplateDirective;var o=n(4);e.MessageTemplateDirective=o.MessageTemplateDirective},function(t,n){t.exports=e},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(0),i=n(1),o=function(){function t(t){this.templateRef=t}return t=r.__decorate([i.Directive({selector:"[kendoChatMessageTemplate]"}),r.__param(0,i.Optional()),r.__metadata("design:paramtypes",[i.TemplateRef])],t)}();e.MessageTemplateDirective=o},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=function(){};e.ChatItem=r},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=function(t){this.message=t};e.SendMessageEvent=r},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(0),i=n(1),o=function(){function t(t){this.templateRef=t}return t=r.__decorate([i.Directive({selector:"[kendoChatAttachmentTemplate]"}),r.__param(0,i.Optional()),r.__metadata("design:paramtypes",[i.TemplateRef])],t)}();e.AttachmentTemplateDirective=o},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(0),i=n(1),o=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return r.__extends(e,t),r.__decorate([i.Input(),r.__metadata("design:type",String)],e.prototype,"messagePlaceholder",void 0),r.__decorate([i.Input(),r.__metadata("design:type",String)],e.prototype,"send",void 0),e}(n(3).ComponentMessages);e.Messages=o},function(t,e){t.exports=n},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(0),i=function(t){function e(e,n){var r=t.call(this)||this;return r.action=e,r.message=n,r}return r.__extends(e,t),e}(n(29).PreventableEvent);e.ExecuteActionEvent=i},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(0);r.__exportStar(n(2),e),r.__exportStar(n(16),e),r.__exportStar(n(10),e),r.__exportStar(n(6),e)},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(0),i=n(1),o=n(7),s=n(3),u=n(13),c=n(4),a=n(6),l=n(14),h=n(15),p=function(){function t(t,e){var n=this;this.localization=t,this.zone=e,this.sendMessage=new i.EventEmitter,this.executeAction=new i.EventEmitter,this.autoScroll=!0,l.validatePackage(h.packageMetadata),this.direction=t.rtl?"rtl":"ltr",this.localizationChangeSubscription=t.changes.subscribe((function(t){var e=t.rtl;n.direction=e?"rtl":"ltr"}))}return Object.defineProperty(t.prototype,"className",{get:function(){return"k-widget k-chat"},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"dirAttr",{get:function(){return this.direction},enumerable:!0,configurable:!0}),t.prototype.ngOnChanges=function(){var t=this;this.zone.runOutsideAngular((function(){return setTimeout((function(){t.messageList.nativeElement.style.flex="1 1 auto"}))}))},t.prototype.ngAfterViewInit=function(){if(i.isDevMode()&&!this.user)throw new Error("User must be set and have a valid id.")},t.prototype.ngOnDestroy=function(){this.localizationChangeSubscription&&this.localizationChangeSubscription.unsubscribe()},t.prototype.sendClick=function(){var t=this.messageInput.nativeElement,e=t.value;if(e){var n={author:this.user,text:e,timestamp:new Date};this.sendMessage.emit(new a.SendMessageEvent(n)),t.value=null,t.focus(),this.autoScroll=!0}},t.prototype.inputKeydown=function(t){13===t.keyCode&&this.sendClick()},t.prototype.dispatchAction=function(t){(this.executeAction.emit(t),t.isDefaultPrevented())||(u.makeHandler(t.action)(t.action,this),this.messageInput.nativeElement.focus())},t.prototype.textFor=function(t){return this.localization.get(t)},r.__decorate([i.Input(),r.__metadata("design:type",Array)],t.prototype,"messages",void 0),r.__decorate([i.Input(),r.__metadata("design:type",Object)],t.prototype,"user",void 0),r.__decorate([i.Output(),r.__metadata("design:type",i.EventEmitter)],t.prototype,"sendMessage",void 0),r.__decorate([i.Output(),r.__metadata("design:type",i.EventEmitter)],t.prototype,"executeAction",void 0),r.__decorate([i.HostBinding("class"),r.__metadata("design:type",String),r.__metadata("design:paramtypes",[])],t.prototype,"className",null),r.__decorate([i.HostBinding("attr.dir"),r.__metadata("design:type",String),r.__metadata("design:paramtypes",[])],t.prototype,"dirAttr",null),r.__decorate([i.ContentChild(o.AttachmentTemplateDirective,{static:!1}),r.__metadata("design:type",o.AttachmentTemplateDirective)],t.prototype,"attachmentTemplate",void 0),r.__decorate([i.ContentChild(c.MessageTemplateDirective,{static:!1}),r.__metadata("design:type",c.MessageTemplateDirective)],t.prototype,"messageTemplate",void 0),r.__decorate([i.ViewChild("messageInput",{static:!0}),r.__metadata("design:type",i.ElementRef)],t.prototype,"messageInput",void 0),r.__decorate([i.ViewChild("messageList",{static:!0}),r.__metadata("design:type",i.ElementRef)],t.prototype,"messageList",void 0),t=r.__decorate([i.Component({providers:[s.LocalizationService,{provide:s.L10N_PREFIX,useValue:"kendo.chat"}],selector:"kendo-chat",template:'\n <ng-container\n kendoChatLocalizedMessages\n i18n-messagePlaceholder="kendo.chat.messagePlaceholder|The placholder text of the message text input"\n messagePlaceholder="Type a message..."\n\n i18n-send="kendo.chat.send|The text for the Send button"\n send="Send..."\n >\n </ng-container>\n\n <div\n #messageList\n class="k-message-list k-avatars"\n aria-live="polite" role="log"\n kendoChatScrollAnchor\n #anchor="scrollAnchor"\n [(autoScroll)]="autoScroll"\n >\n <kendo-chat-message-list\n [messages]="messages"\n [messageTemplate]="messageTemplate"\n [attachmentTemplate]="attachmentTemplate"\n [user]="user"\n (executeAction)="dispatchAction($event)"\n (resize)="anchor.scrollToBottom()"\n (navigate)="this.autoScroll = false"\n >\n </kendo-chat-message-list>\n </div>\n\n <div class="k-message-box">\n <input\n #messageInput\n kendoChatFocusedState\n type="text"\n class="k-input"\n [placeholder]="textFor(\'messagePlaceholder\')"\n (keydown)="inputKeydown($event)"\n >\n <button\n kendoButton\n fillMode="flat"\n class="k-button-send"\n tabindex="-1"\n [attr.title]="textFor(\'send\')"\n (click)="sendClick()"\n ><svg version="1.1" xmlns="http://www.w3.org/2000/svg" x="0px" y="0px" viewBox="0 0 16 16"><path d="M0,14.3c-0.1,0.6,0.3,0.8,0.8,0.6l14.8-6.5c0.5-0.2,0.5-0.6,0-0.8L0.8,1.1C0.3,0.9-0.1,1.1,0,1.7l0.7,4.2C0.8,6.5,1.4,7,1.9,7.1l8.8,0.8c0.6,0.1,0.6,0.1,0,0.2L1.9,8.9C1.4,9,0.8,9.5,0.7,10.1L0,14.3z"/></svg></button>\n </div>\n '}),r.__metadata("design:paramtypes",[s.LocalizationService,i.NgZone])],t)}();e.ChatComponent=p},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(6),i=function(){},o={reply:function(t,e){e.sendMessage.emit(new r.SendMessageEvent({author:e.user,text:t.value,timestamp:new Date}))},call:function(t){window.open("tel:"+t.value)},openUrl:function(t){window.open(t.value)}};e.makeHandler=function(t){return o[t.type]||i}},function(t,e){t.exports=r},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.packageMetadata={name:"@progress/kendo-angular-conversational-ui",productName:"Kendo UI for Angular",productCodes:["KENDOUIANGULAR","KENDOUICOMPLETE"],publishDate:1646217043,version:"",licensingDocsUrl:"https://www.telerik.com/kendo-angular-ui/my-license/?utm_medium=product&utm_source=kendoangular&utm_campaign=kendo-ui-angular-purchase-license-keys-warning"}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(0),i=n(17),o=n(2),s=n(18),u=n(19),c=n(20),a=n(21),l=n(22),h=n(23),p=n(24),f=n(25),d=n(27),y=n(28),b=n(1),v=n(32),_=n(33),m=[o.ChatComponent,a.CustomMessagesComponent,o.AttachmentTemplateDirective,o.MessageTemplateDirective,h.HeroCardComponent],g=[i.AttachmentComponent,l.FocusedStateDirective,p.LocalizedMessagesDirective,f.MessageAttachmentsComponent,d.MessageComponent,y.MessageListComponent,o.MessageTemplateDirective,v.ScrollAnchorDirective,_.SuggestedActionsComponent],w=function(){function t(){}return t=r.__decorate([b.NgModule({declarations:m.concat(g),exports:[m],imports:[s.ButtonModule,u.CommonModule,c.ResizeSensorModule]})],t)}();e.ChatModule=w},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(0),i=n(1),o=n(2),s=function(){function t(){}return Object.defineProperty(t.prototype,"attachment",{get:function(){return this._attachment},set:function(t){this._attachment=t,this.context={$implicit:this.attachment}},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"image",{get:function(){return 0===this.contentType.indexOf("image/")},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"unknown",{get:function(){return!this.image},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"contentType",{get:function(){return this.attachment.contentType||""},enumerable:!0,configurable:!0}),r.__decorate([i.Input(),r.__metadata("design:type",Object),r.__metadata("design:paramtypes",[Object])],t.prototype,"attachment",null),r.__decorate([i.Input(),r.__metadata("design:type",o.AttachmentTemplateDirective)],t.prototype,"template",void 0),t=r.__decorate([i.Component({selector:"kendo-chat-attachment",template:'\n <ng-container *ngIf="template">\n <ng-container *ngTemplateOutlet="template.templateRef; context: context;">\n </ng-container>\n </ng-container>\n\n <div *ngIf="!template" class="k-card">\n <div class="k-card-body">\n <h5 class="k-card-title" *ngIf="attachment.title">\n {{ attachment.title }}\n </h5>\n <h6 class="k-card-subtitle" *ngIf="attachment.subtitle">\n {{ attachment.subtitle }}\n </h6>\n <img *ngIf="image" [attr.src]="attachment.content" />\n <ng-container *ngIf="unknown">\n {{ attachment.content }}\n </ng-container>\n </div>\n </div>\n '})],t)}();e.AttachmentComponent=s},function(t,e){t.exports=i},function(t,e){t.exports=o},function(t,e){t.exports=s},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(0),i=n(1),o=n(3),s=n(8),u=function(t){function e(e){var n=t.call(this)||this;return n.service=e,n}var n;return r.__extends(e,t),n=e,Object.defineProperty(e.prototype,"override",{get:function(){return!0},enumerable:!0,configurable:!0}),e=n=r.__decorate([i.Component({providers:[{provide:s.Messages,useExisting:i.forwardRef((function(){return n}))}],selector:"kendo-chat-messages",template:""}),r.__metadata("design:paramtypes",[o.LocalizationService])],e)}(s.Messages);e.CustomMessagesComponent=u},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(0),i=n(1),o=function(){function t(){this.focused=!1}return t.prototype.onFocus=function(){this.focused=!0},t.prototype.onBlur=function(){this.focused=!1},r.__decorate([i.HostBinding("class.k-state-focused"),r.__metadata("design:type",Boolean)],t.prototype,"focused",void 0),r.__decorate([i.HostListener("focusin"),r.__metadata("design:type",Function),r.__metadata("design:paramtypes",[]),r.__metadata("design:returntype",void 0)],t.prototype,"onFocus",null),r.__decorate([i.HostListener("focusout"),r.__metadata("design:type",Function),r.__metadata("design:paramtypes",[]),r.__metadata("design:returntype",void 0)],t.prototype,"onBlur",null),t=r.__decorate([i.Directive({selector:"[kendoChatFocusedState]"})],t)}();e.FocusedStateDirective=o},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(0),i=n(1),o=function(){function t(){this.cssClass=!0,this.executeAction=new i.EventEmitter}return t.prototype.onClick=function(t){this.executeAction.next(t)},r.__decorate([i.Input(),r.__metadata("design:type",String)],t.prototype,"imageUrl",void 0),r.__decorate([i.Input(),r.__metadata("design:type",String)],t.prototype,"title",void 0),r.__decorate([i.Input(),r.__metadata("design:type",String)],t.prototype,"subtitle",void 0),r.__decorate([i.Input(),r.__metadata("design:type",Array)],t.prototype,"actions",void 0),r.__decorate([i.HostBinding("class.k-card"),r.__metadata("design:type",Boolean)],t.prototype,"cssClass",void 0),r.__decorate([i.Output(),r.__metadata("design:type",i.EventEmitter)],t.prototype,"executeAction",void 0),t=r.__decorate([i.Component({selector:"kendo-chat-hero-card",template:'\n <img class="k-card-image" [src]="imageUrl" *ngIf="imageUrl" />\n <div class="k-card-body">\n <h5 class="k-card-title" *ngIf="title">\n {{ title }}\n </h5>\n <h6 class="k-card-subtitle" *ngIf="subtitle">\n {{ subtitle }}\n </h6>\n </div>\n <div class="k-card-actions k-card-actions-vertical">\n <span class="k-card-action"\n *ngFor="let act of actions"\n >\n <button\n kendoButton fillMode="flat"\n (click)="onClick(act)">\n {{ act.title }}\n </button>\n </span>\n </div>\n '})],t)}();e.HeroCardComponent=o},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(0),i=n(1),o=n(3),s=n(8),u=function(t){function e(e){var n=t.call(this)||this;return n.service=e,n}var n;return r.__extends(e,t),n=e,e=n=r.__decorate([i.Directive({providers:[{provide:s.Messages,useExisting:i.forwardRef((function(){return n}))}],selector:"[kendoChatLocalizedMessages]"}),r.__metadata("design:paramtypes",[o.LocalizationService])],e)}(s.Messages);e.LocalizedMessagesDirective=u},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(0),i=n(1),o=n(26),s=n(34),u=n(5),c=n(2),a=function(t){function e(e){var n,r,i=t.call(this)||this;return i.zone=e,i.scrollPosition=0,i.selectedIndex=0,i.carouselKeyHandlers=((n={})[37]=function(t){return i.navigateTo(t,-1)},n[39]=function(t){return i.navigateTo(t,1)},n),i.listKeyHandlers=((r={})[38]=function(t){return i.navigateTo(t,-1)},r[40]=function(t){return i.navigateTo(t,1)},r),i}var n;return r.__extends(e,t),n=e,Object.defineProperty(e.prototype,"carousel",{get:function(){return"list"!==this.layout},enumerable:!0,configurable:!0}),e.prototype.ngAfterViewInit=function(){var t=this;this.zone.runOutsideAngular((function(){t.scrollSubscription=o.fromEvent(t.deck.nativeElement,"scroll").pipe(s.debounceTime(100)).subscribe((function(){return t.onScroll()}))}))},e.prototype.ngOnDestroy=function(){this.scrollSubscription.unsubscribe()},e.prototype.isSelected=function(t){return this.selectedIndex===t},e.prototype.itemKeydown=function(t,e){var n=("list"===this.layout?this.listKeyHandlers:this.carouselKeyHandlers)[t.keyCode];n&&n(t,e)},e.prototype.itemClick=function(t){this.select(t)},e.prototype.focus=function(){this.select(this.selectedIndex)},e.prototype.scrollTo=function(t){var e=this.deck.nativeElement,n=e.scrollWidth/this.items.length,r=e.scrollWidth-e.offsetWidth,i=e.scrollLeft+n*t;e.scrollLeft=Math.max(0,Math.min(r,i))},e.prototype.select=function(t){this.selectedIndex=t;var e=this.items.toArray()[t];e&&e.nativeElement.focus()},e.prototype.navigateTo=function(t,e){var n=this.selectedIndex,r=Math.max(0,Math.min(n+e,this.items.length-1));r!==n&&(this.select(r),t.preventDefault())},e.prototype.onScroll=function(){var t=this,e=this.deck.nativeElement;if(0!==e.scrollWidth){var n=e.scrollLeft/(e.scrollWidth-e.offsetWidth);n!==this.scrollPosition&&this.zone.run((function(){t.scrollPosition=n}))}},r.__decorate([i.Input(),r.__metadata("design:type",Array)],e.prototype,"attachments",void 0),r.__decorate([i.Input(),r.__metadata("design:type",String)],e.prototype,"layout",void 0),r.__decorate([i.Input(),r.__metadata("design:type",Boolean)],e.prototype,"tabbable",void 0),r.__decorate([i.Input(),r.__metadata("design:type",c.AttachmentTemplateDirective)],e.prototype,"template",void 0),r.__decorate([i.HostBinding("class.k-card-deck-scrollwrap"),r.__metadata("design:type",Boolean),r.__metadata("design:paramtypes",[])],e.prototype,"carousel",null),r.__decorate([i.ViewChild("deck",{read:i.ElementRef,static:!0}),r.__metadata("design:type",i.ElementRef)],e.prototype,"deck",void 0),r.__decorate([i.ViewChildren("item",{read:i.ElementRef}),r.__metadata("design:type",i.QueryList)],e.prototype,"items",void 0),e=n=r.__decorate([i.Component({providers:[{provide:u.ChatItem,useExisting:i.forwardRef((function(){return n}))}],selector:"kendo-chat-message-attachments",template:'\n <button\n *ngIf="carousel && scrollPosition > 0"\n (click)="scrollTo(-1)"\n class="k-button k-icon-button k-button-md k-rounded-md k-button-solid k-button-solid-base"\n tabindex="-1">\n <span class="k-icon k-button-icon k-i-arrow-chevron-left"></span>\n </button>\n <div #deck [class.k-card-deck]="carousel">\n <kendo-chat-attachment #item\n *ngFor="let att of attachments; index as index; first as first; last as last"\n [attachment]="att"\n [template]="template"\n [class.k-state-selected]="isSelected(index)"\n [class.k-state-focused]="isSelected(index)"\n [class.k-card-wrap]="true"\n [class.k-first]="first"\n [class.k-last]="last"\n [attr.tabindex]="tabbable && isSelected(index) ? \'0\' : \'-1\'"\n (click)="itemClick(index)"\n (keydown)="itemKeydown($event, att)"\n >\n </kendo-chat-attachment>\n </div>\n <button\n *ngIf="carousel && scrollPosition < 1"\n (click)="scrollTo(1)"\n class="k-button k-icon-button k-button-md k-rounded-md k-button-solid k-button-solid-base"\n tabindex="-1">\n <span class="k-icon k-button-icon k-i-arrow-chevron-right"></span>\n </button>\n '}),r.__metadata("design:paramtypes",[i.NgZone])],e)}(u.ChatItem);e.MessageAttachmentsComponent=a},function(t,e){t.exports=u},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(0),i=n(1),o=n(5),s=n(4),u=n(9),c=function(t){function e(e,n){var r=t.call(this)||this;return r.element=e,r.intl=n,r.cssClass=!0,r}var n;return r.__extends(e,t),n=e,Object.defineProperty(e.prototype,"tabIndex",{get:function(){return this.tabbable?"0":"-1"},enumerable:!0,configurable:!0}),e.prototype.formatTimeStamp=function(t){return this.intl.formatDate(t,{datetime:"short"})},e.prototype.focus=function(){this.element.nativeElement.focus()},r.__decorate([i.Input(),r.__metadata("design:type",Object)],e.prototype,"message",void 0),r.__decorate([i.Input(),r.__metadata("design:type",Boolean)],e.prototype,"tabbable",void 0),r.__decorate([i.Input(),r.__metadata("design:type",s.MessageTemplateDirective)],e.prototype,"template",void 0),r.__decorate([i.HostBinding("class.k-message"),r.__metadata("design:type",Boolean)],e.prototype,"cssClass",void 0),r.__decorate([i.HostBinding("class.k-state-selected"),i.HostBinding("class.k-state-focused"),r.__metadata("design:type",Boolean)],e.prototype,"selected",void 0),r.__decorate([i.HostBinding("attr.tabIndex"),r.__metadata("design:type",String),r.__metadata("design:paramtypes",[])],e.prototype,"tabIndex",null),e=n=r.__decorate([i.Component({selector:"kendo-chat-message",providers:[{provide:o.ChatItem,useExisting:i.forwardRef((function(){return n}))}],template:'\n <time\n [attr.aria-hidden]="!selected"\n class="k-message-time"\n *ngIf="message.timestamp"\n >\n {{ formatTimeStamp(message.timestamp) }}\n </time>\n\n <ng-container *ngIf="!message.typing; else typing">\n <div class="k-bubble" *ngIf="template">\n <ng-container\n *ngTemplateOutlet="template.templateRef; context: { $implicit: message };"\n >\n </ng-container>\n </div>\n\n <div class="k-bubble" *ngIf="!template && message.text">\n {{message.text}}\n </div>\n </ng-container>\n\n <span\n class="k-message-status"\n *ngIf="message.status"\n >\n {{ message.status }}\n </span>\n\n <ng-template #typing>\n <div class="k-bubble">\n <div class="k-typing-indicator">\n <span></span>\n <span></span>\n <span></span>\n </div>\n </div>\n </ng-template>\n '}),r.__metadata("design:paramtypes",[i.ElementRef,u.IntlService])],e)}(o.ChatItem);e.MessageComponent=c},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(0),i=n(1),o=n(10),s=n(30),u=n(5),c=n(31),a=n(2),l=n(4),h=n(9),p=function(){function t(t,e){var n,r=this;this.element=t,this.intl=e,this.executeAction=new i.EventEmitter,this.navigate=new i.EventEmitter,this.resize=new i.EventEmitter,this.cssClass=!0,this.view=[],this.keyActions=((n={})[38]=function(t){return r.navigateTo(t,-1)},n[40]=function(t){return r.navigateTo(t,1)},n)}return Object.defineProperty(t.prototype,"messages",{get:function(){return this._messages},set:function(t){var e=t||[];this.view=c.chatView(e),this._messages=e},enumerable:!0,configurable:!0}),t.prototype.ngAfterViewInit=function(){this.selectedItem=this.items.last},t.prototype.onResize=function(){this.resize.emit()},t.prototype.formatTimeStamp=function(t){return this.intl.formatDate(t,{date:"full"})},t.prototype.onKeydown=function(t){var e=this.keyActions[t.keyCode];e&&e(t)},t.prototype.onBlur=function(t){var e=this,n=t.relatedTarget||document.activeElement;!s.closest(n,(function(t){return t===e.element.nativeElement}))&&this.select(null)},t.prototype.isOwnMessage=function(t){return c.isAuthor(this.user,t)},t.prototype.dispatchAction=function(t,e){var n=new o.ExecuteActionEvent(t,e);this.executeAction.emit(n)},t.prototype.trackGroup=function(t,e){return e.trackBy},t.prototype.select=function(t){var e=this.selectedItem;e&&(e.selected=!1),t&&(t.selected=!0,this.selectedItem=t)},t.prototype.last=function(t){if(t&&0!==t.length)return t[t.length-1]},t.prototype.navigateTo=function(t,e){var n=this.items.toArray(),r=this.selectedItem,i=n.indexOf(r),o=n[Math.max(0,Math.min(i+e,this.items.length-1))];o!==r&&(this.select(o),o.focus(),this.navigate.emit(),t.preventDefault())},r.__decorate([i.Input(),r.__metadata("design:type",Array),r.__metadata("design:paramtypes",[Array])],t.prototype,"messages",null),r.__decorate([i.Input(),r.__metadata("design:type",a.AttachmentTemplateDirective)],t.prototype,"attachmentTemplate",void 0),r.__decorate([i.Input(),r.__metadata("design:type",l.MessageTemplateDirective)],t.prototype,"messageTemplate",void 0),r.__decorate([i.Input(),r.__metadata("design:type",Object)],t.prototype,"user",void 0),r.__decorate([i.Output(),r.__metadata("design:type",i.EventEmitter)],t.prototype,"executeAction",void 0),r.__decorate([i.Output(),r.__metadata("design:type",i.EventEmitter)],t.prototype,"navigate",void 0),r.__decorate([i.Output(),r.__metadata("design:type",i.EventEmitter)],t.prototype,"resize",void 0),r.__decorate([i.ViewChildren(u.ChatItem),r.__metadata("design:type",i.QueryList)],t.prototype,"items",void 0),r.__decorate([i.HostBinding("class.k-message-list-content"),r.__metadata("design:type",Boolean)],t.prototype,"cssClass",void 0),r.__decorate([i.HostListener("keydown",["$event"]),r.__metadata("design:type",Function),r.__metadata("design:paramtypes",[Object]),r.__metadata("design:returntype",void 0)],t.prototype,"onKeydown",null),r.__decorate([i.HostListener("focusout",["$event"]),r.__metadata("design:type",Function),r.__metadata("design:paramtypes",[FocusEvent]),r.__metadata("design:returntype",void 0)],t.prototype,"onBlur",null),t=r.__decorate([i.Component({selector:"kendo-chat-message-list",template:'\n <ng-container *ngFor="let group of view; last as lastGroup; trackBy: trackGroup">\n <ng-container [ngSwitch]="group.type">\n <div\n *ngSwitchCase="\'date-marker\'"\n class="k-timestamp"\n >\n {{ formatTimeStamp(group.timestamp) }}\n </div>\n <div\n *ngSwitchCase="\'message-group\'"\n class="k-message-group"\n [class.k-alt]="isOwnMessage(group.messages[0])"\n [class.k-no-avatar]="!group.author.avatarUrl"\n >\n <img\n *ngIf="group.author.avatarUrl"\n [attr.src]="group.author.avatarUrl"\n class="k-avatar"\n />\n <p *ngIf="group.author.name" class="k-author">{{ group.author.name }}</p>\n <ng-container\n *ngFor="let msg of group.messages; first as firstMessage; last as lastMessage"\n >\n <img *ngIf="msg.user?.avatarUrl" [src]="msg.user?.avatarUrl" class="k-avatar">\n <kendo-chat-message #message\n [message]="msg"\n [tabbable]="lastGroup && lastMessage"\n [template]="messageTemplate"\n (click)="select(message)"\n (focus)="select(message)"\n [class.k-only]="group.messages.length === 1"\n [class.k-first]="group.messages.length > 1 && firstMessage"\n [class.k-last]="group.messages.length > 1 && lastMessage"\n >\n </kendo-chat-message>\n\n <kendo-chat-attachment\n *ngIf="msg.attachments && msg.attachments.length === 1"\n [attachment]="msg.attachments[0]"\n [template]="attachmentTemplate"\n >\n </kendo-chat-attachment>\n </ng-container>\n </div>\n\n <kendo-chat-message-attachments #attachments\n *ngSwitchCase="\'attachment-group\'"\n [attachments]="group.attachments"\n [layout]="group.attachmentLayout"\n [tabbable]="lastGroup"\n [template]="attachmentTemplate"\n (click)="select(attachments)"\n (focus)="select(attachments)"\n >\n </kendo-chat-message-attachments>\n\n <kendo-chat-suggested-actions #actions\n *ngSwitchCase="\'action-group\'"\n [actions]="group.actions"\n [tabbable]="lastGroup"\n (dispatch)="dispatchAction($event, last(group.messages))"\n (click)="select(actions)"\n (focus)="select(actions)"\n >\n </kendo-chat-suggested-actions>\n </ng-container>\n </ng-container>\n <kendo-resize-sensor (resize)="onResize()">\n </kendo-resize-sensor>\n '}),r.__metadata("design:paramtypes",[i.ElementRef,h.IntlService])],t)}();e.MessageListComponent=p},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=function(){function t(){this.prevented=!1}return t.prototype.preventDefault=function(){this.prevented=!0},t.prototype.isDefaultPrevented=function(){return this.prevented},t}();e.PreventableEvent=r},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.closest=function(t,e){for(;t&&!e(t);)t=t.parentNode;return t}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(1);e.isAuthor=function(t,e){return t&&e.author&&t.id===e.author.id};var i=function(t){return t[t.length-1]},o=function(t){return function(n,o,s){var u=s===t-1;return function(t,e){var n,r,o=e.timestamp,s=i(t);if(o&&(!s||(n=o,r=s.timestamp,n&&r&&(r.getDate()!==n.getDate()||r.getMonth()!==n.getMonth()||r.getFullYear()!==n.getFullYear())))){var u={type:"date-marker",timestamp:o,trackBy:o.getTime()};t.push(u)}}(n,o),function(t,n,o){var s,u=i(t);if(r.isDevMode()&&!n.author)throw new Error("Author must be set for message: "+JSON.stringify(n));n.typing&&!o||(u&&"message-group"===u.type&&(s=u.messages),s&&e.isAuthor(n.author,i(s))?s.push(n):t.push({type:"message-group",messages:[n],author:n.author,timestamp:n.timestamp,trackBy:n}))}(n,o,u),o.attachments&&o.attachments.length>1&&n.push({type:"attachment-group",attachments:o.attachments,attachmentLayout:o.attachmentLayout,timestamp:o.timestamp,trackBy:o}),o.suggestedActions&&u&&n.push({type:"action-group",actions:o.suggestedActions,timestamp:o.timestamp,trackBy:o}),n}};e.chatView=function(t){return t.reduce(o(t.length),[])}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(0),i=n(1),o=function(){function t(t,e,n){this.element=t,this.zone=e,this.renderer=n,this.autoScroll=!0,this.autoScrollChange=new i.EventEmitter,this.overflowAnchor="none",this.scrolling=!1}return t.prototype.ngOnInit=function(){var t=this;this.zone.runOutsideAngular((function(){t.unsubscribe=t.renderer.listen(t.element.nativeElement,"scroll",(function(){return t.onScroll()}))}))},t.prototype.ngAfterViewInit=function(){this.scrollToBottom()},t.prototype.ngOnDestroy=function(){this.unsubscribe&&this.unsubscribe()},t.prototype.onScroll=function(){var t=this;if(!this.scrolling){var e=this.element.nativeElement,n=e.scrollTop+e.offsetHeight,r=e.scrollHeight-n<2;this.autoScroll!==r&&this.zone.run((function(){t.autoScroll=r,t.autoScrollChange.emit(t.autoScroll)}))}},t.prototype.scrollToBottom=function(){var t=this;if(this.autoScroll){var e=this.element.nativeElement;e.scrollTop=e.scrollHeight-e.clientHeight,this.scrolling=!0,this.zone.runOutsideAngular((function(){return setTimeout((function(){return t.scrolling=!1}),1e3)}))}},r.__decorate([i.Input(),r.__metadata("design:type",Boolean)],t.prototype,"autoScroll",void 0),r.__decorate([i.Output(),r.__metadata("design:type",i.EventEmitter)],t.prototype,"autoScrollChange",void 0),r.__decorate([i.HostBinding("style.overflow-anchor"),r.__metadata("design:type",String)],t.prototype,"overflowAnchor",void 0),t=r.__decorate([i.Directive({selector:"[kendoChatScrollAnchor]",exportAs:"scrollAnchor"}),r.__metadata("design:paramtypes",[i.ElementRef,i.NgZone,i.Renderer2])],t)}();e.ScrollAnchorDirective=o},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(0),i=n(1),o=n(5),s=function(t){function e(){var e,n=null!==t&&t.apply(this,arguments)||this;return n.dispatch=new i.EventEmitter,n.defaultClass=!0,n.selectedIndex=0,n.keyHandlers=((e={})[37]=function(t){return n.navigateTo(t,-1)},e[39]=function(t){return n.navigateTo(t,1)},e[13]=function(t,e){return n.actionClick(e)},e),n}var n;return r.__extends(e,t),n=e,e.prototype.isSelected=function(t){return this.selected&&this.selectedIndex===t},e.prototype.actionClick=function(t){this.dispatch.next(t)},e.prototype.actionKeydown=function(t,e){var n=this.keyHandlers[t.keyCode];n&&n(t,e)},e.prototype.focus=function(){this.select(this.selectedIndex)},e.prototype.select=function(t){this.selectedIndex=t;var e=this.items.toArray()[t];e&&e.nativeElement.focus()},e.prototype.navigateTo=function(t,e){var n=this.selectedIndex,r=Math.max(0,Math.min(n+e,this.items.length-1));r!==n&&(this.select(r),t.preventDefault())},r.__decorate([i.Input(),r.__metadata("design:type",Array)],e.prototype,"actions",void 0),r.__decorate([i.Input(),r.__metadata("design:type",Boolean)],e.prototype,"tabbable",void 0),r.__decorate([i.Output(),r.__metadata("design:type",i.EventEmitter)],e.prototype,"dispatch",void 0),r.__decorate([i.HostBinding("class.k-quick-replies"),r.__metadata("design:type",Boolean)],e.prototype,"defaultClass",void 0),r.__decorate([i.ViewChildren("item"),r.__metadata("design:type",i.QueryList)],e.prototype,"items",void 0),e=n=r.__decorate([i.Component({selector:"kendo-chat-suggested-actions",providers:[{provide:o.ChatItem,useExisting:i.forwardRef((function(){return n}))}],template:'\n <span #item\n *ngFor="let action of actions; index as index; first as first; last as last"\n class="k-quick-reply"\n [class.k-state-selected]="isSelected(index)"\n [class.k-state-focused]="isSelected(index)"\n [class.k-first]="first"\n [class.k-last]="last"\n [attr.tabindex]="tabbable && selectedIndex === index ? \'0\' : \'-1\'"\n (click)="actionClick(action)"\n (keydown)="actionKeydown($event, action)"\n >\n {{ action.title || action.value }}\n </span>\n '})],e)}(o.ChatItem);e.SuggestedActionsComponent=s},function(t,e,n){"use strict";n.r(e),n.d(e,"audit",(function(){return D})),n.d(e,"auditTime",(function(){return Y})),n.d(e,"buffer",(function(){return K})),n.d(e,"bufferCount",(function(){return Q})),n.d(e,"bufferTime",(function(){return tt})),n.d(e,"bufferToggle",(function(){return ut})),n.d(e,"bufferWhen",(function(){return lt})),n.d(e,"catchError",(function(){return ft})),n.d(e,"combineAll",(function(){return gt})),n.d(e,"combineLatest",(function(){return xt})),n.d(e,"concat",(function(){return Bt})),n.d(e,"concatAll",(function(){return Mt})),n.d(e,"concatMap",(function(){return zt})),n.d(e,"concatMapTo",(function(){return Rt})),n.d(e,"count",(function(){return Ft})),n.d(e,"debounce",(function(){return Lt})),n.d(e,"debounceTime",(function(){return Yt})),n.d(e,"defaultIfEmpty",(function(){return Qt})),n.d(e,"delay",(function(){return ie})),n.d(e,"delayWhen",(function(){return ce})),n.d(e,"dematerialize",(function(){return fe})),n.d(e,"distinct",(function(){return be})),n.d(e,"distinctUntilChanged",(function(){return me})),n.d(e,"distinctUntilKeyChanged",(function(){return xe})),n.d(e,"elementAt",(function(){return ze})),n.d(e,"endWith",(function(){return Re})),n.d(e,"every",(function(){return Fe})),n.d(e,"exhaust",(function(){return Le})),n.d(e,"exhaustMap",(function(){return Ye})),n.d(e,"expand",(function(){return $e})),n.d(e,"filter",(function(){return Ce})),n.d(e,"finalize",(function(){return Je})),n.d(e,"find",(function(){return en})),n.d(e,"findIndex",(function(){return on})),n.d(e,"first",(function(){return sn})),n.d(e,"groupBy",(function(){return fn})),n.d(e,"ignoreElements",(function(){return mn})),n.d(e,"isEmpty",(function(){return xn})),n.d(e,"last",(function(){return In})),n.d(e,"map",(function(){return Et})),n.d(e,"mapTo",(function(){return On})),n.d(e,"materialize",(function(){return An})),n.d(e,"max",(function(){return Rn})),n.d(e,"merge",(function(){return Wn})),n.d(e,"mergeAll",(function(){return Pt})),n.d(e,"mergeMap",(function(){return Nt})),n.d(e,"flatMap",(function(){return Nt})),n.d(e,"mergeMapTo",(function(){return Hn})),n.d(e,"mergeScan",(function(){return Ln})),n.d(e,"min",(function(){return Yn})),n.d(e,"multicast",(function(){return Xn})),n.d(e,"observeOn",(function(){return er})),n.d(e,"onErrorResumeNext",(function(){return or})),n.d(e,"pairwise",(function(){return cr})),n.d(e,"partition",(function(){return pr})),n.d(e,"pluck",(function(){return fr})),n.d(e,"publish",(function(){return yr})),n.d(e,"publishBehavior",(function(){return vr})),n.d(e,"publishLast",(function(){return mr})),n.d(e,"publishReplay",(function(){return kr})),n.d(e,"race",(function(){return Ir})),n.d(e,"reduce",(function(){return zn})),n.d(e,"repeat",(function(){return Or})),n.d(e,"repeatWhen",(function(){return Ar})),n.d(e,"retry",(function(){return Mr})),n.d(e,"retryWhen",(function(){return zr})),n.d(e,"refCount",(function(){return Kn})),n.d(e,"sample",(function(){return Wr})),n.d(e,"sampleTime",(function(){return qr})),n.d(e,"scan",(function(){return Mn})),n.d(e,"sequenceEqual",(function(){return Gr})),n.d(e,"share",(function(){return Xr})),n.d(e,"shareReplay",(function(){return ti})),n.d(e,"single",(function(){return ei})),n.d(e,"skip",(function(){return ii})),n.d(e,"skipLast",(function(){return ui})),n.d(e,"skipUntil",(function(){return li})),n.d(e,"skipWhile",(function(){return fi})),n.d(e,"startWith",(function(){return bi})),n.d(e,"subscribeOn",(function(){return ki})),n.d(e,"switchAll",(function(){return Oi})),n.d(e,"switchMap",(function(){return Ti})),n.d(e,"switchMapTo",(function(){return Ni})),n.d(e,"take",(function(){return Me})),n.d(e,"takeLast",(function(){return Cn})),n.d(e,"takeUntil",(function(){return ji})),n.d(e,"takeWhile",(function(){return Pi})),n.d(e,"tap",(function(){return Ie})),n.d(e,"throttle",(function(){return zi})),n.d(e,"throttleTime",(function(){return Wi})),n.d(e,"throwIfEmpty",(function(){return Ve})),n.d(e,"timeInterval",(function(){return Ui})),n.d(e,"timeout",(function(){return Ji})),n.d(e,"timeoutWith",(function(){return $i})),n.d(e,"timestamp",(function(){return Xi})),n.d(e,"toArray",(function(){return no})),n.d(e,"window",(function(){return ro})),n.d(e,"windowCount",(function(){return so})),n.d(e,"windowTime",(function(){return ao})),n.d(e,"windowToggle",(function(){return vo})),n.d(e,"windowWhen",(function(){return go})),n.d(e,"withLatestFrom",(function(){return So})),n.d(e,"zip",(function(){return Ao})),n.d(e,"zipAll",(function(){return Vo}));var r=n(0);function i(t){return"function"==typeof t}var o=!1,s={Promise:void 0,set useDeprecatedSynchronousErrorHandling(t){t&&(new Error).stack;o=t},get useDeprecatedSynchronousErrorHandling(){return o}};function u(t){setTimeout((function(){throw t}))}var c={closed:!0,next:function(t){},error:function(t){if(s.useDeprecatedSynchronousErrorHandling)throw t;u(t)},complete:function(){}},a=Array.isArray||function(t){return t&&"number"==typeof t.length};function l(t){return null!==t&&"object"==typeof t}function h(t){return Error.call(this),this.message=t?t.length+" errors occurred during unsubscription:\n"+t.map((function(t,e){return e+1+") "+t.toString()})).join("\n "):"",this.name="UnsubscriptionError",this.errors=t,this}h.prototype=Object.create(Error.prototype);var p=h,f=function(){function t(t){this.closed=!1,this._parent=null,this._parents=null,this._subscriptions=null,t&&(this._unsubscribe=t)}return t.prototype.unsubscribe=function(){var t,e=!1;if(!this.closed){var n=this._parent,r=this._parents,o=this._unsubscribe,s=this._subscriptions;this.closed=!0,this._parent=null,this._parents=null,this._subscriptions=null;for(var u=-1,c=r?r.length:0;n;)n.remove(this),n=++u<c&&r[u]||null;if(i(o))try{o.call(this)}catch(n){e=!0,t=n instanceof p?d(n.errors):[n]}if(a(s))for(u=-1,c=s.length;++u<c;){var h=s[u];if(l(h))try{h.unsubscribe()}catch(n){e=!0,t=t||[],n instanceof p?t=t.concat(d(n.errors)):t.push(n)}}if(e)throw new p(t)}},t.prototype.add=function(e){var n=e;switch(typeof e){case"function":n=new t(e);case"object":if(n===this||n.closed||"function"!=typeof n.unsubscribe)return n;if(this.closed)return n.unsubscribe(),n;if(!(n instanceof t)){var r=n;(n=new t)._subscriptions=[r]}break;default:if(!e)return t.EMPTY;throw new Error("unrecognized teardown "+e+" added to Subscription.")}if(n._addParent(this)){var i=this._subscriptions;i?i.push(n):this._subscriptions=[n]}return n},t.prototype.remove=function(t){var e=this._subscriptions;if(e){var n=e.indexOf(t);-1!==n&&e.splice(n,1)}},t.prototype._addParent=function(t){var e=this._parent,n=this._parents;return e!==t&&(e?n?-1===n.indexOf(t)&&(n.push(t),!0):(this._parents=[t],!0):(this._parent=t,!0))},t.EMPTY=function(t){return t.closed=!0,t}(new t),t}();function d(t){return t.reduce((function(t,e){return t.concat(e instanceof p?e.errors:e)}),[])}var y="function"==typeof Symbol?Symbol("rxSubscriber"):"@@rxSubscriber_"+Math.random(),b=function(t){function e(n,r,i){var o=t.call(this)||this;switch(o.syncErrorValue=null,o.syncErrorThrown=!1,o.syncErrorThrowable=!1,o.isStopped=!1,arguments.length){case 0:o.destination=c;break;case 1:if(!n){o.destination=c;break}if("object"==typeof n){n instanceof e?(o.syncErrorThrowable=n.syncErrorThrowable,o.destination=n,n.add(o)):(o.syncErrorThrowable=!0,o.destination=new v(o,n));break}default:o.syncErrorThrowable=!0,o.destination=new v(o,n,r,i)}return o}return r.__extends(e,t),e.prototype[y]=function(){return this},e.create=function(t,n,r){var i=new e(t,n,r);return i.syncErrorThrowable=!1,i},e.prototype.next=function(t){this.isStopped||this._next(t)},e.prototype.error=function(t){this.isStopped||(this.isStopped=!0,this._error(t))},e.prototype.complete=function(){this.isStopped||(this.isStopped=!0,this._complete())},e.prototype.unsubscribe=function(){this.closed||(this.isStopped=!0,t.prototype.unsubscribe.call(this))},e.prototype._next=function(t){this.destination.next(t)},e.prototype._error=function(t){this.destination.error(t),this.unsubscribe()},e.prototype._complete=function(){this.destination.complete(),this.unsubscribe()},e.prototype._unsubscribeAndRecycle=function(){var t=this._parent,e=this._parents;return this._parent=null,this._parents=null,this.unsubscribe(),this.closed=!1,this.isStopped=!1,this._parent=t,this._parents=e,this},e}(f),v=function(t){function e(e,n,r,o){var s,u=t.call(this)||this;u._parentSubscriber=e;var a=u;return i(n)?s=n:n&&(s=n.next,r=n.error,o=n.complete,n!==c&&(i((a=Object.create(n)).unsubscribe)&&u.add(a.unsubscribe.bind(a)),a.unsubscribe=u.unsubscribe.bind(u))),u._context=a,u._next=s,u._error=r,u._complete=o,u}return r.__extends(e,t),e.prototype.next=function(t){if(!this.isStopped&&this._next){var e=this._parentSubscriber;s.useDeprecatedSynchronousErrorHandling&&e.syncErrorThrowable?this.__tryOrSetError(e,this._next,t)&&this.unsubscribe():this.__tryOrUnsub(this._next,t)}},e.prototype.error=function(t){if(!this.isStopped){var e=this._parentSubscriber,n=s.useDeprecatedSynchronousErrorHandling;if(this._error)n&&e.syncErrorThrowable?(this.__tryOrSetError(e,this._error,t),this.unsubscribe()):(this.__tryOrUnsub(this._error,t),this.unsubscribe());else if(e.syncErrorThrowable)n?(e.syncErrorValue=t,e.syncErrorThrown=!0):u(t),this.unsubscribe();else{if(this.unsubscribe(),n)throw t;u(t)}}},e.prototype.complete=function(){var t=this;if(!this.isStopped){var e=this._parentSubscriber;if(this._complete){var n=function(){return t._complete.call(t._context)};s.useDeprecatedSynchronousErrorHandling&&e.syncErrorThrowable?(this.__tryOrSetError(e,n),this.unsubscribe()):(this.__tryOrUnsub(n),this.unsubscribe())}else this.unsubscribe()}},e.prototype.__tryOrUnsub=function(t,e){try{t.call(this._context,e)}catch(t){if(this.unsubscribe(),s.useDeprecatedSynchronousErrorHandling)throw t;u(t)}},e.prototype.__tryOrSetError=function(t,e,n){if(!s.useDeprecatedSynchronousErrorHandling)throw new Error("bad call");try{e.call(this._context,n)}catch(e){return s.useDeprecatedSynchronousErrorHandling?(t.syncErrorValue=e,t.syncErrorThrown=!0,!0):(u(e),!0)}return!1},e.prototype._unsubscribe=function(){var t=this._parentSubscriber;this._context=null,this._parentSubscriber=null,t.unsubscribe()},e}(b),_=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return r.__extends(e,t),e.prototype.notifyNext=function(t,e,n,r,i){this.destination.next(e)},e.prototype.notifyError=function(t,e){this.destination.error(t)},e.prototype.notifyComplete=function(t){this.destination.complete()},e}(b),m=function(t){function e(e,n,r){var i=t.call(this)||this;return i.parent=e,i.outerValue=n,i.outerIndex=r,i.index=0,i}return r.__extends(e,t),e.prototype._next=function(t){this.parent.notifyNext(this.outerValue,t,this.outerIndex,this.index++,this)},e.prototype._error=function(t){this.parent.notifyError(t,this),this.unsubscribe()},e.prototype._complete=function(){this.parent.notifyComplete(this),this.unsubscribe()},e}(b);var g="function"==typeof Symbol&&Symbol.observable||"@@observable";function w(){}function x(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return S(t)}function S(t){return t?1===t.length?t[0]:function(e){return t.reduce((function(t,e){return e(t)}),e)}:w}var k=function(){function t(t){this._isScalar=!1,t&&(this._subscribe=t)}return t.prototype.lift=function(e){var n=new t;return n.source=this,n.operator=e,n},t.prototype.subscribe=function(t,e,n){var r=this.operator,i=function(t,e,n){if(t){if(t instanceof b)return t;if(t[y])return t[y]()}return t||e||n?new b(t,e,n):new b(c)}(t,e,n);if(r?i.add(r.call(i,this.source)):i.add(this.source||s.useDeprecatedSynchronousErrorHandling&&!i.syncErrorThrowable?this._subscribe(i):this._trySubscribe(i)),s.useDeprecatedSynchronousErrorHandling&&i.syncErrorThrowable&&(i.syncErrorThrowable=!1,i.syncErrorThrown))throw i.syncErrorValue;return i},t.prototype._trySubscribe=function(t){try{return this._subscribe(t)}catch(e){s.useDeprecatedSynchronousErrorHandling&&(t.syncErrorThrown=!0,t.syncErrorValue=e),!function(t){for(;t;){var e=t,n=e.closed,r=e.destination,i=e.isStopped;if(n||i)return!1;t=r&&r instanceof b?r:null}return!0}(t)?console.warn(e):t.error(e)}},t.prototype.forEach=function(t,e){var n=this;return new(e=C(e))((function(e,r){var i;i=n.subscribe((function(e){try{t(e)}catch(t){r(t),i&&i.unsubscribe()}}),r,e)}))},t.prototype._subscribe=function(t){var e=this.source;return e&&e.subscribe(t)},t.prototype[g]=function(){return this},t.prototype.pipe=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return 0===t.length?this:S(t)(this)},t.prototype.toPromise=function(t){var e=this;return new(t=C(t))((function(t,n){var r;e.subscribe((function(t){return r=t}),(function(t){return n(t)}),(function(){return t(r)}))}))},t.create=function(e){return new t(e)},t}();function C(t){if(t||(t=s.Promise||Promise),!t)throw new Error("no Promise impl found");return t}var T=function(t){return function(e){for(var n=0,r=t.length;n<r&&!e.closed;n++)e.next(t[n]);e.closed||e.complete()}},E=function(t){return function(e){return t.then((function(t){e.closed||(e.next(t),e.complete())}),(function(t){return e.error(t)})).then(null,u),e}};function I(){return"function"==typeof Symbol&&Symbol.iterator?Symbol.iterator:"@@iterator"}var O=I(),N=function(t){return function(e){for(var n=t[O]();;){var r=n.next();if(r.done){e.complete();break}if(e.next(r.value),e.closed)break}return"function"==typeof n.return&&e.add((function(){n.return&&n.return()})),e}},j=function(t){return function(e){var n=t[g]();if("function"!=typeof n.subscribe)throw new TypeError("Provided object does not correctly implement Symbol.observable");return n.subscribe(e)}},A=function(t){return t&&"number"==typeof t.length&&"function"!=typeof t};function V(t){return!!t&&"function"!=typeof t.subscribe&&"function"==typeof t.then}var P=function(t){if(t instanceof k)return function(e){return t._isScalar?(e.next(t.value),void e.complete()):t.subscribe(e)};if(t&&"function"==typeof t[g])return j(t);if(A(t))return T(t);if(V(t))return E(t);if(t&&"function"==typeof t[O])return N(t);var e=l(t)?"an invalid object":"'"+t+"'";throw new TypeError("You provided "+e+" where a stream was expected. You can provide an Observable, Promise, Array, or Iterable.")};function M(t,e,n,r,i){if(void 0===i&&(i=new m(t,n,r)),!i.closed)return P(e)(i)}function D(t){return function(e){return e.lift(new B(t))}}var B=function(){function t(t){this.durationSelector=t}return t.prototype.call=function(t,e){return e.subscribe(new z(t,this.durationSelector))},t}(),z=function(t){function e(e,n){var r=t.call(this,e)||this;return r.durationSelector=n,r.hasValue=!1,r}return r.__extends(e,t),e.prototype._next=function(t){if(this.value=t,this.hasValue=!0,!this.throttled){var e=void 0;try{e=(0,this.durationSelector)(t)}catch(t){return this.destination.error(t)}var n=M(this,e);!n||n.closed?this.clearThrottle():this.add(this.throttled=n)}},e.prototype.clearThrottle=function(){var t=this.value,e=this.hasValue,n=this.throttled;n&&(this.remove(n),this.throttled=null,n.unsubscribe()),e&&(this.value=null,this.hasValue=!1,this.destination.next(t))},e.prototype.notifyNext=function(t,e,n,r){this.clearThrottle()},e.prototype.notifyComplete=function(){this.clearThrottle()},e}(_),R=function(t){function e(e,n){var r=t.call(this,e,n)||this;return r.scheduler=e,r.work=n,r.pending=!1,r}return r.__extends(e,t),e.prototype.schedule=function(t,e){if(void 0===e&&(e=0),this.closed)return this;this.state=t;var n=this.id,r=this.scheduler;return null!=n&&(this.id=this.recycleAsyncId(r,n,e)),this.pending=!0,this.delay=e,this.id=this.id||this.requestAsyncId(r,this.id,e),this},e.prototype.requestAsyncId=function(t,e,n){return void 0===n&&(n=0),setInterval(t.flush.bind(t,this),n)},e.prototype.recycleAsyncId=function(t,e,n){if(void 0===n&&(n=0),null!==n&&this.delay===n&&!1===this.pending)return e;clearInterval(e)},e.prototype.execute=function(t,e){if(this.closed)return new Error("executing a cancelled action");this.pending=!1;var n=this._execute(t,e);if(n)return n;!1===this.pending&&null!=this.id&&(this.id=this.recycleAsyncId(this.scheduler,this.id,null))},e.prototype._execute=function(t,e){var n=!1,r=void 0;try{this.work(t)}catch(t){n=!0,r=!!t&&t||new Error(t)}if(n)return this.unsubscribe(),r},e.prototype._unsubscribe=function(){var t=this.id,e=this.scheduler,n=e.actions,r=n.indexOf(this);this.work=null,this.state=null,this.pending=!1,this.scheduler=null,-1!==r&&n.splice(r,1),null!=t&&(this.id=this.recycleAsyncId(e,t,null)),this.delay=null},e}(function(t){function e(e,n){return t.call(this)||this}return r.__extends(e,t),e.prototype.schedule=function(t,e){return void 0===e&&(e=0),this},e}(f)),F=function(){function t(e,n){void 0===n&&(n=t.now),this.SchedulerAction=e,this.now=n}return t.prototype.schedule=function(t,e,n){return void 0===e&&(e=0),new this.SchedulerAction(this,t).schedule(n,e)},t.now=function(){return Date.now()},t}(),W=function(t){function e(n,r){void 0===r&&(r=F.now);var i=t.call(this,n,(function(){return e.delegate&&e.delegate!==i?e.delegate.now():r()}))||this;return i.actions=[],i.active=!1,i.scheduled=void 0,i}return r.__extends(e,t),e.prototype.schedule=function(n,r,i){return void 0===r&&(r=0),e.delegate&&e.delegate!==this?e.delegate.schedule(n,r,i):t.prototype.schedule.call(this,n,r,i)},e.prototype.flush=function(t){var e=this.actions;if(this.active)e.push(t);else{var n;this.active=!0;do{if(n=t.execute(t.state,t.delay))break}while(t=e.shift());if(this.active=!1,n){for(;t=e.shift();)t.unsubscribe();throw n}}},e}(F),H=new W(R);function L(t){return!a(t)&&t-parseFloat(t)+1>=0}function q(t){return t&&"function"==typeof t.schedule}function U(t){var e=t.index,n=t.period,r=t.subscriber;if(r.next(e),!r.closed){if(-1===n)return r.complete();t.index=e+1,this.schedule(t,n)}}function Y(t,e){return void 0===e&&(e=H),D((function(){return function(t,e,n){void 0===t&&(t=0);var r=-1;return L(e)?r=Number(e)<1?1:Number(e):q(e)&&(n=e),q(n)||(n=H),new k((function(e){var i=L(t)?t:+t-n.now();return n.schedule(U,i,{index:0,period:r,subscriber:e})}))}(t,e)}))}function K(t){return function(e){return e.lift(new G(t))}}var G=function(){function t(t){this.closingNotifier=t}return t.prototype.call=function(t,e){return e.subscribe(new $(t,this.closingNotifier))},t}(),$=function(t){function e(e,n){var r=t.call(this,e)||this;return r.buffer=[],r.add(M(r,n)),r}return r.__extends(e,t),e.prototype._next=function(t){this.buffer.push(t)},e.prototype.notifyNext=function(t,e,n,r,i){var o=this.buffer;this.buffer=[],this.destination.next(o)},e}(_);function Q(t,e){return void 0===e&&(e=null),function(n){return n.lift(new Z(t,e))}}var Z=function(){function t(t,e){this.bufferSize=t,this.startBufferEvery=e,this.subscriberClass=e&&t!==e?X:J}return t.prototype.call=function(t,e){return e.subscribe(new this.subscriberClass(t,this.bufferSize,this.startBufferEvery))},t}(),J=function(t){function e(e,n){var r=t.call(this,e)||this;return r.bufferSize=n,r.buffer=[],r}return r.__extends(e,t),e.prototype._next=function(t){var e=this.buffer;e.push(t),e.length==this.bufferSize&&(this.destination.next(e),this.buffer=[])},e.prototype._complete=function(){var e=this.buffer;e.length>0&&this.destination.next(e),t.prototype._complete.call(this)},e}(b),X=function(t){function e(e,n,r){var i=t.call(this,e)||this;return i.bufferSize=n,i.startBufferEvery=r,i.buffers=[],i.count=0,i}return r.__extends(e,t),e.prototype._next=function(t){var e=this.bufferSize,n=this.startBufferEvery,r=this.buffers,i=this.count;this.count++,i%n==0&&r.push([]);for(var o=r.length;o--;){var s=r[o];s.push(t),s.length===e&&(r.splice(o,1),this.destination.next(s))}},e.prototype._complete=function(){for(var e=this.buffers,n=this.destination;e.length>0;){var r=e.shift();r.length>0&&n.next(r)}t.prototype._complete.call(this)},e}(b);function tt(t){var e=arguments.length,n=H;q(arguments[arguments.length-1])&&(n=arguments[arguments.length-1],e--);var r=null;e>=2&&(r=arguments[1]);var i=Number.POSITIVE_INFINITY;return e>=3&&(i=arguments[2]),function(e){return e.lift(new et(t,r,i,n))}}var et=function(){function t(t,e,n,r){this.bufferTimeSpan=t,this.bufferCreationInterval=e,this.maxBufferSize=n,this.scheduler=r}return t.prototype.call=function(t,e){return e.subscribe(new rt(t,this.bufferTimeSpan,this.bufferCreationInterval,this.maxBufferSize,this.scheduler))},t}(),nt=function(){return function(){this.buffer=[]}}(),rt=function(t){function e(e,n,r,i,o){var s=t.call(this,e)||this;s.bufferTimeSpan=n,s.bufferCreationInterval=r,s.maxBufferSize=i,s.scheduler=o,s.contexts=[];var u=s.openContext();if(s.timespanOnly=null==r||r<0,s.timespanOnly){var c={subscriber:s,context:u,bufferTimeSpan:n};s.add(u.closeAction=o.schedule(it,n,c))}else{var a={subscriber:s,context:u},l={bufferTimeSpan:n,bufferCreationInterval:r,subscriber:s,scheduler:o};s.add(u.closeAction=o.schedule(st,n,a)),s.add(o.schedule(ot,r,l))}return s}return r.__extends(e,t),e.prototype._next=function(t){for(var e,n=this.contexts,r=n.length,i=0;i<r;i++){var o=n[i],s=o.buffer;s.push(t),s.length==this.maxBufferSize&&(e=o)}e&&this.onBufferFull(e)},e.prototype._error=function(e){this.contexts.length=0,t.prototype._error.call(this,e)},e.prototype._complete=function(){for(var e=this.contexts,n=this.destination;e.length>0;){var r=e.shift();n.next(r.buffer)}t.prototype._complete.call(this)},e.prototype._unsubscribe=function(){this.contexts=null},e.prototype.onBufferFull=function(t){this.closeContext(t);var e=t.closeAction;if(e.unsubscribe(),this.remove(e),!this.closed&&this.timespanOnly){t=this.openContext();var n=this.bufferTimeSpan,r={subscriber:this,context:t,bufferTimeSpan:n};this.add(t.closeAction=this.scheduler.schedule(it,n,r))}},e.prototype.openContext=function(){var t=new nt;return this.contexts.push(t),t},e.prototype.closeContext=function(t){this.destination.next(t.buffer);var e=this.contexts;(e?e.indexOf(t):-1)>=0&&e.splice(e.indexOf(t),1)},e}(b);function it(t){var e=t.subscriber,n=t.context;n&&e.closeContext(n),e.closed||(t.context=e.openContext(),t.context.closeAction=this.schedule(t,t.bufferTimeSpan))}function ot(t){var e=t.bufferCreationInterval,n=t.bufferTimeSpan,r=t.subscriber,i=t.scheduler,o=r.openContext();r.closed||(r.add(o.closeAction=i.schedule(st,n,{subscriber:r,context:o})),this.schedule(t,e))}function st(t){var e=t.subscriber,n=t.context;e.closeContext(n)}function ut(t,e){return function(n){return n.lift(new ct(t,e))}}var ct=function(){function t(t,e){this.openings=t,this.closingSelector=e}return t.prototype.call=function(t,e){return e.subscribe(new at(t,this.openings,this.closingSelector))},t}(),at=function(t){function e(e,n,r){var i=t.call(this,e)||this;return i.openings=n,i.closingSelector=r,i.contexts=[],i.add(M(i,n)),i}return r.__extends(e,t),e.prototype._next=function(t){for(var e=this.contexts,n=e.length,r=0;r<n;r++)e[r].buffer.push(t)},e.prototype._error=function(e){for(var n=this.contexts;n.length>0;){var r=n.shift();r.subscription.unsubscribe(),r.buffer=null,r.subscription=null}this.contexts=null,t.prototype._error.call(this,e)},e.prototype._complete=function(){for(var e=this.contexts;e.length>0;){var n=e.shift();this.destination.next(n.buffer),n.subscription.unsubscribe(),n.buffer=null,n.subscription=null}this.contexts=null,t.prototype._complete.call(this)},e.prototype.notifyNext=function(t,e,n,r,i){t?this.closeBuffer(t):this.openBuffer(e)},e.prototype.notifyComplete=function(t){this.closeBuffer(t.context)},e.prototype.openBuffer=function(t){try{var e=this.closingSelector.call(this,t);e&&this.trySubscribe(e)}catch(t){this._error(t)}},e.prototype.closeBuffer=function(t){var e=this.contexts;if(e&&t){var n=t.buffer,r=t.subscription;this.destination.next(n),e.splice(e.indexOf(t),1),this.remove(r),r.unsubscribe()}},e.prototype.trySubscribe=function(t){var e=this.contexts,n=new f,r={buffer:[],subscription:n};e.push(r);var i=M(this,t,r);!i||i.closed?this.closeBuffer(r):(i.context=r,this.add(i),n.add(i))},e}(_);function lt(t){return function(e){return e.lift(new ht(t))}}var ht=function(){function t(t){this.closingSelector=t}return t.prototype.call=function(t,e){return e.subscribe(new pt(t,this.closingSelector))},t}(),pt=function(t){function e(e,n){var r=t.call(this,e)||this;return r.closingSelector=n,r.subscribing=!1,r.openBuffer(),r}return r.__extends(e,t),e.prototype._next=function(t){this.buffer.push(t)},e.prototype._complete=function(){var e=this.buffer;e&&this.destination.next(e),t.prototype._complete.call(this)},e.prototype._unsubscribe=function(){this.buffer=null,this.subscribing=!1},e.prototype.notifyNext=function(t,e,n,r,i){this.openBuffer()},e.prototype.notifyComplete=function(){this.subscribing?this.complete():this.openBuffer()},e.prototype.openBuffer=function(){var t=this.closingSubscription;t&&(this.remove(t),t.unsubscribe());var e,n=this.buffer;this.buffer&&this.destination.next(n),this.buffer=[];try{e=(0,this.closingSelector)()}catch(t){return this.error(t)}t=new f,this.closingSubscription=t,this.add(t),this.subscribing=!0,t.add(M(this,e)),this.subscribing=!1},e}(_);function ft(t){return function(e){var n=new dt(t),r=e.lift(n);return n.caught=r}}var dt=function(){function t(t){this.selector=t}return t.prototype.call=function(t,e){return e.subscribe(new yt(t,this.selector,this.caught))},t}(),yt=function(t){function e(e,n,r){var i=t.call(this,e)||this;return i.selector=n,i.caught=r,i}return r.__extends(e,t),e.prototype.error=function(e){if(!this.isStopped){var n=void 0;try{n=this.selector(e,this.caught)}catch(e){return void t.prototype.error.call(this,e)}this._unsubscribeAndRecycle();var r=new m(this,void 0,void 0);this.add(r),M(this,n,void 0,void 0,r)}},e}(_);function bt(t,e){return new k(e?function(n){var r=new f,i=0;return r.add(e.schedule((function(){i!==t.length?(n.next(t[i++]),n.closed||r.add(this.schedule())):n.complete()}))),r}:T(t))}var vt={};var _t=function(){function t(t){this.resultSelector=t}return t.prototype.call=function(t,e){return e.subscribe(new mt(t,this.resultSelector))},t}(),mt=function(t){function e(e,n){var r=t.call(this,e)||this;return r.resultSelector=n,r.active=0,r.values=[],r.observables=[],r}return r.__extends(e,t),e.prototype._next=function(t){this.values.push(vt),this.observables.push(t)},e.prototype._complete=function(){var t=this.observables,e=t.length;if(0===e)this.destination.complete();else{this.active=e,this.toRespond=e;for(var n=0;n<e;n++){var r=t[n];this.add(M(this,r,r,n))}}},e.prototype.notifyComplete=function(t){0==(this.active-=1)&&this.destination.complete()},e.prototype.notifyNext=function(t,e,n,r,i){var o=this.values,s=o[n],u=this.toRespond?s===vt?--this.toRespond:this.toRespond:0;o[n]=e,0===u&&(this.resultSelector?this._tryResultSelector(o):this.destination.next(o.slice()))},e.prototype._tryResultSelector=function(t){var e;try{e=this.resultSelector.apply(this,t)}catch(t){return void this.destination.error(t)}this.destination.next(e)},e}(_);function gt(t){return function(e){return e.lift(new _t(t))}}function wt(t,e){if(!e)return t instanceof k?t:new k(P(t));if(null!=t){if(function(t){return t&&"function"==typeof t[g]}(t))return function(t,e){return new k(e?function(n){var r=new f;return r.add(e.schedule((function(){var i=t[g]();r.add(i.subscribe({next:function(t){r.add(e.schedule((function(){return n.next(t)})))},error:function(t){r.add(e.schedule((function(){return n.error(t)})))},complete:function(){r.add(e.schedule((function(){return n.complete()})))}}))}))),r}:j(t))}(t,e);if(V(t))return function(t,e){return new k(e?function(n){var r=new f;return r.add(e.schedule((function(){return t.then((function(t){r.add(e.schedule((function(){n.next(t),r.add(e.schedule((function(){return n.complete()})))})))}),(function(t){r.add(e.schedule((function(){return n.error(t)})))}))}))),r}:E(t))}(t,e);if(A(t))return bt(t,e);if(function(t){return t&&"function"==typeof t[O]}(t)||"string"==typeof t)return function(t,e){if(!t)throw new Error("Iterable cannot be null");return new k(e?function(n){var r,i=new f;return i.add((function(){r&&"function"==typeof r.return&&r.return()})),i.add(e.schedule((function(){r=t[O](),i.add(e.schedule((function(){if(!n.closed){var t,e;try{var i=r.next();t=i.value,e=i.done}catch(t){return void n.error(t)}e?n.complete():(n.next(t),this.schedule())}})))}))),i}:N(t))}(t,e)}throw new TypeError((null!==t&&typeof t||t)+" is not observable")}function xt(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n=null;return"function"==typeof t[t.length-1]&&(n=t.pop()),1===t.length&&a(t[0])&&(t=t[0].slice()),function(e){return e.lift.call(wt([e].concat(t)),new _t(n))}}var St=new k((function(t){return t.complete()}));function kt(t){return t?function(t){return new k((function(e){return t.schedule((function(){return e.complete()}))}))}(t):St}function Ct(t){var e=new k((function(e){e.next(t),e.complete()}));return e._isScalar=!0,e.value=t,e}function Tt(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n=t[t.length-1];switch(q(n)?t.pop():n=void 0,t.length){case 0:return kt(n);case 1:return n?bt(t,n):Ct(t[0]);default:return bt(t,n)}}function Et(t,e){return function(n){if("function"!=typeof t)throw new TypeError("argument is not a function. Are you looking for `mapTo()`?");return n.lift(new It(t,e))}}var It=function(){function t(t,e){this.project=t,this.thisArg=e}return t.prototype.call=function(t,e){return e.subscribe(new Ot(t,this.project,this.thisArg))},t}(),Ot=function(t){function e(e,n,r){var i=t.call(this,e)||this;return i.project=n,i.count=0,i.thisArg=r||i,i}return r.__extends(e,t),e.prototype._next=function(t){var e;try{e=this.project.call(this.thisArg,t,this.count++)}catch(t){return void this.destination.error(t)}this.destination.next(e)},e}(b);function Nt(t,e,n){return void 0===n&&(n=Number.POSITIVE_INFINITY),"function"==typeof e?function(r){return r.pipe(Nt((function(n,r){return wt(t(n,r)).pipe(Et((function(t,i){return e(n,t,r,i)})))}),n))}:("number"==typeof e&&(n=e),function(e){return e.lift(new jt(t,n))})}var jt=function(){function t(t,e){void 0===e&&(e=Number.POSITIVE_INFINITY),this.project=t,this.concurrent=e}return t.prototype.call=function(t,e){return e.subscribe(new At(t,this.project,this.concurrent))},t}(),At=function(t){function e(e,n,r){void 0===r&&(r=Number.POSITIVE_INFINITY);var i=t.call(this,e)||this;return i.project=n,i.concurrent=r,i.hasCompleted=!1,i.buffer=[],i.active=0,i.index=0,i}return r.__extends(e,t),e.prototype._next=function(t){this.active<this.concurrent?this._tryNext(t):this.buffer.push(t)},e.prototype._tryNext=function(t){var e,n=this.index++;try{e=this.project(t,n)}catch(t){return void this.destination.error(t)}this.active++,this._innerSub(e,t,n)},e.prototype._innerSub=function(t,e,n){var r=new m(this,void 0,void 0);this.destination.add(r),M(this,t,e,n,r)},e.prototype._complete=function(){this.hasCompleted=!0,0===this.active&&0===this.buffer.length&&this.destination.complete(),this.unsubscribe()},e.prototype.notifyNext=function(t,e,n,r,i){this.destination.next(e)},e.prototype.notifyComplete=function(t){var e=this.buffer;this.remove(t),this.active--,e.length>0?this._next(e.shift()):0===this.active&&this.hasCompleted&&this.destination.complete()},e}(_);function Vt(t){return t}function Pt(t){return void 0===t&&(t=Number.POSITIVE_INFINITY),Nt(Vt,t)}function Mt(){return Pt(1)}function Dt(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return Mt()(Tt.apply(void 0,t))}function Bt(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return function(e){return e.lift.call(Dt.apply(void 0,[e].concat(t)))}}function zt(t,e){return Nt(t,e,1)}function Rt(t,e){return zt((function(){return t}),e)}function Ft(t){return function(e){return e.lift(new Wt(t,e))}}var Wt=function(){function t(t,e){this.predicate=t,this.source=e}return t.prototype.call=function(t,e){return e.subscribe(new Ht(t,this.predicate,this.source))},t}(),Ht=function(t){function e(e,n,r){var i=t.call(this,e)||this;return i.predicate=n,i.source=r,i.count=0,i.index=0,i}return r.__extends(e,t),e.prototype._next=function(t){this.predicate?this._tryPredicate(t):this.count++},e.prototype._tryPredicate=function(t){var e;try{e=this.predicate(t,this.index++,this.source)}catch(t){return void this.destination.error(t)}e&&this.count++},e.prototype._complete=function(){this.destination.next(this.count),this.destination.complete()},e}(b);function Lt(t){return function(e){return e.lift(new qt(t))}}var qt=function(){function t(t){this.durationSelector=t}return t.prototype.call=function(t,e){return e.subscribe(new Ut(t,this.durationSelector))},t}(),Ut=function(t){function e(e,n){var r=t.call(this,e)||this;return r.durationSelector=n,r.hasValue=!1,r.durationSubscription=null,r}return r.__extends(e,t),e.prototype._next=function(t){try{var e=this.durationSelector.call(this,t);e&&this._tryNext(t,e)}catch(t){this.destination.error(t)}},e.prototype._complete=function(){this.emitValue(),this.destination.complete()},e.prototype._tryNext=function(t,e){var n=this.durationSubscription;this.value=t,this.hasValue=!0,n&&(n.unsubscribe(),this.remove(n)),(n=M(this,e))&&!n.closed&&this.add(this.durationSubscription=n)},e.prototype.notifyNext=function(t,e,n,r,i){this.emitValue()},e.prototype.notifyComplete=function(){this.emitValue()},e.prototype.emitValue=function(){if(this.hasValue){var e=this.value,n=this.durationSubscription;n&&(this.durationSubscription=null,n.unsubscribe(),this.remove(n)),this.value=null,this.hasValue=!1,t.prototype._next.call(this,e)}},e}(_);function Yt(t,e){return void 0===e&&(e=H),function(n){return n.lift(new Kt(t,e))}}var Kt=function(){function t(t,e){this.dueTime=t,this.scheduler=e}return t.prototype.call=function(t,e){return e.subscribe(new Gt(t,this.dueTime,this.scheduler))},t}(),Gt=function(t){function e(e,n,r){var i=t.call(this,e)||this;return i.dueTime=n,i.scheduler=r,i.debouncedSubscription=null,i.lastValue=null,i.hasValue=!1,i}return r.__extends(e,t),e.prototype._next=function(t){this.clearDebounce(),this.lastValue=t,this.hasValue=!0,this.add(this.debouncedSubscription=this.scheduler.schedule($t,this.dueTime,this))},e.prototype._complete=function(){this.debouncedNext(),this.destination.complete()},e.prototype.debouncedNext=function(){if(this.clearDebounce(),this.hasValue){var t=this.lastValue;this.lastValue=null,this.hasValue=!1,this.destination.next(t)}},e.prototype.clearDebounce=function(){var t=this.debouncedSubscription;null!==t&&(this.remove(t),t.unsubscribe(),this.debouncedSubscription=null)},e}(b);function $t(t){t.debouncedNext()}function Qt(t){return void 0===t&&(t=null),function(e){return e.lift(new Jt(t))}}var Zt,Jt=function(){function t(t){this.defaultValue=t}return t.prototype.call=function(t,e){return e.subscribe(new Xt(t,this.defaultValue))},t}(),Xt=function(t){function e(e,n){var r=t.call(this,e)||this;return r.defaultValue=n,r.isEmpty=!0,r}return r.__extends(e,t),e.prototype._next=function(t){this.isEmpty=!1,this.destination.next(t)},e.prototype._complete=function(){this.isEmpty&&this.destination.next(this.defaultValue),this.destination.complete()},e}(b);function te(t){return t instanceof Date&&!isNaN(+t)}function ee(t,e){return new k(e?function(n){return e.schedule(ne,0,{error:t,subscriber:n})}:function(e){return e.error(t)})}function ne(t){var e=t.error;t.subscriber.error(e)}Zt||(Zt={});var re=function(){function t(t,e,n){this.kind=t,this.value=e,this.error=n,this.hasValue="N"===t}return t.prototype.observe=function(t){switch(this.kind){case"N":return t.next&&t.next(this.value);case"E":return t.error&&t.error(this.error);case"C":return t.complete&&t.complete()}},t.prototype.do=function(t,e,n){switch(this.kind){case"N":return t&&t(this.value);case"E":return e&&e(this.error);case"C":return n&&n()}},t.prototype.accept=function(t,e,n){return t&&"function"==typeof t.next?this.observe(t):this.do(t,e,n)},t.prototype.toObservable=function(){switch(this.kind){case"N":return Tt(this.value);case"E":return ee(this.error);case"C":return kt()}throw new Error("unexpected notification kind value")},t.createNext=function(e){return void 0!==e?new t("N",e):t.undefinedValueNotification},t.createError=function(e){return new t("E",void 0,e)},t.createComplete=function(){return t.completeNotification},t.completeNotification=new t("C"),t.undefinedValueNotification=new t("N",void 0),t}();function ie(t,e){void 0===e&&(e=H);var n=te(t)?+t-e.now():Math.abs(t);return function(t){return t.lift(new oe(n,e))}}var oe=function(){function t(t,e){this.delay=t,this.scheduler=e}return t.prototype.call=function(t,e){return e.subscribe(new se(t,this.delay,this.scheduler))},t}(),se=function(t){function e(e,n,r){var i=t.call(this,e)||this;return i.delay=n,i.scheduler=r,i.queue=[],i.active=!1,i.errored=!1,i}return r.__extends(e,t),e.dispatch=function(t){for(var e=t.source,n=e.queue,r=t.scheduler,i=t.destination;n.length>0&&n[0].time-r.now()<=0;)n.shift().notification.observe(i);if(n.length>0){var o=Math.max(0,n[0].time-r.now());this.schedule(t,o)}else this.unsubscribe(),e.active=!1},e.prototype._schedule=function(t){this.active=!0,this.destination.add(t.schedule(e.dispatch,this.delay,{source:this,destination:this.destination,scheduler:t}))},e.prototype.scheduleNotification=function(t){if(!0!==this.errored){var e=this.scheduler,n=new ue(e.now()+this.delay,t);this.queue.push(n),!1===this.active&&this._schedule(e)}},e.prototype._next=function(t){this.scheduleNotification(re.createNext(t))},e.prototype._error=function(t){this.errored=!0,this.queue=[],this.destination.error(t),this.unsubscribe()},e.prototype._complete=function(){this.scheduleNotification(re.createComplete()),this.unsubscribe()},e}(b),ue=function(){return function(t,e){this.time=t,this.notification=e}}();function ce(t,e){return e?function(n){return new he(n,e).lift(new ae(t))}:function(e){return e.lift(new ae(t))}}var ae=function(){function t(t){this.delayDurationSelector=t}return t.prototype.call=function(t,e){return e.subscribe(new le(t,this.delayDurationSelector))},t}(),le=function(t){function e(e,n){var r=t.call(this,e)||this;return r.delayDurationSelector=n,r.completed=!1,r.delayNotifierSubscriptions=[],r.index=0,r}return r.__extends(e,t),e.prototype.notifyNext=function(t,e,n,r,i){this.destination.next(t),this.removeSubscription(i),this.tryComplete()},e.prototype.notifyError=function(t,e){this._error(t)},e.prototype.notifyComplete=function(t){var e=this.removeSubscription(t);e&&this.destination.next(e),this.tryComplete()},e.prototype._next=function(t){var e=this.index++;try{var n=this.delayDurationSelector(t,e);n&&this.tryDelay(n,t)}catch(t){this.destination.error(t)}},e.prototype._complete=function(){this.completed=!0,this.tryComplete(),this.unsubscribe()},e.prototype.removeSubscription=function(t){t.unsubscribe();var e=this.delayNotifierSubscriptions.indexOf(t);return-1!==e&&this.delayNotifierSubscriptions.splice(e,1),t.outerValue},e.prototype.tryDelay=function(t,e){var n=M(this,t,e);n&&!n.closed&&(this.destination.add(n),this.delayNotifierSubscriptions.push(n))},e.prototype.tryComplete=function(){this.completed&&0===this.delayNotifierSubscriptions.length&&this.destination.complete()},e}(_),he=function(t){function e(e,n){var r=t.call(this)||this;return r.source=e,r.subscriptionDelay=n,r}return r.__extends(e,t),e.prototype._subscribe=function(t){this.subscriptionDelay.subscribe(new pe(t,this.source))},e}(k),pe=function(t){function e(e,n){var r=t.call(this)||this;return r.parent=e,r.source=n,r.sourceSubscribed=!1,r}return r.__extends(e,t),e.prototype._next=function(t){this.subscribeToSource()},e.prototype._error=function(t){this.unsubscribe(),this.parent.error(t)},e.prototype._complete=function(){this.unsubscribe(),this.subscribeToSource()},e.prototype.subscribeToSource=function(){this.sourceSubscribed||(this.sourceSubscribed=!0,this.unsubscribe(),this.source.subscribe(this.parent))},e}(b);function fe(){return function(t){return t.lift(new de)}}var de=function(){function t(){}return t.prototype.call=function(t,e){return e.subscribe(new ye(t))},t}(),ye=function(t){function e(e){return t.call(this,e)||this}return r.__extends(e,t),e.prototype._next=function(t){t.observe(this.destination)},e}(b);function be(t,e){return function(n){return n.lift(new ve(t,e))}}var ve=function(){function t(t,e){this.keySelector=t,this.flushes=e}return t.prototype.call=function(t,e){return e.subscribe(new _e(t,this.keySelector,this.flushes))},t}(),_e=function(t){function e(e,n,r){var i=t.call(this,e)||this;return i.keySelector=n,i.values=new Set,r&&i.add(M(i,r)),i}return r.__extends(e,t),e.prototype.notifyNext=function(t,e,n,r,i){this.values.clear()},e.prototype.notifyError=function(t,e){this._error(t)},e.prototype._next=function(t){this.keySelector?this._useKeySelector(t):this._finalizeNext(t,t)},e.prototype._useKeySelector=function(t){var e,n=this.destination;try{e=this.keySelector(t)}catch(t){return void n.error(t)}this._finalizeNext(e,t)},e.prototype._finalizeNext=function(t,e){var n=this.values;n.has(t)||(n.add(t),this.destination.next(e))},e}(_);function me(t,e){return function(n){return n.lift(new ge(t,e))}}var ge=function(){function t(t,e){this.compare=t,this.keySelector=e}return t.prototype.call=function(t,e){return e.subscribe(new we(t,this.compare,this.keySelector))},t}(),we=function(t){function e(e,n,r){var i=t.call(this,e)||this;return i.keySelector=r,i.hasKey=!1,"function"==typeof n&&(i.compare=n),i}return r.__extends(e,t),e.prototype.compare=function(t,e){return t===e},e.prototype._next=function(t){var e;try{var n=this.keySelector;e=n?n(t):t}catch(t){return this.destination.error(t)}var r=!1;if(this.hasKey)try{r=(0,this.compare)(this.key,e)}catch(t){return this.destination.error(t)}else this.hasKey=!0;r||(this.key=e,this.destination.next(t))},e}(b);function xe(t,e){return me((function(n,r){return e?e(n[t],r[t]):n[t]===r[t]}))}function Se(){return Error.call(this),this.message="argument out of range",this.name="ArgumentOutOfRangeError",this}Se.prototype=Object.create(Error.prototype);var ke=Se;function Ce(t,e){return function(n){return n.lift(new Te(t,e))}}var Te=function(){function t(t,e){this.predicate=t,this.thisArg=e}return t.prototype.call=function(t,e){return e.subscribe(new Ee(t,this.predicate,this.thisArg))},t}(),Ee=function(t){function e(e,n,r){var i=t.call(this,e)||this;return i.predicate=n,i.thisArg=r,i.count=0,i}return r.__extends(e,t),e.prototype._next=function(t){var e;try{e=this.predicate.call(this.thisArg,t,this.count++)}catch(t){return void this.destination.error(t)}e&&this.destination.next(t)},e}(b);function Ie(t,e,n){return function(r){return r.lift(new Oe(t,e,n))}}var Oe=function(){function t(t,e,n){this.nextOrObserver=t,this.error=e,this.complete=n}return t.prototype.call=function(t,e){return e.subscribe(new Ne(t,this.nextOrObserver,this.error,this.complete))},t}(),Ne=function(t){function e(e,n,r,o){var s=t.call(this,e)||this;return s._tapNext=w,s._tapError=w,s._tapComplete=w,s._tapError=r||w,s._tapComplete=o||w,i(n)?(s._context=s,s._tapNext=n):n&&(s._context=n,s._tapNext=n.next||w,s._tapError=n.error||w,s._tapComplete=n.complete||w),s}return r.__extends(e,t),e.prototype._next=function(t){try{this._tapNext.call(this._context,t)}catch(t){return void this.destination.error(t)}this.destination.next(t)},e.prototype._error=function(t){try{this._tapError.call(this._context,t)}catch(t){return void this.destination.error(t)}this.destination.error(t)},e.prototype._complete=function(){try{this._tapComplete.call(this._context)}catch(t){return void this.destination.error(t)}return this.destination.complete()},e}(b);function je(){return Error.call(this),this.message="no elements in sequence",this.name="EmptyError",this}je.prototype=Object.create(Error.prototype);var Ae=je,Ve=function(t){return void 0===t&&(t=Pe),Ie({hasValue:!1,next:function(){this.hasValue=!0},complete:function(){if(!this.hasValue)throw t()}})};function Pe(){return new Ae}function Me(t){return function(e){return 0===t?kt():e.lift(new De(t))}}var De=function(){function t(t){if(this.total=t,this.total<0)throw new ke}return t.prototype.call=function(t,e){return e.subscribe(new Be(t,this.total))},t}(),Be=function(t){function e(e,n){var r=t.call(this,e)||this;return r.total=n,r.count=0,r}return r.__extends(e,t),e.prototype._next=function(t){var e=this.total,n=++this.count;n<=e&&(this.destination.next(t),n===e&&(this.destination.complete(),this.unsubscribe()))},e}(b);function ze(t,e){if(t<0)throw new ke;var n=arguments.length>=2;return function(r){return r.pipe(Ce((function(e,n){return n===t})),Me(1),n?Qt(e):Ve((function(){return new ke})))}}function Re(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return function(e){var n=t[t.length-1];q(n)?t.pop():n=null;var r=t.length;return Dt(e,1!==r||n?r>0?bt(t,n):kt(n):Ct(t[0]))}}function Fe(t,e){return function(n){return n.lift(new We(t,e,n))}}var We=function(){function t(t,e,n){this.predicate=t,this.thisArg=e,this.source=n}return t.prototype.call=function(t,e){return e.subscribe(new He(t,this.predicate,this.thisArg,this.source))},t}(),He=function(t){function e(e,n,r,i){var o=t.call(this,e)||this;return o.predicate=n,o.thisArg=r,o.source=i,o.index=0,o.thisArg=r||o,o}return r.__extends(e,t),e.prototype.notifyComplete=function(t){this.destination.next(t),this.destination.complete()},e.prototype._next=function(t){var e=!1;try{e=this.predicate.call(this.thisArg,t,this.index++,this.source)}catch(t){return void this.destination.error(t)}e||this.notifyComplete(!1)},e.prototype._complete=function(){this.notifyComplete(!0)},e}(b);function Le(){return function(t){return t.lift(new qe)}}var qe=function(){function t(){}return t.prototype.call=function(t,e){return e.subscribe(new Ue(t))},t}(),Ue=function(t){function e(e){var n=t.call(this,e)||this;return n.hasCompleted=!1,n.hasSubscription=!1,n}return r.__extends(e,t),e.prototype._next=function(t){this.hasSubscription||(this.hasSubscription=!0,this.add(M(this,t)))},e.prototype._complete=function(){this.hasCompleted=!0,this.hasSubscription||this.destination.complete()},e.prototype.notifyComplete=function(t){this.remove(t),this.hasSubscription=!1,this.hasCompleted&&this.destination.complete()},e}(_);function Ye(t,e){return e?function(n){return n.pipe(Ye((function(n,r){return wt(t(n,r)).pipe(Et((function(t,i){return e(n,t,r,i)})))})))}:function(e){return e.lift(new Ke(t))}}var Ke=function(){function t(t){this.project=t}return t.prototype.call=function(t,e){return e.subscribe(new Ge(t,this.project))},t}(),Ge=function(t){function e(e,n){var r=t.call(this,e)||this;return r.project=n,r.hasSubscription=!1,r.hasCompleted=!1,r.index=0,r}return r.__extends(e,t),e.prototype._next=function(t){this.hasSubscription||this.tryNext(t)},e.prototype.tryNext=function(t){var e,n=this.index++;try{e=this.project(t,n)}catch(t){return void this.destination.error(t)}this.hasSubscription=!0,this._innerSub(e,t,n)},e.prototype._innerSub=function(t,e,n){var r=new m(this,void 0,void 0);this.destination.add(r),M(this,t,e,n,r)},e.prototype._complete=function(){this.hasCompleted=!0,this.hasSubscription||this.destination.complete(),this.unsubscribe()},e.prototype.notifyNext=function(t,e,n,r,i){this.destination.next(e)},e.prototype.notifyError=function(t){this.destination.error(t)},e.prototype.notifyComplete=function(t){this.destination.remove(t),this.hasSubscription=!1,this.hasCompleted&&this.destination.complete()},e}(_);function $e(t,e,n){return void 0===e&&(e=Number.POSITIVE_INFINITY),void 0===n&&(n=void 0),e=(e||0)<1?Number.POSITIVE_INFINITY:e,function(r){return r.lift(new Qe(t,e,n))}}var Qe=function(){function t(t,e,n){this.project=t,this.concurrent=e,this.scheduler=n}return t.prototype.call=function(t,e){return e.subscribe(new Ze(t,this.project,this.concurrent,this.scheduler))},t}(),Ze=function(t){function e(e,n,r,i){var o=t.call(this,e)||this;return o.project=n,o.concurrent=r,o.scheduler=i,o.index=0,o.active=0,o.hasCompleted=!1,r<Number.POSITIVE_INFINITY&&(o.buffer=[]),o}return r.__extends(e,t),e.dispatch=function(t){var e=t.subscriber,n=t.result,r=t.value,i=t.index;e.subscribeToProjection(n,r,i)},e.prototype._next=function(t){var n=this.destination;if(n.closed)this._complete();else{var r=this.index++;if(this.active<this.concurrent){n.next(t);try{var i=(0,this.project)(t,r);if(this.scheduler){var o={subscriber:this,result:i,value:t,index:r};this.destination.add(this.scheduler.schedule(e.dispatch,0,o))}else this.subscribeToProjection(i,t,r)}catch(t){n.error(t)}}else this.buffer.push(t)}},e.prototype.subscribeToProjection=function(t,e,n){this.active++,this.destination.add(M(this,t,e,n))},e.prototype._complete=function(){this.hasCompleted=!0,this.hasCompleted&&0===this.active&&this.destination.complete(),this.unsubscribe()},e.prototype.notifyNext=function(t,e,n,r,i){this._next(e)},e.prototype.notifyComplete=function(t){var e=this.buffer;this.destination.remove(t),this.active--,e&&e.length>0&&this._next(e.shift()),this.hasCompleted&&0===this.active&&this.destination.complete()},e}(_);function Je(t){return function(e){return e.lift(new Xe(t))}}var Xe=function(){function t(t){this.callback=t}return t.prototype.call=function(t,e){return e.subscribe(new tn(t,this.callback))},t}(),tn=function(t){function e(e,n){var r=t.call(this,e)||this;return r.add(new f(n)),r}return r.__extends(e,t),e}(b);function en(t,e){if("function"!=typeof t)throw new TypeError("predicate is not a function");return function(n){return n.lift(new nn(t,n,!1,e))}}var nn=function(){function t(t,e,n,r){this.predicate=t,this.source=e,this.yieldIndex=n,this.thisArg=r}return t.prototype.call=function(t,e){return e.subscribe(new rn(t,this.predicate,this.source,this.yieldIndex,this.thisArg))},t}(),rn=function(t){function e(e,n,r,i,o){var s=t.call(this,e)||this;return s.predicate=n,s.source=r,s.yieldIndex=i,s.thisArg=o,s.index=0,s}return r.__extends(e,t),e.prototype.notifyComplete=function(t){var e=this.destination;e.next(t),e.complete(),this.unsubscribe()},e.prototype._next=function(t){var e=this.predicate,n=this.thisArg,r=this.index++;try{e.call(n||this,t,r,this.source)&&this.notifyComplete(this.yieldIndex?r:t)}catch(t){this.destination.error(t)}},e.prototype._complete=function(){this.notifyComplete(this.yieldIndex?-1:void 0)},e}(b);function on(t,e){return function(n){return n.lift(new nn(t,n,!0,e))}}function sn(t,e){var n=arguments.length>=2;return function(r){return r.pipe(t?Ce((function(e,n){return t(e,n,r)})):Vt,Me(1),n?Qt(e):Ve((function(){return new Ae})))}}function un(){return Error.call(this),this.message="object unsubscribed",this.name="ObjectUnsubscribedError",this}un.prototype=Object.create(Error.prototype);var cn=un,an=function(t){function e(e,n){var r=t.call(this)||this;return r.subject=e,r.subscriber=n,r.closed=!1,r}return r.__extends(e,t),e.prototype.unsubscribe=function(){if(!this.closed){this.closed=!0;var t=this.subject,e=t.observers;if(this.subject=null,e&&0!==e.length&&!t.isStopped&&!t.closed){var n=e.indexOf(this.subscriber);-1!==n&&e.splice(n,1)}}},e}(f),ln=function(t){function e(e){var n=t.call(this,e)||this;return n.destination=e,n}return r.__extends(e,t),e}(b),hn=function(t){function e(){var e=t.call(this)||this;return e.observers=[],e.closed=!1,e.isStopped=!1,e.hasError=!1,e.thrownError=null,e}return r.__extends(e,t),e.prototype[y]=function(){return new ln(this)},e.prototype.lift=function(t){var e=new pn(this,this);return e.operator=t,e},e.prototype.next=function(t){if(this.closed)throw new cn;if(!this.isStopped)for(var e=this.observers,n=e.length,r=e.slice(),i=0;i<n;i++)r[i].next(t)},e.prototype.error=function(t){if(this.closed)throw new cn;this.hasError=!0,this.thrownError=t,this.isStopped=!0;for(var e=this.observers,n=e.length,r=e.slice(),i=0;i<n;i++)r[i].error(t);this.observers.length=0},e.prototype.complete=function(){if(this.closed)throw new cn;this.isStopped=!0;for(var t=this.observers,e=t.length,n=t.slice(),r=0;r<e;r++)n[r].complete();this.observers.length=0},e.prototype.unsubscribe=function(){this.isStopped=!0,this.closed=!0,this.observers=null},e.prototype._trySubscribe=function(e){if(this.closed)throw new cn;return t.prototype._trySubscribe.call(this,e)},e.prototype._subscribe=function(t){if(this.closed)throw new cn;return this.hasError?(t.error(this.thrownError),f.EMPTY):this.isStopped?(t.complete(),f.EMPTY):(this.observers.push(t),new an(this,t))},e.prototype.asObservable=function(){var t=new k;return t.source=this,t},e.create=function(t,e){return new pn(t,e)},e}(k),pn=function(t){function e(e,n){var r=t.call(this)||this;return r.destination=e,r.source=n,r}return r.__extends(e,t),e.prototype.next=function(t){var e=this.destination;e&&e.next&&e.next(t)},e.prototype.error=function(t){var e=this.destination;e&&e.error&&this.destination.error(t)},e.prototype.complete=function(){var t=this.destination;t&&t.complete&&this.destination.complete()},e.prototype._subscribe=function(t){return this.source?this.source.subscribe(t):f.EMPTY},e}(hn);function fn(t,e,n,r){return function(i){return i.lift(new dn(t,e,n,r))}}var dn=function(){function t(t,e,n,r){this.keySelector=t,this.elementSelector=e,this.durationSelector=n,this.subjectSelector=r}return t.prototype.call=function(t,e){return e.subscribe(new yn(t,this.keySelector,this.elementSelector,this.durationSelector,this.subjectSelector))},t}(),yn=function(t){function e(e,n,r,i,o){var s=t.call(this,e)||this;return s.keySelector=n,s.elementSelector=r,s.durationSelector=i,s.subjectSelector=o,s.groups=null,s.attemptedToUnsubscribe=!1,s.count=0,s}return r.__extends(e,t),e.prototype._next=function(t){var e;try{e=this.keySelector(t)}catch(t){return void this.error(t)}this._group(t,e)},e.prototype._group=function(t,e){var n=this.groups;n||(n=this.groups=new Map);var r,i=n.get(e);if(this.elementSelector)try{r=this.elementSelector(t)}catch(t){this.error(t)}else r=t;if(!i){i=this.subjectSelector?this.subjectSelector():new hn,n.set(e,i);var o=new vn(e,i,this);if(this.destination.next(o),this.durationSelector){var s=void 0;try{s=this.durationSelector(new vn(e,i))}catch(t){return void this.error(t)}this.add(s.subscribe(new bn(e,i,this)))}}i.closed||i.next(r)},e.prototype._error=function(t){var e=this.groups;e&&(e.forEach((function(e,n){e.error(t)})),e.clear()),this.destination.error(t)},e.prototype._complete=function(){var t=this.groups;t&&(t.forEach((function(t,e){t.complete()})),t.clear()),this.destination.complete()},e.prototype.removeGroup=function(t){this.groups.delete(t)},e.prototype.unsubscribe=function(){this.closed||(this.attemptedToUnsubscribe=!0,0===this.count&&t.prototype.unsubscribe.call(this))},e}(b),bn=function(t){function e(e,n,r){var i=t.call(this,n)||this;return i.key=e,i.group=n,i.parent=r,i}return r.__extends(e,t),e.prototype._next=function(t){this.complete()},e.prototype._unsubscribe=function(){var t=this.parent,e=this.key;this.key=this.parent=null,t&&t.removeGroup(e)},e}(b),vn=function(t){function e(e,n,r){var i=t.call(this)||this;return i.key=e,i.groupSubject=n,i.refCountSubscription=r,i}return r.__extends(e,t),e.prototype._subscribe=function(t){var e=new f,n=this.refCountSubscription,r=this.groupSubject;return n&&!n.closed&&e.add(new _n(n)),e.add(r.subscribe(t)),e},e}(k),_n=function(t){function e(e){var n=t.call(this)||this;return n.parent=e,e.count++,n}return r.__extends(e,t),e.prototype.unsubscribe=function(){var e=this.parent;e.closed||this.closed||(t.prototype.unsubscribe.call(this),e.count-=1,0===e.count&&e.attemptedToUnsubscribe&&e.unsubscribe())},e}(f);function mn(){return function(t){return t.lift(new gn)}}var gn=function(){function t(){}return t.prototype.call=function(t,e){return e.subscribe(new wn(t))},t}(),wn=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return r.__extends(e,t),e.prototype._next=function(t){},e}(b);function xn(){return function(t){return t.lift(new Sn)}}var Sn=function(){function t(){}return t.prototype.call=function(t,e){return e.subscribe(new kn(t))},t}(),kn=function(t){function e(e){return t.call(this,e)||this}return r.__extends(e,t),e.prototype.notifyComplete=function(t){var e=this.destination;e.next(t),e.complete()},e.prototype._next=function(t){this.notifyComplete(!1)},e.prototype._complete=function(){this.notifyComplete(!0)},e}(b);function Cn(t){return function(e){return 0===t?kt():e.lift(new Tn(t))}}var Tn=function(){function t(t){if(this.total=t,this.total<0)throw new ke}return t.prototype.call=function(t,e){return e.subscribe(new En(t,this.total))},t}(),En=function(t){function e(e,n){var r=t.call(this,e)||this;return r.total=n,r.ring=new Array,r.count=0,r}return r.__extends(e,t),e.prototype._next=function(t){var e=this.ring,n=this.total,r=this.count++;e.length<n?e.push(t):e[r%n]=t},e.prototype._complete=function(){var t=this.destination,e=this.count;if(e>0)for(var n=this.count>=this.total?this.total:this.count,r=this.ring,i=0;i<n;i++){var o=e++%n;t.next(r[o])}t.complete()},e}(b);function In(t,e){var n=arguments.length>=2;return function(r){return r.pipe(t?Ce((function(e,n){return t(e,n,r)})):Vt,Cn(1),n?Qt(e):Ve((function(){return new Ae})))}}function On(t){return function(e){return e.lift(new Nn(t))}}var Nn=function(){function t(t){this.value=t}return t.prototype.call=function(t,e){return e.subscribe(new jn(t,this.value))},t}(),jn=function(t){function e(e,n){var r=t.call(this,e)||this;return r.value=n,r}return r.__extends(e,t),e.prototype._next=function(t){this.destination.next(this.value)},e}(b);function An(){return function(t){return t.lift(new Vn)}}var Vn=function(){function t(){}return t.prototype.call=function(t,e){return e.subscribe(new Pn(t))},t}(),Pn=function(t){function e(e){return t.call(this,e)||this}return r.__extends(e,t),e.prototype._next=function(t){this.destination.next(re.createNext(t))},e.prototype._error=function(t){var e=this.destination;e.next(re.createError(t)),e.complete()},e.prototype._complete=function(){var t=this.destination;t.next(re.createComplete()),t.complete()},e}(b);function Mn(t,e){var n=!1;return arguments.length>=2&&(n=!0),function(r){return r.lift(new Dn(t,e,n))}}var Dn=function(){function t(t,e,n){void 0===n&&(n=!1),this.accumulator=t,this.seed=e,this.hasSeed=n}return t.prototype.call=function(t,e){return e.subscribe(new Bn(t,this.accumulator,this.seed,this.hasSeed))},t}(),Bn=function(t){function e(e,n,r,i){var o=t.call(this,e)||this;return o.accumulator=n,o._seed=r,o.hasSeed=i,o.index=0,o}return r.__extends(e,t),Object.defineProperty(e.prototype,"seed",{get:function(){return this._seed},set:function(t){this.hasSeed=!0,this._seed=t},enumerable:!0,configurable:!0}),e.prototype._next=function(t){if(this.hasSeed)return this._tryNext(t);this.seed=t,this.destination.next(t)},e.prototype._tryNext=function(t){var e,n=this.index++;try{e=this.accumulator(this.seed,t,n)}catch(t){this.destination.error(t)}this.seed=e,this.destination.next(e)},e}(b);function zn(t,e){return arguments.length>=2?function(n){return x(Mn(t,e),Cn(1),Qt(e))(n)}:function(e){return x(Mn((function(e,n,r){return t(e,n,r+1)})),Cn(1))(e)}}function Rn(t){return zn("function"==typeof t?function(e,n){return t(e,n)>0?e:n}:function(t,e){return t>e?t:e})}function Fn(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n=Number.POSITIVE_INFINITY,r=null,i=t[t.length-1];return q(i)?(r=t.pop(),t.length>1&&"number"==typeof t[t.length-1]&&(n=t.pop())):"number"==typeof i&&(n=t.pop()),null===r&&1===t.length&&t[0]instanceof k?t[0]:Pt(n)(bt(t,r))}function Wn(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return function(e){return e.lift.call(Fn.apply(void 0,[e].concat(t)))}}function Hn(t,e,n){return void 0===n&&(n=Number.POSITIVE_INFINITY),"function"==typeof e?Nt((function(){return t}),e,n):("number"==typeof e&&(n=e),Nt((function(){return t}),n))}function Ln(t,e,n){return void 0===n&&(n=Number.POSITIVE_INFINITY),function(r){return r.lift(new qn(t,e,n))}}var qn=function(){function t(t,e,n){this.accumulator=t,this.seed=e,this.concurrent=n}return t.prototype.call=function(t,e){return e.subscribe(new Un(t,this.accumulator,this.seed,this.concurrent))},t}(),Un=function(t){function e(e,n,r,i){var o=t.call(this,e)||this;return o.accumulator=n,o.acc=r,o.concurrent=i,o.hasValue=!1,o.hasCompleted=!1,o.buffer=[],o.active=0,o.index=0,o}return r.__extends(e,t),e.prototype._next=function(t){if(this.active<this.concurrent){var e=this.index++,n=this.destination,r=void 0;try{r=(0,this.accumulator)(this.acc,t,e)}catch(t){return n.error(t)}this.active++,this._innerSub(r,t,e)}else this.buffer.push(t)},e.prototype._innerSub=function(t,e,n){var r=new m(this,void 0,void 0);this.destination.add(r),M(this,t,e,n,r)},e.prototype._complete=function(){this.hasCompleted=!0,0===this.active&&0===this.buffer.length&&(!1===this.hasValue&&this.destination.next(this.acc),this.destination.complete()),this.unsubscribe()},e.prototype.notifyNext=function(t,e,n,r,i){var o=this.destination;this.acc=e,this.hasValue=!0,o.next(e)},e.prototype.notifyComplete=function(t){var e=this.buffer;this.destination.remove(t),this.active--,e.length>0?this._next(e.shift()):0===this.active&&this.hasCompleted&&(!1===this.hasValue&&this.destination.next(this.acc),this.destination.complete())},e}(_);function Yn(t){return zn("function"==typeof t?function(e,n){return t(e,n)<0?e:n}:function(t,e){return t<e?t:e})}function Kn(){return function(t){return t.lift(new Gn(t))}}var Gn=function(){function t(t){this.connectable=t}return t.prototype.call=function(t,e){var n=this.connectable;n._refCount++;var r=new $n(t,n),i=e.subscribe(r);return r.closed||(r.connection=n.connect()),i},t}(),$n=function(t){function e(e,n){var r=t.call(this,e)||this;return r.connectable=n,r}return r.__extends(e,t),e.prototype._unsubscribe=function(){var t=this.connectable;if(t){this.connectable=null;var e=t._refCount;if(e<=0)this.connection=null;else if(t._refCount=e-1,e>1)this.connection=null;else{var n=this.connection,r=t._connection;this.connection=null,!r||n&&r!==n||r.unsubscribe()}}else this.connection=null},e}(b),Qn=function(t){function e(e,n){var r=t.call(this)||this;return r.source=e,r.subjectFactory=n,r._refCount=0,r._isComplete=!1,r}return r.__extends(e,t),e.prototype._subscribe=function(t){return this.getSubject().subscribe(t)},e.prototype.getSubject=function(){var t=this._subject;return t&&!t.isStopped||(this._subject=this.subjectFactory()),this._subject},e.prototype.connect=function(){var t=this._connection;return t||(this._isComplete=!1,(t=this._connection=new f).add(this.source.subscribe(new Jn(this.getSubject(),this))),t.closed?(this._connection=null,t=f.EMPTY):this._connection=t),t},e.prototype.refCount=function(){return Kn()(this)},e}(k).prototype,Zn={operator:{value:null},_refCount:{value:0,writable:!0},_subject:{value:null,writable:!0},_connection:{value:null,writable:!0},_subscribe:{value:Qn._subscribe},_isComplete:{value:Qn._isComplete,writable:!0},getSubject:{value:Qn.getSubject},connect:{value:Qn.connect},refCount:{value:Qn.refCount}},Jn=function(t){function e(e,n){var r=t.call(this,e)||this;return r.connectable=n,r}return r.__extends(e,t),e.prototype._error=function(e){this._unsubscribe(),t.prototype._error.call(this,e)},e.prototype._complete=function(){this.connectable._isComplete=!0,this._unsubscribe(),t.prototype._complete.call(this)},e.prototype._unsubscribe=function(){var t=this.connectable;if(t){this.connectable=null;var e=t._connection;t._refCount=0,t._subject=null,t._connection=null,e&&e.unsubscribe()}},e}(ln);function Xn(t,e){return function(n){var r;if(r="function"==typeof t?t:function(){return t},"function"==typeof e)return n.lift(new tr(r,e));var i=Object.create(n,Zn);return i.source=n,i.subjectFactory=r,i}}var tr=function(){function t(t,e){this.subjectFactory=t,this.selector=e}return t.prototype.call=function(t,e){var n=this.selector,r=this.subjectFactory(),i=n(r).subscribe(t);return i.add(e.subscribe(r)),i},t}();function er(t,e){return void 0===e&&(e=0),function(n){return n.lift(new nr(t,e))}}var nr=function(){function t(t,e){void 0===e&&(e=0),this.scheduler=t,this.delay=e}return t.prototype.call=function(t,e){return e.subscribe(new rr(t,this.scheduler,this.delay))},t}(),rr=function(t){function e(e,n,r){void 0===r&&(r=0);var i=t.call(this,e)||this;return i.scheduler=n,i.delay=r,i}return r.__extends(e,t),e.dispatch=function(t){var e=t.notification,n=t.destination;e.observe(n),this.unsubscribe()},e.prototype.scheduleMessage=function(t){this.destination.add(this.scheduler.schedule(e.dispatch,this.delay,new ir(t,this.destination)))},e.prototype._next=function(t){this.scheduleMessage(re.createNext(t))},e.prototype._error=function(t){this.scheduleMessage(re.createError(t)),this.unsubscribe()},e.prototype._complete=function(){this.scheduleMessage(re.createComplete()),this.unsubscribe()},e}(b),ir=function(){return function(t,e){this.notification=t,this.destination=e}}();function or(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return 1===t.length&&a(t[0])&&(t=t[0]),function(e){return e.lift(new sr(t))}}var sr=function(){function t(t){this.nextSources=t}return t.prototype.call=function(t,e){return e.subscribe(new ur(t,this.nextSources))},t}(),ur=function(t){function e(e,n){var r=t.call(this,e)||this;return r.destination=e,r.nextSources=n,r}return r.__extends(e,t),e.prototype.notifyError=function(t,e){this.subscribeToNextSource()},e.prototype.notifyComplete=function(t){this.subscribeToNextSource()},e.prototype._error=function(t){this.subscribeToNextSource(),this.unsubscribe()},e.prototype._complete=function(){this.subscribeToNextSource(),this.unsubscribe()},e.prototype.subscribeToNextSource=function(){var t=this.nextSources.shift();if(t){var e=new m(this,void 0,void 0);this.destination.add(e),M(this,t,void 0,void 0,e)}else this.destination.complete()},e}(_);function cr(){return function(t){return t.lift(new ar)}}var ar=function(){function t(){}return t.prototype.call=function(t,e){return e.subscribe(new lr(t))},t}(),lr=function(t){function e(e){var n=t.call(this,e)||this;return n.hasPrev=!1,n}return r.__extends(e,t),e.prototype._next=function(t){this.hasPrev?this.destination.next([this.prev,t]):this.hasPrev=!0,this.prev=t},e}(b);function hr(t,e){function n(){return!n.pred.apply(n.thisArg,arguments)}return n.pred=t,n.thisArg=e,n}function pr(t,e){return function(n){return[Ce(t,e)(n),Ce(hr(t,e))(n)]}}function fr(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n=t.length;if(0===n)throw new Error("list of properties cannot be empty.");return function(e){return Et(dr(t,n))(e)}}function dr(t,e){return function(n){for(var r=n,i=0;i<e;i++){var o=r[t[i]];if(void 0===o)return;r=o}return r}}function yr(t){return t?Xn((function(){return new hn}),t):Xn(new hn)}var br=function(t){function e(e){var n=t.call(this)||this;return n._value=e,n}return r.__extends(e,t),Object.defineProperty(e.prototype,"value",{get:function(){return this.getValue()},enumerable:!0,configurable:!0}),e.prototype._subscribe=function(e){var n=t.prototype._subscribe.call(this,e);return n&&!n.closed&&e.next(this._value),n},e.prototype.getValue=function(){if(this.hasError)throw this.thrownError;if(this.closed)throw new cn;return this._value},e.prototype.next=function(e){t.prototype.next.call(this,this._value=e)},e}(hn);function vr(t){return function(e){return Xn(new br(t))(e)}}var _r=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.value=null,e.hasNext=!1,e.hasCompleted=!1,e}return r.__extends(e,t),e.prototype._subscribe=function(e){return this.hasError?(e.error(this.thrownError),f.EMPTY):this.hasCompleted&&this.hasNext?(e.next(this.value),e.complete(),f.EMPTY):t.prototype._subscribe.call(this,e)},e.prototype.next=function(t){this.hasCompleted||(this.value=t,this.hasNext=!0)},e.prototype.error=function(e){this.hasCompleted||t.prototype.error.call(this,e)},e.prototype.complete=function(){this.hasCompleted=!0,this.hasNext&&t.prototype.next.call(this,this.value),t.prototype.complete.call(this)},e}(hn);function mr(){return function(t){return Xn(new _r)(t)}}var gr=function(t){function e(e,n){var r=t.call(this,e,n)||this;return r.scheduler=e,r.work=n,r}return r.__extends(e,t),e.prototype.schedule=function(e,n){return void 0===n&&(n=0),n>0?t.prototype.schedule.call(this,e,n):(this.delay=n,this.state=e,this.scheduler.flush(this),this)},e.prototype.execute=function(e,n){return n>0||this.closed?t.prototype.execute.call(this,e,n):this._execute(e,n)},e.prototype.requestAsyncId=function(e,n,r){return void 0===r&&(r=0),null!==r&&r>0||null===r&&this.delay>0?t.prototype.requestAsyncId.call(this,e,n,r):e.flush(this)},e}(R),wr=new(function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return r.__extends(e,t),e}(W))(gr),xr=function(t){function e(e,n,r){void 0===e&&(e=Number.POSITIVE_INFINITY),void 0===n&&(n=Number.POSITIVE_INFINITY);var i=t.call(this)||this;return i.scheduler=r,i._events=[],i._infiniteTimeWindow=!1,i._bufferSize=e<1?1:e,i._windowTime=n<1?1:n,n===Number.POSITIVE_INFINITY?(i._infiniteTimeWindow=!0,i.next=i.nextInfiniteTimeWindow):i.next=i.nextTimeWindow,i}return r.__extends(e,t),e.prototype.nextInfiniteTimeWindow=function(e){var n=this._events;n.push(e),n.length>this._bufferSize&&n.shift(),t.prototype.next.call(this,e)},e.prototype.nextTimeWindow=function(e){this._events.push(new Sr(this._getNow(),e)),this._trimBufferThenGetEvents(),t.prototype.next.call(this,e)},e.prototype._subscribe=function(t){var e,n=this._infiniteTimeWindow,r=n?this._events:this._trimBufferThenGetEvents(),i=this.scheduler,o=r.length;if(this.closed)throw new cn;if(this.isStopped||this.hasError?e=f.EMPTY:(this.observers.push(t),e=new an(this,t)),i&&t.add(t=new rr(t,i)),n)for(var s=0;s<o&&!t.closed;s++)t.next(r[s]);else for(s=0;s<o&&!t.closed;s++)t.next(r[s].value);return this.hasError?t.error(this.thrownError):this.isStopped&&t.complete(),e},e.prototype._getNow=function(){return(this.scheduler||wr).now()},e.prototype._trimBufferThenGetEvents=function(){for(var t=this._getNow(),e=this._bufferSize,n=this._windowTime,r=this._events,i=r.length,o=0;o<i&&!(t-r[o].time<n);)o++;return i>e&&(o=Math.max(o,i-e)),o>0&&r.splice(0,o),r},e}(hn),Sr=function(){return function(t,e){this.time=t,this.value=e}}();function kr(t,e,n,r){n&&"function"!=typeof n&&(r=n);var i="function"==typeof n?n:void 0,o=new xr(t,e,r);return function(t){return Xn((function(){return o}),i)(t)}}function Cr(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];if(1===t.length){if(!a(t[0]))return t[0];t=t[0]}return bt(t,void 0).lift(new Tr)}var Tr=function(){function t(){}return t.prototype.call=function(t,e){return e.subscribe(new Er(t))},t}(),Er=function(t){function e(e){var n=t.call(this,e)||this;return n.hasFirst=!1,n.observables=[],n.subscriptions=[],n}return r.__extends(e,t),e.prototype._next=function(t){this.observables.push(t)},e.prototype._complete=function(){var t=this.observables,e=t.length;if(0===e)this.destination.complete();else{for(var n=0;n<e&&!this.hasFirst;n++){var r=t[n],i=M(this,r,r,n);this.subscriptions&&this.subscriptions.push(i),this.add(i)}this.observables=null}},e.prototype.notifyNext=function(t,e,n,r,i){if(!this.hasFirst){this.hasFirst=!0;for(var o=0;o<this.subscriptions.length;o++)if(o!==n){var s=this.subscriptions[o];s.unsubscribe(),this.remove(s)}this.subscriptions=null}this.destination.next(e)},e}(_);function Ir(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return function(e){return 1===t.length&&a(t[0])&&(t=t[0]),e.lift.call(Cr.apply(void 0,[e].concat(t)))}}function Or(t){return void 0===t&&(t=-1),function(e){return 0===t?kt():t<0?e.lift(new Nr(-1,e)):e.lift(new Nr(t-1,e))}}var Nr=function(){function t(t,e){this.count=t,this.source=e}return t.prototype.call=function(t,e){return e.subscribe(new jr(t,this.count,this.source))},t}(),jr=function(t){function e(e,n,r){var i=t.call(this,e)||this;return i.count=n,i.source=r,i}return r.__extends(e,t),e.prototype.complete=function(){if(!this.isStopped){var e=this.source,n=this.count;if(0===n)return t.prototype.complete.call(this);n>-1&&(this.count=n-1),e.subscribe(this._unsubscribeAndRecycle())}},e}(b);function Ar(t){return function(e){return e.lift(new Vr(t))}}var Vr=function(){function t(t){this.notifier=t}return t.prototype.call=function(t,e){return e.subscribe(new Pr(t,this.notifier,e))},t}(),Pr=function(t){function e(e,n,r){var i=t.call(this,e)||this;return i.notifier=n,i.source=r,i.sourceIsBeingSubscribedTo=!0,i}return r.__extends(e,t),e.prototype.notifyNext=function(t,e,n,r,i){this.sourceIsBeingSubscribedTo=!0,this.source.subscribe(this)},e.prototype.notifyComplete=function(e){if(!1===this.sourceIsBeingSubscribedTo)return t.prototype.complete.call(this)},e.prototype.complete=function(){if(this.sourceIsBeingSubscribedTo=!1,!this.isStopped){if(this.retries||this.subscribeToRetries(),!this.retriesSubscription||this.retriesSubscription.closed)return t.prototype.complete.call(this);this._unsubscribeAndRecycle(),this.notifications.next()}},e.prototype._unsubscribe=function(){var t=this.notifications,e=this.retriesSubscription;t&&(t.unsubscribe(),this.notifications=null),e&&(e.unsubscribe(),this.retriesSubscription=null),this.retries=null},e.prototype._unsubscribeAndRecycle=function(){var e=this._unsubscribe;return this._unsubscribe=null,t.prototype._unsubscribeAndRecycle.call(this),this._unsubscribe=e,this},e.prototype.subscribeToRetries=function(){var e;this.notifications=new hn;try{e=(0,this.notifier)(this.notifications)}catch(e){return t.prototype.complete.call(this)}this.retries=e,this.retriesSubscription=M(this,e)},e}(_);function Mr(t){return void 0===t&&(t=-1),function(e){return e.lift(new Dr(t,e))}}var Dr=function(){function t(t,e){this.count=t,this.source=e}return t.prototype.call=function(t,e){return e.subscribe(new Br(t,this.count,this.source))},t}(),Br=function(t){function e(e,n,r){var i=t.call(this,e)||this;return i.count=n,i.source=r,i}return r.__extends(e,t),e.prototype.error=function(e){if(!this.isStopped){var n=this.source,r=this.count;if(0===r)return t.prototype.error.call(this,e);r>-1&&(this.count=r-1),n.subscribe(this._unsubscribeAndRecycle())}},e}(b);function zr(t){return function(e){return e.lift(new Rr(t,e))}}var Rr=function(){function t(t,e){this.notifier=t,this.source=e}return t.prototype.call=function(t,e){return e.subscribe(new Fr(t,this.notifier,this.source))},t}(),Fr=function(t){function e(e,n,r){var i=t.call(this,e)||this;return i.notifier=n,i.source=r,i}return r.__extends(e,t),e.prototype.error=function(e){if(!this.isStopped){var n=this.errors,r=this.retries,i=this.retriesSubscription;if(r)this.errors=null,this.retriesSubscription=null;else{n=new hn;try{r=(0,this.notifier)(n)}catch(e){return t.prototype.error.call(this,e)}i=M(this,r)}this._unsubscribeAndRecycle(),this.errors=n,this.retries=r,this.retriesSubscription=i,n.next(e)}},e.prototype._unsubscribe=function(){var t=this.errors,e=this.retriesSubscription;t&&(t.unsubscribe(),this.errors=null),e&&(e.unsubscribe(),this.retriesSubscription=null),this.retries=null},e.prototype.notifyNext=function(t,e,n,r,i){var o=this._unsubscribe;this._unsubscribe=null,this._unsubscribeAndRecycle(),this._unsubscribe=o,this.source.subscribe(this)},e}(_);function Wr(t){return function(e){return e.lift(new Hr(t))}}var Hr=function(){function t(t){this.notifier=t}return t.prototype.call=function(t,e){var n=new Lr(t),r=e.subscribe(n);return r.add(M(n,this.notifier)),r},t}(),Lr=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.hasValue=!1,e}return r.__extends(e,t),e.prototype._next=function(t){this.value=t,this.hasValue=!0},e.prototype.notifyNext=function(t,e,n,r,i){this.emitValue()},e.prototype.notifyComplete=function(){this.emitValue()},e.prototype.emitValue=function(){this.hasValue&&(this.hasValue=!1,this.destination.next(this.value))},e}(_);function qr(t,e){return void 0===e&&(e=H),function(n){return n.lift(new Ur(t,e))}}var Ur=function(){function t(t,e){this.period=t,this.scheduler=e}return t.prototype.call=function(t,e){return e.subscribe(new Yr(t,this.period,this.scheduler))},t}(),Yr=function(t){function e(e,n,r){var i=t.call(this,e)||this;return i.period=n,i.scheduler=r,i.hasValue=!1,i.add(r.schedule(Kr,n,{subscriber:i,period:n})),i}return r.__extends(e,t),e.prototype._next=function(t){this.lastValue=t,this.hasValue=!0},e.prototype.notifyNext=function(){this.hasValue&&(this.hasValue=!1,this.destination.next(this.lastValue))},e}(b);function Kr(t){var e=t.subscriber,n=t.period;e.notifyNext(),this.schedule(t,n)}function Gr(t,e){return function(n){return n.lift(new $r(t,e))}}var $r=function(){function t(t,e){this.compareTo=t,this.comparator=e}return t.prototype.call=function(t,e){return e.subscribe(new Qr(t,this.compareTo,this.comparator))},t}(),Qr=function(t){function e(e,n,r){var i=t.call(this,e)||this;return i.compareTo=n,i.comparator=r,i._a=[],i._b=[],i._oneComplete=!1,i.destination.add(n.subscribe(new Zr(e,i))),i}return r.__extends(e,t),e.prototype._next=function(t){this._oneComplete&&0===this._b.length?this.emit(!1):(this._a.push(t),this.checkValues())},e.prototype._complete=function(){this._oneComplete?this.emit(0===this._a.length&&0===this._b.length):this._oneComplete=!0,this.unsubscribe()},e.prototype.checkValues=function(){for(var t=this._a,e=this._b,n=this.comparator;t.length>0&&e.length>0;){var r=t.shift(),i=e.shift(),o=!1;try{o=n?n(r,i):r===i}catch(t){this.destination.error(t)}o||this.emit(!1)}},e.prototype.emit=function(t){var e=this.destination;e.next(t),e.complete()},e.prototype.nextB=function(t){this._oneComplete&&0===this._a.length?this.emit(!1):(this._b.push(t),this.checkValues())},e.prototype.completeB=function(){this._oneComplete?this.emit(0===this._a.length&&0===this._b.length):this._oneComplete=!0},e}(b),Zr=function(t){function e(e,n){var r=t.call(this,e)||this;return r.parent=n,r}return r.__extends(e,t),e.prototype._next=function(t){this.parent.nextB(t)},e.prototype._error=function(t){this.parent.error(t),this.unsubscribe()},e.prototype._complete=function(){this.parent.completeB(),this.unsubscribe()},e}(b);function Jr(){return new hn}function Xr(){return function(t){return Kn()(Xn(Jr)(t))}}function ti(t,e,n){var r;return r=t&&"object"==typeof t?t:{bufferSize:t,windowTime:e,refCount:!1,scheduler:n},function(t){return t.lift(function(t){var e,n,r=t.bufferSize,i=void 0===r?Number.POSITIVE_INFINITY:r,o=t.windowTime,s=void 0===o?Number.POSITIVE_INFINITY:o,u=t.refCount,c=t.scheduler,a=0,l=!1,h=!1;return function(t){a++,e&&!l||(l=!1,e=new xr(i,s,c),n=t.subscribe({next:function(t){e.next(t)},error:function(t){l=!0,e.error(t)},complete:function(){h=!0,e.complete()}}));var r=e.subscribe(this);this.add((function(){a--,r.unsubscribe(),n&&!h&&u&&0===a&&(n.unsubscribe(),n=void 0,e=void 0)}))}}(r))}}function ei(t){return function(e){return e.lift(new ni(t,e))}}var ni=function(){function t(t,e){this.predicate=t,this.source=e}return t.prototype.call=function(t,e){return e.subscribe(new ri(t,this.predicate,this.source))},t}(),ri=function(t){function e(e,n,r){var i=t.call(this,e)||this;return i.predicate=n,i.source=r,i.seenValue=!1,i.index=0,i}return r.__extends(e,t),e.prototype.applySingleValue=function(t){this.seenValue?this.destination.error("Sequence contains more than one element"):(this.seenValue=!0,this.singleValue=t)},e.prototype._next=function(t){var e=this.index++;this.predicate?this.tryNext(t,e):this.applySingleValue(t)},e.prototype.tryNext=function(t,e){try{this.predicate(t,e,this.source)&&this.applySingleValue(t)}catch(t){this.destination.error(t)}},e.prototype._complete=function(){var t=this.destination;this.index>0?(t.next(this.seenValue?this.singleValue:void 0),t.complete()):t.error(new Ae)},e}(b);function ii(t){return function(e){return e.lift(new oi(t))}}var oi=function(){function t(t){this.total=t}return t.prototype.call=function(t,e){return e.subscribe(new si(t,this.total))},t}(),si=function(t){function e(e,n){var r=t.call(this,e)||this;return r.total=n,r.count=0,r}return r.__extends(e,t),e.prototype._next=function(t){++this.count>this.total&&this.destination.next(t)},e}(b);function ui(t){return function(e){return e.lift(new ci(t))}}var ci=function(){function t(t){if(this._skipCount=t,this._skipCount<0)throw new ke}return t.prototype.call=function(t,e){return 0===this._skipCount?e.subscribe(new b(t)):e.subscribe(new ai(t,this._skipCount))},t}(),ai=function(t){function e(e,n){var r=t.call(this,e)||this;return r._skipCount=n,r._count=0,r._ring=new Array(n),r}return r.__extends(e,t),e.prototype._next=function(t){var e=this._skipCount,n=this._count++;if(n<e)this._ring[n]=t;else{var r=n%e,i=this._ring,o=i[r];i[r]=t,this.destination.next(o)}},e}(b);function li(t){return function(e){return e.lift(new hi(t))}}var hi=function(){function t(t){this.notifier=t}return t.prototype.call=function(t,e){return e.subscribe(new pi(t,this.notifier))},t}(),pi=function(t){function e(e,n){var r=t.call(this,e)||this;r.hasValue=!1;var i=new m(r,void 0,void 0);return r.add(i),r.innerSubscription=i,M(r,n,void 0,void 0,i),r}return r.__extends(e,t),e.prototype._next=function(e){this.hasValue&&t.prototype._next.call(this,e)},e.prototype.notifyNext=function(t,e,n,r,i){this.hasValue=!0,this.innerSubscription&&this.innerSubscription.unsubscribe()},e.prototype.notifyComplete=function(){},e}(_);function fi(t){return function(e){return e.lift(new di(t))}}var di=function(){function t(t){this.predicate=t}return t.prototype.call=function(t,e){return e.subscribe(new yi(t,this.predicate))},t}(),yi=function(t){function e(e,n){var r=t.call(this,e)||this;return r.predicate=n,r.skipping=!0,r.index=0,r}return r.__extends(e,t),e.prototype._next=function(t){var e=this.destination;this.skipping&&this.tryCallPredicate(t),this.skipping||e.next(t)},e.prototype.tryCallPredicate=function(t){try{var e=this.predicate(t,this.index++);this.skipping=Boolean(e)}catch(t){this.destination.error(t)}},e}(b);function bi(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return function(e){var n=t[t.length-1];q(n)?t.pop():n=null;var r=t.length;return Dt(1!==r||n?r>0?bt(t,n):kt(n):Ct(t[0]),e)}}var vi=1,_i={};var mi=function(t){var e=vi++;return _i[e]=t,Promise.resolve().then((function(){return function(t){var e=_i[t];e&&e()}(e)})),e},gi=function(t){delete _i[t]},wi=function(t){function e(e,n){var r=t.call(this,e,n)||this;return r.scheduler=e,r.work=n,r}return r.__extends(e,t),e.prototype.requestAsyncId=function(e,n,r){return void 0===r&&(r=0),null!==r&&r>0?t.prototype.requestAsyncId.call(this,e,n,r):(e.actions.push(this),e.scheduled||(e.scheduled=mi(e.flush.bind(e,null))))},e.prototype.recycleAsyncId=function(e,n,r){if(void 0===r&&(r=0),null!==r&&r>0||null===r&&this.delay>0)return t.prototype.recycleAsyncId.call(this,e,n,r);0===e.actions.length&&(gi(n),e.scheduled=void 0)},e}(R),xi=new(function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return r.__extends(e,t),e.prototype.flush=function(t){this.active=!0,this.scheduled=void 0;var e,n=this.actions,r=-1,i=n.length;t=t||n.shift();do{if(e=t.execute(t.state,t.delay))break}while(++r<i&&(t=n.shift()));if(this.active=!1,e){for(;++r<i&&(t=n.shift());)t.unsubscribe();throw e}},e}(W))(wi),Si=function(t){function e(e,n,r){void 0===n&&(n=0),void 0===r&&(r=xi);var i=t.call(this)||this;return i.source=e,i.delayTime=n,i.scheduler=r,(!L(n)||n<0)&&(i.delayTime=0),r&&"function"==typeof r.schedule||(i.scheduler=xi),i}return r.__extends(e,t),e.create=function(t,n,r){return void 0===n&&(n=0),void 0===r&&(r=xi),new e(t,n,r)},e.dispatch=function(t){var e=t.source,n=t.subscriber;return this.add(e.subscribe(n))},e.prototype._subscribe=function(t){var n=this.delayTime,r=this.source;return this.scheduler.schedule(e.dispatch,n,{source:r,subscriber:t})},e}(k);function ki(t,e){return void 0===e&&(e=0),function(n){return n.lift(new Ci(t,e))}}var Ci=function(){function t(t,e){this.scheduler=t,this.delay=e}return t.prototype.call=function(t,e){return new Si(e,this.delay,this.scheduler).subscribe(t)},t}();function Ti(t,e){return"function"==typeof e?function(n){return n.pipe(Ti((function(n,r){return wt(t(n,r)).pipe(Et((function(t,i){return e(n,t,r,i)})))})))}:function(e){return e.lift(new Ei(t))}}var Ei=function(){function t(t){this.project=t}return t.prototype.call=function(t,e){return e.subscribe(new Ii(t,this.project))},t}(),Ii=function(t){function e(e,n){var r=t.call(this,e)||this;return r.project=n,r.index=0,r}return r.__extends(e,t),e.prototype._next=function(t){var e,n=this.index++;try{e=this.project(t,n)}catch(t){return void this.destination.error(t)}this._innerSub(e,t,n)},e.prototype._innerSub=function(t,e,n){var r=this.innerSubscription;r&&r.unsubscribe();var i=new m(this,void 0,void 0);this.destination.add(i),this.innerSubscription=M(this,t,e,n,i)},e.prototype._complete=function(){var e=this.innerSubscription;e&&!e.closed||t.prototype._complete.call(this),this.unsubscribe()},e.prototype._unsubscribe=function(){this.innerSubscription=null},e.prototype.notifyComplete=function(e){this.destination.remove(e),this.innerSubscription=null,this.isStopped&&t.prototype._complete.call(this)},e.prototype.notifyNext=function(t,e,n,r,i){this.destination.next(e)},e}(_);function Oi(){return Ti(Vt)}function Ni(t,e){return e?Ti((function(){return t}),e):Ti((function(){return t}))}function ji(t){return function(e){return e.lift(new Ai(t))}}var Ai=function(){function t(t){this.notifier=t}return t.prototype.call=function(t,e){var n=new Vi(t),r=M(n,this.notifier);return r&&!n.seenValue?(n.add(r),e.subscribe(n)):n},t}(),Vi=function(t){function e(e){var n=t.call(this,e)||this;return n.seenValue=!1,n}return r.__extends(e,t),e.prototype.notifyNext=function(t,e,n,r,i){this.seenValue=!0,this.complete()},e.prototype.notifyComplete=function(){},e}(_);function Pi(t,e){return void 0===e&&(e=!1),function(n){return n.lift(new Mi(t,e))}}var Mi=function(){function t(t,e){this.predicate=t,this.inclusive=e}return t.prototype.call=function(t,e){return e.subscribe(new Di(t,this.predicate,this.inclusive))},t}(),Di=function(t){function e(e,n,r){var i=t.call(this,e)||this;return i.predicate=n,i.inclusive=r,i.index=0,i}return r.__extends(e,t),e.prototype._next=function(t){var e,n=this.destination;try{e=this.predicate(t,this.index++)}catch(t){return void n.error(t)}this.nextOrComplete(t,e)},e.prototype.nextOrComplete=function(t,e){var n=this.destination;Boolean(e)?n.next(t):(this.inclusive&&n.next(t),n.complete())},e}(b),Bi={leading:!0,trailing:!1};function zi(t,e){return void 0===e&&(e=Bi),function(n){return n.lift(new Ri(t,e.leading,e.trailing))}}var Ri=function(){function t(t,e,n){this.durationSelector=t,this.leading=e,this.trailing=n}return t.prototype.call=function(t,e){return e.subscribe(new Fi(t,this.durationSelector,this.leading,this.trailing))},t}(),Fi=function(t){function e(e,n,r,i){var o=t.call(this,e)||this;return o.destination=e,o.durationSelector=n,o._leading=r,o._trailing=i,o._hasValue=!1,o}return r.__extends(e,t),e.prototype._next=function(t){this._hasValue=!0,this._sendValue=t,this._throttled||(this._leading?this.send():this.throttle(t))},e.prototype.send=function(){var t=this._hasValue,e=this._sendValue;t&&(this.destination.next(e),this.throttle(e)),this._hasValue=!1,this._sendValue=null},e.prototype.throttle=function(t){var e=this.tryDurationSelector(t);e&&this.add(this._throttled=M(this,e))},e.prototype.tryDurationSelector=function(t){try{return this.durationSelector(t)}catch(t){return this.destination.error(t),null}},e.prototype.throttlingDone=function(){var t=this._throttled,e=this._trailing;t&&t.unsubscribe(),this._throttled=null,e&&this.send()},e.prototype.notifyNext=function(t,e,n,r,i){this.throttlingDone()},e.prototype.notifyComplete=function(){this.throttlingDone()},e}(_);function Wi(t,e,n){return void 0===e&&(e=H),void 0===n&&(n=Bi),function(r){return r.lift(new Hi(t,e,n.leading,n.trailing))}}var Hi=function(){function t(t,e,n,r){this.duration=t,this.scheduler=e,this.leading=n,this.trailing=r}return t.prototype.call=function(t,e){return e.subscribe(new Li(t,this.duration,this.scheduler,this.leading,this.trailing))},t}(),Li=function(t){function e(e,n,r,i,o){var s=t.call(this,e)||this;return s.duration=n,s.scheduler=r,s.leading=i,s.trailing=o,s._hasTrailingValue=!1,s._trailingValue=null,s}return r.__extends(e,t),e.prototype._next=function(t){this.throttled?this.trailing&&(this._trailingValue=t,this._hasTrailingValue=!0):(this.add(this.throttled=this.scheduler.schedule(qi,this.duration,{subscriber:this})),this.leading&&this.destination.next(t))},e.prototype._complete=function(){this._hasTrailingValue?(this.destination.next(this._trailingValue),this.destination.complete()):this.destination.complete()},e.prototype.clearThrottle=function(){var t=this.throttled;t&&(this.trailing&&this._hasTrailingValue&&(this.destination.next(this._trailingValue),this._trailingValue=null,this._hasTrailingValue=!1),t.unsubscribe(),this.remove(t),this.throttled=null)},e}(b);function qi(t){t.subscriber.clearThrottle()}function Ui(t){return void 0===t&&(t=H),function(e){return n=function(){return e.pipe(Mn((function(e,n){var r=e.current;return{value:n,current:t.now(),last:r}}),{current:t.now(),value:void 0,last:void 0}),Et((function(t){var e=t.current,n=t.last,r=t.value;return new Yi(r,e-n)})))},new k((function(t){var e;try{e=n()}catch(e){return void t.error(e)}return(e?wt(e):kt()).subscribe(t)}));var n}}var Yi=function(){return function(t,e){this.value=t,this.interval=e}}();function Ki(){return Error.call(this),this.message="Timeout has occurred",this.name="TimeoutError",this}Ki.prototype=Object.create(Error.prototype);var Gi=Ki;function $i(t,e,n){return void 0===n&&(n=H),function(r){var i=te(t),o=i?+t-n.now():Math.abs(t);return r.lift(new Qi(o,i,e,n))}}var Qi=function(){function t(t,e,n,r){this.waitFor=t,this.absoluteTimeout=e,this.withObservable=n,this.scheduler=r}return t.prototype.call=function(t,e){return e.subscribe(new Zi(t,this.absoluteTimeout,this.waitFor,this.withObservable,this.scheduler))},t}(),Zi=function(t){function e(e,n,r,i,o){var s=t.call(this,e)||this;return s.absoluteTimeout=n,s.waitFor=r,s.withObservable=i,s.scheduler=o,s.action=null,s.scheduleTimeout(),s}return r.__extends(e,t),e.dispatchTimeout=function(t){var e=t.withObservable;t._unsubscribeAndRecycle(),t.add(M(t,e))},e.prototype.scheduleTimeout=function(){var t=this.action;t?this.action=t.schedule(this,this.waitFor):this.add(this.action=this.scheduler.schedule(e.dispatchTimeout,this.waitFor,this))},e.prototype._next=function(e){this.absoluteTimeout||this.scheduleTimeout(),t.prototype._next.call(this,e)},e.prototype._unsubscribe=function(){this.action=null,this.scheduler=null,this.withObservable=null},e}(_);function Ji(t,e){return void 0===e&&(e=H),$i(t,ee(new Gi),e)}function Xi(t){return void 0===t&&(t=H),Et((function(e){return new to(e,t.now())}))}var to=function(){return function(t,e){this.value=t,this.timestamp=e}}();function eo(t,e,n){return 0===n?[e]:(t.push(e),t)}function no(){return zn(eo,[])}function ro(t){return function(e){return e.lift(new io(t))}}var io=function(){function t(t){this.windowBoundaries=t}return t.prototype.call=function(t,e){var n=new oo(t),r=e.subscribe(n);return r.closed||n.add(M(n,this.windowBoundaries)),r},t}(),oo=function(t){function e(e){var n=t.call(this,e)||this;return n.window=new hn,e.next(n.window),n}return r.__extends(e,t),e.prototype.notifyNext=function(t,e,n,r,i){this.openWindow()},e.prototype.notifyError=function(t,e){this._error(t)},e.prototype.notifyComplete=function(t){this._complete()},e.prototype._next=function(t){this.window.next(t)},e.prototype._error=function(t){this.window.error(t),this.destination.error(t)},e.prototype._complete=function(){this.window.complete(),this.destination.complete()},e.prototype._unsubscribe=function(){this.window=null},e.prototype.openWindow=function(){var t=this.window;t&&t.complete();var e=this.destination,n=this.window=new hn;e.next(n)},e}(_);function so(t,e){return void 0===e&&(e=0),function(n){return n.lift(new uo(t,e))}}var uo=function(){function t(t,e){this.windowSize=t,this.startWindowEvery=e}return t.prototype.call=function(t,e){return e.subscribe(new co(t,this.windowSize,this.startWindowEvery))},t}(),co=function(t){function e(e,n,r){var i=t.call(this,e)||this;return i.destination=e,i.windowSize=n,i.startWindowEvery=r,i.windows=[new hn],i.count=0,e.next(i.windows[0]),i}return r.__extends(e,t),e.prototype._next=function(t){for(var e=this.startWindowEvery>0?this.startWindowEvery:this.windowSize,n=this.destination,r=this.windowSize,i=this.windows,o=i.length,s=0;s<o&&!this.closed;s++)i[s].next(t);var u=this.count-r+1;if(u>=0&&u%e==0&&!this.closed&&i.shift().complete(),++this.count%e==0&&!this.closed){var c=new hn;i.push(c),n.next(c)}},e.prototype._error=function(t){var e=this.windows;if(e)for(;e.length>0&&!this.closed;)e.shift().error(t);this.destination.error(t)},e.prototype._complete=function(){var t=this.windows;if(t)for(;t.length>0&&!this.closed;)t.shift().complete();this.destination.complete()},e.prototype._unsubscribe=function(){this.count=0,this.windows=null},e}(b);function ao(t){var e=H,n=null,r=Number.POSITIVE_INFINITY;return q(arguments[3])&&(e=arguments[3]),q(arguments[2])?e=arguments[2]:L(arguments[2])&&(r=arguments[2]),q(arguments[1])?e=arguments[1]:L(arguments[1])&&(n=arguments[1]),function(i){return i.lift(new lo(t,n,r,e))}}var lo=function(){function t(t,e,n,r){this.windowTimeSpan=t,this.windowCreationInterval=e,this.maxWindowSize=n,this.scheduler=r}return t.prototype.call=function(t,e){return e.subscribe(new po(t,this.windowTimeSpan,this.windowCreationInterval,this.maxWindowSize,this.scheduler))},t}(),ho=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e._numberOfNextedValues=0,e}return r.__extends(e,t),e.prototype.next=function(e){this._numberOfNextedValues++,t.prototype.next.call(this,e)},Object.defineProperty(e.prototype,"numberOfNextedValues",{get:function(){return this._numberOfNextedValues},enumerable:!0,configurable:!0}),e}(hn),po=function(t){function e(e,n,r,i,o){var s=t.call(this,e)||this;s.destination=e,s.windowTimeSpan=n,s.windowCreationInterval=r,s.maxWindowSize=i,s.scheduler=o,s.windows=[];var u=s.openWindow();if(null!==r&&r>=0){var c={subscriber:s,window:u,context:null},a={windowTimeSpan:n,windowCreationInterval:r,subscriber:s,scheduler:o};s.add(o.schedule(bo,n,c)),s.add(o.schedule(yo,r,a))}else{var l={subscriber:s,window:u,windowTimeSpan:n};s.add(o.schedule(fo,n,l))}return s}return r.__extends(e,t),e.prototype._next=function(t){for(var e=this.windows,n=e.length,r=0;r<n;r++){var i=e[r];i.closed||(i.next(t),i.numberOfNextedValues>=this.maxWindowSize&&this.closeWindow(i))}},e.prototype._error=function(t){for(var e=this.windows;e.length>0;)e.shift().error(t);this.destination.error(t)},e.prototype._complete=function(){for(var t=this.windows;t.length>0;){var e=t.shift();e.closed||e.complete()}this.destination.complete()},e.prototype.openWindow=function(){var t=new ho;return this.windows.push(t),this.destination.next(t),t},e.prototype.closeWindow=function(t){t.complete();var e=this.windows;e.splice(e.indexOf(t),1)},e}(b);function fo(t){var e=t.subscriber,n=t.windowTimeSpan,r=t.window;r&&e.closeWindow(r),t.window=e.openWindow(),this.schedule(t,n)}function yo(t){var e=t.windowTimeSpan,n=t.subscriber,r=t.scheduler,i=t.windowCreationInterval,o=n.openWindow(),s={action:this,subscription:null},u={subscriber:n,window:o,context:s};s.subscription=r.schedule(bo,e,u),this.add(s.subscription),this.schedule(t,i)}function bo(t){var e=t.subscriber,n=t.window,r=t.context;r&&r.action&&r.subscription&&r.action.remove(r.subscription),e.closeWindow(n)}function vo(t,e){return function(n){return n.lift(new _o(t,e))}}var _o=function(){function t(t,e){this.openings=t,this.closingSelector=e}return t.prototype.call=function(t,e){return e.subscribe(new mo(t,this.openings,this.closingSelector))},t}(),mo=function(t){function e(e,n,r){var i=t.call(this,e)||this;return i.openings=n,i.closingSelector=r,i.contexts=[],i.add(i.openSubscription=M(i,n,n)),i}return r.__extends(e,t),e.prototype._next=function(t){var e=this.contexts;if(e)for(var n=e.length,r=0;r<n;r++)e[r].window.next(t)},e.prototype._error=function(e){var n=this.contexts;if(this.contexts=null,n)for(var r=n.length,i=-1;++i<r;){var o=n[i];o.window.error(e),o.subscription.unsubscribe()}t.prototype._error.call(this,e)},e.prototype._complete=function(){var e=this.contexts;if(this.contexts=null,e)for(var n=e.length,r=-1;++r<n;){var i=e[r];i.window.complete(),i.subscription.unsubscribe()}t.prototype._complete.call(this)},e.prototype._unsubscribe=function(){var t=this.contexts;if(this.contexts=null,t)for(var e=t.length,n=-1;++n<e;){var r=t[n];r.window.unsubscribe(),r.subscription.unsubscribe()}},e.prototype.notifyNext=function(t,e,n,r,i){if(t===this.openings){var o=void 0;try{o=(0,this.closingSelector)(e)}catch(t){return this.error(t)}var s=new hn,u=new f,c={window:s,subscription:u};this.contexts.push(c);var a=M(this,o,c);a.closed?this.closeWindow(this.contexts.length-1):(a.context=c,u.add(a)),this.destination.next(s)}else this.closeWindow(this.contexts.indexOf(t))},e.prototype.notifyError=function(t){this.error(t)},e.prototype.notifyComplete=function(t){t!==this.openSubscription&&this.closeWindow(this.contexts.indexOf(t.context))},e.prototype.closeWindow=function(t){if(-1!==t){var e=this.contexts,n=e[t],r=n.window,i=n.subscription;e.splice(t,1),r.complete(),i.unsubscribe()}},e}(_);function go(t){return function(e){return e.lift(new wo(t))}}var wo=function(){function t(t){this.closingSelector=t}return t.prototype.call=function(t,e){return e.subscribe(new xo(t,this.closingSelector))},t}(),xo=function(t){function e(e,n){var r=t.call(this,e)||this;return r.destination=e,r.closingSelector=n,r.openWindow(),r}return r.__extends(e,t),e.prototype.notifyNext=function(t,e,n,r,i){this.openWindow(i)},e.prototype.notifyError=function(t,e){this._error(t)},e.prototype.notifyComplete=function(t){this.openWindow(t)},e.prototype._next=function(t){this.window.next(t)},e.prototype._error=function(t){this.window.error(t),this.destination.error(t),this.unsubscribeClosingNotification()},e.prototype._complete=function(){this.window.complete(),this.destination.complete(),this.unsubscribeClosingNotification()},e.prototype.unsubscribeClosingNotification=function(){this.closingNotification&&this.closingNotification.unsubscribe()},e.prototype.openWindow=function(t){void 0===t&&(t=null),t&&(this.remove(t),t.unsubscribe());var e=this.window;e&&e.complete();var n,r=this.window=new hn;this.destination.next(r);try{n=(0,this.closingSelector)()}catch(t){return this.destination.error(t),void this.window.error(t)}this.add(this.closingNotification=M(this,n))},e}(_);function So(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return function(e){var n;"function"==typeof t[t.length-1]&&(n=t.pop());var r=t;return e.lift(new ko(r,n))}}var ko=function(){function t(t,e){this.observables=t,this.project=e}return t.prototype.call=function(t,e){return e.subscribe(new Co(t,this.observables,this.project))},t}(),Co=function(t){function e(e,n,r){var i=t.call(this,e)||this;i.observables=n,i.project=r,i.toRespond=[];var o=n.length;i.values=new Array(o);for(var s=0;s<o;s++)i.toRespond.push(s);for(s=0;s<o;s++){var u=n[s];i.add(M(i,u,u,s))}return i}return r.__extends(e,t),e.prototype.notifyNext=function(t,e,n,r,i){this.values[n]=e;var o=this.toRespond;if(o.length>0){var s=o.indexOf(n);-1!==s&&o.splice(s,1)}},e.prototype.notifyComplete=function(){},e.prototype._next=function(t){if(0===this.toRespond.length){var e=[t].concat(this.values);this.project?this._tryProject(e):this.destination.next(e)}},e.prototype._tryProject=function(t){var e;try{e=this.project.apply(this,t)}catch(t){return void this.destination.error(t)}this.destination.next(e)},e}(_);function To(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n=t[t.length-1];return"function"==typeof n&&t.pop(),bt(t,void 0).lift(new Eo(n))}var Eo=function(){function t(t){this.resultSelector=t}return t.prototype.call=function(t,e){return e.subscribe(new Io(t,this.resultSelector))},t}(),Io=function(t){function e(e,n,r){void 0===r&&(r=Object.create(null));var i=t.call(this,e)||this;return i.iterators=[],i.active=0,i.resultSelector="function"==typeof n?n:null,i.values=r,i}return r.__extends(e,t),e.prototype._next=function(t){var e=this.iterators;a(t)?e.push(new No(t)):"function"==typeof t[O]?e.push(new Oo(t[O]())):e.push(new jo(this.destination,this,t))},e.prototype._complete=function(){var t=this.iterators,e=t.length;if(this.unsubscribe(),0!==e){this.active=e;for(var n=0;n<e;n++){var r=t[n];if(r.stillUnsubscribed)this.destination.add(r.subscribe(r,n));else this.active--}}else this.destination.complete()},e.prototype.notifyInactive=function(){this.active--,0===this.active&&this.destination.complete()},e.prototype.checkIterators=function(){for(var t=this.iterators,e=t.length,n=this.destination,r=0;r<e;r++){if("function"==typeof(s=t[r]).hasValue&&!s.hasValue())return}var i=!1,o=[];for(r=0;r<e;r++){var s,u=(s=t[r]).next();if(s.hasCompleted()&&(i=!0),u.done)return void n.complete();o.push(u.value)}this.resultSelector?this._tryresultSelector(o):n.next(o),i&&n.complete()},e.prototype._tryresultSelector=function(t){var e;try{e=this.resultSelector.apply(this,t)}catch(t){return void this.destination.error(t)}this.destination.next(e)},e}(b),Oo=function(){function t(t){this.iterator=t,this.nextResult=t.next()}return t.prototype.hasValue=function(){return!0},t.prototype.next=function(){var t=this.nextResult;return this.nextResult=this.iterator.next(),t},t.prototype.hasCompleted=function(){var t=this.nextResult;return t&&t.done},t}(),No=function(){function t(t){this.array=t,this.index=0,this.length=0,this.length=t.length}return t.prototype[O]=function(){return this},t.prototype.next=function(t){var e=this.index++,n=this.array;return e<this.length?{value:n[e],done:!1}:{value:null,done:!0}},t.prototype.hasValue=function(){return this.array.length>this.index},t.prototype.hasCompleted=function(){return this.array.length===this.index},t}(),jo=function(t){function e(e,n,r){var i=t.call(this,e)||this;return i.parent=n,i.observable=r,i.stillUnsubscribed=!0,i.buffer=[],i.isComplete=!1,i}return r.__extends(e,t),e.prototype[O]=function(){return this},e.prototype.next=function(){var t=this.buffer;return 0===t.length&&this.isComplete?{value:null,done:!0}:{value:t.shift(),done:!1}},e.prototype.hasValue=function(){return this.buffer.length>0},e.prototype.hasCompleted=function(){return 0===this.buffer.length&&this.isComplete},e.prototype.notifyComplete=function(){this.buffer.length>0?(this.isComplete=!0,this.parent.notifyInactive()):this.destination.complete()},e.prototype.notifyNext=function(t,e,n,r,i){this.buffer.push(e),this.parent.checkIterators()},e.prototype.subscribe=function(t,e){return M(this,this.observable,this,e)},e}(_);function Ao(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return function(e){return e.lift.call(To.apply(void 0,[e].concat(t)))}}function Vo(t){return function(e){return e.lift(new Eo(t))}}}])}));
|
|
20
|
+
var o=function(e,t){return(o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)};function a(e,t){function n(){this.constructor=e}o(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}var r=function(){return(r=Object.assign||function(e){for(var t,n=1,o=arguments.length;n<o;n++)for(var a in t=arguments[n])Object.prototype.hasOwnProperty.call(t,a)&&(e[a]=t[a]);return e}).apply(this,arguments)};function i(e,t){var n={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(n[o]=e[o]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var a=0;for(o=Object.getOwnPropertySymbols(e);a<o.length;a++)t.indexOf(o[a])<0&&Object.prototype.propertyIsEnumerable.call(e,o[a])&&(n[o[a]]=e[o[a]])}return n}function s(e,t,n,o){var a,r=arguments.length,i=r<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,n):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)i=Reflect.decorate(e,t,n,o);else for(var s=e.length-1;s>=0;s--)(a=e[s])&&(i=(r<3?a(i):r>3?a(t,n,i):a(t,n))||i);return r>3&&i&&Object.defineProperty(t,n,i),i}function c(e,t){return function(n,o){t(n,o,e)}}function u(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}function l(e,t,n,o){return new(n||(n=Promise))((function(a,r){function i(e){try{c(o.next(e))}catch(e){r(e)}}function s(e){try{c(o.throw(e))}catch(e){r(e)}}function c(e){var t;e.done?a(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(i,s)}c((o=o.apply(e,t||[])).next())}))}function d(e,t){var n,o,a,r,i={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]};return r={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(r[Symbol.iterator]=function(){return this}),r;function s(r){return function(s){return function(r){if(n)throw new TypeError("Generator is already executing.");for(;i;)try{if(n=1,o&&(a=2&r[0]?o.return:r[0]?o.throw||((a=o.return)&&a.call(o),0):o.next)&&!(a=a.call(o,r[1])).done)return a;switch(o=0,a&&(r=[2&r[0],a.value]),r[0]){case 0:case 1:a=r;break;case 4:return i.label++,{value:r[1],done:!1};case 5:i.label++,o=r[1],r=[0];continue;case 7:r=i.ops.pop(),i.trys.pop();continue;default:if(!(a=i.trys,(a=a.length>0&&a[a.length-1])||6!==r[0]&&2!==r[0])){i=0;continue}if(3===r[0]&&(!a||r[1]>a[0]&&r[1]<a[3])){i.label=r[1];break}if(6===r[0]&&i.label<a[1]){i.label=a[1],a=r;break}if(a&&i.label<a[2]){i.label=a[2],i.ops.push(r);break}a[2]&&i.ops.pop(),i.trys.pop();continue}r=t.call(e,i)}catch(e){r=[6,e],o=0}finally{n=a=0}if(5&r[0])throw r[1];return{value:r[0]?r[1]:void 0,done:!0}}([r,s])}}}function p(e,t,n,o){void 0===o&&(o=n),e[o]=t[n]}function m(e,t){for(var n in e)"default"===n||t.hasOwnProperty(n)||(t[n]=e[n])}function f(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],o=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&o>=e.length&&(e=void 0),{value:e&&e[o++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function g(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var o,a,r=n.call(e),i=[];try{for(;(void 0===t||t-- >0)&&!(o=r.next()).done;)i.push(o.value)}catch(e){a={error:e}}finally{try{o&&!o.done&&(n=r.return)&&n.call(r)}finally{if(a)throw a.error}}return i}function _(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(g(arguments[t]));return e}function h(){for(var e=0,t=0,n=arguments.length;t<n;t++)e+=arguments[t].length;var o=Array(e),a=0;for(t=0;t<n;t++)for(var r=arguments[t],i=0,s=r.length;i<s;i++,a++)o[a]=r[i];return o}function y(e){return this instanceof y?(this.v=e,this):new y(e)}function v(e,t,n){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var o,a=n.apply(e,t||[]),r=[];return o={},i("next"),i("throw"),i("return"),o[Symbol.asyncIterator]=function(){return this},o;function i(e){a[e]&&(o[e]=function(t){return new Promise((function(n,o){r.push([e,t,n,o])>1||s(e,t)}))})}function s(e,t){try{(n=a[e](t)).value instanceof y?Promise.resolve(n.value.v).then(c,u):l(r[0][2],n)}catch(e){l(r[0][3],e)}var n}function c(e){s("next",e)}function u(e){s("throw",e)}function l(e,t){e(t),r.shift(),r.length&&s(r[0][0],r[0][1])}}function b(e){var t,n;return t={},o("next"),o("throw",(function(e){throw e})),o("return"),t[Symbol.iterator]=function(){return this},t;function o(o,a){t[o]=e[o]?function(t){return(n=!n)?{value:y(e[o](t)),done:"return"===o}:a?a(t):t}:a}}function k(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t,n=e[Symbol.asyncIterator];return n?n.call(e):(e=f(e),t={},o("next"),o("throw"),o("return"),t[Symbol.asyncIterator]=function(){return this},t);function o(n){t[n]=e[n]&&function(t){return new Promise((function(o,a){(function(e,t,n,o){Promise.resolve(o).then((function(t){e({value:t,done:n})}),t)})(o,a,(t=e[n](t)).done,t.value)}))}}}function x(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e}function w(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}function C(e){return e&&e.__esModule?e:{default:e}}function O(e,t){if(!t.has(e))throw new TypeError("attempted to get private field on non-instance");return t.get(e)}function S(e,t,n){if(!t.has(e))throw new TypeError("attempted to set private field on non-instance");return t.set(e,n),n}},function(t,n){t.exports=e},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=n(12);t.ChatComponent=o.ChatComponent;var a=n(7);t.AttachmentTemplateDirective=a.AttachmentTemplateDirective;var r=n(4);t.MessageTemplateDirective=r.MessageTemplateDirective},function(e,n){e.exports=t},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=n(0),a=n(1),r=function(){function e(e){this.templateRef=e}return e=o.__decorate([a.Directive({selector:"[kendoChatMessageTemplate]"}),o.__param(0,a.Optional()),o.__metadata("design:paramtypes",[a.TemplateRef])],e)}();t.MessageTemplateDirective=r},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=function(){};t.ChatItem=o},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=function(e){this.message=e};t.SendMessageEvent=o},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=n(0),a=n(1),r=function(){function e(e){this.templateRef=e}return e=o.__decorate([a.Directive({selector:"[kendoChatAttachmentTemplate]"}),o.__param(0,a.Optional()),o.__metadata("design:paramtypes",[a.TemplateRef])],e)}();t.AttachmentTemplateDirective=r},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=n(0),a=n(1),r=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o.__extends(t,e),o.__decorate([a.Input(),o.__metadata("design:type",String)],t.prototype,"messagePlaceholder",void 0),o.__decorate([a.Input(),o.__metadata("design:type",String)],t.prototype,"send",void 0),t}(n(3).ComponentMessages);t.Messages=r},function(e,t){e.exports=n},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=n(0),a=function(e){function t(t,n){var o=e.call(this)||this;return o.action=t,o.message=n,o}return o.__extends(t,e),t}(n(30).PreventableEvent);t.ExecuteActionEvent=a},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=n(0);o.__exportStar(n(2),t),o.__exportStar(n(16),t),o.__exportStar(n(10),t),o.__exportStar(n(6),t)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=n(0),a=n(1),r=n(7),i=n(3),s=n(13),c=n(4),u=n(6),l=n(14),d=n(15),p=function(){function e(e,t){var n=this;this.localization=e,this.zone=t,this.sendMessage=new a.EventEmitter,this.executeAction=new a.EventEmitter,this.autoScroll=!0,l.validatePackage(d.packageMetadata),this.direction=e.rtl?"rtl":"ltr",this.localizationChangeSubscription=e.changes.subscribe((function(e){var t=e.rtl;n.direction=t?"rtl":"ltr"}))}return Object.defineProperty(e.prototype,"className",{get:function(){return"k-widget k-chat"},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"dirAttr",{get:function(){return this.direction},enumerable:!0,configurable:!0}),e.prototype.ngOnChanges=function(){var e=this;this.zone.runOutsideAngular((function(){return setTimeout((function(){e.messageList.nativeElement.style.flex="1 1 auto"}))}))},e.prototype.ngAfterViewInit=function(){if(a.isDevMode()&&!this.user)throw new Error("User must be set and have a valid id.")},e.prototype.ngOnDestroy=function(){this.localizationChangeSubscription&&this.localizationChangeSubscription.unsubscribe()},e.prototype.sendClick=function(){var e=this.messageInput.nativeElement,t=e.value;if(t){var n={author:this.user,text:t,timestamp:new Date};this.sendMessage.emit(new u.SendMessageEvent(n)),e.value=null,e.focus(),this.autoScroll=!0}},e.prototype.inputKeydown=function(e){13===e.keyCode&&this.sendClick()},e.prototype.dispatchAction=function(e){(this.executeAction.emit(e),e.isDefaultPrevented())||(s.makeHandler(e.action)(e.action,this),this.messageInput.nativeElement.focus())},e.prototype.textFor=function(e){return this.localization.get(e)},o.__decorate([a.Input(),o.__metadata("design:type",Array)],e.prototype,"messages",void 0),o.__decorate([a.Input(),o.__metadata("design:type",Object)],e.prototype,"user",void 0),o.__decorate([a.Output(),o.__metadata("design:type",a.EventEmitter)],e.prototype,"sendMessage",void 0),o.__decorate([a.Output(),o.__metadata("design:type",a.EventEmitter)],e.prototype,"executeAction",void 0),o.__decorate([a.HostBinding("class"),o.__metadata("design:type",String),o.__metadata("design:paramtypes",[])],e.prototype,"className",null),o.__decorate([a.HostBinding("attr.dir"),o.__metadata("design:type",String),o.__metadata("design:paramtypes",[])],e.prototype,"dirAttr",null),o.__decorate([a.ContentChild(r.AttachmentTemplateDirective,{static:!1}),o.__metadata("design:type",r.AttachmentTemplateDirective)],e.prototype,"attachmentTemplate",void 0),o.__decorate([a.ContentChild(c.MessageTemplateDirective,{static:!1}),o.__metadata("design:type",c.MessageTemplateDirective)],e.prototype,"messageTemplate",void 0),o.__decorate([a.ViewChild("messageInput",{static:!0}),o.__metadata("design:type",a.ElementRef)],e.prototype,"messageInput",void 0),o.__decorate([a.ViewChild("messageList",{static:!0}),o.__metadata("design:type",a.ElementRef)],e.prototype,"messageList",void 0),e=o.__decorate([a.Component({providers:[i.LocalizationService,{provide:i.L10N_PREFIX,useValue:"kendo.chat"}],selector:"kendo-chat",template:'\n <ng-container\n kendoChatLocalizedMessages\n i18n-messagePlaceholder="kendo.chat.messagePlaceholder|The placholder text of the message text input"\n messagePlaceholder="Type a message..."\n\n i18n-send="kendo.chat.send|The text for the Send button"\n send="Send..."\n >\n </ng-container>\n\n <div\n #messageList\n class="k-message-list k-avatars"\n aria-live="polite" role="log"\n kendoChatScrollAnchor\n #anchor="scrollAnchor"\n [(autoScroll)]="autoScroll"\n >\n <kendo-chat-message-list\n [messages]="messages"\n [messageTemplate]="messageTemplate"\n [attachmentTemplate]="attachmentTemplate"\n [user]="user"\n (executeAction)="dispatchAction($event)"\n (resize)="anchor.scrollToBottom()"\n (navigate)="this.autoScroll = false"\n >\n </kendo-chat-message-list>\n </div>\n\n <div class="k-message-box">\n <input\n #messageInput\n kendoChatFocusedState\n type="text"\n class="k-input"\n [placeholder]="textFor(\'messagePlaceholder\')"\n (keydown)="inputKeydown($event)"\n >\n <button\n kendoButton\n fillMode="flat"\n class="k-button-send"\n tabindex="-1"\n [attr.title]="textFor(\'send\')"\n (click)="sendClick()"\n ><svg version="1.1" xmlns="http://www.w3.org/2000/svg" x="0px" y="0px" viewBox="0 0 16 16"><path d="M0,14.3c-0.1,0.6,0.3,0.8,0.8,0.6l14.8-6.5c0.5-0.2,0.5-0.6,0-0.8L0.8,1.1C0.3,0.9-0.1,1.1,0,1.7l0.7,4.2C0.8,6.5,1.4,7,1.9,7.1l8.8,0.8c0.6,0.1,0.6,0.1,0,0.2L1.9,8.9C1.4,9,0.8,9.5,0.7,10.1L0,14.3z"/></svg></button>\n </div>\n '}),o.__metadata("design:paramtypes",[i.LocalizationService,a.NgZone])],e)}();t.ChatComponent=p},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=n(6),a=function(){},r={reply:function(e,t){t.sendMessage.emit(new o.SendMessageEvent({author:t.user,text:e.value,timestamp:new Date}))},call:function(e){window.open("tel:"+e.value)},openUrl:function(e){window.open(e.value)}};t.makeHandler=function(e){return r[e.type]||a}},function(e,t){e.exports=o},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.packageMetadata={name:"@progress/kendo-angular-conversational-ui",productName:"Kendo UI for Angular",productCodes:["KENDOUIANGULAR","KENDOUICOMPLETE"],publishDate:1646820248,version:"",licensingDocsUrl:"https://www.telerik.com/kendo-angular-ui/my-license/?utm_medium=product&utm_source=kendoangular&utm_campaign=kendo-ui-angular-purchase-license-keys-warning"}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=n(0),a=n(17),r=n(2),i=n(18),s=n(19),c=n(20),u=n(21),l=n(22),d=n(23),p=n(24),m=n(25),f=n(28),g=n(29),_=n(1),h=n(33),y=n(34),v=[r.ChatComponent,u.CustomMessagesComponent,r.AttachmentTemplateDirective,r.MessageTemplateDirective,d.HeroCardComponent],b=[a.AttachmentComponent,l.FocusedStateDirective,p.LocalizedMessagesDirective,m.MessageAttachmentsComponent,f.MessageComponent,g.MessageListComponent,r.MessageTemplateDirective,h.ScrollAnchorDirective,y.SuggestedActionsComponent],k=function(){function e(){}return e=o.__decorate([_.NgModule({declarations:v.concat(b),exports:[v],imports:[i.ButtonModule,s.CommonModule,c.ResizeSensorModule]})],e)}();t.ChatModule=k},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=n(0),a=n(1),r=n(2),i=function(){function e(){}return Object.defineProperty(e.prototype,"attachment",{get:function(){return this._attachment},set:function(e){this._attachment=e,this.context={$implicit:this.attachment}},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"image",{get:function(){return 0===this.contentType.indexOf("image/")},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"unknown",{get:function(){return!this.image},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"contentType",{get:function(){return this.attachment.contentType||""},enumerable:!0,configurable:!0}),o.__decorate([a.Input(),o.__metadata("design:type",Object),o.__metadata("design:paramtypes",[Object])],e.prototype,"attachment",null),o.__decorate([a.Input(),o.__metadata("design:type",r.AttachmentTemplateDirective)],e.prototype,"template",void 0),e=o.__decorate([a.Component({selector:"kendo-chat-attachment",template:'\n <ng-container *ngIf="template">\n <ng-container *ngTemplateOutlet="template.templateRef; context: context;">\n </ng-container>\n </ng-container>\n\n <div *ngIf="!template" class="k-card">\n <div class="k-card-body">\n <h5 class="k-card-title" *ngIf="attachment.title">\n {{ attachment.title }}\n </h5>\n <h6 class="k-card-subtitle" *ngIf="attachment.subtitle">\n {{ attachment.subtitle }}\n </h6>\n <img *ngIf="image" [attr.src]="attachment.content" />\n <ng-container *ngIf="unknown">\n {{ attachment.content }}\n </ng-container>\n </div>\n </div>\n '})],e)}();t.AttachmentComponent=i},function(e,t){e.exports=a},function(e,t){e.exports=r},function(e,t){e.exports=i},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=n(0),a=n(1),r=n(3),i=n(8),s=function(e){function t(t){var n=e.call(this)||this;return n.service=t,n}var n;return o.__extends(t,e),n=t,Object.defineProperty(t.prototype,"override",{get:function(){return!0},enumerable:!0,configurable:!0}),t=n=o.__decorate([a.Component({providers:[{provide:i.Messages,useExisting:a.forwardRef((function(){return n}))}],selector:"kendo-chat-messages",template:""}),o.__metadata("design:paramtypes",[r.LocalizationService])],t)}(i.Messages);t.CustomMessagesComponent=s},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=n(0),a=n(1),r=function(){function e(){this.focused=!1}return e.prototype.onFocus=function(){this.focused=!0},e.prototype.onBlur=function(){this.focused=!1},o.__decorate([a.HostBinding("class.k-state-focused"),o.__metadata("design:type",Boolean)],e.prototype,"focused",void 0),o.__decorate([a.HostListener("focusin"),o.__metadata("design:type",Function),o.__metadata("design:paramtypes",[]),o.__metadata("design:returntype",void 0)],e.prototype,"onFocus",null),o.__decorate([a.HostListener("focusout"),o.__metadata("design:type",Function),o.__metadata("design:paramtypes",[]),o.__metadata("design:returntype",void 0)],e.prototype,"onBlur",null),e=o.__decorate([a.Directive({selector:"[kendoChatFocusedState]"})],e)}();t.FocusedStateDirective=r},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=n(0),a=n(1),r=function(){function e(){this.cssClass=!0,this.executeAction=new a.EventEmitter}return e.prototype.onClick=function(e){this.executeAction.next(e)},o.__decorate([a.Input(),o.__metadata("design:type",String)],e.prototype,"imageUrl",void 0),o.__decorate([a.Input(),o.__metadata("design:type",String)],e.prototype,"title",void 0),o.__decorate([a.Input(),o.__metadata("design:type",String)],e.prototype,"subtitle",void 0),o.__decorate([a.Input(),o.__metadata("design:type",Array)],e.prototype,"actions",void 0),o.__decorate([a.HostBinding("class.k-card"),o.__metadata("design:type",Boolean)],e.prototype,"cssClass",void 0),o.__decorate([a.Output(),o.__metadata("design:type",a.EventEmitter)],e.prototype,"executeAction",void 0),e=o.__decorate([a.Component({selector:"kendo-chat-hero-card",template:'\n <img class="k-card-image" [src]="imageUrl" *ngIf="imageUrl" />\n <div class="k-card-body">\n <h5 class="k-card-title" *ngIf="title">\n {{ title }}\n </h5>\n <h6 class="k-card-subtitle" *ngIf="subtitle">\n {{ subtitle }}\n </h6>\n </div>\n <div class="k-card-actions k-card-actions-vertical">\n <span class="k-card-action"\n *ngFor="let act of actions"\n >\n <button\n kendoButton fillMode="flat"\n (click)="onClick(act)">\n {{ act.title }}\n </button>\n </span>\n </div>\n '})],e)}();t.HeroCardComponent=r},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=n(0),a=n(1),r=n(3),i=n(8),s=function(e){function t(t){var n=e.call(this)||this;return n.service=t,n}var n;return o.__extends(t,e),n=t,t=n=o.__decorate([a.Directive({providers:[{provide:i.Messages,useExisting:a.forwardRef((function(){return n}))}],selector:"[kendoChatLocalizedMessages]"}),o.__metadata("design:paramtypes",[r.LocalizationService])],t)}(i.Messages);t.LocalizedMessagesDirective=s},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=n(0),a=n(1),r=n(26),i=n(27),s=n(5),c=n(2),u=function(e){function t(t){var n,o,a=e.call(this)||this;return a.zone=t,a.scrollPosition=0,a.selectedIndex=0,a.carouselKeyHandlers=((n={})[37]=function(e){return a.navigateTo(e,-1)},n[39]=function(e){return a.navigateTo(e,1)},n),a.listKeyHandlers=((o={})[38]=function(e){return a.navigateTo(e,-1)},o[40]=function(e){return a.navigateTo(e,1)},o),a}var n;return o.__extends(t,e),n=t,Object.defineProperty(t.prototype,"carousel",{get:function(){return"list"!==this.layout},enumerable:!0,configurable:!0}),t.prototype.ngAfterViewInit=function(){var e=this;this.zone.runOutsideAngular((function(){e.scrollSubscription=r.fromEvent(e.deck.nativeElement,"scroll").pipe(i.debounceTime(100)).subscribe((function(){return e.onScroll()}))}))},t.prototype.ngOnDestroy=function(){this.scrollSubscription.unsubscribe()},t.prototype.isSelected=function(e){return this.selectedIndex===e},t.prototype.itemKeydown=function(e,t){var n=("list"===this.layout?this.listKeyHandlers:this.carouselKeyHandlers)[e.keyCode];n&&n(e,t)},t.prototype.itemClick=function(e){this.select(e)},t.prototype.focus=function(){this.select(this.selectedIndex)},t.prototype.scrollTo=function(e){var t=this.deck.nativeElement,n=t.scrollWidth/this.items.length,o=t.scrollWidth-t.offsetWidth,a=t.scrollLeft+n*e;t.scrollLeft=Math.max(0,Math.min(o,a))},t.prototype.select=function(e){this.selectedIndex=e;var t=this.items.toArray()[e];t&&t.nativeElement.focus()},t.prototype.navigateTo=function(e,t){var n=this.selectedIndex,o=Math.max(0,Math.min(n+t,this.items.length-1));o!==n&&(this.select(o),e.preventDefault())},t.prototype.onScroll=function(){var e=this,t=this.deck.nativeElement;if(0!==t.scrollWidth){var n=t.scrollLeft/(t.scrollWidth-t.offsetWidth);n!==this.scrollPosition&&this.zone.run((function(){e.scrollPosition=n}))}},o.__decorate([a.Input(),o.__metadata("design:type",Array)],t.prototype,"attachments",void 0),o.__decorate([a.Input(),o.__metadata("design:type",String)],t.prototype,"layout",void 0),o.__decorate([a.Input(),o.__metadata("design:type",Boolean)],t.prototype,"tabbable",void 0),o.__decorate([a.Input(),o.__metadata("design:type",c.AttachmentTemplateDirective)],t.prototype,"template",void 0),o.__decorate([a.HostBinding("class.k-card-deck-scrollwrap"),o.__metadata("design:type",Boolean),o.__metadata("design:paramtypes",[])],t.prototype,"carousel",null),o.__decorate([a.ViewChild("deck",{read:a.ElementRef,static:!0}),o.__metadata("design:type",a.ElementRef)],t.prototype,"deck",void 0),o.__decorate([a.ViewChildren("item",{read:a.ElementRef}),o.__metadata("design:type",a.QueryList)],t.prototype,"items",void 0),t=n=o.__decorate([a.Component({providers:[{provide:s.ChatItem,useExisting:a.forwardRef((function(){return n}))}],selector:"kendo-chat-message-attachments",template:'\n <button\n *ngIf="carousel && scrollPosition > 0"\n (click)="scrollTo(-1)"\n class="k-button k-icon-button k-button-md k-rounded-md k-button-solid k-button-solid-base"\n tabindex="-1">\n <span class="k-icon k-button-icon k-i-arrow-chevron-left"></span>\n </button>\n <div #deck [class.k-card-deck]="carousel">\n <kendo-chat-attachment #item\n *ngFor="let att of attachments; index as index; first as first; last as last"\n [attachment]="att"\n [template]="template"\n [class.k-state-selected]="isSelected(index)"\n [class.k-state-focused]="isSelected(index)"\n [class.k-card-wrap]="true"\n [class.k-first]="first"\n [class.k-last]="last"\n [attr.tabindex]="tabbable && isSelected(index) ? \'0\' : \'-1\'"\n (click)="itemClick(index)"\n (keydown)="itemKeydown($event, att)"\n >\n </kendo-chat-attachment>\n </div>\n <button\n *ngIf="carousel && scrollPosition < 1"\n (click)="scrollTo(1)"\n class="k-button k-icon-button k-button-md k-rounded-md k-button-solid k-button-solid-base"\n tabindex="-1">\n <span class="k-icon k-button-icon k-i-arrow-chevron-right"></span>\n </button>\n '}),o.__metadata("design:paramtypes",[a.NgZone])],t)}(s.ChatItem);t.MessageAttachmentsComponent=u},function(e,t){e.exports=s},function(e,t){e.exports=c},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=n(0),a=n(1),r=n(5),i=n(4),s=n(9),c=function(e){function t(t,n){var o=e.call(this)||this;return o.element=t,o.intl=n,o.cssClass=!0,o}var n;return o.__extends(t,e),n=t,Object.defineProperty(t.prototype,"tabIndex",{get:function(){return this.tabbable?"0":"-1"},enumerable:!0,configurable:!0}),t.prototype.formatTimeStamp=function(e){return this.intl.formatDate(e,{datetime:"short"})},t.prototype.focus=function(){this.element.nativeElement.focus()},o.__decorate([a.Input(),o.__metadata("design:type",Object)],t.prototype,"message",void 0),o.__decorate([a.Input(),o.__metadata("design:type",Boolean)],t.prototype,"tabbable",void 0),o.__decorate([a.Input(),o.__metadata("design:type",i.MessageTemplateDirective)],t.prototype,"template",void 0),o.__decorate([a.HostBinding("class.k-message"),o.__metadata("design:type",Boolean)],t.prototype,"cssClass",void 0),o.__decorate([a.HostBinding("class.k-state-selected"),a.HostBinding("class.k-state-focused"),o.__metadata("design:type",Boolean)],t.prototype,"selected",void 0),o.__decorate([a.HostBinding("attr.tabIndex"),o.__metadata("design:type",String),o.__metadata("design:paramtypes",[])],t.prototype,"tabIndex",null),t=n=o.__decorate([a.Component({selector:"kendo-chat-message",providers:[{provide:r.ChatItem,useExisting:a.forwardRef((function(){return n}))}],template:'\n <time\n [attr.aria-hidden]="!selected"\n class="k-message-time"\n *ngIf="message.timestamp"\n >\n {{ formatTimeStamp(message.timestamp) }}\n </time>\n\n <ng-container *ngIf="!message.typing; else typing">\n <div class="k-bubble" *ngIf="template">\n <ng-container\n *ngTemplateOutlet="template.templateRef; context: { $implicit: message };"\n >\n </ng-container>\n </div>\n\n <div class="k-bubble" *ngIf="!template && message.text">\n {{message.text}}\n </div>\n </ng-container>\n\n <span\n class="k-message-status"\n *ngIf="message.status"\n >\n {{ message.status }}\n </span>\n\n <ng-template #typing>\n <div class="k-bubble">\n <div class="k-typing-indicator">\n <span></span>\n <span></span>\n <span></span>\n </div>\n </div>\n </ng-template>\n '}),o.__metadata("design:paramtypes",[a.ElementRef,s.IntlService])],t)}(r.ChatItem);t.MessageComponent=c},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=n(0),a=n(1),r=n(10),i=n(31),s=n(5),c=n(32),u=n(2),l=n(4),d=n(9),p=function(){function e(e,t){var n,o=this;this.element=e,this.intl=t,this.executeAction=new a.EventEmitter,this.navigate=new a.EventEmitter,this.resize=new a.EventEmitter,this.cssClass=!0,this.view=[],this.keyActions=((n={})[38]=function(e){return o.navigateTo(e,-1)},n[40]=function(e){return o.navigateTo(e,1)},n)}return Object.defineProperty(e.prototype,"messages",{get:function(){return this._messages},set:function(e){var t=e||[];this.view=c.chatView(t),this._messages=t},enumerable:!0,configurable:!0}),e.prototype.ngAfterViewInit=function(){this.selectedItem=this.items.last},e.prototype.onResize=function(){this.resize.emit()},e.prototype.formatTimeStamp=function(e){return this.intl.formatDate(e,{date:"full"})},e.prototype.onKeydown=function(e){var t=this.keyActions[e.keyCode];t&&t(e)},e.prototype.onBlur=function(e){var t=this,n=e.relatedTarget||document.activeElement;!i.closest(n,(function(e){return e===t.element.nativeElement}))&&this.select(null)},e.prototype.isOwnMessage=function(e){return c.isAuthor(this.user,e)},e.prototype.dispatchAction=function(e,t){var n=new r.ExecuteActionEvent(e,t);this.executeAction.emit(n)},e.prototype.trackGroup=function(e,t){return t.trackBy},e.prototype.select=function(e){var t=this.selectedItem;t&&(t.selected=!1),e&&(e.selected=!0,this.selectedItem=e)},e.prototype.last=function(e){if(e&&0!==e.length)return e[e.length-1]},e.prototype.navigateTo=function(e,t){var n=this.items.toArray(),o=this.selectedItem,a=n.indexOf(o),r=n[Math.max(0,Math.min(a+t,this.items.length-1))];r!==o&&(this.select(r),r.focus(),this.navigate.emit(),e.preventDefault())},o.__decorate([a.Input(),o.__metadata("design:type",Array),o.__metadata("design:paramtypes",[Array])],e.prototype,"messages",null),o.__decorate([a.Input(),o.__metadata("design:type",u.AttachmentTemplateDirective)],e.prototype,"attachmentTemplate",void 0),o.__decorate([a.Input(),o.__metadata("design:type",l.MessageTemplateDirective)],e.prototype,"messageTemplate",void 0),o.__decorate([a.Input(),o.__metadata("design:type",Object)],e.prototype,"user",void 0),o.__decorate([a.Output(),o.__metadata("design:type",a.EventEmitter)],e.prototype,"executeAction",void 0),o.__decorate([a.Output(),o.__metadata("design:type",a.EventEmitter)],e.prototype,"navigate",void 0),o.__decorate([a.Output(),o.__metadata("design:type",a.EventEmitter)],e.prototype,"resize",void 0),o.__decorate([a.ViewChildren(s.ChatItem),o.__metadata("design:type",a.QueryList)],e.prototype,"items",void 0),o.__decorate([a.HostBinding("class.k-message-list-content"),o.__metadata("design:type",Boolean)],e.prototype,"cssClass",void 0),o.__decorate([a.HostListener("keydown",["$event"]),o.__metadata("design:type",Function),o.__metadata("design:paramtypes",[Object]),o.__metadata("design:returntype",void 0)],e.prototype,"onKeydown",null),o.__decorate([a.HostListener("focusout",["$event"]),o.__metadata("design:type",Function),o.__metadata("design:paramtypes",[FocusEvent]),o.__metadata("design:returntype",void 0)],e.prototype,"onBlur",null),e=o.__decorate([a.Component({selector:"kendo-chat-message-list",template:'\n <ng-container *ngFor="let group of view; last as lastGroup; trackBy: trackGroup">\n <ng-container [ngSwitch]="group.type">\n <div\n *ngSwitchCase="\'date-marker\'"\n class="k-timestamp"\n >\n {{ formatTimeStamp(group.timestamp) }}\n </div>\n <div\n *ngSwitchCase="\'message-group\'"\n class="k-message-group"\n [class.k-alt]="isOwnMessage(group.messages[0])"\n [class.k-no-avatar]="!group.author.avatarUrl"\n >\n <img\n *ngIf="group.author.avatarUrl"\n [attr.src]="group.author.avatarUrl"\n class="k-avatar"\n />\n <p *ngIf="group.author.name" class="k-author">{{ group.author.name }}</p>\n <ng-container\n *ngFor="let msg of group.messages; first as firstMessage; last as lastMessage"\n >\n <img *ngIf="msg.user?.avatarUrl" [src]="msg.user?.avatarUrl" class="k-avatar">\n <kendo-chat-message #message\n [message]="msg"\n [tabbable]="lastGroup && lastMessage"\n [template]="messageTemplate"\n (click)="select(message)"\n (focus)="select(message)"\n [class.k-only]="group.messages.length === 1"\n [class.k-first]="group.messages.length > 1 && firstMessage"\n [class.k-last]="group.messages.length > 1 && lastMessage"\n >\n </kendo-chat-message>\n\n <kendo-chat-attachment\n *ngIf="msg.attachments && msg.attachments.length === 1"\n [attachment]="msg.attachments[0]"\n [template]="attachmentTemplate"\n >\n </kendo-chat-attachment>\n </ng-container>\n </div>\n\n <kendo-chat-message-attachments #attachments\n *ngSwitchCase="\'attachment-group\'"\n [attachments]="group.attachments"\n [layout]="group.attachmentLayout"\n [tabbable]="lastGroup"\n [template]="attachmentTemplate"\n (click)="select(attachments)"\n (focus)="select(attachments)"\n >\n </kendo-chat-message-attachments>\n\n <kendo-chat-suggested-actions #actions\n *ngSwitchCase="\'action-group\'"\n [actions]="group.actions"\n [tabbable]="lastGroup"\n (dispatch)="dispatchAction($event, last(group.messages))"\n (click)="select(actions)"\n (focus)="select(actions)"\n >\n </kendo-chat-suggested-actions>\n </ng-container>\n </ng-container>\n <kendo-resize-sensor (resize)="onResize()">\n </kendo-resize-sensor>\n '}),o.__metadata("design:paramtypes",[a.ElementRef,d.IntlService])],e)}();t.MessageListComponent=p},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=function(){function e(){this.prevented=!1}return e.prototype.preventDefault=function(){this.prevented=!0},e.prototype.isDefaultPrevented=function(){return this.prevented},e}();t.PreventableEvent=o},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.closest=function(e,t){for(;e&&!t(e);)e=e.parentNode;return e}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=n(1);t.isAuthor=function(e,t){return e&&t.author&&e.id===t.author.id};var a=function(e){return e[e.length-1]},r=function(e){return function(n,r,i){var s=i===e-1;return function(e,t){var n,o,r=t.timestamp,i=a(e);if(r&&(!i||(n=r,o=i.timestamp,n&&o&&(o.getDate()!==n.getDate()||o.getMonth()!==n.getMonth()||o.getFullYear()!==n.getFullYear())))){var s={type:"date-marker",timestamp:r,trackBy:r.getTime()};e.push(s)}}(n,r),function(e,n,r){var i,s=a(e);if(o.isDevMode()&&!n.author)throw new Error("Author must be set for message: "+JSON.stringify(n));n.typing&&!r||(s&&"message-group"===s.type&&(i=s.messages),i&&t.isAuthor(n.author,a(i))?i.push(n):e.push({type:"message-group",messages:[n],author:n.author,timestamp:n.timestamp,trackBy:n}))}(n,r,s),r.attachments&&r.attachments.length>1&&n.push({type:"attachment-group",attachments:r.attachments,attachmentLayout:r.attachmentLayout,timestamp:r.timestamp,trackBy:r}),r.suggestedActions&&s&&n.push({type:"action-group",actions:r.suggestedActions,timestamp:r.timestamp,trackBy:r}),n}};t.chatView=function(e){return e.reduce(r(e.length),[])}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=n(0),a=n(1),r=function(){function e(e,t,n){this.element=e,this.zone=t,this.renderer=n,this.autoScroll=!0,this.autoScrollChange=new a.EventEmitter,this.overflowAnchor="none",this.scrolling=!1}return e.prototype.ngOnInit=function(){var e=this;this.zone.runOutsideAngular((function(){e.unsubscribe=e.renderer.listen(e.element.nativeElement,"scroll",(function(){return e.onScroll()}))}))},e.prototype.ngAfterViewInit=function(){this.scrollToBottom()},e.prototype.ngOnDestroy=function(){this.unsubscribe&&this.unsubscribe()},e.prototype.onScroll=function(){var e=this;if(!this.scrolling){var t=this.element.nativeElement,n=t.scrollTop+t.offsetHeight,o=t.scrollHeight-n<2;this.autoScroll!==o&&this.zone.run((function(){e.autoScroll=o,e.autoScrollChange.emit(e.autoScroll)}))}},e.prototype.scrollToBottom=function(){var e=this;if(this.autoScroll){var t=this.element.nativeElement;t.scrollTop=t.scrollHeight-t.clientHeight,this.scrolling=!0,this.zone.runOutsideAngular((function(){return setTimeout((function(){return e.scrolling=!1}),1e3)}))}},o.__decorate([a.Input(),o.__metadata("design:type",Boolean)],e.prototype,"autoScroll",void 0),o.__decorate([a.Output(),o.__metadata("design:type",a.EventEmitter)],e.prototype,"autoScrollChange",void 0),o.__decorate([a.HostBinding("style.overflow-anchor"),o.__metadata("design:type",String)],e.prototype,"overflowAnchor",void 0),e=o.__decorate([a.Directive({selector:"[kendoChatScrollAnchor]",exportAs:"scrollAnchor"}),o.__metadata("design:paramtypes",[a.ElementRef,a.NgZone,a.Renderer2])],e)}();t.ScrollAnchorDirective=r},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=n(0),a=n(1),r=n(5),i=function(e){function t(){var t,n=null!==e&&e.apply(this,arguments)||this;return n.dispatch=new a.EventEmitter,n.defaultClass=!0,n.selectedIndex=0,n.keyHandlers=((t={})[37]=function(e){return n.navigateTo(e,-1)},t[39]=function(e){return n.navigateTo(e,1)},t[13]=function(e,t){return n.actionClick(t)},t),n}var n;return o.__extends(t,e),n=t,t.prototype.isSelected=function(e){return this.selected&&this.selectedIndex===e},t.prototype.actionClick=function(e){this.dispatch.next(e)},t.prototype.actionKeydown=function(e,t){var n=this.keyHandlers[e.keyCode];n&&n(e,t)},t.prototype.focus=function(){this.select(this.selectedIndex)},t.prototype.select=function(e){this.selectedIndex=e;var t=this.items.toArray()[e];t&&t.nativeElement.focus()},t.prototype.navigateTo=function(e,t){var n=this.selectedIndex,o=Math.max(0,Math.min(n+t,this.items.length-1));o!==n&&(this.select(o),e.preventDefault())},o.__decorate([a.Input(),o.__metadata("design:type",Array)],t.prototype,"actions",void 0),o.__decorate([a.Input(),o.__metadata("design:type",Boolean)],t.prototype,"tabbable",void 0),o.__decorate([a.Output(),o.__metadata("design:type",a.EventEmitter)],t.prototype,"dispatch",void 0),o.__decorate([a.HostBinding("class.k-quick-replies"),o.__metadata("design:type",Boolean)],t.prototype,"defaultClass",void 0),o.__decorate([a.ViewChildren("item"),o.__metadata("design:type",a.QueryList)],t.prototype,"items",void 0),t=n=o.__decorate([a.Component({selector:"kendo-chat-suggested-actions",providers:[{provide:r.ChatItem,useExisting:a.forwardRef((function(){return n}))}],template:'\n <span #item\n *ngFor="let action of actions; index as index; first as first; last as last"\n class="k-quick-reply"\n [class.k-state-selected]="isSelected(index)"\n [class.k-state-focused]="isSelected(index)"\n [class.k-first]="first"\n [class.k-last]="last"\n [attr.tabindex]="tabbable && selectedIndex === index ? \'0\' : \'-1\'"\n (click)="actionClick(action)"\n (keydown)="actionKeydown($event, action)"\n >\n {{ action.title || action.value }}\n </span>\n '})],t)}(r.ChatItem);t.SuggestedActionsComponent=i}])}));
|
package/dist/cdn/main.js
CHANGED
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
* Copyright © 2021 Progress Software Corporation. All rights reserved.
|
|
3
3
|
* Licensed under commercial license. See LICENSE.md in the project root for more information
|
|
4
4
|
*-------------------------------------------------------------------------------------------*/
|
|
5
|
-
!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e(require("tslib"),require("@angular/core"),require("@progress/kendo-angular-l10n"),require("@progress/kendo-angular-intl"),require("@progress/kendo-licensing"),require("@progress/kendo-angular-buttons"),require("@angular/common"),require("@progress/kendo-angular-common"),require("rxjs")):"function"==typeof define&&define.amd?define([,,,,,,,,],e):"object"==typeof exports?exports.KendoAngularConversationalUi=e(require("tslib"),require("@angular/core"),require("@progress/kendo-angular-l10n"),require("@progress/kendo-angular-intl"),require("@progress/kendo-licensing"),require("@progress/kendo-angular-buttons"),require("@angular/common"),require("@progress/kendo-angular-common"),require("rxjs")):t.KendoAngularConversationalUi=e(t.self,t.ng.core,t.KendoAngularL10N,t.KendoAngularIntl,t.KendoLicensing,t.KendoAngularButtons,t.ng.common,t.KendoAngularCommon,t.rxjs)}(window,(function(t,e,n,i,r,o,s,u,c){return function(t){var e={};function n(i){if(e[i])return e[i].exports;var r=e[i]={i:i,l:!1,exports:{}};return t[i].call(r.exports,r,r.exports,n),r.l=!0,r.exports}return n.m=t,n.c=e,n.d=function(t,e,i){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:i})},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var i=Object.create(null);if(n.r(i),Object.defineProperty(i,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var r in t)n.d(i,r,function(e){return t[e]}.bind(null,r));return i},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s=11)}([function(e,n){e.exports=t},function(t,n){t.exports=e},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n(12);e.ChatComponent=i.ChatComponent;var r=n(7);e.AttachmentTemplateDirective=r.AttachmentTemplateDirective;var o=n(4);e.MessageTemplateDirective=o.MessageTemplateDirective},function(t,e){t.exports=n},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n(0),r=n(1),o=function(){function t(t){this.templateRef=t}return t=i.__decorate([r.Directive({selector:"[kendoChatMessageTemplate]"}),i.__param(0,r.Optional()),i.__metadata("design:paramtypes",[r.TemplateRef])],t)}();e.MessageTemplateDirective=o},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=function(){};e.ChatItem=i},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=function(t){this.message=t};e.SendMessageEvent=i},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n(0),r=n(1),o=function(){function t(t){this.templateRef=t}return t=i.__decorate([r.Directive({selector:"[kendoChatAttachmentTemplate]"}),i.__param(0,r.Optional()),i.__metadata("design:paramtypes",[r.TemplateRef])],t)}();e.AttachmentTemplateDirective=o},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n(0),r=n(1),o=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return i.__extends(e,t),i.__decorate([r.Input(),i.__metadata("design:type",String)],e.prototype,"messagePlaceholder",void 0),i.__decorate([r.Input(),i.__metadata("design:type",String)],e.prototype,"send",void 0),e}(n(3).ComponentMessages);e.Messages=o},function(t,e){t.exports=i},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n(0),r=function(t){function e(e,n){var i=t.call(this)||this;return i.action=e,i.message=n,i}return i.__extends(e,t),e}(n(29).PreventableEvent);e.ExecuteActionEvent=r},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n(0);i.__exportStar(n(2),e),i.__exportStar(n(16),e),i.__exportStar(n(10),e),i.__exportStar(n(6),e)},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n(0),r=n(1),o=n(7),s=n(3),u=n(13),c=n(4),a=n(6),l=n(14),h=n(15),p=function(){function t(t,e){var n=this;this.localization=t,this.zone=e,this.sendMessage=new r.EventEmitter,this.executeAction=new r.EventEmitter,this.autoScroll=!0,l.validatePackage(h.packageMetadata),this.direction=t.rtl?"rtl":"ltr",this.localizationChangeSubscription=t.changes.subscribe((function(t){var e=t.rtl;n.direction=e?"rtl":"ltr"}))}return Object.defineProperty(t.prototype,"className",{get:function(){return"k-widget k-chat"},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"dirAttr",{get:function(){return this.direction},enumerable:!0,configurable:!0}),t.prototype.ngOnChanges=function(){var t=this;this.zone.runOutsideAngular((function(){return setTimeout((function(){t.messageList.nativeElement.style.flex="1 1 auto"}))}))},t.prototype.ngAfterViewInit=function(){if(r.isDevMode()&&!this.user)throw new Error("User must be set and have a valid id.")},t.prototype.ngOnDestroy=function(){this.localizationChangeSubscription&&this.localizationChangeSubscription.unsubscribe()},t.prototype.sendClick=function(){var t=this.messageInput.nativeElement,e=t.value;if(e){var n={author:this.user,text:e,timestamp:new Date};this.sendMessage.emit(new a.SendMessageEvent(n)),t.value=null,t.focus(),this.autoScroll=!0}},t.prototype.inputKeydown=function(t){13===t.keyCode&&this.sendClick()},t.prototype.dispatchAction=function(t){(this.executeAction.emit(t),t.isDefaultPrevented())||(u.makeHandler(t.action)(t.action,this),this.messageInput.nativeElement.focus())},t.prototype.textFor=function(t){return this.localization.get(t)},i.__decorate([r.Input(),i.__metadata("design:type",Array)],t.prototype,"messages",void 0),i.__decorate([r.Input(),i.__metadata("design:type",Object)],t.prototype,"user",void 0),i.__decorate([r.Output(),i.__metadata("design:type",r.EventEmitter)],t.prototype,"sendMessage",void 0),i.__decorate([r.Output(),i.__metadata("design:type",r.EventEmitter)],t.prototype,"executeAction",void 0),i.__decorate([r.HostBinding("class"),i.__metadata("design:type",String),i.__metadata("design:paramtypes",[])],t.prototype,"className",null),i.__decorate([r.HostBinding("attr.dir"),i.__metadata("design:type",String),i.__metadata("design:paramtypes",[])],t.prototype,"dirAttr",null),i.__decorate([r.ContentChild(o.AttachmentTemplateDirective,{static:!1}),i.__metadata("design:type",o.AttachmentTemplateDirective)],t.prototype,"attachmentTemplate",void 0),i.__decorate([r.ContentChild(c.MessageTemplateDirective,{static:!1}),i.__metadata("design:type",c.MessageTemplateDirective)],t.prototype,"messageTemplate",void 0),i.__decorate([r.ViewChild("messageInput",{static:!0}),i.__metadata("design:type",r.ElementRef)],t.prototype,"messageInput",void 0),i.__decorate([r.ViewChild("messageList",{static:!0}),i.__metadata("design:type",r.ElementRef)],t.prototype,"messageList",void 0),t=i.__decorate([r.Component({providers:[s.LocalizationService,{provide:s.L10N_PREFIX,useValue:"kendo.chat"}],selector:"kendo-chat",template:'\n <ng-container\n kendoChatLocalizedMessages\n i18n-messagePlaceholder="kendo.chat.messagePlaceholder|The placholder text of the message text input"\n messagePlaceholder="Type a message..."\n\n i18n-send="kendo.chat.send|The text for the Send button"\n send="Send..."\n >\n </ng-container>\n\n <div\n #messageList\n class="k-message-list k-avatars"\n aria-live="polite" role="log"\n kendoChatScrollAnchor\n #anchor="scrollAnchor"\n [(autoScroll)]="autoScroll"\n >\n <kendo-chat-message-list\n [messages]="messages"\n [messageTemplate]="messageTemplate"\n [attachmentTemplate]="attachmentTemplate"\n [user]="user"\n (executeAction)="dispatchAction($event)"\n (resize)="anchor.scrollToBottom()"\n (navigate)="this.autoScroll = false"\n >\n </kendo-chat-message-list>\n </div>\n\n <div class="k-message-box">\n <input\n #messageInput\n kendoChatFocusedState\n type="text"\n class="k-input"\n [placeholder]="textFor(\'messagePlaceholder\')"\n (keydown)="inputKeydown($event)"\n >\n <button\n kendoButton\n fillMode="flat"\n class="k-button-send"\n tabindex="-1"\n [attr.title]="textFor(\'send\')"\n (click)="sendClick()"\n ><svg version="1.1" xmlns="http://www.w3.org/2000/svg" x="0px" y="0px" viewBox="0 0 16 16"><path d="M0,14.3c-0.1,0.6,0.3,0.8,0.8,0.6l14.8-6.5c0.5-0.2,0.5-0.6,0-0.8L0.8,1.1C0.3,0.9-0.1,1.1,0,1.7l0.7,4.2C0.8,6.5,1.4,7,1.9,7.1l8.8,0.8c0.6,0.1,0.6,0.1,0,0.2L1.9,8.9C1.4,9,0.8,9.5,0.7,10.1L0,14.3z"/></svg></button>\n </div>\n '}),i.__metadata("design:paramtypes",[s.LocalizationService,r.NgZone])],t)}();e.ChatComponent=p},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n(6),r=function(){},o={reply:function(t,e){e.sendMessage.emit(new i.SendMessageEvent({author:e.user,text:t.value,timestamp:new Date}))},call:function(t){window.open("tel:"+t.value)},openUrl:function(t){window.open(t.value)}};e.makeHandler=function(t){return o[t.type]||r}},function(t,e){t.exports=r},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.packageMetadata={name:"@progress/kendo-angular-conversational-ui",productName:"Kendo UI for Angular",productCodes:["KENDOUIANGULAR","KENDOUICOMPLETE"],publishDate:1646217043,version:"",licensingDocsUrl:"https://www.telerik.com/kendo-angular-ui/my-license/?utm_medium=product&utm_source=kendoangular&utm_campaign=kendo-ui-angular-purchase-license-keys-warning"}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n(0),r=n(17),o=n(2),s=n(18),u=n(19),c=n(20),a=n(21),l=n(22),h=n(23),p=n(24),f=n(25),d=n(27),y=n(28),b=n(1),v=n(32),m=n(33),_=[o.ChatComponent,a.CustomMessagesComponent,o.AttachmentTemplateDirective,o.MessageTemplateDirective,h.HeroCardComponent],g=[r.AttachmentComponent,l.FocusedStateDirective,p.LocalizedMessagesDirective,f.MessageAttachmentsComponent,d.MessageComponent,y.MessageListComponent,o.MessageTemplateDirective,v.ScrollAnchorDirective,m.SuggestedActionsComponent],x=function(){function t(){}return t=i.__decorate([b.NgModule({declarations:_.concat(g),exports:[_],imports:[s.ButtonModule,u.CommonModule,c.ResizeSensorModule]})],t)}();e.ChatModule=x},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n(0),r=n(1),o=n(2),s=function(){function t(){}return Object.defineProperty(t.prototype,"attachment",{get:function(){return this._attachment},set:function(t){this._attachment=t,this.context={$implicit:this.attachment}},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"image",{get:function(){return 0===this.contentType.indexOf("image/")},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"unknown",{get:function(){return!this.image},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"contentType",{get:function(){return this.attachment.contentType||""},enumerable:!0,configurable:!0}),i.__decorate([r.Input(),i.__metadata("design:type",Object),i.__metadata("design:paramtypes",[Object])],t.prototype,"attachment",null),i.__decorate([r.Input(),i.__metadata("design:type",o.AttachmentTemplateDirective)],t.prototype,"template",void 0),t=i.__decorate([r.Component({selector:"kendo-chat-attachment",template:'\n <ng-container *ngIf="template">\n <ng-container *ngTemplateOutlet="template.templateRef; context: context;">\n </ng-container>\n </ng-container>\n\n <div *ngIf="!template" class="k-card">\n <div class="k-card-body">\n <h5 class="k-card-title" *ngIf="attachment.title">\n {{ attachment.title }}\n </h5>\n <h6 class="k-card-subtitle" *ngIf="attachment.subtitle">\n {{ attachment.subtitle }}\n </h6>\n <img *ngIf="image" [attr.src]="attachment.content" />\n <ng-container *ngIf="unknown">\n {{ attachment.content }}\n </ng-container>\n </div>\n </div>\n '})],t)}();e.AttachmentComponent=s},function(t,e){t.exports=o},function(t,e){t.exports=s},function(t,e){t.exports=u},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n(0),r=n(1),o=n(3),s=n(8),u=function(t){function e(e){var n=t.call(this)||this;return n.service=e,n}var n;return i.__extends(e,t),n=e,Object.defineProperty(e.prototype,"override",{get:function(){return!0},enumerable:!0,configurable:!0}),e=n=i.__decorate([r.Component({providers:[{provide:s.Messages,useExisting:r.forwardRef((function(){return n}))}],selector:"kendo-chat-messages",template:""}),i.__metadata("design:paramtypes",[o.LocalizationService])],e)}(s.Messages);e.CustomMessagesComponent=u},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n(0),r=n(1),o=function(){function t(){this.focused=!1}return t.prototype.onFocus=function(){this.focused=!0},t.prototype.onBlur=function(){this.focused=!1},i.__decorate([r.HostBinding("class.k-state-focused"),i.__metadata("design:type",Boolean)],t.prototype,"focused",void 0),i.__decorate([r.HostListener("focusin"),i.__metadata("design:type",Function),i.__metadata("design:paramtypes",[]),i.__metadata("design:returntype",void 0)],t.prototype,"onFocus",null),i.__decorate([r.HostListener("focusout"),i.__metadata("design:type",Function),i.__metadata("design:paramtypes",[]),i.__metadata("design:returntype",void 0)],t.prototype,"onBlur",null),t=i.__decorate([r.Directive({selector:"[kendoChatFocusedState]"})],t)}();e.FocusedStateDirective=o},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n(0),r=n(1),o=function(){function t(){this.cssClass=!0,this.executeAction=new r.EventEmitter}return t.prototype.onClick=function(t){this.executeAction.next(t)},i.__decorate([r.Input(),i.__metadata("design:type",String)],t.prototype,"imageUrl",void 0),i.__decorate([r.Input(),i.__metadata("design:type",String)],t.prototype,"title",void 0),i.__decorate([r.Input(),i.__metadata("design:type",String)],t.prototype,"subtitle",void 0),i.__decorate([r.Input(),i.__metadata("design:type",Array)],t.prototype,"actions",void 0),i.__decorate([r.HostBinding("class.k-card"),i.__metadata("design:type",Boolean)],t.prototype,"cssClass",void 0),i.__decorate([r.Output(),i.__metadata("design:type",r.EventEmitter)],t.prototype,"executeAction",void 0),t=i.__decorate([r.Component({selector:"kendo-chat-hero-card",template:'\n <img class="k-card-image" [src]="imageUrl" *ngIf="imageUrl" />\n <div class="k-card-body">\n <h5 class="k-card-title" *ngIf="title">\n {{ title }}\n </h5>\n <h6 class="k-card-subtitle" *ngIf="subtitle">\n {{ subtitle }}\n </h6>\n </div>\n <div class="k-card-actions k-card-actions-vertical">\n <span class="k-card-action"\n *ngFor="let act of actions"\n >\n <button\n kendoButton fillMode="flat"\n (click)="onClick(act)">\n {{ act.title }}\n </button>\n </span>\n </div>\n '})],t)}();e.HeroCardComponent=o},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n(0),r=n(1),o=n(3),s=n(8),u=function(t){function e(e){var n=t.call(this)||this;return n.service=e,n}var n;return i.__extends(e,t),n=e,e=n=i.__decorate([r.Directive({providers:[{provide:s.Messages,useExisting:r.forwardRef((function(){return n}))}],selector:"[kendoChatLocalizedMessages]"}),i.__metadata("design:paramtypes",[o.LocalizationService])],e)}(s.Messages);e.LocalizedMessagesDirective=u},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n(0),r=n(1),o=n(26),s=n(34),u=n(5),c=n(2),a=function(t){function e(e){var n,i,r=t.call(this)||this;return r.zone=e,r.scrollPosition=0,r.selectedIndex=0,r.carouselKeyHandlers=((n={})[37]=function(t){return r.navigateTo(t,-1)},n[39]=function(t){return r.navigateTo(t,1)},n),r.listKeyHandlers=((i={})[38]=function(t){return r.navigateTo(t,-1)},i[40]=function(t){return r.navigateTo(t,1)},i),r}var n;return i.__extends(e,t),n=e,Object.defineProperty(e.prototype,"carousel",{get:function(){return"list"!==this.layout},enumerable:!0,configurable:!0}),e.prototype.ngAfterViewInit=function(){var t=this;this.zone.runOutsideAngular((function(){t.scrollSubscription=o.fromEvent(t.deck.nativeElement,"scroll").pipe(s.debounceTime(100)).subscribe((function(){return t.onScroll()}))}))},e.prototype.ngOnDestroy=function(){this.scrollSubscription.unsubscribe()},e.prototype.isSelected=function(t){return this.selectedIndex===t},e.prototype.itemKeydown=function(t,e){var n=("list"===this.layout?this.listKeyHandlers:this.carouselKeyHandlers)[t.keyCode];n&&n(t,e)},e.prototype.itemClick=function(t){this.select(t)},e.prototype.focus=function(){this.select(this.selectedIndex)},e.prototype.scrollTo=function(t){var e=this.deck.nativeElement,n=e.scrollWidth/this.items.length,i=e.scrollWidth-e.offsetWidth,r=e.scrollLeft+n*t;e.scrollLeft=Math.max(0,Math.min(i,r))},e.prototype.select=function(t){this.selectedIndex=t;var e=this.items.toArray()[t];e&&e.nativeElement.focus()},e.prototype.navigateTo=function(t,e){var n=this.selectedIndex,i=Math.max(0,Math.min(n+e,this.items.length-1));i!==n&&(this.select(i),t.preventDefault())},e.prototype.onScroll=function(){var t=this,e=this.deck.nativeElement;if(0!==e.scrollWidth){var n=e.scrollLeft/(e.scrollWidth-e.offsetWidth);n!==this.scrollPosition&&this.zone.run((function(){t.scrollPosition=n}))}},i.__decorate([r.Input(),i.__metadata("design:type",Array)],e.prototype,"attachments",void 0),i.__decorate([r.Input(),i.__metadata("design:type",String)],e.prototype,"layout",void 0),i.__decorate([r.Input(),i.__metadata("design:type",Boolean)],e.prototype,"tabbable",void 0),i.__decorate([r.Input(),i.__metadata("design:type",c.AttachmentTemplateDirective)],e.prototype,"template",void 0),i.__decorate([r.HostBinding("class.k-card-deck-scrollwrap"),i.__metadata("design:type",Boolean),i.__metadata("design:paramtypes",[])],e.prototype,"carousel",null),i.__decorate([r.ViewChild("deck",{read:r.ElementRef,static:!0}),i.__metadata("design:type",r.ElementRef)],e.prototype,"deck",void 0),i.__decorate([r.ViewChildren("item",{read:r.ElementRef}),i.__metadata("design:type",r.QueryList)],e.prototype,"items",void 0),e=n=i.__decorate([r.Component({providers:[{provide:u.ChatItem,useExisting:r.forwardRef((function(){return n}))}],selector:"kendo-chat-message-attachments",template:'\n <button\n *ngIf="carousel && scrollPosition > 0"\n (click)="scrollTo(-1)"\n class="k-button k-icon-button k-button-md k-rounded-md k-button-solid k-button-solid-base"\n tabindex="-1">\n <span class="k-icon k-button-icon k-i-arrow-chevron-left"></span>\n </button>\n <div #deck [class.k-card-deck]="carousel">\n <kendo-chat-attachment #item\n *ngFor="let att of attachments; index as index; first as first; last as last"\n [attachment]="att"\n [template]="template"\n [class.k-state-selected]="isSelected(index)"\n [class.k-state-focused]="isSelected(index)"\n [class.k-card-wrap]="true"\n [class.k-first]="first"\n [class.k-last]="last"\n [attr.tabindex]="tabbable && isSelected(index) ? \'0\' : \'-1\'"\n (click)="itemClick(index)"\n (keydown)="itemKeydown($event, att)"\n >\n </kendo-chat-attachment>\n </div>\n <button\n *ngIf="carousel && scrollPosition < 1"\n (click)="scrollTo(1)"\n class="k-button k-icon-button k-button-md k-rounded-md k-button-solid k-button-solid-base"\n tabindex="-1">\n <span class="k-icon k-button-icon k-i-arrow-chevron-right"></span>\n </button>\n '}),i.__metadata("design:paramtypes",[r.NgZone])],e)}(u.ChatItem);e.MessageAttachmentsComponent=a},function(t,e){t.exports=c},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n(0),r=n(1),o=n(5),s=n(4),u=n(9),c=function(t){function e(e,n){var i=t.call(this)||this;return i.element=e,i.intl=n,i.cssClass=!0,i}var n;return i.__extends(e,t),n=e,Object.defineProperty(e.prototype,"tabIndex",{get:function(){return this.tabbable?"0":"-1"},enumerable:!0,configurable:!0}),e.prototype.formatTimeStamp=function(t){return this.intl.formatDate(t,{datetime:"short"})},e.prototype.focus=function(){this.element.nativeElement.focus()},i.__decorate([r.Input(),i.__metadata("design:type",Object)],e.prototype,"message",void 0),i.__decorate([r.Input(),i.__metadata("design:type",Boolean)],e.prototype,"tabbable",void 0),i.__decorate([r.Input(),i.__metadata("design:type",s.MessageTemplateDirective)],e.prototype,"template",void 0),i.__decorate([r.HostBinding("class.k-message"),i.__metadata("design:type",Boolean)],e.prototype,"cssClass",void 0),i.__decorate([r.HostBinding("class.k-state-selected"),r.HostBinding("class.k-state-focused"),i.__metadata("design:type",Boolean)],e.prototype,"selected",void 0),i.__decorate([r.HostBinding("attr.tabIndex"),i.__metadata("design:type",String),i.__metadata("design:paramtypes",[])],e.prototype,"tabIndex",null),e=n=i.__decorate([r.Component({selector:"kendo-chat-message",providers:[{provide:o.ChatItem,useExisting:r.forwardRef((function(){return n}))}],template:'\n <time\n [attr.aria-hidden]="!selected"\n class="k-message-time"\n *ngIf="message.timestamp"\n >\n {{ formatTimeStamp(message.timestamp) }}\n </time>\n\n <ng-container *ngIf="!message.typing; else typing">\n <div class="k-bubble" *ngIf="template">\n <ng-container\n *ngTemplateOutlet="template.templateRef; context: { $implicit: message };"\n >\n </ng-container>\n </div>\n\n <div class="k-bubble" *ngIf="!template && message.text">\n {{message.text}}\n </div>\n </ng-container>\n\n <span\n class="k-message-status"\n *ngIf="message.status"\n >\n {{ message.status }}\n </span>\n\n <ng-template #typing>\n <div class="k-bubble">\n <div class="k-typing-indicator">\n <span></span>\n <span></span>\n <span></span>\n </div>\n </div>\n </ng-template>\n '}),i.__metadata("design:paramtypes",[r.ElementRef,u.IntlService])],e)}(o.ChatItem);e.MessageComponent=c},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n(0),r=n(1),o=n(10),s=n(30),u=n(5),c=n(31),a=n(2),l=n(4),h=n(9),p=function(){function t(t,e){var n,i=this;this.element=t,this.intl=e,this.executeAction=new r.EventEmitter,this.navigate=new r.EventEmitter,this.resize=new r.EventEmitter,this.cssClass=!0,this.view=[],this.keyActions=((n={})[38]=function(t){return i.navigateTo(t,-1)},n[40]=function(t){return i.navigateTo(t,1)},n)}return Object.defineProperty(t.prototype,"messages",{get:function(){return this._messages},set:function(t){var e=t||[];this.view=c.chatView(e),this._messages=e},enumerable:!0,configurable:!0}),t.prototype.ngAfterViewInit=function(){this.selectedItem=this.items.last},t.prototype.onResize=function(){this.resize.emit()},t.prototype.formatTimeStamp=function(t){return this.intl.formatDate(t,{date:"full"})},t.prototype.onKeydown=function(t){var e=this.keyActions[t.keyCode];e&&e(t)},t.prototype.onBlur=function(t){var e=this,n=t.relatedTarget||document.activeElement;!s.closest(n,(function(t){return t===e.element.nativeElement}))&&this.select(null)},t.prototype.isOwnMessage=function(t){return c.isAuthor(this.user,t)},t.prototype.dispatchAction=function(t,e){var n=new o.ExecuteActionEvent(t,e);this.executeAction.emit(n)},t.prototype.trackGroup=function(t,e){return e.trackBy},t.prototype.select=function(t){var e=this.selectedItem;e&&(e.selected=!1),t&&(t.selected=!0,this.selectedItem=t)},t.prototype.last=function(t){if(t&&0!==t.length)return t[t.length-1]},t.prototype.navigateTo=function(t,e){var n=this.items.toArray(),i=this.selectedItem,r=n.indexOf(i),o=n[Math.max(0,Math.min(r+e,this.items.length-1))];o!==i&&(this.select(o),o.focus(),this.navigate.emit(),t.preventDefault())},i.__decorate([r.Input(),i.__metadata("design:type",Array),i.__metadata("design:paramtypes",[Array])],t.prototype,"messages",null),i.__decorate([r.Input(),i.__metadata("design:type",a.AttachmentTemplateDirective)],t.prototype,"attachmentTemplate",void 0),i.__decorate([r.Input(),i.__metadata("design:type",l.MessageTemplateDirective)],t.prototype,"messageTemplate",void 0),i.__decorate([r.Input(),i.__metadata("design:type",Object)],t.prototype,"user",void 0),i.__decorate([r.Output(),i.__metadata("design:type",r.EventEmitter)],t.prototype,"executeAction",void 0),i.__decorate([r.Output(),i.__metadata("design:type",r.EventEmitter)],t.prototype,"navigate",void 0),i.__decorate([r.Output(),i.__metadata("design:type",r.EventEmitter)],t.prototype,"resize",void 0),i.__decorate([r.ViewChildren(u.ChatItem),i.__metadata("design:type",r.QueryList)],t.prototype,"items",void 0),i.__decorate([r.HostBinding("class.k-message-list-content"),i.__metadata("design:type",Boolean)],t.prototype,"cssClass",void 0),i.__decorate([r.HostListener("keydown",["$event"]),i.__metadata("design:type",Function),i.__metadata("design:paramtypes",[Object]),i.__metadata("design:returntype",void 0)],t.prototype,"onKeydown",null),i.__decorate([r.HostListener("focusout",["$event"]),i.__metadata("design:type",Function),i.__metadata("design:paramtypes",[FocusEvent]),i.__metadata("design:returntype",void 0)],t.prototype,"onBlur",null),t=i.__decorate([r.Component({selector:"kendo-chat-message-list",template:'\n <ng-container *ngFor="let group of view; last as lastGroup; trackBy: trackGroup">\n <ng-container [ngSwitch]="group.type">\n <div\n *ngSwitchCase="\'date-marker\'"\n class="k-timestamp"\n >\n {{ formatTimeStamp(group.timestamp) }}\n </div>\n <div\n *ngSwitchCase="\'message-group\'"\n class="k-message-group"\n [class.k-alt]="isOwnMessage(group.messages[0])"\n [class.k-no-avatar]="!group.author.avatarUrl"\n >\n <img\n *ngIf="group.author.avatarUrl"\n [attr.src]="group.author.avatarUrl"\n class="k-avatar"\n />\n <p *ngIf="group.author.name" class="k-author">{{ group.author.name }}</p>\n <ng-container\n *ngFor="let msg of group.messages; first as firstMessage; last as lastMessage"\n >\n <img *ngIf="msg.user?.avatarUrl" [src]="msg.user?.avatarUrl" class="k-avatar">\n <kendo-chat-message #message\n [message]="msg"\n [tabbable]="lastGroup && lastMessage"\n [template]="messageTemplate"\n (click)="select(message)"\n (focus)="select(message)"\n [class.k-only]="group.messages.length === 1"\n [class.k-first]="group.messages.length > 1 && firstMessage"\n [class.k-last]="group.messages.length > 1 && lastMessage"\n >\n </kendo-chat-message>\n\n <kendo-chat-attachment\n *ngIf="msg.attachments && msg.attachments.length === 1"\n [attachment]="msg.attachments[0]"\n [template]="attachmentTemplate"\n >\n </kendo-chat-attachment>\n </ng-container>\n </div>\n\n <kendo-chat-message-attachments #attachments\n *ngSwitchCase="\'attachment-group\'"\n [attachments]="group.attachments"\n [layout]="group.attachmentLayout"\n [tabbable]="lastGroup"\n [template]="attachmentTemplate"\n (click)="select(attachments)"\n (focus)="select(attachments)"\n >\n </kendo-chat-message-attachments>\n\n <kendo-chat-suggested-actions #actions\n *ngSwitchCase="\'action-group\'"\n [actions]="group.actions"\n [tabbable]="lastGroup"\n (dispatch)="dispatchAction($event, last(group.messages))"\n (click)="select(actions)"\n (focus)="select(actions)"\n >\n </kendo-chat-suggested-actions>\n </ng-container>\n </ng-container>\n <kendo-resize-sensor (resize)="onResize()">\n </kendo-resize-sensor>\n '}),i.__metadata("design:paramtypes",[r.ElementRef,h.IntlService])],t)}();e.MessageListComponent=p},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=function(){function t(){this.prevented=!1}return t.prototype.preventDefault=function(){this.prevented=!0},t.prototype.isDefaultPrevented=function(){return this.prevented},t}();e.PreventableEvent=i},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.closest=function(t,e){for(;t&&!e(t);)t=t.parentNode;return t}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n(1);e.isAuthor=function(t,e){return t&&e.author&&t.id===e.author.id};var r=function(t){return t[t.length-1]},o=function(t){return function(n,o,s){var u=s===t-1;return function(t,e){var n,i,o=e.timestamp,s=r(t);if(o&&(!s||(n=o,i=s.timestamp,n&&i&&(i.getDate()!==n.getDate()||i.getMonth()!==n.getMonth()||i.getFullYear()!==n.getFullYear())))){var u={type:"date-marker",timestamp:o,trackBy:o.getTime()};t.push(u)}}(n,o),function(t,n,o){var s,u=r(t);if(i.isDevMode()&&!n.author)throw new Error("Author must be set for message: "+JSON.stringify(n));n.typing&&!o||(u&&"message-group"===u.type&&(s=u.messages),s&&e.isAuthor(n.author,r(s))?s.push(n):t.push({type:"message-group",messages:[n],author:n.author,timestamp:n.timestamp,trackBy:n}))}(n,o,u),o.attachments&&o.attachments.length>1&&n.push({type:"attachment-group",attachments:o.attachments,attachmentLayout:o.attachmentLayout,timestamp:o.timestamp,trackBy:o}),o.suggestedActions&&u&&n.push({type:"action-group",actions:o.suggestedActions,timestamp:o.timestamp,trackBy:o}),n}};e.chatView=function(t){return t.reduce(o(t.length),[])}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n(0),r=n(1),o=function(){function t(t,e,n){this.element=t,this.zone=e,this.renderer=n,this.autoScroll=!0,this.autoScrollChange=new r.EventEmitter,this.overflowAnchor="none",this.scrolling=!1}return t.prototype.ngOnInit=function(){var t=this;this.zone.runOutsideAngular((function(){t.unsubscribe=t.renderer.listen(t.element.nativeElement,"scroll",(function(){return t.onScroll()}))}))},t.prototype.ngAfterViewInit=function(){this.scrollToBottom()},t.prototype.ngOnDestroy=function(){this.unsubscribe&&this.unsubscribe()},t.prototype.onScroll=function(){var t=this;if(!this.scrolling){var e=this.element.nativeElement,n=e.scrollTop+e.offsetHeight,i=e.scrollHeight-n<2;this.autoScroll!==i&&this.zone.run((function(){t.autoScroll=i,t.autoScrollChange.emit(t.autoScroll)}))}},t.prototype.scrollToBottom=function(){var t=this;if(this.autoScroll){var e=this.element.nativeElement;e.scrollTop=e.scrollHeight-e.clientHeight,this.scrolling=!0,this.zone.runOutsideAngular((function(){return setTimeout((function(){return t.scrolling=!1}),1e3)}))}},i.__decorate([r.Input(),i.__metadata("design:type",Boolean)],t.prototype,"autoScroll",void 0),i.__decorate([r.Output(),i.__metadata("design:type",r.EventEmitter)],t.prototype,"autoScrollChange",void 0),i.__decorate([r.HostBinding("style.overflow-anchor"),i.__metadata("design:type",String)],t.prototype,"overflowAnchor",void 0),t=i.__decorate([r.Directive({selector:"[kendoChatScrollAnchor]",exportAs:"scrollAnchor"}),i.__metadata("design:paramtypes",[r.ElementRef,r.NgZone,r.Renderer2])],t)}();e.ScrollAnchorDirective=o},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n(0),r=n(1),o=n(5),s=function(t){function e(){var e,n=null!==t&&t.apply(this,arguments)||this;return n.dispatch=new r.EventEmitter,n.defaultClass=!0,n.selectedIndex=0,n.keyHandlers=((e={})[37]=function(t){return n.navigateTo(t,-1)},e[39]=function(t){return n.navigateTo(t,1)},e[13]=function(t,e){return n.actionClick(e)},e),n}var n;return i.__extends(e,t),n=e,e.prototype.isSelected=function(t){return this.selected&&this.selectedIndex===t},e.prototype.actionClick=function(t){this.dispatch.next(t)},e.prototype.actionKeydown=function(t,e){var n=this.keyHandlers[t.keyCode];n&&n(t,e)},e.prototype.focus=function(){this.select(this.selectedIndex)},e.prototype.select=function(t){this.selectedIndex=t;var e=this.items.toArray()[t];e&&e.nativeElement.focus()},e.prototype.navigateTo=function(t,e){var n=this.selectedIndex,i=Math.max(0,Math.min(n+e,this.items.length-1));i!==n&&(this.select(i),t.preventDefault())},i.__decorate([r.Input(),i.__metadata("design:type",Array)],e.prototype,"actions",void 0),i.__decorate([r.Input(),i.__metadata("design:type",Boolean)],e.prototype,"tabbable",void 0),i.__decorate([r.Output(),i.__metadata("design:type",r.EventEmitter)],e.prototype,"dispatch",void 0),i.__decorate([r.HostBinding("class.k-quick-replies"),i.__metadata("design:type",Boolean)],e.prototype,"defaultClass",void 0),i.__decorate([r.ViewChildren("item"),i.__metadata("design:type",r.QueryList)],e.prototype,"items",void 0),e=n=i.__decorate([r.Component({selector:"kendo-chat-suggested-actions",providers:[{provide:o.ChatItem,useExisting:r.forwardRef((function(){return n}))}],template:'\n <span #item\n *ngFor="let action of actions; index as index; first as first; last as last"\n class="k-quick-reply"\n [class.k-state-selected]="isSelected(index)"\n [class.k-state-focused]="isSelected(index)"\n [class.k-first]="first"\n [class.k-last]="last"\n [attr.tabindex]="tabbable && selectedIndex === index ? \'0\' : \'-1\'"\n (click)="actionClick(action)"\n (keydown)="actionKeydown($event, action)"\n >\n {{ action.title || action.value }}\n </span>\n '})],e)}(o.ChatItem);e.SuggestedActionsComponent=s},function(t,e,n){"use strict";n.r(e),n.d(e,"audit",(function(){return D})),n.d(e,"auditTime",(function(){return Y})),n.d(e,"buffer",(function(){return K})),n.d(e,"bufferCount",(function(){return Q})),n.d(e,"bufferTime",(function(){return tt})),n.d(e,"bufferToggle",(function(){return ut})),n.d(e,"bufferWhen",(function(){return lt})),n.d(e,"catchError",(function(){return ft})),n.d(e,"combineAll",(function(){return gt})),n.d(e,"combineLatest",(function(){return wt})),n.d(e,"concat",(function(){return Bt})),n.d(e,"concatAll",(function(){return Pt})),n.d(e,"concatMap",(function(){return zt})),n.d(e,"concatMapTo",(function(){return Ft})),n.d(e,"count",(function(){return Rt})),n.d(e,"debounce",(function(){return Lt})),n.d(e,"debounceTime",(function(){return Yt})),n.d(e,"defaultIfEmpty",(function(){return Qt})),n.d(e,"delay",(function(){return re})),n.d(e,"delayWhen",(function(){return ce})),n.d(e,"dematerialize",(function(){return fe})),n.d(e,"distinct",(function(){return be})),n.d(e,"distinctUntilChanged",(function(){return _e})),n.d(e,"distinctUntilKeyChanged",(function(){return we})),n.d(e,"elementAt",(function(){return ze})),n.d(e,"endWith",(function(){return Fe})),n.d(e,"every",(function(){return Re})),n.d(e,"exhaust",(function(){return Le})),n.d(e,"exhaustMap",(function(){return Ye})),n.d(e,"expand",(function(){return $e})),n.d(e,"filter",(function(){return ke})),n.d(e,"finalize",(function(){return Je})),n.d(e,"find",(function(){return en})),n.d(e,"findIndex",(function(){return on})),n.d(e,"first",(function(){return sn})),n.d(e,"groupBy",(function(){return fn})),n.d(e,"ignoreElements",(function(){return _n})),n.d(e,"isEmpty",(function(){return wn})),n.d(e,"last",(function(){return In})),n.d(e,"map",(function(){return Et})),n.d(e,"mapTo",(function(){return Nn})),n.d(e,"materialize",(function(){return Vn})),n.d(e,"max",(function(){return Fn})),n.d(e,"merge",(function(){return Wn})),n.d(e,"mergeAll",(function(){return Mt})),n.d(e,"mergeMap",(function(){return Ot})),n.d(e,"flatMap",(function(){return Ot})),n.d(e,"mergeMapTo",(function(){return Hn})),n.d(e,"mergeScan",(function(){return Ln})),n.d(e,"min",(function(){return Yn})),n.d(e,"multicast",(function(){return Xn})),n.d(e,"observeOn",(function(){return ei})),n.d(e,"onErrorResumeNext",(function(){return oi})),n.d(e,"pairwise",(function(){return ci})),n.d(e,"partition",(function(){return pi})),n.d(e,"pluck",(function(){return fi})),n.d(e,"publish",(function(){return yi})),n.d(e,"publishBehavior",(function(){return vi})),n.d(e,"publishLast",(function(){return _i})),n.d(e,"publishReplay",(function(){return Ci})),n.d(e,"race",(function(){return Ii})),n.d(e,"reduce",(function(){return zn})),n.d(e,"repeat",(function(){return Ni})),n.d(e,"repeatWhen",(function(){return Vi})),n.d(e,"retry",(function(){return Pi})),n.d(e,"retryWhen",(function(){return zi})),n.d(e,"refCount",(function(){return Kn})),n.d(e,"sample",(function(){return Wi})),n.d(e,"sampleTime",(function(){return qi})),n.d(e,"scan",(function(){return Pn})),n.d(e,"sequenceEqual",(function(){return Gi})),n.d(e,"share",(function(){return Xi})),n.d(e,"shareReplay",(function(){return tr})),n.d(e,"single",(function(){return er})),n.d(e,"skip",(function(){return rr})),n.d(e,"skipLast",(function(){return ur})),n.d(e,"skipUntil",(function(){return lr})),n.d(e,"skipWhile",(function(){return fr})),n.d(e,"startWith",(function(){return br})),n.d(e,"subscribeOn",(function(){return Cr})),n.d(e,"switchAll",(function(){return Nr})),n.d(e,"switchMap",(function(){return Tr})),n.d(e,"switchMapTo",(function(){return Or})),n.d(e,"take",(function(){return Pe})),n.d(e,"takeLast",(function(){return kn})),n.d(e,"takeUntil",(function(){return Ar})),n.d(e,"takeWhile",(function(){return Mr})),n.d(e,"tap",(function(){return Ie})),n.d(e,"throttle",(function(){return zr})),n.d(e,"throttleTime",(function(){return Wr})),n.d(e,"throwIfEmpty",(function(){return je})),n.d(e,"timeInterval",(function(){return Ur})),n.d(e,"timeout",(function(){return Jr})),n.d(e,"timeoutWith",(function(){return $r})),n.d(e,"timestamp",(function(){return Xr})),n.d(e,"toArray",(function(){return no})),n.d(e,"window",(function(){return io})),n.d(e,"windowCount",(function(){return so})),n.d(e,"windowTime",(function(){return ao})),n.d(e,"windowToggle",(function(){return vo})),n.d(e,"windowWhen",(function(){return go})),n.d(e,"withLatestFrom",(function(){return So})),n.d(e,"zip",(function(){return Vo})),n.d(e,"zipAll",(function(){return jo}));var i=n(0);function r(t){return"function"==typeof t}var o=!1,s={Promise:void 0,set useDeprecatedSynchronousErrorHandling(t){t&&(new Error).stack;o=t},get useDeprecatedSynchronousErrorHandling(){return o}};function u(t){setTimeout((function(){throw t}))}var c={closed:!0,next:function(t){},error:function(t){if(s.useDeprecatedSynchronousErrorHandling)throw t;u(t)},complete:function(){}},a=Array.isArray||function(t){return t&&"number"==typeof t.length};function l(t){return null!==t&&"object"==typeof t}function h(t){return Error.call(this),this.message=t?t.length+" errors occurred during unsubscription:\n"+t.map((function(t,e){return e+1+") "+t.toString()})).join("\n "):"",this.name="UnsubscriptionError",this.errors=t,this}h.prototype=Object.create(Error.prototype);var p=h,f=function(){function t(t){this.closed=!1,this._parent=null,this._parents=null,this._subscriptions=null,t&&(this._unsubscribe=t)}return t.prototype.unsubscribe=function(){var t,e=!1;if(!this.closed){var n=this._parent,i=this._parents,o=this._unsubscribe,s=this._subscriptions;this.closed=!0,this._parent=null,this._parents=null,this._subscriptions=null;for(var u=-1,c=i?i.length:0;n;)n.remove(this),n=++u<c&&i[u]||null;if(r(o))try{o.call(this)}catch(n){e=!0,t=n instanceof p?d(n.errors):[n]}if(a(s))for(u=-1,c=s.length;++u<c;){var h=s[u];if(l(h))try{h.unsubscribe()}catch(n){e=!0,t=t||[],n instanceof p?t=t.concat(d(n.errors)):t.push(n)}}if(e)throw new p(t)}},t.prototype.add=function(e){var n=e;switch(typeof e){case"function":n=new t(e);case"object":if(n===this||n.closed||"function"!=typeof n.unsubscribe)return n;if(this.closed)return n.unsubscribe(),n;if(!(n instanceof t)){var i=n;(n=new t)._subscriptions=[i]}break;default:if(!e)return t.EMPTY;throw new Error("unrecognized teardown "+e+" added to Subscription.")}if(n._addParent(this)){var r=this._subscriptions;r?r.push(n):this._subscriptions=[n]}return n},t.prototype.remove=function(t){var e=this._subscriptions;if(e){var n=e.indexOf(t);-1!==n&&e.splice(n,1)}},t.prototype._addParent=function(t){var e=this._parent,n=this._parents;return e!==t&&(e?n?-1===n.indexOf(t)&&(n.push(t),!0):(this._parents=[t],!0):(this._parent=t,!0))},t.EMPTY=function(t){return t.closed=!0,t}(new t),t}();function d(t){return t.reduce((function(t,e){return t.concat(e instanceof p?e.errors:e)}),[])}var y="function"==typeof Symbol?Symbol("rxSubscriber"):"@@rxSubscriber_"+Math.random(),b=function(t){function e(n,i,r){var o=t.call(this)||this;switch(o.syncErrorValue=null,o.syncErrorThrown=!1,o.syncErrorThrowable=!1,o.isStopped=!1,arguments.length){case 0:o.destination=c;break;case 1:if(!n){o.destination=c;break}if("object"==typeof n){n instanceof e?(o.syncErrorThrowable=n.syncErrorThrowable,o.destination=n,n.add(o)):(o.syncErrorThrowable=!0,o.destination=new v(o,n));break}default:o.syncErrorThrowable=!0,o.destination=new v(o,n,i,r)}return o}return i.__extends(e,t),e.prototype[y]=function(){return this},e.create=function(t,n,i){var r=new e(t,n,i);return r.syncErrorThrowable=!1,r},e.prototype.next=function(t){this.isStopped||this._next(t)},e.prototype.error=function(t){this.isStopped||(this.isStopped=!0,this._error(t))},e.prototype.complete=function(){this.isStopped||(this.isStopped=!0,this._complete())},e.prototype.unsubscribe=function(){this.closed||(this.isStopped=!0,t.prototype.unsubscribe.call(this))},e.prototype._next=function(t){this.destination.next(t)},e.prototype._error=function(t){this.destination.error(t),this.unsubscribe()},e.prototype._complete=function(){this.destination.complete(),this.unsubscribe()},e.prototype._unsubscribeAndRecycle=function(){var t=this._parent,e=this._parents;return this._parent=null,this._parents=null,this.unsubscribe(),this.closed=!1,this.isStopped=!1,this._parent=t,this._parents=e,this},e}(f),v=function(t){function e(e,n,i,o){var s,u=t.call(this)||this;u._parentSubscriber=e;var a=u;return r(n)?s=n:n&&(s=n.next,i=n.error,o=n.complete,n!==c&&(r((a=Object.create(n)).unsubscribe)&&u.add(a.unsubscribe.bind(a)),a.unsubscribe=u.unsubscribe.bind(u))),u._context=a,u._next=s,u._error=i,u._complete=o,u}return i.__extends(e,t),e.prototype.next=function(t){if(!this.isStopped&&this._next){var e=this._parentSubscriber;s.useDeprecatedSynchronousErrorHandling&&e.syncErrorThrowable?this.__tryOrSetError(e,this._next,t)&&this.unsubscribe():this.__tryOrUnsub(this._next,t)}},e.prototype.error=function(t){if(!this.isStopped){var e=this._parentSubscriber,n=s.useDeprecatedSynchronousErrorHandling;if(this._error)n&&e.syncErrorThrowable?(this.__tryOrSetError(e,this._error,t),this.unsubscribe()):(this.__tryOrUnsub(this._error,t),this.unsubscribe());else if(e.syncErrorThrowable)n?(e.syncErrorValue=t,e.syncErrorThrown=!0):u(t),this.unsubscribe();else{if(this.unsubscribe(),n)throw t;u(t)}}},e.prototype.complete=function(){var t=this;if(!this.isStopped){var e=this._parentSubscriber;if(this._complete){var n=function(){return t._complete.call(t._context)};s.useDeprecatedSynchronousErrorHandling&&e.syncErrorThrowable?(this.__tryOrSetError(e,n),this.unsubscribe()):(this.__tryOrUnsub(n),this.unsubscribe())}else this.unsubscribe()}},e.prototype.__tryOrUnsub=function(t,e){try{t.call(this._context,e)}catch(t){if(this.unsubscribe(),s.useDeprecatedSynchronousErrorHandling)throw t;u(t)}},e.prototype.__tryOrSetError=function(t,e,n){if(!s.useDeprecatedSynchronousErrorHandling)throw new Error("bad call");try{e.call(this._context,n)}catch(e){return s.useDeprecatedSynchronousErrorHandling?(t.syncErrorValue=e,t.syncErrorThrown=!0,!0):(u(e),!0)}return!1},e.prototype._unsubscribe=function(){var t=this._parentSubscriber;this._context=null,this._parentSubscriber=null,t.unsubscribe()},e}(b),m=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return i.__extends(e,t),e.prototype.notifyNext=function(t,e,n,i,r){this.destination.next(e)},e.prototype.notifyError=function(t,e){this.destination.error(t)},e.prototype.notifyComplete=function(t){this.destination.complete()},e}(b),_=function(t){function e(e,n,i){var r=t.call(this)||this;return r.parent=e,r.outerValue=n,r.outerIndex=i,r.index=0,r}return i.__extends(e,t),e.prototype._next=function(t){this.parent.notifyNext(this.outerValue,t,this.outerIndex,this.index++,this)},e.prototype._error=function(t){this.parent.notifyError(t,this),this.unsubscribe()},e.prototype._complete=function(){this.parent.notifyComplete(this),this.unsubscribe()},e}(b);var g="function"==typeof Symbol&&Symbol.observable||"@@observable";function x(){}function w(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return S(t)}function S(t){return t?1===t.length?t[0]:function(e){return t.reduce((function(t,e){return e(t)}),e)}:x}var C=function(){function t(t){this._isScalar=!1,t&&(this._subscribe=t)}return t.prototype.lift=function(e){var n=new t;return n.source=this,n.operator=e,n},t.prototype.subscribe=function(t,e,n){var i=this.operator,r=function(t,e,n){if(t){if(t instanceof b)return t;if(t[y])return t[y]()}return t||e||n?new b(t,e,n):new b(c)}(t,e,n);if(i?r.add(i.call(r,this.source)):r.add(this.source||s.useDeprecatedSynchronousErrorHandling&&!r.syncErrorThrowable?this._subscribe(r):this._trySubscribe(r)),s.useDeprecatedSynchronousErrorHandling&&r.syncErrorThrowable&&(r.syncErrorThrowable=!1,r.syncErrorThrown))throw r.syncErrorValue;return r},t.prototype._trySubscribe=function(t){try{return this._subscribe(t)}catch(e){s.useDeprecatedSynchronousErrorHandling&&(t.syncErrorThrown=!0,t.syncErrorValue=e),!function(t){for(;t;){var e=t,n=e.closed,i=e.destination,r=e.isStopped;if(n||r)return!1;t=i&&i instanceof b?i:null}return!0}(t)?console.warn(e):t.error(e)}},t.prototype.forEach=function(t,e){var n=this;return new(e=k(e))((function(e,i){var r;r=n.subscribe((function(e){try{t(e)}catch(t){i(t),r&&r.unsubscribe()}}),i,e)}))},t.prototype._subscribe=function(t){var e=this.source;return e&&e.subscribe(t)},t.prototype[g]=function(){return this},t.prototype.pipe=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return 0===t.length?this:S(t)(this)},t.prototype.toPromise=function(t){var e=this;return new(t=k(t))((function(t,n){var i;e.subscribe((function(t){return i=t}),(function(t){return n(t)}),(function(){return t(i)}))}))},t.create=function(e){return new t(e)},t}();function k(t){if(t||(t=s.Promise||Promise),!t)throw new Error("no Promise impl found");return t}var T=function(t){return function(e){for(var n=0,i=t.length;n<i&&!e.closed;n++)e.next(t[n]);e.closed||e.complete()}},E=function(t){return function(e){return t.then((function(t){e.closed||(e.next(t),e.complete())}),(function(t){return e.error(t)})).then(null,u),e}};function I(){return"function"==typeof Symbol&&Symbol.iterator?Symbol.iterator:"@@iterator"}var N=I(),O=function(t){return function(e){for(var n=t[N]();;){var i=n.next();if(i.done){e.complete();break}if(e.next(i.value),e.closed)break}return"function"==typeof n.return&&e.add((function(){n.return&&n.return()})),e}},A=function(t){return function(e){var n=t[g]();if("function"!=typeof n.subscribe)throw new TypeError("Provided object does not correctly implement Symbol.observable");return n.subscribe(e)}},V=function(t){return t&&"number"==typeof t.length&&"function"!=typeof t};function j(t){return!!t&&"function"!=typeof t.subscribe&&"function"==typeof t.then}var M=function(t){if(t instanceof C)return function(e){return t._isScalar?(e.next(t.value),void e.complete()):t.subscribe(e)};if(t&&"function"==typeof t[g])return A(t);if(V(t))return T(t);if(j(t))return E(t);if(t&&"function"==typeof t[N])return O(t);var e=l(t)?"an invalid object":"'"+t+"'";throw new TypeError("You provided "+e+" where a stream was expected. You can provide an Observable, Promise, Array, or Iterable.")};function P(t,e,n,i,r){if(void 0===r&&(r=new _(t,n,i)),!r.closed)return M(e)(r)}function D(t){return function(e){return e.lift(new B(t))}}var B=function(){function t(t){this.durationSelector=t}return t.prototype.call=function(t,e){return e.subscribe(new z(t,this.durationSelector))},t}(),z=function(t){function e(e,n){var i=t.call(this,e)||this;return i.durationSelector=n,i.hasValue=!1,i}return i.__extends(e,t),e.prototype._next=function(t){if(this.value=t,this.hasValue=!0,!this.throttled){var e=void 0;try{e=(0,this.durationSelector)(t)}catch(t){return this.destination.error(t)}var n=P(this,e);!n||n.closed?this.clearThrottle():this.add(this.throttled=n)}},e.prototype.clearThrottle=function(){var t=this.value,e=this.hasValue,n=this.throttled;n&&(this.remove(n),this.throttled=null,n.unsubscribe()),e&&(this.value=null,this.hasValue=!1,this.destination.next(t))},e.prototype.notifyNext=function(t,e,n,i){this.clearThrottle()},e.prototype.notifyComplete=function(){this.clearThrottle()},e}(m),F=function(t){function e(e,n){var i=t.call(this,e,n)||this;return i.scheduler=e,i.work=n,i.pending=!1,i}return i.__extends(e,t),e.prototype.schedule=function(t,e){if(void 0===e&&(e=0),this.closed)return this;this.state=t;var n=this.id,i=this.scheduler;return null!=n&&(this.id=this.recycleAsyncId(i,n,e)),this.pending=!0,this.delay=e,this.id=this.id||this.requestAsyncId(i,this.id,e),this},e.prototype.requestAsyncId=function(t,e,n){return void 0===n&&(n=0),setInterval(t.flush.bind(t,this),n)},e.prototype.recycleAsyncId=function(t,e,n){if(void 0===n&&(n=0),null!==n&&this.delay===n&&!1===this.pending)return e;clearInterval(e)},e.prototype.execute=function(t,e){if(this.closed)return new Error("executing a cancelled action");this.pending=!1;var n=this._execute(t,e);if(n)return n;!1===this.pending&&null!=this.id&&(this.id=this.recycleAsyncId(this.scheduler,this.id,null))},e.prototype._execute=function(t,e){var n=!1,i=void 0;try{this.work(t)}catch(t){n=!0,i=!!t&&t||new Error(t)}if(n)return this.unsubscribe(),i},e.prototype._unsubscribe=function(){var t=this.id,e=this.scheduler,n=e.actions,i=n.indexOf(this);this.work=null,this.state=null,this.pending=!1,this.scheduler=null,-1!==i&&n.splice(i,1),null!=t&&(this.id=this.recycleAsyncId(e,t,null)),this.delay=null},e}(function(t){function e(e,n){return t.call(this)||this}return i.__extends(e,t),e.prototype.schedule=function(t,e){return void 0===e&&(e=0),this},e}(f)),R=function(){function t(e,n){void 0===n&&(n=t.now),this.SchedulerAction=e,this.now=n}return t.prototype.schedule=function(t,e,n){return void 0===e&&(e=0),new this.SchedulerAction(this,t).schedule(n,e)},t.now=function(){return Date.now()},t}(),W=function(t){function e(n,i){void 0===i&&(i=R.now);var r=t.call(this,n,(function(){return e.delegate&&e.delegate!==r?e.delegate.now():i()}))||this;return r.actions=[],r.active=!1,r.scheduled=void 0,r}return i.__extends(e,t),e.prototype.schedule=function(n,i,r){return void 0===i&&(i=0),e.delegate&&e.delegate!==this?e.delegate.schedule(n,i,r):t.prototype.schedule.call(this,n,i,r)},e.prototype.flush=function(t){var e=this.actions;if(this.active)e.push(t);else{var n;this.active=!0;do{if(n=t.execute(t.state,t.delay))break}while(t=e.shift());if(this.active=!1,n){for(;t=e.shift();)t.unsubscribe();throw n}}},e}(R),H=new W(F);function L(t){return!a(t)&&t-parseFloat(t)+1>=0}function q(t){return t&&"function"==typeof t.schedule}function U(t){var e=t.index,n=t.period,i=t.subscriber;if(i.next(e),!i.closed){if(-1===n)return i.complete();t.index=e+1,this.schedule(t,n)}}function Y(t,e){return void 0===e&&(e=H),D((function(){return function(t,e,n){void 0===t&&(t=0);var i=-1;return L(e)?i=Number(e)<1?1:Number(e):q(e)&&(n=e),q(n)||(n=H),new C((function(e){var r=L(t)?t:+t-n.now();return n.schedule(U,r,{index:0,period:i,subscriber:e})}))}(t,e)}))}function K(t){return function(e){return e.lift(new G(t))}}var G=function(){function t(t){this.closingNotifier=t}return t.prototype.call=function(t,e){return e.subscribe(new $(t,this.closingNotifier))},t}(),$=function(t){function e(e,n){var i=t.call(this,e)||this;return i.buffer=[],i.add(P(i,n)),i}return i.__extends(e,t),e.prototype._next=function(t){this.buffer.push(t)},e.prototype.notifyNext=function(t,e,n,i,r){var o=this.buffer;this.buffer=[],this.destination.next(o)},e}(m);function Q(t,e){return void 0===e&&(e=null),function(n){return n.lift(new Z(t,e))}}var Z=function(){function t(t,e){this.bufferSize=t,this.startBufferEvery=e,this.subscriberClass=e&&t!==e?X:J}return t.prototype.call=function(t,e){return e.subscribe(new this.subscriberClass(t,this.bufferSize,this.startBufferEvery))},t}(),J=function(t){function e(e,n){var i=t.call(this,e)||this;return i.bufferSize=n,i.buffer=[],i}return i.__extends(e,t),e.prototype._next=function(t){var e=this.buffer;e.push(t),e.length==this.bufferSize&&(this.destination.next(e),this.buffer=[])},e.prototype._complete=function(){var e=this.buffer;e.length>0&&this.destination.next(e),t.prototype._complete.call(this)},e}(b),X=function(t){function e(e,n,i){var r=t.call(this,e)||this;return r.bufferSize=n,r.startBufferEvery=i,r.buffers=[],r.count=0,r}return i.__extends(e,t),e.prototype._next=function(t){var e=this.bufferSize,n=this.startBufferEvery,i=this.buffers,r=this.count;this.count++,r%n==0&&i.push([]);for(var o=i.length;o--;){var s=i[o];s.push(t),s.length===e&&(i.splice(o,1),this.destination.next(s))}},e.prototype._complete=function(){for(var e=this.buffers,n=this.destination;e.length>0;){var i=e.shift();i.length>0&&n.next(i)}t.prototype._complete.call(this)},e}(b);function tt(t){var e=arguments.length,n=H;q(arguments[arguments.length-1])&&(n=arguments[arguments.length-1],e--);var i=null;e>=2&&(i=arguments[1]);var r=Number.POSITIVE_INFINITY;return e>=3&&(r=arguments[2]),function(e){return e.lift(new et(t,i,r,n))}}var et=function(){function t(t,e,n,i){this.bufferTimeSpan=t,this.bufferCreationInterval=e,this.maxBufferSize=n,this.scheduler=i}return t.prototype.call=function(t,e){return e.subscribe(new it(t,this.bufferTimeSpan,this.bufferCreationInterval,this.maxBufferSize,this.scheduler))},t}(),nt=function(){return function(){this.buffer=[]}}(),it=function(t){function e(e,n,i,r,o){var s=t.call(this,e)||this;s.bufferTimeSpan=n,s.bufferCreationInterval=i,s.maxBufferSize=r,s.scheduler=o,s.contexts=[];var u=s.openContext();if(s.timespanOnly=null==i||i<0,s.timespanOnly){var c={subscriber:s,context:u,bufferTimeSpan:n};s.add(u.closeAction=o.schedule(rt,n,c))}else{var a={subscriber:s,context:u},l={bufferTimeSpan:n,bufferCreationInterval:i,subscriber:s,scheduler:o};s.add(u.closeAction=o.schedule(st,n,a)),s.add(o.schedule(ot,i,l))}return s}return i.__extends(e,t),e.prototype._next=function(t){for(var e,n=this.contexts,i=n.length,r=0;r<i;r++){var o=n[r],s=o.buffer;s.push(t),s.length==this.maxBufferSize&&(e=o)}e&&this.onBufferFull(e)},e.prototype._error=function(e){this.contexts.length=0,t.prototype._error.call(this,e)},e.prototype._complete=function(){for(var e=this.contexts,n=this.destination;e.length>0;){var i=e.shift();n.next(i.buffer)}t.prototype._complete.call(this)},e.prototype._unsubscribe=function(){this.contexts=null},e.prototype.onBufferFull=function(t){this.closeContext(t);var e=t.closeAction;if(e.unsubscribe(),this.remove(e),!this.closed&&this.timespanOnly){t=this.openContext();var n=this.bufferTimeSpan,i={subscriber:this,context:t,bufferTimeSpan:n};this.add(t.closeAction=this.scheduler.schedule(rt,n,i))}},e.prototype.openContext=function(){var t=new nt;return this.contexts.push(t),t},e.prototype.closeContext=function(t){this.destination.next(t.buffer);var e=this.contexts;(e?e.indexOf(t):-1)>=0&&e.splice(e.indexOf(t),1)},e}(b);function rt(t){var e=t.subscriber,n=t.context;n&&e.closeContext(n),e.closed||(t.context=e.openContext(),t.context.closeAction=this.schedule(t,t.bufferTimeSpan))}function ot(t){var e=t.bufferCreationInterval,n=t.bufferTimeSpan,i=t.subscriber,r=t.scheduler,o=i.openContext();i.closed||(i.add(o.closeAction=r.schedule(st,n,{subscriber:i,context:o})),this.schedule(t,e))}function st(t){var e=t.subscriber,n=t.context;e.closeContext(n)}function ut(t,e){return function(n){return n.lift(new ct(t,e))}}var ct=function(){function t(t,e){this.openings=t,this.closingSelector=e}return t.prototype.call=function(t,e){return e.subscribe(new at(t,this.openings,this.closingSelector))},t}(),at=function(t){function e(e,n,i){var r=t.call(this,e)||this;return r.openings=n,r.closingSelector=i,r.contexts=[],r.add(P(r,n)),r}return i.__extends(e,t),e.prototype._next=function(t){for(var e=this.contexts,n=e.length,i=0;i<n;i++)e[i].buffer.push(t)},e.prototype._error=function(e){for(var n=this.contexts;n.length>0;){var i=n.shift();i.subscription.unsubscribe(),i.buffer=null,i.subscription=null}this.contexts=null,t.prototype._error.call(this,e)},e.prototype._complete=function(){for(var e=this.contexts;e.length>0;){var n=e.shift();this.destination.next(n.buffer),n.subscription.unsubscribe(),n.buffer=null,n.subscription=null}this.contexts=null,t.prototype._complete.call(this)},e.prototype.notifyNext=function(t,e,n,i,r){t?this.closeBuffer(t):this.openBuffer(e)},e.prototype.notifyComplete=function(t){this.closeBuffer(t.context)},e.prototype.openBuffer=function(t){try{var e=this.closingSelector.call(this,t);e&&this.trySubscribe(e)}catch(t){this._error(t)}},e.prototype.closeBuffer=function(t){var e=this.contexts;if(e&&t){var n=t.buffer,i=t.subscription;this.destination.next(n),e.splice(e.indexOf(t),1),this.remove(i),i.unsubscribe()}},e.prototype.trySubscribe=function(t){var e=this.contexts,n=new f,i={buffer:[],subscription:n};e.push(i);var r=P(this,t,i);!r||r.closed?this.closeBuffer(i):(r.context=i,this.add(r),n.add(r))},e}(m);function lt(t){return function(e){return e.lift(new ht(t))}}var ht=function(){function t(t){this.closingSelector=t}return t.prototype.call=function(t,e){return e.subscribe(new pt(t,this.closingSelector))},t}(),pt=function(t){function e(e,n){var i=t.call(this,e)||this;return i.closingSelector=n,i.subscribing=!1,i.openBuffer(),i}return i.__extends(e,t),e.prototype._next=function(t){this.buffer.push(t)},e.prototype._complete=function(){var e=this.buffer;e&&this.destination.next(e),t.prototype._complete.call(this)},e.prototype._unsubscribe=function(){this.buffer=null,this.subscribing=!1},e.prototype.notifyNext=function(t,e,n,i,r){this.openBuffer()},e.prototype.notifyComplete=function(){this.subscribing?this.complete():this.openBuffer()},e.prototype.openBuffer=function(){var t=this.closingSubscription;t&&(this.remove(t),t.unsubscribe());var e,n=this.buffer;this.buffer&&this.destination.next(n),this.buffer=[];try{e=(0,this.closingSelector)()}catch(t){return this.error(t)}t=new f,this.closingSubscription=t,this.add(t),this.subscribing=!0,t.add(P(this,e)),this.subscribing=!1},e}(m);function ft(t){return function(e){var n=new dt(t),i=e.lift(n);return n.caught=i}}var dt=function(){function t(t){this.selector=t}return t.prototype.call=function(t,e){return e.subscribe(new yt(t,this.selector,this.caught))},t}(),yt=function(t){function e(e,n,i){var r=t.call(this,e)||this;return r.selector=n,r.caught=i,r}return i.__extends(e,t),e.prototype.error=function(e){if(!this.isStopped){var n=void 0;try{n=this.selector(e,this.caught)}catch(e){return void t.prototype.error.call(this,e)}this._unsubscribeAndRecycle();var i=new _(this,void 0,void 0);this.add(i),P(this,n,void 0,void 0,i)}},e}(m);function bt(t,e){return new C(e?function(n){var i=new f,r=0;return i.add(e.schedule((function(){r!==t.length?(n.next(t[r++]),n.closed||i.add(this.schedule())):n.complete()}))),i}:T(t))}var vt={};var mt=function(){function t(t){this.resultSelector=t}return t.prototype.call=function(t,e){return e.subscribe(new _t(t,this.resultSelector))},t}(),_t=function(t){function e(e,n){var i=t.call(this,e)||this;return i.resultSelector=n,i.active=0,i.values=[],i.observables=[],i}return i.__extends(e,t),e.prototype._next=function(t){this.values.push(vt),this.observables.push(t)},e.prototype._complete=function(){var t=this.observables,e=t.length;if(0===e)this.destination.complete();else{this.active=e,this.toRespond=e;for(var n=0;n<e;n++){var i=t[n];this.add(P(this,i,i,n))}}},e.prototype.notifyComplete=function(t){0==(this.active-=1)&&this.destination.complete()},e.prototype.notifyNext=function(t,e,n,i,r){var o=this.values,s=o[n],u=this.toRespond?s===vt?--this.toRespond:this.toRespond:0;o[n]=e,0===u&&(this.resultSelector?this._tryResultSelector(o):this.destination.next(o.slice()))},e.prototype._tryResultSelector=function(t){var e;try{e=this.resultSelector.apply(this,t)}catch(t){return void this.destination.error(t)}this.destination.next(e)},e}(m);function gt(t){return function(e){return e.lift(new mt(t))}}function xt(t,e){if(!e)return t instanceof C?t:new C(M(t));if(null!=t){if(function(t){return t&&"function"==typeof t[g]}(t))return function(t,e){return new C(e?function(n){var i=new f;return i.add(e.schedule((function(){var r=t[g]();i.add(r.subscribe({next:function(t){i.add(e.schedule((function(){return n.next(t)})))},error:function(t){i.add(e.schedule((function(){return n.error(t)})))},complete:function(){i.add(e.schedule((function(){return n.complete()})))}}))}))),i}:A(t))}(t,e);if(j(t))return function(t,e){return new C(e?function(n){var i=new f;return i.add(e.schedule((function(){return t.then((function(t){i.add(e.schedule((function(){n.next(t),i.add(e.schedule((function(){return n.complete()})))})))}),(function(t){i.add(e.schedule((function(){return n.error(t)})))}))}))),i}:E(t))}(t,e);if(V(t))return bt(t,e);if(function(t){return t&&"function"==typeof t[N]}(t)||"string"==typeof t)return function(t,e){if(!t)throw new Error("Iterable cannot be null");return new C(e?function(n){var i,r=new f;return r.add((function(){i&&"function"==typeof i.return&&i.return()})),r.add(e.schedule((function(){i=t[N](),r.add(e.schedule((function(){if(!n.closed){var t,e;try{var r=i.next();t=r.value,e=r.done}catch(t){return void n.error(t)}e?n.complete():(n.next(t),this.schedule())}})))}))),r}:O(t))}(t,e)}throw new TypeError((null!==t&&typeof t||t)+" is not observable")}function wt(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n=null;return"function"==typeof t[t.length-1]&&(n=t.pop()),1===t.length&&a(t[0])&&(t=t[0].slice()),function(e){return e.lift.call(xt([e].concat(t)),new mt(n))}}var St=new C((function(t){return t.complete()}));function Ct(t){return t?function(t){return new C((function(e){return t.schedule((function(){return e.complete()}))}))}(t):St}function kt(t){var e=new C((function(e){e.next(t),e.complete()}));return e._isScalar=!0,e.value=t,e}function Tt(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n=t[t.length-1];switch(q(n)?t.pop():n=void 0,t.length){case 0:return Ct(n);case 1:return n?bt(t,n):kt(t[0]);default:return bt(t,n)}}function Et(t,e){return function(n){if("function"!=typeof t)throw new TypeError("argument is not a function. Are you looking for `mapTo()`?");return n.lift(new It(t,e))}}var It=function(){function t(t,e){this.project=t,this.thisArg=e}return t.prototype.call=function(t,e){return e.subscribe(new Nt(t,this.project,this.thisArg))},t}(),Nt=function(t){function e(e,n,i){var r=t.call(this,e)||this;return r.project=n,r.count=0,r.thisArg=i||r,r}return i.__extends(e,t),e.prototype._next=function(t){var e;try{e=this.project.call(this.thisArg,t,this.count++)}catch(t){return void this.destination.error(t)}this.destination.next(e)},e}(b);function Ot(t,e,n){return void 0===n&&(n=Number.POSITIVE_INFINITY),"function"==typeof e?function(i){return i.pipe(Ot((function(n,i){return xt(t(n,i)).pipe(Et((function(t,r){return e(n,t,i,r)})))}),n))}:("number"==typeof e&&(n=e),function(e){return e.lift(new At(t,n))})}var At=function(){function t(t,e){void 0===e&&(e=Number.POSITIVE_INFINITY),this.project=t,this.concurrent=e}return t.prototype.call=function(t,e){return e.subscribe(new Vt(t,this.project,this.concurrent))},t}(),Vt=function(t){function e(e,n,i){void 0===i&&(i=Number.POSITIVE_INFINITY);var r=t.call(this,e)||this;return r.project=n,r.concurrent=i,r.hasCompleted=!1,r.buffer=[],r.active=0,r.index=0,r}return i.__extends(e,t),e.prototype._next=function(t){this.active<this.concurrent?this._tryNext(t):this.buffer.push(t)},e.prototype._tryNext=function(t){var e,n=this.index++;try{e=this.project(t,n)}catch(t){return void this.destination.error(t)}this.active++,this._innerSub(e,t,n)},e.prototype._innerSub=function(t,e,n){var i=new _(this,void 0,void 0);this.destination.add(i),P(this,t,e,n,i)},e.prototype._complete=function(){this.hasCompleted=!0,0===this.active&&0===this.buffer.length&&this.destination.complete(),this.unsubscribe()},e.prototype.notifyNext=function(t,e,n,i,r){this.destination.next(e)},e.prototype.notifyComplete=function(t){var e=this.buffer;this.remove(t),this.active--,e.length>0?this._next(e.shift()):0===this.active&&this.hasCompleted&&this.destination.complete()},e}(m);function jt(t){return t}function Mt(t){return void 0===t&&(t=Number.POSITIVE_INFINITY),Ot(jt,t)}function Pt(){return Mt(1)}function Dt(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return Pt()(Tt.apply(void 0,t))}function Bt(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return function(e){return e.lift.call(Dt.apply(void 0,[e].concat(t)))}}function zt(t,e){return Ot(t,e,1)}function Ft(t,e){return zt((function(){return t}),e)}function Rt(t){return function(e){return e.lift(new Wt(t,e))}}var Wt=function(){function t(t,e){this.predicate=t,this.source=e}return t.prototype.call=function(t,e){return e.subscribe(new Ht(t,this.predicate,this.source))},t}(),Ht=function(t){function e(e,n,i){var r=t.call(this,e)||this;return r.predicate=n,r.source=i,r.count=0,r.index=0,r}return i.__extends(e,t),e.prototype._next=function(t){this.predicate?this._tryPredicate(t):this.count++},e.prototype._tryPredicate=function(t){var e;try{e=this.predicate(t,this.index++,this.source)}catch(t){return void this.destination.error(t)}e&&this.count++},e.prototype._complete=function(){this.destination.next(this.count),this.destination.complete()},e}(b);function Lt(t){return function(e){return e.lift(new qt(t))}}var qt=function(){function t(t){this.durationSelector=t}return t.prototype.call=function(t,e){return e.subscribe(new Ut(t,this.durationSelector))},t}(),Ut=function(t){function e(e,n){var i=t.call(this,e)||this;return i.durationSelector=n,i.hasValue=!1,i.durationSubscription=null,i}return i.__extends(e,t),e.prototype._next=function(t){try{var e=this.durationSelector.call(this,t);e&&this._tryNext(t,e)}catch(t){this.destination.error(t)}},e.prototype._complete=function(){this.emitValue(),this.destination.complete()},e.prototype._tryNext=function(t,e){var n=this.durationSubscription;this.value=t,this.hasValue=!0,n&&(n.unsubscribe(),this.remove(n)),(n=P(this,e))&&!n.closed&&this.add(this.durationSubscription=n)},e.prototype.notifyNext=function(t,e,n,i,r){this.emitValue()},e.prototype.notifyComplete=function(){this.emitValue()},e.prototype.emitValue=function(){if(this.hasValue){var e=this.value,n=this.durationSubscription;n&&(this.durationSubscription=null,n.unsubscribe(),this.remove(n)),this.value=null,this.hasValue=!1,t.prototype._next.call(this,e)}},e}(m);function Yt(t,e){return void 0===e&&(e=H),function(n){return n.lift(new Kt(t,e))}}var Kt=function(){function t(t,e){this.dueTime=t,this.scheduler=e}return t.prototype.call=function(t,e){return e.subscribe(new Gt(t,this.dueTime,this.scheduler))},t}(),Gt=function(t){function e(e,n,i){var r=t.call(this,e)||this;return r.dueTime=n,r.scheduler=i,r.debouncedSubscription=null,r.lastValue=null,r.hasValue=!1,r}return i.__extends(e,t),e.prototype._next=function(t){this.clearDebounce(),this.lastValue=t,this.hasValue=!0,this.add(this.debouncedSubscription=this.scheduler.schedule($t,this.dueTime,this))},e.prototype._complete=function(){this.debouncedNext(),this.destination.complete()},e.prototype.debouncedNext=function(){if(this.clearDebounce(),this.hasValue){var t=this.lastValue;this.lastValue=null,this.hasValue=!1,this.destination.next(t)}},e.prototype.clearDebounce=function(){var t=this.debouncedSubscription;null!==t&&(this.remove(t),t.unsubscribe(),this.debouncedSubscription=null)},e}(b);function $t(t){t.debouncedNext()}function Qt(t){return void 0===t&&(t=null),function(e){return e.lift(new Jt(t))}}var Zt,Jt=function(){function t(t){this.defaultValue=t}return t.prototype.call=function(t,e){return e.subscribe(new Xt(t,this.defaultValue))},t}(),Xt=function(t){function e(e,n){var i=t.call(this,e)||this;return i.defaultValue=n,i.isEmpty=!0,i}return i.__extends(e,t),e.prototype._next=function(t){this.isEmpty=!1,this.destination.next(t)},e.prototype._complete=function(){this.isEmpty&&this.destination.next(this.defaultValue),this.destination.complete()},e}(b);function te(t){return t instanceof Date&&!isNaN(+t)}function ee(t,e){return new C(e?function(n){return e.schedule(ne,0,{error:t,subscriber:n})}:function(e){return e.error(t)})}function ne(t){var e=t.error;t.subscriber.error(e)}Zt||(Zt={});var ie=function(){function t(t,e,n){this.kind=t,this.value=e,this.error=n,this.hasValue="N"===t}return t.prototype.observe=function(t){switch(this.kind){case"N":return t.next&&t.next(this.value);case"E":return t.error&&t.error(this.error);case"C":return t.complete&&t.complete()}},t.prototype.do=function(t,e,n){switch(this.kind){case"N":return t&&t(this.value);case"E":return e&&e(this.error);case"C":return n&&n()}},t.prototype.accept=function(t,e,n){return t&&"function"==typeof t.next?this.observe(t):this.do(t,e,n)},t.prototype.toObservable=function(){switch(this.kind){case"N":return Tt(this.value);case"E":return ee(this.error);case"C":return Ct()}throw new Error("unexpected notification kind value")},t.createNext=function(e){return void 0!==e?new t("N",e):t.undefinedValueNotification},t.createError=function(e){return new t("E",void 0,e)},t.createComplete=function(){return t.completeNotification},t.completeNotification=new t("C"),t.undefinedValueNotification=new t("N",void 0),t}();function re(t,e){void 0===e&&(e=H);var n=te(t)?+t-e.now():Math.abs(t);return function(t){return t.lift(new oe(n,e))}}var oe=function(){function t(t,e){this.delay=t,this.scheduler=e}return t.prototype.call=function(t,e){return e.subscribe(new se(t,this.delay,this.scheduler))},t}(),se=function(t){function e(e,n,i){var r=t.call(this,e)||this;return r.delay=n,r.scheduler=i,r.queue=[],r.active=!1,r.errored=!1,r}return i.__extends(e,t),e.dispatch=function(t){for(var e=t.source,n=e.queue,i=t.scheduler,r=t.destination;n.length>0&&n[0].time-i.now()<=0;)n.shift().notification.observe(r);if(n.length>0){var o=Math.max(0,n[0].time-i.now());this.schedule(t,o)}else this.unsubscribe(),e.active=!1},e.prototype._schedule=function(t){this.active=!0,this.destination.add(t.schedule(e.dispatch,this.delay,{source:this,destination:this.destination,scheduler:t}))},e.prototype.scheduleNotification=function(t){if(!0!==this.errored){var e=this.scheduler,n=new ue(e.now()+this.delay,t);this.queue.push(n),!1===this.active&&this._schedule(e)}},e.prototype._next=function(t){this.scheduleNotification(ie.createNext(t))},e.prototype._error=function(t){this.errored=!0,this.queue=[],this.destination.error(t),this.unsubscribe()},e.prototype._complete=function(){this.scheduleNotification(ie.createComplete()),this.unsubscribe()},e}(b),ue=function(){return function(t,e){this.time=t,this.notification=e}}();function ce(t,e){return e?function(n){return new he(n,e).lift(new ae(t))}:function(e){return e.lift(new ae(t))}}var ae=function(){function t(t){this.delayDurationSelector=t}return t.prototype.call=function(t,e){return e.subscribe(new le(t,this.delayDurationSelector))},t}(),le=function(t){function e(e,n){var i=t.call(this,e)||this;return i.delayDurationSelector=n,i.completed=!1,i.delayNotifierSubscriptions=[],i.index=0,i}return i.__extends(e,t),e.prototype.notifyNext=function(t,e,n,i,r){this.destination.next(t),this.removeSubscription(r),this.tryComplete()},e.prototype.notifyError=function(t,e){this._error(t)},e.prototype.notifyComplete=function(t){var e=this.removeSubscription(t);e&&this.destination.next(e),this.tryComplete()},e.prototype._next=function(t){var e=this.index++;try{var n=this.delayDurationSelector(t,e);n&&this.tryDelay(n,t)}catch(t){this.destination.error(t)}},e.prototype._complete=function(){this.completed=!0,this.tryComplete(),this.unsubscribe()},e.prototype.removeSubscription=function(t){t.unsubscribe();var e=this.delayNotifierSubscriptions.indexOf(t);return-1!==e&&this.delayNotifierSubscriptions.splice(e,1),t.outerValue},e.prototype.tryDelay=function(t,e){var n=P(this,t,e);n&&!n.closed&&(this.destination.add(n),this.delayNotifierSubscriptions.push(n))},e.prototype.tryComplete=function(){this.completed&&0===this.delayNotifierSubscriptions.length&&this.destination.complete()},e}(m),he=function(t){function e(e,n){var i=t.call(this)||this;return i.source=e,i.subscriptionDelay=n,i}return i.__extends(e,t),e.prototype._subscribe=function(t){this.subscriptionDelay.subscribe(new pe(t,this.source))},e}(C),pe=function(t){function e(e,n){var i=t.call(this)||this;return i.parent=e,i.source=n,i.sourceSubscribed=!1,i}return i.__extends(e,t),e.prototype._next=function(t){this.subscribeToSource()},e.prototype._error=function(t){this.unsubscribe(),this.parent.error(t)},e.prototype._complete=function(){this.unsubscribe(),this.subscribeToSource()},e.prototype.subscribeToSource=function(){this.sourceSubscribed||(this.sourceSubscribed=!0,this.unsubscribe(),this.source.subscribe(this.parent))},e}(b);function fe(){return function(t){return t.lift(new de)}}var de=function(){function t(){}return t.prototype.call=function(t,e){return e.subscribe(new ye(t))},t}(),ye=function(t){function e(e){return t.call(this,e)||this}return i.__extends(e,t),e.prototype._next=function(t){t.observe(this.destination)},e}(b);function be(t,e){return function(n){return n.lift(new ve(t,e))}}var ve=function(){function t(t,e){this.keySelector=t,this.flushes=e}return t.prototype.call=function(t,e){return e.subscribe(new me(t,this.keySelector,this.flushes))},t}(),me=function(t){function e(e,n,i){var r=t.call(this,e)||this;return r.keySelector=n,r.values=new Set,i&&r.add(P(r,i)),r}return i.__extends(e,t),e.prototype.notifyNext=function(t,e,n,i,r){this.values.clear()},e.prototype.notifyError=function(t,e){this._error(t)},e.prototype._next=function(t){this.keySelector?this._useKeySelector(t):this._finalizeNext(t,t)},e.prototype._useKeySelector=function(t){var e,n=this.destination;try{e=this.keySelector(t)}catch(t){return void n.error(t)}this._finalizeNext(e,t)},e.prototype._finalizeNext=function(t,e){var n=this.values;n.has(t)||(n.add(t),this.destination.next(e))},e}(m);function _e(t,e){return function(n){return n.lift(new ge(t,e))}}var ge=function(){function t(t,e){this.compare=t,this.keySelector=e}return t.prototype.call=function(t,e){return e.subscribe(new xe(t,this.compare,this.keySelector))},t}(),xe=function(t){function e(e,n,i){var r=t.call(this,e)||this;return r.keySelector=i,r.hasKey=!1,"function"==typeof n&&(r.compare=n),r}return i.__extends(e,t),e.prototype.compare=function(t,e){return t===e},e.prototype._next=function(t){var e;try{var n=this.keySelector;e=n?n(t):t}catch(t){return this.destination.error(t)}var i=!1;if(this.hasKey)try{i=(0,this.compare)(this.key,e)}catch(t){return this.destination.error(t)}else this.hasKey=!0;i||(this.key=e,this.destination.next(t))},e}(b);function we(t,e){return _e((function(n,i){return e?e(n[t],i[t]):n[t]===i[t]}))}function Se(){return Error.call(this),this.message="argument out of range",this.name="ArgumentOutOfRangeError",this}Se.prototype=Object.create(Error.prototype);var Ce=Se;function ke(t,e){return function(n){return n.lift(new Te(t,e))}}var Te=function(){function t(t,e){this.predicate=t,this.thisArg=e}return t.prototype.call=function(t,e){return e.subscribe(new Ee(t,this.predicate,this.thisArg))},t}(),Ee=function(t){function e(e,n,i){var r=t.call(this,e)||this;return r.predicate=n,r.thisArg=i,r.count=0,r}return i.__extends(e,t),e.prototype._next=function(t){var e;try{e=this.predicate.call(this.thisArg,t,this.count++)}catch(t){return void this.destination.error(t)}e&&this.destination.next(t)},e}(b);function Ie(t,e,n){return function(i){return i.lift(new Ne(t,e,n))}}var Ne=function(){function t(t,e,n){this.nextOrObserver=t,this.error=e,this.complete=n}return t.prototype.call=function(t,e){return e.subscribe(new Oe(t,this.nextOrObserver,this.error,this.complete))},t}(),Oe=function(t){function e(e,n,i,o){var s=t.call(this,e)||this;return s._tapNext=x,s._tapError=x,s._tapComplete=x,s._tapError=i||x,s._tapComplete=o||x,r(n)?(s._context=s,s._tapNext=n):n&&(s._context=n,s._tapNext=n.next||x,s._tapError=n.error||x,s._tapComplete=n.complete||x),s}return i.__extends(e,t),e.prototype._next=function(t){try{this._tapNext.call(this._context,t)}catch(t){return void this.destination.error(t)}this.destination.next(t)},e.prototype._error=function(t){try{this._tapError.call(this._context,t)}catch(t){return void this.destination.error(t)}this.destination.error(t)},e.prototype._complete=function(){try{this._tapComplete.call(this._context)}catch(t){return void this.destination.error(t)}return this.destination.complete()},e}(b);function Ae(){return Error.call(this),this.message="no elements in sequence",this.name="EmptyError",this}Ae.prototype=Object.create(Error.prototype);var Ve=Ae,je=function(t){return void 0===t&&(t=Me),Ie({hasValue:!1,next:function(){this.hasValue=!0},complete:function(){if(!this.hasValue)throw t()}})};function Me(){return new Ve}function Pe(t){return function(e){return 0===t?Ct():e.lift(new De(t))}}var De=function(){function t(t){if(this.total=t,this.total<0)throw new Ce}return t.prototype.call=function(t,e){return e.subscribe(new Be(t,this.total))},t}(),Be=function(t){function e(e,n){var i=t.call(this,e)||this;return i.total=n,i.count=0,i}return i.__extends(e,t),e.prototype._next=function(t){var e=this.total,n=++this.count;n<=e&&(this.destination.next(t),n===e&&(this.destination.complete(),this.unsubscribe()))},e}(b);function ze(t,e){if(t<0)throw new Ce;var n=arguments.length>=2;return function(i){return i.pipe(ke((function(e,n){return n===t})),Pe(1),n?Qt(e):je((function(){return new Ce})))}}function Fe(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return function(e){var n=t[t.length-1];q(n)?t.pop():n=null;var i=t.length;return Dt(e,1!==i||n?i>0?bt(t,n):Ct(n):kt(t[0]))}}function Re(t,e){return function(n){return n.lift(new We(t,e,n))}}var We=function(){function t(t,e,n){this.predicate=t,this.thisArg=e,this.source=n}return t.prototype.call=function(t,e){return e.subscribe(new He(t,this.predicate,this.thisArg,this.source))},t}(),He=function(t){function e(e,n,i,r){var o=t.call(this,e)||this;return o.predicate=n,o.thisArg=i,o.source=r,o.index=0,o.thisArg=i||o,o}return i.__extends(e,t),e.prototype.notifyComplete=function(t){this.destination.next(t),this.destination.complete()},e.prototype._next=function(t){var e=!1;try{e=this.predicate.call(this.thisArg,t,this.index++,this.source)}catch(t){return void this.destination.error(t)}e||this.notifyComplete(!1)},e.prototype._complete=function(){this.notifyComplete(!0)},e}(b);function Le(){return function(t){return t.lift(new qe)}}var qe=function(){function t(){}return t.prototype.call=function(t,e){return e.subscribe(new Ue(t))},t}(),Ue=function(t){function e(e){var n=t.call(this,e)||this;return n.hasCompleted=!1,n.hasSubscription=!1,n}return i.__extends(e,t),e.prototype._next=function(t){this.hasSubscription||(this.hasSubscription=!0,this.add(P(this,t)))},e.prototype._complete=function(){this.hasCompleted=!0,this.hasSubscription||this.destination.complete()},e.prototype.notifyComplete=function(t){this.remove(t),this.hasSubscription=!1,this.hasCompleted&&this.destination.complete()},e}(m);function Ye(t,e){return e?function(n){return n.pipe(Ye((function(n,i){return xt(t(n,i)).pipe(Et((function(t,r){return e(n,t,i,r)})))})))}:function(e){return e.lift(new Ke(t))}}var Ke=function(){function t(t){this.project=t}return t.prototype.call=function(t,e){return e.subscribe(new Ge(t,this.project))},t}(),Ge=function(t){function e(e,n){var i=t.call(this,e)||this;return i.project=n,i.hasSubscription=!1,i.hasCompleted=!1,i.index=0,i}return i.__extends(e,t),e.prototype._next=function(t){this.hasSubscription||this.tryNext(t)},e.prototype.tryNext=function(t){var e,n=this.index++;try{e=this.project(t,n)}catch(t){return void this.destination.error(t)}this.hasSubscription=!0,this._innerSub(e,t,n)},e.prototype._innerSub=function(t,e,n){var i=new _(this,void 0,void 0);this.destination.add(i),P(this,t,e,n,i)},e.prototype._complete=function(){this.hasCompleted=!0,this.hasSubscription||this.destination.complete(),this.unsubscribe()},e.prototype.notifyNext=function(t,e,n,i,r){this.destination.next(e)},e.prototype.notifyError=function(t){this.destination.error(t)},e.prototype.notifyComplete=function(t){this.destination.remove(t),this.hasSubscription=!1,this.hasCompleted&&this.destination.complete()},e}(m);function $e(t,e,n){return void 0===e&&(e=Number.POSITIVE_INFINITY),void 0===n&&(n=void 0),e=(e||0)<1?Number.POSITIVE_INFINITY:e,function(i){return i.lift(new Qe(t,e,n))}}var Qe=function(){function t(t,e,n){this.project=t,this.concurrent=e,this.scheduler=n}return t.prototype.call=function(t,e){return e.subscribe(new Ze(t,this.project,this.concurrent,this.scheduler))},t}(),Ze=function(t){function e(e,n,i,r){var o=t.call(this,e)||this;return o.project=n,o.concurrent=i,o.scheduler=r,o.index=0,o.active=0,o.hasCompleted=!1,i<Number.POSITIVE_INFINITY&&(o.buffer=[]),o}return i.__extends(e,t),e.dispatch=function(t){var e=t.subscriber,n=t.result,i=t.value,r=t.index;e.subscribeToProjection(n,i,r)},e.prototype._next=function(t){var n=this.destination;if(n.closed)this._complete();else{var i=this.index++;if(this.active<this.concurrent){n.next(t);try{var r=(0,this.project)(t,i);if(this.scheduler){var o={subscriber:this,result:r,value:t,index:i};this.destination.add(this.scheduler.schedule(e.dispatch,0,o))}else this.subscribeToProjection(r,t,i)}catch(t){n.error(t)}}else this.buffer.push(t)}},e.prototype.subscribeToProjection=function(t,e,n){this.active++,this.destination.add(P(this,t,e,n))},e.prototype._complete=function(){this.hasCompleted=!0,this.hasCompleted&&0===this.active&&this.destination.complete(),this.unsubscribe()},e.prototype.notifyNext=function(t,e,n,i,r){this._next(e)},e.prototype.notifyComplete=function(t){var e=this.buffer;this.destination.remove(t),this.active--,e&&e.length>0&&this._next(e.shift()),this.hasCompleted&&0===this.active&&this.destination.complete()},e}(m);function Je(t){return function(e){return e.lift(new Xe(t))}}var Xe=function(){function t(t){this.callback=t}return t.prototype.call=function(t,e){return e.subscribe(new tn(t,this.callback))},t}(),tn=function(t){function e(e,n){var i=t.call(this,e)||this;return i.add(new f(n)),i}return i.__extends(e,t),e}(b);function en(t,e){if("function"!=typeof t)throw new TypeError("predicate is not a function");return function(n){return n.lift(new nn(t,n,!1,e))}}var nn=function(){function t(t,e,n,i){this.predicate=t,this.source=e,this.yieldIndex=n,this.thisArg=i}return t.prototype.call=function(t,e){return e.subscribe(new rn(t,this.predicate,this.source,this.yieldIndex,this.thisArg))},t}(),rn=function(t){function e(e,n,i,r,o){var s=t.call(this,e)||this;return s.predicate=n,s.source=i,s.yieldIndex=r,s.thisArg=o,s.index=0,s}return i.__extends(e,t),e.prototype.notifyComplete=function(t){var e=this.destination;e.next(t),e.complete(),this.unsubscribe()},e.prototype._next=function(t){var e=this.predicate,n=this.thisArg,i=this.index++;try{e.call(n||this,t,i,this.source)&&this.notifyComplete(this.yieldIndex?i:t)}catch(t){this.destination.error(t)}},e.prototype._complete=function(){this.notifyComplete(this.yieldIndex?-1:void 0)},e}(b);function on(t,e){return function(n){return n.lift(new nn(t,n,!0,e))}}function sn(t,e){var n=arguments.length>=2;return function(i){return i.pipe(t?ke((function(e,n){return t(e,n,i)})):jt,Pe(1),n?Qt(e):je((function(){return new Ve})))}}function un(){return Error.call(this),this.message="object unsubscribed",this.name="ObjectUnsubscribedError",this}un.prototype=Object.create(Error.prototype);var cn=un,an=function(t){function e(e,n){var i=t.call(this)||this;return i.subject=e,i.subscriber=n,i.closed=!1,i}return i.__extends(e,t),e.prototype.unsubscribe=function(){if(!this.closed){this.closed=!0;var t=this.subject,e=t.observers;if(this.subject=null,e&&0!==e.length&&!t.isStopped&&!t.closed){var n=e.indexOf(this.subscriber);-1!==n&&e.splice(n,1)}}},e}(f),ln=function(t){function e(e){var n=t.call(this,e)||this;return n.destination=e,n}return i.__extends(e,t),e}(b),hn=function(t){function e(){var e=t.call(this)||this;return e.observers=[],e.closed=!1,e.isStopped=!1,e.hasError=!1,e.thrownError=null,e}return i.__extends(e,t),e.prototype[y]=function(){return new ln(this)},e.prototype.lift=function(t){var e=new pn(this,this);return e.operator=t,e},e.prototype.next=function(t){if(this.closed)throw new cn;if(!this.isStopped)for(var e=this.observers,n=e.length,i=e.slice(),r=0;r<n;r++)i[r].next(t)},e.prototype.error=function(t){if(this.closed)throw new cn;this.hasError=!0,this.thrownError=t,this.isStopped=!0;for(var e=this.observers,n=e.length,i=e.slice(),r=0;r<n;r++)i[r].error(t);this.observers.length=0},e.prototype.complete=function(){if(this.closed)throw new cn;this.isStopped=!0;for(var t=this.observers,e=t.length,n=t.slice(),i=0;i<e;i++)n[i].complete();this.observers.length=0},e.prototype.unsubscribe=function(){this.isStopped=!0,this.closed=!0,this.observers=null},e.prototype._trySubscribe=function(e){if(this.closed)throw new cn;return t.prototype._trySubscribe.call(this,e)},e.prototype._subscribe=function(t){if(this.closed)throw new cn;return this.hasError?(t.error(this.thrownError),f.EMPTY):this.isStopped?(t.complete(),f.EMPTY):(this.observers.push(t),new an(this,t))},e.prototype.asObservable=function(){var t=new C;return t.source=this,t},e.create=function(t,e){return new pn(t,e)},e}(C),pn=function(t){function e(e,n){var i=t.call(this)||this;return i.destination=e,i.source=n,i}return i.__extends(e,t),e.prototype.next=function(t){var e=this.destination;e&&e.next&&e.next(t)},e.prototype.error=function(t){var e=this.destination;e&&e.error&&this.destination.error(t)},e.prototype.complete=function(){var t=this.destination;t&&t.complete&&this.destination.complete()},e.prototype._subscribe=function(t){return this.source?this.source.subscribe(t):f.EMPTY},e}(hn);function fn(t,e,n,i){return function(r){return r.lift(new dn(t,e,n,i))}}var dn=function(){function t(t,e,n,i){this.keySelector=t,this.elementSelector=e,this.durationSelector=n,this.subjectSelector=i}return t.prototype.call=function(t,e){return e.subscribe(new yn(t,this.keySelector,this.elementSelector,this.durationSelector,this.subjectSelector))},t}(),yn=function(t){function e(e,n,i,r,o){var s=t.call(this,e)||this;return s.keySelector=n,s.elementSelector=i,s.durationSelector=r,s.subjectSelector=o,s.groups=null,s.attemptedToUnsubscribe=!1,s.count=0,s}return i.__extends(e,t),e.prototype._next=function(t){var e;try{e=this.keySelector(t)}catch(t){return void this.error(t)}this._group(t,e)},e.prototype._group=function(t,e){var n=this.groups;n||(n=this.groups=new Map);var i,r=n.get(e);if(this.elementSelector)try{i=this.elementSelector(t)}catch(t){this.error(t)}else i=t;if(!r){r=this.subjectSelector?this.subjectSelector():new hn,n.set(e,r);var o=new vn(e,r,this);if(this.destination.next(o),this.durationSelector){var s=void 0;try{s=this.durationSelector(new vn(e,r))}catch(t){return void this.error(t)}this.add(s.subscribe(new bn(e,r,this)))}}r.closed||r.next(i)},e.prototype._error=function(t){var e=this.groups;e&&(e.forEach((function(e,n){e.error(t)})),e.clear()),this.destination.error(t)},e.prototype._complete=function(){var t=this.groups;t&&(t.forEach((function(t,e){t.complete()})),t.clear()),this.destination.complete()},e.prototype.removeGroup=function(t){this.groups.delete(t)},e.prototype.unsubscribe=function(){this.closed||(this.attemptedToUnsubscribe=!0,0===this.count&&t.prototype.unsubscribe.call(this))},e}(b),bn=function(t){function e(e,n,i){var r=t.call(this,n)||this;return r.key=e,r.group=n,r.parent=i,r}return i.__extends(e,t),e.prototype._next=function(t){this.complete()},e.prototype._unsubscribe=function(){var t=this.parent,e=this.key;this.key=this.parent=null,t&&t.removeGroup(e)},e}(b),vn=function(t){function e(e,n,i){var r=t.call(this)||this;return r.key=e,r.groupSubject=n,r.refCountSubscription=i,r}return i.__extends(e,t),e.prototype._subscribe=function(t){var e=new f,n=this.refCountSubscription,i=this.groupSubject;return n&&!n.closed&&e.add(new mn(n)),e.add(i.subscribe(t)),e},e}(C),mn=function(t){function e(e){var n=t.call(this)||this;return n.parent=e,e.count++,n}return i.__extends(e,t),e.prototype.unsubscribe=function(){var e=this.parent;e.closed||this.closed||(t.prototype.unsubscribe.call(this),e.count-=1,0===e.count&&e.attemptedToUnsubscribe&&e.unsubscribe())},e}(f);function _n(){return function(t){return t.lift(new gn)}}var gn=function(){function t(){}return t.prototype.call=function(t,e){return e.subscribe(new xn(t))},t}(),xn=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return i.__extends(e,t),e.prototype._next=function(t){},e}(b);function wn(){return function(t){return t.lift(new Sn)}}var Sn=function(){function t(){}return t.prototype.call=function(t,e){return e.subscribe(new Cn(t))},t}(),Cn=function(t){function e(e){return t.call(this,e)||this}return i.__extends(e,t),e.prototype.notifyComplete=function(t){var e=this.destination;e.next(t),e.complete()},e.prototype._next=function(t){this.notifyComplete(!1)},e.prototype._complete=function(){this.notifyComplete(!0)},e}(b);function kn(t){return function(e){return 0===t?Ct():e.lift(new Tn(t))}}var Tn=function(){function t(t){if(this.total=t,this.total<0)throw new Ce}return t.prototype.call=function(t,e){return e.subscribe(new En(t,this.total))},t}(),En=function(t){function e(e,n){var i=t.call(this,e)||this;return i.total=n,i.ring=new Array,i.count=0,i}return i.__extends(e,t),e.prototype._next=function(t){var e=this.ring,n=this.total,i=this.count++;e.length<n?e.push(t):e[i%n]=t},e.prototype._complete=function(){var t=this.destination,e=this.count;if(e>0)for(var n=this.count>=this.total?this.total:this.count,i=this.ring,r=0;r<n;r++){var o=e++%n;t.next(i[o])}t.complete()},e}(b);function In(t,e){var n=arguments.length>=2;return function(i){return i.pipe(t?ke((function(e,n){return t(e,n,i)})):jt,kn(1),n?Qt(e):je((function(){return new Ve})))}}function Nn(t){return function(e){return e.lift(new On(t))}}var On=function(){function t(t){this.value=t}return t.prototype.call=function(t,e){return e.subscribe(new An(t,this.value))},t}(),An=function(t){function e(e,n){var i=t.call(this,e)||this;return i.value=n,i}return i.__extends(e,t),e.prototype._next=function(t){this.destination.next(this.value)},e}(b);function Vn(){return function(t){return t.lift(new jn)}}var jn=function(){function t(){}return t.prototype.call=function(t,e){return e.subscribe(new Mn(t))},t}(),Mn=function(t){function e(e){return t.call(this,e)||this}return i.__extends(e,t),e.prototype._next=function(t){this.destination.next(ie.createNext(t))},e.prototype._error=function(t){var e=this.destination;e.next(ie.createError(t)),e.complete()},e.prototype._complete=function(){var t=this.destination;t.next(ie.createComplete()),t.complete()},e}(b);function Pn(t,e){var n=!1;return arguments.length>=2&&(n=!0),function(i){return i.lift(new Dn(t,e,n))}}var Dn=function(){function t(t,e,n){void 0===n&&(n=!1),this.accumulator=t,this.seed=e,this.hasSeed=n}return t.prototype.call=function(t,e){return e.subscribe(new Bn(t,this.accumulator,this.seed,this.hasSeed))},t}(),Bn=function(t){function e(e,n,i,r){var o=t.call(this,e)||this;return o.accumulator=n,o._seed=i,o.hasSeed=r,o.index=0,o}return i.__extends(e,t),Object.defineProperty(e.prototype,"seed",{get:function(){return this._seed},set:function(t){this.hasSeed=!0,this._seed=t},enumerable:!0,configurable:!0}),e.prototype._next=function(t){if(this.hasSeed)return this._tryNext(t);this.seed=t,this.destination.next(t)},e.prototype._tryNext=function(t){var e,n=this.index++;try{e=this.accumulator(this.seed,t,n)}catch(t){this.destination.error(t)}this.seed=e,this.destination.next(e)},e}(b);function zn(t,e){return arguments.length>=2?function(n){return w(Pn(t,e),kn(1),Qt(e))(n)}:function(e){return w(Pn((function(e,n,i){return t(e,n,i+1)})),kn(1))(e)}}function Fn(t){return zn("function"==typeof t?function(e,n){return t(e,n)>0?e:n}:function(t,e){return t>e?t:e})}function Rn(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n=Number.POSITIVE_INFINITY,i=null,r=t[t.length-1];return q(r)?(i=t.pop(),t.length>1&&"number"==typeof t[t.length-1]&&(n=t.pop())):"number"==typeof r&&(n=t.pop()),null===i&&1===t.length&&t[0]instanceof C?t[0]:Mt(n)(bt(t,i))}function Wn(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return function(e){return e.lift.call(Rn.apply(void 0,[e].concat(t)))}}function Hn(t,e,n){return void 0===n&&(n=Number.POSITIVE_INFINITY),"function"==typeof e?Ot((function(){return t}),e,n):("number"==typeof e&&(n=e),Ot((function(){return t}),n))}function Ln(t,e,n){return void 0===n&&(n=Number.POSITIVE_INFINITY),function(i){return i.lift(new qn(t,e,n))}}var qn=function(){function t(t,e,n){this.accumulator=t,this.seed=e,this.concurrent=n}return t.prototype.call=function(t,e){return e.subscribe(new Un(t,this.accumulator,this.seed,this.concurrent))},t}(),Un=function(t){function e(e,n,i,r){var o=t.call(this,e)||this;return o.accumulator=n,o.acc=i,o.concurrent=r,o.hasValue=!1,o.hasCompleted=!1,o.buffer=[],o.active=0,o.index=0,o}return i.__extends(e,t),e.prototype._next=function(t){if(this.active<this.concurrent){var e=this.index++,n=this.destination,i=void 0;try{i=(0,this.accumulator)(this.acc,t,e)}catch(t){return n.error(t)}this.active++,this._innerSub(i,t,e)}else this.buffer.push(t)},e.prototype._innerSub=function(t,e,n){var i=new _(this,void 0,void 0);this.destination.add(i),P(this,t,e,n,i)},e.prototype._complete=function(){this.hasCompleted=!0,0===this.active&&0===this.buffer.length&&(!1===this.hasValue&&this.destination.next(this.acc),this.destination.complete()),this.unsubscribe()},e.prototype.notifyNext=function(t,e,n,i,r){var o=this.destination;this.acc=e,this.hasValue=!0,o.next(e)},e.prototype.notifyComplete=function(t){var e=this.buffer;this.destination.remove(t),this.active--,e.length>0?this._next(e.shift()):0===this.active&&this.hasCompleted&&(!1===this.hasValue&&this.destination.next(this.acc),this.destination.complete())},e}(m);function Yn(t){return zn("function"==typeof t?function(e,n){return t(e,n)<0?e:n}:function(t,e){return t<e?t:e})}function Kn(){return function(t){return t.lift(new Gn(t))}}var Gn=function(){function t(t){this.connectable=t}return t.prototype.call=function(t,e){var n=this.connectable;n._refCount++;var i=new $n(t,n),r=e.subscribe(i);return i.closed||(i.connection=n.connect()),r},t}(),$n=function(t){function e(e,n){var i=t.call(this,e)||this;return i.connectable=n,i}return i.__extends(e,t),e.prototype._unsubscribe=function(){var t=this.connectable;if(t){this.connectable=null;var e=t._refCount;if(e<=0)this.connection=null;else if(t._refCount=e-1,e>1)this.connection=null;else{var n=this.connection,i=t._connection;this.connection=null,!i||n&&i!==n||i.unsubscribe()}}else this.connection=null},e}(b),Qn=function(t){function e(e,n){var i=t.call(this)||this;return i.source=e,i.subjectFactory=n,i._refCount=0,i._isComplete=!1,i}return i.__extends(e,t),e.prototype._subscribe=function(t){return this.getSubject().subscribe(t)},e.prototype.getSubject=function(){var t=this._subject;return t&&!t.isStopped||(this._subject=this.subjectFactory()),this._subject},e.prototype.connect=function(){var t=this._connection;return t||(this._isComplete=!1,(t=this._connection=new f).add(this.source.subscribe(new Jn(this.getSubject(),this))),t.closed?(this._connection=null,t=f.EMPTY):this._connection=t),t},e.prototype.refCount=function(){return Kn()(this)},e}(C).prototype,Zn={operator:{value:null},_refCount:{value:0,writable:!0},_subject:{value:null,writable:!0},_connection:{value:null,writable:!0},_subscribe:{value:Qn._subscribe},_isComplete:{value:Qn._isComplete,writable:!0},getSubject:{value:Qn.getSubject},connect:{value:Qn.connect},refCount:{value:Qn.refCount}},Jn=function(t){function e(e,n){var i=t.call(this,e)||this;return i.connectable=n,i}return i.__extends(e,t),e.prototype._error=function(e){this._unsubscribe(),t.prototype._error.call(this,e)},e.prototype._complete=function(){this.connectable._isComplete=!0,this._unsubscribe(),t.prototype._complete.call(this)},e.prototype._unsubscribe=function(){var t=this.connectable;if(t){this.connectable=null;var e=t._connection;t._refCount=0,t._subject=null,t._connection=null,e&&e.unsubscribe()}},e}(ln);function Xn(t,e){return function(n){var i;if(i="function"==typeof t?t:function(){return t},"function"==typeof e)return n.lift(new ti(i,e));var r=Object.create(n,Zn);return r.source=n,r.subjectFactory=i,r}}var ti=function(){function t(t,e){this.subjectFactory=t,this.selector=e}return t.prototype.call=function(t,e){var n=this.selector,i=this.subjectFactory(),r=n(i).subscribe(t);return r.add(e.subscribe(i)),r},t}();function ei(t,e){return void 0===e&&(e=0),function(n){return n.lift(new ni(t,e))}}var ni=function(){function t(t,e){void 0===e&&(e=0),this.scheduler=t,this.delay=e}return t.prototype.call=function(t,e){return e.subscribe(new ii(t,this.scheduler,this.delay))},t}(),ii=function(t){function e(e,n,i){void 0===i&&(i=0);var r=t.call(this,e)||this;return r.scheduler=n,r.delay=i,r}return i.__extends(e,t),e.dispatch=function(t){var e=t.notification,n=t.destination;e.observe(n),this.unsubscribe()},e.prototype.scheduleMessage=function(t){this.destination.add(this.scheduler.schedule(e.dispatch,this.delay,new ri(t,this.destination)))},e.prototype._next=function(t){this.scheduleMessage(ie.createNext(t))},e.prototype._error=function(t){this.scheduleMessage(ie.createError(t)),this.unsubscribe()},e.prototype._complete=function(){this.scheduleMessage(ie.createComplete()),this.unsubscribe()},e}(b),ri=function(){return function(t,e){this.notification=t,this.destination=e}}();function oi(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return 1===t.length&&a(t[0])&&(t=t[0]),function(e){return e.lift(new si(t))}}var si=function(){function t(t){this.nextSources=t}return t.prototype.call=function(t,e){return e.subscribe(new ui(t,this.nextSources))},t}(),ui=function(t){function e(e,n){var i=t.call(this,e)||this;return i.destination=e,i.nextSources=n,i}return i.__extends(e,t),e.prototype.notifyError=function(t,e){this.subscribeToNextSource()},e.prototype.notifyComplete=function(t){this.subscribeToNextSource()},e.prototype._error=function(t){this.subscribeToNextSource(),this.unsubscribe()},e.prototype._complete=function(){this.subscribeToNextSource(),this.unsubscribe()},e.prototype.subscribeToNextSource=function(){var t=this.nextSources.shift();if(t){var e=new _(this,void 0,void 0);this.destination.add(e),P(this,t,void 0,void 0,e)}else this.destination.complete()},e}(m);function ci(){return function(t){return t.lift(new ai)}}var ai=function(){function t(){}return t.prototype.call=function(t,e){return e.subscribe(new li(t))},t}(),li=function(t){function e(e){var n=t.call(this,e)||this;return n.hasPrev=!1,n}return i.__extends(e,t),e.prototype._next=function(t){this.hasPrev?this.destination.next([this.prev,t]):this.hasPrev=!0,this.prev=t},e}(b);function hi(t,e){function n(){return!n.pred.apply(n.thisArg,arguments)}return n.pred=t,n.thisArg=e,n}function pi(t,e){return function(n){return[ke(t,e)(n),ke(hi(t,e))(n)]}}function fi(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n=t.length;if(0===n)throw new Error("list of properties cannot be empty.");return function(e){return Et(di(t,n))(e)}}function di(t,e){return function(n){for(var i=n,r=0;r<e;r++){var o=i[t[r]];if(void 0===o)return;i=o}return i}}function yi(t){return t?Xn((function(){return new hn}),t):Xn(new hn)}var bi=function(t){function e(e){var n=t.call(this)||this;return n._value=e,n}return i.__extends(e,t),Object.defineProperty(e.prototype,"value",{get:function(){return this.getValue()},enumerable:!0,configurable:!0}),e.prototype._subscribe=function(e){var n=t.prototype._subscribe.call(this,e);return n&&!n.closed&&e.next(this._value),n},e.prototype.getValue=function(){if(this.hasError)throw this.thrownError;if(this.closed)throw new cn;return this._value},e.prototype.next=function(e){t.prototype.next.call(this,this._value=e)},e}(hn);function vi(t){return function(e){return Xn(new bi(t))(e)}}var mi=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.value=null,e.hasNext=!1,e.hasCompleted=!1,e}return i.__extends(e,t),e.prototype._subscribe=function(e){return this.hasError?(e.error(this.thrownError),f.EMPTY):this.hasCompleted&&this.hasNext?(e.next(this.value),e.complete(),f.EMPTY):t.prototype._subscribe.call(this,e)},e.prototype.next=function(t){this.hasCompleted||(this.value=t,this.hasNext=!0)},e.prototype.error=function(e){this.hasCompleted||t.prototype.error.call(this,e)},e.prototype.complete=function(){this.hasCompleted=!0,this.hasNext&&t.prototype.next.call(this,this.value),t.prototype.complete.call(this)},e}(hn);function _i(){return function(t){return Xn(new mi)(t)}}var gi=function(t){function e(e,n){var i=t.call(this,e,n)||this;return i.scheduler=e,i.work=n,i}return i.__extends(e,t),e.prototype.schedule=function(e,n){return void 0===n&&(n=0),n>0?t.prototype.schedule.call(this,e,n):(this.delay=n,this.state=e,this.scheduler.flush(this),this)},e.prototype.execute=function(e,n){return n>0||this.closed?t.prototype.execute.call(this,e,n):this._execute(e,n)},e.prototype.requestAsyncId=function(e,n,i){return void 0===i&&(i=0),null!==i&&i>0||null===i&&this.delay>0?t.prototype.requestAsyncId.call(this,e,n,i):e.flush(this)},e}(F),xi=new(function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return i.__extends(e,t),e}(W))(gi),wi=function(t){function e(e,n,i){void 0===e&&(e=Number.POSITIVE_INFINITY),void 0===n&&(n=Number.POSITIVE_INFINITY);var r=t.call(this)||this;return r.scheduler=i,r._events=[],r._infiniteTimeWindow=!1,r._bufferSize=e<1?1:e,r._windowTime=n<1?1:n,n===Number.POSITIVE_INFINITY?(r._infiniteTimeWindow=!0,r.next=r.nextInfiniteTimeWindow):r.next=r.nextTimeWindow,r}return i.__extends(e,t),e.prototype.nextInfiniteTimeWindow=function(e){var n=this._events;n.push(e),n.length>this._bufferSize&&n.shift(),t.prototype.next.call(this,e)},e.prototype.nextTimeWindow=function(e){this._events.push(new Si(this._getNow(),e)),this._trimBufferThenGetEvents(),t.prototype.next.call(this,e)},e.prototype._subscribe=function(t){var e,n=this._infiniteTimeWindow,i=n?this._events:this._trimBufferThenGetEvents(),r=this.scheduler,o=i.length;if(this.closed)throw new cn;if(this.isStopped||this.hasError?e=f.EMPTY:(this.observers.push(t),e=new an(this,t)),r&&t.add(t=new ii(t,r)),n)for(var s=0;s<o&&!t.closed;s++)t.next(i[s]);else for(s=0;s<o&&!t.closed;s++)t.next(i[s].value);return this.hasError?t.error(this.thrownError):this.isStopped&&t.complete(),e},e.prototype._getNow=function(){return(this.scheduler||xi).now()},e.prototype._trimBufferThenGetEvents=function(){for(var t=this._getNow(),e=this._bufferSize,n=this._windowTime,i=this._events,r=i.length,o=0;o<r&&!(t-i[o].time<n);)o++;return r>e&&(o=Math.max(o,r-e)),o>0&&i.splice(0,o),i},e}(hn),Si=function(){return function(t,e){this.time=t,this.value=e}}();function Ci(t,e,n,i){n&&"function"!=typeof n&&(i=n);var r="function"==typeof n?n:void 0,o=new wi(t,e,i);return function(t){return Xn((function(){return o}),r)(t)}}function ki(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];if(1===t.length){if(!a(t[0]))return t[0];t=t[0]}return bt(t,void 0).lift(new Ti)}var Ti=function(){function t(){}return t.prototype.call=function(t,e){return e.subscribe(new Ei(t))},t}(),Ei=function(t){function e(e){var n=t.call(this,e)||this;return n.hasFirst=!1,n.observables=[],n.subscriptions=[],n}return i.__extends(e,t),e.prototype._next=function(t){this.observables.push(t)},e.prototype._complete=function(){var t=this.observables,e=t.length;if(0===e)this.destination.complete();else{for(var n=0;n<e&&!this.hasFirst;n++){var i=t[n],r=P(this,i,i,n);this.subscriptions&&this.subscriptions.push(r),this.add(r)}this.observables=null}},e.prototype.notifyNext=function(t,e,n,i,r){if(!this.hasFirst){this.hasFirst=!0;for(var o=0;o<this.subscriptions.length;o++)if(o!==n){var s=this.subscriptions[o];s.unsubscribe(),this.remove(s)}this.subscriptions=null}this.destination.next(e)},e}(m);function Ii(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return function(e){return 1===t.length&&a(t[0])&&(t=t[0]),e.lift.call(ki.apply(void 0,[e].concat(t)))}}function Ni(t){return void 0===t&&(t=-1),function(e){return 0===t?Ct():t<0?e.lift(new Oi(-1,e)):e.lift(new Oi(t-1,e))}}var Oi=function(){function t(t,e){this.count=t,this.source=e}return t.prototype.call=function(t,e){return e.subscribe(new Ai(t,this.count,this.source))},t}(),Ai=function(t){function e(e,n,i){var r=t.call(this,e)||this;return r.count=n,r.source=i,r}return i.__extends(e,t),e.prototype.complete=function(){if(!this.isStopped){var e=this.source,n=this.count;if(0===n)return t.prototype.complete.call(this);n>-1&&(this.count=n-1),e.subscribe(this._unsubscribeAndRecycle())}},e}(b);function Vi(t){return function(e){return e.lift(new ji(t))}}var ji=function(){function t(t){this.notifier=t}return t.prototype.call=function(t,e){return e.subscribe(new Mi(t,this.notifier,e))},t}(),Mi=function(t){function e(e,n,i){var r=t.call(this,e)||this;return r.notifier=n,r.source=i,r.sourceIsBeingSubscribedTo=!0,r}return i.__extends(e,t),e.prototype.notifyNext=function(t,e,n,i,r){this.sourceIsBeingSubscribedTo=!0,this.source.subscribe(this)},e.prototype.notifyComplete=function(e){if(!1===this.sourceIsBeingSubscribedTo)return t.prototype.complete.call(this)},e.prototype.complete=function(){if(this.sourceIsBeingSubscribedTo=!1,!this.isStopped){if(this.retries||this.subscribeToRetries(),!this.retriesSubscription||this.retriesSubscription.closed)return t.prototype.complete.call(this);this._unsubscribeAndRecycle(),this.notifications.next()}},e.prototype._unsubscribe=function(){var t=this.notifications,e=this.retriesSubscription;t&&(t.unsubscribe(),this.notifications=null),e&&(e.unsubscribe(),this.retriesSubscription=null),this.retries=null},e.prototype._unsubscribeAndRecycle=function(){var e=this._unsubscribe;return this._unsubscribe=null,t.prototype._unsubscribeAndRecycle.call(this),this._unsubscribe=e,this},e.prototype.subscribeToRetries=function(){var e;this.notifications=new hn;try{e=(0,this.notifier)(this.notifications)}catch(e){return t.prototype.complete.call(this)}this.retries=e,this.retriesSubscription=P(this,e)},e}(m);function Pi(t){return void 0===t&&(t=-1),function(e){return e.lift(new Di(t,e))}}var Di=function(){function t(t,e){this.count=t,this.source=e}return t.prototype.call=function(t,e){return e.subscribe(new Bi(t,this.count,this.source))},t}(),Bi=function(t){function e(e,n,i){var r=t.call(this,e)||this;return r.count=n,r.source=i,r}return i.__extends(e,t),e.prototype.error=function(e){if(!this.isStopped){var n=this.source,i=this.count;if(0===i)return t.prototype.error.call(this,e);i>-1&&(this.count=i-1),n.subscribe(this._unsubscribeAndRecycle())}},e}(b);function zi(t){return function(e){return e.lift(new Fi(t,e))}}var Fi=function(){function t(t,e){this.notifier=t,this.source=e}return t.prototype.call=function(t,e){return e.subscribe(new Ri(t,this.notifier,this.source))},t}(),Ri=function(t){function e(e,n,i){var r=t.call(this,e)||this;return r.notifier=n,r.source=i,r}return i.__extends(e,t),e.prototype.error=function(e){if(!this.isStopped){var n=this.errors,i=this.retries,r=this.retriesSubscription;if(i)this.errors=null,this.retriesSubscription=null;else{n=new hn;try{i=(0,this.notifier)(n)}catch(e){return t.prototype.error.call(this,e)}r=P(this,i)}this._unsubscribeAndRecycle(),this.errors=n,this.retries=i,this.retriesSubscription=r,n.next(e)}},e.prototype._unsubscribe=function(){var t=this.errors,e=this.retriesSubscription;t&&(t.unsubscribe(),this.errors=null),e&&(e.unsubscribe(),this.retriesSubscription=null),this.retries=null},e.prototype.notifyNext=function(t,e,n,i,r){var o=this._unsubscribe;this._unsubscribe=null,this._unsubscribeAndRecycle(),this._unsubscribe=o,this.source.subscribe(this)},e}(m);function Wi(t){return function(e){return e.lift(new Hi(t))}}var Hi=function(){function t(t){this.notifier=t}return t.prototype.call=function(t,e){var n=new Li(t),i=e.subscribe(n);return i.add(P(n,this.notifier)),i},t}(),Li=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.hasValue=!1,e}return i.__extends(e,t),e.prototype._next=function(t){this.value=t,this.hasValue=!0},e.prototype.notifyNext=function(t,e,n,i,r){this.emitValue()},e.prototype.notifyComplete=function(){this.emitValue()},e.prototype.emitValue=function(){this.hasValue&&(this.hasValue=!1,this.destination.next(this.value))},e}(m);function qi(t,e){return void 0===e&&(e=H),function(n){return n.lift(new Ui(t,e))}}var Ui=function(){function t(t,e){this.period=t,this.scheduler=e}return t.prototype.call=function(t,e){return e.subscribe(new Yi(t,this.period,this.scheduler))},t}(),Yi=function(t){function e(e,n,i){var r=t.call(this,e)||this;return r.period=n,r.scheduler=i,r.hasValue=!1,r.add(i.schedule(Ki,n,{subscriber:r,period:n})),r}return i.__extends(e,t),e.prototype._next=function(t){this.lastValue=t,this.hasValue=!0},e.prototype.notifyNext=function(){this.hasValue&&(this.hasValue=!1,this.destination.next(this.lastValue))},e}(b);function Ki(t){var e=t.subscriber,n=t.period;e.notifyNext(),this.schedule(t,n)}function Gi(t,e){return function(n){return n.lift(new $i(t,e))}}var $i=function(){function t(t,e){this.compareTo=t,this.comparator=e}return t.prototype.call=function(t,e){return e.subscribe(new Qi(t,this.compareTo,this.comparator))},t}(),Qi=function(t){function e(e,n,i){var r=t.call(this,e)||this;return r.compareTo=n,r.comparator=i,r._a=[],r._b=[],r._oneComplete=!1,r.destination.add(n.subscribe(new Zi(e,r))),r}return i.__extends(e,t),e.prototype._next=function(t){this._oneComplete&&0===this._b.length?this.emit(!1):(this._a.push(t),this.checkValues())},e.prototype._complete=function(){this._oneComplete?this.emit(0===this._a.length&&0===this._b.length):this._oneComplete=!0,this.unsubscribe()},e.prototype.checkValues=function(){for(var t=this._a,e=this._b,n=this.comparator;t.length>0&&e.length>0;){var i=t.shift(),r=e.shift(),o=!1;try{o=n?n(i,r):i===r}catch(t){this.destination.error(t)}o||this.emit(!1)}},e.prototype.emit=function(t){var e=this.destination;e.next(t),e.complete()},e.prototype.nextB=function(t){this._oneComplete&&0===this._a.length?this.emit(!1):(this._b.push(t),this.checkValues())},e.prototype.completeB=function(){this._oneComplete?this.emit(0===this._a.length&&0===this._b.length):this._oneComplete=!0},e}(b),Zi=function(t){function e(e,n){var i=t.call(this,e)||this;return i.parent=n,i}return i.__extends(e,t),e.prototype._next=function(t){this.parent.nextB(t)},e.prototype._error=function(t){this.parent.error(t),this.unsubscribe()},e.prototype._complete=function(){this.parent.completeB(),this.unsubscribe()},e}(b);function Ji(){return new hn}function Xi(){return function(t){return Kn()(Xn(Ji)(t))}}function tr(t,e,n){var i;return i=t&&"object"==typeof t?t:{bufferSize:t,windowTime:e,refCount:!1,scheduler:n},function(t){return t.lift(function(t){var e,n,i=t.bufferSize,r=void 0===i?Number.POSITIVE_INFINITY:i,o=t.windowTime,s=void 0===o?Number.POSITIVE_INFINITY:o,u=t.refCount,c=t.scheduler,a=0,l=!1,h=!1;return function(t){a++,e&&!l||(l=!1,e=new wi(r,s,c),n=t.subscribe({next:function(t){e.next(t)},error:function(t){l=!0,e.error(t)},complete:function(){h=!0,e.complete()}}));var i=e.subscribe(this);this.add((function(){a--,i.unsubscribe(),n&&!h&&u&&0===a&&(n.unsubscribe(),n=void 0,e=void 0)}))}}(i))}}function er(t){return function(e){return e.lift(new nr(t,e))}}var nr=function(){function t(t,e){this.predicate=t,this.source=e}return t.prototype.call=function(t,e){return e.subscribe(new ir(t,this.predicate,this.source))},t}(),ir=function(t){function e(e,n,i){var r=t.call(this,e)||this;return r.predicate=n,r.source=i,r.seenValue=!1,r.index=0,r}return i.__extends(e,t),e.prototype.applySingleValue=function(t){this.seenValue?this.destination.error("Sequence contains more than one element"):(this.seenValue=!0,this.singleValue=t)},e.prototype._next=function(t){var e=this.index++;this.predicate?this.tryNext(t,e):this.applySingleValue(t)},e.prototype.tryNext=function(t,e){try{this.predicate(t,e,this.source)&&this.applySingleValue(t)}catch(t){this.destination.error(t)}},e.prototype._complete=function(){var t=this.destination;this.index>0?(t.next(this.seenValue?this.singleValue:void 0),t.complete()):t.error(new Ve)},e}(b);function rr(t){return function(e){return e.lift(new or(t))}}var or=function(){function t(t){this.total=t}return t.prototype.call=function(t,e){return e.subscribe(new sr(t,this.total))},t}(),sr=function(t){function e(e,n){var i=t.call(this,e)||this;return i.total=n,i.count=0,i}return i.__extends(e,t),e.prototype._next=function(t){++this.count>this.total&&this.destination.next(t)},e}(b);function ur(t){return function(e){return e.lift(new cr(t))}}var cr=function(){function t(t){if(this._skipCount=t,this._skipCount<0)throw new Ce}return t.prototype.call=function(t,e){return 0===this._skipCount?e.subscribe(new b(t)):e.subscribe(new ar(t,this._skipCount))},t}(),ar=function(t){function e(e,n){var i=t.call(this,e)||this;return i._skipCount=n,i._count=0,i._ring=new Array(n),i}return i.__extends(e,t),e.prototype._next=function(t){var e=this._skipCount,n=this._count++;if(n<e)this._ring[n]=t;else{var i=n%e,r=this._ring,o=r[i];r[i]=t,this.destination.next(o)}},e}(b);function lr(t){return function(e){return e.lift(new hr(t))}}var hr=function(){function t(t){this.notifier=t}return t.prototype.call=function(t,e){return e.subscribe(new pr(t,this.notifier))},t}(),pr=function(t){function e(e,n){var i=t.call(this,e)||this;i.hasValue=!1;var r=new _(i,void 0,void 0);return i.add(r),i.innerSubscription=r,P(i,n,void 0,void 0,r),i}return i.__extends(e,t),e.prototype._next=function(e){this.hasValue&&t.prototype._next.call(this,e)},e.prototype.notifyNext=function(t,e,n,i,r){this.hasValue=!0,this.innerSubscription&&this.innerSubscription.unsubscribe()},e.prototype.notifyComplete=function(){},e}(m);function fr(t){return function(e){return e.lift(new dr(t))}}var dr=function(){function t(t){this.predicate=t}return t.prototype.call=function(t,e){return e.subscribe(new yr(t,this.predicate))},t}(),yr=function(t){function e(e,n){var i=t.call(this,e)||this;return i.predicate=n,i.skipping=!0,i.index=0,i}return i.__extends(e,t),e.prototype._next=function(t){var e=this.destination;this.skipping&&this.tryCallPredicate(t),this.skipping||e.next(t)},e.prototype.tryCallPredicate=function(t){try{var e=this.predicate(t,this.index++);this.skipping=Boolean(e)}catch(t){this.destination.error(t)}},e}(b);function br(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return function(e){var n=t[t.length-1];q(n)?t.pop():n=null;var i=t.length;return Dt(1!==i||n?i>0?bt(t,n):Ct(n):kt(t[0]),e)}}var vr=1,mr={};var _r=function(t){var e=vr++;return mr[e]=t,Promise.resolve().then((function(){return function(t){var e=mr[t];e&&e()}(e)})),e},gr=function(t){delete mr[t]},xr=function(t){function e(e,n){var i=t.call(this,e,n)||this;return i.scheduler=e,i.work=n,i}return i.__extends(e,t),e.prototype.requestAsyncId=function(e,n,i){return void 0===i&&(i=0),null!==i&&i>0?t.prototype.requestAsyncId.call(this,e,n,i):(e.actions.push(this),e.scheduled||(e.scheduled=_r(e.flush.bind(e,null))))},e.prototype.recycleAsyncId=function(e,n,i){if(void 0===i&&(i=0),null!==i&&i>0||null===i&&this.delay>0)return t.prototype.recycleAsyncId.call(this,e,n,i);0===e.actions.length&&(gr(n),e.scheduled=void 0)},e}(F),wr=new(function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return i.__extends(e,t),e.prototype.flush=function(t){this.active=!0,this.scheduled=void 0;var e,n=this.actions,i=-1,r=n.length;t=t||n.shift();do{if(e=t.execute(t.state,t.delay))break}while(++i<r&&(t=n.shift()));if(this.active=!1,e){for(;++i<r&&(t=n.shift());)t.unsubscribe();throw e}},e}(W))(xr),Sr=function(t){function e(e,n,i){void 0===n&&(n=0),void 0===i&&(i=wr);var r=t.call(this)||this;return r.source=e,r.delayTime=n,r.scheduler=i,(!L(n)||n<0)&&(r.delayTime=0),i&&"function"==typeof i.schedule||(r.scheduler=wr),r}return i.__extends(e,t),e.create=function(t,n,i){return void 0===n&&(n=0),void 0===i&&(i=wr),new e(t,n,i)},e.dispatch=function(t){var e=t.source,n=t.subscriber;return this.add(e.subscribe(n))},e.prototype._subscribe=function(t){var n=this.delayTime,i=this.source;return this.scheduler.schedule(e.dispatch,n,{source:i,subscriber:t})},e}(C);function Cr(t,e){return void 0===e&&(e=0),function(n){return n.lift(new kr(t,e))}}var kr=function(){function t(t,e){this.scheduler=t,this.delay=e}return t.prototype.call=function(t,e){return new Sr(e,this.delay,this.scheduler).subscribe(t)},t}();function Tr(t,e){return"function"==typeof e?function(n){return n.pipe(Tr((function(n,i){return xt(t(n,i)).pipe(Et((function(t,r){return e(n,t,i,r)})))})))}:function(e){return e.lift(new Er(t))}}var Er=function(){function t(t){this.project=t}return t.prototype.call=function(t,e){return e.subscribe(new Ir(t,this.project))},t}(),Ir=function(t){function e(e,n){var i=t.call(this,e)||this;return i.project=n,i.index=0,i}return i.__extends(e,t),e.prototype._next=function(t){var e,n=this.index++;try{e=this.project(t,n)}catch(t){return void this.destination.error(t)}this._innerSub(e,t,n)},e.prototype._innerSub=function(t,e,n){var i=this.innerSubscription;i&&i.unsubscribe();var r=new _(this,void 0,void 0);this.destination.add(r),this.innerSubscription=P(this,t,e,n,r)},e.prototype._complete=function(){var e=this.innerSubscription;e&&!e.closed||t.prototype._complete.call(this),this.unsubscribe()},e.prototype._unsubscribe=function(){this.innerSubscription=null},e.prototype.notifyComplete=function(e){this.destination.remove(e),this.innerSubscription=null,this.isStopped&&t.prototype._complete.call(this)},e.prototype.notifyNext=function(t,e,n,i,r){this.destination.next(e)},e}(m);function Nr(){return Tr(jt)}function Or(t,e){return e?Tr((function(){return t}),e):Tr((function(){return t}))}function Ar(t){return function(e){return e.lift(new Vr(t))}}var Vr=function(){function t(t){this.notifier=t}return t.prototype.call=function(t,e){var n=new jr(t),i=P(n,this.notifier);return i&&!n.seenValue?(n.add(i),e.subscribe(n)):n},t}(),jr=function(t){function e(e){var n=t.call(this,e)||this;return n.seenValue=!1,n}return i.__extends(e,t),e.prototype.notifyNext=function(t,e,n,i,r){this.seenValue=!0,this.complete()},e.prototype.notifyComplete=function(){},e}(m);function Mr(t,e){return void 0===e&&(e=!1),function(n){return n.lift(new Pr(t,e))}}var Pr=function(){function t(t,e){this.predicate=t,this.inclusive=e}return t.prototype.call=function(t,e){return e.subscribe(new Dr(t,this.predicate,this.inclusive))},t}(),Dr=function(t){function e(e,n,i){var r=t.call(this,e)||this;return r.predicate=n,r.inclusive=i,r.index=0,r}return i.__extends(e,t),e.prototype._next=function(t){var e,n=this.destination;try{e=this.predicate(t,this.index++)}catch(t){return void n.error(t)}this.nextOrComplete(t,e)},e.prototype.nextOrComplete=function(t,e){var n=this.destination;Boolean(e)?n.next(t):(this.inclusive&&n.next(t),n.complete())},e}(b),Br={leading:!0,trailing:!1};function zr(t,e){return void 0===e&&(e=Br),function(n){return n.lift(new Fr(t,e.leading,e.trailing))}}var Fr=function(){function t(t,e,n){this.durationSelector=t,this.leading=e,this.trailing=n}return t.prototype.call=function(t,e){return e.subscribe(new Rr(t,this.durationSelector,this.leading,this.trailing))},t}(),Rr=function(t){function e(e,n,i,r){var o=t.call(this,e)||this;return o.destination=e,o.durationSelector=n,o._leading=i,o._trailing=r,o._hasValue=!1,o}return i.__extends(e,t),e.prototype._next=function(t){this._hasValue=!0,this._sendValue=t,this._throttled||(this._leading?this.send():this.throttle(t))},e.prototype.send=function(){var t=this._hasValue,e=this._sendValue;t&&(this.destination.next(e),this.throttle(e)),this._hasValue=!1,this._sendValue=null},e.prototype.throttle=function(t){var e=this.tryDurationSelector(t);e&&this.add(this._throttled=P(this,e))},e.prototype.tryDurationSelector=function(t){try{return this.durationSelector(t)}catch(t){return this.destination.error(t),null}},e.prototype.throttlingDone=function(){var t=this._throttled,e=this._trailing;t&&t.unsubscribe(),this._throttled=null,e&&this.send()},e.prototype.notifyNext=function(t,e,n,i,r){this.throttlingDone()},e.prototype.notifyComplete=function(){this.throttlingDone()},e}(m);function Wr(t,e,n){return void 0===e&&(e=H),void 0===n&&(n=Br),function(i){return i.lift(new Hr(t,e,n.leading,n.trailing))}}var Hr=function(){function t(t,e,n,i){this.duration=t,this.scheduler=e,this.leading=n,this.trailing=i}return t.prototype.call=function(t,e){return e.subscribe(new Lr(t,this.duration,this.scheduler,this.leading,this.trailing))},t}(),Lr=function(t){function e(e,n,i,r,o){var s=t.call(this,e)||this;return s.duration=n,s.scheduler=i,s.leading=r,s.trailing=o,s._hasTrailingValue=!1,s._trailingValue=null,s}return i.__extends(e,t),e.prototype._next=function(t){this.throttled?this.trailing&&(this._trailingValue=t,this._hasTrailingValue=!0):(this.add(this.throttled=this.scheduler.schedule(qr,this.duration,{subscriber:this})),this.leading&&this.destination.next(t))},e.prototype._complete=function(){this._hasTrailingValue?(this.destination.next(this._trailingValue),this.destination.complete()):this.destination.complete()},e.prototype.clearThrottle=function(){var t=this.throttled;t&&(this.trailing&&this._hasTrailingValue&&(this.destination.next(this._trailingValue),this._trailingValue=null,this._hasTrailingValue=!1),t.unsubscribe(),this.remove(t),this.throttled=null)},e}(b);function qr(t){t.subscriber.clearThrottle()}function Ur(t){return void 0===t&&(t=H),function(e){return n=function(){return e.pipe(Pn((function(e,n){var i=e.current;return{value:n,current:t.now(),last:i}}),{current:t.now(),value:void 0,last:void 0}),Et((function(t){var e=t.current,n=t.last,i=t.value;return new Yr(i,e-n)})))},new C((function(t){var e;try{e=n()}catch(e){return void t.error(e)}return(e?xt(e):Ct()).subscribe(t)}));var n}}var Yr=function(){return function(t,e){this.value=t,this.interval=e}}();function Kr(){return Error.call(this),this.message="Timeout has occurred",this.name="TimeoutError",this}Kr.prototype=Object.create(Error.prototype);var Gr=Kr;function $r(t,e,n){return void 0===n&&(n=H),function(i){var r=te(t),o=r?+t-n.now():Math.abs(t);return i.lift(new Qr(o,r,e,n))}}var Qr=function(){function t(t,e,n,i){this.waitFor=t,this.absoluteTimeout=e,this.withObservable=n,this.scheduler=i}return t.prototype.call=function(t,e){return e.subscribe(new Zr(t,this.absoluteTimeout,this.waitFor,this.withObservable,this.scheduler))},t}(),Zr=function(t){function e(e,n,i,r,o){var s=t.call(this,e)||this;return s.absoluteTimeout=n,s.waitFor=i,s.withObservable=r,s.scheduler=o,s.action=null,s.scheduleTimeout(),s}return i.__extends(e,t),e.dispatchTimeout=function(t){var e=t.withObservable;t._unsubscribeAndRecycle(),t.add(P(t,e))},e.prototype.scheduleTimeout=function(){var t=this.action;t?this.action=t.schedule(this,this.waitFor):this.add(this.action=this.scheduler.schedule(e.dispatchTimeout,this.waitFor,this))},e.prototype._next=function(e){this.absoluteTimeout||this.scheduleTimeout(),t.prototype._next.call(this,e)},e.prototype._unsubscribe=function(){this.action=null,this.scheduler=null,this.withObservable=null},e}(m);function Jr(t,e){return void 0===e&&(e=H),$r(t,ee(new Gr),e)}function Xr(t){return void 0===t&&(t=H),Et((function(e){return new to(e,t.now())}))}var to=function(){return function(t,e){this.value=t,this.timestamp=e}}();function eo(t,e,n){return 0===n?[e]:(t.push(e),t)}function no(){return zn(eo,[])}function io(t){return function(e){return e.lift(new ro(t))}}var ro=function(){function t(t){this.windowBoundaries=t}return t.prototype.call=function(t,e){var n=new oo(t),i=e.subscribe(n);return i.closed||n.add(P(n,this.windowBoundaries)),i},t}(),oo=function(t){function e(e){var n=t.call(this,e)||this;return n.window=new hn,e.next(n.window),n}return i.__extends(e,t),e.prototype.notifyNext=function(t,e,n,i,r){this.openWindow()},e.prototype.notifyError=function(t,e){this._error(t)},e.prototype.notifyComplete=function(t){this._complete()},e.prototype._next=function(t){this.window.next(t)},e.prototype._error=function(t){this.window.error(t),this.destination.error(t)},e.prototype._complete=function(){this.window.complete(),this.destination.complete()},e.prototype._unsubscribe=function(){this.window=null},e.prototype.openWindow=function(){var t=this.window;t&&t.complete();var e=this.destination,n=this.window=new hn;e.next(n)},e}(m);function so(t,e){return void 0===e&&(e=0),function(n){return n.lift(new uo(t,e))}}var uo=function(){function t(t,e){this.windowSize=t,this.startWindowEvery=e}return t.prototype.call=function(t,e){return e.subscribe(new co(t,this.windowSize,this.startWindowEvery))},t}(),co=function(t){function e(e,n,i){var r=t.call(this,e)||this;return r.destination=e,r.windowSize=n,r.startWindowEvery=i,r.windows=[new hn],r.count=0,e.next(r.windows[0]),r}return i.__extends(e,t),e.prototype._next=function(t){for(var e=this.startWindowEvery>0?this.startWindowEvery:this.windowSize,n=this.destination,i=this.windowSize,r=this.windows,o=r.length,s=0;s<o&&!this.closed;s++)r[s].next(t);var u=this.count-i+1;if(u>=0&&u%e==0&&!this.closed&&r.shift().complete(),++this.count%e==0&&!this.closed){var c=new hn;r.push(c),n.next(c)}},e.prototype._error=function(t){var e=this.windows;if(e)for(;e.length>0&&!this.closed;)e.shift().error(t);this.destination.error(t)},e.prototype._complete=function(){var t=this.windows;if(t)for(;t.length>0&&!this.closed;)t.shift().complete();this.destination.complete()},e.prototype._unsubscribe=function(){this.count=0,this.windows=null},e}(b);function ao(t){var e=H,n=null,i=Number.POSITIVE_INFINITY;return q(arguments[3])&&(e=arguments[3]),q(arguments[2])?e=arguments[2]:L(arguments[2])&&(i=arguments[2]),q(arguments[1])?e=arguments[1]:L(arguments[1])&&(n=arguments[1]),function(r){return r.lift(new lo(t,n,i,e))}}var lo=function(){function t(t,e,n,i){this.windowTimeSpan=t,this.windowCreationInterval=e,this.maxWindowSize=n,this.scheduler=i}return t.prototype.call=function(t,e){return e.subscribe(new po(t,this.windowTimeSpan,this.windowCreationInterval,this.maxWindowSize,this.scheduler))},t}(),ho=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e._numberOfNextedValues=0,e}return i.__extends(e,t),e.prototype.next=function(e){this._numberOfNextedValues++,t.prototype.next.call(this,e)},Object.defineProperty(e.prototype,"numberOfNextedValues",{get:function(){return this._numberOfNextedValues},enumerable:!0,configurable:!0}),e}(hn),po=function(t){function e(e,n,i,r,o){var s=t.call(this,e)||this;s.destination=e,s.windowTimeSpan=n,s.windowCreationInterval=i,s.maxWindowSize=r,s.scheduler=o,s.windows=[];var u=s.openWindow();if(null!==i&&i>=0){var c={subscriber:s,window:u,context:null},a={windowTimeSpan:n,windowCreationInterval:i,subscriber:s,scheduler:o};s.add(o.schedule(bo,n,c)),s.add(o.schedule(yo,i,a))}else{var l={subscriber:s,window:u,windowTimeSpan:n};s.add(o.schedule(fo,n,l))}return s}return i.__extends(e,t),e.prototype._next=function(t){for(var e=this.windows,n=e.length,i=0;i<n;i++){var r=e[i];r.closed||(r.next(t),r.numberOfNextedValues>=this.maxWindowSize&&this.closeWindow(r))}},e.prototype._error=function(t){for(var e=this.windows;e.length>0;)e.shift().error(t);this.destination.error(t)},e.prototype._complete=function(){for(var t=this.windows;t.length>0;){var e=t.shift();e.closed||e.complete()}this.destination.complete()},e.prototype.openWindow=function(){var t=new ho;return this.windows.push(t),this.destination.next(t),t},e.prototype.closeWindow=function(t){t.complete();var e=this.windows;e.splice(e.indexOf(t),1)},e}(b);function fo(t){var e=t.subscriber,n=t.windowTimeSpan,i=t.window;i&&e.closeWindow(i),t.window=e.openWindow(),this.schedule(t,n)}function yo(t){var e=t.windowTimeSpan,n=t.subscriber,i=t.scheduler,r=t.windowCreationInterval,o=n.openWindow(),s={action:this,subscription:null},u={subscriber:n,window:o,context:s};s.subscription=i.schedule(bo,e,u),this.add(s.subscription),this.schedule(t,r)}function bo(t){var e=t.subscriber,n=t.window,i=t.context;i&&i.action&&i.subscription&&i.action.remove(i.subscription),e.closeWindow(n)}function vo(t,e){return function(n){return n.lift(new mo(t,e))}}var mo=function(){function t(t,e){this.openings=t,this.closingSelector=e}return t.prototype.call=function(t,e){return e.subscribe(new _o(t,this.openings,this.closingSelector))},t}(),_o=function(t){function e(e,n,i){var r=t.call(this,e)||this;return r.openings=n,r.closingSelector=i,r.contexts=[],r.add(r.openSubscription=P(r,n,n)),r}return i.__extends(e,t),e.prototype._next=function(t){var e=this.contexts;if(e)for(var n=e.length,i=0;i<n;i++)e[i].window.next(t)},e.prototype._error=function(e){var n=this.contexts;if(this.contexts=null,n)for(var i=n.length,r=-1;++r<i;){var o=n[r];o.window.error(e),o.subscription.unsubscribe()}t.prototype._error.call(this,e)},e.prototype._complete=function(){var e=this.contexts;if(this.contexts=null,e)for(var n=e.length,i=-1;++i<n;){var r=e[i];r.window.complete(),r.subscription.unsubscribe()}t.prototype._complete.call(this)},e.prototype._unsubscribe=function(){var t=this.contexts;if(this.contexts=null,t)for(var e=t.length,n=-1;++n<e;){var i=t[n];i.window.unsubscribe(),i.subscription.unsubscribe()}},e.prototype.notifyNext=function(t,e,n,i,r){if(t===this.openings){var o=void 0;try{o=(0,this.closingSelector)(e)}catch(t){return this.error(t)}var s=new hn,u=new f,c={window:s,subscription:u};this.contexts.push(c);var a=P(this,o,c);a.closed?this.closeWindow(this.contexts.length-1):(a.context=c,u.add(a)),this.destination.next(s)}else this.closeWindow(this.contexts.indexOf(t))},e.prototype.notifyError=function(t){this.error(t)},e.prototype.notifyComplete=function(t){t!==this.openSubscription&&this.closeWindow(this.contexts.indexOf(t.context))},e.prototype.closeWindow=function(t){if(-1!==t){var e=this.contexts,n=e[t],i=n.window,r=n.subscription;e.splice(t,1),i.complete(),r.unsubscribe()}},e}(m);function go(t){return function(e){return e.lift(new xo(t))}}var xo=function(){function t(t){this.closingSelector=t}return t.prototype.call=function(t,e){return e.subscribe(new wo(t,this.closingSelector))},t}(),wo=function(t){function e(e,n){var i=t.call(this,e)||this;return i.destination=e,i.closingSelector=n,i.openWindow(),i}return i.__extends(e,t),e.prototype.notifyNext=function(t,e,n,i,r){this.openWindow(r)},e.prototype.notifyError=function(t,e){this._error(t)},e.prototype.notifyComplete=function(t){this.openWindow(t)},e.prototype._next=function(t){this.window.next(t)},e.prototype._error=function(t){this.window.error(t),this.destination.error(t),this.unsubscribeClosingNotification()},e.prototype._complete=function(){this.window.complete(),this.destination.complete(),this.unsubscribeClosingNotification()},e.prototype.unsubscribeClosingNotification=function(){this.closingNotification&&this.closingNotification.unsubscribe()},e.prototype.openWindow=function(t){void 0===t&&(t=null),t&&(this.remove(t),t.unsubscribe());var e=this.window;e&&e.complete();var n,i=this.window=new hn;this.destination.next(i);try{n=(0,this.closingSelector)()}catch(t){return this.destination.error(t),void this.window.error(t)}this.add(this.closingNotification=P(this,n))},e}(m);function So(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return function(e){var n;"function"==typeof t[t.length-1]&&(n=t.pop());var i=t;return e.lift(new Co(i,n))}}var Co=function(){function t(t,e){this.observables=t,this.project=e}return t.prototype.call=function(t,e){return e.subscribe(new ko(t,this.observables,this.project))},t}(),ko=function(t){function e(e,n,i){var r=t.call(this,e)||this;r.observables=n,r.project=i,r.toRespond=[];var o=n.length;r.values=new Array(o);for(var s=0;s<o;s++)r.toRespond.push(s);for(s=0;s<o;s++){var u=n[s];r.add(P(r,u,u,s))}return r}return i.__extends(e,t),e.prototype.notifyNext=function(t,e,n,i,r){this.values[n]=e;var o=this.toRespond;if(o.length>0){var s=o.indexOf(n);-1!==s&&o.splice(s,1)}},e.prototype.notifyComplete=function(){},e.prototype._next=function(t){if(0===this.toRespond.length){var e=[t].concat(this.values);this.project?this._tryProject(e):this.destination.next(e)}},e.prototype._tryProject=function(t){var e;try{e=this.project.apply(this,t)}catch(t){return void this.destination.error(t)}this.destination.next(e)},e}(m);function To(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n=t[t.length-1];return"function"==typeof n&&t.pop(),bt(t,void 0).lift(new Eo(n))}var Eo=function(){function t(t){this.resultSelector=t}return t.prototype.call=function(t,e){return e.subscribe(new Io(t,this.resultSelector))},t}(),Io=function(t){function e(e,n,i){void 0===i&&(i=Object.create(null));var r=t.call(this,e)||this;return r.iterators=[],r.active=0,r.resultSelector="function"==typeof n?n:null,r.values=i,r}return i.__extends(e,t),e.prototype._next=function(t){var e=this.iterators;a(t)?e.push(new Oo(t)):"function"==typeof t[N]?e.push(new No(t[N]())):e.push(new Ao(this.destination,this,t))},e.prototype._complete=function(){var t=this.iterators,e=t.length;if(this.unsubscribe(),0!==e){this.active=e;for(var n=0;n<e;n++){var i=t[n];if(i.stillUnsubscribed)this.destination.add(i.subscribe(i,n));else this.active--}}else this.destination.complete()},e.prototype.notifyInactive=function(){this.active--,0===this.active&&this.destination.complete()},e.prototype.checkIterators=function(){for(var t=this.iterators,e=t.length,n=this.destination,i=0;i<e;i++){if("function"==typeof(s=t[i]).hasValue&&!s.hasValue())return}var r=!1,o=[];for(i=0;i<e;i++){var s,u=(s=t[i]).next();if(s.hasCompleted()&&(r=!0),u.done)return void n.complete();o.push(u.value)}this.resultSelector?this._tryresultSelector(o):n.next(o),r&&n.complete()},e.prototype._tryresultSelector=function(t){var e;try{e=this.resultSelector.apply(this,t)}catch(t){return void this.destination.error(t)}this.destination.next(e)},e}(b),No=function(){function t(t){this.iterator=t,this.nextResult=t.next()}return t.prototype.hasValue=function(){return!0},t.prototype.next=function(){var t=this.nextResult;return this.nextResult=this.iterator.next(),t},t.prototype.hasCompleted=function(){var t=this.nextResult;return t&&t.done},t}(),Oo=function(){function t(t){this.array=t,this.index=0,this.length=0,this.length=t.length}return t.prototype[N]=function(){return this},t.prototype.next=function(t){var e=this.index++,n=this.array;return e<this.length?{value:n[e],done:!1}:{value:null,done:!0}},t.prototype.hasValue=function(){return this.array.length>this.index},t.prototype.hasCompleted=function(){return this.array.length===this.index},t}(),Ao=function(t){function e(e,n,i){var r=t.call(this,e)||this;return r.parent=n,r.observable=i,r.stillUnsubscribed=!0,r.buffer=[],r.isComplete=!1,r}return i.__extends(e,t),e.prototype[N]=function(){return this},e.prototype.next=function(){var t=this.buffer;return 0===t.length&&this.isComplete?{value:null,done:!0}:{value:t.shift(),done:!1}},e.prototype.hasValue=function(){return this.buffer.length>0},e.prototype.hasCompleted=function(){return 0===this.buffer.length&&this.isComplete},e.prototype.notifyComplete=function(){this.buffer.length>0?(this.isComplete=!0,this.parent.notifyInactive()):this.destination.complete()},e.prototype.notifyNext=function(t,e,n,i,r){this.buffer.push(e),this.parent.checkIterators()},e.prototype.subscribe=function(t,e){return P(this,this.observable,this,e)},e}(m);function Vo(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return function(e){return e.lift.call(To.apply(void 0,[e].concat(t)))}}function jo(t){return function(e){return e.lift(new Eo(t))}}}])}));
|
|
5
|
+
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("tslib"),require("@angular/core"),require("@progress/kendo-angular-l10n"),require("@progress/kendo-angular-intl"),require("@progress/kendo-licensing"),require("@progress/kendo-angular-buttons"),require("@angular/common"),require("@progress/kendo-angular-common"),require("rxjs"),require("rxjs/operators")):"function"==typeof define&&define.amd?define([,,,,,,,,,],t):"object"==typeof exports?exports.KendoAngularConversationalUi=t(require("tslib"),require("@angular/core"),require("@progress/kendo-angular-l10n"),require("@progress/kendo-angular-intl"),require("@progress/kendo-licensing"),require("@progress/kendo-angular-buttons"),require("@angular/common"),require("@progress/kendo-angular-common"),require("rxjs"),require("rxjs/operators")):e.KendoAngularConversationalUi=t(e.self,e.ng.core,e.KendoAngularL10N,e.KendoAngularIntl,e.KendoLicensing,e.KendoAngularButtons,e.ng.common,e.KendoAngularCommon,e.rxjs,e.rxjs.operators)}(window,(function(e,t,n,a,o,s,i,r,c,l){return function(e){var t={};function n(a){if(t[a])return t[a].exports;var o=t[a]={i:a,l:!1,exports:{}};return e[a].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=e,n.c=t,n.d=function(e,t,a){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:a})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var a=Object.create(null);if(n.r(a),Object.defineProperty(a,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(a,o,function(t){return e[t]}.bind(null,o));return a},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=11)}([function(t,n){t.exports=e},function(e,n){e.exports=t},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var a=n(12);t.ChatComponent=a.ChatComponent;var o=n(7);t.AttachmentTemplateDirective=o.AttachmentTemplateDirective;var s=n(4);t.MessageTemplateDirective=s.MessageTemplateDirective},function(e,t){e.exports=n},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var a=n(0),o=n(1),s=function(){function e(e){this.templateRef=e}return e=a.__decorate([o.Directive({selector:"[kendoChatMessageTemplate]"}),a.__param(0,o.Optional()),a.__metadata("design:paramtypes",[o.TemplateRef])],e)}();t.MessageTemplateDirective=s},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var a=function(){};t.ChatItem=a},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var a=function(e){this.message=e};t.SendMessageEvent=a},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var a=n(0),o=n(1),s=function(){function e(e){this.templateRef=e}return e=a.__decorate([o.Directive({selector:"[kendoChatAttachmentTemplate]"}),a.__param(0,o.Optional()),a.__metadata("design:paramtypes",[o.TemplateRef])],e)}();t.AttachmentTemplateDirective=s},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var a=n(0),o=n(1),s=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return a.__extends(t,e),a.__decorate([o.Input(),a.__metadata("design:type",String)],t.prototype,"messagePlaceholder",void 0),a.__decorate([o.Input(),a.__metadata("design:type",String)],t.prototype,"send",void 0),t}(n(3).ComponentMessages);t.Messages=s},function(e,t){e.exports=a},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var a=n(0),o=function(e){function t(t,n){var a=e.call(this)||this;return a.action=t,a.message=n,a}return a.__extends(t,e),t}(n(30).PreventableEvent);t.ExecuteActionEvent=o},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var a=n(0);a.__exportStar(n(2),t),a.__exportStar(n(16),t),a.__exportStar(n(10),t),a.__exportStar(n(6),t)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var a=n(0),o=n(1),s=n(7),i=n(3),r=n(13),c=n(4),l=n(6),u=n(14),d=n(15),p=function(){function e(e,t){var n=this;this.localization=e,this.zone=t,this.sendMessage=new o.EventEmitter,this.executeAction=new o.EventEmitter,this.autoScroll=!0,u.validatePackage(d.packageMetadata),this.direction=e.rtl?"rtl":"ltr",this.localizationChangeSubscription=e.changes.subscribe((function(e){var t=e.rtl;n.direction=t?"rtl":"ltr"}))}return Object.defineProperty(e.prototype,"className",{get:function(){return"k-widget k-chat"},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"dirAttr",{get:function(){return this.direction},enumerable:!0,configurable:!0}),e.prototype.ngOnChanges=function(){var e=this;this.zone.runOutsideAngular((function(){return setTimeout((function(){e.messageList.nativeElement.style.flex="1 1 auto"}))}))},e.prototype.ngAfterViewInit=function(){if(o.isDevMode()&&!this.user)throw new Error("User must be set and have a valid id.")},e.prototype.ngOnDestroy=function(){this.localizationChangeSubscription&&this.localizationChangeSubscription.unsubscribe()},e.prototype.sendClick=function(){var e=this.messageInput.nativeElement,t=e.value;if(t){var n={author:this.user,text:t,timestamp:new Date};this.sendMessage.emit(new l.SendMessageEvent(n)),e.value=null,e.focus(),this.autoScroll=!0}},e.prototype.inputKeydown=function(e){13===e.keyCode&&this.sendClick()},e.prototype.dispatchAction=function(e){(this.executeAction.emit(e),e.isDefaultPrevented())||(r.makeHandler(e.action)(e.action,this),this.messageInput.nativeElement.focus())},e.prototype.textFor=function(e){return this.localization.get(e)},a.__decorate([o.Input(),a.__metadata("design:type",Array)],e.prototype,"messages",void 0),a.__decorate([o.Input(),a.__metadata("design:type",Object)],e.prototype,"user",void 0),a.__decorate([o.Output(),a.__metadata("design:type",o.EventEmitter)],e.prototype,"sendMessage",void 0),a.__decorate([o.Output(),a.__metadata("design:type",o.EventEmitter)],e.prototype,"executeAction",void 0),a.__decorate([o.HostBinding("class"),a.__metadata("design:type",String),a.__metadata("design:paramtypes",[])],e.prototype,"className",null),a.__decorate([o.HostBinding("attr.dir"),a.__metadata("design:type",String),a.__metadata("design:paramtypes",[])],e.prototype,"dirAttr",null),a.__decorate([o.ContentChild(s.AttachmentTemplateDirective,{static:!1}),a.__metadata("design:type",s.AttachmentTemplateDirective)],e.prototype,"attachmentTemplate",void 0),a.__decorate([o.ContentChild(c.MessageTemplateDirective,{static:!1}),a.__metadata("design:type",c.MessageTemplateDirective)],e.prototype,"messageTemplate",void 0),a.__decorate([o.ViewChild("messageInput",{static:!0}),a.__metadata("design:type",o.ElementRef)],e.prototype,"messageInput",void 0),a.__decorate([o.ViewChild("messageList",{static:!0}),a.__metadata("design:type",o.ElementRef)],e.prototype,"messageList",void 0),e=a.__decorate([o.Component({providers:[i.LocalizationService,{provide:i.L10N_PREFIX,useValue:"kendo.chat"}],selector:"kendo-chat",template:'\n <ng-container\n kendoChatLocalizedMessages\n i18n-messagePlaceholder="kendo.chat.messagePlaceholder|The placholder text of the message text input"\n messagePlaceholder="Type a message..."\n\n i18n-send="kendo.chat.send|The text for the Send button"\n send="Send..."\n >\n </ng-container>\n\n <div\n #messageList\n class="k-message-list k-avatars"\n aria-live="polite" role="log"\n kendoChatScrollAnchor\n #anchor="scrollAnchor"\n [(autoScroll)]="autoScroll"\n >\n <kendo-chat-message-list\n [messages]="messages"\n [messageTemplate]="messageTemplate"\n [attachmentTemplate]="attachmentTemplate"\n [user]="user"\n (executeAction)="dispatchAction($event)"\n (resize)="anchor.scrollToBottom()"\n (navigate)="this.autoScroll = false"\n >\n </kendo-chat-message-list>\n </div>\n\n <div class="k-message-box">\n <input\n #messageInput\n kendoChatFocusedState\n type="text"\n class="k-input"\n [placeholder]="textFor(\'messagePlaceholder\')"\n (keydown)="inputKeydown($event)"\n >\n <button\n kendoButton\n fillMode="flat"\n class="k-button-send"\n tabindex="-1"\n [attr.title]="textFor(\'send\')"\n (click)="sendClick()"\n ><svg version="1.1" xmlns="http://www.w3.org/2000/svg" x="0px" y="0px" viewBox="0 0 16 16"><path d="M0,14.3c-0.1,0.6,0.3,0.8,0.8,0.6l14.8-6.5c0.5-0.2,0.5-0.6,0-0.8L0.8,1.1C0.3,0.9-0.1,1.1,0,1.7l0.7,4.2C0.8,6.5,1.4,7,1.9,7.1l8.8,0.8c0.6,0.1,0.6,0.1,0,0.2L1.9,8.9C1.4,9,0.8,9.5,0.7,10.1L0,14.3z"/></svg></button>\n </div>\n '}),a.__metadata("design:paramtypes",[i.LocalizationService,o.NgZone])],e)}();t.ChatComponent=p},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var a=n(6),o=function(){},s={reply:function(e,t){t.sendMessage.emit(new a.SendMessageEvent({author:t.user,text:e.value,timestamp:new Date}))},call:function(e){window.open("tel:"+e.value)},openUrl:function(e){window.open(e.value)}};t.makeHandler=function(e){return s[e.type]||o}},function(e,t){e.exports=o},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.packageMetadata={name:"@progress/kendo-angular-conversational-ui",productName:"Kendo UI for Angular",productCodes:["KENDOUIANGULAR","KENDOUICOMPLETE"],publishDate:1646820248,version:"",licensingDocsUrl:"https://www.telerik.com/kendo-angular-ui/my-license/?utm_medium=product&utm_source=kendoangular&utm_campaign=kendo-ui-angular-purchase-license-keys-warning"}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var a=n(0),o=n(17),s=n(2),i=n(18),r=n(19),c=n(20),l=n(21),u=n(22),d=n(23),p=n(24),m=n(25),g=n(28),f=n(29),_=n(1),h=n(33),v=n(34),y=[s.ChatComponent,l.CustomMessagesComponent,s.AttachmentTemplateDirective,s.MessageTemplateDirective,d.HeroCardComponent],b=[o.AttachmentComponent,u.FocusedStateDirective,p.LocalizedMessagesDirective,m.MessageAttachmentsComponent,g.MessageComponent,f.MessageListComponent,s.MessageTemplateDirective,h.ScrollAnchorDirective,v.SuggestedActionsComponent],k=function(){function e(){}return e=a.__decorate([_.NgModule({declarations:y.concat(b),exports:[y],imports:[i.ButtonModule,r.CommonModule,c.ResizeSensorModule]})],e)}();t.ChatModule=k},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var a=n(0),o=n(1),s=n(2),i=function(){function e(){}return Object.defineProperty(e.prototype,"attachment",{get:function(){return this._attachment},set:function(e){this._attachment=e,this.context={$implicit:this.attachment}},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"image",{get:function(){return 0===this.contentType.indexOf("image/")},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"unknown",{get:function(){return!this.image},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"contentType",{get:function(){return this.attachment.contentType||""},enumerable:!0,configurable:!0}),a.__decorate([o.Input(),a.__metadata("design:type",Object),a.__metadata("design:paramtypes",[Object])],e.prototype,"attachment",null),a.__decorate([o.Input(),a.__metadata("design:type",s.AttachmentTemplateDirective)],e.prototype,"template",void 0),e=a.__decorate([o.Component({selector:"kendo-chat-attachment",template:'\n <ng-container *ngIf="template">\n <ng-container *ngTemplateOutlet="template.templateRef; context: context;">\n </ng-container>\n </ng-container>\n\n <div *ngIf="!template" class="k-card">\n <div class="k-card-body">\n <h5 class="k-card-title" *ngIf="attachment.title">\n {{ attachment.title }}\n </h5>\n <h6 class="k-card-subtitle" *ngIf="attachment.subtitle">\n {{ attachment.subtitle }}\n </h6>\n <img *ngIf="image" [attr.src]="attachment.content" />\n <ng-container *ngIf="unknown">\n {{ attachment.content }}\n </ng-container>\n </div>\n </div>\n '})],e)}();t.AttachmentComponent=i},function(e,t){e.exports=s},function(e,t){e.exports=i},function(e,t){e.exports=r},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var a=n(0),o=n(1),s=n(3),i=n(8),r=function(e){function t(t){var n=e.call(this)||this;return n.service=t,n}var n;return a.__extends(t,e),n=t,Object.defineProperty(t.prototype,"override",{get:function(){return!0},enumerable:!0,configurable:!0}),t=n=a.__decorate([o.Component({providers:[{provide:i.Messages,useExisting:o.forwardRef((function(){return n}))}],selector:"kendo-chat-messages",template:""}),a.__metadata("design:paramtypes",[s.LocalizationService])],t)}(i.Messages);t.CustomMessagesComponent=r},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var a=n(0),o=n(1),s=function(){function e(){this.focused=!1}return e.prototype.onFocus=function(){this.focused=!0},e.prototype.onBlur=function(){this.focused=!1},a.__decorate([o.HostBinding("class.k-state-focused"),a.__metadata("design:type",Boolean)],e.prototype,"focused",void 0),a.__decorate([o.HostListener("focusin"),a.__metadata("design:type",Function),a.__metadata("design:paramtypes",[]),a.__metadata("design:returntype",void 0)],e.prototype,"onFocus",null),a.__decorate([o.HostListener("focusout"),a.__metadata("design:type",Function),a.__metadata("design:paramtypes",[]),a.__metadata("design:returntype",void 0)],e.prototype,"onBlur",null),e=a.__decorate([o.Directive({selector:"[kendoChatFocusedState]"})],e)}();t.FocusedStateDirective=s},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var a=n(0),o=n(1),s=function(){function e(){this.cssClass=!0,this.executeAction=new o.EventEmitter}return e.prototype.onClick=function(e){this.executeAction.next(e)},a.__decorate([o.Input(),a.__metadata("design:type",String)],e.prototype,"imageUrl",void 0),a.__decorate([o.Input(),a.__metadata("design:type",String)],e.prototype,"title",void 0),a.__decorate([o.Input(),a.__metadata("design:type",String)],e.prototype,"subtitle",void 0),a.__decorate([o.Input(),a.__metadata("design:type",Array)],e.prototype,"actions",void 0),a.__decorate([o.HostBinding("class.k-card"),a.__metadata("design:type",Boolean)],e.prototype,"cssClass",void 0),a.__decorate([o.Output(),a.__metadata("design:type",o.EventEmitter)],e.prototype,"executeAction",void 0),e=a.__decorate([o.Component({selector:"kendo-chat-hero-card",template:'\n <img class="k-card-image" [src]="imageUrl" *ngIf="imageUrl" />\n <div class="k-card-body">\n <h5 class="k-card-title" *ngIf="title">\n {{ title }}\n </h5>\n <h6 class="k-card-subtitle" *ngIf="subtitle">\n {{ subtitle }}\n </h6>\n </div>\n <div class="k-card-actions k-card-actions-vertical">\n <span class="k-card-action"\n *ngFor="let act of actions"\n >\n <button\n kendoButton fillMode="flat"\n (click)="onClick(act)">\n {{ act.title }}\n </button>\n </span>\n </div>\n '})],e)}();t.HeroCardComponent=s},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var a=n(0),o=n(1),s=n(3),i=n(8),r=function(e){function t(t){var n=e.call(this)||this;return n.service=t,n}var n;return a.__extends(t,e),n=t,t=n=a.__decorate([o.Directive({providers:[{provide:i.Messages,useExisting:o.forwardRef((function(){return n}))}],selector:"[kendoChatLocalizedMessages]"}),a.__metadata("design:paramtypes",[s.LocalizationService])],t)}(i.Messages);t.LocalizedMessagesDirective=r},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var a=n(0),o=n(1),s=n(26),i=n(27),r=n(5),c=n(2),l=function(e){function t(t){var n,a,o=e.call(this)||this;return o.zone=t,o.scrollPosition=0,o.selectedIndex=0,o.carouselKeyHandlers=((n={})[37]=function(e){return o.navigateTo(e,-1)},n[39]=function(e){return o.navigateTo(e,1)},n),o.listKeyHandlers=((a={})[38]=function(e){return o.navigateTo(e,-1)},a[40]=function(e){return o.navigateTo(e,1)},a),o}var n;return a.__extends(t,e),n=t,Object.defineProperty(t.prototype,"carousel",{get:function(){return"list"!==this.layout},enumerable:!0,configurable:!0}),t.prototype.ngAfterViewInit=function(){var e=this;this.zone.runOutsideAngular((function(){e.scrollSubscription=s.fromEvent(e.deck.nativeElement,"scroll").pipe(i.debounceTime(100)).subscribe((function(){return e.onScroll()}))}))},t.prototype.ngOnDestroy=function(){this.scrollSubscription.unsubscribe()},t.prototype.isSelected=function(e){return this.selectedIndex===e},t.prototype.itemKeydown=function(e,t){var n=("list"===this.layout?this.listKeyHandlers:this.carouselKeyHandlers)[e.keyCode];n&&n(e,t)},t.prototype.itemClick=function(e){this.select(e)},t.prototype.focus=function(){this.select(this.selectedIndex)},t.prototype.scrollTo=function(e){var t=this.deck.nativeElement,n=t.scrollWidth/this.items.length,a=t.scrollWidth-t.offsetWidth,o=t.scrollLeft+n*e;t.scrollLeft=Math.max(0,Math.min(a,o))},t.prototype.select=function(e){this.selectedIndex=e;var t=this.items.toArray()[e];t&&t.nativeElement.focus()},t.prototype.navigateTo=function(e,t){var n=this.selectedIndex,a=Math.max(0,Math.min(n+t,this.items.length-1));a!==n&&(this.select(a),e.preventDefault())},t.prototype.onScroll=function(){var e=this,t=this.deck.nativeElement;if(0!==t.scrollWidth){var n=t.scrollLeft/(t.scrollWidth-t.offsetWidth);n!==this.scrollPosition&&this.zone.run((function(){e.scrollPosition=n}))}},a.__decorate([o.Input(),a.__metadata("design:type",Array)],t.prototype,"attachments",void 0),a.__decorate([o.Input(),a.__metadata("design:type",String)],t.prototype,"layout",void 0),a.__decorate([o.Input(),a.__metadata("design:type",Boolean)],t.prototype,"tabbable",void 0),a.__decorate([o.Input(),a.__metadata("design:type",c.AttachmentTemplateDirective)],t.prototype,"template",void 0),a.__decorate([o.HostBinding("class.k-card-deck-scrollwrap"),a.__metadata("design:type",Boolean),a.__metadata("design:paramtypes",[])],t.prototype,"carousel",null),a.__decorate([o.ViewChild("deck",{read:o.ElementRef,static:!0}),a.__metadata("design:type",o.ElementRef)],t.prototype,"deck",void 0),a.__decorate([o.ViewChildren("item",{read:o.ElementRef}),a.__metadata("design:type",o.QueryList)],t.prototype,"items",void 0),t=n=a.__decorate([o.Component({providers:[{provide:r.ChatItem,useExisting:o.forwardRef((function(){return n}))}],selector:"kendo-chat-message-attachments",template:'\n <button\n *ngIf="carousel && scrollPosition > 0"\n (click)="scrollTo(-1)"\n class="k-button k-icon-button k-button-md k-rounded-md k-button-solid k-button-solid-base"\n tabindex="-1">\n <span class="k-icon k-button-icon k-i-arrow-chevron-left"></span>\n </button>\n <div #deck [class.k-card-deck]="carousel">\n <kendo-chat-attachment #item\n *ngFor="let att of attachments; index as index; first as first; last as last"\n [attachment]="att"\n [template]="template"\n [class.k-state-selected]="isSelected(index)"\n [class.k-state-focused]="isSelected(index)"\n [class.k-card-wrap]="true"\n [class.k-first]="first"\n [class.k-last]="last"\n [attr.tabindex]="tabbable && isSelected(index) ? \'0\' : \'-1\'"\n (click)="itemClick(index)"\n (keydown)="itemKeydown($event, att)"\n >\n </kendo-chat-attachment>\n </div>\n <button\n *ngIf="carousel && scrollPosition < 1"\n (click)="scrollTo(1)"\n class="k-button k-icon-button k-button-md k-rounded-md k-button-solid k-button-solid-base"\n tabindex="-1">\n <span class="k-icon k-button-icon k-i-arrow-chevron-right"></span>\n </button>\n '}),a.__metadata("design:paramtypes",[o.NgZone])],t)}(r.ChatItem);t.MessageAttachmentsComponent=l},function(e,t){e.exports=c},function(e,t){e.exports=l},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var a=n(0),o=n(1),s=n(5),i=n(4),r=n(9),c=function(e){function t(t,n){var a=e.call(this)||this;return a.element=t,a.intl=n,a.cssClass=!0,a}var n;return a.__extends(t,e),n=t,Object.defineProperty(t.prototype,"tabIndex",{get:function(){return this.tabbable?"0":"-1"},enumerable:!0,configurable:!0}),t.prototype.formatTimeStamp=function(e){return this.intl.formatDate(e,{datetime:"short"})},t.prototype.focus=function(){this.element.nativeElement.focus()},a.__decorate([o.Input(),a.__metadata("design:type",Object)],t.prototype,"message",void 0),a.__decorate([o.Input(),a.__metadata("design:type",Boolean)],t.prototype,"tabbable",void 0),a.__decorate([o.Input(),a.__metadata("design:type",i.MessageTemplateDirective)],t.prototype,"template",void 0),a.__decorate([o.HostBinding("class.k-message"),a.__metadata("design:type",Boolean)],t.prototype,"cssClass",void 0),a.__decorate([o.HostBinding("class.k-state-selected"),o.HostBinding("class.k-state-focused"),a.__metadata("design:type",Boolean)],t.prototype,"selected",void 0),a.__decorate([o.HostBinding("attr.tabIndex"),a.__metadata("design:type",String),a.__metadata("design:paramtypes",[])],t.prototype,"tabIndex",null),t=n=a.__decorate([o.Component({selector:"kendo-chat-message",providers:[{provide:s.ChatItem,useExisting:o.forwardRef((function(){return n}))}],template:'\n <time\n [attr.aria-hidden]="!selected"\n class="k-message-time"\n *ngIf="message.timestamp"\n >\n {{ formatTimeStamp(message.timestamp) }}\n </time>\n\n <ng-container *ngIf="!message.typing; else typing">\n <div class="k-bubble" *ngIf="template">\n <ng-container\n *ngTemplateOutlet="template.templateRef; context: { $implicit: message };"\n >\n </ng-container>\n </div>\n\n <div class="k-bubble" *ngIf="!template && message.text">\n {{message.text}}\n </div>\n </ng-container>\n\n <span\n class="k-message-status"\n *ngIf="message.status"\n >\n {{ message.status }}\n </span>\n\n <ng-template #typing>\n <div class="k-bubble">\n <div class="k-typing-indicator">\n <span></span>\n <span></span>\n <span></span>\n </div>\n </div>\n </ng-template>\n '}),a.__metadata("design:paramtypes",[o.ElementRef,r.IntlService])],t)}(s.ChatItem);t.MessageComponent=c},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var a=n(0),o=n(1),s=n(10),i=n(31),r=n(5),c=n(32),l=n(2),u=n(4),d=n(9),p=function(){function e(e,t){var n,a=this;this.element=e,this.intl=t,this.executeAction=new o.EventEmitter,this.navigate=new o.EventEmitter,this.resize=new o.EventEmitter,this.cssClass=!0,this.view=[],this.keyActions=((n={})[38]=function(e){return a.navigateTo(e,-1)},n[40]=function(e){return a.navigateTo(e,1)},n)}return Object.defineProperty(e.prototype,"messages",{get:function(){return this._messages},set:function(e){var t=e||[];this.view=c.chatView(t),this._messages=t},enumerable:!0,configurable:!0}),e.prototype.ngAfterViewInit=function(){this.selectedItem=this.items.last},e.prototype.onResize=function(){this.resize.emit()},e.prototype.formatTimeStamp=function(e){return this.intl.formatDate(e,{date:"full"})},e.prototype.onKeydown=function(e){var t=this.keyActions[e.keyCode];t&&t(e)},e.prototype.onBlur=function(e){var t=this,n=e.relatedTarget||document.activeElement;!i.closest(n,(function(e){return e===t.element.nativeElement}))&&this.select(null)},e.prototype.isOwnMessage=function(e){return c.isAuthor(this.user,e)},e.prototype.dispatchAction=function(e,t){var n=new s.ExecuteActionEvent(e,t);this.executeAction.emit(n)},e.prototype.trackGroup=function(e,t){return t.trackBy},e.prototype.select=function(e){var t=this.selectedItem;t&&(t.selected=!1),e&&(e.selected=!0,this.selectedItem=e)},e.prototype.last=function(e){if(e&&0!==e.length)return e[e.length-1]},e.prototype.navigateTo=function(e,t){var n=this.items.toArray(),a=this.selectedItem,o=n.indexOf(a),s=n[Math.max(0,Math.min(o+t,this.items.length-1))];s!==a&&(this.select(s),s.focus(),this.navigate.emit(),e.preventDefault())},a.__decorate([o.Input(),a.__metadata("design:type",Array),a.__metadata("design:paramtypes",[Array])],e.prototype,"messages",null),a.__decorate([o.Input(),a.__metadata("design:type",l.AttachmentTemplateDirective)],e.prototype,"attachmentTemplate",void 0),a.__decorate([o.Input(),a.__metadata("design:type",u.MessageTemplateDirective)],e.prototype,"messageTemplate",void 0),a.__decorate([o.Input(),a.__metadata("design:type",Object)],e.prototype,"user",void 0),a.__decorate([o.Output(),a.__metadata("design:type",o.EventEmitter)],e.prototype,"executeAction",void 0),a.__decorate([o.Output(),a.__metadata("design:type",o.EventEmitter)],e.prototype,"navigate",void 0),a.__decorate([o.Output(),a.__metadata("design:type",o.EventEmitter)],e.prototype,"resize",void 0),a.__decorate([o.ViewChildren(r.ChatItem),a.__metadata("design:type",o.QueryList)],e.prototype,"items",void 0),a.__decorate([o.HostBinding("class.k-message-list-content"),a.__metadata("design:type",Boolean)],e.prototype,"cssClass",void 0),a.__decorate([o.HostListener("keydown",["$event"]),a.__metadata("design:type",Function),a.__metadata("design:paramtypes",[Object]),a.__metadata("design:returntype",void 0)],e.prototype,"onKeydown",null),a.__decorate([o.HostListener("focusout",["$event"]),a.__metadata("design:type",Function),a.__metadata("design:paramtypes",[FocusEvent]),a.__metadata("design:returntype",void 0)],e.prototype,"onBlur",null),e=a.__decorate([o.Component({selector:"kendo-chat-message-list",template:'\n <ng-container *ngFor="let group of view; last as lastGroup; trackBy: trackGroup">\n <ng-container [ngSwitch]="group.type">\n <div\n *ngSwitchCase="\'date-marker\'"\n class="k-timestamp"\n >\n {{ formatTimeStamp(group.timestamp) }}\n </div>\n <div\n *ngSwitchCase="\'message-group\'"\n class="k-message-group"\n [class.k-alt]="isOwnMessage(group.messages[0])"\n [class.k-no-avatar]="!group.author.avatarUrl"\n >\n <img\n *ngIf="group.author.avatarUrl"\n [attr.src]="group.author.avatarUrl"\n class="k-avatar"\n />\n <p *ngIf="group.author.name" class="k-author">{{ group.author.name }}</p>\n <ng-container\n *ngFor="let msg of group.messages; first as firstMessage; last as lastMessage"\n >\n <img *ngIf="msg.user?.avatarUrl" [src]="msg.user?.avatarUrl" class="k-avatar">\n <kendo-chat-message #message\n [message]="msg"\n [tabbable]="lastGroup && lastMessage"\n [template]="messageTemplate"\n (click)="select(message)"\n (focus)="select(message)"\n [class.k-only]="group.messages.length === 1"\n [class.k-first]="group.messages.length > 1 && firstMessage"\n [class.k-last]="group.messages.length > 1 && lastMessage"\n >\n </kendo-chat-message>\n\n <kendo-chat-attachment\n *ngIf="msg.attachments && msg.attachments.length === 1"\n [attachment]="msg.attachments[0]"\n [template]="attachmentTemplate"\n >\n </kendo-chat-attachment>\n </ng-container>\n </div>\n\n <kendo-chat-message-attachments #attachments\n *ngSwitchCase="\'attachment-group\'"\n [attachments]="group.attachments"\n [layout]="group.attachmentLayout"\n [tabbable]="lastGroup"\n [template]="attachmentTemplate"\n (click)="select(attachments)"\n (focus)="select(attachments)"\n >\n </kendo-chat-message-attachments>\n\n <kendo-chat-suggested-actions #actions\n *ngSwitchCase="\'action-group\'"\n [actions]="group.actions"\n [tabbable]="lastGroup"\n (dispatch)="dispatchAction($event, last(group.messages))"\n (click)="select(actions)"\n (focus)="select(actions)"\n >\n </kendo-chat-suggested-actions>\n </ng-container>\n </ng-container>\n <kendo-resize-sensor (resize)="onResize()">\n </kendo-resize-sensor>\n '}),a.__metadata("design:paramtypes",[o.ElementRef,d.IntlService])],e)}();t.MessageListComponent=p},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var a=function(){function e(){this.prevented=!1}return e.prototype.preventDefault=function(){this.prevented=!0},e.prototype.isDefaultPrevented=function(){return this.prevented},e}();t.PreventableEvent=a},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.closest=function(e,t){for(;e&&!t(e);)e=e.parentNode;return e}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var a=n(1);t.isAuthor=function(e,t){return e&&t.author&&e.id===t.author.id};var o=function(e){return e[e.length-1]},s=function(e){return function(n,s,i){var r=i===e-1;return function(e,t){var n,a,s=t.timestamp,i=o(e);if(s&&(!i||(n=s,a=i.timestamp,n&&a&&(a.getDate()!==n.getDate()||a.getMonth()!==n.getMonth()||a.getFullYear()!==n.getFullYear())))){var r={type:"date-marker",timestamp:s,trackBy:s.getTime()};e.push(r)}}(n,s),function(e,n,s){var i,r=o(e);if(a.isDevMode()&&!n.author)throw new Error("Author must be set for message: "+JSON.stringify(n));n.typing&&!s||(r&&"message-group"===r.type&&(i=r.messages),i&&t.isAuthor(n.author,o(i))?i.push(n):e.push({type:"message-group",messages:[n],author:n.author,timestamp:n.timestamp,trackBy:n}))}(n,s,r),s.attachments&&s.attachments.length>1&&n.push({type:"attachment-group",attachments:s.attachments,attachmentLayout:s.attachmentLayout,timestamp:s.timestamp,trackBy:s}),s.suggestedActions&&r&&n.push({type:"action-group",actions:s.suggestedActions,timestamp:s.timestamp,trackBy:s}),n}};t.chatView=function(e){return e.reduce(s(e.length),[])}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var a=n(0),o=n(1),s=function(){function e(e,t,n){this.element=e,this.zone=t,this.renderer=n,this.autoScroll=!0,this.autoScrollChange=new o.EventEmitter,this.overflowAnchor="none",this.scrolling=!1}return e.prototype.ngOnInit=function(){var e=this;this.zone.runOutsideAngular((function(){e.unsubscribe=e.renderer.listen(e.element.nativeElement,"scroll",(function(){return e.onScroll()}))}))},e.prototype.ngAfterViewInit=function(){this.scrollToBottom()},e.prototype.ngOnDestroy=function(){this.unsubscribe&&this.unsubscribe()},e.prototype.onScroll=function(){var e=this;if(!this.scrolling){var t=this.element.nativeElement,n=t.scrollTop+t.offsetHeight,a=t.scrollHeight-n<2;this.autoScroll!==a&&this.zone.run((function(){e.autoScroll=a,e.autoScrollChange.emit(e.autoScroll)}))}},e.prototype.scrollToBottom=function(){var e=this;if(this.autoScroll){var t=this.element.nativeElement;t.scrollTop=t.scrollHeight-t.clientHeight,this.scrolling=!0,this.zone.runOutsideAngular((function(){return setTimeout((function(){return e.scrolling=!1}),1e3)}))}},a.__decorate([o.Input(),a.__metadata("design:type",Boolean)],e.prototype,"autoScroll",void 0),a.__decorate([o.Output(),a.__metadata("design:type",o.EventEmitter)],e.prototype,"autoScrollChange",void 0),a.__decorate([o.HostBinding("style.overflow-anchor"),a.__metadata("design:type",String)],e.prototype,"overflowAnchor",void 0),e=a.__decorate([o.Directive({selector:"[kendoChatScrollAnchor]",exportAs:"scrollAnchor"}),a.__metadata("design:paramtypes",[o.ElementRef,o.NgZone,o.Renderer2])],e)}();t.ScrollAnchorDirective=s},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var a=n(0),o=n(1),s=n(5),i=function(e){function t(){var t,n=null!==e&&e.apply(this,arguments)||this;return n.dispatch=new o.EventEmitter,n.defaultClass=!0,n.selectedIndex=0,n.keyHandlers=((t={})[37]=function(e){return n.navigateTo(e,-1)},t[39]=function(e){return n.navigateTo(e,1)},t[13]=function(e,t){return n.actionClick(t)},t),n}var n;return a.__extends(t,e),n=t,t.prototype.isSelected=function(e){return this.selected&&this.selectedIndex===e},t.prototype.actionClick=function(e){this.dispatch.next(e)},t.prototype.actionKeydown=function(e,t){var n=this.keyHandlers[e.keyCode];n&&n(e,t)},t.prototype.focus=function(){this.select(this.selectedIndex)},t.prototype.select=function(e){this.selectedIndex=e;var t=this.items.toArray()[e];t&&t.nativeElement.focus()},t.prototype.navigateTo=function(e,t){var n=this.selectedIndex,a=Math.max(0,Math.min(n+t,this.items.length-1));a!==n&&(this.select(a),e.preventDefault())},a.__decorate([o.Input(),a.__metadata("design:type",Array)],t.prototype,"actions",void 0),a.__decorate([o.Input(),a.__metadata("design:type",Boolean)],t.prototype,"tabbable",void 0),a.__decorate([o.Output(),a.__metadata("design:type",o.EventEmitter)],t.prototype,"dispatch",void 0),a.__decorate([o.HostBinding("class.k-quick-replies"),a.__metadata("design:type",Boolean)],t.prototype,"defaultClass",void 0),a.__decorate([o.ViewChildren("item"),a.__metadata("design:type",o.QueryList)],t.prototype,"items",void 0),t=n=a.__decorate([o.Component({selector:"kendo-chat-suggested-actions",providers:[{provide:s.ChatItem,useExisting:o.forwardRef((function(){return n}))}],template:'\n <span #item\n *ngFor="let action of actions; index as index; first as first; last as last"\n class="k-quick-reply"\n [class.k-state-selected]="isSelected(index)"\n [class.k-state-focused]="isSelected(index)"\n [class.k-first]="first"\n [class.k-last]="last"\n [attr.tabindex]="tabbable && selectedIndex === index ? \'0\' : \'-1\'"\n (click)="actionClick(action)"\n (keydown)="actionKeydown($event, action)"\n >\n {{ action.title || action.value }}\n </span>\n '})],t)}(s.ChatItem);t.SuggestedActionsComponent=i}])}));
|
|
@@ -9,7 +9,7 @@ export var packageMetadata = {
|
|
|
9
9
|
name: '@progress/kendo-angular-conversational-ui',
|
|
10
10
|
productName: 'Kendo UI for Angular',
|
|
11
11
|
productCodes: ['KENDOUIANGULAR', 'KENDOUICOMPLETE'],
|
|
12
|
-
publishDate:
|
|
12
|
+
publishDate: 1646820248,
|
|
13
13
|
version: '',
|
|
14
14
|
licensingDocsUrl: 'https://www.telerik.com/kendo-angular-ui/my-license/?utm_medium=product&utm_source=kendoangular&utm_campaign=kendo-ui-angular-purchase-license-keys-warning'
|
|
15
15
|
};
|
|
@@ -9,7 +9,7 @@ export const packageMetadata = {
|
|
|
9
9
|
name: '@progress/kendo-angular-conversational-ui',
|
|
10
10
|
productName: 'Kendo UI for Angular',
|
|
11
11
|
productCodes: ['KENDOUIANGULAR', 'KENDOUICOMPLETE'],
|
|
12
|
-
publishDate:
|
|
12
|
+
publishDate: 1646820248,
|
|
13
13
|
version: '',
|
|
14
14
|
licensingDocsUrl: 'https://www.telerik.com/kendo-angular-ui/my-license/?utm_medium=product&utm_source=kendoangular&utm_campaign=kendo-ui-angular-purchase-license-keys-warning'
|
|
15
15
|
};
|
package/dist/fesm2015/index.js
CHANGED
|
@@ -105,7 +105,7 @@ const packageMetadata = {
|
|
|
105
105
|
name: '@progress/kendo-angular-conversational-ui',
|
|
106
106
|
productName: 'Kendo UI for Angular',
|
|
107
107
|
productCodes: ['KENDOUIANGULAR', 'KENDOUICOMPLETE'],
|
|
108
|
-
publishDate:
|
|
108
|
+
publishDate: 1646820248,
|
|
109
109
|
version: '',
|
|
110
110
|
licensingDocsUrl: 'https://www.telerik.com/kendo-angular-ui/my-license/?utm_medium=product&utm_source=kendoangular&utm_campaign=kendo-ui-angular-purchase-license-keys-warning'
|
|
111
111
|
};
|
package/dist/fesm5/index.js
CHANGED
|
@@ -108,7 +108,7 @@ var packageMetadata = {
|
|
|
108
108
|
name: '@progress/kendo-angular-conversational-ui',
|
|
109
109
|
productName: 'Kendo UI for Angular',
|
|
110
110
|
productCodes: ['KENDOUIANGULAR', 'KENDOUICOMPLETE'],
|
|
111
|
-
publishDate:
|
|
111
|
+
publishDate: 1646820248,
|
|
112
112
|
version: '',
|
|
113
113
|
licensingDocsUrl: 'https://www.telerik.com/kendo-angular-ui/my-license/?utm_medium=product&utm_source=kendoangular&utm_campaign=kendo-ui-angular-purchase-license-keys-warning'
|
|
114
114
|
};
|
|
@@ -11,7 +11,7 @@ exports.packageMetadata = {
|
|
|
11
11
|
name: '@progress/kendo-angular-conversational-ui',
|
|
12
12
|
productName: 'Kendo UI for Angular',
|
|
13
13
|
productCodes: ['KENDOUIANGULAR', 'KENDOUICOMPLETE'],
|
|
14
|
-
publishDate:
|
|
14
|
+
publishDate: 1646820248,
|
|
15
15
|
version: '',
|
|
16
16
|
licensingDocsUrl: 'https://www.telerik.com/kendo-angular-ui/my-license/?utm_medium=product&utm_source=kendoangular&utm_campaign=kendo-ui-angular-purchase-license-keys-warning'
|
|
17
17
|
};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
* Copyright © 2021 Progress Software Corporation. All rights reserved.
|
|
3
3
|
* Licensed under commercial license. See LICENSE.md in the project root for more information
|
|
4
4
|
*-------------------------------------------------------------------------------------------*/
|
|
5
|
-
System.register("@progress/kendo-angular-conversational-ui",["tslib","@angular/common","@progress/kendo-angular-buttons","@angular/core","@progress/kendo-angular-common","@progress/kendo-licensing","@progress/kendo-angular-l10n","rxjs/operators","rxjs","@progress/kendo-angular-intl"],function(i){var s,r,c,l,d,u,p,m,g,_;function t(e){return e.__useDefault?e.default:e}return{setters:[function(e){s=t(e)},function(e){r=t(e)},function(e){c=t(e)},function(e){l=t(e)},function(e){d=t(e)},function(e){u=t(e)},function(e){p=t(e)},function(e){m=t(e)},function(e){g=t(e)},function(e){_=t(e)}],execute:function(){function a(e){if(o[e])return o[e].exports;var t=o[e]={i:e,l:!1,exports:{}};return n[e].call(t.exports,t,t.exports,a),t.l=!0,t.exports}var n,o;n=[function(e,t){e.exports=s},function(e,t){e.exports=l},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var a=n(33),a=(t.ChatComponent=a.ChatComponent,n(10)),a=(t.AttachmentTemplateDirective=a.AttachmentTemplateDirective,n(4));t.MessageTemplateDirective=a.MessageTemplateDirective},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ChatItem=function(){}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var a=n(0),n=n(1),a=a.__decorate([n.Directive({selector:"[kendoChatMessageTemplate]"}),a.__param(0,n.Optional()),a.__metadata("design:paramtypes",[n.TemplateRef])],o);function o(e){this.templateRef=e}t.MessageTemplateDirective=a},function(e,t){e.exports=p},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SendMessageEvent=function(e){this.message=e}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var a,o=n(0),n=(a=n(15).PreventableEvent,o.__extends(s,a),s);function s(e,t){var n=a.call(this)||this;return n.action=e,n.message=t,n}t.ExecuteActionEvent=n},function(e,t){e.exports=_},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var a,o=n(0),s=n(1),n=(a=n(5).ComponentMessages,o.__extends(i,a),o.__decorate([s.Input(),o.__metadata("design:type",String)],i.prototype,"messagePlaceholder",void 0),o.__decorate([s.Input(),o.__metadata("design:type",String)],i.prototype,"send",void 0),i);function i(){return null!==a&&a.apply(this,arguments)||this}t.Messages=n},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var a=n(0),n=n(1),a=a.__decorate([n.Directive({selector:"[kendoChatAttachmentTemplate]"}),a.__param(0,n.Optional()),a.__metadata("design:paramtypes",[n.TemplateRef])],o);function o(e){this.templateRef=e}t.AttachmentTemplateDirective=a},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var a,o,s=n(0),i=n(1),n=n(3),s=(a=n.ChatItem,s.__extends(r,a),(o=r).prototype.isSelected=function(e){return this.selected&&this.selectedIndex===e},r.prototype.actionClick=function(e){this.dispatch.next(e)},r.prototype.actionKeydown=function(e,t){var n=this.keyHandlers[e.keyCode];n&&n(e,t)},r.prototype.focus=function(){this.select(this.selectedIndex)},r.prototype.select=function(e){this.selectedIndex=e;e=this.items.toArray()[e];e&&e.nativeElement.focus()},r.prototype.navigateTo=function(e,t){var n=this.selectedIndex,t=Math.max(0,Math.min(n+t,this.items.length-1));t!==n&&(this.select(t),e.preventDefault())},s.__decorate([i.Input(),s.__metadata("design:type",Array)],r.prototype,"actions",void 0),s.__decorate([i.Input(),s.__metadata("design:type",Boolean)],r.prototype,"tabbable",void 0),s.__decorate([i.Output(),s.__metadata("design:type",i.EventEmitter)],r.prototype,"dispatch",void 0),s.__decorate([i.HostBinding("class.k-quick-replies"),s.__metadata("design:type",Boolean)],r.prototype,"defaultClass",void 0),s.__decorate([i.ViewChildren("item"),s.__metadata("design:type",i.QueryList)],r.prototype,"items",void 0),o=s.__decorate([i.Component({selector:"kendo-chat-suggested-actions",providers:[{provide:n.ChatItem,useExisting:i.forwardRef(function(){return o})}],template:'\n <span #item\n *ngFor="let action of actions; index as index; first as first; last as last"\n class="k-quick-reply"\n [class.k-state-selected]="isSelected(index)"\n [class.k-state-focused]="isSelected(index)"\n [class.k-first]="first"\n [class.k-last]="last"\n [attr.tabindex]="tabbable && selectedIndex === index ? \'0\' : \'-1\'"\n (click)="actionClick(action)"\n (keydown)="actionKeydown($event, action)"\n >\n {{ action.title || action.value }}\n </span>\n '})],r));function r(){var e,n=null!==a&&a.apply(this,arguments)||this;return n.dispatch=new i.EventEmitter,n.defaultClass=!0,n.selectedIndex=0,n.keyHandlers=((e={})[37]=function(e){return n.navigateTo(e,-1)},e[39]=function(e){return n.navigateTo(e,1)},e[13]=function(e,t){return n.actionClick(t)},e),n}t.SuggestedActionsComponent=s},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var a=n(0),o=n(1),n=(s.prototype.ngOnInit=function(){var e=this;this.zone.runOutsideAngular(function(){e.unsubscribe=e.renderer.listen(e.element.nativeElement,"scroll",function(){return e.onScroll()})})},s.prototype.ngAfterViewInit=function(){this.scrollToBottom()},s.prototype.ngOnDestroy=function(){this.unsubscribe&&this.unsubscribe()},s.prototype.onScroll=function(){var e,t,n,a=this;this.scrolling||(t=(e=this.element.nativeElement).scrollTop+e.offsetHeight,n=e.scrollHeight-t<2,this.autoScroll!==n&&this.zone.run(function(){a.autoScroll=n,a.autoScrollChange.emit(a.autoScroll)}))},s.prototype.scrollToBottom=function(){var e,t=this;this.autoScroll&&((e=this.element.nativeElement).scrollTop=e.scrollHeight-e.clientHeight,this.scrolling=!0,this.zone.runOutsideAngular(function(){return setTimeout(function(){return t.scrolling=!1},1e3)}))},a.__decorate([o.Input(),a.__metadata("design:type",Boolean)],s.prototype,"autoScroll",void 0),a.__decorate([o.Output(),a.__metadata("design:type",o.EventEmitter)],s.prototype,"autoScrollChange",void 0),a.__decorate([o.HostBinding("style.overflow-anchor"),a.__metadata("design:type",String)],s.prototype,"overflowAnchor",void 0),a.__decorate([o.Directive({selector:"[kendoChatScrollAnchor]",exportAs:"scrollAnchor"}),a.__metadata("design:paramtypes",[o.ElementRef,o.NgZone,o.Renderer2])],s));function s(e,t,n){this.element=e,this.zone=t,this.renderer=n,this.autoScroll=!0,this.autoScrollChange=new o.EventEmitter,this.overflowAnchor="none",this.scrolling=!1}t.ScrollAnchorDirective=n},function(e,l,t){"use strict";Object.defineProperty(l,"__esModule",{value:!0});function d(e){return e[e.length-1]}function n(c){return function(e,t,n){var a,n=n===c-1,o=(i=e,s=t.timestamp,r=d(i),!s||r&&(o=s,r=r.timestamp,!o||!r||r.getDate()===o.getDate()&&r.getMonth()===o.getMonth()&&r.getFullYear()===o.getFullYear())||(r={type:"date-marker",timestamp:s,trackBy:s.getTime()},i.push(r)),e),s=t,i=n,r=d(o);if(u.isDevMode()&&!s.author)throw new Error("Author must be set for message: "+JSON.stringify(s));return s.typing&&!i||((a=r&&"message-group"===r.type?r.messages:a)&&l.isAuthor(s.author,d(a))?a.push(s):o.push({type:"message-group",messages:[s],author:s.author,timestamp:s.timestamp,trackBy:s})),t.attachments&&1<t.attachments.length&&e.push({type:"attachment-group",attachments:t.attachments,attachmentLayout:t.attachmentLayout,timestamp:t.timestamp,trackBy:t}),t.suggestedActions&&n&&e.push({type:"action-group",actions:t.suggestedActions,timestamp:t.timestamp,trackBy:t}),e}}var u=t(1);l.isAuthor=function(e,t){return e&&t.author&&e.id===t.author.id};l.chatView=function(e){return e.reduce(n(e.length),[])}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.closest=function(e,t){for(;e&&!t(e);)e=e.parentNode;return e}},function(e,t,n){"use strict";function a(){this.prevented=!1}Object.defineProperty(t,"__esModule",{value:!0}),a.prototype.preventDefault=function(){this.prevented=!0},a.prototype.isDefaultPrevented=function(){return this.prevented},t.PreventableEvent=a},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var a=n(0),o=n(1),s=n(7),i=n(14),r=n(3),c=n(13),l=n(2),d=n(4),n=n(8),l=(Object.defineProperty(u.prototype,"messages",{get:function(){return this._messages},set:function(e){e=e||[];this.view=c.chatView(e),this._messages=e},enumerable:!0,configurable:!0}),u.prototype.ngAfterViewInit=function(){this.selectedItem=this.items.last},u.prototype.onResize=function(){this.resize.emit()},u.prototype.formatTimeStamp=function(e){return this.intl.formatDate(e,{date:"full"})},u.prototype.onKeydown=function(e){var t=this.keyActions[e.keyCode];t&&t(e)},u.prototype.onBlur=function(e){var t=this,e=e.relatedTarget||document.activeElement;i.closest(e,function(e){return e===t.element.nativeElement})||this.select(null)},u.prototype.isOwnMessage=function(e){return c.isAuthor(this.user,e)},u.prototype.dispatchAction=function(e,t){e=new s.ExecuteActionEvent(e,t);this.executeAction.emit(e)},u.prototype.trackGroup=function(e,t){return t.trackBy},u.prototype.select=function(e){var t=this.selectedItem;t&&(t.selected=!1),e&&(e.selected=!0,this.selectedItem=e)},u.prototype.last=function(e){if(e&&0!==e.length)return e[e.length-1]},u.prototype.navigateTo=function(e,t){var n=this.items.toArray(),a=this.selectedItem,o=n.indexOf(a),n=n[Math.max(0,Math.min(o+t,this.items.length-1))];n!==a&&(this.select(n),n.focus(),this.navigate.emit(),e.preventDefault())},a.__decorate([o.Input(),a.__metadata("design:type",Array),a.__metadata("design:paramtypes",[Array])],u.prototype,"messages",null),a.__decorate([o.Input(),a.__metadata("design:type",l.AttachmentTemplateDirective)],u.prototype,"attachmentTemplate",void 0),a.__decorate([o.Input(),a.__metadata("design:type",d.MessageTemplateDirective)],u.prototype,"messageTemplate",void 0),a.__decorate([o.Input(),a.__metadata("design:type",Object)],u.prototype,"user",void 0),a.__decorate([o.Output(),a.__metadata("design:type",o.EventEmitter)],u.prototype,"executeAction",void 0),a.__decorate([o.Output(),a.__metadata("design:type",o.EventEmitter)],u.prototype,"navigate",void 0),a.__decorate([o.Output(),a.__metadata("design:type",o.EventEmitter)],u.prototype,"resize",void 0),a.__decorate([o.ViewChildren(r.ChatItem),a.__metadata("design:type",o.QueryList)],u.prototype,"items",void 0),a.__decorate([o.HostBinding("class.k-message-list-content"),a.__metadata("design:type",Boolean)],u.prototype,"cssClass",void 0),a.__decorate([o.HostListener("keydown",["$event"]),a.__metadata("design:type",Function),a.__metadata("design:paramtypes",[Object]),a.__metadata("design:returntype",void 0)],u.prototype,"onKeydown",null),a.__decorate([o.HostListener("focusout",["$event"]),a.__metadata("design:type",Function),a.__metadata("design:paramtypes",[FocusEvent]),a.__metadata("design:returntype",void 0)],u.prototype,"onBlur",null),a.__decorate([o.Component({selector:"kendo-chat-message-list",template:'\n <ng-container *ngFor="let group of view; last as lastGroup; trackBy: trackGroup">\n <ng-container [ngSwitch]="group.type">\n <div\n *ngSwitchCase="\'date-marker\'"\n class="k-timestamp"\n >\n {{ formatTimeStamp(group.timestamp) }}\n </div>\n <div\n *ngSwitchCase="\'message-group\'"\n class="k-message-group"\n [class.k-alt]="isOwnMessage(group.messages[0])"\n [class.k-no-avatar]="!group.author.avatarUrl"\n >\n <img\n *ngIf="group.author.avatarUrl"\n [attr.src]="group.author.avatarUrl"\n class="k-avatar"\n />\n <p *ngIf="group.author.name" class="k-author">{{ group.author.name }}</p>\n <ng-container\n *ngFor="let msg of group.messages; first as firstMessage; last as lastMessage"\n >\n <img *ngIf="msg.user?.avatarUrl" [src]="msg.user?.avatarUrl" class="k-avatar">\n <kendo-chat-message #message\n [message]="msg"\n [tabbable]="lastGroup && lastMessage"\n [template]="messageTemplate"\n (click)="select(message)"\n (focus)="select(message)"\n [class.k-only]="group.messages.length === 1"\n [class.k-first]="group.messages.length > 1 && firstMessage"\n [class.k-last]="group.messages.length > 1 && lastMessage"\n >\n </kendo-chat-message>\n\n <kendo-chat-attachment\n *ngIf="msg.attachments && msg.attachments.length === 1"\n [attachment]="msg.attachments[0]"\n [template]="attachmentTemplate"\n >\n </kendo-chat-attachment>\n </ng-container>\n </div>\n\n <kendo-chat-message-attachments #attachments\n *ngSwitchCase="\'attachment-group\'"\n [attachments]="group.attachments"\n [layout]="group.attachmentLayout"\n [tabbable]="lastGroup"\n [template]="attachmentTemplate"\n (click)="select(attachments)"\n (focus)="select(attachments)"\n >\n </kendo-chat-message-attachments>\n\n <kendo-chat-suggested-actions #actions\n *ngSwitchCase="\'action-group\'"\n [actions]="group.actions"\n [tabbable]="lastGroup"\n (dispatch)="dispatchAction($event, last(group.messages))"\n (click)="select(actions)"\n (focus)="select(actions)"\n >\n </kendo-chat-suggested-actions>\n </ng-container>\n </ng-container>\n <kendo-resize-sensor (resize)="onResize()">\n </kendo-resize-sensor>\n '}),a.__metadata("design:paramtypes",[o.ElementRef,n.IntlService])],u));function u(e,t){var n=this;this.element=e,this.intl=t,this.executeAction=new o.EventEmitter,this.navigate=new o.EventEmitter,this.resize=new o.EventEmitter,this.cssClass=!0,this.view=[],this.keyActions=((e={})[38]=function(e){return n.navigateTo(e,-1)},e[40]=function(e){return n.navigateTo(e,1)},e)}t.MessageListComponent=l},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var a,o,s=n(0),i=n(1),r=n(3),c=n(4),n=n(8),c=(a=r.ChatItem,s.__extends(l,a),o=l,Object.defineProperty(l.prototype,"tabIndex",{get:function(){return this.tabbable?"0":"-1"},enumerable:!0,configurable:!0}),l.prototype.formatTimeStamp=function(e){return this.intl.formatDate(e,{datetime:"short"})},l.prototype.focus=function(){this.element.nativeElement.focus()},s.__decorate([i.Input(),s.__metadata("design:type",Object)],l.prototype,"message",void 0),s.__decorate([i.Input(),s.__metadata("design:type",Boolean)],l.prototype,"tabbable",void 0),s.__decorate([i.Input(),s.__metadata("design:type",c.MessageTemplateDirective)],l.prototype,"template",void 0),s.__decorate([i.HostBinding("class.k-message"),s.__metadata("design:type",Boolean)],l.prototype,"cssClass",void 0),s.__decorate([i.HostBinding("class.k-state-selected"),i.HostBinding("class.k-state-focused"),s.__metadata("design:type",Boolean)],l.prototype,"selected",void 0),s.__decorate([i.HostBinding("attr.tabIndex"),s.__metadata("design:type",String),s.__metadata("design:paramtypes",[])],l.prototype,"tabIndex",null),o=s.__decorate([i.Component({selector:"kendo-chat-message",providers:[{provide:r.ChatItem,useExisting:i.forwardRef(function(){return o})}],template:'\n <time\n [attr.aria-hidden]="!selected"\n class="k-message-time"\n *ngIf="message.timestamp"\n >\n {{ formatTimeStamp(message.timestamp) }}\n </time>\n\n <ng-container *ngIf="!message.typing; else typing">\n <div class="k-bubble" *ngIf="template">\n <ng-container\n *ngTemplateOutlet="template.templateRef; context: { $implicit: message };"\n >\n </ng-container>\n </div>\n\n <div class="k-bubble" *ngIf="!template && message.text">\n {{message.text}}\n </div>\n </ng-container>\n\n <span\n class="k-message-status"\n *ngIf="message.status"\n >\n {{ message.status }}\n </span>\n\n <ng-template #typing>\n <div class="k-bubble">\n <div class="k-typing-indicator">\n <span></span>\n <span></span>\n <span></span>\n </div>\n </div>\n </ng-template>\n '}),s.__metadata("design:paramtypes",[i.ElementRef,n.IntlService])],l));function l(e,t){var n=a.call(this)||this;return n.element=e,n.intl=t,n.cssClass=!0,n}t.MessageComponent=c},function(e,t){e.exports=m},function(e,t){e.exports=g},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var a,o,s=n(0),i=n(1),r=n(19),c=n(18),l=n(3),n=n(2),n=(a=l.ChatItem,s.__extends(d,a),o=d,Object.defineProperty(d.prototype,"carousel",{get:function(){return"list"!==this.layout},enumerable:!0,configurable:!0}),d.prototype.ngAfterViewInit=function(){var e=this;this.zone.runOutsideAngular(function(){e.scrollSubscription=r.fromEvent(e.deck.nativeElement,"scroll").pipe(c.debounceTime(100)).subscribe(function(){return e.onScroll()})})},d.prototype.ngOnDestroy=function(){this.scrollSubscription.unsubscribe()},d.prototype.isSelected=function(e){return this.selectedIndex===e},d.prototype.itemKeydown=function(e,t){var n=("list"===this.layout?this.listKeyHandlers:this.carouselKeyHandlers)[e.keyCode];n&&n(e,t)},d.prototype.itemClick=function(e){this.select(e)},d.prototype.focus=function(){this.select(this.selectedIndex)},d.prototype.scrollTo=function(e){var t=this.deck.nativeElement,n=t.scrollWidth/this.items.length,a=t.scrollWidth-t.offsetWidth,n=t.scrollLeft+n*e;t.scrollLeft=Math.max(0,Math.min(a,n))},d.prototype.select=function(e){this.selectedIndex=e;e=this.items.toArray()[e];e&&e.nativeElement.focus()},d.prototype.navigateTo=function(e,t){var n=this.selectedIndex,t=Math.max(0,Math.min(n+t,this.items.length-1));t!==n&&(this.select(t),e.preventDefault())},d.prototype.onScroll=function(){var e,t=this,n=this.deck.nativeElement;0!==n.scrollWidth&&(e=n.scrollLeft/(n.scrollWidth-n.offsetWidth))!==this.scrollPosition&&this.zone.run(function(){t.scrollPosition=e})},s.__decorate([i.Input(),s.__metadata("design:type",Array)],d.prototype,"attachments",void 0),s.__decorate([i.Input(),s.__metadata("design:type",String)],d.prototype,"layout",void 0),s.__decorate([i.Input(),s.__metadata("design:type",Boolean)],d.prototype,"tabbable",void 0),s.__decorate([i.Input(),s.__metadata("design:type",n.AttachmentTemplateDirective)],d.prototype,"template",void 0),s.__decorate([i.HostBinding("class.k-card-deck-scrollwrap"),s.__metadata("design:type",Boolean),s.__metadata("design:paramtypes",[])],d.prototype,"carousel",null),s.__decorate([i.ViewChild("deck",{read:i.ElementRef,static:!0}),s.__metadata("design:type",i.ElementRef)],d.prototype,"deck",void 0),s.__decorate([i.ViewChildren("item",{read:i.ElementRef}),s.__metadata("design:type",i.QueryList)],d.prototype,"items",void 0),o=s.__decorate([i.Component({providers:[{provide:l.ChatItem,useExisting:i.forwardRef(function(){return o})}],selector:"kendo-chat-message-attachments",template:'\n <button\n *ngIf="carousel && scrollPosition > 0"\n (click)="scrollTo(-1)"\n class="k-button k-icon-button k-button-md k-rounded-md k-button-solid k-button-solid-base"\n tabindex="-1">\n <span class="k-icon k-button-icon k-i-arrow-chevron-left"></span>\n </button>\n <div #deck [class.k-card-deck]="carousel">\n <kendo-chat-attachment #item\n *ngFor="let att of attachments; index as index; first as first; last as last"\n [attachment]="att"\n [template]="template"\n [class.k-state-selected]="isSelected(index)"\n [class.k-state-focused]="isSelected(index)"\n [class.k-card-wrap]="true"\n [class.k-first]="first"\n [class.k-last]="last"\n [attr.tabindex]="tabbable && isSelected(index) ? \'0\' : \'-1\'"\n (click)="itemClick(index)"\n (keydown)="itemKeydown($event, att)"\n >\n </kendo-chat-attachment>\n </div>\n <button\n *ngIf="carousel && scrollPosition < 1"\n (click)="scrollTo(1)"\n class="k-button k-icon-button k-button-md k-rounded-md k-button-solid k-button-solid-base"\n tabindex="-1">\n <span class="k-icon k-button-icon k-i-arrow-chevron-right"></span>\n </button>\n '}),s.__metadata("design:paramtypes",[i.NgZone])],d));function d(e){var t=a.call(this)||this;return t.zone=e,t.scrollPosition=0,t.selectedIndex=0,t.carouselKeyHandlers=((e={})[37]=function(e){return t.navigateTo(e,-1)},e[39]=function(e){return t.navigateTo(e,1)},e),t.listKeyHandlers=((e={})[38]=function(e){return t.navigateTo(e,-1)},e[40]=function(e){return t.navigateTo(e,1)},e),t}t.MessageAttachmentsComponent=n},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var a,o,s=n(0),i=n(1),r=n(5),n=n(9),n=(a=n.Messages,s.__extends(c,a),o=c,o=s.__decorate([i.Directive({providers:[{provide:n.Messages,useExisting:i.forwardRef(function(){return o})}],selector:"[kendoChatLocalizedMessages]"}),s.__metadata("design:paramtypes",[r.LocalizationService])],c));function c(e){var t=a.call(this)||this;return t.service=e,t}t.LocalizedMessagesDirective=n},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var a=n(0),o=n(1),n=(s.prototype.onClick=function(e){this.executeAction.next(e)},a.__decorate([o.Input(),a.__metadata("design:type",String)],s.prototype,"imageUrl",void 0),a.__decorate([o.Input(),a.__metadata("design:type",String)],s.prototype,"title",void 0),a.__decorate([o.Input(),a.__metadata("design:type",String)],s.prototype,"subtitle",void 0),a.__decorate([o.Input(),a.__metadata("design:type",Array)],s.prototype,"actions",void 0),a.__decorate([o.HostBinding("class.k-card"),a.__metadata("design:type",Boolean)],s.prototype,"cssClass",void 0),a.__decorate([o.Output(),a.__metadata("design:type",o.EventEmitter)],s.prototype,"executeAction",void 0),a.__decorate([o.Component({selector:"kendo-chat-hero-card",template:'\n <img class="k-card-image" [src]="imageUrl" *ngIf="imageUrl" />\n <div class="k-card-body">\n <h5 class="k-card-title" *ngIf="title">\n {{ title }}\n </h5>\n <h6 class="k-card-subtitle" *ngIf="subtitle">\n {{ subtitle }}\n </h6>\n </div>\n <div class="k-card-actions k-card-actions-vertical">\n <span class="k-card-action"\n *ngFor="let act of actions"\n >\n <button\n kendoButton fillMode="flat"\n (click)="onClick(act)">\n {{ act.title }}\n </button>\n </span>\n </div>\n '})],s));function s(){this.cssClass=!0,this.executeAction=new o.EventEmitter}t.HeroCardComponent=n},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var a=n(0),n=n(1),a=(o.prototype.onFocus=function(){this.focused=!0},o.prototype.onBlur=function(){this.focused=!1},a.__decorate([n.HostBinding("class.k-state-focused"),a.__metadata("design:type",Boolean)],o.prototype,"focused",void 0),a.__decorate([n.HostListener("focusin"),a.__metadata("design:type",Function),a.__metadata("design:paramtypes",[]),a.__metadata("design:returntype",void 0)],o.prototype,"onFocus",null),a.__decorate([n.HostListener("focusout"),a.__metadata("design:type",Function),a.__metadata("design:paramtypes",[]),a.__metadata("design:returntype",void 0)],o.prototype,"onBlur",null),a.__decorate([n.Directive({selector:"[kendoChatFocusedState]"})],o));function o(){this.focused=!1}t.FocusedStateDirective=a},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var a,o,s=n(0),i=n(1),r=n(5),n=n(9),n=(a=n.Messages,s.__extends(c,a),o=c,Object.defineProperty(c.prototype,"override",{get:function(){return!0},enumerable:!0,configurable:!0}),o=s.__decorate([i.Component({providers:[{provide:n.Messages,useExisting:i.forwardRef(function(){return o})}],selector:"kendo-chat-messages",template:""}),s.__metadata("design:paramtypes",[r.LocalizationService])],c));function c(e){var t=a.call(this)||this;return t.service=e,t}t.CustomMessagesComponent=n},function(e,t){e.exports=d},function(e,t){e.exports=r},function(e,t){e.exports=c},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var a=n(0),o=n(1),n=n(2),n=(Object.defineProperty(s.prototype,"attachment",{get:function(){return this._attachment},set:function(e){this._attachment=e,this.context={$implicit:this.attachment}},enumerable:!0,configurable:!0}),Object.defineProperty(s.prototype,"image",{get:function(){return 0===this.contentType.indexOf("image/")},enumerable:!0,configurable:!0}),Object.defineProperty(s.prototype,"unknown",{get:function(){return!this.image},enumerable:!0,configurable:!0}),Object.defineProperty(s.prototype,"contentType",{get:function(){return this.attachment.contentType||""},enumerable:!0,configurable:!0}),a.__decorate([o.Input(),a.__metadata("design:type",Object),a.__metadata("design:paramtypes",[Object])],s.prototype,"attachment",null),a.__decorate([o.Input(),a.__metadata("design:type",n.AttachmentTemplateDirective)],s.prototype,"template",void 0),a.__decorate([o.Component({selector:"kendo-chat-attachment",template:'\n <ng-container *ngIf="template">\n <ng-container *ngTemplateOutlet="template.templateRef; context: context;">\n </ng-container>\n </ng-container>\n\n <div *ngIf="!template" class="k-card">\n <div class="k-card-body">\n <h5 class="k-card-title" *ngIf="attachment.title">\n {{ attachment.title }}\n </h5>\n <h6 class="k-card-subtitle" *ngIf="attachment.subtitle">\n {{ attachment.subtitle }}\n </h6>\n <img *ngIf="image" [attr.src]="attachment.content" />\n <ng-container *ngIf="unknown">\n {{ attachment.content }}\n </ng-container>\n </div>\n </div>\n '})],s));function s(){}t.AttachmentComponent=n},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var a=n(0),o=n(28),s=n(2),i=n(27),r=n(26),c=n(25),l=n(24),d=n(23),u=n(22),p=n(21),m=n(20),g=n(17),_=n(16),h=n(1),f=n(12),n=n(11),l=[s.ChatComponent,l.CustomMessagesComponent,s.AttachmentTemplateDirective,s.MessageTemplateDirective,u.HeroCardComponent],u=[o.AttachmentComponent,d.FocusedStateDirective,p.LocalizedMessagesDirective,m.MessageAttachmentsComponent,g.MessageComponent,_.MessageListComponent,s.MessageTemplateDirective,f.ScrollAnchorDirective,n.SuggestedActionsComponent],o=a.__decorate([h.NgModule({declarations:l.concat(u),exports:[l],imports:[i.ButtonModule,r.CommonModule,c.ResizeSensorModule]})],y);function y(){}t.ChatModule=o},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.packageMetadata={name:"@progress/kendo-angular-conversational-ui",productName:"Kendo UI for Angular",productCodes:["KENDOUIANGULAR","KENDOUICOMPLETE"],publishDate:1646217043,version:"",licensingDocsUrl:"https://www.telerik.com/kendo-angular-ui/my-license/?utm_medium=product&utm_source=kendoangular&utm_campaign=kendo-ui-angular-purchase-license-keys-warning"}},function(e,t){e.exports=u},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});function a(){}var o=n(6),s={reply:function(e,t){t.sendMessage.emit(new o.SendMessageEvent({author:t.user,text:e.value,timestamp:new Date}))},call:function(e){window.open("tel:"+e.value)},openUrl:function(e){window.open(e.value)}};t.makeHandler=function(e){return s[e.type]||a}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var a=n(0),o=n(1),s=n(10),i=n(5),r=n(32),c=n(4),l=n(6),d=n(31),u=n(30),n=(Object.defineProperty(p.prototype,"className",{get:function(){return"k-widget k-chat"},enumerable:!0,configurable:!0}),Object.defineProperty(p.prototype,"dirAttr",{get:function(){return this.direction},enumerable:!0,configurable:!0}),p.prototype.ngOnChanges=function(){var e=this;this.zone.runOutsideAngular(function(){return setTimeout(function(){e.messageList.nativeElement.style.flex="1 1 auto"})})},p.prototype.ngAfterViewInit=function(){if(o.isDevMode()&&!this.user)throw new Error("User must be set and have a valid id.")},p.prototype.ngOnDestroy=function(){this.localizationChangeSubscription&&this.localizationChangeSubscription.unsubscribe()},p.prototype.sendClick=function(){var e=this.messageInput.nativeElement,t=e.value;t&&(t={author:this.user,text:t,timestamp:new Date},this.sendMessage.emit(new l.SendMessageEvent(t)),e.value=null,e.focus(),this.autoScroll=!0)},p.prototype.inputKeydown=function(e){13===e.keyCode&&this.sendClick()},p.prototype.dispatchAction=function(e){this.executeAction.emit(e),e.isDefaultPrevented()||(r.makeHandler(e.action)(e.action,this),this.messageInput.nativeElement.focus())},p.prototype.textFor=function(e){return this.localization.get(e)},a.__decorate([o.Input(),a.__metadata("design:type",Array)],p.prototype,"messages",void 0),a.__decorate([o.Input(),a.__metadata("design:type",Object)],p.prototype,"user",void 0),a.__decorate([o.Output(),a.__metadata("design:type",o.EventEmitter)],p.prototype,"sendMessage",void 0),a.__decorate([o.Output(),a.__metadata("design:type",o.EventEmitter)],p.prototype,"executeAction",void 0),a.__decorate([o.HostBinding("class"),a.__metadata("design:type",String),a.__metadata("design:paramtypes",[])],p.prototype,"className",null),a.__decorate([o.HostBinding("attr.dir"),a.__metadata("design:type",String),a.__metadata("design:paramtypes",[])],p.prototype,"dirAttr",null),a.__decorate([o.ContentChild(s.AttachmentTemplateDirective,{static:!1}),a.__metadata("design:type",s.AttachmentTemplateDirective)],p.prototype,"attachmentTemplate",void 0),a.__decorate([o.ContentChild(c.MessageTemplateDirective,{static:!1}),a.__metadata("design:type",c.MessageTemplateDirective)],p.prototype,"messageTemplate",void 0),a.__decorate([o.ViewChild("messageInput",{static:!0}),a.__metadata("design:type",o.ElementRef)],p.prototype,"messageInput",void 0),a.__decorate([o.ViewChild("messageList",{static:!0}),a.__metadata("design:type",o.ElementRef)],p.prototype,"messageList",void 0),a.__decorate([o.Component({providers:[i.LocalizationService,{provide:i.L10N_PREFIX,useValue:"kendo.chat"}],selector:"kendo-chat",template:'\n <ng-container\n kendoChatLocalizedMessages\n i18n-messagePlaceholder="kendo.chat.messagePlaceholder|The placholder text of the message text input"\n messagePlaceholder="Type a message..."\n\n i18n-send="kendo.chat.send|The text for the Send button"\n send="Send..."\n >\n </ng-container>\n\n <div\n #messageList\n class="k-message-list k-avatars"\n aria-live="polite" role="log"\n kendoChatScrollAnchor\n #anchor="scrollAnchor"\n [(autoScroll)]="autoScroll"\n >\n <kendo-chat-message-list\n [messages]="messages"\n [messageTemplate]="messageTemplate"\n [attachmentTemplate]="attachmentTemplate"\n [user]="user"\n (executeAction)="dispatchAction($event)"\n (resize)="anchor.scrollToBottom()"\n (navigate)="this.autoScroll = false"\n >\n </kendo-chat-message-list>\n </div>\n\n <div class="k-message-box">\n <input\n #messageInput\n kendoChatFocusedState\n type="text"\n class="k-input"\n [placeholder]="textFor(\'messagePlaceholder\')"\n (keydown)="inputKeydown($event)"\n >\n <button\n kendoButton\n fillMode="flat"\n class="k-button-send"\n tabindex="-1"\n [attr.title]="textFor(\'send\')"\n (click)="sendClick()"\n ><svg version="1.1" xmlns="http://www.w3.org/2000/svg" x="0px" y="0px" viewBox="0 0 16 16"><path d="M0,14.3c-0.1,0.6,0.3,0.8,0.8,0.6l14.8-6.5c0.5-0.2,0.5-0.6,0-0.8L0.8,1.1C0.3,0.9-0.1,1.1,0,1.7l0.7,4.2C0.8,6.5,1.4,7,1.9,7.1l8.8,0.8c0.6,0.1,0.6,0.1,0,0.2L1.9,8.9C1.4,9,0.8,9.5,0.7,10.1L0,14.3z"/></svg></button>\n </div>\n '}),a.__metadata("design:paramtypes",[i.LocalizationService,o.NgZone])],p));function p(e,t){var n=this;this.localization=e,this.zone=t,this.sendMessage=new o.EventEmitter,this.executeAction=new o.EventEmitter,this.autoScroll=!0,d.validatePackage(u.packageMetadata),this.direction=e.rtl?"rtl":"ltr",this.localizationChangeSubscription=e.changes.subscribe(function(e){e=e.rtl;n.direction=e?"rtl":"ltr"})}t.ChatComponent=n},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var a,o=n(0),s=(o.__exportStar(n(2),t),o.__exportStar(n(29),t),o.__exportStar(n(7),t),o.__exportStar(n(6),t),t);for(a in s)i(a,s[a])}],o={},a.m=n,a.c=o,a.d=function(e,t,n){a.o(e,t)||Object.defineProperty(e,t,{configurable:!1,enumerable:!0,get:n})},a.r=function(e){Object.defineProperty(e,"__esModule",{value:!0})},a.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return a.d(t,"a",t),t},a.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},a.p="",a(a.s=34)}}});
|
|
5
|
+
System.register("@progress/kendo-angular-conversational-ui",["tslib","@progress/kendo-angular-buttons","@angular/common","@progress/kendo-angular-common","@angular/core","@progress/kendo-angular-l10n","@progress/kendo-licensing","rxjs","rxjs/operators","@progress/kendo-angular-intl"],function(i){var s,r,c,l,d,u,p,m,g,_;function t(e){return e.__useDefault?e.default:e}return{setters:[function(e){s=t(e)},function(e){r=t(e)},function(e){c=t(e)},function(e){l=t(e)},function(e){d=t(e)},function(e){u=t(e)},function(e){p=t(e)},function(e){m=t(e)},function(e){g=t(e)},function(e){_=t(e)}],execute:function(){function a(e){if(o[e])return o[e].exports;var t=o[e]={i:e,l:!1,exports:{}};return n[e].call(t.exports,t,t.exports,a),t.l=!0,t.exports}var n,o;n=[function(e,t){e.exports=s},function(e,t){e.exports=d},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var a=n(33),a=(t.ChatComponent=a.ChatComponent,n(10)),a=(t.AttachmentTemplateDirective=a.AttachmentTemplateDirective,n(4));t.MessageTemplateDirective=a.MessageTemplateDirective},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ChatItem=function(){}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var a=n(0),n=n(1),a=a.__decorate([n.Directive({selector:"[kendoChatMessageTemplate]"}),a.__param(0,n.Optional()),a.__metadata("design:paramtypes",[n.TemplateRef])],o);function o(e){this.templateRef=e}t.MessageTemplateDirective=a},function(e,t){e.exports=u},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SendMessageEvent=function(e){this.message=e}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var a,o=n(0),n=(a=n(15).PreventableEvent,o.__extends(s,a),s);function s(e,t){var n=a.call(this)||this;return n.action=e,n.message=t,n}t.ExecuteActionEvent=n},function(e,t){e.exports=_},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var a,o=n(0),s=n(1),n=(a=n(5).ComponentMessages,o.__extends(i,a),o.__decorate([s.Input(),o.__metadata("design:type",String)],i.prototype,"messagePlaceholder",void 0),o.__decorate([s.Input(),o.__metadata("design:type",String)],i.prototype,"send",void 0),i);function i(){return null!==a&&a.apply(this,arguments)||this}t.Messages=n},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var a=n(0),n=n(1),a=a.__decorate([n.Directive({selector:"[kendoChatAttachmentTemplate]"}),a.__param(0,n.Optional()),a.__metadata("design:paramtypes",[n.TemplateRef])],o);function o(e){this.templateRef=e}t.AttachmentTemplateDirective=a},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var a,o,s=n(0),i=n(1),n=n(3),s=(a=n.ChatItem,s.__extends(r,a),(o=r).prototype.isSelected=function(e){return this.selected&&this.selectedIndex===e},r.prototype.actionClick=function(e){this.dispatch.next(e)},r.prototype.actionKeydown=function(e,t){var n=this.keyHandlers[e.keyCode];n&&n(e,t)},r.prototype.focus=function(){this.select(this.selectedIndex)},r.prototype.select=function(e){this.selectedIndex=e;e=this.items.toArray()[e];e&&e.nativeElement.focus()},r.prototype.navigateTo=function(e,t){var n=this.selectedIndex,t=Math.max(0,Math.min(n+t,this.items.length-1));t!==n&&(this.select(t),e.preventDefault())},s.__decorate([i.Input(),s.__metadata("design:type",Array)],r.prototype,"actions",void 0),s.__decorate([i.Input(),s.__metadata("design:type",Boolean)],r.prototype,"tabbable",void 0),s.__decorate([i.Output(),s.__metadata("design:type",i.EventEmitter)],r.prototype,"dispatch",void 0),s.__decorate([i.HostBinding("class.k-quick-replies"),s.__metadata("design:type",Boolean)],r.prototype,"defaultClass",void 0),s.__decorate([i.ViewChildren("item"),s.__metadata("design:type",i.QueryList)],r.prototype,"items",void 0),o=s.__decorate([i.Component({selector:"kendo-chat-suggested-actions",providers:[{provide:n.ChatItem,useExisting:i.forwardRef(function(){return o})}],template:'\n <span #item\n *ngFor="let action of actions; index as index; first as first; last as last"\n class="k-quick-reply"\n [class.k-state-selected]="isSelected(index)"\n [class.k-state-focused]="isSelected(index)"\n [class.k-first]="first"\n [class.k-last]="last"\n [attr.tabindex]="tabbable && selectedIndex === index ? \'0\' : \'-1\'"\n (click)="actionClick(action)"\n (keydown)="actionKeydown($event, action)"\n >\n {{ action.title || action.value }}\n </span>\n '})],r));function r(){var e,n=null!==a&&a.apply(this,arguments)||this;return n.dispatch=new i.EventEmitter,n.defaultClass=!0,n.selectedIndex=0,n.keyHandlers=((e={})[37]=function(e){return n.navigateTo(e,-1)},e[39]=function(e){return n.navigateTo(e,1)},e[13]=function(e,t){return n.actionClick(t)},e),n}t.SuggestedActionsComponent=s},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var a=n(0),o=n(1),n=(s.prototype.ngOnInit=function(){var e=this;this.zone.runOutsideAngular(function(){e.unsubscribe=e.renderer.listen(e.element.nativeElement,"scroll",function(){return e.onScroll()})})},s.prototype.ngAfterViewInit=function(){this.scrollToBottom()},s.prototype.ngOnDestroy=function(){this.unsubscribe&&this.unsubscribe()},s.prototype.onScroll=function(){var e,t,n,a=this;this.scrolling||(t=(e=this.element.nativeElement).scrollTop+e.offsetHeight,n=e.scrollHeight-t<2,this.autoScroll!==n&&this.zone.run(function(){a.autoScroll=n,a.autoScrollChange.emit(a.autoScroll)}))},s.prototype.scrollToBottom=function(){var e,t=this;this.autoScroll&&((e=this.element.nativeElement).scrollTop=e.scrollHeight-e.clientHeight,this.scrolling=!0,this.zone.runOutsideAngular(function(){return setTimeout(function(){return t.scrolling=!1},1e3)}))},a.__decorate([o.Input(),a.__metadata("design:type",Boolean)],s.prototype,"autoScroll",void 0),a.__decorate([o.Output(),a.__metadata("design:type",o.EventEmitter)],s.prototype,"autoScrollChange",void 0),a.__decorate([o.HostBinding("style.overflow-anchor"),a.__metadata("design:type",String)],s.prototype,"overflowAnchor",void 0),a.__decorate([o.Directive({selector:"[kendoChatScrollAnchor]",exportAs:"scrollAnchor"}),a.__metadata("design:paramtypes",[o.ElementRef,o.NgZone,o.Renderer2])],s));function s(e,t,n){this.element=e,this.zone=t,this.renderer=n,this.autoScroll=!0,this.autoScrollChange=new o.EventEmitter,this.overflowAnchor="none",this.scrolling=!1}t.ScrollAnchorDirective=n},function(e,l,t){"use strict";Object.defineProperty(l,"__esModule",{value:!0});function d(e){return e[e.length-1]}function n(c){return function(e,t,n){var a,n=n===c-1,o=(i=e,s=t.timestamp,r=d(i),!s||r&&(o=s,r=r.timestamp,!o||!r||r.getDate()===o.getDate()&&r.getMonth()===o.getMonth()&&r.getFullYear()===o.getFullYear())||(r={type:"date-marker",timestamp:s,trackBy:s.getTime()},i.push(r)),e),s=t,i=n,r=d(o);if(u.isDevMode()&&!s.author)throw new Error("Author must be set for message: "+JSON.stringify(s));return s.typing&&!i||((a=r&&"message-group"===r.type?r.messages:a)&&l.isAuthor(s.author,d(a))?a.push(s):o.push({type:"message-group",messages:[s],author:s.author,timestamp:s.timestamp,trackBy:s})),t.attachments&&1<t.attachments.length&&e.push({type:"attachment-group",attachments:t.attachments,attachmentLayout:t.attachmentLayout,timestamp:t.timestamp,trackBy:t}),t.suggestedActions&&n&&e.push({type:"action-group",actions:t.suggestedActions,timestamp:t.timestamp,trackBy:t}),e}}var u=t(1);l.isAuthor=function(e,t){return e&&t.author&&e.id===t.author.id};l.chatView=function(e){return e.reduce(n(e.length),[])}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.closest=function(e,t){for(;e&&!t(e);)e=e.parentNode;return e}},function(e,t,n){"use strict";function a(){this.prevented=!1}Object.defineProperty(t,"__esModule",{value:!0}),a.prototype.preventDefault=function(){this.prevented=!0},a.prototype.isDefaultPrevented=function(){return this.prevented},t.PreventableEvent=a},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var a=n(0),o=n(1),s=n(7),i=n(14),r=n(3),c=n(13),l=n(2),d=n(4),n=n(8),l=(Object.defineProperty(u.prototype,"messages",{get:function(){return this._messages},set:function(e){e=e||[];this.view=c.chatView(e),this._messages=e},enumerable:!0,configurable:!0}),u.prototype.ngAfterViewInit=function(){this.selectedItem=this.items.last},u.prototype.onResize=function(){this.resize.emit()},u.prototype.formatTimeStamp=function(e){return this.intl.formatDate(e,{date:"full"})},u.prototype.onKeydown=function(e){var t=this.keyActions[e.keyCode];t&&t(e)},u.prototype.onBlur=function(e){var t=this,e=e.relatedTarget||document.activeElement;i.closest(e,function(e){return e===t.element.nativeElement})||this.select(null)},u.prototype.isOwnMessage=function(e){return c.isAuthor(this.user,e)},u.prototype.dispatchAction=function(e,t){e=new s.ExecuteActionEvent(e,t);this.executeAction.emit(e)},u.prototype.trackGroup=function(e,t){return t.trackBy},u.prototype.select=function(e){var t=this.selectedItem;t&&(t.selected=!1),e&&(e.selected=!0,this.selectedItem=e)},u.prototype.last=function(e){if(e&&0!==e.length)return e[e.length-1]},u.prototype.navigateTo=function(e,t){var n=this.items.toArray(),a=this.selectedItem,o=n.indexOf(a),n=n[Math.max(0,Math.min(o+t,this.items.length-1))];n!==a&&(this.select(n),n.focus(),this.navigate.emit(),e.preventDefault())},a.__decorate([o.Input(),a.__metadata("design:type",Array),a.__metadata("design:paramtypes",[Array])],u.prototype,"messages",null),a.__decorate([o.Input(),a.__metadata("design:type",l.AttachmentTemplateDirective)],u.prototype,"attachmentTemplate",void 0),a.__decorate([o.Input(),a.__metadata("design:type",d.MessageTemplateDirective)],u.prototype,"messageTemplate",void 0),a.__decorate([o.Input(),a.__metadata("design:type",Object)],u.prototype,"user",void 0),a.__decorate([o.Output(),a.__metadata("design:type",o.EventEmitter)],u.prototype,"executeAction",void 0),a.__decorate([o.Output(),a.__metadata("design:type",o.EventEmitter)],u.prototype,"navigate",void 0),a.__decorate([o.Output(),a.__metadata("design:type",o.EventEmitter)],u.prototype,"resize",void 0),a.__decorate([o.ViewChildren(r.ChatItem),a.__metadata("design:type",o.QueryList)],u.prototype,"items",void 0),a.__decorate([o.HostBinding("class.k-message-list-content"),a.__metadata("design:type",Boolean)],u.prototype,"cssClass",void 0),a.__decorate([o.HostListener("keydown",["$event"]),a.__metadata("design:type",Function),a.__metadata("design:paramtypes",[Object]),a.__metadata("design:returntype",void 0)],u.prototype,"onKeydown",null),a.__decorate([o.HostListener("focusout",["$event"]),a.__metadata("design:type",Function),a.__metadata("design:paramtypes",[FocusEvent]),a.__metadata("design:returntype",void 0)],u.prototype,"onBlur",null),a.__decorate([o.Component({selector:"kendo-chat-message-list",template:'\n <ng-container *ngFor="let group of view; last as lastGroup; trackBy: trackGroup">\n <ng-container [ngSwitch]="group.type">\n <div\n *ngSwitchCase="\'date-marker\'"\n class="k-timestamp"\n >\n {{ formatTimeStamp(group.timestamp) }}\n </div>\n <div\n *ngSwitchCase="\'message-group\'"\n class="k-message-group"\n [class.k-alt]="isOwnMessage(group.messages[0])"\n [class.k-no-avatar]="!group.author.avatarUrl"\n >\n <img\n *ngIf="group.author.avatarUrl"\n [attr.src]="group.author.avatarUrl"\n class="k-avatar"\n />\n <p *ngIf="group.author.name" class="k-author">{{ group.author.name }}</p>\n <ng-container\n *ngFor="let msg of group.messages; first as firstMessage; last as lastMessage"\n >\n <img *ngIf="msg.user?.avatarUrl" [src]="msg.user?.avatarUrl" class="k-avatar">\n <kendo-chat-message #message\n [message]="msg"\n [tabbable]="lastGroup && lastMessage"\n [template]="messageTemplate"\n (click)="select(message)"\n (focus)="select(message)"\n [class.k-only]="group.messages.length === 1"\n [class.k-first]="group.messages.length > 1 && firstMessage"\n [class.k-last]="group.messages.length > 1 && lastMessage"\n >\n </kendo-chat-message>\n\n <kendo-chat-attachment\n *ngIf="msg.attachments && msg.attachments.length === 1"\n [attachment]="msg.attachments[0]"\n [template]="attachmentTemplate"\n >\n </kendo-chat-attachment>\n </ng-container>\n </div>\n\n <kendo-chat-message-attachments #attachments\n *ngSwitchCase="\'attachment-group\'"\n [attachments]="group.attachments"\n [layout]="group.attachmentLayout"\n [tabbable]="lastGroup"\n [template]="attachmentTemplate"\n (click)="select(attachments)"\n (focus)="select(attachments)"\n >\n </kendo-chat-message-attachments>\n\n <kendo-chat-suggested-actions #actions\n *ngSwitchCase="\'action-group\'"\n [actions]="group.actions"\n [tabbable]="lastGroup"\n (dispatch)="dispatchAction($event, last(group.messages))"\n (click)="select(actions)"\n (focus)="select(actions)"\n >\n </kendo-chat-suggested-actions>\n </ng-container>\n </ng-container>\n <kendo-resize-sensor (resize)="onResize()">\n </kendo-resize-sensor>\n '}),a.__metadata("design:paramtypes",[o.ElementRef,n.IntlService])],u));function u(e,t){var n=this;this.element=e,this.intl=t,this.executeAction=new o.EventEmitter,this.navigate=new o.EventEmitter,this.resize=new o.EventEmitter,this.cssClass=!0,this.view=[],this.keyActions=((e={})[38]=function(e){return n.navigateTo(e,-1)},e[40]=function(e){return n.navigateTo(e,1)},e)}t.MessageListComponent=l},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var a,o,s=n(0),i=n(1),r=n(3),c=n(4),n=n(8),c=(a=r.ChatItem,s.__extends(l,a),o=l,Object.defineProperty(l.prototype,"tabIndex",{get:function(){return this.tabbable?"0":"-1"},enumerable:!0,configurable:!0}),l.prototype.formatTimeStamp=function(e){return this.intl.formatDate(e,{datetime:"short"})},l.prototype.focus=function(){this.element.nativeElement.focus()},s.__decorate([i.Input(),s.__metadata("design:type",Object)],l.prototype,"message",void 0),s.__decorate([i.Input(),s.__metadata("design:type",Boolean)],l.prototype,"tabbable",void 0),s.__decorate([i.Input(),s.__metadata("design:type",c.MessageTemplateDirective)],l.prototype,"template",void 0),s.__decorate([i.HostBinding("class.k-message"),s.__metadata("design:type",Boolean)],l.prototype,"cssClass",void 0),s.__decorate([i.HostBinding("class.k-state-selected"),i.HostBinding("class.k-state-focused"),s.__metadata("design:type",Boolean)],l.prototype,"selected",void 0),s.__decorate([i.HostBinding("attr.tabIndex"),s.__metadata("design:type",String),s.__metadata("design:paramtypes",[])],l.prototype,"tabIndex",null),o=s.__decorate([i.Component({selector:"kendo-chat-message",providers:[{provide:r.ChatItem,useExisting:i.forwardRef(function(){return o})}],template:'\n <time\n [attr.aria-hidden]="!selected"\n class="k-message-time"\n *ngIf="message.timestamp"\n >\n {{ formatTimeStamp(message.timestamp) }}\n </time>\n\n <ng-container *ngIf="!message.typing; else typing">\n <div class="k-bubble" *ngIf="template">\n <ng-container\n *ngTemplateOutlet="template.templateRef; context: { $implicit: message };"\n >\n </ng-container>\n </div>\n\n <div class="k-bubble" *ngIf="!template && message.text">\n {{message.text}}\n </div>\n </ng-container>\n\n <span\n class="k-message-status"\n *ngIf="message.status"\n >\n {{ message.status }}\n </span>\n\n <ng-template #typing>\n <div class="k-bubble">\n <div class="k-typing-indicator">\n <span></span>\n <span></span>\n <span></span>\n </div>\n </div>\n </ng-template>\n '}),s.__metadata("design:paramtypes",[i.ElementRef,n.IntlService])],l));function l(e,t){var n=a.call(this)||this;return n.element=e,n.intl=t,n.cssClass=!0,n}t.MessageComponent=c},function(e,t){e.exports=g},function(e,t){e.exports=m},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var a,o,s=n(0),i=n(1),r=n(19),c=n(18),l=n(3),n=n(2),n=(a=l.ChatItem,s.__extends(d,a),o=d,Object.defineProperty(d.prototype,"carousel",{get:function(){return"list"!==this.layout},enumerable:!0,configurable:!0}),d.prototype.ngAfterViewInit=function(){var e=this;this.zone.runOutsideAngular(function(){e.scrollSubscription=r.fromEvent(e.deck.nativeElement,"scroll").pipe(c.debounceTime(100)).subscribe(function(){return e.onScroll()})})},d.prototype.ngOnDestroy=function(){this.scrollSubscription.unsubscribe()},d.prototype.isSelected=function(e){return this.selectedIndex===e},d.prototype.itemKeydown=function(e,t){var n=("list"===this.layout?this.listKeyHandlers:this.carouselKeyHandlers)[e.keyCode];n&&n(e,t)},d.prototype.itemClick=function(e){this.select(e)},d.prototype.focus=function(){this.select(this.selectedIndex)},d.prototype.scrollTo=function(e){var t=this.deck.nativeElement,n=t.scrollWidth/this.items.length,a=t.scrollWidth-t.offsetWidth,n=t.scrollLeft+n*e;t.scrollLeft=Math.max(0,Math.min(a,n))},d.prototype.select=function(e){this.selectedIndex=e;e=this.items.toArray()[e];e&&e.nativeElement.focus()},d.prototype.navigateTo=function(e,t){var n=this.selectedIndex,t=Math.max(0,Math.min(n+t,this.items.length-1));t!==n&&(this.select(t),e.preventDefault())},d.prototype.onScroll=function(){var e,t=this,n=this.deck.nativeElement;0!==n.scrollWidth&&(e=n.scrollLeft/(n.scrollWidth-n.offsetWidth))!==this.scrollPosition&&this.zone.run(function(){t.scrollPosition=e})},s.__decorate([i.Input(),s.__metadata("design:type",Array)],d.prototype,"attachments",void 0),s.__decorate([i.Input(),s.__metadata("design:type",String)],d.prototype,"layout",void 0),s.__decorate([i.Input(),s.__metadata("design:type",Boolean)],d.prototype,"tabbable",void 0),s.__decorate([i.Input(),s.__metadata("design:type",n.AttachmentTemplateDirective)],d.prototype,"template",void 0),s.__decorate([i.HostBinding("class.k-card-deck-scrollwrap"),s.__metadata("design:type",Boolean),s.__metadata("design:paramtypes",[])],d.prototype,"carousel",null),s.__decorate([i.ViewChild("deck",{read:i.ElementRef,static:!0}),s.__metadata("design:type",i.ElementRef)],d.prototype,"deck",void 0),s.__decorate([i.ViewChildren("item",{read:i.ElementRef}),s.__metadata("design:type",i.QueryList)],d.prototype,"items",void 0),o=s.__decorate([i.Component({providers:[{provide:l.ChatItem,useExisting:i.forwardRef(function(){return o})}],selector:"kendo-chat-message-attachments",template:'\n <button\n *ngIf="carousel && scrollPosition > 0"\n (click)="scrollTo(-1)"\n class="k-button k-icon-button k-button-md k-rounded-md k-button-solid k-button-solid-base"\n tabindex="-1">\n <span class="k-icon k-button-icon k-i-arrow-chevron-left"></span>\n </button>\n <div #deck [class.k-card-deck]="carousel">\n <kendo-chat-attachment #item\n *ngFor="let att of attachments; index as index; first as first; last as last"\n [attachment]="att"\n [template]="template"\n [class.k-state-selected]="isSelected(index)"\n [class.k-state-focused]="isSelected(index)"\n [class.k-card-wrap]="true"\n [class.k-first]="first"\n [class.k-last]="last"\n [attr.tabindex]="tabbable && isSelected(index) ? \'0\' : \'-1\'"\n (click)="itemClick(index)"\n (keydown)="itemKeydown($event, att)"\n >\n </kendo-chat-attachment>\n </div>\n <button\n *ngIf="carousel && scrollPosition < 1"\n (click)="scrollTo(1)"\n class="k-button k-icon-button k-button-md k-rounded-md k-button-solid k-button-solid-base"\n tabindex="-1">\n <span class="k-icon k-button-icon k-i-arrow-chevron-right"></span>\n </button>\n '}),s.__metadata("design:paramtypes",[i.NgZone])],d));function d(e){var t=a.call(this)||this;return t.zone=e,t.scrollPosition=0,t.selectedIndex=0,t.carouselKeyHandlers=((e={})[37]=function(e){return t.navigateTo(e,-1)},e[39]=function(e){return t.navigateTo(e,1)},e),t.listKeyHandlers=((e={})[38]=function(e){return t.navigateTo(e,-1)},e[40]=function(e){return t.navigateTo(e,1)},e),t}t.MessageAttachmentsComponent=n},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var a,o,s=n(0),i=n(1),r=n(5),n=n(9),n=(a=n.Messages,s.__extends(c,a),o=c,o=s.__decorate([i.Directive({providers:[{provide:n.Messages,useExisting:i.forwardRef(function(){return o})}],selector:"[kendoChatLocalizedMessages]"}),s.__metadata("design:paramtypes",[r.LocalizationService])],c));function c(e){var t=a.call(this)||this;return t.service=e,t}t.LocalizedMessagesDirective=n},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var a=n(0),o=n(1),n=(s.prototype.onClick=function(e){this.executeAction.next(e)},a.__decorate([o.Input(),a.__metadata("design:type",String)],s.prototype,"imageUrl",void 0),a.__decorate([o.Input(),a.__metadata("design:type",String)],s.prototype,"title",void 0),a.__decorate([o.Input(),a.__metadata("design:type",String)],s.prototype,"subtitle",void 0),a.__decorate([o.Input(),a.__metadata("design:type",Array)],s.prototype,"actions",void 0),a.__decorate([o.HostBinding("class.k-card"),a.__metadata("design:type",Boolean)],s.prototype,"cssClass",void 0),a.__decorate([o.Output(),a.__metadata("design:type",o.EventEmitter)],s.prototype,"executeAction",void 0),a.__decorate([o.Component({selector:"kendo-chat-hero-card",template:'\n <img class="k-card-image" [src]="imageUrl" *ngIf="imageUrl" />\n <div class="k-card-body">\n <h5 class="k-card-title" *ngIf="title">\n {{ title }}\n </h5>\n <h6 class="k-card-subtitle" *ngIf="subtitle">\n {{ subtitle }}\n </h6>\n </div>\n <div class="k-card-actions k-card-actions-vertical">\n <span class="k-card-action"\n *ngFor="let act of actions"\n >\n <button\n kendoButton fillMode="flat"\n (click)="onClick(act)">\n {{ act.title }}\n </button>\n </span>\n </div>\n '})],s));function s(){this.cssClass=!0,this.executeAction=new o.EventEmitter}t.HeroCardComponent=n},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var a=n(0),n=n(1),a=(o.prototype.onFocus=function(){this.focused=!0},o.prototype.onBlur=function(){this.focused=!1},a.__decorate([n.HostBinding("class.k-state-focused"),a.__metadata("design:type",Boolean)],o.prototype,"focused",void 0),a.__decorate([n.HostListener("focusin"),a.__metadata("design:type",Function),a.__metadata("design:paramtypes",[]),a.__metadata("design:returntype",void 0)],o.prototype,"onFocus",null),a.__decorate([n.HostListener("focusout"),a.__metadata("design:type",Function),a.__metadata("design:paramtypes",[]),a.__metadata("design:returntype",void 0)],o.prototype,"onBlur",null),a.__decorate([n.Directive({selector:"[kendoChatFocusedState]"})],o));function o(){this.focused=!1}t.FocusedStateDirective=a},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var a,o,s=n(0),i=n(1),r=n(5),n=n(9),n=(a=n.Messages,s.__extends(c,a),o=c,Object.defineProperty(c.prototype,"override",{get:function(){return!0},enumerable:!0,configurable:!0}),o=s.__decorate([i.Component({providers:[{provide:n.Messages,useExisting:i.forwardRef(function(){return o})}],selector:"kendo-chat-messages",template:""}),s.__metadata("design:paramtypes",[r.LocalizationService])],c));function c(e){var t=a.call(this)||this;return t.service=e,t}t.CustomMessagesComponent=n},function(e,t){e.exports=l},function(e,t){e.exports=c},function(e,t){e.exports=r},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var a=n(0),o=n(1),n=n(2),n=(Object.defineProperty(s.prototype,"attachment",{get:function(){return this._attachment},set:function(e){this._attachment=e,this.context={$implicit:this.attachment}},enumerable:!0,configurable:!0}),Object.defineProperty(s.prototype,"image",{get:function(){return 0===this.contentType.indexOf("image/")},enumerable:!0,configurable:!0}),Object.defineProperty(s.prototype,"unknown",{get:function(){return!this.image},enumerable:!0,configurable:!0}),Object.defineProperty(s.prototype,"contentType",{get:function(){return this.attachment.contentType||""},enumerable:!0,configurable:!0}),a.__decorate([o.Input(),a.__metadata("design:type",Object),a.__metadata("design:paramtypes",[Object])],s.prototype,"attachment",null),a.__decorate([o.Input(),a.__metadata("design:type",n.AttachmentTemplateDirective)],s.prototype,"template",void 0),a.__decorate([o.Component({selector:"kendo-chat-attachment",template:'\n <ng-container *ngIf="template">\n <ng-container *ngTemplateOutlet="template.templateRef; context: context;">\n </ng-container>\n </ng-container>\n\n <div *ngIf="!template" class="k-card">\n <div class="k-card-body">\n <h5 class="k-card-title" *ngIf="attachment.title">\n {{ attachment.title }}\n </h5>\n <h6 class="k-card-subtitle" *ngIf="attachment.subtitle">\n {{ attachment.subtitle }}\n </h6>\n <img *ngIf="image" [attr.src]="attachment.content" />\n <ng-container *ngIf="unknown">\n {{ attachment.content }}\n </ng-container>\n </div>\n </div>\n '})],s));function s(){}t.AttachmentComponent=n},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var a=n(0),o=n(28),s=n(2),i=n(27),r=n(26),c=n(25),l=n(24),d=n(23),u=n(22),p=n(21),m=n(20),g=n(17),_=n(16),h=n(1),f=n(12),n=n(11),l=[s.ChatComponent,l.CustomMessagesComponent,s.AttachmentTemplateDirective,s.MessageTemplateDirective,u.HeroCardComponent],u=[o.AttachmentComponent,d.FocusedStateDirective,p.LocalizedMessagesDirective,m.MessageAttachmentsComponent,g.MessageComponent,_.MessageListComponent,s.MessageTemplateDirective,f.ScrollAnchorDirective,n.SuggestedActionsComponent],o=a.__decorate([h.NgModule({declarations:l.concat(u),exports:[l],imports:[i.ButtonModule,r.CommonModule,c.ResizeSensorModule]})],y);function y(){}t.ChatModule=o},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.packageMetadata={name:"@progress/kendo-angular-conversational-ui",productName:"Kendo UI for Angular",productCodes:["KENDOUIANGULAR","KENDOUICOMPLETE"],publishDate:1646820248,version:"",licensingDocsUrl:"https://www.telerik.com/kendo-angular-ui/my-license/?utm_medium=product&utm_source=kendoangular&utm_campaign=kendo-ui-angular-purchase-license-keys-warning"}},function(e,t){e.exports=p},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});function a(){}var o=n(6),s={reply:function(e,t){t.sendMessage.emit(new o.SendMessageEvent({author:t.user,text:e.value,timestamp:new Date}))},call:function(e){window.open("tel:"+e.value)},openUrl:function(e){window.open(e.value)}};t.makeHandler=function(e){return s[e.type]||a}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var a=n(0),o=n(1),s=n(10),i=n(5),r=n(32),c=n(4),l=n(6),d=n(31),u=n(30),n=(Object.defineProperty(p.prototype,"className",{get:function(){return"k-widget k-chat"},enumerable:!0,configurable:!0}),Object.defineProperty(p.prototype,"dirAttr",{get:function(){return this.direction},enumerable:!0,configurable:!0}),p.prototype.ngOnChanges=function(){var e=this;this.zone.runOutsideAngular(function(){return setTimeout(function(){e.messageList.nativeElement.style.flex="1 1 auto"})})},p.prototype.ngAfterViewInit=function(){if(o.isDevMode()&&!this.user)throw new Error("User must be set and have a valid id.")},p.prototype.ngOnDestroy=function(){this.localizationChangeSubscription&&this.localizationChangeSubscription.unsubscribe()},p.prototype.sendClick=function(){var e=this.messageInput.nativeElement,t=e.value;t&&(t={author:this.user,text:t,timestamp:new Date},this.sendMessage.emit(new l.SendMessageEvent(t)),e.value=null,e.focus(),this.autoScroll=!0)},p.prototype.inputKeydown=function(e){13===e.keyCode&&this.sendClick()},p.prototype.dispatchAction=function(e){this.executeAction.emit(e),e.isDefaultPrevented()||(r.makeHandler(e.action)(e.action,this),this.messageInput.nativeElement.focus())},p.prototype.textFor=function(e){return this.localization.get(e)},a.__decorate([o.Input(),a.__metadata("design:type",Array)],p.prototype,"messages",void 0),a.__decorate([o.Input(),a.__metadata("design:type",Object)],p.prototype,"user",void 0),a.__decorate([o.Output(),a.__metadata("design:type",o.EventEmitter)],p.prototype,"sendMessage",void 0),a.__decorate([o.Output(),a.__metadata("design:type",o.EventEmitter)],p.prototype,"executeAction",void 0),a.__decorate([o.HostBinding("class"),a.__metadata("design:type",String),a.__metadata("design:paramtypes",[])],p.prototype,"className",null),a.__decorate([o.HostBinding("attr.dir"),a.__metadata("design:type",String),a.__metadata("design:paramtypes",[])],p.prototype,"dirAttr",null),a.__decorate([o.ContentChild(s.AttachmentTemplateDirective,{static:!1}),a.__metadata("design:type",s.AttachmentTemplateDirective)],p.prototype,"attachmentTemplate",void 0),a.__decorate([o.ContentChild(c.MessageTemplateDirective,{static:!1}),a.__metadata("design:type",c.MessageTemplateDirective)],p.prototype,"messageTemplate",void 0),a.__decorate([o.ViewChild("messageInput",{static:!0}),a.__metadata("design:type",o.ElementRef)],p.prototype,"messageInput",void 0),a.__decorate([o.ViewChild("messageList",{static:!0}),a.__metadata("design:type",o.ElementRef)],p.prototype,"messageList",void 0),a.__decorate([o.Component({providers:[i.LocalizationService,{provide:i.L10N_PREFIX,useValue:"kendo.chat"}],selector:"kendo-chat",template:'\n <ng-container\n kendoChatLocalizedMessages\n i18n-messagePlaceholder="kendo.chat.messagePlaceholder|The placholder text of the message text input"\n messagePlaceholder="Type a message..."\n\n i18n-send="kendo.chat.send|The text for the Send button"\n send="Send..."\n >\n </ng-container>\n\n <div\n #messageList\n class="k-message-list k-avatars"\n aria-live="polite" role="log"\n kendoChatScrollAnchor\n #anchor="scrollAnchor"\n [(autoScroll)]="autoScroll"\n >\n <kendo-chat-message-list\n [messages]="messages"\n [messageTemplate]="messageTemplate"\n [attachmentTemplate]="attachmentTemplate"\n [user]="user"\n (executeAction)="dispatchAction($event)"\n (resize)="anchor.scrollToBottom()"\n (navigate)="this.autoScroll = false"\n >\n </kendo-chat-message-list>\n </div>\n\n <div class="k-message-box">\n <input\n #messageInput\n kendoChatFocusedState\n type="text"\n class="k-input"\n [placeholder]="textFor(\'messagePlaceholder\')"\n (keydown)="inputKeydown($event)"\n >\n <button\n kendoButton\n fillMode="flat"\n class="k-button-send"\n tabindex="-1"\n [attr.title]="textFor(\'send\')"\n (click)="sendClick()"\n ><svg version="1.1" xmlns="http://www.w3.org/2000/svg" x="0px" y="0px" viewBox="0 0 16 16"><path d="M0,14.3c-0.1,0.6,0.3,0.8,0.8,0.6l14.8-6.5c0.5-0.2,0.5-0.6,0-0.8L0.8,1.1C0.3,0.9-0.1,1.1,0,1.7l0.7,4.2C0.8,6.5,1.4,7,1.9,7.1l8.8,0.8c0.6,0.1,0.6,0.1,0,0.2L1.9,8.9C1.4,9,0.8,9.5,0.7,10.1L0,14.3z"/></svg></button>\n </div>\n '}),a.__metadata("design:paramtypes",[i.LocalizationService,o.NgZone])],p));function p(e,t){var n=this;this.localization=e,this.zone=t,this.sendMessage=new o.EventEmitter,this.executeAction=new o.EventEmitter,this.autoScroll=!0,d.validatePackage(u.packageMetadata),this.direction=e.rtl?"rtl":"ltr",this.localizationChangeSubscription=e.changes.subscribe(function(e){e=e.rtl;n.direction=e?"rtl":"ltr"})}t.ChatComponent=n},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var a,o=n(0),s=(o.__exportStar(n(2),t),o.__exportStar(n(29),t),o.__exportStar(n(7),t),o.__exportStar(n(6),t),t);for(a in s)i(a,s[a])}],o={},a.m=n,a.c=o,a.d=function(e,t,n){a.o(e,t)||Object.defineProperty(e,t,{configurable:!1,enumerable:!0,get:n})},a.r=function(e){Object.defineProperty(e,"__esModule",{value:!0})},a.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return a.d(t,"a",t),t},a.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},a.p="",a(a.s=34)}}});
|
package/package.json
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"description": "Kendo UI for Angular Conversational UI components",
|
|
4
4
|
"author": "Progress",
|
|
5
5
|
"license": "SEE LICENSE IN LICENSE.md",
|
|
6
|
-
"version": "4.0.
|
|
6
|
+
"version": "4.0.2-dev.202203091004",
|
|
7
7
|
"main": "dist/npm/index.js",
|
|
8
8
|
"module": "dist/fesm5/index.js",
|
|
9
9
|
"es2015": "dist/fesm2015/index.js",
|
|
@@ -68,7 +68,7 @@
|
|
|
68
68
|
"@progress/kendo-angular-jest-preset": "^2.0.0",
|
|
69
69
|
"@progress/kendo-angular-l10n": "^3.0.0",
|
|
70
70
|
"@progress/kendo-angular-popup": "^4.0.0",
|
|
71
|
-
"@progress/kendo-angular-tasks": "cdn-bundle-v18",
|
|
71
|
+
"@progress/kendo-angular-tasks": "18.1.2-cdn-bundle-v18.10",
|
|
72
72
|
"@progress/kendo-licensing": "^1.0.2",
|
|
73
73
|
"@progress/kendo-theme-bootstrap": "^5.0.0",
|
|
74
74
|
"@progress/kendo-theme-default": "^5.0.0",
|