var __awaiter=this&&this.__awaiter||function(n,t,i,r){function u(n){return n instanceof i?n:new i(function(t){t(n)})}return new(i||(i=Promise))(function(i,f){function o(n){try{e(r.next(n))}catch(t){f(t)}}function s(n){try{e(r["throw"](n))}catch(t){f(t)}}function e(n){n.done?i(n.value):u(n.value).then(o,s)}e((r=r.apply(n,t||[])).next())})},Unibase;(function(n){let t;(function(t){let i;(function(t){let i;(function(t){class i{constructor(){this.methods={onMessageSent:function(n){console.log("Connected !"+n.fromUserId+n.message)},onUserTyping:function(t){t.isTyping?n.Platform.Connect.Components.Chat.Instance().showtyping(t.userName,t.fromUserId,t.chatGroupId,t.isPrivate):n.Platform.Connect.Components.Chat.Instance().hidestatus(t.chatGroupId,t.userName)},onMessageReceived:function(t){n.Platform.Connect.Components.Chat.Instance().onMessageReceived(t)},EnableVedio:function(t){n.Platform.Connect.Components.Chat.Instance().EnableVedio(t)},UpdateDeliveryStatus:function(t){n.Platform.Connect.Components.Chat.Instance().UpdateDeliveryStatus(t)},UpdateReadStatus:function(t){n.Platform.Connect.Components.Chat.Instance().UpdateReadStatus(t)},onUserDisconnected:function(){},Editedmsg:function(t){n.Platform.Connect.Components.Chat.Instance().editedMsg(t)},Deleteforeveryone:function(t){n.Platform.Connect.Components.Chat.Instance().deleteall(t)},ChangeProfileImage:function(t){n.Platform.Connect.Components.Chat.Instance().updateProfile(t.photoUrl,t.chatGroupId)},OnGroupNameChanged:function(t){n.Platform.Connect.Components.Chat.Instance().updateGroupName(t.groupName,t.chatgroupid)},OnPrivateWindowOpened:function(t){n.Platform.Connect.Components.Chat.Instance().OnPrivateWindowOpened(t)},EnableMeeting:function(t,i){n.Platform.Connect.Components.Chat.Instance().EnableMeeting(t,i)},addParticipants:function(t){n.Platform.Connect.Components.Chat.Instance().addParticipants(t)},onlinestatus:function(t,i){n.Platform.Connect.Components.Chat.Instance().onlinestatus(t,i)},updatedstatus:function(t){n.Platform.Connect.Components.Chat.Instance().status(t)},GetChatUnreadCount:function(n){$("#chatIconBadge").text(n).removeClass("d-none")},updatechatcount:function(){$("#chatIconBadge").text(Number($("#chatIconBadge").text())+1).removeClass("d-none")},removeadmin:function(t,i){n.Platform.Connect.Components.Chat.Instance().removeAdmin(t,i)},makeadmin:function(t,i){n.Platform.Connect.Components.Chat.Instance().makeAdmin(t,i)},removeparticipant:function(t,i){n.Platform.Connect.Components.Chat.Instance().removeParticipants(t,i)}}}init(){this._chatHub=n.Platform.Connect.Hubs.ChatHub.Instance(_appsettings.chathub_url());this.connection=this._chatHub;this.start()}getClientMethods(){return[{MethodName:"removeadmin",Method:this.methods.removeadmin},{MethodName:"makeadmin",Method:this.methods.makeadmin},{MethodName:"removeparticipant",Method:this.methods.removeparticipant},{MethodName:"onMessageSent",Method:this.methods.onMessageSent},{MethodName:"onUserTyping",Method:this.methods.onUserTyping},{MethodName:"onMessageReceived",Method:this.methods.onMessageReceived},{MethodName:"EnableVedio",Method:this.methods.EnableVedio},{MethodName:"UpdateDeliveryStatus",Method:this.methods.UpdateDeliveryStatus},{MethodName:"UpdateReadStatus",Method:this.methods.UpdateReadStatus},{MethodName:"onUserDisconnected",Method:this.methods.onUserDisconnected},{MethodName:"Editedmsg",Method:this.methods.Editedmsg},{MethodName:"Deleteforeveryone",Method:this.methods.Deleteforeveryone},{MethodName:"ChangeProfileImage",Method:this.methods.ChangeProfileImage},{MethodName:"OnPrivateWindowOpened",Method:this.methods.OnPrivateWindowOpened},{MethodName:"OnGroupNameChanged",Method:this.methods.OnGroupNameChanged},{MethodName:"EnableMeeting",Method:this.methods.EnableMeeting},{MethodName:"addParticipants",Method:this.methods.addParticipants},{MethodName:"onlinestatus",Method:this.methods.onlinestatus},{MethodName:"updatedstatus",Method:this.methods.updatedstatus},{MethodName:"GetChatUnreadCount",Method:this.methods.GetChatUnreadCount},{MethodName:"updatechatcount",Method:this.methods.updatechatcount},]}registerClientMethods(){let n=this.getClientMethods();if(n)for(var t=0;t