@hivegpt/hiveai-angular 0.0.301 → 0.0.304
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/README.md +24 -24
- package/bundles/hivegpt-hiveai-angular.umd.js +2648 -2636
- package/bundles/hivegpt-hiveai-angular.umd.js.map +1 -1
- package/bundles/hivegpt-hiveai-angular.umd.min.js +1 -1
- package/bundles/hivegpt-hiveai-angular.umd.min.js.map +1 -1
- package/environments/environment.d.ts +14 -14
- package/environments/environment.d.ts.map +1 -1
- package/esm2015/environments/environment.js +15 -15
- package/esm2015/hivegpt-hiveai-angular.js +12 -12
- package/esm2015/lib/components/NotificationSocket.js +39 -39
- package/esm2015/lib/components/bot-html-editor/bot-html-editor.component.js +112 -112
- package/esm2015/lib/components/bot.service.js +43 -43
- package/esm2015/lib/components/chat-drawer/chat-drawer.component.js +1623 -1611
- package/esm2015/lib/components/chatbot/chatbot.component.js +50 -50
- package/esm2015/lib/components/conversation.service.js +40 -40
- package/esm2015/lib/components/socket-service.service.js +72 -72
- package/esm2015/lib/components/video-player/video-player.component.js +123 -123
- package/esm2015/lib/hivegpt.module.js +21 -21
- package/esm2015/lib/models/video.js +2 -2
- package/esm2015/lib/pipes/safe-html.pipe.js +19 -19
- package/esm2015/lib/utils/utils.js +36 -36
- package/esm2015/public-api.js +7 -7
- package/fesm2015/hivegpt-hiveai-angular.js +2120 -2108
- package/fesm2015/hivegpt-hiveai-angular.js.map +1 -1
- package/hivegpt-hiveai-angular.d.ts +11 -11
- package/hivegpt-hiveai-angular.d.ts.map +1 -1
- package/hivegpt-hiveai-angular.metadata.json +1 -1
- package/lib/components/NotificationSocket.d.ts +4 -4
- package/lib/components/NotificationSocket.d.ts.map +1 -1
- package/lib/components/bot-html-editor/bot-html-editor.component.d.ts +35 -35
- package/lib/components/bot-html-editor/bot-html-editor.component.d.ts.map +1 -1
- package/lib/components/bot.service.d.ts +11 -11
- package/lib/components/bot.service.d.ts.map +1 -1
- package/lib/components/chat-drawer/chat-drawer.component.d.ts +244 -244
- package/lib/components/chat-drawer/chat-drawer.component.d.ts.map +1 -1
- package/lib/components/chatbot/chatbot.component.d.ts +35 -35
- package/lib/components/chatbot/chatbot.component.d.ts.map +1 -1
- package/lib/components/conversation.service.d.ts +10 -10
- package/lib/components/conversation.service.d.ts.map +1 -1
- package/lib/components/socket-service.service.d.ts +19 -19
- package/lib/components/socket-service.service.d.ts.map +1 -1
- package/lib/components/video-player/video-player.component.d.ts +35 -35
- package/lib/components/video-player/video-player.component.d.ts.map +1 -1
- package/lib/hivegpt.module.d.ts +2 -2
- package/lib/hivegpt.module.d.ts.map +1 -1
- package/lib/models/video.d.ts +34 -34
- package/lib/models/video.d.ts.map +1 -1
- package/lib/pipes/safe-html.pipe.d.ts +7 -7
- package/lib/pipes/safe-html.pipe.d.ts.map +1 -1
- package/lib/utils/utils.d.ts +2 -2
- package/lib/utils/utils.d.ts.map +1 -1
- package/package.json +1 -1
- package/public-api.d.ts +3 -3
- package/public-api.d.ts.map +1 -1
|
@@ -11,2140 +11,2152 @@ import { MatIconModule } from '@angular/material/icon';
|
|
|
11
11
|
import { MatSidenavModule } from '@angular/material/sidenav';
|
|
12
12
|
import { QuillModule } from 'ngx-quill';
|
|
13
13
|
|
|
14
|
-
const formatHoursAndMinutes = (date) => {
|
|
15
|
-
let hours = date.getHours() % 12;
|
|
16
|
-
const minutes = date.getMinutes();
|
|
17
|
-
const amPm = date.getHours() < 12 ? 'AM' : 'PM';
|
|
18
|
-
if (hours === 0)
|
|
19
|
-
hours = 12;
|
|
20
|
-
const formattedHours = hours < 10 ? `0${hours}` : hours;
|
|
21
|
-
const formattedMinutes = minutes < 10 ? `0${minutes}` : minutes;
|
|
22
|
-
return `${formattedHours}:${formattedMinutes} ${amPm}`;
|
|
23
|
-
};
|
|
24
|
-
const ɵ0 = formatHoursAndMinutes;
|
|
25
|
-
const formatNow = (timezone) => {
|
|
26
|
-
const now = new Date();
|
|
27
|
-
if (timezone) {
|
|
28
|
-
const options = {
|
|
29
|
-
hour12: true,
|
|
30
|
-
hour: 'numeric',
|
|
31
|
-
minute: 'numeric',
|
|
32
|
-
timeZone: timezone,
|
|
33
|
-
};
|
|
34
|
-
return now.toLocaleString('en-US', options);
|
|
35
|
-
}
|
|
36
|
-
return formatHoursAndMinutes(now);
|
|
37
|
-
};
|
|
38
|
-
const formatTimeStamps = (timezone, timestamps) => {
|
|
39
|
-
const date = new Date(timestamps + 'Z');
|
|
40
|
-
const options = {
|
|
41
|
-
hour12: true,
|
|
42
|
-
hour: 'numeric',
|
|
43
|
-
minute: 'numeric',
|
|
44
|
-
timeZone: timezone,
|
|
45
|
-
};
|
|
46
|
-
return date.toLocaleString('en-US', options);
|
|
14
|
+
const formatHoursAndMinutes = (date) => {
|
|
15
|
+
let hours = date.getHours() % 12;
|
|
16
|
+
const minutes = date.getMinutes();
|
|
17
|
+
const amPm = date.getHours() < 12 ? 'AM' : 'PM';
|
|
18
|
+
if (hours === 0)
|
|
19
|
+
hours = 12;
|
|
20
|
+
const formattedHours = hours < 10 ? `0${hours}` : hours;
|
|
21
|
+
const formattedMinutes = minutes < 10 ? `0${minutes}` : minutes;
|
|
22
|
+
return `${formattedHours}:${formattedMinutes} ${amPm}`;
|
|
23
|
+
};
|
|
24
|
+
const ɵ0 = formatHoursAndMinutes;
|
|
25
|
+
const formatNow = (timezone) => {
|
|
26
|
+
const now = new Date();
|
|
27
|
+
if (timezone) {
|
|
28
|
+
const options = {
|
|
29
|
+
hour12: true,
|
|
30
|
+
hour: 'numeric',
|
|
31
|
+
minute: 'numeric',
|
|
32
|
+
timeZone: timezone,
|
|
33
|
+
};
|
|
34
|
+
return now.toLocaleString('en-US', options);
|
|
35
|
+
}
|
|
36
|
+
return formatHoursAndMinutes(now);
|
|
37
|
+
};
|
|
38
|
+
const formatTimeStamps = (timezone, timestamps) => {
|
|
39
|
+
const date = new Date(timestamps + 'Z');
|
|
40
|
+
const options = {
|
|
41
|
+
hour12: true,
|
|
42
|
+
hour: 'numeric',
|
|
43
|
+
minute: 'numeric',
|
|
44
|
+
timeZone: timezone,
|
|
45
|
+
};
|
|
46
|
+
return date.toLocaleString('en-US', options);
|
|
47
47
|
};
|
|
48
48
|
|
|
49
|
-
const prod_environment = {
|
|
50
|
-
USERS_API: 'https://es-user.social27.com/api',
|
|
51
|
-
BASE_URL: 'https://agent-api.hivegpt.ai',
|
|
52
|
-
AGENTS_API: 'https://hive-ai.social27.com/api',
|
|
53
|
-
API_KEY: 'b621eb3f-0bd2-41d5-a48c-a8f8ab7d38f8',
|
|
54
|
-
SocketUrl: 'https://notif-v2-ws.social27.com/'
|
|
55
|
-
};
|
|
56
|
-
const dev_environment = {
|
|
57
|
-
USERS_API: 'https://pre-user.social27.com/api',
|
|
58
|
-
BASE_URL: 'https://agent-api.hivegpt.ai',
|
|
59
|
-
AGENTS_API: 'https://hive-ai.social27.com/api',
|
|
60
|
-
API_KEY: 'b621eb3f-0bd2-41d5-a48c-a8f8ab7d38f8',
|
|
61
|
-
SocketUrl: 'https://notif-v2-ws.social27.com/'
|
|
49
|
+
const prod_environment = {
|
|
50
|
+
USERS_API: 'https://es-user.social27.com/api',
|
|
51
|
+
BASE_URL: 'https://agent-api.hivegpt.ai',
|
|
52
|
+
AGENTS_API: 'https://hive-ai.social27.com/api',
|
|
53
|
+
API_KEY: 'b621eb3f-0bd2-41d5-a48c-a8f8ab7d38f8',
|
|
54
|
+
SocketUrl: 'https://notif-v2-ws.social27.com/'
|
|
55
|
+
};
|
|
56
|
+
const dev_environment = {
|
|
57
|
+
USERS_API: 'https://pre-user.social27.com/api',
|
|
58
|
+
BASE_URL: 'https://agent-api.hivegpt.ai',
|
|
59
|
+
AGENTS_API: 'https://hive-ai.social27.com/api',
|
|
60
|
+
API_KEY: 'b621eb3f-0bd2-41d5-a48c-a8f8ab7d38f8',
|
|
61
|
+
SocketUrl: 'https://notif-v2-ws.social27.com/'
|
|
62
62
|
};
|
|
63
63
|
|
|
64
|
-
class ConversationService {
|
|
65
|
-
constructor() {
|
|
66
|
-
this.storageKey = 'conversationKey';
|
|
67
|
-
this.userSepecificNotification = new Subject();
|
|
68
|
-
}
|
|
69
|
-
generateKey() {
|
|
70
|
-
const timestamp = Math.floor(new Date().getTime() / 1000).toString(16);
|
|
71
|
-
const randomHex = 'xxxxxxxxxxxxxxxx'.replace(/[x]/g, () => {
|
|
72
|
-
return Math.floor(Math.random() * 16).toString(16);
|
|
73
|
-
});
|
|
74
|
-
return timestamp + randomHex;
|
|
75
|
-
}
|
|
76
|
-
getKey(botId, resetKey = false) {
|
|
77
|
-
const storageKey = `conversationKey_${botId}`;
|
|
78
|
-
var value = localStorage.getItem(storageKey);
|
|
79
|
-
if (!value || resetKey) {
|
|
80
|
-
value = this.generateKey();
|
|
81
|
-
localStorage.setItem(storageKey, value);
|
|
82
|
-
}
|
|
83
|
-
return value;
|
|
84
|
-
}
|
|
85
|
-
sendValidatedUserData(message) {
|
|
86
|
-
//console.log('lgging messages', message, new Date());\
|
|
87
|
-
this.userSepecificNotification.next(message);
|
|
88
|
-
}
|
|
89
|
-
getUserSpecificNotification() {
|
|
90
|
-
return this.userSepecificNotification.asObservable();
|
|
91
|
-
}
|
|
92
|
-
}
|
|
93
|
-
ConversationService.ɵprov = ɵɵdefineInjectable({ factory: function ConversationService_Factory() { return new ConversationService(); }, token: ConversationService, providedIn: "root" });
|
|
94
|
-
ConversationService.decorators = [
|
|
95
|
-
{ type: Injectable, args: [{
|
|
96
|
-
providedIn: 'root',
|
|
97
|
-
},] }
|
|
98
|
-
];
|
|
64
|
+
class ConversationService {
|
|
65
|
+
constructor() {
|
|
66
|
+
this.storageKey = 'conversationKey';
|
|
67
|
+
this.userSepecificNotification = new Subject();
|
|
68
|
+
}
|
|
69
|
+
generateKey() {
|
|
70
|
+
const timestamp = Math.floor(new Date().getTime() / 1000).toString(16);
|
|
71
|
+
const randomHex = 'xxxxxxxxxxxxxxxx'.replace(/[x]/g, () => {
|
|
72
|
+
return Math.floor(Math.random() * 16).toString(16);
|
|
73
|
+
});
|
|
74
|
+
return timestamp + randomHex;
|
|
75
|
+
}
|
|
76
|
+
getKey(botId, resetKey = false) {
|
|
77
|
+
const storageKey = `conversationKey_${botId}`;
|
|
78
|
+
var value = localStorage.getItem(storageKey);
|
|
79
|
+
if (!value || resetKey) {
|
|
80
|
+
value = this.generateKey();
|
|
81
|
+
localStorage.setItem(storageKey, value);
|
|
82
|
+
}
|
|
83
|
+
return value;
|
|
84
|
+
}
|
|
85
|
+
sendValidatedUserData(message) {
|
|
86
|
+
//console.log('lgging messages', message, new Date());\
|
|
87
|
+
this.userSepecificNotification.next(message);
|
|
88
|
+
}
|
|
89
|
+
getUserSpecificNotification() {
|
|
90
|
+
return this.userSepecificNotification.asObservable();
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
ConversationService.ɵprov = ɵɵdefineInjectable({ factory: function ConversationService_Factory() { return new ConversationService(); }, token: ConversationService, providedIn: "root" });
|
|
94
|
+
ConversationService.decorators = [
|
|
95
|
+
{ type: Injectable, args: [{
|
|
96
|
+
providedIn: 'root',
|
|
97
|
+
},] }
|
|
98
|
+
];
|
|
99
99
|
ConversationService.ctorParameters = () => [];
|
|
100
100
|
|
|
101
|
-
class NotificationSocket extends Socket {
|
|
102
|
-
constructor() {
|
|
103
|
-
super(socketConfig);
|
|
104
|
-
// Log connection status
|
|
105
|
-
this.on('connect', () => {
|
|
106
|
-
console.log('Socket connected');
|
|
107
|
-
});
|
|
108
|
-
this.on('disconnect', () => {
|
|
109
|
-
console.warn('Socket disconnected');
|
|
110
|
-
});
|
|
111
|
-
this.on('connect_error', (err) => {
|
|
112
|
-
console.error('Socket connection error:', err);
|
|
113
|
-
});
|
|
114
|
-
}
|
|
115
|
-
}
|
|
116
|
-
NotificationSocket.ɵprov = ɵɵdefineInjectable({ factory: function NotificationSocket_Factory() { return new NotificationSocket(); }, token: NotificationSocket, providedIn: "root" });
|
|
117
|
-
NotificationSocket.decorators = [
|
|
118
|
-
{ type: Injectable, args: [{
|
|
119
|
-
providedIn: 'root' // This ensures the service is available across the application
|
|
120
|
-
},] }
|
|
121
|
-
];
|
|
122
|
-
NotificationSocket.ctorParameters = () => [];
|
|
123
|
-
const socketConfig = {
|
|
124
|
-
url: prod_environment.SocketUrl,
|
|
125
|
-
options: {
|
|
126
|
-
transports: ['websocket', 'polling'],
|
|
127
|
-
reconnection: true,
|
|
128
|
-
autoConnect: true,
|
|
129
|
-
upgrade: true,
|
|
130
|
-
reconnectionDelay: 1000,
|
|
131
|
-
reconnectionDelayMax: 5000,
|
|
132
|
-
reconnectionAttempts: Infinity
|
|
133
|
-
}
|
|
101
|
+
class NotificationSocket extends Socket {
|
|
102
|
+
constructor() {
|
|
103
|
+
super(socketConfig);
|
|
104
|
+
// Log connection status
|
|
105
|
+
this.on('connect', () => {
|
|
106
|
+
console.log('Socket connected');
|
|
107
|
+
});
|
|
108
|
+
this.on('disconnect', () => {
|
|
109
|
+
console.warn('Socket disconnected');
|
|
110
|
+
});
|
|
111
|
+
this.on('connect_error', (err) => {
|
|
112
|
+
console.error('Socket connection error:', err);
|
|
113
|
+
});
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
NotificationSocket.ɵprov = ɵɵdefineInjectable({ factory: function NotificationSocket_Factory() { return new NotificationSocket(); }, token: NotificationSocket, providedIn: "root" });
|
|
117
|
+
NotificationSocket.decorators = [
|
|
118
|
+
{ type: Injectable, args: [{
|
|
119
|
+
providedIn: 'root' // This ensures the service is available across the application
|
|
120
|
+
},] }
|
|
121
|
+
];
|
|
122
|
+
NotificationSocket.ctorParameters = () => [];
|
|
123
|
+
const socketConfig = {
|
|
124
|
+
url: prod_environment.SocketUrl,
|
|
125
|
+
options: {
|
|
126
|
+
transports: ['websocket', 'polling'],
|
|
127
|
+
reconnection: true,
|
|
128
|
+
autoConnect: true,
|
|
129
|
+
upgrade: true,
|
|
130
|
+
reconnectionDelay: 1000,
|
|
131
|
+
reconnectionDelayMax: 5000,
|
|
132
|
+
reconnectionAttempts: Infinity
|
|
133
|
+
}
|
|
134
134
|
};
|
|
135
135
|
|
|
136
|
-
class SocketService {
|
|
137
|
-
constructor(conversationService, notificationSocket) {
|
|
138
|
-
this.conversationService = conversationService;
|
|
139
|
-
this.notificationSocket = notificationSocket;
|
|
140
|
-
this.isCommonSocketInitialized = false;
|
|
141
|
-
this.isUserSpecificSocketInitialized = false;
|
|
142
|
-
this.isUserSpecificEventReleased = true;
|
|
143
|
-
this.messageQueue = [];
|
|
144
|
-
this.releaseInterval = 1000;
|
|
145
|
-
this.intervalSetup = false;
|
|
146
|
-
this.startReleasingMessages();
|
|
147
|
-
}
|
|
148
|
-
isSocketInitialized(isCommon) {
|
|
149
|
-
return isCommon
|
|
150
|
-
? this.isCommonSocketInitialized
|
|
151
|
-
: this.isUserSpecificSocketInitialized &&
|
|
152
|
-
!this.isUserSpecificEventReleased;
|
|
153
|
-
}
|
|
154
|
-
disconnectSocketConnection() {
|
|
155
|
-
this.notificationSocket.disconnect();
|
|
156
|
-
}
|
|
157
|
-
connectSocketConnection() {
|
|
158
|
-
this.notificationSocket.connect();
|
|
159
|
-
}
|
|
160
|
-
registerUserSpecificHiveSocket(botId, conversation_id, org_id) {
|
|
161
|
-
const commonNotification = 'commonNotification';
|
|
162
|
-
const groupId = `Hive_AI_Notifs_${botId}_${conversation_id}`;
|
|
163
|
-
const groupId_org = `Hive_AI_Notifs_${org_id}`;
|
|
164
|
-
// Remove any pre-existing listeners for commonNotification
|
|
165
|
-
// this.notificationSocket.removeAllListeners(commonNotification);
|
|
166
|
-
// Join the group again with updated botId and conversation_id
|
|
167
|
-
this.notificationSocket.emit('joinData', { groupId });
|
|
168
|
-
this.notificationSocket.emit('joinData', { groupId: groupId_org });
|
|
169
|
-
// Re-register for common notifications
|
|
170
|
-
this.notificationSocket.fromEvent(commonNotification).subscribe((res) => {
|
|
171
|
-
console.log('Received commonNotification:', res);
|
|
172
|
-
this.conversationService.sendValidatedUserData(res);
|
|
173
|
-
}, (error) => {
|
|
174
|
-
console.error('Error receiving commonNotification:', error);
|
|
175
|
-
});
|
|
176
|
-
}
|
|
177
|
-
startReleasingMessages() {
|
|
178
|
-
if (!this.intervalSetup) {
|
|
179
|
-
setInterval(() => {
|
|
180
|
-
if (this.messageQueue.length > 0) {
|
|
181
|
-
const message = this.messageQueue.shift(); // Remove the first message from the queue
|
|
182
|
-
// Handle the message here, e.g., send it to the server or process it
|
|
183
|
-
console.log('Releasing message from queue:', message);
|
|
184
|
-
// this.campaignService.sendValidatedUserData(message);
|
|
185
|
-
}
|
|
186
|
-
}, this.releaseInterval);
|
|
187
|
-
this.intervalSetup = true; // Prevents multiple intervals
|
|
188
|
-
}
|
|
189
|
-
}
|
|
190
|
-
}
|
|
191
|
-
SocketService.ɵprov = ɵɵdefineInjectable({ factory: function SocketService_Factory() { return new SocketService(ɵɵinject(ConversationService), ɵɵinject(NotificationSocket)); }, token: SocketService, providedIn: "root" });
|
|
192
|
-
SocketService.decorators = [
|
|
193
|
-
{ type: Injectable, args: [{
|
|
194
|
-
providedIn: 'root',
|
|
195
|
-
},] }
|
|
196
|
-
];
|
|
197
|
-
SocketService.ctorParameters = () => [
|
|
198
|
-
{ type: ConversationService },
|
|
199
|
-
{ type: NotificationSocket }
|
|
136
|
+
class SocketService {
|
|
137
|
+
constructor(conversationService, notificationSocket) {
|
|
138
|
+
this.conversationService = conversationService;
|
|
139
|
+
this.notificationSocket = notificationSocket;
|
|
140
|
+
this.isCommonSocketInitialized = false;
|
|
141
|
+
this.isUserSpecificSocketInitialized = false;
|
|
142
|
+
this.isUserSpecificEventReleased = true;
|
|
143
|
+
this.messageQueue = [];
|
|
144
|
+
this.releaseInterval = 1000;
|
|
145
|
+
this.intervalSetup = false;
|
|
146
|
+
this.startReleasingMessages();
|
|
147
|
+
}
|
|
148
|
+
isSocketInitialized(isCommon) {
|
|
149
|
+
return isCommon
|
|
150
|
+
? this.isCommonSocketInitialized
|
|
151
|
+
: this.isUserSpecificSocketInitialized &&
|
|
152
|
+
!this.isUserSpecificEventReleased;
|
|
153
|
+
}
|
|
154
|
+
disconnectSocketConnection() {
|
|
155
|
+
this.notificationSocket.disconnect();
|
|
156
|
+
}
|
|
157
|
+
connectSocketConnection() {
|
|
158
|
+
this.notificationSocket.connect();
|
|
159
|
+
}
|
|
160
|
+
registerUserSpecificHiveSocket(botId, conversation_id, org_id) {
|
|
161
|
+
const commonNotification = 'commonNotification';
|
|
162
|
+
const groupId = `Hive_AI_Notifs_${botId}_${conversation_id}`;
|
|
163
|
+
const groupId_org = `Hive_AI_Notifs_${org_id}`;
|
|
164
|
+
// Remove any pre-existing listeners for commonNotification
|
|
165
|
+
// this.notificationSocket.removeAllListeners(commonNotification);
|
|
166
|
+
// Join the group again with updated botId and conversation_id
|
|
167
|
+
this.notificationSocket.emit('joinData', { groupId });
|
|
168
|
+
this.notificationSocket.emit('joinData', { groupId: groupId_org });
|
|
169
|
+
// Re-register for common notifications
|
|
170
|
+
this.notificationSocket.fromEvent(commonNotification).subscribe((res) => {
|
|
171
|
+
console.log('Received commonNotification:', res);
|
|
172
|
+
this.conversationService.sendValidatedUserData(res);
|
|
173
|
+
}, (error) => {
|
|
174
|
+
console.error('Error receiving commonNotification:', error);
|
|
175
|
+
});
|
|
176
|
+
}
|
|
177
|
+
startReleasingMessages() {
|
|
178
|
+
if (!this.intervalSetup) {
|
|
179
|
+
setInterval(() => {
|
|
180
|
+
if (this.messageQueue.length > 0) {
|
|
181
|
+
const message = this.messageQueue.shift(); // Remove the first message from the queue
|
|
182
|
+
// Handle the message here, e.g., send it to the server or process it
|
|
183
|
+
console.log('Releasing message from queue:', message);
|
|
184
|
+
// this.campaignService.sendValidatedUserData(message);
|
|
185
|
+
}
|
|
186
|
+
}, this.releaseInterval);
|
|
187
|
+
this.intervalSetup = true; // Prevents multiple intervals
|
|
188
|
+
}
|
|
189
|
+
}
|
|
190
|
+
}
|
|
191
|
+
SocketService.ɵprov = ɵɵdefineInjectable({ factory: function SocketService_Factory() { return new SocketService(ɵɵinject(ConversationService), ɵɵinject(NotificationSocket)); }, token: SocketService, providedIn: "root" });
|
|
192
|
+
SocketService.decorators = [
|
|
193
|
+
{ type: Injectable, args: [{
|
|
194
|
+
providedIn: 'root',
|
|
195
|
+
},] }
|
|
196
|
+
];
|
|
197
|
+
SocketService.ctorParameters = () => [
|
|
198
|
+
{ type: ConversationService },
|
|
199
|
+
{ type: NotificationSocket }
|
|
200
200
|
];
|
|
201
201
|
|
|
202
|
-
class BotsService {
|
|
203
|
-
constructor(http) {
|
|
204
|
-
this.http = http;
|
|
205
|
-
this.eventDescription = new Subject();
|
|
206
|
-
this.bot_api = 'https://agent-api.hivegpt.ai/';
|
|
207
|
-
}
|
|
208
|
-
fetchSpeechAuthorizationToken() {
|
|
209
|
-
const apiUrl = `${this.bot_api}speech/issue_token`;
|
|
210
|
-
const url = `${apiUrl}`;
|
|
211
|
-
return this.http.get(url).pipe(map((resp) => {
|
|
212
|
-
return resp.token;
|
|
213
|
-
}));
|
|
214
|
-
}
|
|
215
|
-
getWorkflowsByOrgId(orgId) {
|
|
216
|
-
const apiUrl = `${this.bot_api}workflows`;
|
|
217
|
-
const url = `${apiUrl}?org_id=${orgId}`;
|
|
218
|
-
return this.http.get(url).pipe(map((resp) => {
|
|
219
|
-
return resp;
|
|
220
|
-
}));
|
|
221
|
-
}
|
|
222
|
-
getWorkflowExecutionById(executionId) {
|
|
223
|
-
const apiUrl = `${this.bot_api}workflows/execution/${executionId}`;
|
|
224
|
-
return this.http.get(apiUrl).pipe(map((resp) => {
|
|
225
|
-
return resp;
|
|
226
|
-
}));
|
|
227
|
-
}
|
|
228
|
-
}
|
|
229
|
-
BotsService.ɵprov = ɵɵdefineInjectable({ factory: function BotsService_Factory() { return new BotsService(ɵɵinject(HttpClient)); }, token: BotsService, providedIn: "root" });
|
|
230
|
-
BotsService.decorators = [
|
|
231
|
-
{ type: Injectable, args: [{
|
|
232
|
-
providedIn: 'root',
|
|
233
|
-
},] }
|
|
234
|
-
];
|
|
235
|
-
BotsService.ctorParameters = () => [
|
|
236
|
-
{ type: HttpClient }
|
|
202
|
+
class BotsService {
|
|
203
|
+
constructor(http) {
|
|
204
|
+
this.http = http;
|
|
205
|
+
this.eventDescription = new Subject();
|
|
206
|
+
this.bot_api = 'https://agent-api.hivegpt.ai/';
|
|
207
|
+
}
|
|
208
|
+
fetchSpeechAuthorizationToken() {
|
|
209
|
+
const apiUrl = `${this.bot_api}speech/issue_token`;
|
|
210
|
+
const url = `${apiUrl}`;
|
|
211
|
+
return this.http.get(url).pipe(map((resp) => {
|
|
212
|
+
return resp.token;
|
|
213
|
+
}));
|
|
214
|
+
}
|
|
215
|
+
getWorkflowsByOrgId(orgId) {
|
|
216
|
+
const apiUrl = `${this.bot_api}workflows`;
|
|
217
|
+
const url = `${apiUrl}?org_id=${orgId}`;
|
|
218
|
+
return this.http.get(url).pipe(map((resp) => {
|
|
219
|
+
return resp;
|
|
220
|
+
}));
|
|
221
|
+
}
|
|
222
|
+
getWorkflowExecutionById(executionId) {
|
|
223
|
+
const apiUrl = `${this.bot_api}workflows/execution/${executionId}`;
|
|
224
|
+
return this.http.get(apiUrl).pipe(map((resp) => {
|
|
225
|
+
return resp;
|
|
226
|
+
}));
|
|
227
|
+
}
|
|
228
|
+
}
|
|
229
|
+
BotsService.ɵprov = ɵɵdefineInjectable({ factory: function BotsService_Factory() { return new BotsService(ɵɵinject(HttpClient)); }, token: BotsService, providedIn: "root" });
|
|
230
|
+
BotsService.decorators = [
|
|
231
|
+
{ type: Injectable, args: [{
|
|
232
|
+
providedIn: 'root',
|
|
233
|
+
},] }
|
|
234
|
+
];
|
|
235
|
+
BotsService.ctorParameters = () => [
|
|
236
|
+
{ type: HttpClient }
|
|
237
237
|
];
|
|
238
238
|
|
|
239
|
-
// import { Platform } from '@angular/cdk/platform';
|
|
240
|
-
class ChatDrawerComponent {
|
|
241
|
-
constructor(fb, botService, cdr, http, sanitizer, elementRef, renderer, socketService, conversationService // private platform: Platform
|
|
242
|
-
) {
|
|
243
|
-
this.fb = fb;
|
|
244
|
-
this.botService = botService;
|
|
245
|
-
this.cdr = cdr;
|
|
246
|
-
this.http = http;
|
|
247
|
-
this.sanitizer = sanitizer;
|
|
248
|
-
this.elementRef = elementRef;
|
|
249
|
-
this.renderer = renderer;
|
|
250
|
-
this.socketService = socketService;
|
|
251
|
-
this.conversationService = conversationService;
|
|
252
|
-
this.bodyOverflowClass = 'body-overflow-hidden';
|
|
253
|
-
this.isCollapsedTrue = false;
|
|
254
|
-
this.copilotName = 'HiveXGPT';
|
|
255
|
-
this.feedbackEvent = new EventEmitter();
|
|
256
|
-
this.onCloseEvent = new EventEmitter();
|
|
257
|
-
this.openPage = new EventEmitter();
|
|
258
|
-
this.sessionActions = new EventEmitter();
|
|
259
|
-
this.closeBot = new EventEmitter();
|
|
260
|
-
this.connectWithUser = new EventEmitter();
|
|
261
|
-
this.scheduleMeeting = new EventEmitter();
|
|
262
|
-
this.refreshToken = new EventEmitter();
|
|
263
|
-
this.autogenKey = 'Autogen_eDJTtEU-NB0RtIpzq1w';
|
|
264
|
-
this.addToMyAgendaAction = 'add_to_my_agenda';
|
|
265
|
-
this.myUpcomingSessionAction = 'my_upcomming_session';
|
|
266
|
-
this.connectOrFollowAction = 'connect_or_follow';
|
|
267
|
-
this.aiResponse = '';
|
|
268
|
-
this.chatLog = [];
|
|
269
|
-
this.decoder = new TextDecoder();
|
|
270
|
-
this.feedbackDone = false;
|
|
271
|
-
this.greetingMsg = '';
|
|
272
|
-
this.hasBackdropValue = false;
|
|
273
|
-
this.input = '';
|
|
274
|
-
this.listenerAdded = false;
|
|
275
|
-
this.loading = false;
|
|
276
|
-
this.mode = 'over';
|
|
277
|
-
this.quickPrompts = [];
|
|
278
|
-
this.thumbsDownMsgIndex = 0;
|
|
279
|
-
this.userName = '';
|
|
280
|
-
this.showStartAgain = false;
|
|
281
|
-
this.isIOSDevice = false;
|
|
282
|
-
this.showFeedBackIconsIndex = null;
|
|
283
|
-
this.temperature = 1;
|
|
284
|
-
this.speakers = [];
|
|
285
|
-
this.currentWorkflowActionProgress = 0;
|
|
286
|
-
this.currentWorkflowAction = '';
|
|
287
|
-
this.recognizedText = '';
|
|
288
|
-
this.authorizationToken = '';
|
|
289
|
-
this.region = 'westeurope'; // Set your Azure region here
|
|
290
|
-
this.isChatingWithAi = false;
|
|
291
|
-
this.readAllChunks = (stream) => {
|
|
292
|
-
const reader = stream.getReader();
|
|
293
|
-
const allSuggestions = [];
|
|
294
|
-
reader.closed.catch((err) => {
|
|
295
|
-
if (err) {
|
|
296
|
-
console.error('Error reading stream: ', err);
|
|
297
|
-
}
|
|
298
|
-
this.isChatingWithAi = false;
|
|
299
|
-
this.scrollToBottom();
|
|
300
|
-
return;
|
|
301
|
-
});
|
|
302
|
-
return new ReadableStream({
|
|
303
|
-
start: (controller) => {
|
|
304
|
-
return this.pump(controller, reader, allSuggestions);
|
|
305
|
-
},
|
|
306
|
-
});
|
|
307
|
-
};
|
|
308
|
-
this.currentMessageForEditor = '';
|
|
309
|
-
this.currentIndexForEditor = -1;
|
|
310
|
-
this.isDropdownOpen = false;
|
|
311
|
-
this.selectedAgents = [];
|
|
312
|
-
this.allSelected = false;
|
|
313
|
-
this.isDocInEditMode = false;
|
|
314
|
-
this.isContentLoaded = false;
|
|
315
|
-
this.isCollapsed = false;
|
|
316
|
-
this.isCollapsedForGraph = false;
|
|
317
|
-
this.isCollapsedForFGraph = false;
|
|
318
|
-
// [
|
|
319
|
-
// {
|
|
320
|
-
// "title": "AI News January 2024: In-Depth and Concise - The AI Track",
|
|
321
|
-
// "desc": "Each month, we compile significant news, trends, and happenings in AI, providing detailed summaries with key points in bullet form for concise yet complete understanding.",
|
|
322
|
-
// "link": "https://theaitrack.com/ai-news-january-2024/"
|
|
323
|
-
// },
|
|
324
|
-
// {
|
|
325
|
-
// "title": "Top AI News, January 2024 - Everypixel Journal",
|
|
326
|
-
// "desc": "In this monthly roundup, we spotlight the top AI news stories from January, including the OpenAI vs. The New York Times Lawsuit.",
|
|
327
|
-
// "link": "https://journal.everypixel.com/top-ai-news-january-2024"
|
|
328
|
-
// },
|
|
329
|
-
// {
|
|
330
|
-
// "title": "AI News July 2024: In-Depth and Concise - The AI Track",
|
|
331
|
-
// "desc": "This page features AI News for July 2024, highlighting significant events such as Canva acquiring Leonardo AI.",
|
|
332
|
-
// "link": "https://theaitrack.com/ai-news-july-2024-in-depth-and-concise/"
|
|
333
|
-
// },
|
|
334
|
-
// {
|
|
335
|
-
// "title": "January news roundup: What's new in the world of AI? - Pluralsight",
|
|
336
|
-
// "desc": "OpenAI’s new GPT store, business-ready ChatGPT plans, and a predicted rise in AI-powered cybercrime.",
|
|
337
|
-
// "link": "https://www.pluralsight.com/resources/blog/data/ai-this-month-january-2024"
|
|
338
|
-
// },
|
|
339
|
-
// {
|
|
340
|
-
// "title": "AI News August 2024: In-Depth and Concise - The AI Track",
|
|
341
|
-
// "desc": "This page features AI News for August 2024, with highlights such as Nvidia delaying the “Blackwell” B200 AI chips delivery.",
|
|
342
|
-
// "link": "https://theaitrack.com/ai-news-august-2024-in-depth-and-concise-duplicate/"
|
|
343
|
-
// }
|
|
344
|
-
// ]
|
|
345
|
-
this.dateTime = { now: new Date().toISOString() };
|
|
346
|
-
this.currentSourcesList = [];
|
|
347
|
-
this.isShowEditorButton = true;
|
|
348
|
-
this.isDrawerOpen = true;
|
|
349
|
-
this.chatMain = new ElementRef(null);
|
|
350
|
-
// if (this.platform.IOS) {
|
|
351
|
-
// this.isIOSDevice = true;
|
|
352
|
-
// }
|
|
353
|
-
}
|
|
354
|
-
ngOnChanges(changes) {
|
|
355
|
-
if (changes.s27Token) {
|
|
356
|
-
if (changes.s27Token.currentValue != changes.s27Token.previousValue) {
|
|
357
|
-
this.s27Token = changes.s27Token.currentValue;
|
|
358
|
-
console.log('isFetchDataFor: ', this.isFetchDataFor);
|
|
359
|
-
console.log('msg: ', this.msg);
|
|
360
|
-
console.log('chat: ', this.chat);
|
|
361
|
-
if (this.is401) {
|
|
362
|
-
if (this.isFetchDataFor) {
|
|
363
|
-
this.fetchDataFor(this.msg, this.chat);
|
|
364
|
-
}
|
|
365
|
-
else {
|
|
366
|
-
this.fetchData(this.msg);
|
|
367
|
-
}
|
|
368
|
-
}
|
|
369
|
-
}
|
|
370
|
-
}
|
|
371
|
-
if (changes.orgId) {
|
|
372
|
-
if (changes.orgId.currentValue != changes.orgId.previousValue &&
|
|
373
|
-
changes.orgId.currentValue) {
|
|
374
|
-
this.initializeSocket();
|
|
375
|
-
}
|
|
376
|
-
}
|
|
377
|
-
}
|
|
378
|
-
ngOnInit() {
|
|
379
|
-
this.environment = this.isDev ? dev_environment : prod_environment;
|
|
380
|
-
// this.fetchMyConnections().subscribe();
|
|
381
|
-
// this.fetchPendingRequests().subscribe();
|
|
382
|
-
this.changeTemperature(this.temperature);
|
|
383
|
-
this.fetchBotConfig().subscribe((res) => {
|
|
384
|
-
this.cdr.markForCheck();
|
|
385
|
-
this.fetchChatHistory().subscribe((response) => {
|
|
386
|
-
this.loading = false;
|
|
387
|
-
this.mapChatHistory(response);
|
|
388
|
-
this.cdr.markForCheck();
|
|
389
|
-
}, (err) => {
|
|
390
|
-
console.error('Error fetching chat history:', err);
|
|
391
|
-
});
|
|
392
|
-
}, (err) => {
|
|
393
|
-
console.error('Error fetching chat history:', err);
|
|
394
|
-
});
|
|
395
|
-
// this.fetchAgents();
|
|
396
|
-
// this.fetchEditorContent();
|
|
397
|
-
this.cdr.markForCheck();
|
|
398
|
-
// this.initializeSocket();
|
|
399
|
-
if (!this.checkForCop29BotId()) {
|
|
400
|
-
this.botService.fetchSpeechAuthorizationToken().subscribe((token) => {
|
|
401
|
-
this.authorizationToken = token;
|
|
402
|
-
this.initializeSpeechRecognizer(token);
|
|
403
|
-
});
|
|
404
|
-
}
|
|
405
|
-
}
|
|
406
|
-
initializeSocket() {
|
|
407
|
-
try {
|
|
408
|
-
this.socketService.disconnectSocketConnection();
|
|
409
|
-
}
|
|
410
|
-
catch (error) { }
|
|
411
|
-
setTimeout(() => {
|
|
412
|
-
this.socketService.connectSocketConnection();
|
|
413
|
-
setTimeout(() => {
|
|
414
|
-
console.log('YES INIT');
|
|
415
|
-
const conversation_id = this.conversationService.getKey(this.botId);
|
|
416
|
-
this.socketService.registerUserSpecificHiveSocket(this.botId, conversation_id, this.orgId);
|
|
417
|
-
setTimeout(() => {
|
|
418
|
-
this.listenSockets();
|
|
419
|
-
}, 300);
|
|
420
|
-
}, 200);
|
|
421
|
-
}, 300);
|
|
422
|
-
}
|
|
423
|
-
listenSockets() {
|
|
424
|
-
if (this.eventSubscription) {
|
|
425
|
-
this.eventSubscription.unsubscribe();
|
|
426
|
-
}
|
|
427
|
-
console.log('Listen Socket');
|
|
428
|
-
this.eventSubscription = this.conversationService
|
|
429
|
-
.getUserSpecificNotification()
|
|
430
|
-
.subscribe((res) => {
|
|
431
|
-
var _a, _b, _c, _d, _e, _f;
|
|
432
|
-
console.log('Listen Socket response');
|
|
433
|
-
console.log(res);
|
|
434
|
-
// Check if OtherFields exists in the response
|
|
435
|
-
if ((_b = (_a = res === null || res === void 0 ? void 0 : res.m) === null || _a === void 0 ? void 0 : _a.OtherFields) === null || _b === void 0 ? void 0 : _b.workflow_id) {
|
|
436
|
-
const { percentage, output, action_name, current_action_name, workflow_execution_id, time_stamp, } = (_c = res === null || res === void 0 ? void 0 : res.m) === null || _c === void 0 ? void 0 : _c.OtherFields;
|
|
437
|
-
this.currentWorkflowActionProgress = percentage;
|
|
438
|
-
this.currentWorkflowAction = action_name;
|
|
439
|
-
const actionIndex = this.workflowExecutionDetails.Actions.findIndex((a) => a.Name == current_action_name);
|
|
440
|
-
if (actionIndex !== -1) {
|
|
441
|
-
this.workflowExecutionDetails.Actions[actionIndex]['Output'] = output;
|
|
442
|
-
this.workflowExecutionDetails.Actions[actionIndex]['InsertTimeStamp'] = formatTimeStamps(this.timezone, time_stamp);
|
|
443
|
-
}
|
|
444
|
-
else {
|
|
445
|
-
console.error(`Action with name ${action_name} not found`);
|
|
446
|
-
}
|
|
447
|
-
this.currentWorkflowExecutionDetails = this.workflowExecutionDetails;
|
|
448
|
-
if (this.currentWorkflowActionProgress == 100) {
|
|
449
|
-
this.chatLog[this.chatLog.length - 1]['WorkflowExecutionId'] = workflow_execution_id;
|
|
450
|
-
this.isChatingWithAi = false;
|
|
451
|
-
this.executingWorkflow = false;
|
|
452
|
-
}
|
|
453
|
-
this.cdr.detectChanges();
|
|
454
|
-
}
|
|
455
|
-
else if ((_d = res === null || res === void 0 ? void 0 : res.m) === null || _d === void 0 ? void 0 : _d.OtherFields) {
|
|
456
|
-
const { conversation_id, bot_id, message_id, answer, web_results, search_results, graphs, execution_graphs, suggestions, } = (_e = res === null || res === void 0 ? void 0 : res.m) === null || _e === void 0 ? void 0 : _e.OtherFields;
|
|
457
|
-
console.log('message_id1');
|
|
458
|
-
console.log((_f = res === null || res === void 0 ? void 0 : res.m) === null || _f === void 0 ? void 0 : _f.OtherFields);
|
|
459
|
-
var currentChatMessage = this.chatLog.find((p) => p._id == message_id);
|
|
460
|
-
console.log(this.chatLog);
|
|
461
|
-
if (!currentChatMessage) {
|
|
462
|
-
console.log('message_id2');
|
|
463
|
-
console.log(message_id);
|
|
464
|
-
currentChatMessage = {
|
|
465
|
-
_id: message_id,
|
|
466
|
-
type: 'ai',
|
|
467
|
-
time: formatNow(this.timezone),
|
|
468
|
-
};
|
|
469
|
-
this.chatLog.push(currentChatMessage);
|
|
470
|
-
this.showFeedBackIconsIndex = this.chatLog.length - 1;
|
|
471
|
-
console.log('message_id3');
|
|
472
|
-
console.log(message_id);
|
|
473
|
-
this.cdr.detectChanges();
|
|
474
|
-
}
|
|
475
|
-
// Handle the fields based on their presence
|
|
476
|
-
if (search_results && Array.isArray(search_results)) {
|
|
477
|
-
console.log('Online Search Terms:', search_results);
|
|
478
|
-
currentChatMessage.searchTerms = search_results;
|
|
479
|
-
this.cdr.detectChanges();
|
|
480
|
-
}
|
|
481
|
-
if (web_results && Array.isArray(web_results)) {
|
|
482
|
-
console.log('Web Results:', web_results);
|
|
483
|
-
currentChatMessage.sourcesList = web_results;
|
|
484
|
-
currentChatMessage.displayedSources = web_results === null || web_results === void 0 ? void 0 : web_results.slice(0, 3); // First 3 cards
|
|
485
|
-
currentChatMessage.remainingSources = web_results === null || web_results === void 0 ? void 0 : web_results.slice(3); // Remaining items
|
|
486
|
-
this.cdr.detectChanges();
|
|
487
|
-
}
|
|
488
|
-
if (answer) {
|
|
489
|
-
this.isChatingWithAi = false;
|
|
490
|
-
console.log('Answer:', answer);
|
|
491
|
-
currentChatMessage.message = this.processMessageForDisplay(answer);
|
|
492
|
-
this.cdr.detectChanges();
|
|
493
|
-
this.scrollToBottom();
|
|
494
|
-
}
|
|
495
|
-
if (graphs && Array.isArray(graphs)) {
|
|
496
|
-
console.log('Graphs:', graphs);
|
|
497
|
-
currentChatMessage.graphs = graphs;
|
|
498
|
-
this.cdr.detectChanges();
|
|
499
|
-
}
|
|
500
|
-
if (execution_graphs && Array.isArray(execution_graphs)) {
|
|
501
|
-
console.log('Execution Graphs:', execution_graphs);
|
|
502
|
-
currentChatMessage.executionGraphs = execution_graphs;
|
|
503
|
-
this.cdr.detectChanges();
|
|
504
|
-
}
|
|
505
|
-
if (suggestions && Array.isArray(suggestions)) {
|
|
506
|
-
console.log('suggestions:', suggestions);
|
|
507
|
-
currentChatMessage.relatedListItems = suggestions;
|
|
508
|
-
this.cdr.detectChanges();
|
|
509
|
-
// Process online search terms as needed
|
|
510
|
-
}
|
|
511
|
-
// Add any other fields and their processing here
|
|
512
|
-
}
|
|
513
|
-
else {
|
|
514
|
-
console.warn('OtherFields is missing in the response');
|
|
515
|
-
}
|
|
516
|
-
}, (err) => {
|
|
517
|
-
this.eventSubscription.unsubscribe();
|
|
518
|
-
console.error('Error in fetching data from socket', err);
|
|
519
|
-
});
|
|
520
|
-
}
|
|
521
|
-
initializeSocketAndListen() { }
|
|
522
|
-
handleEvent(data, type) {
|
|
523
|
-
switch (type) {
|
|
524
|
-
case 'webresult':
|
|
525
|
-
break;
|
|
526
|
-
case 'answer':
|
|
527
|
-
break;
|
|
528
|
-
case 'graph':
|
|
529
|
-
break;
|
|
530
|
-
default:
|
|
531
|
-
break;
|
|
532
|
-
}
|
|
533
|
-
}
|
|
534
|
-
ngOnDestroy() {
|
|
535
|
-
if (this.eventSubscription) {
|
|
536
|
-
this.eventSubscription.unsubscribe();
|
|
537
|
-
}
|
|
538
|
-
this.socketService.disconnectSocketConnection();
|
|
539
|
-
//this.socketService.close();
|
|
540
|
-
}
|
|
541
|
-
changeTemperature(newTemperature) {
|
|
542
|
-
if (this.loading)
|
|
543
|
-
return;
|
|
544
|
-
this.temperature = newTemperature;
|
|
545
|
-
const wrapper = document.querySelector('.hivegpt-chat-wrapper');
|
|
546
|
-
// Remove existing theme classes from body
|
|
547
|
-
wrapper === null || wrapper === void 0 ? void 0 : wrapper.classList.remove('creative', 'balanced', 'precise');
|
|
548
|
-
switch (newTemperature) {
|
|
549
|
-
case 0:
|
|
550
|
-
wrapper === null || wrapper === void 0 ? void 0 : wrapper.classList.add('creative');
|
|
551
|
-
break;
|
|
552
|
-
case 1:
|
|
553
|
-
wrapper === null || wrapper === void 0 ? void 0 : wrapper.classList.add('balanced');
|
|
554
|
-
break;
|
|
555
|
-
case 2:
|
|
556
|
-
wrapper === null || wrapper === void 0 ? void 0 : wrapper.classList.add('precise');
|
|
557
|
-
break;
|
|
558
|
-
default:
|
|
559
|
-
break;
|
|
560
|
-
}
|
|
561
|
-
}
|
|
562
|
-
onStartAgain() {
|
|
563
|
-
if (this.loading)
|
|
564
|
-
return;
|
|
565
|
-
this.showStartAgain = false;
|
|
566
|
-
this.chatLog = [];
|
|
567
|
-
this.chatLog.push({
|
|
568
|
-
type: 'ai',
|
|
569
|
-
message: this.greetingMsg,
|
|
570
|
-
time: formatNow(this.timezone),
|
|
571
|
-
});
|
|
572
|
-
this.archieveMessages().subscribe();
|
|
573
|
-
}
|
|
574
|
-
archieveMessages() {
|
|
575
|
-
const headers = new HttpHeaders({
|
|
576
|
-
'Content-Type': 'application/json',
|
|
577
|
-
'x-api-key': this.apiKey,
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
this.
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
this.
|
|
600
|
-
this.
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
this.
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
//
|
|
634
|
-
//
|
|
635
|
-
//
|
|
636
|
-
//
|
|
637
|
-
//
|
|
638
|
-
//
|
|
639
|
-
//
|
|
640
|
-
//
|
|
641
|
-
//
|
|
642
|
-
//
|
|
643
|
-
//
|
|
644
|
-
//
|
|
645
|
-
//
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
|
|
682
|
-
|
|
683
|
-
|
|
684
|
-
|
|
685
|
-
|
|
686
|
-
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
}
|
|
694
|
-
|
|
695
|
-
|
|
696
|
-
|
|
697
|
-
|
|
698
|
-
|
|
699
|
-
|
|
700
|
-
|
|
701
|
-
|
|
702
|
-
|
|
703
|
-
|
|
704
|
-
|
|
705
|
-
|
|
706
|
-
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
|
|
710
|
-
|
|
711
|
-
|
|
712
|
-
|
|
713
|
-
|
|
714
|
-
return
|
|
715
|
-
}
|
|
716
|
-
|
|
717
|
-
|
|
718
|
-
|
|
719
|
-
|
|
720
|
-
|
|
721
|
-
|
|
722
|
-
|
|
723
|
-
|
|
724
|
-
|
|
725
|
-
|
|
726
|
-
|
|
727
|
-
|
|
728
|
-
|
|
729
|
-
|
|
730
|
-
|
|
731
|
-
|
|
732
|
-
|
|
733
|
-
|
|
734
|
-
|
|
735
|
-
this.
|
|
736
|
-
|
|
737
|
-
|
|
738
|
-
|
|
739
|
-
this.
|
|
740
|
-
}
|
|
741
|
-
|
|
742
|
-
this.
|
|
743
|
-
|
|
744
|
-
|
|
745
|
-
|
|
746
|
-
|
|
747
|
-
|
|
748
|
-
|
|
749
|
-
this.
|
|
750
|
-
|
|
751
|
-
|
|
752
|
-
|
|
753
|
-
|
|
754
|
-
|
|
755
|
-
|
|
756
|
-
|
|
757
|
-
|
|
758
|
-
|
|
759
|
-
}
|
|
760
|
-
|
|
761
|
-
|
|
762
|
-
|
|
763
|
-
|
|
764
|
-
|
|
765
|
-
|
|
766
|
-
|
|
767
|
-
|
|
768
|
-
|
|
769
|
-
|
|
770
|
-
|
|
771
|
-
|
|
772
|
-
|
|
773
|
-
|
|
774
|
-
|
|
775
|
-
|
|
776
|
-
|
|
777
|
-
|
|
778
|
-
|
|
779
|
-
|
|
780
|
-
|
|
781
|
-
|
|
782
|
-
|
|
783
|
-
|
|
784
|
-
|
|
785
|
-
|
|
786
|
-
|
|
787
|
-
|
|
788
|
-
|
|
789
|
-
this.
|
|
790
|
-
|
|
791
|
-
|
|
792
|
-
|
|
793
|
-
|
|
794
|
-
|
|
795
|
-
|
|
796
|
-
this.cdr.markForCheck();
|
|
797
|
-
|
|
798
|
-
this.
|
|
799
|
-
|
|
800
|
-
|
|
801
|
-
|
|
802
|
-
|
|
803
|
-
|
|
804
|
-
|
|
805
|
-
|
|
806
|
-
|
|
807
|
-
|
|
808
|
-
|
|
809
|
-
|
|
810
|
-
|
|
811
|
-
|
|
812
|
-
|
|
813
|
-
|
|
814
|
-
|
|
815
|
-
|
|
816
|
-
|
|
817
|
-
|
|
818
|
-
|
|
819
|
-
|
|
820
|
-
|
|
821
|
-
|
|
822
|
-
|
|
823
|
-
this.
|
|
824
|
-
|
|
825
|
-
|
|
826
|
-
|
|
827
|
-
|
|
828
|
-
|
|
829
|
-
|
|
830
|
-
|
|
831
|
-
|
|
832
|
-
|
|
833
|
-
|
|
834
|
-
|
|
835
|
-
|
|
836
|
-
|
|
837
|
-
|
|
838
|
-
|
|
839
|
-
|
|
840
|
-
|
|
841
|
-
|
|
842
|
-
this.
|
|
843
|
-
|
|
844
|
-
|
|
845
|
-
|
|
846
|
-
|
|
847
|
-
|
|
848
|
-
|
|
849
|
-
|
|
850
|
-
|
|
851
|
-
|
|
852
|
-
|
|
853
|
-
|
|
854
|
-
|
|
855
|
-
|
|
856
|
-
|
|
857
|
-
|
|
858
|
-
|
|
859
|
-
|
|
860
|
-
|
|
861
|
-
|
|
862
|
-
this.
|
|
863
|
-
|
|
864
|
-
|
|
865
|
-
|
|
866
|
-
|
|
867
|
-
|
|
868
|
-
|
|
869
|
-
|
|
870
|
-
|
|
871
|
-
|
|
872
|
-
|
|
873
|
-
|
|
874
|
-
|
|
875
|
-
|
|
876
|
-
|
|
877
|
-
|
|
878
|
-
|
|
879
|
-
|
|
880
|
-
|
|
881
|
-
|
|
882
|
-
aiFormattedData
|
|
883
|
-
|
|
884
|
-
|
|
885
|
-
|
|
886
|
-
|
|
887
|
-
|
|
888
|
-
|
|
889
|
-
|
|
890
|
-
|
|
891
|
-
|
|
892
|
-
|
|
893
|
-
}
|
|
894
|
-
if (aiFormattedData.section_id == this.
|
|
895
|
-
|
|
896
|
-
|
|
897
|
-
|
|
898
|
-
|
|
899
|
-
|
|
900
|
-
|
|
901
|
-
|
|
902
|
-
|
|
903
|
-
|
|
904
|
-
|
|
905
|
-
|
|
906
|
-
|
|
907
|
-
|
|
908
|
-
|
|
909
|
-
|
|
910
|
-
|
|
911
|
-
|
|
912
|
-
|
|
913
|
-
|
|
914
|
-
|
|
915
|
-
|
|
916
|
-
|
|
917
|
-
|
|
918
|
-
|
|
919
|
-
|
|
920
|
-
|
|
921
|
-
|
|
922
|
-
|
|
923
|
-
|
|
924
|
-
|
|
925
|
-
|
|
926
|
-
|
|
927
|
-
|
|
928
|
-
|
|
929
|
-
|
|
930
|
-
|
|
931
|
-
|
|
932
|
-
|
|
933
|
-
|
|
934
|
-
|
|
935
|
-
|
|
936
|
-
|
|
937
|
-
|
|
938
|
-
|
|
939
|
-
|
|
940
|
-
this.
|
|
941
|
-
|
|
942
|
-
|
|
943
|
-
|
|
944
|
-
}
|
|
945
|
-
|
|
946
|
-
|
|
947
|
-
|
|
948
|
-
|
|
949
|
-
|
|
950
|
-
|
|
951
|
-
|
|
952
|
-
|
|
953
|
-
|
|
954
|
-
|
|
955
|
-
|
|
956
|
-
|
|
957
|
-
|
|
958
|
-
|
|
959
|
-
|
|
960
|
-
|
|
961
|
-
|
|
962
|
-
|
|
963
|
-
|
|
964
|
-
|
|
965
|
-
|
|
966
|
-
|
|
967
|
-
|
|
968
|
-
|
|
969
|
-
|
|
970
|
-
|
|
971
|
-
|
|
972
|
-
|
|
973
|
-
|
|
974
|
-
|
|
975
|
-
|
|
976
|
-
|
|
977
|
-
this.
|
|
978
|
-
|
|
979
|
-
|
|
980
|
-
|
|
981
|
-
|
|
982
|
-
|
|
983
|
-
|
|
984
|
-
|
|
985
|
-
|
|
986
|
-
|
|
987
|
-
|
|
988
|
-
|
|
989
|
-
|
|
990
|
-
this.
|
|
991
|
-
|
|
992
|
-
|
|
993
|
-
|
|
994
|
-
|
|
995
|
-
|
|
996
|
-
|
|
997
|
-
|
|
998
|
-
|
|
999
|
-
|
|
1000
|
-
this.
|
|
1001
|
-
|
|
1002
|
-
|
|
1003
|
-
|
|
1004
|
-
|
|
1005
|
-
|
|
1006
|
-
|
|
1007
|
-
|
|
1008
|
-
|
|
1009
|
-
|
|
1010
|
-
}
|
|
1011
|
-
|
|
1012
|
-
|
|
1013
|
-
|
|
1014
|
-
|
|
1015
|
-
|
|
1016
|
-
|
|
1017
|
-
|
|
1018
|
-
|
|
1019
|
-
|
|
1020
|
-
|
|
1021
|
-
this.
|
|
1022
|
-
this.chatLog[idx].unliked
|
|
1023
|
-
|
|
1024
|
-
|
|
1025
|
-
|
|
1026
|
-
|
|
1027
|
-
|
|
1028
|
-
|
|
1029
|
-
|
|
1030
|
-
|
|
1031
|
-
|
|
1032
|
-
|
|
1033
|
-
|
|
1034
|
-
|
|
1035
|
-
//
|
|
1036
|
-
//
|
|
1037
|
-
//
|
|
1038
|
-
//
|
|
1039
|
-
//
|
|
1040
|
-
//
|
|
1041
|
-
//
|
|
1042
|
-
|
|
1043
|
-
|
|
1044
|
-
|
|
1045
|
-
|
|
1046
|
-
|
|
1047
|
-
|
|
1048
|
-
|
|
1049
|
-
|
|
1050
|
-
|
|
1051
|
-
|
|
1052
|
-
//
|
|
1053
|
-
document.
|
|
1054
|
-
//
|
|
1055
|
-
document.
|
|
1056
|
-
|
|
1057
|
-
//
|
|
1058
|
-
|
|
1059
|
-
|
|
1060
|
-
|
|
1061
|
-
|
|
1062
|
-
|
|
1063
|
-
|
|
1064
|
-
|
|
1065
|
-
|
|
1066
|
-
|
|
1067
|
-
|
|
1068
|
-
|
|
1069
|
-
|
|
1070
|
-
|
|
1071
|
-
|
|
1072
|
-
|
|
1073
|
-
|
|
1074
|
-
|
|
1075
|
-
|
|
1076
|
-
|
|
1077
|
-
|
|
1078
|
-
|
|
1079
|
-
|
|
1080
|
-
|
|
1081
|
-
|
|
1082
|
-
//
|
|
1083
|
-
|
|
1084
|
-
|
|
1085
|
-
|
|
1086
|
-
.
|
|
1087
|
-
|
|
1088
|
-
|
|
1089
|
-
|
|
1090
|
-
|
|
1091
|
-
|
|
1092
|
-
|
|
1093
|
-
|
|
1094
|
-
|
|
1095
|
-
|
|
1096
|
-
|
|
1097
|
-
|
|
1098
|
-
|
|
1099
|
-
|
|
1100
|
-
|
|
1101
|
-
|
|
1102
|
-
|
|
1103
|
-
|
|
1104
|
-
|
|
1105
|
-
|
|
1106
|
-
|
|
1107
|
-
|
|
1108
|
-
|
|
1109
|
-
|
|
1110
|
-
|
|
1111
|
-
|
|
1112
|
-
|
|
1113
|
-
|
|
1114
|
-
|
|
1115
|
-
|
|
1116
|
-
|
|
1117
|
-
|
|
1118
|
-
|
|
1119
|
-
|
|
1120
|
-
|
|
1121
|
-
|
|
1122
|
-
|
|
1123
|
-
|
|
1124
|
-
|
|
1125
|
-
|
|
1126
|
-
|
|
1127
|
-
|
|
1128
|
-
|
|
1129
|
-
|
|
1130
|
-
}
|
|
1131
|
-
|
|
1132
|
-
|
|
1133
|
-
|
|
1134
|
-
|
|
1135
|
-
|
|
1136
|
-
|
|
1137
|
-
|
|
1138
|
-
|
|
1139
|
-
|
|
1140
|
-
|
|
1141
|
-
|
|
1142
|
-
|
|
1143
|
-
|
|
1144
|
-
|
|
1145
|
-
|
|
1146
|
-
|
|
1147
|
-
|
|
1148
|
-
|
|
1149
|
-
|
|
1150
|
-
|
|
1151
|
-
}
|
|
1152
|
-
|
|
1153
|
-
|
|
1154
|
-
|
|
1155
|
-
|
|
1156
|
-
|
|
1157
|
-
|
|
1158
|
-
|
|
1159
|
-
}
|
|
1160
|
-
});
|
|
1161
|
-
|
|
1162
|
-
|
|
1163
|
-
|
|
1164
|
-
|
|
1165
|
-
|
|
1166
|
-
|
|
1167
|
-
|
|
1168
|
-
|
|
1169
|
-
|
|
1170
|
-
|
|
1171
|
-
|
|
1172
|
-
|
|
1173
|
-
|
|
1174
|
-
|
|
1175
|
-
|
|
1176
|
-
|
|
1177
|
-
|
|
1178
|
-
|
|
1179
|
-
|
|
1180
|
-
|
|
1181
|
-
|
|
1182
|
-
|
|
1183
|
-
|
|
1184
|
-
}
|
|
1185
|
-
|
|
1186
|
-
|
|
1187
|
-
|
|
1188
|
-
|
|
1189
|
-
|
|
1190
|
-
|
|
1191
|
-
|
|
1192
|
-
|
|
1193
|
-
|
|
1194
|
-
|
|
1195
|
-
|
|
1196
|
-
|
|
1197
|
-
|
|
1198
|
-
|
|
1199
|
-
|
|
1200
|
-
|
|
1201
|
-
|
|
1202
|
-
|
|
1203
|
-
|
|
1204
|
-
|
|
1205
|
-
|
|
1206
|
-
|
|
1207
|
-
|
|
1208
|
-
|
|
1209
|
-
|
|
1210
|
-
|
|
1211
|
-
|
|
1212
|
-
|
|
1213
|
-
|
|
1214
|
-
|
|
1215
|
-
|
|
1216
|
-
|
|
1217
|
-
|
|
1218
|
-
|
|
1219
|
-
|
|
1220
|
-
}
|
|
1221
|
-
|
|
1222
|
-
|
|
1223
|
-
|
|
1224
|
-
|
|
1225
|
-
|
|
1226
|
-
|
|
1227
|
-
|
|
1228
|
-
|
|
1229
|
-
|
|
1230
|
-
|
|
1231
|
-
|
|
1232
|
-
|
|
1233
|
-
|
|
1234
|
-
|
|
1235
|
-
|
|
1236
|
-
|
|
1237
|
-
|
|
1238
|
-
|
|
1239
|
-
|
|
1240
|
-
|
|
1241
|
-
|
|
1242
|
-
|
|
1243
|
-
|
|
1244
|
-
|
|
1245
|
-
|
|
1246
|
-
|
|
1247
|
-
|
|
1248
|
-
|
|
1249
|
-
|
|
1250
|
-
|
|
1251
|
-
|
|
1252
|
-
|
|
1253
|
-
|
|
1254
|
-
|
|
1255
|
-
|
|
1256
|
-
|
|
1257
|
-
|
|
1258
|
-
|
|
1259
|
-
|
|
1260
|
-
})
|
|
1261
|
-
|
|
1262
|
-
|
|
1263
|
-
|
|
1264
|
-
|
|
1265
|
-
|
|
1266
|
-
|
|
1267
|
-
|
|
1268
|
-
|
|
1269
|
-
|
|
1270
|
-
|
|
1271
|
-
|
|
1272
|
-
|
|
1273
|
-
|
|
1274
|
-
|
|
1275
|
-
|
|
1276
|
-
|
|
1277
|
-
|
|
1278
|
-
|
|
1279
|
-
|
|
1280
|
-
|
|
1281
|
-
|
|
1282
|
-
|
|
1283
|
-
|
|
1284
|
-
|
|
1285
|
-
|
|
1286
|
-
|
|
1287
|
-
|
|
1288
|
-
|
|
1289
|
-
|
|
1290
|
-
|
|
1291
|
-
this.cdr.detectChanges();
|
|
1292
|
-
}
|
|
1293
|
-
|
|
1294
|
-
|
|
1295
|
-
|
|
1296
|
-
|
|
1297
|
-
|
|
1298
|
-
|
|
1299
|
-
|
|
1300
|
-
|
|
1301
|
-
|
|
1302
|
-
|
|
1303
|
-
|
|
1304
|
-
|
|
1305
|
-
|
|
1306
|
-
|
|
1307
|
-
|
|
1308
|
-
|
|
1309
|
-
|
|
1310
|
-
|
|
1311
|
-
|
|
1312
|
-
|
|
1313
|
-
|
|
1314
|
-
|
|
1315
|
-
|
|
1316
|
-
|
|
1317
|
-
|
|
1318
|
-
|
|
1319
|
-
|
|
1320
|
-
|
|
1321
|
-
|
|
1322
|
-
|
|
1323
|
-
|
|
1324
|
-
})
|
|
1325
|
-
|
|
1326
|
-
|
|
1327
|
-
|
|
1328
|
-
|
|
1329
|
-
|
|
1330
|
-
|
|
1331
|
-
|
|
1332
|
-
|
|
1333
|
-
|
|
1334
|
-
|
|
1335
|
-
|
|
1336
|
-
|
|
1337
|
-
|
|
1338
|
-
|
|
1339
|
-
|
|
1340
|
-
|
|
1341
|
-
|
|
1342
|
-
|
|
1343
|
-
|
|
1344
|
-
|
|
1345
|
-
|
|
1346
|
-
|
|
1347
|
-
|
|
1348
|
-
})
|
|
1349
|
-
|
|
1350
|
-
|
|
1351
|
-
|
|
1352
|
-
|
|
1353
|
-
|
|
1354
|
-
|
|
1355
|
-
|
|
1356
|
-
|
|
1357
|
-
return of(
|
|
1358
|
-
}))
|
|
1359
|
-
|
|
1360
|
-
|
|
1361
|
-
|
|
1362
|
-
|
|
1363
|
-
|
|
1364
|
-
|
|
1365
|
-
|
|
1366
|
-
|
|
1367
|
-
|
|
1368
|
-
|
|
1369
|
-
|
|
1370
|
-
|
|
1371
|
-
|
|
1372
|
-
|
|
1373
|
-
|
|
1374
|
-
|
|
1375
|
-
|
|
1376
|
-
|
|
1377
|
-
|
|
1378
|
-
|
|
1379
|
-
|
|
1380
|
-
//
|
|
1381
|
-
|
|
1382
|
-
|
|
1383
|
-
|
|
1384
|
-
|
|
1385
|
-
|
|
1386
|
-
|
|
1387
|
-
|
|
1388
|
-
|
|
1389
|
-
|
|
1390
|
-
|
|
1391
|
-
|
|
1392
|
-
|
|
1393
|
-
|
|
1394
|
-
|
|
1395
|
-
|
|
1396
|
-
|
|
1397
|
-
|
|
1398
|
-
|
|
1399
|
-
|
|
1400
|
-
|
|
1401
|
-
|
|
1402
|
-
|
|
1403
|
-
|
|
1404
|
-
|
|
1405
|
-
|
|
1406
|
-
|
|
1407
|
-
|
|
1408
|
-
|
|
1409
|
-
|
|
1410
|
-
|
|
1411
|
-
|
|
1412
|
-
// Convert
|
|
1413
|
-
html = html.replace(
|
|
1414
|
-
|
|
1415
|
-
|
|
1416
|
-
|
|
1417
|
-
|
|
1418
|
-
|
|
1419
|
-
|
|
1420
|
-
|
|
1421
|
-
|
|
1422
|
-
|
|
1423
|
-
|
|
1424
|
-
|
|
1425
|
-
|
|
1426
|
-
|
|
1427
|
-
|
|
1428
|
-
|
|
1429
|
-
|
|
1430
|
-
|
|
1431
|
-
|
|
1432
|
-
|
|
1433
|
-
|
|
1434
|
-
|
|
1435
|
-
|
|
1436
|
-
|
|
1437
|
-
|
|
1438
|
-
|
|
1439
|
-
|
|
1440
|
-
|
|
1441
|
-
|
|
1442
|
-
|
|
1443
|
-
|
|
1444
|
-
|
|
1445
|
-
|
|
1446
|
-
|
|
1447
|
-
|
|
1448
|
-
|
|
1449
|
-
|
|
1450
|
-
|
|
1451
|
-
|
|
1452
|
-
|
|
1453
|
-
|
|
1454
|
-
}
|
|
1455
|
-
//
|
|
1456
|
-
|
|
1457
|
-
|
|
1458
|
-
|
|
1459
|
-
|
|
1460
|
-
|
|
1461
|
-
|
|
1462
|
-
|
|
1463
|
-
|
|
1464
|
-
|
|
1465
|
-
|
|
1466
|
-
|
|
1467
|
-
|
|
1468
|
-
|
|
1469
|
-
|
|
1470
|
-
|
|
1471
|
-
this.
|
|
1472
|
-
this.
|
|
1473
|
-
this.
|
|
1474
|
-
|
|
1475
|
-
|
|
1476
|
-
|
|
1477
|
-
|
|
1478
|
-
|
|
1479
|
-
|
|
1480
|
-
|
|
1481
|
-
this.editorsDrawer.
|
|
1482
|
-
this.isDrawerOpen =
|
|
1483
|
-
this.isShowEditorButton =
|
|
1484
|
-
this.cdr.detectChanges();
|
|
1485
|
-
|
|
1486
|
-
|
|
1487
|
-
|
|
1488
|
-
|
|
1489
|
-
|
|
1490
|
-
|
|
1491
|
-
this.
|
|
1492
|
-
|
|
1493
|
-
|
|
1494
|
-
|
|
1495
|
-
|
|
1496
|
-
|
|
1497
|
-
|
|
1498
|
-
|
|
1499
|
-
|
|
1500
|
-
|
|
1501
|
-
|
|
1502
|
-
|
|
1503
|
-
|
|
1504
|
-
|
|
1505
|
-
|
|
1506
|
-
|
|
1507
|
-
|
|
1508
|
-
|
|
1509
|
-
|
|
1510
|
-
|
|
1511
|
-
|
|
1512
|
-
|
|
1513
|
-
|
|
1514
|
-
|
|
1515
|
-
|
|
1516
|
-
|
|
1517
|
-
|
|
1518
|
-
|
|
1519
|
-
|
|
1520
|
-
|
|
1521
|
-
|
|
1522
|
-
|
|
1523
|
-
|
|
1524
|
-
|
|
1525
|
-
|
|
1526
|
-
|
|
1527
|
-
|
|
1528
|
-
|
|
1529
|
-
|
|
1530
|
-
|
|
1531
|
-
|
|
1532
|
-
|
|
1533
|
-
|
|
1534
|
-
}
|
|
1535
|
-
|
|
1536
|
-
|
|
1537
|
-
|
|
1538
|
-
|
|
1539
|
-
|
|
1540
|
-
|
|
1541
|
-
|
|
1542
|
-
|
|
1543
|
-
|
|
1544
|
-
|
|
1545
|
-
|
|
1546
|
-
|
|
1547
|
-
|
|
1548
|
-
|
|
1549
|
-
|
|
1550
|
-
|
|
1551
|
-
|
|
1552
|
-
|
|
1553
|
-
|
|
1554
|
-
|
|
1555
|
-
|
|
1556
|
-
|
|
1557
|
-
|
|
1558
|
-
|
|
1559
|
-
|
|
1560
|
-
|
|
1561
|
-
|
|
1562
|
-
|
|
1563
|
-
|
|
1564
|
-
//
|
|
1565
|
-
|
|
1566
|
-
|
|
1567
|
-
|
|
1568
|
-
|
|
1569
|
-
|
|
1570
|
-
|
|
1571
|
-
|
|
1572
|
-
|
|
1573
|
-
|
|
1574
|
-
|
|
1575
|
-
|
|
1576
|
-
|
|
1577
|
-
|
|
1578
|
-
|
|
1579
|
-
|
|
1580
|
-
|
|
1581
|
-
|
|
1582
|
-
|
|
1583
|
-
|
|
1584
|
-
|
|
1585
|
-
|
|
1586
|
-
|
|
1587
|
-
|
|
1588
|
-
|
|
1589
|
-
|
|
1590
|
-
showWorkflowExecutionLoader
|
|
1591
|
-
|
|
1592
|
-
|
|
1593
|
-
|
|
1594
|
-
this.
|
|
1595
|
-
|
|
1596
|
-
|
|
1597
|
-
|
|
1598
|
-
|
|
1599
|
-
|
|
1600
|
-
|
|
1601
|
-
|
|
1602
|
-
|
|
1603
|
-
|
|
1604
|
-
this.
|
|
1605
|
-
|
|
1606
|
-
this.
|
|
1607
|
-
|
|
1608
|
-
this.
|
|
1609
|
-
|
|
1610
|
-
|
|
1611
|
-
|
|
1612
|
-
|
|
1613
|
-
|
|
1614
|
-
|
|
1615
|
-
|
|
1616
|
-
|
|
1617
|
-
|
|
1618
|
-
|
|
1619
|
-
|
|
1620
|
-
|
|
1621
|
-
|
|
1622
|
-
|
|
1623
|
-
|
|
1624
|
-
|
|
1625
|
-
|
|
1626
|
-
|
|
1627
|
-
|
|
1628
|
-
|
|
1629
|
-
|
|
1630
|
-
|
|
1631
|
-
|
|
1632
|
-
|
|
1633
|
-
|
|
1634
|
-
|
|
1635
|
-
|
|
1636
|
-
|
|
1637
|
-
|
|
1638
|
-
|
|
1639
|
-
|
|
1640
|
-
|
|
1641
|
-
|
|
1642
|
-
|
|
1643
|
-
|
|
1644
|
-
|
|
1645
|
-
|
|
1646
|
-
|
|
1647
|
-
|
|
1648
|
-
|
|
1649
|
-
|
|
1650
|
-
|
|
1651
|
-
|
|
1652
|
-
|
|
1653
|
-
|
|
1654
|
-
|
|
1655
|
-
|
|
1656
|
-
|
|
1657
|
-
|
|
1658
|
-
|
|
1659
|
-
|
|
1660
|
-
|
|
1661
|
-
|
|
1662
|
-
|
|
1663
|
-
|
|
1664
|
-
|
|
1665
|
-
|
|
1666
|
-
|
|
1667
|
-
|
|
1668
|
-
|
|
1669
|
-
|
|
1670
|
-
|
|
1671
|
-
|
|
1672
|
-
|
|
1673
|
-
|
|
1674
|
-
|
|
1675
|
-
|
|
1676
|
-
|
|
1677
|
-
|
|
1678
|
-
|
|
1679
|
-
|
|
1680
|
-
|
|
1681
|
-
|
|
1682
|
-
|
|
1683
|
-
|
|
1684
|
-
|
|
1685
|
-
|
|
1686
|
-
|
|
1687
|
-
|
|
1688
|
-
|
|
1689
|
-
|
|
1690
|
-
|
|
1691
|
-
|
|
1692
|
-
|
|
1693
|
-
|
|
1694
|
-
|
|
1695
|
-
|
|
1696
|
-
|
|
1697
|
-
|
|
1698
|
-
|
|
1699
|
-
|
|
1700
|
-
|
|
1701
|
-
|
|
1702
|
-
|
|
1703
|
-
|
|
1704
|
-
|
|
1705
|
-
|
|
1706
|
-
|
|
1707
|
-
|
|
1708
|
-
|
|
1709
|
-
|
|
1710
|
-
|
|
1711
|
-
this.
|
|
1712
|
-
|
|
1713
|
-
|
|
1714
|
-
|
|
1715
|
-
|
|
1716
|
-
|
|
1717
|
-
this.
|
|
1718
|
-
this.
|
|
1719
|
-
|
|
1720
|
-
|
|
1721
|
-
|
|
1722
|
-
|
|
1723
|
-
|
|
1724
|
-
|
|
1725
|
-
|
|
1726
|
-
|
|
1727
|
-
|
|
1728
|
-
|
|
1729
|
-
|
|
1730
|
-
|
|
1731
|
-
|
|
1732
|
-
|
|
1733
|
-
|
|
1734
|
-
|
|
1735
|
-
|
|
1736
|
-
|
|
1737
|
-
|
|
1738
|
-
|
|
1739
|
-
|
|
1740
|
-
|
|
1741
|
-
|
|
1742
|
-
|
|
1743
|
-
|
|
1744
|
-
|
|
1745
|
-
|
|
1746
|
-
|
|
1747
|
-
|
|
1748
|
-
|
|
1749
|
-
|
|
1750
|
-
|
|
1751
|
-
|
|
1752
|
-
|
|
1753
|
-
}
|
|
1754
|
-
|
|
1755
|
-
this.
|
|
1756
|
-
|
|
1757
|
-
|
|
1758
|
-
|
|
1759
|
-
|
|
1760
|
-
|
|
1761
|
-
|
|
1762
|
-
|
|
1763
|
-
|
|
1764
|
-
template: "<button *ngIf=\"isShowEditorButton\" (click)=\"openOuterEditor()\" class=\"fixed-btn\">\r\n <span style=\"font-size: 12px\" class=\"material-icons notranslate\">\r\n create\r\n </span>\r\n Editor\r\n</button>\r\n\r\n<button *ngIf=\"!isShowEditorButton\" (click)=\"onCloseEditor()\" class=\"fixed-btn-close\">\r\n <span style=\"font-size: 12px\" class=\"material-icons notranslate\">\r\n close\r\n </span>\r\n Close\r\n</button>\r\n\r\n<mat-drawer-container class=\"hivegpt-chat-wrapper\" [ngClass]=\"{ 'mat-drawer-container-has-open': isDrawerOpen }\"\r\n [class.ios-device]=\"isIOSDevice\" [hasBackdrop]=\"hasBackdropValue\">\r\n <mat-drawer class=\"drawer\" #drawer [position]=\"'start'\" [mode]=\"'over'\" opened=\"true\"\r\n [class.full-width-drawer]=\"fullView\" [style.background]=\"\r\n 'linear-gradient(' + (bgGradient ? bgGradient.join(', ') : '') + ')'\r\n \">\r\n <mat-drawer-content>\r\n <div class=\"chat-main\">\r\n <!-- <div class=\"chat-header\">\r\n <h2> -->\r\n <!-- {{eventName}} -->\r\n <!-- </h2> -->\r\n <!-- <button class=\"closeIcon\" (click)=\"onClose()\">\r\n <span class=\"material-symbols-outlined\">\r\n close\r\n </span>\r\n </button> -->\r\n <!-- </div> -->\r\n\r\n <div class=\"innerChat\" #chatMain>\r\n <div (click)=\"startNewConversation()\" class=\"new-conversationbutton\">\r\n New Chat <span><svg xmlns=\"http://www.w3.org/2000/svg\" width=\"14.061\" height=\"14.261\"\r\n viewBox=\"0 0 14.061 14.261\">\r\n <path id=\"Path_164\" data-name=\"Path 164\"\r\n d=\"M10.146,5.075H4.531A1.544,1.544,0,0,0,3,6.631v7.262A1.544,1.544,0,0,0,4.531,15.45h7.146a1.544,1.544,0,0,0,1.531-1.556V8.187m-7.146,4.15L15.25,3m0,0H11.677M15.25,3V6.631\"\r\n transform=\"translate(-2.25 -1.939)\" fill=\"none\" stroke=\"#06f\" stroke-linecap=\"round\"\r\n stroke-linejoin=\"round\" stroke-width=\"1.5\" />\r\n </svg>\r\n\r\n </span>\r\n </div>\r\n <div class=\"sticky-header-chat\">\r\n <div class=\"title_chat\">\r\n <h2>\r\n <span>\r\n {{ botName }}\r\n <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"31.499\" height=\"31.501\" viewBox=\"0 0 31.499 31.501\">\r\n <path id=\"Icon_ion-shield-checkmark\" data-name=\"Icon ion-shield-checkmark\"\r\n d=\"M33.685,7.83a1.125,1.125,0,0,0-.925-1.036,49.227,49.227,0,0,1-14.3-4.444,1.125,1.125,0,0,0-.927,0A49.226,49.226,0,0,1,3.24,6.794,1.125,1.125,0,0,0,2.315,7.83a27.621,27.621,0,0,0,1.718,11.9A24.572,24.572,0,0,0,9.07,27.641a25.712,25.712,0,0,0,8.513,6.028,1.125,1.125,0,0,0,.844,0,25.712,25.712,0,0,0,8.513-6.028,24.572,24.572,0,0,0,5.027-7.911,27.621,27.621,0,0,0,1.718-11.9Zm-9.211,5.281-7.791,9a1.125,1.125,0,0,1-.8.389h-.046a1.125,1.125,0,0,1-.788-.322L11.587,18.79a1.125,1.125,0,1,1,1.575-1.607l2.6,2.552,7.01-8.1a1.125,1.125,0,0,1,1.7,1.472Z\"\r\n transform=\"translate(-2.25 -2.25)\" fill=\"#06f\" />\r\n </svg>\r\n </span>\r\n <span>\r\n <p class=\"small-title\">AI-powered <span>copilot</span></p>\r\n </span>\r\n </h2>\r\n </div>\r\n <div class=\"chatType\" style=\"display: none\">\r\n <h4 class=\"labelChat\">Choose a conversation style</h4>\r\n <ul>\r\n <li (click)=\"changeTemperature(0)\">\r\n <button [ngClass]=\"{ active: temperature === 0 }\">\r\n <span class=\"top-section-title\"> More Creative </span>\r\n </button>\r\n </li>\r\n <li (click)=\"changeTemperature(1)\" class=\"fdssfd\">\r\n <button [ngClass]=\"{ active: temperature === 1 }\">\r\n <span class=\"top-section-title\"> More Balanced </span>\r\n </button>\r\n </li>\r\n <li (click)=\"changeTemperature(2)\">\r\n <button [ngClass]=\"{ active: temperature === 2 }\">\r\n <span class=\"top-section-title\"> More Precise </span>\r\n </button>\r\n </li>\r\n </ul>\r\n </div>\r\n </div>\r\n <!-- chattype -->\r\n <div id=\"allChats\" class=\"chat bot\" *ngFor=\"let chat of chatLog; let i = index\">\r\n <div class=\"chat-box\">\r\n <div class=\"message\">\r\n <div class=\"time-cta\" [ngClass]=\"{\r\n 'time-cta din': showFeedBackIconsIndex === i,\r\n 'time-cta': showFeedBackIconsIndex != i\r\n }\">\r\n <div class=\"Icon_TimeSTamp\" *ngIf=\"chat?.type === 'ai'\">\r\n <!-- <img [src]=\"botIcon\" [alt]=\"botName || 'Assistant'\" /> -->\r\n <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"44\" height=\"44\" viewBox=\"0 0 44 44\">\r\n <g id=\"Group_121\" data-name=\"Group 121\" transform=\"translate(4843 -371)\">\r\n <g id=\"Ellipse_18\" data-name=\"Ellipse 18\" transform=\"translate(-4843 371)\" fill=\"#fcfcfc\"\r\n stroke=\"#dfdfdf\" stroke-width=\"1\">\r\n <circle cx=\"22\" cy=\"22\" r=\"22\" stroke=\"none\" />\r\n <circle cx=\"22\" cy=\"22\" r=\"21.5\" fill=\"none\" />\r\n </g>\r\n <g id=\"Group_120\" data-name=\"Group 120\" transform=\"translate(-4835.141 378.855)\">\r\n <g id=\"Group_1\" data-name=\"Group 1\" transform=\"translate(7.29 0)\">\r\n <path id=\"Path_1\" data-name=\"Path 1\"\r\n d=\"M93.774,41.324,98.757,44.2v5.753l-4.983,2.877-4.983-2.877V44.2l4.983-2.877m0-2.034L87.03,43.183V50.97l6.744,3.893,6.744-3.893V43.183L93.774,39.29Z\"\r\n transform=\"translate(-87.03 -39.29)\" fill=\"gray\" />\r\n </g>\r\n <g id=\"Group_2\" data-name=\"Group 2\" transform=\"translate(0 12.717)\">\r\n <path id=\"Path_2\" data-name=\"Path 2\"\r\n d=\"M52.374,113.544l4.983,2.877v5.753l-4.983,2.877-4.983-2.877v-5.753l4.983-2.877m0-2.034L45.63,115.4v7.787l6.744,3.893,6.744-3.893V115.4l-6.744-3.893Z\"\r\n transform=\"translate(-45.63 -111.51)\" fill=\"gray\" />\r\n </g>\r\n <g id=\"Group_3\" data-name=\"Group 3\" transform=\"translate(14.793 12.717)\">\r\n <path id=\"Path_3\" data-name=\"Path 3\"\r\n d=\"M136.384,113.544l4.983,2.877v5.753l-4.983,2.877-4.983-2.877v-5.753l4.983-2.877m0-2.034L129.64,115.4v7.787l6.744,3.893,6.744-3.893V115.4l-6.744-3.893Z\"\r\n transform=\"translate(-129.64 -111.51)\" fill=\"gray\" />\r\n </g>\r\n </g>\r\n </g>\r\n </svg>\r\n\r\n <div class=\"dateTime\" [style.color]=\"dateTimeColor ? '' : ''\">\r\n <span>{{ 'Assistant' }}</span> {{ chat?.time }}\r\n </div>\r\n </div>\r\n\r\n <div class=\"Icon_TimeSTamp\" *ngIf=\"chat?.type === 'user'\">\r\n <div class=\"user-Box\">\r\n <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"44\" height=\"44\" viewBox=\"0 0 44 44\">\r\n <g id=\"Ellipse_17\" data-name=\"Ellipse 17\" fill=\"#fcfcfc\" stroke=\"#dfdfdf\" stroke-width=\"1\">\r\n <circle cx=\"22\" cy=\"22\" r=\"22\" stroke=\"none\" />\r\n <circle cx=\"22\" cy=\"22\" r=\"21.5\" fill=\"none\" />\r\n </g>\r\n <path id=\"Icon_grommet-user-expert\" data-name=\"Icon grommet-user-expert\"\r\n d=\"M14.24,20.443a9.472,9.472,0,1,0-9.472-9.472,9.472,9.472,0,0,0,9.472,9.472Zm10.329,5.225c-1.957-3.347-6.516-5.225-10.329-5.225-3.145,0-8.046.805-10.761,5.225\"\r\n transform=\"translate(7.976 8.416)\" fill=\"none\" stroke=\"gray\" stroke-width=\"1.5\" />\r\n </svg>\r\n\r\n <div class=\"dateTime\"><span>You</span> {{ chat?.time }}\r\n </div>\r\n </div>\r\n <div class=\"bards\">\r\n <div class=\"bars\" *ngIf=\"chat?.WorkflowExecutionId || chat?.showWorkflowExecutionLoader\">\r\n <button class=\"icon-button\" (click)=\"showWorkflowHistoryDetails(chat.WorkflowExecutionId)\">\r\n <i class=\"fas fa-bars\"></i>\r\n </button>\r\n </div>\r\n </div>\r\n\r\n </div>\r\n </div>\r\n <div class=\"researchingCard\">\r\n <div *ngIf=\"\r\n (chat?.searchTerms && chat?.searchTerms.length > 0) ||\r\n (chat?.sourcesList && chat?.sourcesList.length > 0)\r\n \" class=\"card-header d-flex align-items-center\" (click)=\"toggleCollapse()\">\r\n <span class=\"icon\"><i class=\"bx bx-plus-circle bx-sm\"></i></span>\r\n <span class=\"ml-2\">Researching\r\n <i id=\"toggleIcon\" class=\"toggle-icon ml-2 fa\" [ngClass]=\"{\r\n 'fa-chevron-down': isCollapsed,\r\n 'fa-chevron-up': !isCollapsed\r\n }\"></i></span>\r\n </div>\r\n <div *ngIf=\"chat?.searchTerms && chat?.searchTerms.length > 0\" [ngClass]=\"{ collapse: isCollapsed }\">\r\n <ul class=\"list-group list-group-flush uptList\">\r\n <li *ngFor=\"let term of chat?.searchTerms\" class=\"list-group-item\">\r\n Searching for\r\n <strong>{{ term }}</strong>\r\n </li>\r\n </ul>\r\n\r\n <h5 class=\"mt-2\" *ngIf=\"chat?.sourcesList && chat?.sourcesList.length > 0\">\r\n <i class=\"bx bx-unite\"></i> Sources\r\n </h5>\r\n <div class=\"sources-container\" *ngIf=\"chat?.sourcesList && chat?.sourcesList.length > 0\">\r\n <div class=\"source-card\" *ngFor=\"\r\n let source of chat?.displayedSources;\r\n let i = index\r\n \">\r\n <div>\r\n <div class=\"source-title\">{{ source.title }}</div>\r\n <div class=\"source-url\">\r\n <img class=\"relative block\" [src]=\"getFaviconUrl(source.link)\"\r\n [alt]=\"getDomainName(source.link) + ' favicon'\" />\r\n {{ getDomainName(source.link) }}\r\n </div>\r\n <div class=\"popup\">\r\n <div class=\"source-url\" (click)=\"openLinkInNewTab(source.link)\">\r\n <img class=\"relative block\" [src]=\"getFaviconUrl(source.link)\"\r\n [alt]=\"getDomainName(source.link) + ' favicon'\" />\r\n {{ getDomainName(source.link) }}\r\n </div>\r\n <h5 (click)=\"openLinkInNewTab(source.link)\">\r\n {{ source.title }}\r\n </h5>\r\n <p (click)=\"openLinkInNewTab(source.link)\">\r\n {{ source.desc }}\r\n </p>\r\n </div>\r\n </div>\r\n </div>\r\n <ng-container *ngIf=\"\r\n chat?.remainingSources &&\r\n chat?.remainingSources.length > 0\r\n \">\r\n <div class=\"source-card\" (click)=\"onCardClick(chat?.sourcesList)\">\r\n <div>\r\n <div class=\"source-title\">\r\n <img *ngFor=\"\r\n let source of chat?.remainingSources;\r\n let i = index\r\n \" class=\"relative block\" [src]=\"getFaviconUrl(source.link)\"\r\n [alt]=\"getDomainName(source.link) + ' favicon'\" />\r\n </div>\r\n <div class=\"source-url\">\r\n View {{ chat?.remainingSources.length }} more\r\n </div>\r\n </div>\r\n </div>\r\n </ng-container>\r\n </div>\r\n </div>\r\n </div>\r\n\r\n <div *ngIf=\"chat?.type === 'ai' || chat?.type === 'user'\" [ngStyle]=\"{\r\n background:\r\n chat?.type === 'ai' && bgBubbleAi\r\n ? ''\r\n : chat?.type === 'user' && bgBubbleUser\r\n ? ''\r\n : ''\r\n }\">\r\n <div id=\"messageText_{{ i }}\">\r\n <p *ngIf=\"chat?.type === 'ai' || chat?.type === 'user'\" [ngClass]=\"{\r\n 'SearchTitle ai': chat?.type === 'ai',\r\n 'SearchTitle user': chat?.type === 'user'\r\n }\" [ngStyle]=\"{\r\n background: chat?.type === 'ai' && messageTextColorAi ? messageTextColorAi : (chat?.type === 'user' && messageTextColorUser ? messageTextColorUser : 'defaultBackground'),\r\n color: chat?.type === 'ai' && messageTextColorAi ? messageTextColorAi : (chat?.type === 'user' && messageTextColorUser ? messageTextColorUser : 'defaultColor')\r\n }\" [innerHTML]=\"chat?.message\">\r\n </p>\r\n </div>\r\n </div>\r\n\r\n <div class=\"progress-container\" *ngIf=\"chat?.showWorkflowExecutionLoader\">\r\n <div class=\"circular-loader\">\r\n <div class=\"loader-spinner\" *ngIf=\"currentWorkflowActionProgress < 100\"\r\n [ngStyle]=\"{ 'transform': 'rotate(' + (percentage * 3.6) + 'deg)' }\">\r\n </div>\r\n <div class=\"checkmark\" *ngIf=\"currentWorkflowActionProgress == 100\">\r\n <svg viewBox=\"0 0 52 52\">\r\n <circle class=\"checkmark-circle\" cx=\"26\" cy=\"26\" r=\"25\" fill=\"none\" />\r\n <path class=\"checkmark-check\" fill=\"none\" d=\"M14 27l7 7 16-16\" />\r\n </svg>\r\n </div>\r\n\r\n <div class=\"loader-text\" *ngIf=\"currentWorkflowActionProgress < 100\">{{\r\n currentWorkflowActionProgress\r\n }}%</div>\r\n </div>\r\n <div class=\"loader-label\">\r\n {{currentWorkflowAction}}...\r\n </div>\r\n </div>\r\n\r\n <div class=\"exicution mt-2\" *ngIf=\"\r\n chat?.type === 'ai' &&\r\n chat?.graphs &&\r\n chat?.graphs.length > 0\r\n \">\r\n <h5 *ngIf=\"chat?.type === 'ai'\">\r\n <i class=\"bx bx-network-chart\"></i> Graphs\r\n <i (click)=\"toggleCollapseFGraph()\" class=\"toggle-icon ml-2 fa\" [ngClass]=\"{\r\n 'fas fa-chevron-down': isCollapsedForFGraph,\r\n 'fas fa-chevron-up': !isCollapsedForFGraph\r\n }\"></i>\r\n </h5>\r\n <img *ngFor=\"let image of chat?.graphs\" class=\"graph-img\"\r\n [ngClass]=\"{ collapse: isCollapsedForFGraph }\" [src]=\"image\" alt=\"\" />\r\n </div>\r\n <ng-container *ngIf=\"!checkForCop29BotId()\">\r\n <div class=\"exicution mt-2\" *ngIf=\"\r\n chat?.type === 'ai' &&\r\n chat?.executionGraphs &&\r\n chat?.executionGraphs?.length > 0\r\n \">\r\n <h5 *ngIf=\"chat?.type === 'ai'\">\r\n <i class=\"bx bx-network-chart\"></i> Execution Path Diagram\r\n For Data Visualization Workflow\r\n <i (click)=\"toggleCollapseGraph()\" class=\"toggle-icon ml-2 fa\" [ngClass]=\"{\r\n 'fas fa-chevron-down': isCollapsedForGraph,\r\n 'fas fa-chevron-up': !isCollapsedForGraph\r\n }\"></i>\r\n </h5>\r\n <img *ngFor=\"let image of chat?.executionGraphs\" class=\"graph-img\"\r\n [ngClass]=\"{ collapse: isCollapsedForGraph }\" [src]=\"image\" alt=\"\" />\r\n </div>\r\n </ng-container>\r\n <div class=\"Related mt-2\" *ngIf=\"\r\n showFeedBackIconsIndex === i &&\r\n chat?.relatedListItems &&\r\n chat?.relatedListItems.length > 0\r\n \">\r\n <h5 *ngIf=\"chat?.type === 'ai'\">\r\n <i class=\"bx bx-list-check\"></i> Related\r\n </h5>\r\n <div class=\"card-container\" *ngIf=\"chat?.type === 'ai'\">\r\n <ul class=\"list-container\">\r\n <ng-container *ngFor=\"let item of chat?.relatedListItems\">\r\n <li (click)=\"fetchDataFor(item, chat)\">{{ item }}</li>\r\n </ng-container>\r\n </ul>\r\n </div>\r\n </div>\r\n </div>\r\n\r\n <div class=\"cta\" *ngIf=\"showFeedBackIconsIndex === i\">\r\n <div class=\"copyBox\" title=\"Copy\">\r\n <button title=\"{{ chat?.copied ? 'Copied!' : 'Copy' }}\" class=\"copy\" [class.active]=\"chat?.copied\"\r\n (click)=\"handleCopyClick(i)\">\r\n <i *ngIf=\"chat?.copied\">\r\n <svg width=\"18\" height=\"18\" viewBox=\"0 0 24 24\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\r\n <path d=\"M9 16.17L4.83 12L3.41 13.41L9 19L21 7L19.59 5.59L9 16.17Z\" fill=\"#566563\" />\r\n </svg>\r\n </i>\r\n\r\n <i *ngIf=\"!chat?.copied\">\r\n <svg width=\"18\" height=\"18\" viewBox=\"0 0 24 24\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\r\n <path\r\n d=\"M19.24 2H8.84C8.14 2 7.58 2.56 7.58 3.26V16.84C7.58 17.54 8.14 18.1 8.84 18.1H19.24C19.94 18.1 20.5 17.54 20.5 16.84V3.26C20.5 2.56 19.94 2 19.24 2ZM19.24 16.84H8.84V3.26H19.24V16.84ZM4.74 6.52C4.04 6.52 3.48 7.08 3.48 7.78V20.36C3.48 21.06 4.04 21.62 4.74 21.62H15.14C15.84 21.62 16.4 21.06 16.4 20.36V18.88H14.96V20.36H4.74V7.78H6.18V6.52H4.74Z\"\r\n fill=\"#566563\" />\r\n </svg>\r\n </i>\r\n </button>\r\n\r\n <button class=\"up copy\" title=\"{{ chat?.isEditor ? 'Added!' : 'Add to editor' }}\"\r\n (click)=\"handleEditorClick(i)\">\r\n <svg *ngIf=\"!chat?.isEditor\" xmlns=\"http://www.w3.org/2000/svg\" width=\"20.152\" height=\"20.152\"\r\n viewBox=\"0 0 20.152 20.152\">\r\n <g id=\"Icon_feather-edit\" data-name=\"Icon feather-edit\" transform=\"translate(-2.5 -2.166)\">\r\n <path id=\"Path_166\" data-name=\"Path 166\"\r\n d=\"M11.5,6H4.889A1.889,1.889,0,0,0,3,7.889v13.22A1.889,1.889,0,0,0,4.889,23h13.22A1.889,1.889,0,0,0,20,21.108V14.5\"\r\n transform=\"translate(0 -1.179)\" fill=\"none\" stroke=\"#393939\" stroke-linecap=\"round\"\r\n stroke-linejoin=\"round\" stroke-width=\"1\" />\r\n <path id=\"Path_167\" data-name=\"Path 167\"\r\n d=\"M21.915,3.4a2,2,0,0,1,2.833,2.833l-8.971,8.971L12,16.152l.944-3.777Z\"\r\n transform=\"translate(-3.334 0)\" fill=\"none\" stroke=\"#393939\" stroke-linecap=\"round\"\r\n stroke-linejoin=\"round\" stroke-width=\"1\" />\r\n </g>\r\n </svg>\r\n\r\n <i *ngIf=\"chat?.isEditor\">\r\n <svg width=\"18\" height=\"18\" viewBox=\"0 0 24 24\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\r\n <path d=\"M9 16.17L4.83 12L3.41 13.41L9 19L21 7L19.59 5.59L9 16.17Z\" fill=\"#566563\" />\r\n </svg>\r\n </i>\r\n </button>\r\n\r\n <button class=\"up copy\" title=\"Like\" [class.active]=\"chat?.liked\" (click)=\"handleUpClick(i)\">\r\n <i *ngIf=\"chat?.liked\">\r\n <svg width=\"18\" height=\"18\" viewBox=\"0 0 24 24\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\r\n <path\r\n d=\"M8.38989 18.4902V8.33022C8.38989 7.93022 8.50989 7.54022 8.72989 7.21022L11.4599 3.15022C11.8899 2.50022 12.9599 2.04022 13.8699 2.38022C14.8499 2.71022 15.4999 3.81022 15.2899 4.79022L14.7699 8.06022C14.7299 8.36022 14.8099 8.63022 14.9799 8.84022C15.1499 9.03022 15.3999 9.15022 15.6699 9.15022H19.7799C20.5699 9.15022 21.2499 9.47022 21.6499 10.0302C22.0299 10.5702 22.0999 11.2702 21.8499 11.9802L19.3899 19.4702C19.0799 20.7102 17.7299 21.7202 16.3899 21.7202H12.4899C11.8199 21.7202 10.8799 21.4902 10.4499 21.0602L9.16989 20.0702C8.67989 19.7002 8.38989 19.1102 8.38989 18.4902Z\"\r\n fill=\"#17235B\" />\r\n <path\r\n d=\"M5.21 6.37988H4.18C2.63 6.37988 2 6.97988 2 8.45988V18.5199C2 19.9999 2.63 20.5999 4.18 20.5999H5.21C6.76 20.5999 7.39 19.9999 7.39 18.5199V8.45988C7.39 6.97988 6.76 6.37988 5.21 6.37988Z\"\r\n fill=\"#17235B\" />\r\n </svg>\r\n </i>\r\n <i *ngIf=\"!chat?.liked\">\r\n <svg width=\"18\" height=\"18\" viewBox=\"0 0 24 24\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\r\n <path\r\n d=\"M10.4037 20.9264L10.381 20.9038L10.3557 20.8843L7.72165 18.85L8.02965 18.4516L10.7161 20.5315C10.9228 20.7195 11.2181 20.8517 11.4962 20.9377C11.7978 21.0309 12.1451 21.09 12.4801 21.09H16.2801C16.8572 21.09 17.4266 20.8625 17.8751 20.5306C18.3159 20.2044 18.6912 19.7385 18.8305 19.1997L21.2428 11.8732C21.4379 11.3309 21.4287 10.749 21.0965 10.2887C20.7583 9.81377 20.1844 9.58999 19.5801 9.58999H15.5801C15.2031 9.58999 14.8615 9.43143 14.6276 9.16215L14.627 9.16142C14.3873 8.88649 14.2756 8.51549 14.3345 8.11501L14.8322 4.9195C14.9978 4.1052 14.4664 3.24596 13.7053 2.98804C13.3277 2.85165 12.9297 2.89129 12.61 2.99839C12.2949 3.10396 11.9772 3.30172 11.7881 3.57673L11.7881 3.57671L11.7851 3.58107L7.96352 9.26689L7.55454 8.99314L11.3751 3.30891L11.3755 3.30836C11.8763 2.56103 13.0109 2.19028 13.8726 2.51744L13.8834 2.52151L13.8943 2.52509C14.9044 2.8564 15.556 3.98765 15.3317 5.01314L15.3284 5.02805L15.326 5.04314L14.836 8.19314L14.836 8.19313L14.8351 8.19928C14.8184 8.31642 14.7981 8.60268 15.0138 8.84924L15.0248 8.86177L15.0366 8.87354C15.1833 9.02026 15.3817 9.09999 15.5901 9.09999H19.5901C20.4308 9.09999 21.1176 9.44886 21.5113 10.0079L21.5124 10.0095C21.8964 10.5502 21.9908 11.2849 21.7202 12.0291L21.7175 12.0365L21.7151 12.044L19.3251 19.324L19.3198 19.34L19.3156 19.3564C19.0058 20.5707 17.6766 21.6 16.2801 21.6H12.4801C12.2411 21.6 11.8403 21.5625 11.4297 21.4512C11.0123 21.338 10.6406 21.1633 10.4037 20.9264Z\"\r\n fill=\"#566563\" stroke=\"#566563\" />\r\n <path\r\n d=\"M5.37988 20.4999H4.37988C3.52442 20.4999 2.98559 20.2982 2.65822 19.9825C2.33437 19.6702 2.12988 19.1614 2.12988 18.3499V8.5499C2.12988 7.73843 2.33437 7.22962 2.65822 6.91731C2.98559 6.6016 3.52442 6.3999 4.37988 6.3999H5.37988C6.23534 6.3999 6.77418 6.6016 7.10155 6.91731C7.4254 7.22962 7.62988 7.73843 7.62988 8.5499V18.3499C7.62988 19.1614 7.4254 19.6702 7.10155 19.9825C6.77418 20.2982 6.23534 20.4999 5.37988 20.4999ZM4.37988 6.8999C4.0934 6.8999 3.83578 6.9164 3.61382 6.96689C3.38745 7.01838 3.16822 7.11196 2.99258 7.2876C2.81559 7.46459 2.72807 7.67966 2.68301 7.89002C2.63948 8.09318 2.62988 8.31967 2.62988 8.5499V18.3499C2.62988 18.5801 2.63948 18.8066 2.68301 19.0098C2.72807 19.2201 2.81559 19.4352 2.99258 19.6122C3.16822 19.7878 3.38745 19.8814 3.61382 19.9329C3.83578 19.9834 4.0934 19.9999 4.37988 19.9999H5.37988C5.66637 19.9999 5.92398 19.9834 6.14595 19.9329C6.37232 19.8814 6.59155 19.7878 6.76719 19.6122C6.94418 19.4352 7.0317 19.2201 7.07676 19.0098C7.12028 18.8066 7.12988 18.5801 7.12988 18.3499V8.5499C7.12988 8.31967 7.12028 8.09318 7.07676 7.89002C7.0317 7.67966 6.94418 7.46459 6.76719 7.2876C6.59155 7.11196 6.37232 7.01838 6.14595 6.96689C5.92398 6.9164 5.66637 6.8999 5.37988 6.8999H4.37988Z\"\r\n fill=\"#566563\" stroke=\"#566563\" />\r\n </svg>\r\n </i>\r\n </button>\r\n <button class=\"down copy\" title=\"Dislike\" [class.active]=\"chat?.unliked\" (click)=\"handleDownClick(i)\">\r\n <i *ngIf=\"chat?.unliked\">\r\n <svg width=\"18\" height=\"18\" viewBox=\"0 0 24 24\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\r\n <path\r\n d=\"M15.61 5.50002V15.66C15.61 16.06 15.49 16.45 15.27 16.78L12.54 20.84C12.11 21.49 11.04 21.95 10.13 21.61C9.15002 21.28 8.50002 20.18 8.71002 19.2L9.23002 15.93C9.27002 15.63 9.19002 15.36 9.02002 15.15C8.85002 14.96 8.60002 14.84 8.33002 14.84H4.22002C3.43002 14.84 2.75002 14.52 2.35002 13.96C1.97002 13.42 1.90002 12.72 2.15002 12.01L4.61002 4.52002C4.92002 3.28002 6.27002 2.27002 7.61002 2.27002H11.51C12.18 2.27002 13.12 2.50002 13.55 2.93002L14.83 3.92002C15.32 4.30002 15.61 4.88002 15.61 5.50002Z\"\r\n fill=\"#17235B\" />\r\n\r\n <path\r\n d=\"M18.7901 17.6099H19.8201C21.3701 17.6099 22.0001 17.0099 22.0001 15.5299V5.4799C22.0001 3.9999 21.3701 3.3999 19.8201 3.3999H18.7901C17.2401 3.3999 16.6101 3.9999 16.6101 5.4799V15.5399C16.6101 17.0099 17.2401 17.6099 18.7901 17.6099Z\"\r\n fill=\"#17235B\" />\r\n </svg>\r\n </i>\r\n\r\n <i *ngIf=\"!chat?.unliked\">\r\n <svg width=\"18\" height=\"18\" viewBox=\"0 0 24 24\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\r\n <path\r\n d=\"M10.1237 21.481L10.1148 21.4778L10.1059 21.4748C9.09577 21.1435 8.44416 20.0122 8.66849 18.9867L8.67175 18.9718L8.6741 18.9568L9.1641 15.8068L9.16413 15.8068L9.16501 15.8006C9.18175 15.6835 9.20207 15.3972 8.98633 15.1507L8.97536 15.1381L8.96359 15.1263C8.81687 14.9796 8.61841 14.8999 8.41004 14.8999H4.41004C3.56937 14.8999 2.88252 14.551 2.48884 13.992L2.4877 13.9904C2.10371 13.4497 2.00931 12.715 2.27994 11.9708L2.28263 11.9634L2.28509 11.9559L4.67509 4.67586L4.68035 4.65985L4.68451 4.64353C4.99418 3.42996 6.33271 2.3999 7.72004 2.3999H11.52C11.7591 2.3999 12.1599 2.43736 12.5704 2.54872C12.9878 2.66194 13.3596 2.83655 13.5965 3.07346L13.6191 3.09608L13.6444 3.11563L16.2785 5.14986L15.9705 5.54825L13.2875 3.47111C13.0799 3.2763 12.7837 3.1413 12.5061 3.05412C12.2031 2.95897 11.8551 2.8999 11.52 2.8999H7.72004C7.1429 2.8999 6.57353 3.12735 6.12508 3.45926C5.68428 3.78551 5.30892 4.25142 5.16963 4.79019L2.75738 12.1167C2.56223 12.659 2.57147 13.2409 2.90366 13.7012C3.24183 14.1761 3.81578 14.3999 4.42004 14.3999H8.42004C8.79702 14.3999 9.13867 14.5585 9.37252 14.8277L9.37315 14.8285C9.61286 15.1034 9.72457 15.4745 9.66568 15.875C9.6656 15.8755 9.66552 15.8761 9.66544 15.8766L9.16795 19.0704C9.00242 19.8841 9.53299 20.7428 10.2933 21.0013C10.6685 21.1391 11.0675 21.0978 11.3857 20.9917C11.7001 20.8869 12.0218 20.6898 12.2121 20.4132L12.2121 20.4132L12.215 20.4088L16.0351 14.7253L16.4472 15.0045L12.6251 20.691L12.6249 20.6912C12.259 21.2361 11.5347 21.5999 10.8 21.5999C10.5668 21.5999 10.3358 21.5596 10.1237 21.481Z\"\r\n fill=\"#566563\" stroke=\"#566563\" />\r\n <path\r\n d=\"M19.6201 17.6H18.6201C17.7647 17.6 17.2258 17.3983 16.8985 17.0826C16.5746 16.7703 16.3701 16.2615 16.3701 15.45V5.65C16.3701 4.83853 16.5746 4.32972 16.8985 4.0174C17.2258 3.7017 17.7647 3.5 18.6201 3.5H19.6201C20.4756 3.5 21.0144 3.7017 21.3418 4.0174C21.6656 4.32972 21.8701 4.83853 21.8701 5.65V15.45C21.8701 16.2615 21.6656 16.7703 21.3418 17.0826C21.0144 17.3983 20.4756 17.6 19.6201 17.6ZM18.6201 4C18.3336 4 18.076 4.01649 17.8541 4.06699C17.6277 4.11848 17.4085 4.21206 17.2328 4.3877C17.0558 4.56469 16.9683 4.77976 16.9232 4.99011C16.8797 5.19328 16.8701 5.41977 16.8701 5.65V15.45C16.8701 15.6802 16.8797 15.9067 16.9232 16.1099C16.9683 16.3202 17.0558 16.5353 17.2328 16.7123C17.4085 16.8879 17.6277 16.9815 17.8541 17.033C18.076 17.0835 18.3336 17.1 18.6201 17.1H19.6201C19.9066 17.1 20.1642 17.0835 20.3862 17.033C20.6126 16.9815 20.8318 16.8879 21.0074 16.7123C21.1844 16.5353 21.2719 16.3202 21.317 16.1099C21.3605 15.9067 21.3701 15.6802 21.3701 15.45V5.65C21.3701 5.41977 21.3605 5.19328 21.317 4.99011C21.2719 4.77976 21.1844 4.56469 21.0074 4.3877C20.8318 4.21206 20.6126 4.11848 20.3862 4.06699C20.1642 4.01649 19.9066 4 19.6201 4H18.6201Z\"\r\n fill=\"#566563\" stroke=\"#566563\" />\r\n </svg>\r\n </i>\r\n </button>\r\n </div>\r\n </div>\r\n\r\n </div>\r\n\r\n <div class=\"cta-faqs quick-prompts-extended\" *ngIf=\"i == 0 && quickPrompts?.length\">\r\n <!-- <div *ngFor=\"let tile of quickPrompts\" class=\"cta\"\r\n (click)=\"sendMessageWithTile(tile.prompt)\">\r\n Q: {{ tile.text }}\r\n </div> -->\r\n <div class=\"cta_suggestions\">\r\n <button *ngFor=\"let tile of quickPrompts\" (click)=\"sendMessageWithTile(tile.prompt)\">\r\n <ng-container *ngIf=\"tile\">{{ tile.text }}</ng-container>\r\n </button>\r\n </div>\r\n </div>\r\n <div class=\"chat bot\" *ngIf=\"i == 0 && botSkills\">\r\n <div class=\"chat-box\">\r\n <div class=\"message\">\r\n <p [innerHTML]=\"processMessageForDisplay(botSkills)\"></p>\r\n \r\n </div>\r\n </div>\r\n </div>\r\n <div *ngIf=\"chat?.suggestions?.length\">\r\n <h4 class=\"labelChat\">\r\n Here are some things EventsGPT Copilot can help you do:\r\n </h4>\r\n <div class=\"cta_suggestions\">\r\n <button *ngFor=\"let suggestion of chat?.suggestions\" (click)=\"sendMessageWithTile(suggestion)\">\r\n <ng-container *ngIf=\"suggestion\">{{\r\n suggestion\r\n }}</ng-container>\r\n </button>\r\n </div>\r\n </div>\r\n <div *ngIf=\"\r\n chat?.action?.section_id == 'company_search' ||\r\n chat?.action?.section_id == 'user_search' ||\r\n chat?.action?.section_id == 'industry_company_search'\r\n \">\r\n <div class=\"box\">\r\n <div class=\"tiktokwrapper\">\r\n <div class=\"tiktokshell\" *ngFor=\"let user of chat?.action.users\">\r\n <div class=\"videoPhotobox\">\r\n <ng-conatiner *ngIf=\"user?.photoPath && !user.userVideosModel\">\r\n <img [src]=\"user?.photoPath\" />\r\n </ng-conatiner>\r\n <ng-conatiner *ngIf=\"user.userVideosModel\">\r\n <app-video-player *ngIf=\"user?.userVideosModel\" [isDev]=\"isDev\" [currentUserId]=\"userId\"\r\n [videoObj]=\"user?.userVideosModel\" [user]=\"user\" [eventId]=\"eventId\" type=\"1\">\r\n </app-video-player>\r\n </ng-conatiner>\r\n </div>\r\n\r\n <div class=\"noPhoto\" *ngIf=\"!user?.photoPath && !user.userVideosModel\">\r\n <h3>\r\n {{ user.firstName | slice: 0:1\r\n }}{{ user.lastName | slice: 0:1 }}\r\n </h3>\r\n </div>\r\n <div class=\"overlymask\" *ngIf=\"!user.userVideosModel\"></div>\r\n <div class=\"onshell-content\">\r\n <div class=\"title-shell\">\r\n <h3>{{ user.firstName }} {{ user.lastName }}</h3>\r\n <h3 class=\"companyName\">{{ user.company }}</h3>\r\n </div>\r\n <div class=\"button-shell\">\r\n <button class=\"Connectbtn\" (click)=\"connectToUser(user.userId)\">\r\n {{\r\n canConnect(user.userId)\r\n ? 'Connect'\r\n : canDisconnect(user.userId)\r\n ? 'Disconnect'\r\n : 'Request\r\n Sent'\r\n }}\r\n </button>\r\n <button class=\"schedulebtn\" (click)=\"scheduleMeetingWithUser(user)\">\r\n Schedule\r\n </button>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n <div *ngIf=\"chat?.action?.section_id == myUpcomingSessionAction\">\r\n <div class=\"agenda-items-wrapper\" class=\"agenda-items-wrapper\">\r\n <div class=\"list-view\">\r\n <div class=\"session-detail-wrapper card-background-session\"\r\n *ngFor=\"let upcomingSession of chat?.action.content\">\r\n <div class=\"thumbnail\">\r\n <img alt=\"Introduction to the Imaging Radar Academy\"\r\n src=\"https://s27media.azureedge.net/8008/profile_pic/453cea2c-feba-11ed-8c0b-00155d025b0a.png\"\r\n class=\"\" />\r\n <!---->\r\n <!---->\r\n <!----><button class=\"play-btn color-primary\"\r\n title=\"Play Session: Introduction to the Imaging Radar Academy\">\r\n <span class=\"material-icons notranslate\">\r\n play_circle_outline\r\n </span>\r\n <!---->\r\n </button>\r\n <!---->\r\n <!---->\r\n </div>\r\n <!---->\r\n <!---->\r\n <div class=\"content p-3\">\r\n <div class=\"d-flex justify-content-between align-items-center\">\r\n <div class=\"d-flex flex-column\">\r\n <p class=\"fs-xs mb-0 body-text-color\">\r\n {{\r\n upcomingSession.dateTimeRange.start\r\n | date\r\n : 'MM-dd-yyyy\r\n HH:mm'\r\n : 'UTC'\r\n }}\r\n -\r\n {{\r\n upcomingSession.dateTimeRange.end\r\n | date: 'MM-dd-yyyy HH:mm':'UTC'\r\n }}\r\n {{ upcomingSession.timeZone.id }}\r\n </p>\r\n <!---->\r\n <!---->\r\n <!-- <p class=\"fs-xs mb-2 color-secondary\" title=\"Session Type: Generative AI\">Generative AI </p> -->\r\n <!---->\r\n </div>\r\n <div class=\"d-flex align-items-center actions px-2\">\r\n <!---->\r\n <button (click)=\"\r\n performSessionAction(\r\n upcomingSession.id,\r\n 'view-session'\r\n )\r\n \" class=\"s27-btn-icon body-text-color\"\r\n title=\"View Session Information: Introduction to the Imaging Radar Academy\">\r\n <span class=\"material-icons notranslate\">\r\n remove_red_eye\r\n </span>\r\n </button>\r\n\r\n <button (click)=\"\r\n performSessionAction(\r\n upcomingSession.id,\r\n 'add-to-agenda'\r\n )\r\n \" class=\"s27-btn-icon body-text-color\">\r\n <span class=\"material-icons notranslate\"\r\n title=\"Add Session: Introduction to the Imaging Radar Academy to My agendaa\">\r\n event_available\r\n </span>\r\n </button>\r\n <!---->\r\n <!---->\r\n <!---->\r\n <!---->\r\n\r\n <button (click)=\"\r\n performSessionAction(upcomingSession.id, 'play')\r\n \" class=\"s27-btn-icon body-text-color\" title=\"Copy session link to share\">\r\n <span class=\"material-icons notranslate\">\r\n play_circle_outline\r\n </span>\r\n </button>\r\n <!---->\r\n </div>\r\n </div>\r\n <h2 class=\"body-text-color\">\r\n {{ upcomingSession.title }}\r\n </h2>\r\n <div class=\"session-description color-secondary\"\r\n [innerHTML]=\"sanitizeHtml(upcomingSession.description)\">\r\n </div>\r\n <ul class=\"speakers grid-2-cols\" *ngFor=\"let speakerId of upcomingSession.speakers\">\r\n <li class=\"\">\r\n <div class=\"image\" title=\"Blair Wunderlich\">\r\n <img alt=\"Blair Wunderlich\" [src]=\"speakers[speakerId]?.photoPath\" class=\"\" />\r\n <!---->\r\n <!---->\r\n <!---->\r\n </div>\r\n <!---->\r\n <div class=\"content pl-3\" style=\"text-transform: none\">\r\n <div class=\"mb-0 body-text-color fs-xs fw-500\">\r\n {{ speakers[speakerId]?.firstName }}\r\n {{ speakers[speakerId]?.lastName }}\r\n </div>\r\n <div class=\"color-secondary fs-xxs\">\r\n {{ speakers[speakerId]?.jobTitle }}\r\n </div>\r\n <div class=\"color-secondary fs-xxs\">\r\n {{ speakers[speakerId]?.company }}\r\n </div>\r\n </div>\r\n <!---->\r\n </li>\r\n </ul>\r\n <!---->\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n\r\n <div class=\"chat bot\" *ngIf=\"isChatingWithAi && !executingWorkflow\">\r\n <div class=\"chat-box\">\r\n <div class=\"message\">\r\n <div class=\"o-media__body\">\r\n <div class=\"o-vertical-spacing\">\r\n <h3 class=\"blog-post__headline\">\r\n <span class=\"skeleton-box\" style=\"width: 55%\"></span>\r\n </h3>\r\n <p>\r\n <span class=\"skeleton-box\" style=\"width: 80%\"></span>\r\n <span class=\"skeleton-box\" style=\"width: 90%\"></span>\r\n <span class=\"skeleton-box\" style=\"width: 83%\"></span>\r\n <span class=\"skeleton-box\" style=\"width: 80%\"></span>\r\n </p>\r\n </div>\r\n </div>\r\n\r\n <div class=\"time-cta\">\r\n <div class=\"Icon_TimeSTamp\">\r\n <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"44\" height=\"44\" viewBox=\"0 0 44 44\">\r\n <g id=\"Group_121\" data-name=\"Group 121\" transform=\"translate(4843 -371)\">\r\n <g id=\"Ellipse_18\" data-name=\"Ellipse 18\" transform=\"translate(-4843 371)\" fill=\"#fcfcfc\"\r\n stroke=\"#dfdfdf\" stroke-width=\"1\">\r\n <circle cx=\"22\" cy=\"22\" r=\"22\" stroke=\"none\" />\r\n <circle cx=\"22\" cy=\"22\" r=\"21.5\" fill=\"none\" />\r\n </g>\r\n <g id=\"Group_120\" data-name=\"Group 120\" transform=\"translate(-4835.141 378.855)\">\r\n <g id=\"Group_1\" data-name=\"Group 1\" transform=\"translate(7.29 0)\">\r\n <path id=\"Path_1\" data-name=\"Path 1\"\r\n d=\"M93.774,41.324,98.757,44.2v5.753l-4.983,2.877-4.983-2.877V44.2l4.983-2.877m0-2.034L87.03,43.183V50.97l6.744,3.893,6.744-3.893V43.183L93.774,39.29Z\"\r\n transform=\"translate(-87.03 -39.29)\" fill=\"gray\" />\r\n </g>\r\n <g id=\"Group_2\" data-name=\"Group 2\" transform=\"translate(0 12.717)\">\r\n <path id=\"Path_2\" data-name=\"Path 2\"\r\n d=\"M52.374,113.544l4.983,2.877v5.753l-4.983,2.877-4.983-2.877v-5.753l4.983-2.877m0-2.034L45.63,115.4v7.787l6.744,3.893,6.744-3.893V115.4l-6.744-3.893Z\"\r\n transform=\"translate(-45.63 -111.51)\" fill=\"gray\" />\r\n </g>\r\n <g id=\"Group_3\" data-name=\"Group 3\" transform=\"translate(14.793 12.717)\">\r\n <path id=\"Path_3\" data-name=\"Path 3\"\r\n d=\"M136.384,113.544l4.983,2.877v5.753l-4.983,2.877-4.983-2.877v-5.753l4.983-2.877m0-2.034L129.64,115.4v7.787l6.744,3.893,6.744-3.893V115.4l-6.744-3.893Z\"\r\n transform=\"translate(-129.64 -111.51)\" fill=\"gray\" />\r\n </g>\r\n </g>\r\n </g>\r\n </svg>\r\n <div class=\"dateTime\" [style.color]=\"dateTimeColor ? '' : ''\">\r\n <span> {{ 'Assistant' }}</span> {{ chat?.time\r\n ? chat?.time\r\n : (dateTime.now | date: 'shortTime')\r\n }}\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n <div class=\"chat bot\" *ngIf=\"loading\">\r\n <div class=\"chat-box\">\r\n <div class=\"message\">\r\n <div class=\"o-media__body\">\r\n <div class=\"o-vertical-spacing\">\r\n <h3 class=\"blog-post__headline\">\r\n <span class=\"skeleton-box\" style=\"width: 55%\"></span>\r\n </h3>\r\n <p>\r\n <span class=\"skeleton-box\" style=\"width: 80%\"></span>\r\n <span class=\"skeleton-box\" style=\"width: 90%\"></span>\r\n <span class=\"skeleton-box\" style=\"width: 83%\"></span>\r\n <span class=\"skeleton-box\" style=\"width: 80%\"></span>\r\n </p>\r\n </div>\r\n </div>\r\n\r\n <div class=\"time-cta\">\r\n <div class=\"Icon_TimeSTamp\">\r\n <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"44\" height=\"44\" viewBox=\"0 0 44 44\">\r\n <g id=\"Group_121\" data-name=\"Group 121\" transform=\"translate(4843 -371)\">\r\n <g id=\"Ellipse_18\" data-name=\"Ellipse 18\" transform=\"translate(-4843 371)\" fill=\"#fcfcfc\"\r\n stroke=\"#dfdfdf\" stroke-width=\"1\">\r\n <circle cx=\"22\" cy=\"22\" r=\"22\" stroke=\"none\" />\r\n <circle cx=\"22\" cy=\"22\" r=\"21.5\" fill=\"none\" />\r\n </g>\r\n <g id=\"Group_120\" data-name=\"Group 120\" transform=\"translate(-4835.141 378.855)\">\r\n <g id=\"Group_1\" data-name=\"Group 1\" transform=\"translate(7.29 0)\">\r\n <path id=\"Path_1\" data-name=\"Path 1\"\r\n d=\"M93.774,41.324,98.757,44.2v5.753l-4.983,2.877-4.983-2.877V44.2l4.983-2.877m0-2.034L87.03,43.183V50.97l6.744,3.893,6.744-3.893V43.183L93.774,39.29Z\"\r\n transform=\"translate(-87.03 -39.29)\" fill=\"gray\" />\r\n </g>\r\n <g id=\"Group_2\" data-name=\"Group 2\" transform=\"translate(0 12.717)\">\r\n <path id=\"Path_2\" data-name=\"Path 2\"\r\n d=\"M52.374,113.544l4.983,2.877v5.753l-4.983,2.877-4.983-2.877v-5.753l4.983-2.877m0-2.034L45.63,115.4v7.787l6.744,3.893,6.744-3.893V115.4l-6.744-3.893Z\"\r\n transform=\"translate(-45.63 -111.51)\" fill=\"gray\" />\r\n </g>\r\n <g id=\"Group_3\" data-name=\"Group 3\" transform=\"translate(14.793 12.717)\">\r\n <path id=\"Path_3\" data-name=\"Path 3\"\r\n d=\"M136.384,113.544l4.983,2.877v5.753l-4.983,2.877-4.983-2.877v-5.753l4.983-2.877m0-2.034L129.64,115.4v7.787l6.744,3.893,6.744-3.893V115.4l-6.744-3.893Z\"\r\n transform=\"translate(-129.64 -111.51)\" fill=\"gray\" />\r\n </g>\r\n </g>\r\n </g>\r\n </svg>\r\n <div class=\"dateTime\" [style.color]=\"dateTimeColor ? '' : ''\">\r\n <span>{{ 'Loading ...' }}</span>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n <!-- <div #chatMain></div> -->\r\n <div *ngIf=\"openWorkflowInput && selectedWorkflow && !executingWorkflow\" class=\"chatFooterWrapper\">\r\n <!-- new UI for Chat Message Section by Amit -->\r\n <div class=\"chat-footer-upt\">\r\n <div class=\"topinfo-containerbox\">\r\n <div class=\"agents_note_wrapper\">\r\n <div>\r\n <h6>{{selectedWorkflow?.Name}}</h6>\r\n {{selectedWorkflow?.Description}}\r\n </div>\r\n </div>\r\n\r\n <div class=\"agents_note_wrapper\">\r\n <button mat-icon-button class=\"closeButtonSource\" (click)=\"toggleWorkflows(false)\">\r\n <mat-icon>close</mat-icon>\r\n </button>\r\n </div>\r\n </div>\r\n <div class=\"bottombox-wrapper\">\r\n <!-- here i need to loop through all the input fields selectedWorkflow.Trigger.InputSchema and render the input fields -->\r\n <!-- Form for Workflow Inputs -->\r\n <form [formGroup]=\"workflowForm\" (ngSubmit)=\"onWorkflowSubmit()\" class=\"form-container\">\r\n <div *ngFor=\"let input of selectedWorkflow?.Trigger?.InputSchema\" class=\"form-group\">\r\n <label>{{ input.Label }}</label>\r\n\r\n <!-- Handle Text Input or Text Area based on requirement -->\r\n <textarea *ngIf=\"input.Type === 'string'\" formControlName=\"{{input.InputId}}\"\r\n [placeholder]=\"input.Placeholder\" [rows]=\"2\" [required]=\"input.Required\"\r\n class=\"form-control\"></textarea>\r\n\r\n <!-- Dropdown for Select Options -->\r\n <select *ngIf=\"input.Type === 'select'\" formControlName=\"{{input.InputId}}\" class=\"form-control\">\r\n <option *ngFor=\"let option of input.Options\" [value]=\"option.Value\">{{\r\n option.Label }}</option>\r\n </select>\r\n </div>\r\n\r\n <!-- Submit button aligned to the right -->\r\n <div class=\"form-group\">\r\n <button type=\"submit\" class=\"btn btn-primary submit-button\">Submit</button>\r\n </div>\r\n </form>\r\n </div>\r\n </div>\r\n\r\n\r\n <!-- new UI for Chat Message Section by Amit -->\r\n </div>\r\n <div *ngIf=\"!openWorkflowInput\" class=\"chatFooterWrapper\">\r\n <!-- new UI for Chat Message Section by Amit -->\r\n <div class=\"chat-footer-upt\">\r\n <div class=\"topinfo-containerbox\">\r\n <div class=\"agents_note_wrapper\">\r\n\r\n <div class=\"agents-dropdown-wrapper\">\r\n <div class=\"dropdown-wrapper\" (click)=\"toggleDropdown()\">\r\n <div class=\"dropdown-header\">\r\n <span>{{ getDropdownHeaderText() }}</span>\r\n <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"24\" height=\"24\" fill=\"none\" stroke=\"currentColor\"\r\n stroke-width=\"2\" viewBox=\"0 0 24 24\">\r\n <path d=\"M19 9l-7 7-7-7\" />\r\n </svg>\r\n </div>\r\n <div class=\"dropdown-menu\" *ngIf=\"isDropdownOpen\">\r\n <label (click)=\"onSelectAll()\">\r\n <input type=\"checkbox\" [checked]=\"areAllSelected()\" />\r\n All\r\n </label>\r\n <label *ngFor=\"let agent of agents\" (click)=\"onAgentChange(agent)\">\r\n <input type=\"checkbox\" [(ngModel)]=\"agent.selected\" />\r\n {{ agent.agentName }}\r\n </label>\r\n </div>\r\n </div>\r\n </div>\r\n\r\n </div>\r\n\r\n <div class=\"agents_note_wrapper\" *ngIf=\"!checkForCop29BotId()\">\r\n\r\n <div class=\"agents-dropdown-wrapper\">\r\n <div class=\"dropdown-wrapper\" (click)=\"toggleWorkflows()\">\r\n <div class=\"dropdown-header\">\r\n <svg stroke=\"currentColor\" fill=\"currentColor\" stroke-width=\"0\" viewBox=\"0 0 256 256\"\r\n class=\"h-5 w-5\" height=\"1.3em\" width=\"1.3em\" xmlns=\"http://www.w3.org/2000/svg\">\r\n <path\r\n d=\"M245.66,74.34l-32-32a8,8,0,0,0-11.32,11.32L220.69,72H192a74.49,74.49,0,0,0-28.35,6.73c-13.62,6.29-30.83,19.71-35.54,48-5.32,31.94-29.1,39.22-41,40.86a40,40,0,1,0,.18,16.06A71.65,71.65,0,0,0,108.13,178C121.75,172,139,158.6,143.89,129.31,150.65,88.77,190.34,88,192,88h28.69l-18.35,18.34a8,8,0,0,0,11.32,11.32l32-32A8,8,0,0,0,245.66,74.34ZM48,200a24,24,0,1,1,24-24A24,24,0,0,1,48,200Z\">\r\n </path>\r\n </svg> \r\n Workflows\r\n </div>\r\n <div class=\"dropdown-menu\" *ngIf=\"isWorkflowOpen\">\r\n <label *ngFor=\"let orgWorkflow of orgWorkflows\" (click)=\"onWorkflowSelected(orgWorkflow)\">\r\n {{ orgWorkflow.Name }}\r\n </label>\r\n </div>\r\n </div>\r\n </div>\r\n\r\n </div>\r\n\r\n </div>\r\n <div class=\"bottombox-wrapper\">\r\n <!-- <input [disabled]=\"isChatingWithAi\" type=\"text\" class=\"form-control-1 s27-scroll\"\r\n \r\n placeholder=\"Ask anything...\" [style.background]=\"formFieldBgColor ? formFieldBgColor : ''\"\r\n [style.color]=\"formFieldTextColor ? formFieldTextColor : ''\" [(ngModel)]=\"input\"\r\n (keyup.enter)=\"handleSubmit()\" #myInput /> -->\r\n <textarea [disabled]=\"isChatingWithAi\" class=\"form-control-1 s27-scroll chat-textarea\"\r\n placeholder=\"Ask anything...\" [(ngModel)]=\"input\" (keydown)=\"handleKeydown($event)\"\r\n (input)=\"adjustTextareaHeight($event)\" #myInput></textarea>\r\n\r\n <button (click)=\"toggleRecording()\" class=\"btn cta-chat mr-1\">\r\n <svg *ngIf=\"!isRecording\" stroke=\"currentColor\" fill=\"currentColor\" stroke-width=\"0\" viewBox=\"0 0 512 512\"\r\n height=\"1em\" width=\"1em\" xmlns=\"http://www.w3.org/2000/svg\">\r\n <!-- Mic Icon -->\r\n <path\r\n d=\"M256 320c53 0 96-43 96-96V96c0-53-43-96-96-96s-96 43-96 96v128c0 53 43 96 96 96zm144-96h-16c0 66.27-52.73 120-120 120s-120-53.73-120-120h-16c-17.67 0-32 14.33-32 32v32c0 53.87 38.13 100.64 91.21 112.27C210.13 457.77 231.58 464 256 464s45.87-6.23 65.79-17.73C374.87 388.64 416 341.87 416 288v-32c0-17.67-14.33-32-32-32z\">\r\n </path>\r\n </svg>\r\n <svg *ngIf=\"isRecording\" stroke=\"currentColor\" fill=\"currentColor\" stroke-width=\"0\" viewBox=\"0 0 24 24\"\r\n height=\"1em\" width=\"1em\" xmlns=\"http://www.w3.org/2000/svg\">\r\n <!-- Square Stop Icon -->\r\n <path d=\"M5 5h14v14H5z\"></path>\r\n </svg>\r\n </button>\r\n\r\n\r\n <button class=\"btn cta-chat rotate\" (click)=\"handleSubmit()\"\r\n [style.background]=\"sendButtonColor ? sendButtonColor : ''\"\r\n [style.color]=\"sendButtonTextColor ? sendButtonTextColor : ''\">\r\n <svg stroke=\"currentColor\" fill=\"currentColor\" stroke-width=\"0\" viewBox=\"0 0 512 512\" height=\"1em\"\r\n width=\"1em\" xmlns=\"http://www.w3.org/2000/svg\">\r\n <path\r\n d=\"M476.59 227.05l-.16-.07L49.35 49.84A23.56 23.56 0 0027.14 52 24.65 24.65 0 0016 72.59v113.29a24 24 0 0019.52 23.57l232.93 43.07a4 4 0 010 7.86L35.53 303.45A24 24 0 0016 327v113.31A23.57 23.57 0 0026.59 460a23.94 23.94 0 0013.22 4 24.55 24.55 0 009.52-1.93L476.4 285.94l.19-.09a32 32 0 000-58.8z\">\r\n </path>\r\n </svg>\r\n <!-- SEND -->\r\n </button>\r\n </div>\r\n </div>\r\n\r\n\r\n <!-- new UI for Chat Message Section by Amit -->\r\n </div>\r\n\r\n <div class=\"NoteTxt\">\r\n <div class=\"note\">\r\n <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"12.882\" height=\"12.883\" viewBox=\"0 0 12.882 12.883\">\r\n <path id=\"Icon_ion-shield-checkmark\" data-name=\"Icon ion-shield-checkmark\"\r\n d=\"M15.106,4.532a.46.46,0,0,0-.378-.424A20.132,20.132,0,0,1,8.881,2.291a.46.46,0,0,0-.379,0A20.132,20.132,0,0,1,2.655,4.108a.46.46,0,0,0-.378.424A11.3,11.3,0,0,0,2.98,9.4a10.049,10.049,0,0,0,2.06,3.235A10.516,10.516,0,0,0,8.521,15.1a.46.46,0,0,0,.345,0,10.516,10.516,0,0,0,3.481-2.465A10.049,10.049,0,0,0,14.4,9.4,11.3,11.3,0,0,0,15.106,4.532Zm-3.767,2.16L8.153,10.373a.46.46,0,0,1-.328.159H7.806a.46.46,0,0,1-.322-.131L6.069,9.014a.46.46,0,1,1,.644-.657L7.777,9.4,10.644,6.09a.46.46,0,0,1,.7.6Z\"\r\n transform=\"translate(-2.25 -2.25)\" fill=\"#06f\" />\r\n </svg>\r\n\r\n\r\n <span class=\"text\">Your personal or company information is kept\r\n private and secure\r\n within this chat.</span>\r\n </div>\r\n </div>\r\n </mat-drawer-content>\r\n </mat-drawer>\r\n <mat-drawer class=\"drawer edit-boxDrawer\" style=\"width: 45%\" #sourcesDrawer [position]=\"'end'\" [mode]=\"'over'\"\r\n [style.background]=\"\r\n 'linear-gradient(' + (bgGradient ? bgGradient.join(', ') : '') + ')'\r\n \">\r\n <mat-drawer-content>\r\n <div class=\"sourceDraweContainer\">\r\n <div class=\"container-fluid\">\r\n <button mat-icon-button class=\"closeButtonSource\" (click)=\"onCloseSource()\">\r\n <mat-icon>close</mat-icon>\r\n </button>\r\n <h1>{{ currentSourcesList?.length }} Sources</h1>\r\n <!-- <p>Tell me about latest news from Mistral about AI agents announcement done this month</p> -->\r\n <hr />\r\n <ul class=\"sources-list\">\r\n <li *ngFor=\"let item of currentSourcesList; let si = index\">\r\n <!-- <input type=\"checkbox\" id=\"source1\"> -->\r\n <div class=\"source-content\" (click)=\"openLinkInNewTab(item.link)\">\r\n <label for=\"source1\">\r\n <span class=\"source-title\"><span class=\"ml-1\">{{ si + 1\r\n }}.</span>{{ item.title }}</span>\r\n <span class=\"image-container\">\r\n <img class=\"relative block\" [src]=\"getFaviconUrl(item.link)\"\r\n [alt]=\"getDomainName(item.link) + ' favicon'\" />\r\n <span> {{ getDomainName(item.link) }}</span>\r\n </span>\r\n <span class=\"source-description\">{{ item.desc }}</span>\r\n </label>\r\n </div>\r\n </li>\r\n </ul>\r\n </div>\r\n </div>\r\n </mat-drawer-content>\r\n </mat-drawer>\r\n <mat-drawer class=\"drawer edit-boxDrawer\" style=\"width: 45%\" #editorsDrawer [position]=\"'end'\" [mode]=\"'push'\"\r\n [style.background]=\"\r\n 'linear-gradient(' + (bgGradient ? bgGradient.join(', ') : '') + ')'\r\n \">\r\n <mat-drawer-content>\r\n <lib-bot-html-editor *ngIf=\"isContentLoaded\" [editorContent]=\"currentMessageForEditor\"\r\n [isDocInEditMode]=\"isDocInEditMode\" [documentContent]=\"documentContent\" [conversationId]=\"conversationId\"\r\n [botId]=\"botId\"></lib-bot-html-editor>\r\n </mat-drawer-content>\r\n </mat-drawer>\r\n</mat-drawer-container>\r\n\r\n\r\n<div *ngIf=\"showWorkflowExecutionDetails\" class=\"modal\">\r\n <div class=\"modal-content\">\r\n <div class=\"close-wrapper\"><span class=\"close_pop\" (click)=\"closeModal()\">×</span></div>\r\n <div class=\"titleSection\">\r\n <!-- Workflow Title -->\r\n <h2>{{ workflowExecutionDetails.WorkflowName }}</h2>\r\n <!-- Workflow Title -->\r\n </div>\r\n <!-- Inputs Section -->\r\n <div class=\"inputs-section\">\r\n <h3>Inputs</h3>\r\n <ul>\r\n <li *ngFor=\"let input of objectToArray(workflowExecutionDetails.Inputs)\">\r\n {{ input.key }}: {{ input.value }}\r\n </li>\r\n </ul>\r\n </div>\r\n\r\n <!-- Actions Section (Displayed as Timeline) -->\r\n <div class=\"actions-section\">\r\n <h3>Agent Actions</h3>\r\n <div class=\"timeline\">\r\n <div *ngFor=\"let action of workflowExecutionDetails.Actions\" class=\"timeline-item\">\r\n <div class=\"timestamp-section\">\r\n <h4>{{ action.ActionName || action.Name }}</h4>\r\n <p><strong></strong> {{\r\n action.InsertTimeStamp }}</p>\r\n </div>\r\n <p [innerHTML]=\"processMessageForDisplay(action.Output)\"></p>\r\n <!-- <pre>{{ action.Output }}</pre> -->\r\n </div>\r\n </div>\r\n </div>\r\n\r\n <!-- Insert Timestamp -->\r\n <div class=\"timestamp-section\">\r\n <p><strong>Inserted At:</strong> {{\r\n workflowExecutionDetails.InsertTimeStamp }}</p>\r\n </div>\r\n </div>\r\n</div>",
|
|
1765
|
-
|
|
1766
|
-
styles: ["@import url(\"https://e1cdn.social27.com/digitalevents/liteversion/fonts/segoe-ui/stylesheet.css\");.sticky-header-chat{background:#fff;border-bottom:1px solid #ddd;padding:0 0 10px;position:sticky;top:-21px;transition:all 1s;z-index:100}::-webkit-scrollbar{width:5px}::-webkit-scrollbar-track{background:#f1f1f1}::-webkit-scrollbar-thumb,::-webkit-scrollbar-thumb:hover{background:#e5ccbc}body{overflow:hidden}.ios-device .drawer .chat-footer .form-control{font-size:16px}.hivegpt-chat-wrapper{background:transparent!important;height:100%;inset:0;opacity:0;position:fixed;visibility:hidden;z-index:999999}.hivegpt-chat-wrapper.mat-drawer-container-has-open{background:transparent!important;opacity:1;transition:all .3s;visibility:visible;z-index:999999}.hivegpt-chat-wrapper .mat-drawer:not(.mat-drawer-side){box-shadow:none}.hivegpt-chat-wrapper mat-drawer{background-color:#fff!important;background-image:none!important;width:100%}.hivegpt-chat-wrapper mat-drawer.full-width-drawer{max-width:100%}.hivegpt-chat-wrapper .mat-drawer-content{display:flex;flex-direction:column}.hivegpt-chat-wrapper .chat-header{padding:16px 40px;width:100%}.hivegpt-chat-wrapper .chat-header h2{font-family:Segoe UI,sans-serif;font-size:36px;font-weight:500;letter-spacing:-.72px;line-height:108%;margin:0;text-transform:uppercase}.hivegpt-chat-wrapper .chat-header .closeIcon{align-items:center;background:transparent;border:none;border-radius:50%;display:inline-flex;font-size:18px;height:35px;justify-content:center;outline:none;padding:0;position:absolute;right:12px;top:16px;width:35px}.hivegpt-chat-wrapper .chat-main{display:flex;flex:1;flex-direction:column;justify-content:space-between;overflow-y:auto;width:100%}.hivegpt-chat-wrapper .chat-main .innerChat{overflow-y:auto;padding:20px 40px 10px;width:100%}.hivegpt-chat-wrapper .chat-main .chat-box{max-width:80%;width:100%}.hivegpt-chat-wrapper .chat-main .chat-box .message{margin-left:70px;margin-top:20px;min-height:60px;padding:0 20px 0 0;position:relative}.hivegpt-chat-wrapper .chat-main .chat-box .message p{color:#000;font-family:Segoe UI,sans-serif;font-size:16px;font-style:normal;font-weight:500;line-height:160%;margin:0;text-align:left;white-space:pre-line}.hivegpt-chat-wrapper .chat-main .chat-box .message p a{color:#17235b!important;cursor:pointer!important;font-weight:700;text-decoration:underline}.hivegpt-chat-wrapper .chat-main .chat-box .message .cta{align-items:end;bottom:-7px;display:inline-flex;gap:10px;grid-gap:10px;position:relative;right:-10px;z-index:5}.hivegpt-chat-wrapper .chat-main .chat-box .message .cta button{background:transparent;border:none;color:#566563;cursor:pointer;padding:0;transition:all .3s}.hivegpt-chat-wrapper .chat-main .chat-box .message .cta button i{display:inline-block}.hivegpt-chat-wrapper .chat-main .chat-box .message .cta button:hover{color:#17235b}.hivegpt-chat-wrapper .chat-main .chat-box .message .cta button.up:hover i{animation:thumbsUpAnimation .5s ease-in-out;animation-fill-mode:forwards}.hivegpt-chat-wrapper .chat-main .chat-box .message .cta button.down:hover i{animation:thumbsDownAnimation .5s ease-in-out;animation-fill-mode:forwards}.hivegpt-chat-wrapper .chat-main .chat{margin-bottom:20px}.hivegpt-chat-wrapper .chat-main .chat.user{text-align:right}.hivegpt-chat-wrapper .chat-main .chat.user .chat-box{margin-left:auto}.hivegpt-chat-wrapper .chat-main .chat.user .chat-box .message{background:linear-gradient(96deg,#8b4ead -10.61%,#761c79 84.59%);border-radius:20px 20px 0 20px;color:#fff}.hivegpt-chat-wrapper .chat-main .chat.user .chat-box .message p{color:#fff;text-align:left}.hivegpt-chat-wrapper .chat-main .chat.user .dateTime{text-align:right}.hivegpt-chat-wrapper .chat-main .chat.user .time-cta{justify-content:flex-end}.hivegpt-chat-wrapper .chat-main .chat .Icon_TimeSTamp{align-content:center;align-items:center;display:flex;justify-content:left;margin:0 -60px;width:auto}.hivegpt-chat-wrapper .chat-main .chat .dateTime{color:#333232;font-size:15px;font-style:normal;font-weight:300;line-height:140%}.hivegpt-chat-wrapper .chat-main .chat .dateTime span{color:#06f;font-size:15px;font-style:normal;font-weight:500;line-height:140%;margin-left:15px;margin-right:5px}.hivegpt-chat-wrapper .chat-main .chat:last-of-type{margin-bottom:0}.hivegpt-chat-wrapper .chatFooterWrapper{background:#fff;border:2px solid hsla(0,0%,85.5%,.5882352941176471);border-radius:10px;box-shadow:2px 0 5px #e1e1e1;margin:0 auto 15px;margin-top:10px!important;transition:all .5s;width:75%}.hivegpt-chat-wrapper .chatFooterWrapper:hover{border:2px solid hsla(0,0%,72.2%,.5882352941176471);box-shadow:2px 0 4px #ddd}.hivegpt-chat-wrapper .chatFooterWrapper .chat-footer-upt{padding:4px}.hivegpt-chat-wrapper .chatFooterWrapper .note{align-items:center;background:rgba(27,117,187,.050980392156862744);border-radius:15px;color:#000;display:inline-flex;font-size:12px;gap:8px;line-height:1;margin:0 auto 4px;padding:10px 25px}.hivegpt-chat-wrapper .chatFooterWrapper .note a{text-transform:capitalize}.hivegpt-chat-wrapper .chatFooterWrapper .note i{font-size:18px}.hivegpt-chat-wrapper .chatFooterWrapper .note i svg{height:18px;width:18px}.hivegpt-chat-wrapper .chatFooterWrapper .note span{flex:1;gap:4px;line-height:1.3}.hivegpt-chat-wrapper .chat-footer{align-items:center;display:flex;gap:8px;justify-content:space-between;padding:0;position:relative}.hivegpt-chat-wrapper .chat-footer .form-control{background:#fff!important;border:0;line-height:21px;outline:0;padding:10px;position:relative;width:100%}.hivegpt-chat-wrapper .chat-footer .form-control::-moz-placeholder{color:#6c7a78}.hivegpt-chat-wrapper .chat-footer .form-control::placeholder{color:#6c7a78}.hivegpt-chat-wrapper .chat-footer .form-control:focus{border-color:#e5ccbc}.hivegpt-chat-wrapper .chat-footer .cta-footer{align-items:center;display:flex;gap:8px;justify-content:space-between;margin-bottom:10px;position:absolute;right:15px;text-align:right}.hivegpt-chat-wrapper .chat-footer .cta-footer .btn{color:#000;font-weight:500;gap:8px;max-width:150px;padding:0}.hivegpt-chat-wrapper .chat-footer .cta-footer .cta-chat{align-items:center;background:transparent!important;border:none;border-radius:0;box-shadow:0 1px 2px 0 rgba(16,24,40,.05);display:inline-flex;font-size:20px;height:auto;justify-content:center;width:auto}.hivegpt-chat-wrapper .chat-footer .cta-footer .cta-chat:hover{opacity:.8}.hivegpt-chat-wrapper .chat-footer .cta-footer .cta-again{background:#17235b;border:1px solid #17235b;color:#fff}.hivegpt-chat-wrapper .cta-faqs{align-items:flex-end;display:flex;flex-direction:column;flex-wrap:wrap;gap:8px;margin-left:auto;max-width:80%;padding:10px 0 0}.hivegpt-chat-wrapper .cta-faqs .cta{background:transparent;border:1px solid #c9a893;border-radius:20px 20px 0 20px;color:#333;cursor:pointer;font-family:Segoe UI,sans-serif;font-size:14px;font-style:normal;font-weight:500;line-height:160%;margin:0;min-height:44px;padding:12px 20px;text-align:left;text-decoration:none;transition:all .3s;white-space:pre-line}.spinner{align-items:center;display:flex;gap:2px;justify-content:center}.spinner>div{animation:bouncedelay 1.4s ease-in-out infinite;animation-fill-mode:both;background-color:#173330;border-radius:100%;display:inline-block;height:5px;width:5px}.spinner .bounce1{animation-delay:-.32s}.spinner .bounce2{animation-delay:-.16s}@keyframes bouncedelay{0%,80%,to{-webkit-transform:scale(0);transform:scale(0)}40%{-webkit-transform:scale(1);transform:scale(1)}}.time-cta{align-items:center;display:flex;gap:8px;justify-content:start;margin-top:5px}@keyframes thumbsUpAnimation{0%,to{transform:translateY(0)}50%{transform:translateY(-8px)}}@keyframes thumbsDownAnimation{0%,to{transform:translateY(0)}50%{transform:translateY(3px)}}@media (max-width:767px){.hivegpt-chat-wrapper .chat-main .innerChat{padding:0 24px 10px}.hivegpt-chat-wrapper .chat-footer{padding:10px 24px}.hivegpt-chat-wrapper .chat-footer .cta-footer .cta-chat{max-width:100%}.hivegpt-chat-wrapper .chat-footer .form-control{height:80px}.hivegpt-chat-wrapper .chat-header .closeIcon{height:28px;right:8px;top:8px;width:28px}.hivegpt-chat-wrapper .chat-header .closeIcon span{font-size:14px}.hivegpt-chat-wrapper .chat-header{padding:10px 24px}.hivegpt-chat-wrapper .chat-header h2{font-size:20px}.cta-faqs{padding:10px 0 0}}.body-overflow-hidden{overflow:hidden}.chat-button{align-items:center;background:#17235b;border:#17235b;border-radius:50%;color:#fff;display:inline-flex;font-size:24px;height:50px;justify-content:center;width:50px}textarea{caret-color:#000}.labelChat{font-size:14px;font-weight:400;margin:0 0 10px}.chatType h4{color:#566563;text-align:center}.chatType ul{align-items:center;background:#fff;border-radius:10px;box-shadow:0 .3px .9px rgba(0,0,0,.12),0 1.6px 3.6px rgba(0,0,0,.16);display:flex;justify-content:center;list-style:none;margin:0 0 20px;padding:4px}.chatType ul li{flex:1}.chatType ul li button{align-items:center;background:#fff;border:none;border-radius:10px;font-weight:600;min-height:48px;padding:.375rem;text-align:center;text-shadow:1px 0 rgba(0,0,0,.2);width:100%}.chatType ul li button.active{background:linear-gradient(96deg,#761c79 -10.61%,#761c79 84.59%);box-shadow:0 1px 2px 0 rgba(16,24,40,.05);color:#fff}.cta_suggestions{align-items:center;display:flex;flex-wrap:wrap;gap:.5rem;margin-bottom:20px}.cta_suggestions button{background:#fff;border:1px solid #174ae4;border-radius:10px;box-shadow:0 1.6px 3.6px 0 rgba(0,0,0,.13),0 .3px .9px 0 rgba(0,0,0,.1);color:#1543cd;font-size:14px;font-weight:600;line-height:1.2;padding:8px 12px;position:relative;text-align:left;transition:all .3s}.cta_suggestions button:hover{background:#eff3ff}.balanced .chat-footer .cta-footer .cta-chat,.balanced .chat-main .chat.user .chat-box .message,.balanced .chatType ul li button.active{color:#000}.balanced .chat-main .innerChat .title p span{color:#06f}.balanced mat-drawer{background-image:linear-gradient(180deg,rgba(88,190,251,.05) 60%,rgba(0,102,255,.2) 96.27%)}.balanced .cta_suggestions button:hover{border:1px solid #06f}.precise .chat-footer .cta-footer .cta-chat,.precise .chat-main .chat.user .chat-box .message{background:linear-gradient(96deg,#69ca6d -10.61%,#4caf50 84.59%)}.precise .chatType ul li button.active{background:linear-gradient(96deg,#4caf50 -10.61%,#4caf50 84.59%);color:#fff}.precise .chat-main .innerChat .title p span{color:#4caf50}.precise mat-drawer{background-image:linear-gradient(180deg,rgba(76,175,80,.05) 60%,rgba(76,175,80,.3) 96.27%)}.precise .cta_suggestions button:hover{border:1px solid #4caf50}.title{margin-bottom:20px}.title h2{font-size:22px;margin:0}.title h2 span{align-items:center;color:#000;display:inline-flex;gap:10px}.title h2 i{color:#06f;font-size:30px;line-height:1}.title h2 i svg{height:30px;width:30px}.title p{font-weight:600;margin:0}.title p span{color:#06f}.agenda-items-wrapper{padding-bottom:15px;padding-top:15px}@media (max-width:576px){.list-view .session-detail-wrapper{border:none;flex-direction:column}}.card-background-session{background:#fff;border-radius:8px}.card-background-session .body-text-color{color:#111!important}.card-background-session h2{-webkit-box-orient:vertical;-webkit-line-clamp:1;display:-webkit-box;font-size:20px;margin-bottom:8px;overflow:hidden}.card-background-session .session-description{-webkit-box-orient:vertical;-webkit-line-clamp:2;color:#111!important;display:-webkit-box;font-size:14px;overflow:hidden}.card-background-session .color-secondary{color:#111!important}.card-background-session p{font-size:14px}.list-view .session-detail-wrapper .s27-btn-icon{background:transparent;border:transparent}.list-view .session-detail-wrapper{border-left:3px solid transparent;display:flex;margin-bottom:16px}.thumbnail{align-items:center;display:flex;height:160px;justify-content:center;min-width:160px;position:relative;width:160px}.thumbnail img{-o-object-fit:cover;height:100%;object-fit:cover;width:100%}@media (max-width:576px){.thumbnail{height:160px;min-height:unset;width:100%}}.thumbnail .play-btn{align-items:center;background-color:transparent;border:0;bottom:0;display:flex;font-size:60px;justify-content:center;left:0;position:absolute;right:0;top:0;width:100%}.thumbnail .play-btn span{font-size:80px;text-shadow:0 0 14px rgba(74,74,74,.45)}.content{flex-grow:1}.actions{background-color:transparent!important}.speakers{margin-bottom:0;margin-top:10px;padding:0}.speakers li{align-items:unset;display:flex}.speakers li .content{font-size:12px!important}.speakers .image{border-radius:100%;height:40px;min-width:40px;overflow:hidden;width:40px}.speakers img{-o-object-fit:cover;height:100%;object-fit:cover;width:100%}.grid-2-cols{display:grid;grid-gap:15px;grid-template-columns:calc(55% - 10px) calc(50% - 10px);padding-right:20px}@media (max-width:768px){.grid-2-cols{grid-template-columns:calc(50% - 10px) calc(50% - 10px)}}@media (max-width:575px){.grid-3-cols{grid-template-columns:100%}}.quick-prompts-extended{align-items:flex-start!important;margin-left:0!important}.border-shape .s27-scroll::-webkit-scrollbar{border-radius:30px;width:3px}.border-shape .s27-scroll::-webkit-scrollbar-track{background:#f1f1f1;border-radius:30px}.border-shape .s27-scroll::-webkit-scrollbar-thumb{background:#888;border-radius:30px}.box{display:table;height:275px;margin:10px 0;width:100%}.tiktokwrapper{display:grid;gap:10px;grid-template-columns:repeat(2,1fr);height:100%}.tiktokwrapper .tiktokshell{background:#3d2b8f;border:2px solid #fff;border-radius:5px;box-shadow:0 0 6px #494949;height:100%;min-height:275px;min-width:160px;position:relative;width:100%}.tiktokwrapper .overlymask{background-image:url(https://e1cdn.social27.com/digitalevents/HiveGpt/screen-overlay.png);background-position:0 0;bottom:0;height:100%;left:0;position:absolute;width:100%;z-index:6}.tiktokwrapper .videoPhotobox{bottom:0;height:272px;left:0;overflow:hidden;position:absolute;width:auto;z-index:6}.tiktokwrapper .videoPhotobox video{-o-object-fit:cover;border-radius:0;cursor:pointer;height:270px;object-fit:cover;outline:0;transition:.3s ease-in-out;width:100%}.tiktokwrapper .videoPhotobox img{-o-object-fit:cover;height:100%;object-fit:cover;width:100%}.tiktokwrapper .playBtn{align-items:center;border:none;cursor:pointer;display:flex;height:40px;justify-content:center;left:0;margin:0 auto;position:absolute;right:0;top:105px;transition:all 1s;width:40px;z-index:10}.tiktokwrapper .playBtn:hover{transform:scale(1.2)}.tiktokwrapper .noPhoto{align-items:center;border:none;cursor:pointer;display:flex;height:40px;justify-content:center;left:0;margin:0 auto;position:absolute;right:0;top:105px;transition:all 1s;z-index:6}.tiktokwrapper .noPhoto h3{color:#fff;font-size:46px}.tiktokwrapper .onshell-content{bottom:10px;left:5px;position:absolute;z-index:10}.tiktokwrapper .onshell-content .title-shell{margin:0 10px}.tiktokwrapper .onshell-content h3{color:#fff;font-size:13px;font-weight:500}.tiktokwrapper .onshell-content .companyName{color:#eaeaea;font-size:12px;font-weight:400}.tiktokwrapper .onshell-content .button-shell button{background:#4e4e4e;border:none;border-radius:2px;color:#fff;font-size:11px;margin:0 1px;padding:4px 7px;text-transform:capitalize}.tiktokwrapper .onshell-content .Connectbtn{background:linear-gradient(149deg,#06f,#06f)!important}.skeleton-box{background-color:#dddbdd;display:inline-block;height:1em;overflow:hidden;position:relative}.skeleton-box:after{animation:shimmer 2s infinite;background-image:linear-gradient(90deg,hsla(0,0%,100%,0),hsla(0,0%,100%,.2) 20%,hsla(0,0%,100%,.5) 60%,hsla(0,0%,100%,0));bottom:0;content:\"\";left:0;position:absolute;right:0;top:0;transform:translateX(-100%);z-index:0}@keyframes shimmer{to{transform:translateX(100%)}}.blog-post__headline{font-size:1.25em;font-weight:700}.blog-post__meta{color:#6b6b6b;font-size:.85em}.o-media{display:flex}.o-media__body{flex-grow:1;margin-left:1em}.o-vertical-spacing>*+*{margin-top:.75em}.o-vertical-spacing--l>*+*{margin-top:2em}.copy{background:none;border:none;cursor:pointer;padding:5px;transition:transform .2s ease}.copy.active{transform:scale(1.1)}.copy svg{fill:#566563;height:18px;width:18px}.copyBox{background:#f7f7f7;border-radius:13px;color:#566563;display:flex;float:right;gap:12px;padding:5px 10px;position:relative;width:135px}.copyBox button{background:transparent;border:none;color:#566563;cursor:pointer;padding:0;transition:all .3s}.copyBox button i{display:inline-block}.copyBox button:hover{color:#17235b}.copyBox button.up:hover i{animation:thumbsUpAnimation .5s ease-in-out;animation-fill-mode:forwards}.copyBox button.down:hover i{animation:thumbsDownAnimation .5s ease-in-out;animation-fill-mode:forwards}.din{display:inline-flex}.chatFooterWrapper{align-items:center;background-color:#f5f5f5;border-top:1px solid #ccc;flex-direction:column;justify-content:center}.chat-footer{background:#fff;flex-direction:column;margin-bottom:10px}.chat-footer,.topinfo-containerbox{align-items:center;display:flex;width:100%}.topinfo-containerbox{background:#f9f9f9;border-bottom:1px solid #efefef;justify-content:space-between;margin:0;padding:5px 10px 8px}.agents_note_wrapper{display:flex;justify-content:space-around}.bottombox-wrapper{display:flex;padding:10px;width:100%}.dropdown-wrapper{margin-right:10px;position:relative}.dropdown-header{align-items:center;background:#fff;border:1px solid #ddd;border-radius:48px;color:#414141!important;cursor:pointer;display:flex;font-size:14px;margin-bottom:0;padding:.5rem 1.5rem;white-space:nowrap}.dropdown-header span{margin-right:8px}.dropdown-menu{background-color:#fff;border:1px solid #ededed;border-radius:5px;bottom:100%!important;box-shadow:0 2px 4px rgba(0,0,0,.1);display:block;left:0;margin-bottom:10px;max-height:200px;overflow-y:auto;padding:0;position:absolute;top:auto;width:230px;z-index:1000}.dropdown-menu label{cursor:pointer;display:block;font-size:16px;padding:5px 15px}.dropdown-menu label input{height:16px;width:16px}.dropdown-menu label:hover{background-color:#f0f0f0}.border-shape{flex-grow:1}.form-control-1{border:1px solid #ddd;border-radius:5px;padding:10px;width:100%}.cta-footer,.text-left .note-section{align-items:center;display:flex}.text-left .note-section{background:#fff;border-radius:5px;box-shadow:0 2px 4px rgba(0,0,0,.1);margin-top:10px;max-width:800px;padding:10px;width:100%}.text-left .note{align-items:center;color:#555;display:flex}.text-left .note i{margin-right:8px}.text-left .note .text{font-size:14px}.card-container{display:flex;gap:15px}.custom-card{background:#fffefe;border:1px solid #ddd;border-radius:.25rem;box-shadow:0 4px 8px rgba(0,0,0,.1);margin-bottom:10px;overflow:hidden;width:18rem}.custom-card .card-body{padding:10px}.custom-card .card-title{font-size:1.25rem;font-weight:700}.custom-card .card-text{font-size:1rem;text-align:left}.custom-card .btn-primary{background-color:#007bff;border:none;border-radius:.25rem}.custom-card .card-footer{background-color:#f8f9fa;color:#6c757d;padding:10px;text-align:center}.list-container{list-style:none;padding:0}.list-container li{background:#f5f5f5;border-radius:8px;font-size:13px;margin-bottom:5px;padding:6px 12px}.list-container li:hover{color:#06f;cursor:pointer}.collapsible-container{margin-bottom:5px;overflow:hidden;width:100%}.collapsible-header{cursor:pointer;display:flex;padding:15px}.collapsible-header .header-icon{font-size:20px;margin-right:10px}.collapsible-header .header-title{flex:1;font-size:18px}.collapsible-header .toggle-icon{font-size:18px;margin-left:18px}.collapsible-content{background-color:#f8f9fa;color:#333;padding:15px;width:100%}.collapsible-content.show{display:block}.researchingCard{margin:0 auto}.card-header{background:#eee;border-bottom:0;border-radius:8px 8px 0 0;display:flex!important;padding:8px 15px;width:auto}.icon{font-size:20px;line-height:5px}.rotate{transform:rotate(180deg)}.collapse{display:none}.uptList{background:rgba(245,222,179,.1411764705882353);border-radius:0 0 10px 10px;margin-bottom:20px!important}.list-group-item{color:#000;font-size:13px}.sources-container{align-items:flex-start;display:flex;gap:15px}.source-card{background-color:#f0f3f5;border-radius:10px;box-sizing:border-box;cursor:pointer;display:flex;flex-direction:column;justify-content:space-between;padding:15px;position:relative;transition:box-shadow .3s ease;width:100%}.popup{background-color:#fff;border-radius:5px;box-shadow:0 4px 8px rgba(0,0,0,.2);left:50%;opacity:0;padding:10px;position:absolute;top:100%;transform:translateX(-50%) translateY(-10px);transition:opacity .3s ease,transform .3s ease;visibility:hidden;white-space:normal;width:100%;z-index:10}.popup h5{font-size:14px;font-weight:600;line-height:1.2;margin:5px 0 10px}.popup p{font-size:12px;line-height:1.4;margin:0}.popup h5:hover{color:#007bff;cursor:pointer}.popup .source-url{color:#000;text-decoration:none}.popup .source-url:hover{color:#007bff;cursor:pointer;text-decoration:underline}.source-card:hover .popup{opacity:1;transform:translateX(-50%) translateY(-15px);visibility:visible}.source-card:hover{box-shadow:0 4px 8px rgba(0,0,0,.1);transform:scale(1.05)}.source-title{-webkit-box-orient:vertical;-webkit-line-clamp:2;display:-webkit-box;font-size:14px;font-weight:500;height:55px;line-height:1.5;overflow:hidden;text-align:left;text-overflow:ellipsis}.source-title img{margin-left:10px;width:20px}.source-url{align-items:center;color:#6c757d;display:flex;font-size:12px;text-align:left}.source-url img{border-radius:50%;height:16px;margin-right:5px;width:16px}.sourceDraweContainer .container{background-color:#fff;padding:20px}.sourceDraweContainer .sources-list{list-style:none;padding:0}.sourceDraweContainer .sources-list li{align-items:flex-start;display:flex;margin-bottom:15px}.sourceDraweContainer .sources-list input[type=checkbox]{flex-shrink:0;margin-right:15px;margin-top:8px}.sourceDraweContainer .source-content{background-color:#f5f2f2;border:1px solid #ddd;border-radius:8px;box-shadow:0 2px 4px rgba(0,0,0,.1);cursor:pointer;flex:1;padding:12px}.sourceDraweContainer .source-content:hover{background:#ccc}.sourceDraweContainer .source-title{display:block;font-size:1rem;font-weight:500;height:auto!important;margin-bottom:4px}.sourceDraweContainer .source-description{display:block;font-size:.875rem}.sourceDraweContainer .image-container{align-items:center;display:flex;margin:10px 0}.sourceDraweContainer .image-container img{-o-object-fit:cover;border:1px solid #ddd;border-radius:50%;height:16px;margin-right:5px;object-fit:cover;width:16px}.sourceDraweContainer .image-container span{color:#555;font-size:13px}.closeButtonEditor{border:0;border-radius:100%;height:32px;padding:3px 0 0;position:absolute;right:10px;top:5px;width:32px}.closeButtonSource{background:none!important;border-color:transparent!important;box-shadow:none!important;color:inherit;cursor:pointer;float:right;margin-top:20px;transition:color .2s ease-in-out}.closeButtonSource.closeplaygroundbutton{display:none!important}.graph-img{background:hsla(0,0%,86.7%,.23137254901960785);border-radius:15px;padding:15px;width:70%}.chat-textarea{background-color:#fff;border:none;box-sizing:border-box;font-size:15px;height:30px;line-height:1.5;overflow-y:hidden;padding:10px;resize:none;transition:all 1s;width:100%}.chat-textarea:focus,.chat-textarea:hover{height:60px}.chat-textarea:focus{outline:none}.fixed-btn{background-color:#000;border:none;border-radius:8px 8px 0 0;color:#fff;cursor:pointer;font-size:16px;padding:5px 12px;position:fixed;right:-22px;top:46%;transform:translateY(-50%) rotate(270deg);transform-origin:center;transition:all .5s;z-index:1000000}.fixed-btn:hover{background-color:#5b5b5b}.fixed-btn-close{background-color:#000;border:none;border-radius:8px 8px 0 0;color:#fff;cursor:pointer;font-size:16px;padding:5px 16px;position:fixed;right:549px;top:46%;transform:translateY(-50%) rotate(270deg);transform-origin:center;transition:all .5s;z-index:1000000}.fixed-btn-close:hover{background-color:#5b5b5b}.btn.rotate{transform:rotate(-15deg)}.btn.rotate:hover{transform:rotate(0deg)}.btn.cta-chat{align-items:center;background:#f3f3f3;border:none;border-radius:50%;color:#666;cursor:pointer;display:flex;height:40px;justify-content:center;margin:0 auto;padding:5px;text-align:center;transition:all .5s;width:40px}.btn.cta-chat:hover{background:#d7d7d7;color:#666}.btn.cta-chat svg{vertical-align:middle}.chat-footer-upt{padding:4px}.workflowbox{align-items:center;border:1px solid transparent;border-radius:48px;color:#414141!important;cursor:pointer;display:flex;font-size:14px;margin-bottom:0;padding:.5rem 1.5rem;transition:all .5s;white-space:nowrap}.workflowbox:hover{background:#fff;border:1px solid #ddd}.workflowbox svg{margin:0 10px}.edit-boxDrawer{border-left:1px solid #ddd;box-shadow:1px 1px 15px hsla(0,0%,86.7%,.7686274509803922)!important}.edit-boxDrawer mat-drawer-content,ng-deep .edit-boxDrawer mat-drawer-content{margin-left:0!important;margin-right:0!important}.SearchTitle{font-size:16px!important;text-transform:capitalize}.exicution{margin:26px 0!important}.new-conversationbutton{align-items:center;background:#f5f5f5;border:1px solid #e3e3e3;border-radius:10px;cursor:pointer;display:flex;font-size:14px;justify-content:space-around;padding:6px;position:absolute;right:88px;top:10px;transition:all .5s;width:120px;z-index:1000}.new-conversationbutton:hover{background:#eee}.NoteTxt{margin:0 auto}.NoteTxt .text{margin:0 5px}.form-container{width:100%}.progress-container{align-items:center;display:flex}.circular-loader{border:4px solid rgba(0,0,0,.1);border-radius:50%;box-sizing:border-box;height:50px;position:relative;width:50px}.loader-spinner{animation:rotate-loader 1s linear infinite;border:2px solid #2196f3;border-radius:50%;border-top-color:transparent;box-sizing:border-box;height:100%;left:0;position:absolute;top:0;width:100%}.loader-text{color:#333;font-size:12px;font-weight:700;left:50%;position:absolute;top:50%;transform:translate(-50%,-50%)}.loader-label{color:#333;font-size:16px;margin-left:20px}.checkmark{align-items:center;display:flex;height:100%;justify-content:center;width:100%}.checkmark-circle{animation:stroke .6s ease-in-out forwards;stroke:#4caf50;stroke-dasharray:166;stroke-dashoffset:166;stroke-width:4}.checkmark-check{animation:stroke-check .4s ease-in-out .4s forwards;stroke:#4caf50;stroke-dasharray:48;stroke-dashoffset:48;stroke-linecap:round;stroke-linejoin:round;stroke-width:4}@keyframes stroke{to{stroke-dashoffset:0}}@keyframes stroke-check{to{stroke-dashoffset:0}}@keyframes rotate-loader{0%{transform:rotate(0deg)}to{transform:rotate(1turn)}}@keyframes checkmark-animation{0%{opacity:0;transform:scale(0)}to{opacity:1;transform:scale(1)}}.circular-loader.completed .loader-spinner{animation:none;transform:rotate(1turn)}.icon-button{background-color:transparent;border:none;color:#333;cursor:pointer;font-size:24px}.icon-button:focus{outline:none}.icon-button:hover{color:#007bff}.modal{background-color:rgba(0,0,0,.4);display:block;height:100%;left:0;padding-top:0;position:fixed;top:0;width:100%;z-index:1000001}.modal-content{background-color:#fff;border-radius:8px;box-shadow:0 4px 8px rgba(0,0,0,.1);height:600px;margin:5% auto;padding:20px;position:relative;width:82%}.close{color:#aaa;float:right;font-size:28px;font-weight:700}.close:focus,.close:hover{color:#000;cursor:pointer;text-decoration:none}.SearchTitle.user{text-transform:none!important}.SearchTitle.user,.SearchTitle.user h2,.SearchTitle.user p{font-size:30px!important}.title_chat{display:flex;margin:0;padding:0}.title_chat h2{align-items:center;display:flex;font-size:20px;gap:10px;margin:10px 0}.small-title{font-size:12px;margin:2px 0}.titleSection{margin:0}.titleSection h2{color:#000;font-size:20px;margin:0}.inputs-section{background-color:#f7f7f7;border-radius:5px;margin:0 0 10px;padding:10px 15px 0}.inputs-section h3{font-size:16px}.actions-section{background-color:#f9f9f9;border-radius:5px;height:500px;margin-bottom:20px;overflow-y:auto;padding:15px}.timeline{margin-bottom:20px;padding-left:40px;position:relative}.timeline:before{border-right:2px dashed #cecece;content:\"\";height:100%;left:19px;position:absolute}.timeline-item{margin-bottom:20px;position:relative}.timeline-item:before{background-color:#007bff;border-radius:50%;content:\"\";height:20px;left:-30px;position:absolute;top:0;width:20px;z-index:1}.timeline-item h4{color:#000;font-size:16px;font-weight:700;margin:0}.timeline-item pre{background-color:#fff;border:1px solid #ddd;border-radius:5px;padding:10px;white-space:pre-wrap}.timestamp-section{color:#666;font-style:italic;justify-content:space-between}.mic-btn{background-color:#ff4d4d;border:none;border-radius:50%;color:#fff;cursor:pointer;font-size:1.5em;padding:10px}.mic-btn:active{background-color:#f66}.actions-section h3{font-size:16px}.close-wrapper{display:flex;justify-content:right;position:absolute;right:22px;top:0;width:100%}.close_pop{color:#aaa;cursor:pointer;font-size:30px;font-weight:400;justify-content:center}.close_pop,.user-Box{align-items:center;display:flex}.bards{position:absolute;right:0;top:20px}::ng-deep .code-container{margin:20px 0;position:relative}::ng-deep .copy-button{background-color:#007bff;border:none;border-radius:4px;color:#fff;cursor:pointer;padding:5px 10px;position:absolute;right:10px;top:10px}::ng-deep .copy-button:hover{background-color:#0056b3}::ng-deep .code_block.diff{background-color:#f8f8f8;border-left:4px solid #ccc;overflow:auto;padding:10px}"]
|
|
1767
|
-
|
|
1768
|
-
|
|
1769
|
-
|
|
1770
|
-
|
|
1771
|
-
|
|
1772
|
-
|
|
1773
|
-
|
|
1774
|
-
{ type:
|
|
1775
|
-
|
|
1776
|
-
{ type: Renderer2 },
|
|
1777
|
-
|
|
1778
|
-
{ type: ConversationService }
|
|
1779
|
-
]
|
|
1780
|
-
|
|
1781
|
-
|
|
1782
|
-
|
|
1783
|
-
|
|
1784
|
-
|
|
1785
|
-
|
|
1786
|
-
|
|
1787
|
-
|
|
1788
|
-
|
|
1789
|
-
|
|
1790
|
-
|
|
1791
|
-
|
|
1792
|
-
|
|
1793
|
-
|
|
1794
|
-
|
|
1795
|
-
|
|
1796
|
-
|
|
1797
|
-
|
|
1798
|
-
|
|
1799
|
-
|
|
1800
|
-
|
|
1801
|
-
|
|
1802
|
-
|
|
1803
|
-
|
|
1804
|
-
|
|
1805
|
-
|
|
1806
|
-
|
|
1807
|
-
|
|
1808
|
-
|
|
1809
|
-
|
|
1810
|
-
|
|
1811
|
-
|
|
1812
|
-
|
|
1813
|
-
|
|
1814
|
-
|
|
1815
|
-
|
|
1816
|
-
|
|
1817
|
-
|
|
1818
|
-
|
|
1819
|
-
|
|
1820
|
-
|
|
1821
|
-
|
|
1822
|
-
|
|
1823
|
-
|
|
1824
|
-
|
|
1825
|
-
|
|
1826
|
-
|
|
1827
|
-
|
|
1828
|
-
|
|
1829
|
-
|
|
1830
|
-
|
|
1831
|
-
|
|
1832
|
-
|
|
1833
|
-
|
|
1834
|
-
|
|
1835
|
-
|
|
239
|
+
// import { Platform } from '@angular/cdk/platform';
|
|
240
|
+
class ChatDrawerComponent {
|
|
241
|
+
constructor(fb, botService, cdr, http, sanitizer, elementRef, renderer, socketService, conversationService // private platform: Platform
|
|
242
|
+
) {
|
|
243
|
+
this.fb = fb;
|
|
244
|
+
this.botService = botService;
|
|
245
|
+
this.cdr = cdr;
|
|
246
|
+
this.http = http;
|
|
247
|
+
this.sanitizer = sanitizer;
|
|
248
|
+
this.elementRef = elementRef;
|
|
249
|
+
this.renderer = renderer;
|
|
250
|
+
this.socketService = socketService;
|
|
251
|
+
this.conversationService = conversationService;
|
|
252
|
+
this.bodyOverflowClass = 'body-overflow-hidden';
|
|
253
|
+
this.isCollapsedTrue = false;
|
|
254
|
+
this.copilotName = 'HiveXGPT';
|
|
255
|
+
this.feedbackEvent = new EventEmitter();
|
|
256
|
+
this.onCloseEvent = new EventEmitter();
|
|
257
|
+
this.openPage = new EventEmitter();
|
|
258
|
+
this.sessionActions = new EventEmitter();
|
|
259
|
+
this.closeBot = new EventEmitter();
|
|
260
|
+
this.connectWithUser = new EventEmitter();
|
|
261
|
+
this.scheduleMeeting = new EventEmitter();
|
|
262
|
+
this.refreshToken = new EventEmitter();
|
|
263
|
+
this.autogenKey = 'Autogen_eDJTtEU-NB0RtIpzq1w';
|
|
264
|
+
this.addToMyAgendaAction = 'add_to_my_agenda';
|
|
265
|
+
this.myUpcomingSessionAction = 'my_upcomming_session';
|
|
266
|
+
this.connectOrFollowAction = 'connect_or_follow';
|
|
267
|
+
this.aiResponse = '';
|
|
268
|
+
this.chatLog = [];
|
|
269
|
+
this.decoder = new TextDecoder();
|
|
270
|
+
this.feedbackDone = false;
|
|
271
|
+
this.greetingMsg = '';
|
|
272
|
+
this.hasBackdropValue = false;
|
|
273
|
+
this.input = '';
|
|
274
|
+
this.listenerAdded = false;
|
|
275
|
+
this.loading = false;
|
|
276
|
+
this.mode = 'over';
|
|
277
|
+
this.quickPrompts = [];
|
|
278
|
+
this.thumbsDownMsgIndex = 0;
|
|
279
|
+
this.userName = '';
|
|
280
|
+
this.showStartAgain = false;
|
|
281
|
+
this.isIOSDevice = false;
|
|
282
|
+
this.showFeedBackIconsIndex = null;
|
|
283
|
+
this.temperature = 1;
|
|
284
|
+
this.speakers = [];
|
|
285
|
+
this.currentWorkflowActionProgress = 0;
|
|
286
|
+
this.currentWorkflowAction = '';
|
|
287
|
+
this.recognizedText = '';
|
|
288
|
+
this.authorizationToken = '';
|
|
289
|
+
this.region = 'westeurope'; // Set your Azure region here
|
|
290
|
+
this.isChatingWithAi = false;
|
|
291
|
+
this.readAllChunks = (stream) => {
|
|
292
|
+
const reader = stream.getReader();
|
|
293
|
+
const allSuggestions = [];
|
|
294
|
+
reader.closed.catch((err) => {
|
|
295
|
+
if (err) {
|
|
296
|
+
console.error('Error reading stream: ', err);
|
|
297
|
+
}
|
|
298
|
+
this.isChatingWithAi = false;
|
|
299
|
+
this.scrollToBottom();
|
|
300
|
+
return;
|
|
301
|
+
});
|
|
302
|
+
return new ReadableStream({
|
|
303
|
+
start: (controller) => {
|
|
304
|
+
return this.pump(controller, reader, allSuggestions);
|
|
305
|
+
},
|
|
306
|
+
});
|
|
307
|
+
};
|
|
308
|
+
this.currentMessageForEditor = '';
|
|
309
|
+
this.currentIndexForEditor = -1;
|
|
310
|
+
this.isDropdownOpen = false;
|
|
311
|
+
this.selectedAgents = [];
|
|
312
|
+
this.allSelected = false;
|
|
313
|
+
this.isDocInEditMode = false;
|
|
314
|
+
this.isContentLoaded = false;
|
|
315
|
+
this.isCollapsed = false;
|
|
316
|
+
this.isCollapsedForGraph = false;
|
|
317
|
+
this.isCollapsedForFGraph = false;
|
|
318
|
+
// [
|
|
319
|
+
// {
|
|
320
|
+
// "title": "AI News January 2024: In-Depth and Concise - The AI Track",
|
|
321
|
+
// "desc": "Each month, we compile significant news, trends, and happenings in AI, providing detailed summaries with key points in bullet form for concise yet complete understanding.",
|
|
322
|
+
// "link": "https://theaitrack.com/ai-news-january-2024/"
|
|
323
|
+
// },
|
|
324
|
+
// {
|
|
325
|
+
// "title": "Top AI News, January 2024 - Everypixel Journal",
|
|
326
|
+
// "desc": "In this monthly roundup, we spotlight the top AI news stories from January, including the OpenAI vs. The New York Times Lawsuit.",
|
|
327
|
+
// "link": "https://journal.everypixel.com/top-ai-news-january-2024"
|
|
328
|
+
// },
|
|
329
|
+
// {
|
|
330
|
+
// "title": "AI News July 2024: In-Depth and Concise - The AI Track",
|
|
331
|
+
// "desc": "This page features AI News for July 2024, highlighting significant events such as Canva acquiring Leonardo AI.",
|
|
332
|
+
// "link": "https://theaitrack.com/ai-news-july-2024-in-depth-and-concise/"
|
|
333
|
+
// },
|
|
334
|
+
// {
|
|
335
|
+
// "title": "January news roundup: What's new in the world of AI? - Pluralsight",
|
|
336
|
+
// "desc": "OpenAI’s new GPT store, business-ready ChatGPT plans, and a predicted rise in AI-powered cybercrime.",
|
|
337
|
+
// "link": "https://www.pluralsight.com/resources/blog/data/ai-this-month-january-2024"
|
|
338
|
+
// },
|
|
339
|
+
// {
|
|
340
|
+
// "title": "AI News August 2024: In-Depth and Concise - The AI Track",
|
|
341
|
+
// "desc": "This page features AI News for August 2024, with highlights such as Nvidia delaying the “Blackwell” B200 AI chips delivery.",
|
|
342
|
+
// "link": "https://theaitrack.com/ai-news-august-2024-in-depth-and-concise-duplicate/"
|
|
343
|
+
// }
|
|
344
|
+
// ]
|
|
345
|
+
this.dateTime = { now: new Date().toISOString() };
|
|
346
|
+
this.currentSourcesList = [];
|
|
347
|
+
this.isShowEditorButton = true;
|
|
348
|
+
this.isDrawerOpen = true;
|
|
349
|
+
this.chatMain = new ElementRef(null);
|
|
350
|
+
// if (this.platform.IOS) {
|
|
351
|
+
// this.isIOSDevice = true;
|
|
352
|
+
// }
|
|
353
|
+
}
|
|
354
|
+
ngOnChanges(changes) {
|
|
355
|
+
if (changes.s27Token) {
|
|
356
|
+
if (changes.s27Token.currentValue != changes.s27Token.previousValue) {
|
|
357
|
+
this.s27Token = changes.s27Token.currentValue;
|
|
358
|
+
console.log('isFetchDataFor: ', this.isFetchDataFor);
|
|
359
|
+
console.log('msg: ', this.msg);
|
|
360
|
+
console.log('chat: ', this.chat);
|
|
361
|
+
if (this.is401) {
|
|
362
|
+
if (this.isFetchDataFor) {
|
|
363
|
+
this.fetchDataFor(this.msg, this.chat);
|
|
364
|
+
}
|
|
365
|
+
else {
|
|
366
|
+
this.fetchData(this.msg);
|
|
367
|
+
}
|
|
368
|
+
}
|
|
369
|
+
}
|
|
370
|
+
}
|
|
371
|
+
if (changes.orgId) {
|
|
372
|
+
if (changes.orgId.currentValue != changes.orgId.previousValue &&
|
|
373
|
+
changes.orgId.currentValue) {
|
|
374
|
+
this.initializeSocket();
|
|
375
|
+
}
|
|
376
|
+
}
|
|
377
|
+
}
|
|
378
|
+
ngOnInit() {
|
|
379
|
+
this.environment = this.isDev ? dev_environment : prod_environment;
|
|
380
|
+
// this.fetchMyConnections().subscribe();
|
|
381
|
+
// this.fetchPendingRequests().subscribe();
|
|
382
|
+
this.changeTemperature(this.temperature);
|
|
383
|
+
this.fetchBotConfig().subscribe((res) => {
|
|
384
|
+
this.cdr.markForCheck();
|
|
385
|
+
this.fetchChatHistory().subscribe((response) => {
|
|
386
|
+
this.loading = false;
|
|
387
|
+
this.mapChatHistory(response);
|
|
388
|
+
this.cdr.markForCheck();
|
|
389
|
+
}, (err) => {
|
|
390
|
+
console.error('Error fetching chat history:', err);
|
|
391
|
+
});
|
|
392
|
+
}, (err) => {
|
|
393
|
+
console.error('Error fetching chat history:', err);
|
|
394
|
+
});
|
|
395
|
+
// this.fetchAgents();
|
|
396
|
+
// this.fetchEditorContent();
|
|
397
|
+
this.cdr.markForCheck();
|
|
398
|
+
// this.initializeSocket();
|
|
399
|
+
if (!this.checkForCop29BotId()) {
|
|
400
|
+
this.botService.fetchSpeechAuthorizationToken().subscribe((token) => {
|
|
401
|
+
this.authorizationToken = token;
|
|
402
|
+
this.initializeSpeechRecognizer(token);
|
|
403
|
+
});
|
|
404
|
+
}
|
|
405
|
+
}
|
|
406
|
+
initializeSocket() {
|
|
407
|
+
try {
|
|
408
|
+
this.socketService.disconnectSocketConnection();
|
|
409
|
+
}
|
|
410
|
+
catch (error) { }
|
|
411
|
+
setTimeout(() => {
|
|
412
|
+
this.socketService.connectSocketConnection();
|
|
413
|
+
setTimeout(() => {
|
|
414
|
+
console.log('YES INIT');
|
|
415
|
+
const conversation_id = this.conversationService.getKey(this.botId);
|
|
416
|
+
this.socketService.registerUserSpecificHiveSocket(this.botId, conversation_id, this.orgId);
|
|
417
|
+
setTimeout(() => {
|
|
418
|
+
this.listenSockets();
|
|
419
|
+
}, 300);
|
|
420
|
+
}, 200);
|
|
421
|
+
}, 300);
|
|
422
|
+
}
|
|
423
|
+
listenSockets() {
|
|
424
|
+
if (this.eventSubscription) {
|
|
425
|
+
this.eventSubscription.unsubscribe();
|
|
426
|
+
}
|
|
427
|
+
console.log('Listen Socket');
|
|
428
|
+
this.eventSubscription = this.conversationService
|
|
429
|
+
.getUserSpecificNotification()
|
|
430
|
+
.subscribe((res) => {
|
|
431
|
+
var _a, _b, _c, _d, _e, _f;
|
|
432
|
+
console.log('Listen Socket response');
|
|
433
|
+
console.log(res);
|
|
434
|
+
// Check if OtherFields exists in the response
|
|
435
|
+
if ((_b = (_a = res === null || res === void 0 ? void 0 : res.m) === null || _a === void 0 ? void 0 : _a.OtherFields) === null || _b === void 0 ? void 0 : _b.workflow_id) {
|
|
436
|
+
const { percentage, output, action_name, current_action_name, workflow_execution_id, time_stamp, } = (_c = res === null || res === void 0 ? void 0 : res.m) === null || _c === void 0 ? void 0 : _c.OtherFields;
|
|
437
|
+
this.currentWorkflowActionProgress = percentage;
|
|
438
|
+
this.currentWorkflowAction = action_name;
|
|
439
|
+
const actionIndex = this.workflowExecutionDetails.Actions.findIndex((a) => a.Name == current_action_name);
|
|
440
|
+
if (actionIndex !== -1) {
|
|
441
|
+
this.workflowExecutionDetails.Actions[actionIndex]['Output'] = output;
|
|
442
|
+
this.workflowExecutionDetails.Actions[actionIndex]['InsertTimeStamp'] = formatTimeStamps(this.timezone, time_stamp);
|
|
443
|
+
}
|
|
444
|
+
else {
|
|
445
|
+
console.error(`Action with name ${action_name} not found`);
|
|
446
|
+
}
|
|
447
|
+
this.currentWorkflowExecutionDetails = this.workflowExecutionDetails;
|
|
448
|
+
if (this.currentWorkflowActionProgress == 100) {
|
|
449
|
+
this.chatLog[this.chatLog.length - 1]['WorkflowExecutionId'] = workflow_execution_id;
|
|
450
|
+
this.isChatingWithAi = false;
|
|
451
|
+
this.executingWorkflow = false;
|
|
452
|
+
}
|
|
453
|
+
this.cdr.detectChanges();
|
|
454
|
+
}
|
|
455
|
+
else if ((_d = res === null || res === void 0 ? void 0 : res.m) === null || _d === void 0 ? void 0 : _d.OtherFields) {
|
|
456
|
+
const { conversation_id, bot_id, message_id, answer, web_results, search_results, graphs, execution_graphs, suggestions, } = (_e = res === null || res === void 0 ? void 0 : res.m) === null || _e === void 0 ? void 0 : _e.OtherFields;
|
|
457
|
+
console.log('message_id1');
|
|
458
|
+
console.log((_f = res === null || res === void 0 ? void 0 : res.m) === null || _f === void 0 ? void 0 : _f.OtherFields);
|
|
459
|
+
var currentChatMessage = this.chatLog.find((p) => p._id == message_id);
|
|
460
|
+
console.log(this.chatLog);
|
|
461
|
+
if (!currentChatMessage) {
|
|
462
|
+
console.log('message_id2');
|
|
463
|
+
console.log(message_id);
|
|
464
|
+
currentChatMessage = {
|
|
465
|
+
_id: message_id,
|
|
466
|
+
type: 'ai',
|
|
467
|
+
time: formatNow(this.timezone),
|
|
468
|
+
};
|
|
469
|
+
this.chatLog.push(currentChatMessage);
|
|
470
|
+
this.showFeedBackIconsIndex = this.chatLog.length - 1;
|
|
471
|
+
console.log('message_id3');
|
|
472
|
+
console.log(message_id);
|
|
473
|
+
this.cdr.detectChanges();
|
|
474
|
+
}
|
|
475
|
+
// Handle the fields based on their presence
|
|
476
|
+
if (search_results && Array.isArray(search_results)) {
|
|
477
|
+
console.log('Online Search Terms:', search_results);
|
|
478
|
+
currentChatMessage.searchTerms = search_results;
|
|
479
|
+
this.cdr.detectChanges();
|
|
480
|
+
}
|
|
481
|
+
if (web_results && Array.isArray(web_results)) {
|
|
482
|
+
console.log('Web Results:', web_results);
|
|
483
|
+
currentChatMessage.sourcesList = web_results;
|
|
484
|
+
currentChatMessage.displayedSources = web_results === null || web_results === void 0 ? void 0 : web_results.slice(0, 3); // First 3 cards
|
|
485
|
+
currentChatMessage.remainingSources = web_results === null || web_results === void 0 ? void 0 : web_results.slice(3); // Remaining items
|
|
486
|
+
this.cdr.detectChanges();
|
|
487
|
+
}
|
|
488
|
+
if (answer) {
|
|
489
|
+
this.isChatingWithAi = false;
|
|
490
|
+
console.log('Answer:', answer);
|
|
491
|
+
currentChatMessage.message = this.processMessageForDisplay(answer);
|
|
492
|
+
this.cdr.detectChanges();
|
|
493
|
+
this.scrollToBottom();
|
|
494
|
+
}
|
|
495
|
+
if (graphs && Array.isArray(graphs)) {
|
|
496
|
+
console.log('Graphs:', graphs);
|
|
497
|
+
currentChatMessage.graphs = graphs;
|
|
498
|
+
this.cdr.detectChanges();
|
|
499
|
+
}
|
|
500
|
+
if (execution_graphs && Array.isArray(execution_graphs)) {
|
|
501
|
+
console.log('Execution Graphs:', execution_graphs);
|
|
502
|
+
currentChatMessage.executionGraphs = execution_graphs;
|
|
503
|
+
this.cdr.detectChanges();
|
|
504
|
+
}
|
|
505
|
+
if (suggestions && Array.isArray(suggestions)) {
|
|
506
|
+
console.log('suggestions:', suggestions);
|
|
507
|
+
currentChatMessage.relatedListItems = suggestions;
|
|
508
|
+
this.cdr.detectChanges();
|
|
509
|
+
// Process online search terms as needed
|
|
510
|
+
}
|
|
511
|
+
// Add any other fields and their processing here
|
|
512
|
+
}
|
|
513
|
+
else {
|
|
514
|
+
console.warn('OtherFields is missing in the response');
|
|
515
|
+
}
|
|
516
|
+
}, (err) => {
|
|
517
|
+
this.eventSubscription.unsubscribe();
|
|
518
|
+
console.error('Error in fetching data from socket', err);
|
|
519
|
+
});
|
|
520
|
+
}
|
|
521
|
+
initializeSocketAndListen() { }
|
|
522
|
+
handleEvent(data, type) {
|
|
523
|
+
switch (type) {
|
|
524
|
+
case 'webresult':
|
|
525
|
+
break;
|
|
526
|
+
case 'answer':
|
|
527
|
+
break;
|
|
528
|
+
case 'graph':
|
|
529
|
+
break;
|
|
530
|
+
default:
|
|
531
|
+
break;
|
|
532
|
+
}
|
|
533
|
+
}
|
|
534
|
+
ngOnDestroy() {
|
|
535
|
+
if (this.eventSubscription) {
|
|
536
|
+
this.eventSubscription.unsubscribe();
|
|
537
|
+
}
|
|
538
|
+
this.socketService.disconnectSocketConnection();
|
|
539
|
+
//this.socketService.close();
|
|
540
|
+
}
|
|
541
|
+
changeTemperature(newTemperature) {
|
|
542
|
+
if (this.loading)
|
|
543
|
+
return;
|
|
544
|
+
this.temperature = newTemperature;
|
|
545
|
+
const wrapper = document.querySelector('.hivegpt-chat-wrapper');
|
|
546
|
+
// Remove existing theme classes from body
|
|
547
|
+
wrapper === null || wrapper === void 0 ? void 0 : wrapper.classList.remove('creative', 'balanced', 'precise');
|
|
548
|
+
switch (newTemperature) {
|
|
549
|
+
case 0:
|
|
550
|
+
wrapper === null || wrapper === void 0 ? void 0 : wrapper.classList.add('creative');
|
|
551
|
+
break;
|
|
552
|
+
case 1:
|
|
553
|
+
wrapper === null || wrapper === void 0 ? void 0 : wrapper.classList.add('balanced');
|
|
554
|
+
break;
|
|
555
|
+
case 2:
|
|
556
|
+
wrapper === null || wrapper === void 0 ? void 0 : wrapper.classList.add('precise');
|
|
557
|
+
break;
|
|
558
|
+
default:
|
|
559
|
+
break;
|
|
560
|
+
}
|
|
561
|
+
}
|
|
562
|
+
onStartAgain() {
|
|
563
|
+
if (this.loading)
|
|
564
|
+
return;
|
|
565
|
+
this.showStartAgain = false;
|
|
566
|
+
this.chatLog = [];
|
|
567
|
+
this.chatLog.push({
|
|
568
|
+
type: 'ai',
|
|
569
|
+
message: this.greetingMsg,
|
|
570
|
+
time: formatNow(this.timezone),
|
|
571
|
+
});
|
|
572
|
+
this.archieveMessages().subscribe();
|
|
573
|
+
}
|
|
574
|
+
archieveMessages() {
|
|
575
|
+
const headers = new HttpHeaders({
|
|
576
|
+
'Content-Type': 'application/json',
|
|
577
|
+
'x-api-key': this.apiKey,
|
|
578
|
+
'hive-bot-id': this.botId
|
|
579
|
+
});
|
|
580
|
+
const url = `${this.environment.BASE_URL}/bot/clear-history/${this.botId}/${this.userId}`;
|
|
581
|
+
return this.http.post(url, {}, { headers }).pipe(switchMap((res) => {
|
|
582
|
+
return of(res);
|
|
583
|
+
}), catchError((error) => {
|
|
584
|
+
return of(null);
|
|
585
|
+
}));
|
|
586
|
+
}
|
|
587
|
+
fetchBotConfig() {
|
|
588
|
+
this.loading = true;
|
|
589
|
+
const headers = new HttpHeaders({
|
|
590
|
+
'x-api-key': this.apiKey,
|
|
591
|
+
'hive-bot-id': this.botId
|
|
592
|
+
});
|
|
593
|
+
const url = `${this.environment.BASE_URL}/bots?bot_id=${this.botId}`;
|
|
594
|
+
return this.http.get(url, { headers }).pipe(switchMap((res) => {
|
|
595
|
+
var _a;
|
|
596
|
+
this.botName = res.Name;
|
|
597
|
+
this.botIcon = res.Icon;
|
|
598
|
+
this.botSkills = res === null || res === void 0 ? void 0 : res.Skills;
|
|
599
|
+
this.greetingMsg = res.Greeting;
|
|
600
|
+
this.thumbsDownMessages = ((_a = res === null || res === void 0 ? void 0 : res.NegativeResponses) === null || _a === void 0 ? void 0 : _a.length) ? res.NegativeResponses
|
|
601
|
+
: [
|
|
602
|
+
"We are sorry we've not been able to answer your question.<br/> However, our dedicated support team is happy to help. <span class='feedback-link' style='cursor: pointer; text-decoration: underline; font-weight: 700; color: #17235B;'>Please click here</span> and a human agent will assist you as soon as possible",
|
|
603
|
+
];
|
|
604
|
+
this.quickPrompts = res.QuickPrompts;
|
|
605
|
+
this.cdr.markForCheck();
|
|
606
|
+
this.loading = false;
|
|
607
|
+
return of(res);
|
|
608
|
+
}), catchError((error) => {
|
|
609
|
+
console.error('Error fetching chatbot config: ', error);
|
|
610
|
+
this.loading = false;
|
|
611
|
+
return of(null);
|
|
612
|
+
}));
|
|
613
|
+
}
|
|
614
|
+
fetchChatHistory() {
|
|
615
|
+
this.loading = true;
|
|
616
|
+
this.conversationKey = this.conversationService.getKey(this.botId, false);
|
|
617
|
+
const url = `${this.environment.BASE_URL}/conversations/${this.conversationKey}`;
|
|
618
|
+
const headers = new HttpHeaders({
|
|
619
|
+
accept: 'application/json',
|
|
620
|
+
'x-api-key': this.apiKey,
|
|
621
|
+
'hive-bot-id': this.botId
|
|
622
|
+
});
|
|
623
|
+
return this.http
|
|
624
|
+
.get(url, { headers })
|
|
625
|
+
.pipe(catchError(this.handleError('fetchConversation')));
|
|
626
|
+
}
|
|
627
|
+
handleError(operation = 'operation', result) {
|
|
628
|
+
return (error) => {
|
|
629
|
+
console.error(`${operation} failed: ${error.message}`);
|
|
630
|
+
return of(result);
|
|
631
|
+
};
|
|
632
|
+
}
|
|
633
|
+
// fetchChatHistory() {
|
|
634
|
+
// this.loading = true;
|
|
635
|
+
// const headers = new HttpHeaders({
|
|
636
|
+
// 'Content-Type': 'application/json',
|
|
637
|
+
// 'x-api-key': this.apiKey,
|
|
638
|
+
// });
|
|
639
|
+
// return this.http
|
|
640
|
+
// .get(`${this.environment.BASE_URL}/conversations/${this.conversationKey}`, { headers })
|
|
641
|
+
// .pipe(
|
|
642
|
+
// switchMap((res: any) => {
|
|
643
|
+
// this.loading = false;
|
|
644
|
+
// return of(res);
|
|
645
|
+
// }),
|
|
646
|
+
// catchError((error: any) => {
|
|
647
|
+
// console.error('Error fetching chat history: ', error);
|
|
648
|
+
// this.loading = false;
|
|
649
|
+
// return of(null);
|
|
650
|
+
// })
|
|
651
|
+
// );
|
|
652
|
+
// }
|
|
653
|
+
mapChatHistory(chats) {
|
|
654
|
+
var _a;
|
|
655
|
+
this.chatLog.push({
|
|
656
|
+
type: 'ai',
|
|
657
|
+
message: this.greetingMsg,
|
|
658
|
+
time: formatNow(this.timezone),
|
|
659
|
+
});
|
|
660
|
+
if (chats && ((_a = chats === null || chats === void 0 ? void 0 : chats.Messages) === null || _a === void 0 ? void 0 : _a.length)) {
|
|
661
|
+
chats === null || chats === void 0 ? void 0 : chats.Messages.forEach((chat) => {
|
|
662
|
+
if (chat.Type == 'user') {
|
|
663
|
+
this.chatLog.push({
|
|
664
|
+
type: 'user',
|
|
665
|
+
message: this.processMessageForDisplay(chat.Text),
|
|
666
|
+
time: formatTimeStamps(this.timezone, chat.InsertTimestamp),
|
|
667
|
+
copied: false,
|
|
668
|
+
isCollapsedTrue: false,
|
|
669
|
+
WorkflowExecutionId: chat.WorkflowExecutionId,
|
|
670
|
+
});
|
|
671
|
+
}
|
|
672
|
+
if (chat.Type == 'ai') {
|
|
673
|
+
var sourcesList = chat.WebLinks || [];
|
|
674
|
+
var displayedSources = chat.WebLinks.slice(0, 3); // First 3 cards
|
|
675
|
+
var remainingSources = chat.WebLinks.slice(3); // Remaining items
|
|
676
|
+
this.chatLog.push({
|
|
677
|
+
type: 'ai',
|
|
678
|
+
message: this.processMessageForDisplay(chat.Text),
|
|
679
|
+
executionGraphs: chat.ExecutionGraphs,
|
|
680
|
+
graphs: chat.Graphs,
|
|
681
|
+
searchTerms: chat.SearchTerms,
|
|
682
|
+
sourcesList: sourcesList,
|
|
683
|
+
displayedSources: displayedSources,
|
|
684
|
+
remainingSources: remainingSources,
|
|
685
|
+
time: formatTimeStamps(this.timezone, chat.InsertTimestamp),
|
|
686
|
+
copied: false,
|
|
687
|
+
isCollapsedTrue: false,
|
|
688
|
+
});
|
|
689
|
+
this.showFeedBackIconsIndex = this.chatLog.length - 1;
|
|
690
|
+
}
|
|
691
|
+
});
|
|
692
|
+
this.showStartAgain = true;
|
|
693
|
+
}
|
|
694
|
+
this.scrollToBottom();
|
|
695
|
+
this.cdr.markForCheck();
|
|
696
|
+
}
|
|
697
|
+
processMessage(message) {
|
|
698
|
+
if (!message || !((message === null || message === void 0 ? void 0 : message.length) > 0)) {
|
|
699
|
+
return '';
|
|
700
|
+
}
|
|
701
|
+
// console.log('here is my message')
|
|
702
|
+
// console.log(message);
|
|
703
|
+
message = message.trim();
|
|
704
|
+
const markdownLinkRegex = /\[([^[]+)]\(([^)]+)\)/g;
|
|
705
|
+
const urlRegex = /(?<!href=")\bhttps?:\/\/\S+(?<![.,])/gi;
|
|
706
|
+
if (markdownLinkRegex.test(message)) {
|
|
707
|
+
const html = message.replace(markdownLinkRegex, '<a href="$2" target="_blank">$1</a>');
|
|
708
|
+
//console.log('Sanitized message: ', message);
|
|
709
|
+
return this.sanitizeHtml(html);
|
|
710
|
+
}
|
|
711
|
+
if (urlRegex.test(message)) {
|
|
712
|
+
const html = message.replace(urlRegex, '<a href="$&" target="_blank">$&</a>');
|
|
713
|
+
// console.log('Sanitized message: ', message);
|
|
714
|
+
return this.sanitizeHtml(html);
|
|
715
|
+
}
|
|
716
|
+
message = message.replace(/(?:\r\n|\r|\n)/g, '<br>');
|
|
717
|
+
message = message.replace(/\*\*(.*?)\*\*/g, '<strong>$1</strong>');
|
|
718
|
+
// Convert Markdown headers to HTML headers
|
|
719
|
+
message = message.replace(/^(#{1,6})\s+(.*)$/gm, (match, hashes, text) => {
|
|
720
|
+
const level = hashes.length;
|
|
721
|
+
return `<h${level}>${text}</h${level}>`;
|
|
722
|
+
});
|
|
723
|
+
this.cdr.markForCheck();
|
|
724
|
+
const sanitizedMessage = this.sanitizeHtml(message);
|
|
725
|
+
return sanitizedMessage;
|
|
726
|
+
}
|
|
727
|
+
ngAfterViewChecked() {
|
|
728
|
+
const feedbackLinks = this.elementRef.nativeElement.querySelectorAll('.feedback-link');
|
|
729
|
+
feedbackLinks.forEach((link) => {
|
|
730
|
+
link.addEventListener('click', this.onFeedbackClick.bind(this, 'zendesk'));
|
|
731
|
+
});
|
|
732
|
+
// if (this.elementRef.nativeElement.querySelector('.feedback-link')) {
|
|
733
|
+
// this.elementRef.nativeElement
|
|
734
|
+
// .querySelector('.feedback-link')
|
|
735
|
+
// .addEventListener('click', this.onFeedbackClick.bind(this, 'zendesk'));
|
|
736
|
+
// }
|
|
737
|
+
}
|
|
738
|
+
sanitizeHtml(html) {
|
|
739
|
+
return this.sanitizer.bypassSecurityTrustHtml(html);
|
|
740
|
+
}
|
|
741
|
+
onFeedbackClick(value) {
|
|
742
|
+
this.feedbackEvent.emit(value);
|
|
743
|
+
}
|
|
744
|
+
onClose() {
|
|
745
|
+
this.renderer.removeClass(document.body, this.bodyOverflowClass);
|
|
746
|
+
this.onCloseEvent.emit();
|
|
747
|
+
}
|
|
748
|
+
sendMessageWithTile(prompt) {
|
|
749
|
+
this.input = prompt;
|
|
750
|
+
this.fetchData();
|
|
751
|
+
this.scrollToBottom();
|
|
752
|
+
}
|
|
753
|
+
fetchData(msg = null) {
|
|
754
|
+
var _a;
|
|
755
|
+
this.input = msg || ((_a = this.input) === null || _a === void 0 ? void 0 : _a.trim());
|
|
756
|
+
this.msg = this.input;
|
|
757
|
+
if (!this.input || this.loading) {
|
|
758
|
+
return;
|
|
759
|
+
}
|
|
760
|
+
this.chatLog.push({
|
|
761
|
+
type: 'user',
|
|
762
|
+
message: this.processMessageForDisplay(this.input),
|
|
763
|
+
time: formatNow(this.timezone),
|
|
764
|
+
copied: false,
|
|
765
|
+
isCollapsedTrue: false,
|
|
766
|
+
});
|
|
767
|
+
try {
|
|
768
|
+
const textarea = this.myInput.nativeElement;
|
|
769
|
+
textarea.style.height = 'hidden'; // Reset the height
|
|
770
|
+
textarea.style.height = `62px`;
|
|
771
|
+
}
|
|
772
|
+
catch (error) { }
|
|
773
|
+
this.cdr.markForCheck();
|
|
774
|
+
this.aiResponse = '';
|
|
775
|
+
this.isChatingWithAi = true;
|
|
776
|
+
this.makeAskRequest(this.input, this.agents, this.conversationKey);
|
|
777
|
+
}
|
|
778
|
+
fetchDataFor(msg, chat) {
|
|
779
|
+
const inputMsg = msg === null || msg === void 0 ? void 0 : msg.trim();
|
|
780
|
+
if (!inputMsg || this.loading) {
|
|
781
|
+
return;
|
|
782
|
+
}
|
|
783
|
+
try {
|
|
784
|
+
chat.relatedListItems = [];
|
|
785
|
+
this.cdr.detectChanges();
|
|
786
|
+
}
|
|
787
|
+
catch (error) { }
|
|
788
|
+
this.scrollToBottom();
|
|
789
|
+
this.chatLog.push({
|
|
790
|
+
type: 'user',
|
|
791
|
+
message: this.processMessageForDisplay(inputMsg),
|
|
792
|
+
time: formatNow(this.timezone),
|
|
793
|
+
copied: false,
|
|
794
|
+
isCollapsedTrue: false,
|
|
795
|
+
});
|
|
796
|
+
this.cdr.markForCheck();
|
|
797
|
+
this.aiResponse = '';
|
|
798
|
+
this.isChatingWithAi = true;
|
|
799
|
+
this.makeAskRequest(inputMsg, this.agents, this.conversationKey, msg, chat);
|
|
800
|
+
}
|
|
801
|
+
fetchSmallTalk() {
|
|
802
|
+
this.loading = true;
|
|
803
|
+
this.cdr.markForCheck();
|
|
804
|
+
const url = `${this.environment.BASE_URL}/bot/small-talk/${this.botId}/${this.userId}`;
|
|
805
|
+
this.http
|
|
806
|
+
.get(url, {
|
|
807
|
+
headers: {
|
|
808
|
+
'x-api-key': this.apiKey,
|
|
809
|
+
'hive-bot-id': this.botId
|
|
810
|
+
},
|
|
811
|
+
})
|
|
812
|
+
.pipe(catchError((error) => {
|
|
813
|
+
console.error('Error while fetching small talk:', error);
|
|
814
|
+
return of(null);
|
|
815
|
+
}))
|
|
816
|
+
.subscribe((response) => {
|
|
817
|
+
this.loading = false;
|
|
818
|
+
this.cdr.markForCheck();
|
|
819
|
+
if (!response) {
|
|
820
|
+
return;
|
|
821
|
+
}
|
|
822
|
+
if (response && response.smallTalk) {
|
|
823
|
+
this.chatLog.push({
|
|
824
|
+
type: 'ai',
|
|
825
|
+
message: this.processMessage(response.smallTalk),
|
|
826
|
+
time: formatNow(this.timezone),
|
|
827
|
+
isFeedbackMsg: true,
|
|
828
|
+
});
|
|
829
|
+
this.showFeedBackIconsIndex = this.chatLog.length - 2;
|
|
830
|
+
// this.scrollToBottom();
|
|
831
|
+
this.cdr.markForCheck();
|
|
832
|
+
}
|
|
833
|
+
});
|
|
834
|
+
}
|
|
835
|
+
pump(controller, reader, allSuggestions) {
|
|
836
|
+
reader.read().then(({ done, value }) => {
|
|
837
|
+
var _a, _b, _c, _d;
|
|
838
|
+
const lastItem = this.chatLog[this.chatLog.length - 1];
|
|
839
|
+
if (done) {
|
|
840
|
+
lastItem.message = this.processMessageForDisplay(lastItem.message);
|
|
841
|
+
this.chatLog.pop();
|
|
842
|
+
this.chatLog.push(lastItem);
|
|
843
|
+
if (allSuggestions === null || allSuggestions === void 0 ? void 0 : allSuggestions.length) {
|
|
844
|
+
this.chatLog.push({
|
|
845
|
+
type: 'suggestions',
|
|
846
|
+
suggestions: allSuggestions,
|
|
847
|
+
});
|
|
848
|
+
}
|
|
849
|
+
controller.close();
|
|
850
|
+
this.isChatingWithAi = false;
|
|
851
|
+
// this.scrollToBottom();
|
|
852
|
+
this.cdr.markForCheck();
|
|
853
|
+
this.showStartAgain = true;
|
|
854
|
+
// setTimeout(() => {
|
|
855
|
+
// this.fetchSmallTalk();
|
|
856
|
+
// },1000)
|
|
857
|
+
return;
|
|
858
|
+
}
|
|
859
|
+
let decodedChunk = this.decoder.decode(value, { stream: true });
|
|
860
|
+
this.aiResponse += decodedChunk;
|
|
861
|
+
if (lastItem.type === 'ai') {
|
|
862
|
+
const suggestionsMatch = this.aiResponse.match(/<sug>(.*?)<\/sug>/g);
|
|
863
|
+
if (suggestionsMatch) {
|
|
864
|
+
suggestionsMatch.forEach((match) => {
|
|
865
|
+
this.aiResponse = this.aiResponse.replace(match, '');
|
|
866
|
+
allSuggestions.push(match === null || match === void 0 ? void 0 : match.replace(/<\/?sug>/g, ''));
|
|
867
|
+
});
|
|
868
|
+
}
|
|
869
|
+
lastItem.message = this.aiResponse;
|
|
870
|
+
this.cdr.markForCheck();
|
|
871
|
+
}
|
|
872
|
+
else {
|
|
873
|
+
this.isChatingWithAi = false;
|
|
874
|
+
let aiFormattedData;
|
|
875
|
+
try {
|
|
876
|
+
console.log('parsing json ');
|
|
877
|
+
aiFormattedData = JSON.parse(JSON.parse(this.aiResponse));
|
|
878
|
+
}
|
|
879
|
+
catch (e) {
|
|
880
|
+
try {
|
|
881
|
+
console.log('parsing json 2');
|
|
882
|
+
aiFormattedData = JSON.parse(this.aiResponse);
|
|
883
|
+
}
|
|
884
|
+
catch (e) { }
|
|
885
|
+
}
|
|
886
|
+
console.log('parsing json done');
|
|
887
|
+
if (aiFormattedData && ((_a = aiFormattedData === null || aiFormattedData === void 0 ? void 0 : aiFormattedData.section_id) === null || _a === void 0 ? void 0 : _a.length) > 0) {
|
|
888
|
+
if (aiFormattedData.section_id == 'company_search' ||
|
|
889
|
+
aiFormattedData.section_id == 'user_search' ||
|
|
890
|
+
aiFormattedData.section_id == 'industry_company_search') {
|
|
891
|
+
this.fetchMyConnections().subscribe();
|
|
892
|
+
this.fetchPendingRequests().subscribe();
|
|
893
|
+
}
|
|
894
|
+
if (aiFormattedData.section_id == this.myUpcomingSessionAction) {
|
|
895
|
+
var speakerIds = [];
|
|
896
|
+
(_b = aiFormattedData.content) === null || _b === void 0 ? void 0 : _b.forEach((session) => {
|
|
897
|
+
speakerIds = [...speakerIds, ...session.speakers];
|
|
898
|
+
});
|
|
899
|
+
if ((speakerIds === null || speakerIds === void 0 ? void 0 : speakerIds.length) > 0)
|
|
900
|
+
this.getSpeakersByStaffIds(speakerIds);
|
|
901
|
+
}
|
|
902
|
+
if (aiFormattedData.section_id == this.addToMyAgendaAction &&
|
|
903
|
+
((_c = aiFormattedData.content) === null || _c === void 0 ? void 0 : _c.length) > 0) {
|
|
904
|
+
this.openPage.next({
|
|
905
|
+
sectionId: aiFormattedData.section_id,
|
|
906
|
+
sessionIds: aiFormattedData.content,
|
|
907
|
+
});
|
|
908
|
+
}
|
|
909
|
+
if (aiFormattedData.section_id == this.connectOrFollowAction) {
|
|
910
|
+
let usersLen = (_d = aiFormattedData.content) === null || _d === void 0 ? void 0 : _d.length;
|
|
911
|
+
if (usersLen > 1) {
|
|
912
|
+
this.openPage.next({
|
|
913
|
+
sectionId: 'open_networking_drawer',
|
|
914
|
+
search: aiFormattedData.content,
|
|
915
|
+
});
|
|
916
|
+
}
|
|
917
|
+
else if (usersLen == 1) {
|
|
918
|
+
this.openPage.next({
|
|
919
|
+
sectionId: aiFormattedData.section_id,
|
|
920
|
+
connetUserIds: [aiFormattedData.content[0].userId],
|
|
921
|
+
});
|
|
922
|
+
}
|
|
923
|
+
}
|
|
924
|
+
if (aiFormattedData.is_open_page == 'true') {
|
|
925
|
+
this.openPage.next({
|
|
926
|
+
sectionId: aiFormattedData.section_id,
|
|
927
|
+
search: aiFormattedData.content,
|
|
928
|
+
});
|
|
929
|
+
if (this.isMobileBrowser()) {
|
|
930
|
+
aiFormattedData.message +=
|
|
931
|
+
'\n\n' + '<a id="closeBotNow">Click Here</a> to see results.';
|
|
932
|
+
}
|
|
933
|
+
}
|
|
934
|
+
this.chatLog.push({
|
|
935
|
+
type: 'ai',
|
|
936
|
+
message: aiFormattedData.message,
|
|
937
|
+
action: aiFormattedData,
|
|
938
|
+
time: formatNow(this.timezone),
|
|
939
|
+
});
|
|
940
|
+
if (this.isMobileBrowser()) {
|
|
941
|
+
setTimeout(() => {
|
|
942
|
+
this.addCloseBotClickEvent();
|
|
943
|
+
}, 500);
|
|
944
|
+
}
|
|
945
|
+
this.aiResponse = '';
|
|
946
|
+
}
|
|
947
|
+
else {
|
|
948
|
+
this.chatLog.push({
|
|
949
|
+
type: 'ai',
|
|
950
|
+
message: this.aiResponse,
|
|
951
|
+
time: formatNow(this.timezone),
|
|
952
|
+
});
|
|
953
|
+
}
|
|
954
|
+
this.showFeedBackIconsIndex = this.chatLog.length - 1;
|
|
955
|
+
this.cdr.markForCheck();
|
|
956
|
+
}
|
|
957
|
+
this.scrollToBottom();
|
|
958
|
+
// Enqueue the next data chunk into our target stream
|
|
959
|
+
controller.enqueue(value);
|
|
960
|
+
this.pump(controller, reader, allSuggestions);
|
|
961
|
+
});
|
|
962
|
+
}
|
|
963
|
+
submitFeedback(flag) {
|
|
964
|
+
this.feedbackDone = true;
|
|
965
|
+
this.showFeedBackIconsIndex = null;
|
|
966
|
+
const url = `${this.environment.BASE_URL}/bot/feedback`;
|
|
967
|
+
fetch(url, {
|
|
968
|
+
method: 'POST',
|
|
969
|
+
headers: {
|
|
970
|
+
'Content-Type': 'application/json',
|
|
971
|
+
'x-api-key': this.apiKey,
|
|
972
|
+
'hive-bot-id': this.botId
|
|
973
|
+
},
|
|
974
|
+
body: JSON.stringify({ flag, user_id: this.userId, bot_id: this.botId }),
|
|
975
|
+
}).then(() => {
|
|
976
|
+
if (flag) {
|
|
977
|
+
this.chatLog.push({
|
|
978
|
+
type: 'ai',
|
|
979
|
+
message: this.thumbsUpMessage ||
|
|
980
|
+
`Great. May I assist you with anything else?`,
|
|
981
|
+
time: formatNow(this.timezone),
|
|
982
|
+
isFeedbackMsg: true,
|
|
983
|
+
});
|
|
984
|
+
this.scrollToBottom();
|
|
985
|
+
this.cdr.markForCheck();
|
|
986
|
+
this.feedbackDone = false;
|
|
987
|
+
this.showFeedBackIconsIndex = null;
|
|
988
|
+
return;
|
|
989
|
+
}
|
|
990
|
+
this.chatLog.push({
|
|
991
|
+
type: 'ai',
|
|
992
|
+
message: this.processMessage(this.thumbsDownMessages[this.thumbsDownMsgIndex]),
|
|
993
|
+
time: formatNow(this.timezone),
|
|
994
|
+
isFeedbackMsg: true,
|
|
995
|
+
});
|
|
996
|
+
this.thumbsDownMsgIndex =
|
|
997
|
+
(this.thumbsDownMsgIndex + 1) % this.thumbsDownMessages.length;
|
|
998
|
+
this.scrollToBottom();
|
|
999
|
+
this.cdr.markForCheck();
|
|
1000
|
+
this.feedbackDone = false;
|
|
1001
|
+
this.showFeedBackIconsIndex = null;
|
|
1002
|
+
});
|
|
1003
|
+
}
|
|
1004
|
+
handleKeydown(event) {
|
|
1005
|
+
if (event.key === 'Enter' && !event.shiftKey) {
|
|
1006
|
+
// Prevent default behavior (new line)
|
|
1007
|
+
event.preventDefault();
|
|
1008
|
+
// Call your submit function
|
|
1009
|
+
this.handleSubmit(event);
|
|
1010
|
+
}
|
|
1011
|
+
}
|
|
1012
|
+
handleSubmit(event) {
|
|
1013
|
+
this.fetchData();
|
|
1014
|
+
this.scrollToBottom();
|
|
1015
|
+
}
|
|
1016
|
+
handleUpClick(idx) {
|
|
1017
|
+
if (this.feedbackDone) {
|
|
1018
|
+
return;
|
|
1019
|
+
}
|
|
1020
|
+
this.submitFeedback(true);
|
|
1021
|
+
this.chatLog[idx].liked = !this.chatLog[idx].liked;
|
|
1022
|
+
if (this.chatLog[idx].unliked) {
|
|
1023
|
+
this.chatLog[idx].unliked = !this.chatLog[idx].unliked;
|
|
1024
|
+
}
|
|
1025
|
+
this.cdr.markForCheck();
|
|
1026
|
+
}
|
|
1027
|
+
handleDownClick(idx) {
|
|
1028
|
+
if (this.feedbackDone)
|
|
1029
|
+
return;
|
|
1030
|
+
this.submitFeedback(false);
|
|
1031
|
+
this.chatLog[idx].unliked = !this.chatLog[idx].unliked;
|
|
1032
|
+
if (this.chatLog[idx].liked)
|
|
1033
|
+
this.chatLog[idx].liked = !this.chatLog[idx].liked;
|
|
1034
|
+
}
|
|
1035
|
+
// handleCopyClick(index: any) {
|
|
1036
|
+
// // Copy the message to the clipboard
|
|
1037
|
+
// const contentToCopy = this.chatLog[index].message;
|
|
1038
|
+
// console.log('contentToCopy');
|
|
1039
|
+
// console.log(contentToCopy);
|
|
1040
|
+
// navigator.clipboard.writeText(contentToCopy).then(() => {
|
|
1041
|
+
// // Indicate that the message was copied
|
|
1042
|
+
// this.chatLog[index].copied = true;
|
|
1043
|
+
// this.cdr.detectChanges();
|
|
1044
|
+
// // Reset the copied state after a delay
|
|
1045
|
+
// setTimeout(() => {
|
|
1046
|
+
// this.chatLog[index].copied = false;
|
|
1047
|
+
// this.cdr.detectChanges();
|
|
1048
|
+
// }, 2000); // Reset after 2 seconds
|
|
1049
|
+
// });
|
|
1050
|
+
// }
|
|
1051
|
+
copyText(id, index) {
|
|
1052
|
+
// Get the text element
|
|
1053
|
+
var textElement = document.getElementById(id);
|
|
1054
|
+
// Create a temporary textarea element to copy the text
|
|
1055
|
+
var tempTextArea = document.createElement('textarea');
|
|
1056
|
+
tempTextArea.value = textElement.innerText;
|
|
1057
|
+
// Append the textarea to the body (necessary for the execCommand to work)
|
|
1058
|
+
document.body.appendChild(tempTextArea);
|
|
1059
|
+
// Select the text inside the textarea
|
|
1060
|
+
tempTextArea.select();
|
|
1061
|
+
// Copy the text to the clipboard
|
|
1062
|
+
document.execCommand('copy');
|
|
1063
|
+
// Remove the temporary textarea
|
|
1064
|
+
document.body.removeChild(tempTextArea);
|
|
1065
|
+
// Optionally, you can alert the user or change the button text to indicate the copy was successful
|
|
1066
|
+
// alert('Text copied to clipboard!');
|
|
1067
|
+
this.chatLog[index].copied = true;
|
|
1068
|
+
this.cdr.detectChanges();
|
|
1069
|
+
// Reset the copied state after a delay
|
|
1070
|
+
setTimeout(() => {
|
|
1071
|
+
this.chatLog[index].copied = false;
|
|
1072
|
+
this.cdr.detectChanges();
|
|
1073
|
+
}, 2000); // Reset after 2 seconds
|
|
1074
|
+
}
|
|
1075
|
+
handleCopyClick(index) {
|
|
1076
|
+
// Copy the message to the clipboard
|
|
1077
|
+
const contentToCopy = this.chatLog[index].message;
|
|
1078
|
+
const resutlt = this.copyText('messageText_' + index, index);
|
|
1079
|
+
}
|
|
1080
|
+
sanitizeHTML(html) {
|
|
1081
|
+
const doc = new DOMParser().parseFromString(html, 'text/html');
|
|
1082
|
+
// Create a new document fragment to hold the simplified content
|
|
1083
|
+
const fragment = document.createDocumentFragment();
|
|
1084
|
+
// Append the children of the body of the parsed document to the fragment
|
|
1085
|
+
Array.from(doc.body.childNodes).forEach((node) => {
|
|
1086
|
+
fragment.appendChild(node.cloneNode(true));
|
|
1087
|
+
});
|
|
1088
|
+
// Create a new div element to hold the simplified HTML
|
|
1089
|
+
const simplifiedDiv = document.createElement('div');
|
|
1090
|
+
simplifiedDiv.appendChild(fragment);
|
|
1091
|
+
// Remove complex tags or attributes as needed
|
|
1092
|
+
// Example: remove scripts
|
|
1093
|
+
simplifiedDiv
|
|
1094
|
+
.querySelectorAll('script')
|
|
1095
|
+
.forEach((script) => script.remove());
|
|
1096
|
+
// Return the simplified HTML as a string
|
|
1097
|
+
return simplifiedDiv.innerHTML;
|
|
1098
|
+
}
|
|
1099
|
+
handleEditorClick(index) {
|
|
1100
|
+
if (this.currentIndexForEditor == -1) {
|
|
1101
|
+
this.currentIndexForEditor = index;
|
|
1102
|
+
this.currentMessageForEditor = this.sanitizeHTML(this.chatLog[index].message);
|
|
1103
|
+
this.currentMessageForEditor = this.currentMessageForEditor.replace('SafeValue must use [property]=binding:', '');
|
|
1104
|
+
this.cdr.detectChanges();
|
|
1105
|
+
}
|
|
1106
|
+
else {
|
|
1107
|
+
if (this.currentIndexForEditor == index) {
|
|
1108
|
+
this.currentMessageForEditor += this.sanitizeHTML(this.chatLog[index].message);
|
|
1109
|
+
this.currentMessageForEditor = this.currentMessageForEditor.replace('SafeValue must use [property]=binding:', '');
|
|
1110
|
+
this.cdr.detectChanges();
|
|
1111
|
+
}
|
|
1112
|
+
else {
|
|
1113
|
+
this.currentIndexForEditor = index;
|
|
1114
|
+
this.currentMessageForEditor = this.sanitizeHTML(this.chatLog[index].message);
|
|
1115
|
+
this.currentMessageForEditor = this.currentMessageForEditor.replace('SafeValue must use [property]=binding:', '');
|
|
1116
|
+
this.cdr.detectChanges();
|
|
1117
|
+
}
|
|
1118
|
+
}
|
|
1119
|
+
this.chatLog[index].isEditor = true;
|
|
1120
|
+
this.cdr.detectChanges();
|
|
1121
|
+
// Reset the copied state after a delay
|
|
1122
|
+
setTimeout(() => {
|
|
1123
|
+
this.chatLog[index].isEditor = false;
|
|
1124
|
+
this.cdr.detectChanges();
|
|
1125
|
+
}, 2000); // Reset after 2 seconds
|
|
1126
|
+
this.editorsDrawer.open();
|
|
1127
|
+
const button = document.getElementById('botcloseplaygroundbutton');
|
|
1128
|
+
if (button) {
|
|
1129
|
+
button.style.display = 'none';
|
|
1130
|
+
}
|
|
1131
|
+
this.cdr.detectChanges();
|
|
1132
|
+
}
|
|
1133
|
+
scrollToBottom() {
|
|
1134
|
+
let counter = 0;
|
|
1135
|
+
const interval = setInterval(() => {
|
|
1136
|
+
this.chatMain.nativeElement.scrollTop = this.chatMain.nativeElement.scrollHeight;
|
|
1137
|
+
if (counter++ > 5)
|
|
1138
|
+
clearInterval(interval);
|
|
1139
|
+
}, 5);
|
|
1140
|
+
}
|
|
1141
|
+
handleAction(action) {
|
|
1142
|
+
console.info('incoming action from the chatbot AI');
|
|
1143
|
+
console.info(action);
|
|
1144
|
+
if (action === null || action === void 0 ? void 0 : action.content) {
|
|
1145
|
+
}
|
|
1146
|
+
}
|
|
1147
|
+
ngAfterViewInit() {
|
|
1148
|
+
// Check if the drawer is initially open and apply overflow hidden to body if so
|
|
1149
|
+
if (this.drawer.opened) {
|
|
1150
|
+
this.setBodyOverflow();
|
|
1151
|
+
}
|
|
1152
|
+
// Listen to changes in the drawer being opened or closed
|
|
1153
|
+
this.drawer.openedChange.subscribe((opened) => {
|
|
1154
|
+
if (opened) {
|
|
1155
|
+
this.setBodyOverflow();
|
|
1156
|
+
}
|
|
1157
|
+
else {
|
|
1158
|
+
this.removeBodyOverflow();
|
|
1159
|
+
}
|
|
1160
|
+
});
|
|
1161
|
+
this.drawer.openedChange.subscribe((opened) => {
|
|
1162
|
+
if (opened) {
|
|
1163
|
+
setTimeout(() => {
|
|
1164
|
+
if (this.myTextarea && this.myTextarea.nativeElement) {
|
|
1165
|
+
this.myTextarea.nativeElement.focus(); // Focus on the textarea
|
|
1166
|
+
}
|
|
1167
|
+
});
|
|
1168
|
+
}
|
|
1169
|
+
});
|
|
1170
|
+
}
|
|
1171
|
+
setBodyOverflow() {
|
|
1172
|
+
this.renderer.addClass(document.body, this.bodyOverflowClass);
|
|
1173
|
+
}
|
|
1174
|
+
removeBodyOverflow() {
|
|
1175
|
+
this.renderer.removeClass(document.body, this.bodyOverflowClass);
|
|
1176
|
+
}
|
|
1177
|
+
getSpeakersByStaffIds(ids) {
|
|
1178
|
+
const url = `${this.environment.USERS_API}/events/${this.eventId}/users/get-by-staff-ids`;
|
|
1179
|
+
fetch(url, {
|
|
1180
|
+
method: 'POST',
|
|
1181
|
+
headers: {
|
|
1182
|
+
'Content-Type': 'application/json',
|
|
1183
|
+
Authorization: 'Bearer ' + 'your_token_here',
|
|
1184
|
+
},
|
|
1185
|
+
body: JSON.stringify(ids),
|
|
1186
|
+
})
|
|
1187
|
+
.then((response) => {
|
|
1188
|
+
if (response.ok) {
|
|
1189
|
+
return response.json(); // Parse the JSON body of the response
|
|
1190
|
+
}
|
|
1191
|
+
else {
|
|
1192
|
+
throw new Error('Network response was not ok.');
|
|
1193
|
+
}
|
|
1194
|
+
})
|
|
1195
|
+
.then((data) => {
|
|
1196
|
+
if ((data === null || data === void 0 ? void 0 : data.length) > 0) {
|
|
1197
|
+
data.forEach((speaker) => {
|
|
1198
|
+
this.speakers[speaker.id] = speaker;
|
|
1199
|
+
});
|
|
1200
|
+
this.cdr.markForCheck();
|
|
1201
|
+
}
|
|
1202
|
+
})
|
|
1203
|
+
.catch((err) => {
|
|
1204
|
+
console.error('Error fetching data:', err);
|
|
1205
|
+
this.loading = false;
|
|
1206
|
+
});
|
|
1207
|
+
}
|
|
1208
|
+
performSessionAction(sessionId, action) {
|
|
1209
|
+
this.sessionActions.next({
|
|
1210
|
+
sessionId,
|
|
1211
|
+
action,
|
|
1212
|
+
});
|
|
1213
|
+
}
|
|
1214
|
+
addCloseBotClickEvent() {
|
|
1215
|
+
const element = this.elementRef.nativeElement.querySelector('#closeBotNow');
|
|
1216
|
+
if (element) {
|
|
1217
|
+
this.renderer.listen(element, 'click', () => {
|
|
1218
|
+
this.closeBot.next();
|
|
1219
|
+
});
|
|
1220
|
+
}
|
|
1221
|
+
}
|
|
1222
|
+
isMobileBrowser() {
|
|
1223
|
+
return /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent);
|
|
1224
|
+
}
|
|
1225
|
+
connectToUser(userId) {
|
|
1226
|
+
this.connectWithUser.emit({
|
|
1227
|
+
connect: !this.canDisconnect(userId),
|
|
1228
|
+
userId,
|
|
1229
|
+
});
|
|
1230
|
+
setTimeout(() => {
|
|
1231
|
+
this.fetchMyConnections().subscribe((res) => {
|
|
1232
|
+
this.cdr.markForCheck();
|
|
1233
|
+
});
|
|
1234
|
+
this.fetchPendingRequests().subscribe((res) => {
|
|
1235
|
+
this.cdr.markForCheck();
|
|
1236
|
+
});
|
|
1237
|
+
}, 500);
|
|
1238
|
+
}
|
|
1239
|
+
scheduleMeetingWithUser(user) {
|
|
1240
|
+
this.scheduleMeeting.emit(user);
|
|
1241
|
+
}
|
|
1242
|
+
canConnect(userId) {
|
|
1243
|
+
return !(this.canDisconnect(userId) ||
|
|
1244
|
+
this.pendingRequests.find((a) => a == userId));
|
|
1245
|
+
}
|
|
1246
|
+
canDisconnect(userId) {
|
|
1247
|
+
return this.myConnections.find((conn) => conn.userId == userId);
|
|
1248
|
+
}
|
|
1249
|
+
fetchPendingRequests() {
|
|
1250
|
+
const headers = new HttpHeaders({
|
|
1251
|
+
'Content-Type': 'application/json',
|
|
1252
|
+
apiKey: this.autogenKey,
|
|
1253
|
+
});
|
|
1254
|
+
return this.http
|
|
1255
|
+
.get(`${this.environment.USERS_API}/events/${this.eventId}/connection-requests/autogen/pending-sent-requests?userId=${this.userId}`, { headers })
|
|
1256
|
+
.pipe(switchMap((res) => {
|
|
1257
|
+
this.pendingRequests = res;
|
|
1258
|
+
this.cdr.markForCheck();
|
|
1259
|
+
return of(res);
|
|
1260
|
+
}), catchError((error) => {
|
|
1261
|
+
console.error('Error fetching pending requests: ', error);
|
|
1262
|
+
return of(null);
|
|
1263
|
+
}));
|
|
1264
|
+
}
|
|
1265
|
+
fetchMyConnections() {
|
|
1266
|
+
const headers = new HttpHeaders({
|
|
1267
|
+
'Content-Type': 'application/json',
|
|
1268
|
+
apiKey: this.autogenKey,
|
|
1269
|
+
});
|
|
1270
|
+
return this.http
|
|
1271
|
+
.get(`${this.environment.USERS_API}/events/${this.eventId}/users-connections/autogen?userId=${this.userId}`, { headers })
|
|
1272
|
+
.pipe(switchMap((res) => {
|
|
1273
|
+
this.myConnections = res;
|
|
1274
|
+
this.cdr.markForCheck();
|
|
1275
|
+
return of(res);
|
|
1276
|
+
}), catchError((error) => {
|
|
1277
|
+
console.error('Error fetching pending requests: ', error);
|
|
1278
|
+
return of(null);
|
|
1279
|
+
}));
|
|
1280
|
+
}
|
|
1281
|
+
// Toggle the dropdown visibility
|
|
1282
|
+
toggleDropdown() {
|
|
1283
|
+
if (!this.agents)
|
|
1284
|
+
this.fetchAgents();
|
|
1285
|
+
this.isDropdownOpen = !this.isDropdownOpen;
|
|
1286
|
+
this.cdr.detectChanges();
|
|
1287
|
+
}
|
|
1288
|
+
onSelectAll(event) {
|
|
1289
|
+
var _a;
|
|
1290
|
+
(_a = this.agents) === null || _a === void 0 ? void 0 : _a.forEach((agent) => (agent.selected = false));
|
|
1291
|
+
this.cdr.detectChanges();
|
|
1292
|
+
}
|
|
1293
|
+
onAgentChange(agent) {
|
|
1294
|
+
//agent.selected = !agent.selected;
|
|
1295
|
+
//console.log(agent);
|
|
1296
|
+
let agentFound = this.agents.filter((p) => p.id == agent.id);
|
|
1297
|
+
if (agentFound && agentFound.length > 0) {
|
|
1298
|
+
agentFound[0].selected = !agentFound[0].selected;
|
|
1299
|
+
this.cdr.detectChanges();
|
|
1300
|
+
}
|
|
1301
|
+
this.cdr.detectChanges();
|
|
1302
|
+
}
|
|
1303
|
+
areAllSelected() {
|
|
1304
|
+
var _a;
|
|
1305
|
+
return (_a = this.agents) === null || _a === void 0 ? void 0 : _a.every((agent) => !agent.selected);
|
|
1306
|
+
}
|
|
1307
|
+
getDropdownHeaderText() {
|
|
1308
|
+
var _a;
|
|
1309
|
+
const selectedAgents = (_a = this.agents) === null || _a === void 0 ? void 0 : _a.filter((agent) => agent.selected);
|
|
1310
|
+
if (selectedAgents && (selectedAgents === null || selectedAgents === void 0 ? void 0 : selectedAgents.length) === 0) {
|
|
1311
|
+
return 'All Agents';
|
|
1312
|
+
}
|
|
1313
|
+
else {
|
|
1314
|
+
return (selectedAgents === null || selectedAgents === void 0 ? void 0 : selectedAgents.length) > 1
|
|
1315
|
+
? `${selectedAgents === null || selectedAgents === void 0 ? void 0 : selectedAgents.length} Agents Selected`
|
|
1316
|
+
: `${selectedAgents === null || selectedAgents === void 0 ? void 0 : selectedAgents.length} Agent Selected`;
|
|
1317
|
+
}
|
|
1318
|
+
}
|
|
1319
|
+
fetchAgents_http() {
|
|
1320
|
+
this.loading = true;
|
|
1321
|
+
const url = `${this.environment.AGENTS_API}/CoPilot/${this.botId}/active-agents`;
|
|
1322
|
+
const headers = new HttpHeaders({
|
|
1323
|
+
'Content-Type': 'application/json',
|
|
1324
|
+
});
|
|
1325
|
+
return this.http.post(url, {}, { headers }).pipe(switchMap((res) => {
|
|
1326
|
+
if (res) {
|
|
1327
|
+
this.agents = res.map((agent) => (Object.assign(Object.assign({}, agent), { selected: false })));
|
|
1328
|
+
}
|
|
1329
|
+
this.cdr.markForCheck();
|
|
1330
|
+
return of(res);
|
|
1331
|
+
}), catchError((error) => {
|
|
1332
|
+
console.error('Error fetching chatbot config: ', error);
|
|
1333
|
+
return of(null);
|
|
1334
|
+
}));
|
|
1335
|
+
}
|
|
1336
|
+
fetchContent_http() {
|
|
1337
|
+
this.isDocInEditMode = false;
|
|
1338
|
+
this.isContentLoaded = false;
|
|
1339
|
+
console.log('API call function');
|
|
1340
|
+
this.loading = true;
|
|
1341
|
+
const conversation_id = this.conversationService.getKey(this.botId);
|
|
1342
|
+
this.conversationId = conversation_id;
|
|
1343
|
+
const url = `${this.environment.AGENTS_API}/ConversationDocuments?conversationId=${conversation_id}&botId=${this.botId}`;
|
|
1344
|
+
const headers = new HttpHeaders({
|
|
1345
|
+
'Content-Type': 'application/json',
|
|
1346
|
+
apiKey: 'WIz/qAm+EEmfOkFaUA/weA==',
|
|
1347
|
+
});
|
|
1348
|
+
return this.http.get(url, { headers }).pipe(switchMap((res) => {
|
|
1349
|
+
if (res) {
|
|
1350
|
+
this.isDocInEditMode = true;
|
|
1351
|
+
this.documentContent = res;
|
|
1352
|
+
console.log('Get API callled success');
|
|
1353
|
+
this.isContentLoaded = true;
|
|
1354
|
+
console.log(res);
|
|
1355
|
+
}
|
|
1356
|
+
this.cdr.markForCheck();
|
|
1357
|
+
return of(res);
|
|
1358
|
+
}), catchError((error) => {
|
|
1359
|
+
console.error('Error fetching chatbot config DJ: ', error);
|
|
1360
|
+
this.isDocInEditMode = false;
|
|
1361
|
+
this.isContentLoaded = true;
|
|
1362
|
+
if ((error === null || error === void 0 ? void 0 : error.status) == 404) {
|
|
1363
|
+
console.log('dash');
|
|
1364
|
+
this.isDocInEditMode = false;
|
|
1365
|
+
this.isContentLoaded = true;
|
|
1366
|
+
}
|
|
1367
|
+
return of(null);
|
|
1368
|
+
}));
|
|
1369
|
+
}
|
|
1370
|
+
fetchAgents() {
|
|
1371
|
+
this.fetchAgents_http().subscribe();
|
|
1372
|
+
}
|
|
1373
|
+
fetchEditorContent() {
|
|
1374
|
+
this.fetchContent_http().subscribe();
|
|
1375
|
+
}
|
|
1376
|
+
// events/${eventId}/users-connections
|
|
1377
|
+
processMessageForDisplay(markdown) {
|
|
1378
|
+
var html = this.prepareHtml(markdown);
|
|
1379
|
+
// console.log('After line breaks conversion:', html);
|
|
1380
|
+
// Optional: Sanitize the HTML to prevent XSS
|
|
1381
|
+
const sanitizedHtml = this.sanitizeHtml(html);
|
|
1382
|
+
// console.log('Sanitized HTML:', sanitizedHtml);
|
|
1383
|
+
return sanitizedHtml;
|
|
1384
|
+
}
|
|
1385
|
+
prepareHtml(markdown) {
|
|
1386
|
+
if (!markdown || !(markdown.length > 0)) {
|
|
1387
|
+
console.error('Input Markdown is null or empty');
|
|
1388
|
+
return '';
|
|
1389
|
+
}
|
|
1390
|
+
// Convert Markdown headers (### or ##) to <strong> for bold headings
|
|
1391
|
+
let html = markdown.replace(/^(#{1,6})\s+(.*)$/gm, (match, hashes, text) => {
|
|
1392
|
+
const level = hashes.length;
|
|
1393
|
+
if (level === 3) {
|
|
1394
|
+
return `<h3><strong>${text}</strong></h3>`;
|
|
1395
|
+
}
|
|
1396
|
+
else if (level === 4) {
|
|
1397
|
+
return `<h4><strong>${text}</strong></h4>`;
|
|
1398
|
+
}
|
|
1399
|
+
return `<strong>${text}</strong>`;
|
|
1400
|
+
});
|
|
1401
|
+
// Convert Markdown code blocks with language to preformatted HTML
|
|
1402
|
+
html = html.replace(/```(\w+)?\n([\s\S]*?)```/g, (match, lang, code) => {
|
|
1403
|
+
const escapedCode = this.escapeHtml(code);
|
|
1404
|
+
const language = lang || 'plaintext';
|
|
1405
|
+
// Create a copy button for the code block
|
|
1406
|
+
return `
|
|
1407
|
+
<div class="code-container">
|
|
1408
|
+
<button id="copy-button" class="copy-button" (click)="copyToClipboard('\`${escapedCode}\`')">Copy</button>
|
|
1409
|
+
<pre class="code_block diff"><code class="language-${language}">${escapedCode}</code></pre>
|
|
1410
|
+
</div>`;
|
|
1411
|
+
});
|
|
1412
|
+
// Convert inline code (wrapped in `backticks`) to inline <code> tags
|
|
1413
|
+
html = html.replace(/`([^`]+)`/g, '<code>$1</code>');
|
|
1414
|
+
// Convert Markdown bold to HTML <strong>
|
|
1415
|
+
html = html.replace(/\*\*(.*?)\*\*/g, '<strong>$1</strong>');
|
|
1416
|
+
// Convert numbered lists
|
|
1417
|
+
html = html.replace(/^\d+\.\s+(.*)$/gm, '<li>$1</li>');
|
|
1418
|
+
// Convert bullet point lists
|
|
1419
|
+
html = html.replace(/^\-\s+(.*)$/gm, '<li>$1</li>');
|
|
1420
|
+
// Convert Markdown links to HTML links
|
|
1421
|
+
html = html.replace(/\[([^\]]+)]\(([^)]+)\)/g, '<a href="$2" target="_blank">$1</a>');
|
|
1422
|
+
// Convert new lines to <br> tags for paragraphs
|
|
1423
|
+
html = html.replace(/(?:\r\n|\r|\n)/g, '<br>');
|
|
1424
|
+
return html;
|
|
1425
|
+
}
|
|
1426
|
+
// Helper function to escape HTML characters for code blocks
|
|
1427
|
+
escapeHtml(code) {
|
|
1428
|
+
return code
|
|
1429
|
+
.replace(/&/g, '&')
|
|
1430
|
+
.replace(/</g, '<')
|
|
1431
|
+
.replace(/>/g, '>')
|
|
1432
|
+
.replace(/"/g, '"')
|
|
1433
|
+
.replace(/'/g, ''');
|
|
1434
|
+
}
|
|
1435
|
+
// Function to copy text to clipboard
|
|
1436
|
+
copyToClipboard(text) {
|
|
1437
|
+
navigator.clipboard.writeText(text).then(() => {
|
|
1438
|
+
alert('Code copied to clipboard!');
|
|
1439
|
+
}, (err) => {
|
|
1440
|
+
console.error('Could not copy text: ', err);
|
|
1441
|
+
});
|
|
1442
|
+
}
|
|
1443
|
+
toggleCollapse() {
|
|
1444
|
+
this.isCollapsed = !this.isCollapsed;
|
|
1445
|
+
this.cdr.detectChanges();
|
|
1446
|
+
}
|
|
1447
|
+
toggleCollapseGraph() {
|
|
1448
|
+
this.isCollapsedForGraph = !this.isCollapsedForGraph;
|
|
1449
|
+
this.cdr.detectChanges();
|
|
1450
|
+
}
|
|
1451
|
+
toggleCollapseFGraph() {
|
|
1452
|
+
this.isCollapsedForFGraph = !this.isCollapsedForFGraph;
|
|
1453
|
+
this.cdr.detectChanges();
|
|
1454
|
+
}
|
|
1455
|
+
// Extracts the domain from a URL
|
|
1456
|
+
getDomainName(url) {
|
|
1457
|
+
try {
|
|
1458
|
+
const { hostname } = new URL(url);
|
|
1459
|
+
return hostname.replace(/^www\./, ''); // Remove 'www.' if present
|
|
1460
|
+
}
|
|
1461
|
+
catch (_a) {
|
|
1462
|
+
return 'unknown';
|
|
1463
|
+
}
|
|
1464
|
+
}
|
|
1465
|
+
// Generates the favicon URL
|
|
1466
|
+
getFaviconUrl(url) {
|
|
1467
|
+
const domain = this.getDomainName(url);
|
|
1468
|
+
return `https://www.google.com/s2/favicons?sz=128&domain=${domain}`;
|
|
1469
|
+
}
|
|
1470
|
+
onCardClick(sources) {
|
|
1471
|
+
this.currentSourcesList = sources;
|
|
1472
|
+
this.cdr.detectChanges();
|
|
1473
|
+
this.sourcesDrawer.open();
|
|
1474
|
+
const button = document.getElementById('botcloseplaygroundbutton');
|
|
1475
|
+
if (button) {
|
|
1476
|
+
button.style.display = 'none';
|
|
1477
|
+
}
|
|
1478
|
+
}
|
|
1479
|
+
openOuterEditor() {
|
|
1480
|
+
this.fetchEditorContent();
|
|
1481
|
+
this.editorsDrawer.open();
|
|
1482
|
+
this.isDrawerOpen = true;
|
|
1483
|
+
this.isShowEditorButton = false;
|
|
1484
|
+
this.cdr.detectChanges();
|
|
1485
|
+
const button = document.getElementById('botcloseplaygroundbutton');
|
|
1486
|
+
if (button) {
|
|
1487
|
+
button.style.display = 'none';
|
|
1488
|
+
}
|
|
1489
|
+
}
|
|
1490
|
+
onCloseEditor() {
|
|
1491
|
+
this.editorsDrawer.close();
|
|
1492
|
+
this.isDrawerOpen = false;
|
|
1493
|
+
this.isShowEditorButton = true;
|
|
1494
|
+
this.cdr.detectChanges(); // Trigger change detection if needed
|
|
1495
|
+
this.onDrawerClosed();
|
|
1496
|
+
}
|
|
1497
|
+
onCloseSource() {
|
|
1498
|
+
this.sourcesDrawer.close();
|
|
1499
|
+
this.isDrawerOpen = false;
|
|
1500
|
+
this.cdr.detectChanges(); // Trigger change detection if needed
|
|
1501
|
+
this.onDrawerClosed();
|
|
1502
|
+
}
|
|
1503
|
+
onDrawerClosed() {
|
|
1504
|
+
setTimeout(() => {
|
|
1505
|
+
this.isDrawerOpen = true;
|
|
1506
|
+
this.cdr.detectChanges(); // Trigger change detection if needed
|
|
1507
|
+
// Use ngClass to dynamically apply the class
|
|
1508
|
+
const button = document.getElementById('botcloseplaygroundbutton');
|
|
1509
|
+
if (button) {
|
|
1510
|
+
button.style.display = 'block';
|
|
1511
|
+
}
|
|
1512
|
+
}, 800);
|
|
1513
|
+
}
|
|
1514
|
+
toggleDrawer(todo) {
|
|
1515
|
+
this.isDrawerOpen = todo;
|
|
1516
|
+
this.cdr.detectChanges();
|
|
1517
|
+
this.updateButtonVisibility();
|
|
1518
|
+
}
|
|
1519
|
+
updateButtonVisibility() {
|
|
1520
|
+
const button = document.getElementById('botcloseplaygroundbutton');
|
|
1521
|
+
if (button) {
|
|
1522
|
+
button.style.display = this.isDrawerOpen ? 'block' : 'none';
|
|
1523
|
+
}
|
|
1524
|
+
}
|
|
1525
|
+
openLinkInNewTab(link) {
|
|
1526
|
+
window.open(link, '_blank');
|
|
1527
|
+
}
|
|
1528
|
+
adjustTextareaHeight(event) {
|
|
1529
|
+
try {
|
|
1530
|
+
if (event.key === 'Enter' && !event.shiftKey) {
|
|
1531
|
+
// Prevents a new line from being added
|
|
1532
|
+
event.preventDefault();
|
|
1533
|
+
}
|
|
1534
|
+
}
|
|
1535
|
+
catch (error) {
|
|
1536
|
+
}
|
|
1537
|
+
const textarea = event.target;
|
|
1538
|
+
textarea.style.height = 'auto'; // Reset the height
|
|
1539
|
+
textarea.style.height = `${textarea.scrollHeight}px`; // Adjust height to match content
|
|
1540
|
+
// Ensure the height doesn't exceed the max-height set in CSS
|
|
1541
|
+
if (textarea.scrollHeight > 150) {
|
|
1542
|
+
textarea.style.height = `150px`; // Adjust height to match content
|
|
1543
|
+
textarea.style.overflowY = 'auto'; // Enable scrolling if content exceeds 400px
|
|
1544
|
+
}
|
|
1545
|
+
else {
|
|
1546
|
+
textarea.style.overflowY = 'hidden'; // Hide scrollbar if content is within limits
|
|
1547
|
+
}
|
|
1548
|
+
}
|
|
1549
|
+
toggleWorkflows(value = null) {
|
|
1550
|
+
if (!this.checkForCop29BotId()) {
|
|
1551
|
+
this.botService.getWorkflowsByOrgId(this.orgId).subscribe((res) => {
|
|
1552
|
+
this.orgWorkflows = res;
|
|
1553
|
+
this.isWorkflowOpen = value == null ? !this.isWorkflowOpen : value;
|
|
1554
|
+
if (!this.isWorkflowOpen) {
|
|
1555
|
+
this.selectedWorkflow = null;
|
|
1556
|
+
this.openWorkflowInput = false;
|
|
1557
|
+
}
|
|
1558
|
+
this.cdr.detectChanges();
|
|
1559
|
+
});
|
|
1560
|
+
}
|
|
1561
|
+
}
|
|
1562
|
+
initializeForm() {
|
|
1563
|
+
var _a, _b;
|
|
1564
|
+
// Create form controls dynamically based on selectedWorkflow.Trigger.InputSchema
|
|
1565
|
+
const formControls = {};
|
|
1566
|
+
if ((_b = (_a = this.selectedWorkflow) === null || _a === void 0 ? void 0 : _a.Trigger) === null || _b === void 0 ? void 0 : _b.InputSchema) {
|
|
1567
|
+
this.selectedWorkflow.Trigger.InputSchema.forEach((input) => {
|
|
1568
|
+
formControls[input.InputId] = [
|
|
1569
|
+
input.Value || '',
|
|
1570
|
+
input.Required ? Validators.required : null,
|
|
1571
|
+
];
|
|
1572
|
+
});
|
|
1573
|
+
}
|
|
1574
|
+
// Initialize the form
|
|
1575
|
+
this.workflowForm = this.fb.group(formControls);
|
|
1576
|
+
}
|
|
1577
|
+
onWorkflowSelected(workflow) {
|
|
1578
|
+
this.selectedWorkflow = workflow;
|
|
1579
|
+
this.initializeForm();
|
|
1580
|
+
this.isWorkflowOpen = false;
|
|
1581
|
+
this.openWorkflowInput = true;
|
|
1582
|
+
}
|
|
1583
|
+
onWorkflowSubmit() {
|
|
1584
|
+
const container = document.getElementById('allChats');
|
|
1585
|
+
if (this.workflowForm.valid) {
|
|
1586
|
+
console.log(this.workflowForm.value);
|
|
1587
|
+
var input = this.prepareHtml(this.generateMarkdown(this.selectedWorkflow.Name, this.workflowForm.value));
|
|
1588
|
+
// update last two chatLog entries, set showWorkflowExecutionLoader = false
|
|
1589
|
+
try {
|
|
1590
|
+
this.chatLog[this.chatLog.length - 1]['showWorkflowExecutionLoader'] = false;
|
|
1591
|
+
this.chatLog[this.chatLog.length - 2]['showWorkflowExecutionLoader'] = false;
|
|
1592
|
+
}
|
|
1593
|
+
catch (error) { }
|
|
1594
|
+
this.chatLog.push({
|
|
1595
|
+
type: 'user',
|
|
1596
|
+
message: input,
|
|
1597
|
+
time: formatNow(this.timezone),
|
|
1598
|
+
copied: false,
|
|
1599
|
+
isCollapsedTrue: false,
|
|
1600
|
+
showWorkflowExecutionLoader: true,
|
|
1601
|
+
});
|
|
1602
|
+
console.log(input);
|
|
1603
|
+
this.currentWorkflowActionProgress = 0;
|
|
1604
|
+
this.currentWorkflowAction =
|
|
1605
|
+
'Executing ' + this.selectedWorkflow.Actions[0].Name;
|
|
1606
|
+
this.isChatingWithAi = true;
|
|
1607
|
+
this.executingWorkflow = true;
|
|
1608
|
+
this.workflowExecutionDetails = {
|
|
1609
|
+
Actions: this.selectedWorkflow.Actions,
|
|
1610
|
+
Inputs: this.workflowForm.value,
|
|
1611
|
+
workflowInputs: this.workflowForm.value,
|
|
1612
|
+
WorkflowName: this.selectedWorkflow.Name,
|
|
1613
|
+
};
|
|
1614
|
+
this.currentWorkflowExecutionDetails = this.workflowExecutionDetails;
|
|
1615
|
+
this.scrollToBottom();
|
|
1616
|
+
this.cdr.detectChanges();
|
|
1617
|
+
// execute the ask endpoint with workflow input
|
|
1618
|
+
this.makeAskRequest(input, this.agents, this.conversationKey, '', null, this.selectedWorkflow['_id'], this.workflowForm.value);
|
|
1619
|
+
}
|
|
1620
|
+
}
|
|
1621
|
+
makeAskRequest(inputMsg, agents, conversationId, msg, chat, workflowId, workflow_inputs) {
|
|
1622
|
+
var _a;
|
|
1623
|
+
var url = `${this.environment.BASE_URL}/ai/ask`;
|
|
1624
|
+
var body = {
|
|
1625
|
+
user_question: inputMsg,
|
|
1626
|
+
user_id: this.userId,
|
|
1627
|
+
bot_id: this.botId,
|
|
1628
|
+
message_id: this.conversationService.generateKey(),
|
|
1629
|
+
agents: (_a = agents === null || agents === void 0 ? void 0 : agents.filter((p) => p.selected).map((p) => p.id)) !== null && _a !== void 0 ? _a : [],
|
|
1630
|
+
conversation_id: conversationId,
|
|
1631
|
+
};
|
|
1632
|
+
if (workflowId) {
|
|
1633
|
+
body['workflow_id'] = workflowId;
|
|
1634
|
+
body['workflow_inputs'] = workflow_inputs;
|
|
1635
|
+
}
|
|
1636
|
+
fetch(url, {
|
|
1637
|
+
method: 'POST',
|
|
1638
|
+
headers: {
|
|
1639
|
+
'Content-Type': 'application/json',
|
|
1640
|
+
Authorization: 'Bearer ' + this.s27Token,
|
|
1641
|
+
'x-api-key': this.apiKey,
|
|
1642
|
+
'hive-bot-id': this.botId
|
|
1643
|
+
},
|
|
1644
|
+
body: JSON.stringify(body),
|
|
1645
|
+
})
|
|
1646
|
+
.then((response) => {
|
|
1647
|
+
if (response.status === 401 || response.status === 403) {
|
|
1648
|
+
this.is401 = true;
|
|
1649
|
+
this.refreshToken.emit();
|
|
1650
|
+
// If `msg` and `chat` exist, handle them
|
|
1651
|
+
if (msg && chat) {
|
|
1652
|
+
this.msg = msg;
|
|
1653
|
+
this.chat = chat;
|
|
1654
|
+
this.isFetchDataFor = true;
|
|
1655
|
+
}
|
|
1656
|
+
}
|
|
1657
|
+
else {
|
|
1658
|
+
this.is401 = false;
|
|
1659
|
+
}
|
|
1660
|
+
return response.json();
|
|
1661
|
+
})
|
|
1662
|
+
.then((data) => {
|
|
1663
|
+
console.log(data);
|
|
1664
|
+
// Additional response handling if needed
|
|
1665
|
+
})
|
|
1666
|
+
.catch((err) => {
|
|
1667
|
+
console.error('Error: ', err);
|
|
1668
|
+
this.isChatingWithAi = false;
|
|
1669
|
+
});
|
|
1670
|
+
this.input = '';
|
|
1671
|
+
this.selectedWorkflow = null;
|
|
1672
|
+
this.openWorkflowInput = false;
|
|
1673
|
+
this.isWorkflowOpen = false;
|
|
1674
|
+
this.scrollToBottom();
|
|
1675
|
+
this.cdr.markForCheck();
|
|
1676
|
+
}
|
|
1677
|
+
generateMarkdown(title, obj) {
|
|
1678
|
+
var _a;
|
|
1679
|
+
// Initialize markdown with the title
|
|
1680
|
+
let markdown = `## ${title}\n`;
|
|
1681
|
+
// Loop through the object and append the field names and values
|
|
1682
|
+
for (const [key, value] of Object.entries(obj)) {
|
|
1683
|
+
var key_label = ((_a = this.selectedWorkflow.Trigger.InputSchema.find((input) => input.InputId === key)) === null || _a === void 0 ? void 0 : _a.Label) || key;
|
|
1684
|
+
markdown += `- **${key_label}**: ${value}\n`;
|
|
1685
|
+
}
|
|
1686
|
+
return markdown;
|
|
1687
|
+
}
|
|
1688
|
+
showWorkflowHistoryDetails(workflow_id) {
|
|
1689
|
+
if (!workflow_id) {
|
|
1690
|
+
this.workflowExecutionDetails = this.currentWorkflowExecutionDetails;
|
|
1691
|
+
this.showWorkflowExecutionDetails = true;
|
|
1692
|
+
this.cdr.detectChanges();
|
|
1693
|
+
return;
|
|
1694
|
+
}
|
|
1695
|
+
this.botService.getWorkflowExecutionById(workflow_id).subscribe((res) => {
|
|
1696
|
+
if (res && res.Actions && Array.isArray(res.Actions)) {
|
|
1697
|
+
res.Actions = res.Actions.map((action) => {
|
|
1698
|
+
if (action.InsertTimeStamp) {
|
|
1699
|
+
action.InsertTimeStamp = formatTimeStamps(this.timezone, action.InsertTimeStamp);
|
|
1700
|
+
}
|
|
1701
|
+
return action;
|
|
1702
|
+
});
|
|
1703
|
+
}
|
|
1704
|
+
res.InsertTimeStamp = formatTimeStamps(this.timezone, res.InsertTimeStamp);
|
|
1705
|
+
this.workflowExecutionDetails = res;
|
|
1706
|
+
this.showWorkflowExecutionDetails = true;
|
|
1707
|
+
this.cdr.detectChanges();
|
|
1708
|
+
});
|
|
1709
|
+
}
|
|
1710
|
+
closeModal() {
|
|
1711
|
+
this.showWorkflowExecutionDetails = false;
|
|
1712
|
+
}
|
|
1713
|
+
objectToArray(obj) {
|
|
1714
|
+
return Object.keys(obj).map((key) => ({ key, value: obj[key] }));
|
|
1715
|
+
}
|
|
1716
|
+
startNewConversation() {
|
|
1717
|
+
this.conversationKey = this.conversationService.getKey(this.botId, true);
|
|
1718
|
+
this.chatLog = [this.chatLog[0]];
|
|
1719
|
+
this.isChatingWithAi = false;
|
|
1720
|
+
setTimeout(() => {
|
|
1721
|
+
this.initializeSocket();
|
|
1722
|
+
}, 200);
|
|
1723
|
+
this.scrollToBottom();
|
|
1724
|
+
this.cdr.detectChanges();
|
|
1725
|
+
}
|
|
1726
|
+
initializeSpeechRecognizer(token) {
|
|
1727
|
+
this.speechConfig = SpeechConfig.fromAuthorizationToken(token, this.region);
|
|
1728
|
+
const audioConfig = AudioConfig.fromDefaultMicrophoneInput();
|
|
1729
|
+
this.recognizer = new SpeechRecognizer(this.speechConfig, audioConfig);
|
|
1730
|
+
this.recognizer.recognizing = (s, e) => {
|
|
1731
|
+
if (e.result.reason === ResultReason.RecognizingSpeech) {
|
|
1732
|
+
this.input = e.result.text;
|
|
1733
|
+
console.log(`Recognizing: ${e.result.text}`);
|
|
1734
|
+
this.cdr.markForCheck();
|
|
1735
|
+
}
|
|
1736
|
+
};
|
|
1737
|
+
this.recognizer.recognized = (s, e) => {
|
|
1738
|
+
if (e.result.reason === ResultReason.RecognizedSpeech) {
|
|
1739
|
+
this.input = e.result.text;
|
|
1740
|
+
console.log(`Recognized: ${e.result.text}`);
|
|
1741
|
+
this.toggleRecording();
|
|
1742
|
+
this.cdr.markForCheck();
|
|
1743
|
+
}
|
|
1744
|
+
};
|
|
1745
|
+
this.recognizer.canceled = (s, e) => {
|
|
1746
|
+
console.error('Canceled: ', e.errorDetails);
|
|
1747
|
+
};
|
|
1748
|
+
this.recognizer.sessionStopped = (s, e) => {
|
|
1749
|
+
console.log('Session stopped.');
|
|
1750
|
+
this.recognizer.stopContinuousRecognitionAsync();
|
|
1751
|
+
this.fetchData();
|
|
1752
|
+
};
|
|
1753
|
+
}
|
|
1754
|
+
toggleRecording() {
|
|
1755
|
+
this.isRecording = !this.isRecording;
|
|
1756
|
+
if (this.isRecording) {
|
|
1757
|
+
this.startRecognition();
|
|
1758
|
+
}
|
|
1759
|
+
else {
|
|
1760
|
+
this.stopRecognition();
|
|
1761
|
+
}
|
|
1762
|
+
}
|
|
1763
|
+
startRecognition() {
|
|
1764
|
+
this.recognizer.startContinuousRecognitionAsync();
|
|
1765
|
+
}
|
|
1766
|
+
stopRecognition() {
|
|
1767
|
+
this.recognizer.stopContinuousRecognitionAsync();
|
|
1768
|
+
}
|
|
1769
|
+
checkForCop29BotId() {
|
|
1770
|
+
return this.botId == '66fa3f276c5d71e2717bfea8';
|
|
1771
|
+
}
|
|
1772
|
+
}
|
|
1773
|
+
ChatDrawerComponent.decorators = [
|
|
1774
|
+
{ type: Component, args: [{
|
|
1775
|
+
selector: 'hivegpt-chat-drawer-package',
|
|
1776
|
+
template: "<button *ngIf=\"isShowEditorButton\" (click)=\"openOuterEditor()\" class=\"fixed-btn\">\n <span style=\"font-size: 12px\" class=\"material-icons notranslate\">\n create\n </span>\n Editor\n</button>\n\n<button *ngIf=\"!isShowEditorButton\" (click)=\"onCloseEditor()\" class=\"fixed-btn-close\">\n <span style=\"font-size: 12px\" class=\"material-icons notranslate\">\n close\n </span>\n Close\n</button>\n\n<mat-drawer-container class=\"hivegpt-chat-wrapper\" [ngClass]=\"{ 'mat-drawer-container-has-open': isDrawerOpen }\"\n [class.ios-device]=\"isIOSDevice\" [hasBackdrop]=\"hasBackdropValue\">\n <mat-drawer class=\"drawer\" #drawer [position]=\"'start'\" [mode]=\"'over'\" opened=\"true\"\n [class.full-width-drawer]=\"fullView\" [style.background]=\"\n 'linear-gradient(' + (bgGradient ? bgGradient.join(', ') : '') + ')'\n \">\n <mat-drawer-content>\n <div class=\"chat-main\">\n <!-- <div class=\"chat-header\">\n <h2> -->\n <!-- {{eventName}} -->\n <!-- </h2> -->\n <!-- <button class=\"closeIcon\" (click)=\"onClose()\">\n <span class=\"material-symbols-outlined\">\n close\n </span>\n </button> -->\n <!-- </div> -->\n\n <div class=\"innerChat\" #chatMain>\n <div (click)=\"startNewConversation()\" class=\"new-conversationbutton\">\n New Chat <span><svg xmlns=\"http://www.w3.org/2000/svg\" width=\"14.061\" height=\"14.261\"\n viewBox=\"0 0 14.061 14.261\">\n <path id=\"Path_164\" data-name=\"Path 164\"\n d=\"M10.146,5.075H4.531A1.544,1.544,0,0,0,3,6.631v7.262A1.544,1.544,0,0,0,4.531,15.45h7.146a1.544,1.544,0,0,0,1.531-1.556V8.187m-7.146,4.15L15.25,3m0,0H11.677M15.25,3V6.631\"\n transform=\"translate(-2.25 -1.939)\" fill=\"none\" stroke=\"#06f\" stroke-linecap=\"round\"\n stroke-linejoin=\"round\" stroke-width=\"1.5\" />\n </svg>\n\n </span>\n </div>\n <div class=\"sticky-header-chat\">\n <div class=\"title_chat\">\n <h2>\n <span>\n {{ botName }}\n <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"31.499\" height=\"31.501\" viewBox=\"0 0 31.499 31.501\">\n <path id=\"Icon_ion-shield-checkmark\" data-name=\"Icon ion-shield-checkmark\"\n d=\"M33.685,7.83a1.125,1.125,0,0,0-.925-1.036,49.227,49.227,0,0,1-14.3-4.444,1.125,1.125,0,0,0-.927,0A49.226,49.226,0,0,1,3.24,6.794,1.125,1.125,0,0,0,2.315,7.83a27.621,27.621,0,0,0,1.718,11.9A24.572,24.572,0,0,0,9.07,27.641a25.712,25.712,0,0,0,8.513,6.028,1.125,1.125,0,0,0,.844,0,25.712,25.712,0,0,0,8.513-6.028,24.572,24.572,0,0,0,5.027-7.911,27.621,27.621,0,0,0,1.718-11.9Zm-9.211,5.281-7.791,9a1.125,1.125,0,0,1-.8.389h-.046a1.125,1.125,0,0,1-.788-.322L11.587,18.79a1.125,1.125,0,1,1,1.575-1.607l2.6,2.552,7.01-8.1a1.125,1.125,0,0,1,1.7,1.472Z\"\n transform=\"translate(-2.25 -2.25)\" fill=\"#06f\" />\n </svg>\n </span>\n <span>\n <p class=\"small-title\">AI-powered <span>copilot</span></p>\n </span>\n </h2>\n </div>\n <div class=\"chatType\" style=\"display: none\">\n <h4 class=\"labelChat\">Choose a conversation style</h4>\n <ul>\n <li (click)=\"changeTemperature(0)\">\n <button [ngClass]=\"{ active: temperature === 0 }\">\n <span class=\"top-section-title\"> More Creative </span>\n </button>\n </li>\n <li (click)=\"changeTemperature(1)\" class=\"fdssfd\">\n <button [ngClass]=\"{ active: temperature === 1 }\">\n <span class=\"top-section-title\"> More Balanced </span>\n </button>\n </li>\n <li (click)=\"changeTemperature(2)\">\n <button [ngClass]=\"{ active: temperature === 2 }\">\n <span class=\"top-section-title\"> More Precise </span>\n </button>\n </li>\n </ul>\n </div>\n </div>\n <!-- chattype -->\n <div id=\"allChats\" class=\"chat bot\" *ngFor=\"let chat of chatLog; let i = index\">\n <div class=\"chat-box\">\n <div class=\"message\">\n <div class=\"time-cta\" [ngClass]=\"{\n 'time-cta din': showFeedBackIconsIndex === i,\n 'time-cta': showFeedBackIconsIndex != i\n }\">\n <div class=\"Icon_TimeSTamp\" *ngIf=\"chat?.type === 'ai'\">\n <!-- <img [src]=\"botIcon\" [alt]=\"botName || 'Assistant'\" /> -->\n <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"44\" height=\"44\" viewBox=\"0 0 44 44\">\n <g id=\"Group_121\" data-name=\"Group 121\" transform=\"translate(4843 -371)\">\n <g id=\"Ellipse_18\" data-name=\"Ellipse 18\" transform=\"translate(-4843 371)\" fill=\"#fcfcfc\"\n stroke=\"#dfdfdf\" stroke-width=\"1\">\n <circle cx=\"22\" cy=\"22\" r=\"22\" stroke=\"none\" />\n <circle cx=\"22\" cy=\"22\" r=\"21.5\" fill=\"none\" />\n </g>\n <g id=\"Group_120\" data-name=\"Group 120\" transform=\"translate(-4835.141 378.855)\">\n <g id=\"Group_1\" data-name=\"Group 1\" transform=\"translate(7.29 0)\">\n <path id=\"Path_1\" data-name=\"Path 1\"\n d=\"M93.774,41.324,98.757,44.2v5.753l-4.983,2.877-4.983-2.877V44.2l4.983-2.877m0-2.034L87.03,43.183V50.97l6.744,3.893,6.744-3.893V43.183L93.774,39.29Z\"\n transform=\"translate(-87.03 -39.29)\" fill=\"gray\" />\n </g>\n <g id=\"Group_2\" data-name=\"Group 2\" transform=\"translate(0 12.717)\">\n <path id=\"Path_2\" data-name=\"Path 2\"\n d=\"M52.374,113.544l4.983,2.877v5.753l-4.983,2.877-4.983-2.877v-5.753l4.983-2.877m0-2.034L45.63,115.4v7.787l6.744,3.893,6.744-3.893V115.4l-6.744-3.893Z\"\n transform=\"translate(-45.63 -111.51)\" fill=\"gray\" />\n </g>\n <g id=\"Group_3\" data-name=\"Group 3\" transform=\"translate(14.793 12.717)\">\n <path id=\"Path_3\" data-name=\"Path 3\"\n d=\"M136.384,113.544l4.983,2.877v5.753l-4.983,2.877-4.983-2.877v-5.753l4.983-2.877m0-2.034L129.64,115.4v7.787l6.744,3.893,6.744-3.893V115.4l-6.744-3.893Z\"\n transform=\"translate(-129.64 -111.51)\" fill=\"gray\" />\n </g>\n </g>\n </g>\n </svg>\n\n <div class=\"dateTime\" [style.color]=\"dateTimeColor ? '' : ''\">\n <span>{{ 'Assistant' }}</span> {{ chat?.time }}\n </div>\n </div>\n\n <div class=\"Icon_TimeSTamp\" *ngIf=\"chat?.type === 'user'\">\n <div class=\"user-Box\">\n <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"44\" height=\"44\" viewBox=\"0 0 44 44\">\n <g id=\"Ellipse_17\" data-name=\"Ellipse 17\" fill=\"#fcfcfc\" stroke=\"#dfdfdf\" stroke-width=\"1\">\n <circle cx=\"22\" cy=\"22\" r=\"22\" stroke=\"none\" />\n <circle cx=\"22\" cy=\"22\" r=\"21.5\" fill=\"none\" />\n </g>\n <path id=\"Icon_grommet-user-expert\" data-name=\"Icon grommet-user-expert\"\n d=\"M14.24,20.443a9.472,9.472,0,1,0-9.472-9.472,9.472,9.472,0,0,0,9.472,9.472Zm10.329,5.225c-1.957-3.347-6.516-5.225-10.329-5.225-3.145,0-8.046.805-10.761,5.225\"\n transform=\"translate(7.976 8.416)\" fill=\"none\" stroke=\"gray\" stroke-width=\"1.5\" />\n </svg>\n\n <div class=\"dateTime\"><span>You</span> {{ chat?.time }}\n </div>\n </div>\n <div class=\"bards\">\n <div class=\"bars\" *ngIf=\"chat?.WorkflowExecutionId || chat?.showWorkflowExecutionLoader\">\n <button class=\"icon-button\" (click)=\"showWorkflowHistoryDetails(chat.WorkflowExecutionId)\">\n <i class=\"fas fa-bars\"></i>\n </button>\n </div>\n </div>\n\n </div>\n </div>\n <div class=\"researchingCard\">\n <div *ngIf=\"\n (chat?.searchTerms && chat?.searchTerms.length > 0) ||\n (chat?.sourcesList && chat?.sourcesList.length > 0)\n \" class=\"card-header d-flex align-items-center\" (click)=\"toggleCollapse()\">\n <span class=\"icon\"><i class=\"bx bx-plus-circle bx-sm\"></i></span>\n <span class=\"ml-2\">Researching\n <i id=\"toggleIcon\" class=\"toggle-icon ml-2 fa\" [ngClass]=\"{\n 'fa-chevron-down': isCollapsed,\n 'fa-chevron-up': !isCollapsed\n }\"></i></span>\n </div>\n <div *ngIf=\"chat?.searchTerms && chat?.searchTerms.length > 0\" [ngClass]=\"{ collapse: isCollapsed }\">\n <ul class=\"list-group list-group-flush uptList\">\n <li *ngFor=\"let term of chat?.searchTerms\" class=\"list-group-item\">\n Searching for\n <strong>{{ term }}</strong>\n </li>\n </ul>\n\n <h5 class=\"mt-2\" *ngIf=\"chat?.sourcesList && chat?.sourcesList.length > 0\">\n <i class=\"bx bx-unite\"></i> Sources\n </h5>\n <div class=\"sources-container\" *ngIf=\"chat?.sourcesList && chat?.sourcesList.length > 0\">\n <div class=\"source-card\" *ngFor=\"\n let source of chat?.displayedSources;\n let i = index\n \">\n <div>\n <div class=\"source-title\">{{ source.title }}</div>\n <div class=\"source-url\">\n <img class=\"relative block\" [src]=\"getFaviconUrl(source.link)\"\n [alt]=\"getDomainName(source.link) + ' favicon'\" />\n {{ getDomainName(source.link) }}\n </div>\n <div class=\"popup\">\n <div class=\"source-url\" (click)=\"openLinkInNewTab(source.link)\">\n <img class=\"relative block\" [src]=\"getFaviconUrl(source.link)\"\n [alt]=\"getDomainName(source.link) + ' favicon'\" />\n {{ getDomainName(source.link) }}\n </div>\n <h5 (click)=\"openLinkInNewTab(source.link)\">\n {{ source.title }}\n </h5>\n <p (click)=\"openLinkInNewTab(source.link)\">\n {{ source.desc }}\n </p>\n </div>\n </div>\n </div>\n <ng-container *ngIf=\"\n chat?.remainingSources &&\n chat?.remainingSources.length > 0\n \">\n <div class=\"source-card\" (click)=\"onCardClick(chat?.sourcesList)\">\n <div>\n <div class=\"source-title\">\n <img *ngFor=\"\n let source of chat?.remainingSources;\n let i = index\n \" class=\"relative block\" [src]=\"getFaviconUrl(source.link)\"\n [alt]=\"getDomainName(source.link) + ' favicon'\" />\n </div>\n <div class=\"source-url\">\n View {{ chat?.remainingSources.length }} more\n </div>\n </div>\n </div>\n </ng-container>\n </div>\n </div>\n </div>\n\n <div *ngIf=\"chat?.type === 'ai' || chat?.type === 'user'\" [ngStyle]=\"{\n background:\n chat?.type === 'ai' && bgBubbleAi\n ? ''\n : chat?.type === 'user' && bgBubbleUser\n ? ''\n : ''\n }\">\n <div id=\"messageText_{{ i }}\">\n <p *ngIf=\"chat?.type === 'ai' || chat?.type === 'user'\" [ngClass]=\"{\n 'SearchTitle ai': chat?.type === 'ai',\n 'SearchTitle user': chat?.type === 'user'\n }\" [ngStyle]=\"{\n background: chat?.type === 'ai' && messageTextColorAi ? messageTextColorAi : (chat?.type === 'user' && messageTextColorUser ? messageTextColorUser : 'defaultBackground'),\n color: chat?.type === 'ai' && messageTextColorAi ? messageTextColorAi : (chat?.type === 'user' && messageTextColorUser ? messageTextColorUser : 'defaultColor')\n }\" [innerHTML]=\"chat?.message\">\n </p>\n </div>\n </div>\n\n <div class=\"progress-container\" *ngIf=\"chat?.showWorkflowExecutionLoader\">\n <div class=\"circular-loader\">\n <div class=\"loader-spinner\" *ngIf=\"currentWorkflowActionProgress < 100\"\n [ngStyle]=\"{ 'transform': 'rotate(' + (percentage * 3.6) + 'deg)' }\">\n </div>\n <div class=\"checkmark\" *ngIf=\"currentWorkflowActionProgress == 100\">\n <svg viewBox=\"0 0 52 52\">\n <circle class=\"checkmark-circle\" cx=\"26\" cy=\"26\" r=\"25\" fill=\"none\" />\n <path class=\"checkmark-check\" fill=\"none\" d=\"M14 27l7 7 16-16\" />\n </svg>\n </div>\n\n <div class=\"loader-text\" *ngIf=\"currentWorkflowActionProgress < 100\">{{\n currentWorkflowActionProgress\n }}%</div>\n </div>\n <div class=\"loader-label\">\n {{currentWorkflowAction}}...\n </div>\n </div>\n\n <div class=\"exicution mt-2\" *ngIf=\"\n chat?.type === 'ai' &&\n chat?.graphs &&\n chat?.graphs.length > 0\n \">\n <h5 *ngIf=\"chat?.type === 'ai'\">\n <i class=\"bx bx-network-chart\"></i> Graphs\n <i (click)=\"toggleCollapseFGraph()\" class=\"toggle-icon ml-2 fa\" [ngClass]=\"{\n 'fas fa-chevron-down': isCollapsedForFGraph,\n 'fas fa-chevron-up': !isCollapsedForFGraph\n }\"></i>\n </h5>\n <img *ngFor=\"let image of chat?.graphs\" class=\"graph-img\"\n [ngClass]=\"{ collapse: isCollapsedForFGraph }\" [src]=\"image\" alt=\"\" />\n </div>\n <ng-container *ngIf=\"!checkForCop29BotId()\">\n <div class=\"exicution mt-2\" *ngIf=\"\n chat?.type === 'ai' &&\n chat?.executionGraphs &&\n chat?.executionGraphs?.length > 0\n \">\n <h5 *ngIf=\"chat?.type === 'ai'\">\n <i class=\"bx bx-network-chart\"></i> Execution Path Diagram\n For Data Visualization Workflow\n <i (click)=\"toggleCollapseGraph()\" class=\"toggle-icon ml-2 fa\" [ngClass]=\"{\n 'fas fa-chevron-down': isCollapsedForGraph,\n 'fas fa-chevron-up': !isCollapsedForGraph\n }\"></i>\n </h5>\n <img *ngFor=\"let image of chat?.executionGraphs\" class=\"graph-img\"\n [ngClass]=\"{ collapse: isCollapsedForGraph }\" [src]=\"image\" alt=\"\" />\n </div>\n </ng-container>\n <div class=\"Related mt-2\" *ngIf=\"\n showFeedBackIconsIndex === i &&\n chat?.relatedListItems &&\n chat?.relatedListItems.length > 0\n \">\n <h5 *ngIf=\"chat?.type === 'ai'\">\n <i class=\"bx bx-list-check\"></i> Related\n </h5>\n <div class=\"card-container\" *ngIf=\"chat?.type === 'ai'\">\n <ul class=\"list-container\">\n <ng-container *ngFor=\"let item of chat?.relatedListItems\">\n <li (click)=\"fetchDataFor(item, chat)\">{{ item }}</li>\n </ng-container>\n </ul>\n </div>\n </div>\n </div>\n\n <div class=\"cta\" *ngIf=\"showFeedBackIconsIndex === i\">\n <div class=\"copyBox\" title=\"Copy\">\n <button title=\"{{ chat?.copied ? 'Copied!' : 'Copy' }}\" class=\"copy\" [class.active]=\"chat?.copied\"\n (click)=\"handleCopyClick(i)\">\n <i *ngIf=\"chat?.copied\">\n <svg width=\"18\" height=\"18\" viewBox=\"0 0 24 24\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n <path d=\"M9 16.17L4.83 12L3.41 13.41L9 19L21 7L19.59 5.59L9 16.17Z\" fill=\"#566563\" />\n </svg>\n </i>\n\n <i *ngIf=\"!chat?.copied\">\n <svg width=\"18\" height=\"18\" viewBox=\"0 0 24 24\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n <path\n d=\"M19.24 2H8.84C8.14 2 7.58 2.56 7.58 3.26V16.84C7.58 17.54 8.14 18.1 8.84 18.1H19.24C19.94 18.1 20.5 17.54 20.5 16.84V3.26C20.5 2.56 19.94 2 19.24 2ZM19.24 16.84H8.84V3.26H19.24V16.84ZM4.74 6.52C4.04 6.52 3.48 7.08 3.48 7.78V20.36C3.48 21.06 4.04 21.62 4.74 21.62H15.14C15.84 21.62 16.4 21.06 16.4 20.36V18.88H14.96V20.36H4.74V7.78H6.18V6.52H4.74Z\"\n fill=\"#566563\" />\n </svg>\n </i>\n </button>\n\n <button class=\"up copy\" title=\"{{ chat?.isEditor ? 'Added!' : 'Add to editor' }}\"\n (click)=\"handleEditorClick(i)\">\n <svg *ngIf=\"!chat?.isEditor\" xmlns=\"http://www.w3.org/2000/svg\" width=\"20.152\" height=\"20.152\"\n viewBox=\"0 0 20.152 20.152\">\n <g id=\"Icon_feather-edit\" data-name=\"Icon feather-edit\" transform=\"translate(-2.5 -2.166)\">\n <path id=\"Path_166\" data-name=\"Path 166\"\n d=\"M11.5,6H4.889A1.889,1.889,0,0,0,3,7.889v13.22A1.889,1.889,0,0,0,4.889,23h13.22A1.889,1.889,0,0,0,20,21.108V14.5\"\n transform=\"translate(0 -1.179)\" fill=\"none\" stroke=\"#393939\" stroke-linecap=\"round\"\n stroke-linejoin=\"round\" stroke-width=\"1\" />\n <path id=\"Path_167\" data-name=\"Path 167\"\n d=\"M21.915,3.4a2,2,0,0,1,2.833,2.833l-8.971,8.971L12,16.152l.944-3.777Z\"\n transform=\"translate(-3.334 0)\" fill=\"none\" stroke=\"#393939\" stroke-linecap=\"round\"\n stroke-linejoin=\"round\" stroke-width=\"1\" />\n </g>\n </svg>\n\n <i *ngIf=\"chat?.isEditor\">\n <svg width=\"18\" height=\"18\" viewBox=\"0 0 24 24\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n <path d=\"M9 16.17L4.83 12L3.41 13.41L9 19L21 7L19.59 5.59L9 16.17Z\" fill=\"#566563\" />\n </svg>\n </i>\n </button>\n\n <button class=\"up copy\" title=\"Like\" [class.active]=\"chat?.liked\" (click)=\"handleUpClick(i)\">\n <i *ngIf=\"chat?.liked\">\n <svg width=\"18\" height=\"18\" viewBox=\"0 0 24 24\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n <path\n d=\"M8.38989 18.4902V8.33022C8.38989 7.93022 8.50989 7.54022 8.72989 7.21022L11.4599 3.15022C11.8899 2.50022 12.9599 2.04022 13.8699 2.38022C14.8499 2.71022 15.4999 3.81022 15.2899 4.79022L14.7699 8.06022C14.7299 8.36022 14.8099 8.63022 14.9799 8.84022C15.1499 9.03022 15.3999 9.15022 15.6699 9.15022H19.7799C20.5699 9.15022 21.2499 9.47022 21.6499 10.0302C22.0299 10.5702 22.0999 11.2702 21.8499 11.9802L19.3899 19.4702C19.0799 20.7102 17.7299 21.7202 16.3899 21.7202H12.4899C11.8199 21.7202 10.8799 21.4902 10.4499 21.0602L9.16989 20.0702C8.67989 19.7002 8.38989 19.1102 8.38989 18.4902Z\"\n fill=\"#17235B\" />\n <path\n d=\"M5.21 6.37988H4.18C2.63 6.37988 2 6.97988 2 8.45988V18.5199C2 19.9999 2.63 20.5999 4.18 20.5999H5.21C6.76 20.5999 7.39 19.9999 7.39 18.5199V8.45988C7.39 6.97988 6.76 6.37988 5.21 6.37988Z\"\n fill=\"#17235B\" />\n </svg>\n </i>\n <i *ngIf=\"!chat?.liked\">\n <svg width=\"18\" height=\"18\" viewBox=\"0 0 24 24\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n <path\n d=\"M10.4037 20.9264L10.381 20.9038L10.3557 20.8843L7.72165 18.85L8.02965 18.4516L10.7161 20.5315C10.9228 20.7195 11.2181 20.8517 11.4962 20.9377C11.7978 21.0309 12.1451 21.09 12.4801 21.09H16.2801C16.8572 21.09 17.4266 20.8625 17.8751 20.5306C18.3159 20.2044 18.6912 19.7385 18.8305 19.1997L21.2428 11.8732C21.4379 11.3309 21.4287 10.749 21.0965 10.2887C20.7583 9.81377 20.1844 9.58999 19.5801 9.58999H15.5801C15.2031 9.58999 14.8615 9.43143 14.6276 9.16215L14.627 9.16142C14.3873 8.88649 14.2756 8.51549 14.3345 8.11501L14.8322 4.9195C14.9978 4.1052 14.4664 3.24596 13.7053 2.98804C13.3277 2.85165 12.9297 2.89129 12.61 2.99839C12.2949 3.10396 11.9772 3.30172 11.7881 3.57673L11.7881 3.57671L11.7851 3.58107L7.96352 9.26689L7.55454 8.99314L11.3751 3.30891L11.3755 3.30836C11.8763 2.56103 13.0109 2.19028 13.8726 2.51744L13.8834 2.52151L13.8943 2.52509C14.9044 2.8564 15.556 3.98765 15.3317 5.01314L15.3284 5.02805L15.326 5.04314L14.836 8.19314L14.836 8.19313L14.8351 8.19928C14.8184 8.31642 14.7981 8.60268 15.0138 8.84924L15.0248 8.86177L15.0366 8.87354C15.1833 9.02026 15.3817 9.09999 15.5901 9.09999H19.5901C20.4308 9.09999 21.1176 9.44886 21.5113 10.0079L21.5124 10.0095C21.8964 10.5502 21.9908 11.2849 21.7202 12.0291L21.7175 12.0365L21.7151 12.044L19.3251 19.324L19.3198 19.34L19.3156 19.3564C19.0058 20.5707 17.6766 21.6 16.2801 21.6H12.4801C12.2411 21.6 11.8403 21.5625 11.4297 21.4512C11.0123 21.338 10.6406 21.1633 10.4037 20.9264Z\"\n fill=\"#566563\" stroke=\"#566563\" />\n <path\n d=\"M5.37988 20.4999H4.37988C3.52442 20.4999 2.98559 20.2982 2.65822 19.9825C2.33437 19.6702 2.12988 19.1614 2.12988 18.3499V8.5499C2.12988 7.73843 2.33437 7.22962 2.65822 6.91731C2.98559 6.6016 3.52442 6.3999 4.37988 6.3999H5.37988C6.23534 6.3999 6.77418 6.6016 7.10155 6.91731C7.4254 7.22962 7.62988 7.73843 7.62988 8.5499V18.3499C7.62988 19.1614 7.4254 19.6702 7.10155 19.9825C6.77418 20.2982 6.23534 20.4999 5.37988 20.4999ZM4.37988 6.8999C4.0934 6.8999 3.83578 6.9164 3.61382 6.96689C3.38745 7.01838 3.16822 7.11196 2.99258 7.2876C2.81559 7.46459 2.72807 7.67966 2.68301 7.89002C2.63948 8.09318 2.62988 8.31967 2.62988 8.5499V18.3499C2.62988 18.5801 2.63948 18.8066 2.68301 19.0098C2.72807 19.2201 2.81559 19.4352 2.99258 19.6122C3.16822 19.7878 3.38745 19.8814 3.61382 19.9329C3.83578 19.9834 4.0934 19.9999 4.37988 19.9999H5.37988C5.66637 19.9999 5.92398 19.9834 6.14595 19.9329C6.37232 19.8814 6.59155 19.7878 6.76719 19.6122C6.94418 19.4352 7.0317 19.2201 7.07676 19.0098C7.12028 18.8066 7.12988 18.5801 7.12988 18.3499V8.5499C7.12988 8.31967 7.12028 8.09318 7.07676 7.89002C7.0317 7.67966 6.94418 7.46459 6.76719 7.2876C6.59155 7.11196 6.37232 7.01838 6.14595 6.96689C5.92398 6.9164 5.66637 6.8999 5.37988 6.8999H4.37988Z\"\n fill=\"#566563\" stroke=\"#566563\" />\n </svg>\n </i>\n </button>\n <button class=\"down copy\" title=\"Dislike\" [class.active]=\"chat?.unliked\" (click)=\"handleDownClick(i)\">\n <i *ngIf=\"chat?.unliked\">\n <svg width=\"18\" height=\"18\" viewBox=\"0 0 24 24\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n <path\n d=\"M15.61 5.50002V15.66C15.61 16.06 15.49 16.45 15.27 16.78L12.54 20.84C12.11 21.49 11.04 21.95 10.13 21.61C9.15002 21.28 8.50002 20.18 8.71002 19.2L9.23002 15.93C9.27002 15.63 9.19002 15.36 9.02002 15.15C8.85002 14.96 8.60002 14.84 8.33002 14.84H4.22002C3.43002 14.84 2.75002 14.52 2.35002 13.96C1.97002 13.42 1.90002 12.72 2.15002 12.01L4.61002 4.52002C4.92002 3.28002 6.27002 2.27002 7.61002 2.27002H11.51C12.18 2.27002 13.12 2.50002 13.55 2.93002L14.83 3.92002C15.32 4.30002 15.61 4.88002 15.61 5.50002Z\"\n fill=\"#17235B\" />\n\n <path\n d=\"M18.7901 17.6099H19.8201C21.3701 17.6099 22.0001 17.0099 22.0001 15.5299V5.4799C22.0001 3.9999 21.3701 3.3999 19.8201 3.3999H18.7901C17.2401 3.3999 16.6101 3.9999 16.6101 5.4799V15.5399C16.6101 17.0099 17.2401 17.6099 18.7901 17.6099Z\"\n fill=\"#17235B\" />\n </svg>\n </i>\n\n <i *ngIf=\"!chat?.unliked\">\n <svg width=\"18\" height=\"18\" viewBox=\"0 0 24 24\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n <path\n d=\"M10.1237 21.481L10.1148 21.4778L10.1059 21.4748C9.09577 21.1435 8.44416 20.0122 8.66849 18.9867L8.67175 18.9718L8.6741 18.9568L9.1641 15.8068L9.16413 15.8068L9.16501 15.8006C9.18175 15.6835 9.20207 15.3972 8.98633 15.1507L8.97536 15.1381L8.96359 15.1263C8.81687 14.9796 8.61841 14.8999 8.41004 14.8999H4.41004C3.56937 14.8999 2.88252 14.551 2.48884 13.992L2.4877 13.9904C2.10371 13.4497 2.00931 12.715 2.27994 11.9708L2.28263 11.9634L2.28509 11.9559L4.67509 4.67586L4.68035 4.65985L4.68451 4.64353C4.99418 3.42996 6.33271 2.3999 7.72004 2.3999H11.52C11.7591 2.3999 12.1599 2.43736 12.5704 2.54872C12.9878 2.66194 13.3596 2.83655 13.5965 3.07346L13.6191 3.09608L13.6444 3.11563L16.2785 5.14986L15.9705 5.54825L13.2875 3.47111C13.0799 3.2763 12.7837 3.1413 12.5061 3.05412C12.2031 2.95897 11.8551 2.8999 11.52 2.8999H7.72004C7.1429 2.8999 6.57353 3.12735 6.12508 3.45926C5.68428 3.78551 5.30892 4.25142 5.16963 4.79019L2.75738 12.1167C2.56223 12.659 2.57147 13.2409 2.90366 13.7012C3.24183 14.1761 3.81578 14.3999 4.42004 14.3999H8.42004C8.79702 14.3999 9.13867 14.5585 9.37252 14.8277L9.37315 14.8285C9.61286 15.1034 9.72457 15.4745 9.66568 15.875C9.6656 15.8755 9.66552 15.8761 9.66544 15.8766L9.16795 19.0704C9.00242 19.8841 9.53299 20.7428 10.2933 21.0013C10.6685 21.1391 11.0675 21.0978 11.3857 20.9917C11.7001 20.8869 12.0218 20.6898 12.2121 20.4132L12.2121 20.4132L12.215 20.4088L16.0351 14.7253L16.4472 15.0045L12.6251 20.691L12.6249 20.6912C12.259 21.2361 11.5347 21.5999 10.8 21.5999C10.5668 21.5999 10.3358 21.5596 10.1237 21.481Z\"\n fill=\"#566563\" stroke=\"#566563\" />\n <path\n d=\"M19.6201 17.6H18.6201C17.7647 17.6 17.2258 17.3983 16.8985 17.0826C16.5746 16.7703 16.3701 16.2615 16.3701 15.45V5.65C16.3701 4.83853 16.5746 4.32972 16.8985 4.0174C17.2258 3.7017 17.7647 3.5 18.6201 3.5H19.6201C20.4756 3.5 21.0144 3.7017 21.3418 4.0174C21.6656 4.32972 21.8701 4.83853 21.8701 5.65V15.45C21.8701 16.2615 21.6656 16.7703 21.3418 17.0826C21.0144 17.3983 20.4756 17.6 19.6201 17.6ZM18.6201 4C18.3336 4 18.076 4.01649 17.8541 4.06699C17.6277 4.11848 17.4085 4.21206 17.2328 4.3877C17.0558 4.56469 16.9683 4.77976 16.9232 4.99011C16.8797 5.19328 16.8701 5.41977 16.8701 5.65V15.45C16.8701 15.6802 16.8797 15.9067 16.9232 16.1099C16.9683 16.3202 17.0558 16.5353 17.2328 16.7123C17.4085 16.8879 17.6277 16.9815 17.8541 17.033C18.076 17.0835 18.3336 17.1 18.6201 17.1H19.6201C19.9066 17.1 20.1642 17.0835 20.3862 17.033C20.6126 16.9815 20.8318 16.8879 21.0074 16.7123C21.1844 16.5353 21.2719 16.3202 21.317 16.1099C21.3605 15.9067 21.3701 15.6802 21.3701 15.45V5.65C21.3701 5.41977 21.3605 5.19328 21.317 4.99011C21.2719 4.77976 21.1844 4.56469 21.0074 4.3877C20.8318 4.21206 20.6126 4.11848 20.3862 4.06699C20.1642 4.01649 19.9066 4 19.6201 4H18.6201Z\"\n fill=\"#566563\" stroke=\"#566563\" />\n </svg>\n </i>\n </button>\n </div>\n </div>\n\n </div>\n\n <div class=\"cta-faqs quick-prompts-extended\" *ngIf=\"i == 0 && quickPrompts?.length\">\n <!-- <div *ngFor=\"let tile of quickPrompts\" class=\"cta\"\n (click)=\"sendMessageWithTile(tile.prompt)\">\n Q: {{ tile.text }}\n </div> -->\n <div class=\"cta_suggestions\">\n <button *ngFor=\"let tile of quickPrompts\" (click)=\"sendMessageWithTile(tile.prompt)\">\n <ng-container *ngIf=\"tile\">{{ tile.text }}</ng-container>\n </button>\n </div>\n </div>\n <div class=\"chat bot\" *ngIf=\"i == 0 && botSkills\">\n <div class=\"chat-box\">\n <div class=\"message\">\n <p [innerHTML]=\"processMessageForDisplay(botSkills)\"></p>\n \n </div>\n </div>\n </div>\n <div *ngIf=\"chat?.suggestions?.length\">\n <h4 class=\"labelChat\">\n Here are some things EventsGPT Copilot can help you do:\n </h4>\n <div class=\"cta_suggestions\">\n <button *ngFor=\"let suggestion of chat?.suggestions\" (click)=\"sendMessageWithTile(suggestion)\">\n <ng-container *ngIf=\"suggestion\">{{\n suggestion\n }}</ng-container>\n </button>\n </div>\n </div>\n <div *ngIf=\"\n chat?.action?.section_id == 'company_search' ||\n chat?.action?.section_id == 'user_search' ||\n chat?.action?.section_id == 'industry_company_search'\n \">\n <div class=\"box\">\n <div class=\"tiktokwrapper\">\n <div class=\"tiktokshell\" *ngFor=\"let user of chat?.action.users\">\n <div class=\"videoPhotobox\">\n <ng-conatiner *ngIf=\"user?.photoPath && !user.userVideosModel\">\n <img [src]=\"user?.photoPath\" />\n </ng-conatiner>\n <ng-conatiner *ngIf=\"user.userVideosModel\">\n <app-video-player *ngIf=\"user?.userVideosModel\" [isDev]=\"isDev\" [currentUserId]=\"userId\"\n [videoObj]=\"user?.userVideosModel\" [user]=\"user\" [eventId]=\"eventId\" type=\"1\">\n </app-video-player>\n </ng-conatiner>\n </div>\n\n <div class=\"noPhoto\" *ngIf=\"!user?.photoPath && !user.userVideosModel\">\n <h3>\n {{ user.firstName | slice: 0:1\n }}{{ user.lastName | slice: 0:1 }}\n </h3>\n </div>\n <div class=\"overlymask\" *ngIf=\"!user.userVideosModel\"></div>\n <div class=\"onshell-content\">\n <div class=\"title-shell\">\n <h3>{{ user.firstName }} {{ user.lastName }}</h3>\n <h3 class=\"companyName\">{{ user.company }}</h3>\n </div>\n <div class=\"button-shell\">\n <button class=\"Connectbtn\" (click)=\"connectToUser(user.userId)\">\n {{\n canConnect(user.userId)\n ? 'Connect'\n : canDisconnect(user.userId)\n ? 'Disconnect'\n : 'Request\n Sent'\n }}\n </button>\n <button class=\"schedulebtn\" (click)=\"scheduleMeetingWithUser(user)\">\n Schedule\n </button>\n </div>\n </div>\n </div>\n </div>\n </div>\n </div>\n <div *ngIf=\"chat?.action?.section_id == myUpcomingSessionAction\">\n <div class=\"agenda-items-wrapper\" class=\"agenda-items-wrapper\">\n <div class=\"list-view\">\n <div class=\"session-detail-wrapper card-background-session\"\n *ngFor=\"let upcomingSession of chat?.action.content\">\n <div class=\"thumbnail\">\n <img alt=\"Introduction to the Imaging Radar Academy\"\n src=\"https://s27media.azureedge.net/8008/profile_pic/453cea2c-feba-11ed-8c0b-00155d025b0a.png\"\n class=\"\" />\n <!---->\n <!---->\n <!----><button class=\"play-btn color-primary\"\n title=\"Play Session: Introduction to the Imaging Radar Academy\">\n <span class=\"material-icons notranslate\">\n play_circle_outline\n </span>\n <!---->\n </button>\n <!---->\n <!---->\n </div>\n <!---->\n <!---->\n <div class=\"content p-3\">\n <div class=\"d-flex justify-content-between align-items-center\">\n <div class=\"d-flex flex-column\">\n <p class=\"fs-xs mb-0 body-text-color\">\n {{\n upcomingSession.dateTimeRange.start\n | date\n : 'MM-dd-yyyy\n HH:mm'\n : 'UTC'\n }}\n -\n {{\n upcomingSession.dateTimeRange.end\n | date: 'MM-dd-yyyy HH:mm':'UTC'\n }}\n {{ upcomingSession.timeZone.id }}\n </p>\n <!---->\n <!---->\n <!-- <p class=\"fs-xs mb-2 color-secondary\" title=\"Session Type: Generative AI\">Generative AI </p> -->\n <!---->\n </div>\n <div class=\"d-flex align-items-center actions px-2\">\n <!---->\n <button (click)=\"\n performSessionAction(\n upcomingSession.id,\n 'view-session'\n )\n \" class=\"s27-btn-icon body-text-color\"\n title=\"View Session Information: Introduction to the Imaging Radar Academy\">\n <span class=\"material-icons notranslate\">\n remove_red_eye\n </span>\n </button>\n\n <button (click)=\"\n performSessionAction(\n upcomingSession.id,\n 'add-to-agenda'\n )\n \" class=\"s27-btn-icon body-text-color\">\n <span class=\"material-icons notranslate\"\n title=\"Add Session: Introduction to the Imaging Radar Academy to My agendaa\">\n event_available\n </span>\n </button>\n <!---->\n <!---->\n <!---->\n <!---->\n\n <button (click)=\"\n performSessionAction(upcomingSession.id, 'play')\n \" class=\"s27-btn-icon body-text-color\" title=\"Copy session link to share\">\n <span class=\"material-icons notranslate\">\n play_circle_outline\n </span>\n </button>\n <!---->\n </div>\n </div>\n <h2 class=\"body-text-color\">\n {{ upcomingSession.title }}\n </h2>\n <div class=\"session-description color-secondary\"\n [innerHTML]=\"sanitizeHtml(upcomingSession.description)\">\n </div>\n <ul class=\"speakers grid-2-cols\" *ngFor=\"let speakerId of upcomingSession.speakers\">\n <li class=\"\">\n <div class=\"image\" title=\"Blair Wunderlich\">\n <img alt=\"Blair Wunderlich\" [src]=\"speakers[speakerId]?.photoPath\" class=\"\" />\n <!---->\n <!---->\n <!---->\n </div>\n <!---->\n <div class=\"content pl-3\" style=\"text-transform: none\">\n <div class=\"mb-0 body-text-color fs-xs fw-500\">\n {{ speakers[speakerId]?.firstName }}\n {{ speakers[speakerId]?.lastName }}\n </div>\n <div class=\"color-secondary fs-xxs\">\n {{ speakers[speakerId]?.jobTitle }}\n </div>\n <div class=\"color-secondary fs-xxs\">\n {{ speakers[speakerId]?.company }}\n </div>\n </div>\n <!---->\n </li>\n </ul>\n <!---->\n </div>\n </div>\n </div>\n </div>\n </div>\n </div>\n\n <div class=\"chat bot\" *ngIf=\"isChatingWithAi && !executingWorkflow\">\n <div class=\"chat-box\">\n <div class=\"message\">\n <div class=\"o-media__body\">\n <div class=\"o-vertical-spacing\">\n <h3 class=\"blog-post__headline\">\n <span class=\"skeleton-box\" style=\"width: 55%\"></span>\n </h3>\n <p>\n <span class=\"skeleton-box\" style=\"width: 80%\"></span>\n <span class=\"skeleton-box\" style=\"width: 90%\"></span>\n <span class=\"skeleton-box\" style=\"width: 83%\"></span>\n <span class=\"skeleton-box\" style=\"width: 80%\"></span>\n </p>\n </div>\n </div>\n\n <div class=\"time-cta\">\n <div class=\"Icon_TimeSTamp\">\n <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"44\" height=\"44\" viewBox=\"0 0 44 44\">\n <g id=\"Group_121\" data-name=\"Group 121\" transform=\"translate(4843 -371)\">\n <g id=\"Ellipse_18\" data-name=\"Ellipse 18\" transform=\"translate(-4843 371)\" fill=\"#fcfcfc\"\n stroke=\"#dfdfdf\" stroke-width=\"1\">\n <circle cx=\"22\" cy=\"22\" r=\"22\" stroke=\"none\" />\n <circle cx=\"22\" cy=\"22\" r=\"21.5\" fill=\"none\" />\n </g>\n <g id=\"Group_120\" data-name=\"Group 120\" transform=\"translate(-4835.141 378.855)\">\n <g id=\"Group_1\" data-name=\"Group 1\" transform=\"translate(7.29 0)\">\n <path id=\"Path_1\" data-name=\"Path 1\"\n d=\"M93.774,41.324,98.757,44.2v5.753l-4.983,2.877-4.983-2.877V44.2l4.983-2.877m0-2.034L87.03,43.183V50.97l6.744,3.893,6.744-3.893V43.183L93.774,39.29Z\"\n transform=\"translate(-87.03 -39.29)\" fill=\"gray\" />\n </g>\n <g id=\"Group_2\" data-name=\"Group 2\" transform=\"translate(0 12.717)\">\n <path id=\"Path_2\" data-name=\"Path 2\"\n d=\"M52.374,113.544l4.983,2.877v5.753l-4.983,2.877-4.983-2.877v-5.753l4.983-2.877m0-2.034L45.63,115.4v7.787l6.744,3.893,6.744-3.893V115.4l-6.744-3.893Z\"\n transform=\"translate(-45.63 -111.51)\" fill=\"gray\" />\n </g>\n <g id=\"Group_3\" data-name=\"Group 3\" transform=\"translate(14.793 12.717)\">\n <path id=\"Path_3\" data-name=\"Path 3\"\n d=\"M136.384,113.544l4.983,2.877v5.753l-4.983,2.877-4.983-2.877v-5.753l4.983-2.877m0-2.034L129.64,115.4v7.787l6.744,3.893,6.744-3.893V115.4l-6.744-3.893Z\"\n transform=\"translate(-129.64 -111.51)\" fill=\"gray\" />\n </g>\n </g>\n </g>\n </svg>\n <div class=\"dateTime\" [style.color]=\"dateTimeColor ? '' : ''\">\n <span> {{ 'Assistant' }}</span> {{ chat?.time\n ? chat?.time\n : (dateTime.now | date: 'shortTime')\n }}\n </div>\n </div>\n </div>\n </div>\n </div>\n </div>\n <div class=\"chat bot\" *ngIf=\"loading\">\n <div class=\"chat-box\">\n <div class=\"message\">\n <div class=\"o-media__body\">\n <div class=\"o-vertical-spacing\">\n <h3 class=\"blog-post__headline\">\n <span class=\"skeleton-box\" style=\"width: 55%\"></span>\n </h3>\n <p>\n <span class=\"skeleton-box\" style=\"width: 80%\"></span>\n <span class=\"skeleton-box\" style=\"width: 90%\"></span>\n <span class=\"skeleton-box\" style=\"width: 83%\"></span>\n <span class=\"skeleton-box\" style=\"width: 80%\"></span>\n </p>\n </div>\n </div>\n\n <div class=\"time-cta\">\n <div class=\"Icon_TimeSTamp\">\n <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"44\" height=\"44\" viewBox=\"0 0 44 44\">\n <g id=\"Group_121\" data-name=\"Group 121\" transform=\"translate(4843 -371)\">\n <g id=\"Ellipse_18\" data-name=\"Ellipse 18\" transform=\"translate(-4843 371)\" fill=\"#fcfcfc\"\n stroke=\"#dfdfdf\" stroke-width=\"1\">\n <circle cx=\"22\" cy=\"22\" r=\"22\" stroke=\"none\" />\n <circle cx=\"22\" cy=\"22\" r=\"21.5\" fill=\"none\" />\n </g>\n <g id=\"Group_120\" data-name=\"Group 120\" transform=\"translate(-4835.141 378.855)\">\n <g id=\"Group_1\" data-name=\"Group 1\" transform=\"translate(7.29 0)\">\n <path id=\"Path_1\" data-name=\"Path 1\"\n d=\"M93.774,41.324,98.757,44.2v5.753l-4.983,2.877-4.983-2.877V44.2l4.983-2.877m0-2.034L87.03,43.183V50.97l6.744,3.893,6.744-3.893V43.183L93.774,39.29Z\"\n transform=\"translate(-87.03 -39.29)\" fill=\"gray\" />\n </g>\n <g id=\"Group_2\" data-name=\"Group 2\" transform=\"translate(0 12.717)\">\n <path id=\"Path_2\" data-name=\"Path 2\"\n d=\"M52.374,113.544l4.983,2.877v5.753l-4.983,2.877-4.983-2.877v-5.753l4.983-2.877m0-2.034L45.63,115.4v7.787l6.744,3.893,6.744-3.893V115.4l-6.744-3.893Z\"\n transform=\"translate(-45.63 -111.51)\" fill=\"gray\" />\n </g>\n <g id=\"Group_3\" data-name=\"Group 3\" transform=\"translate(14.793 12.717)\">\n <path id=\"Path_3\" data-name=\"Path 3\"\n d=\"M136.384,113.544l4.983,2.877v5.753l-4.983,2.877-4.983-2.877v-5.753l4.983-2.877m0-2.034L129.64,115.4v7.787l6.744,3.893,6.744-3.893V115.4l-6.744-3.893Z\"\n transform=\"translate(-129.64 -111.51)\" fill=\"gray\" />\n </g>\n </g>\n </g>\n </svg>\n <div class=\"dateTime\" [style.color]=\"dateTimeColor ? '' : ''\">\n <span>{{ 'Loading ...' }}</span>\n </div>\n </div>\n </div>\n </div>\n </div>\n </div>\n </div>\n </div>\n <!-- <div #chatMain></div> -->\n <div *ngIf=\"openWorkflowInput && selectedWorkflow && !executingWorkflow\" class=\"chatFooterWrapper\">\n <!-- new UI for Chat Message Section by Amit -->\n <div class=\"chat-footer-upt\">\n <div class=\"topinfo-containerbox\">\n <div class=\"agents_note_wrapper\">\n <div>\n <h6>{{selectedWorkflow?.Name}}</h6>\n {{selectedWorkflow?.Description}}\n </div>\n </div>\n\n <div class=\"agents_note_wrapper\">\n <button mat-icon-button class=\"closeButtonSource\" (click)=\"toggleWorkflows(false)\">\n <mat-icon>close</mat-icon>\n </button>\n </div>\n </div>\n <div class=\"bottombox-wrapper\">\n <!-- here i need to loop through all the input fields selectedWorkflow.Trigger.InputSchema and render the input fields -->\n <!-- Form for Workflow Inputs -->\n <form [formGroup]=\"workflowForm\" (ngSubmit)=\"onWorkflowSubmit()\" class=\"form-container\">\n <div *ngFor=\"let input of selectedWorkflow?.Trigger?.InputSchema\" class=\"form-group\">\n <label>{{ input.Label }}</label>\n\n <!-- Handle Text Input or Text Area based on requirement -->\n <textarea *ngIf=\"input.Type === 'string'\" formControlName=\"{{input.InputId}}\"\n [placeholder]=\"input.Placeholder\" [rows]=\"2\" [required]=\"input.Required\"\n class=\"form-control\"></textarea>\n\n <!-- Dropdown for Select Options -->\n <select *ngIf=\"input.Type === 'select'\" formControlName=\"{{input.InputId}}\" class=\"form-control\">\n <option *ngFor=\"let option of input.Options\" [value]=\"option.Value\">{{\n option.Label }}</option>\n </select>\n </div>\n\n <!-- Submit button aligned to the right -->\n <div class=\"form-group\">\n <button type=\"submit\" class=\"btn btn-primary submit-button\">Submit</button>\n </div>\n </form>\n </div>\n </div>\n\n\n <!-- new UI for Chat Message Section by Amit -->\n </div>\n <div *ngIf=\"!openWorkflowInput\" class=\"chatFooterWrapper\">\n <!-- new UI for Chat Message Section by Amit -->\n <div class=\"chat-footer-upt\">\n <div class=\"topinfo-containerbox\">\n <div class=\"agents_note_wrapper\">\n\n <div class=\"agents-dropdown-wrapper\">\n <div class=\"dropdown-wrapper\" (click)=\"toggleDropdown()\">\n <div class=\"dropdown-header\">\n <span>{{ getDropdownHeaderText() }}</span>\n <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"24\" height=\"24\" fill=\"none\" stroke=\"currentColor\"\n stroke-width=\"2\" viewBox=\"0 0 24 24\">\n <path d=\"M19 9l-7 7-7-7\" />\n </svg>\n </div>\n <div class=\"dropdown-menu\" *ngIf=\"isDropdownOpen\">\n <label (click)=\"onSelectAll()\">\n <input type=\"checkbox\" [checked]=\"areAllSelected()\" />\n All\n </label>\n <label *ngFor=\"let agent of agents\" (click)=\"onAgentChange(agent)\">\n <input type=\"checkbox\" [(ngModel)]=\"agent.selected\" />\n {{ agent.agentName }}\n </label>\n </div>\n </div>\n </div>\n\n </div>\n\n <div class=\"agents_note_wrapper\" *ngIf=\"!checkForCop29BotId()\">\n\n <div class=\"agents-dropdown-wrapper\">\n <div class=\"dropdown-wrapper\" (click)=\"toggleWorkflows()\">\n <div class=\"dropdown-header\">\n <svg stroke=\"currentColor\" fill=\"currentColor\" stroke-width=\"0\" viewBox=\"0 0 256 256\"\n class=\"h-5 w-5\" height=\"1.3em\" width=\"1.3em\" xmlns=\"http://www.w3.org/2000/svg\">\n <path\n d=\"M245.66,74.34l-32-32a8,8,0,0,0-11.32,11.32L220.69,72H192a74.49,74.49,0,0,0-28.35,6.73c-13.62,6.29-30.83,19.71-35.54,48-5.32,31.94-29.1,39.22-41,40.86a40,40,0,1,0,.18,16.06A71.65,71.65,0,0,0,108.13,178C121.75,172,139,158.6,143.89,129.31,150.65,88.77,190.34,88,192,88h28.69l-18.35,18.34a8,8,0,0,0,11.32,11.32l32-32A8,8,0,0,0,245.66,74.34ZM48,200a24,24,0,1,1,24-24A24,24,0,0,1,48,200Z\">\n </path>\n </svg> \n Workflows\n </div>\n <div class=\"dropdown-menu\" *ngIf=\"isWorkflowOpen\">\n <label *ngFor=\"let orgWorkflow of orgWorkflows\" (click)=\"onWorkflowSelected(orgWorkflow)\">\n {{ orgWorkflow.Name }}\n </label>\n </div>\n </div>\n </div>\n\n </div>\n\n </div>\n <div class=\"bottombox-wrapper\">\n <!-- <input [disabled]=\"isChatingWithAi\" type=\"text\" class=\"form-control-1 s27-scroll\"\n \n placeholder=\"Ask anything...\" [style.background]=\"formFieldBgColor ? formFieldBgColor : ''\"\n [style.color]=\"formFieldTextColor ? formFieldTextColor : ''\" [(ngModel)]=\"input\"\n (keyup.enter)=\"handleSubmit()\" #myInput /> -->\n <textarea [disabled]=\"isChatingWithAi\" class=\"form-control-1 s27-scroll chat-textarea\"\n placeholder=\"Ask anything...\" [(ngModel)]=\"input\" (keydown)=\"handleKeydown($event)\"\n (input)=\"adjustTextareaHeight($event)\" #myInput></textarea>\n\n <button (click)=\"toggleRecording()\" class=\"btn cta-chat mr-1\">\n <svg *ngIf=\"!isRecording\" stroke=\"currentColor\" fill=\"currentColor\" stroke-width=\"0\" viewBox=\"0 0 512 512\"\n height=\"1em\" width=\"1em\" xmlns=\"http://www.w3.org/2000/svg\">\n <!-- Mic Icon -->\n <path\n d=\"M256 320c53 0 96-43 96-96V96c0-53-43-96-96-96s-96 43-96 96v128c0 53 43 96 96 96zm144-96h-16c0 66.27-52.73 120-120 120s-120-53.73-120-120h-16c-17.67 0-32 14.33-32 32v32c0 53.87 38.13 100.64 91.21 112.27C210.13 457.77 231.58 464 256 464s45.87-6.23 65.79-17.73C374.87 388.64 416 341.87 416 288v-32c0-17.67-14.33-32-32-32z\">\n </path>\n </svg>\n <svg *ngIf=\"isRecording\" stroke=\"currentColor\" fill=\"currentColor\" stroke-width=\"0\" viewBox=\"0 0 24 24\"\n height=\"1em\" width=\"1em\" xmlns=\"http://www.w3.org/2000/svg\">\n <!-- Square Stop Icon -->\n <path d=\"M5 5h14v14H5z\"></path>\n </svg>\n </button>\n\n\n <button class=\"btn cta-chat rotate\" (click)=\"handleSubmit()\"\n [style.background]=\"sendButtonColor ? sendButtonColor : ''\"\n [style.color]=\"sendButtonTextColor ? sendButtonTextColor : ''\">\n <svg stroke=\"currentColor\" fill=\"currentColor\" stroke-width=\"0\" viewBox=\"0 0 512 512\" height=\"1em\"\n width=\"1em\" xmlns=\"http://www.w3.org/2000/svg\">\n <path\n d=\"M476.59 227.05l-.16-.07L49.35 49.84A23.56 23.56 0 0027.14 52 24.65 24.65 0 0016 72.59v113.29a24 24 0 0019.52 23.57l232.93 43.07a4 4 0 010 7.86L35.53 303.45A24 24 0 0016 327v113.31A23.57 23.57 0 0026.59 460a23.94 23.94 0 0013.22 4 24.55 24.55 0 009.52-1.93L476.4 285.94l.19-.09a32 32 0 000-58.8z\">\n </path>\n </svg>\n <!-- SEND -->\n </button>\n </div>\n </div>\n\n\n <!-- new UI for Chat Message Section by Amit -->\n </div>\n\n <div class=\"NoteTxt\">\n <div class=\"note\">\n <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"12.882\" height=\"12.883\" viewBox=\"0 0 12.882 12.883\">\n <path id=\"Icon_ion-shield-checkmark\" data-name=\"Icon ion-shield-checkmark\"\n d=\"M15.106,4.532a.46.46,0,0,0-.378-.424A20.132,20.132,0,0,1,8.881,2.291a.46.46,0,0,0-.379,0A20.132,20.132,0,0,1,2.655,4.108a.46.46,0,0,0-.378.424A11.3,11.3,0,0,0,2.98,9.4a10.049,10.049,0,0,0,2.06,3.235A10.516,10.516,0,0,0,8.521,15.1a.46.46,0,0,0,.345,0,10.516,10.516,0,0,0,3.481-2.465A10.049,10.049,0,0,0,14.4,9.4,11.3,11.3,0,0,0,15.106,4.532Zm-3.767,2.16L8.153,10.373a.46.46,0,0,1-.328.159H7.806a.46.46,0,0,1-.322-.131L6.069,9.014a.46.46,0,1,1,.644-.657L7.777,9.4,10.644,6.09a.46.46,0,0,1,.7.6Z\"\n transform=\"translate(-2.25 -2.25)\" fill=\"#06f\" />\n </svg>\n\n\n <span class=\"text\">Your personal or company information is kept\n private and secure\n within this chat.</span>\n </div>\n </div>\n </mat-drawer-content>\n </mat-drawer>\n <mat-drawer class=\"drawer edit-boxDrawer\" style=\"width: 45%\" #sourcesDrawer [position]=\"'end'\" [mode]=\"'over'\"\n [style.background]=\"\n 'linear-gradient(' + (bgGradient ? bgGradient.join(', ') : '') + ')'\n \">\n <mat-drawer-content>\n <div class=\"sourceDraweContainer\">\n <div class=\"container-fluid\">\n <button mat-icon-button class=\"closeButtonSource\" (click)=\"onCloseSource()\">\n <mat-icon>close</mat-icon>\n </button>\n <h1>{{ currentSourcesList?.length }} Sources</h1>\n <!-- <p>Tell me about latest news from Mistral about AI agents announcement done this month</p> -->\n <hr />\n <ul class=\"sources-list\">\n <li *ngFor=\"let item of currentSourcesList; let si = index\">\n <!-- <input type=\"checkbox\" id=\"source1\"> -->\n <div class=\"source-content\" (click)=\"openLinkInNewTab(item.link)\">\n <label for=\"source1\">\n <span class=\"source-title\"><span class=\"ml-1\">{{ si + 1\n }}.</span>{{ item.title }}</span>\n <span class=\"image-container\">\n <img class=\"relative block\" [src]=\"getFaviconUrl(item.link)\"\n [alt]=\"getDomainName(item.link) + ' favicon'\" />\n <span> {{ getDomainName(item.link) }}</span>\n </span>\n <span class=\"source-description\">{{ item.desc }}</span>\n </label>\n </div>\n </li>\n </ul>\n </div>\n </div>\n </mat-drawer-content>\n </mat-drawer>\n <mat-drawer class=\"drawer edit-boxDrawer\" style=\"width: 45%\" #editorsDrawer [position]=\"'end'\" [mode]=\"'push'\"\n [style.background]=\"\n 'linear-gradient(' + (bgGradient ? bgGradient.join(', ') : '') + ')'\n \">\n <mat-drawer-content>\n <lib-bot-html-editor *ngIf=\"isContentLoaded\" [editorContent]=\"currentMessageForEditor\"\n [isDocInEditMode]=\"isDocInEditMode\" [documentContent]=\"documentContent\" [conversationId]=\"conversationId\"\n [botId]=\"botId\"></lib-bot-html-editor>\n </mat-drawer-content>\n </mat-drawer>\n</mat-drawer-container>\n\n\n<div *ngIf=\"showWorkflowExecutionDetails\" class=\"modal\">\n <div class=\"modal-content\">\n <div class=\"close-wrapper\"><span class=\"close_pop\" (click)=\"closeModal()\">×</span></div>\n <div class=\"titleSection\">\n <!-- Workflow Title -->\n <h2>{{ workflowExecutionDetails.WorkflowName }}</h2>\n <!-- Workflow Title -->\n </div>\n <!-- Inputs Section -->\n <div class=\"inputs-section\">\n <h3>Inputs</h3>\n <ul>\n <li *ngFor=\"let input of objectToArray(workflowExecutionDetails.Inputs)\">\n {{ input.key }}: {{ input.value }}\n </li>\n </ul>\n </div>\n\n <!-- Actions Section (Displayed as Timeline) -->\n <div class=\"actions-section\">\n <h3>Agent Actions</h3>\n <div class=\"timeline\">\n <div *ngFor=\"let action of workflowExecutionDetails.Actions\" class=\"timeline-item\">\n <div class=\"timestamp-section\">\n <h4>{{ action.ActionName || action.Name }}</h4>\n <p><strong></strong> {{\n action.InsertTimeStamp }}</p>\n </div>\n <p [innerHTML]=\"processMessageForDisplay(action.Output)\"></p>\n <!-- <pre>{{ action.Output }}</pre> -->\n </div>\n </div>\n </div>\n\n <!-- Insert Timestamp -->\n <div class=\"timestamp-section\">\n <p><strong>Inserted At:</strong> {{\n workflowExecutionDetails.InsertTimeStamp }}</p>\n </div>\n </div>\n</div>",
|
|
1777
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
1778
|
+
styles: ["@import url(\"https://e1cdn.social27.com/digitalevents/liteversion/fonts/segoe-ui/stylesheet.css\");.sticky-header-chat{background:#fff;border-bottom:1px solid #ddd;padding:0 0 10px;position:sticky;top:-21px;transition:all 1s;z-index:100}::-webkit-scrollbar{width:5px}::-webkit-scrollbar-track{background:#f1f1f1}::-webkit-scrollbar-thumb,::-webkit-scrollbar-thumb:hover{background:#e5ccbc}body{overflow:hidden}.ios-device .drawer .chat-footer .form-control{font-size:16px}.hivegpt-chat-wrapper{background:transparent!important;height:100%;inset:0;opacity:0;position:fixed;visibility:hidden;z-index:999999}.hivegpt-chat-wrapper.mat-drawer-container-has-open{background:transparent!important;opacity:1;transition:all .3s;visibility:visible;z-index:999999}.hivegpt-chat-wrapper .mat-drawer:not(.mat-drawer-side){box-shadow:none}.hivegpt-chat-wrapper mat-drawer{background-color:#fff!important;background-image:none!important;width:100%}.hivegpt-chat-wrapper mat-drawer.full-width-drawer{max-width:100%}.hivegpt-chat-wrapper .mat-drawer-content{display:flex;flex-direction:column}.hivegpt-chat-wrapper .chat-header{padding:16px 40px;width:100%}.hivegpt-chat-wrapper .chat-header h2{font-family:Segoe UI,sans-serif;font-size:36px;font-weight:500;letter-spacing:-.72px;line-height:108%;margin:0;text-transform:uppercase}.hivegpt-chat-wrapper .chat-header .closeIcon{align-items:center;background:transparent;border:none;border-radius:50%;display:inline-flex;font-size:18px;height:35px;justify-content:center;outline:none;padding:0;position:absolute;right:12px;top:16px;width:35px}.hivegpt-chat-wrapper .chat-main{display:flex;flex:1;flex-direction:column;justify-content:space-between;overflow-y:auto;width:100%}.hivegpt-chat-wrapper .chat-main .innerChat{overflow-y:auto;padding:20px 40px 10px;width:100%}.hivegpt-chat-wrapper .chat-main .chat-box{max-width:80%;width:100%}.hivegpt-chat-wrapper .chat-main .chat-box .message{margin-left:70px;margin-top:20px;min-height:60px;padding:0 20px 0 0;position:relative}.hivegpt-chat-wrapper .chat-main .chat-box .message p{color:#000;font-family:Segoe UI,sans-serif;font-size:16px;font-style:normal;font-weight:500;line-height:160%;margin:0;text-align:left;white-space:pre-line}.hivegpt-chat-wrapper .chat-main .chat-box .message p a{color:#17235b!important;cursor:pointer!important;font-weight:700;text-decoration:underline}.hivegpt-chat-wrapper .chat-main .chat-box .message .cta{align-items:end;bottom:-7px;display:inline-flex;gap:10px;grid-gap:10px;position:relative;right:-10px;z-index:5}.hivegpt-chat-wrapper .chat-main .chat-box .message .cta button{background:transparent;border:none;color:#566563;cursor:pointer;padding:0;transition:all .3s}.hivegpt-chat-wrapper .chat-main .chat-box .message .cta button i{display:inline-block}.hivegpt-chat-wrapper .chat-main .chat-box .message .cta button:hover{color:#17235b}.hivegpt-chat-wrapper .chat-main .chat-box .message .cta button.up:hover i{animation:thumbsUpAnimation .5s ease-in-out;animation-fill-mode:forwards}.hivegpt-chat-wrapper .chat-main .chat-box .message .cta button.down:hover i{animation:thumbsDownAnimation .5s ease-in-out;animation-fill-mode:forwards}.hivegpt-chat-wrapper .chat-main .chat{margin-bottom:20px}.hivegpt-chat-wrapper .chat-main .chat.user{text-align:right}.hivegpt-chat-wrapper .chat-main .chat.user .chat-box{margin-left:auto}.hivegpt-chat-wrapper .chat-main .chat.user .chat-box .message{background:linear-gradient(96deg,#8b4ead -10.61%,#761c79 84.59%);border-radius:20px 20px 0 20px;color:#fff}.hivegpt-chat-wrapper .chat-main .chat.user .chat-box .message p{color:#fff;text-align:left}.hivegpt-chat-wrapper .chat-main .chat.user .dateTime{text-align:right}.hivegpt-chat-wrapper .chat-main .chat.user .time-cta{justify-content:flex-end}.hivegpt-chat-wrapper .chat-main .chat .Icon_TimeSTamp{align-content:center;align-items:center;display:flex;justify-content:left;margin:0 -60px;width:auto}.hivegpt-chat-wrapper .chat-main .chat .dateTime{color:#333232;font-size:15px;font-style:normal;font-weight:300;line-height:140%}.hivegpt-chat-wrapper .chat-main .chat .dateTime span{color:#06f;font-size:15px;font-style:normal;font-weight:500;line-height:140%;margin-left:15px;margin-right:5px}.hivegpt-chat-wrapper .chat-main .chat:last-of-type{margin-bottom:0}.hivegpt-chat-wrapper .chatFooterWrapper{background:#fff;border:2px solid hsla(0,0%,85.5%,.5882352941176471);border-radius:10px;box-shadow:2px 0 5px #e1e1e1;margin:0 auto 15px;margin-top:10px!important;transition:all .5s;width:75%}.hivegpt-chat-wrapper .chatFooterWrapper:hover{border:2px solid hsla(0,0%,72.2%,.5882352941176471);box-shadow:2px 0 4px #ddd}.hivegpt-chat-wrapper .chatFooterWrapper .chat-footer-upt{padding:4px}.hivegpt-chat-wrapper .chatFooterWrapper .note{align-items:center;background:rgba(27,117,187,.050980392156862744);border-radius:15px;color:#000;display:inline-flex;font-size:12px;gap:8px;line-height:1;margin:0 auto 4px;padding:10px 25px}.hivegpt-chat-wrapper .chatFooterWrapper .note a{text-transform:capitalize}.hivegpt-chat-wrapper .chatFooterWrapper .note i{font-size:18px}.hivegpt-chat-wrapper .chatFooterWrapper .note i svg{height:18px;width:18px}.hivegpt-chat-wrapper .chatFooterWrapper .note span{flex:1;gap:4px;line-height:1.3}.hivegpt-chat-wrapper .chat-footer{align-items:center;display:flex;gap:8px;justify-content:space-between;padding:0;position:relative}.hivegpt-chat-wrapper .chat-footer .form-control{background:#fff!important;border:0;line-height:21px;outline:0;padding:10px;position:relative;width:100%}.hivegpt-chat-wrapper .chat-footer .form-control::-moz-placeholder{color:#6c7a78}.hivegpt-chat-wrapper .chat-footer .form-control::placeholder{color:#6c7a78}.hivegpt-chat-wrapper .chat-footer .form-control:focus{border-color:#e5ccbc}.hivegpt-chat-wrapper .chat-footer .cta-footer{align-items:center;display:flex;gap:8px;justify-content:space-between;margin-bottom:10px;position:absolute;right:15px;text-align:right}.hivegpt-chat-wrapper .chat-footer .cta-footer .btn{color:#000;font-weight:500;gap:8px;max-width:150px;padding:0}.hivegpt-chat-wrapper .chat-footer .cta-footer .cta-chat{align-items:center;background:transparent!important;border:none;border-radius:0;box-shadow:0 1px 2px 0 rgba(16,24,40,.05);display:inline-flex;font-size:20px;height:auto;justify-content:center;width:auto}.hivegpt-chat-wrapper .chat-footer .cta-footer .cta-chat:hover{opacity:.8}.hivegpt-chat-wrapper .chat-footer .cta-footer .cta-again{background:#17235b;border:1px solid #17235b;color:#fff}.hivegpt-chat-wrapper .cta-faqs{align-items:flex-end;display:flex;flex-direction:column;flex-wrap:wrap;gap:8px;margin-left:auto;max-width:80%;padding:10px 0 0}.hivegpt-chat-wrapper .cta-faqs .cta{background:transparent;border:1px solid #c9a893;border-radius:20px 20px 0 20px;color:#333;cursor:pointer;font-family:Segoe UI,sans-serif;font-size:14px;font-style:normal;font-weight:500;line-height:160%;margin:0;min-height:44px;padding:12px 20px;text-align:left;text-decoration:none;transition:all .3s;white-space:pre-line}.spinner{align-items:center;display:flex;gap:2px;justify-content:center}.spinner>div{animation:bouncedelay 1.4s ease-in-out infinite;animation-fill-mode:both;background-color:#173330;border-radius:100%;display:inline-block;height:5px;width:5px}.spinner .bounce1{animation-delay:-.32s}.spinner .bounce2{animation-delay:-.16s}@keyframes bouncedelay{0%,80%,to{-webkit-transform:scale(0);transform:scale(0)}40%{-webkit-transform:scale(1);transform:scale(1)}}.time-cta{align-items:center;display:flex;gap:8px;justify-content:start;margin-top:5px}@keyframes thumbsUpAnimation{0%,to{transform:translateY(0)}50%{transform:translateY(-8px)}}@keyframes thumbsDownAnimation{0%,to{transform:translateY(0)}50%{transform:translateY(3px)}}@media (max-width:767px){.hivegpt-chat-wrapper .chat-main .innerChat{padding:0 24px 10px}.hivegpt-chat-wrapper .chat-footer{padding:10px 24px}.hivegpt-chat-wrapper .chat-footer .cta-footer .cta-chat{max-width:100%}.hivegpt-chat-wrapper .chat-footer .form-control{height:80px}.hivegpt-chat-wrapper .chat-header .closeIcon{height:28px;right:8px;top:8px;width:28px}.hivegpt-chat-wrapper .chat-header .closeIcon span{font-size:14px}.hivegpt-chat-wrapper .chat-header{padding:10px 24px}.hivegpt-chat-wrapper .chat-header h2{font-size:20px}.cta-faqs{padding:10px 0 0}}.body-overflow-hidden{overflow:hidden}.chat-button{align-items:center;background:#17235b;border:#17235b;border-radius:50%;color:#fff;display:inline-flex;font-size:24px;height:50px;justify-content:center;width:50px}textarea{caret-color:#000}.labelChat{font-size:14px;font-weight:400;margin:0 0 10px}.chatType h4{color:#566563;text-align:center}.chatType ul{align-items:center;background:#fff;border-radius:10px;box-shadow:0 .3px .9px rgba(0,0,0,.12),0 1.6px 3.6px rgba(0,0,0,.16);display:flex;justify-content:center;list-style:none;margin:0 0 20px;padding:4px}.chatType ul li{flex:1}.chatType ul li button{align-items:center;background:#fff;border:none;border-radius:10px;font-weight:600;min-height:48px;padding:.375rem;text-align:center;text-shadow:1px 0 rgba(0,0,0,.2);width:100%}.chatType ul li button.active{background:linear-gradient(96deg,#761c79 -10.61%,#761c79 84.59%);box-shadow:0 1px 2px 0 rgba(16,24,40,.05);color:#fff}.cta_suggestions{align-items:center;display:flex;flex-wrap:wrap;gap:.5rem;margin-bottom:20px}.cta_suggestions button{background:#fff;border:1px solid #174ae4;border-radius:10px;box-shadow:0 1.6px 3.6px 0 rgba(0,0,0,.13),0 .3px .9px 0 rgba(0,0,0,.1);color:#1543cd;font-size:14px;font-weight:600;line-height:1.2;padding:8px 12px;position:relative;text-align:left;transition:all .3s}.cta_suggestions button:hover{background:#eff3ff}.balanced .chat-footer .cta-footer .cta-chat,.balanced .chat-main .chat.user .chat-box .message,.balanced .chatType ul li button.active{color:#000}.balanced .chat-main .innerChat .title p span{color:#06f}.balanced mat-drawer{background-image:linear-gradient(180deg,rgba(88,190,251,.05) 60%,rgba(0,102,255,.2) 96.27%)}.balanced .cta_suggestions button:hover{border:1px solid #06f}.precise .chat-footer .cta-footer .cta-chat,.precise .chat-main .chat.user .chat-box .message{background:linear-gradient(96deg,#69ca6d -10.61%,#4caf50 84.59%)}.precise .chatType ul li button.active{background:linear-gradient(96deg,#4caf50 -10.61%,#4caf50 84.59%);color:#fff}.precise .chat-main .innerChat .title p span{color:#4caf50}.precise mat-drawer{background-image:linear-gradient(180deg,rgba(76,175,80,.05) 60%,rgba(76,175,80,.3) 96.27%)}.precise .cta_suggestions button:hover{border:1px solid #4caf50}.title{margin-bottom:20px}.title h2{font-size:22px;margin:0}.title h2 span{align-items:center;color:#000;display:inline-flex;gap:10px}.title h2 i{color:#06f;font-size:30px;line-height:1}.title h2 i svg{height:30px;width:30px}.title p{font-weight:600;margin:0}.title p span{color:#06f}.agenda-items-wrapper{padding-bottom:15px;padding-top:15px}@media (max-width:576px){.list-view .session-detail-wrapper{border:none;flex-direction:column}}.card-background-session{background:#fff;border-radius:8px}.card-background-session .body-text-color{color:#111!important}.card-background-session h2{-webkit-box-orient:vertical;-webkit-line-clamp:1;display:-webkit-box;font-size:20px;margin-bottom:8px;overflow:hidden}.card-background-session .session-description{-webkit-box-orient:vertical;-webkit-line-clamp:2;color:#111!important;display:-webkit-box;font-size:14px;overflow:hidden}.card-background-session .color-secondary{color:#111!important}.card-background-session p{font-size:14px}.list-view .session-detail-wrapper .s27-btn-icon{background:transparent;border:transparent}.list-view .session-detail-wrapper{border-left:3px solid transparent;display:flex;margin-bottom:16px}.thumbnail{align-items:center;display:flex;height:160px;justify-content:center;min-width:160px;position:relative;width:160px}.thumbnail img{-o-object-fit:cover;height:100%;object-fit:cover;width:100%}@media (max-width:576px){.thumbnail{height:160px;min-height:unset;width:100%}}.thumbnail .play-btn{align-items:center;background-color:transparent;border:0;bottom:0;display:flex;font-size:60px;justify-content:center;left:0;position:absolute;right:0;top:0;width:100%}.thumbnail .play-btn span{font-size:80px;text-shadow:0 0 14px rgba(74,74,74,.45)}.content{flex-grow:1}.actions{background-color:transparent!important}.speakers{margin-bottom:0;margin-top:10px;padding:0}.speakers li{align-items:unset;display:flex}.speakers li .content{font-size:12px!important}.speakers .image{border-radius:100%;height:40px;min-width:40px;overflow:hidden;width:40px}.speakers img{-o-object-fit:cover;height:100%;object-fit:cover;width:100%}.grid-2-cols{display:grid;grid-gap:15px;grid-template-columns:calc(55% - 10px) calc(50% - 10px);padding-right:20px}@media (max-width:768px){.grid-2-cols{grid-template-columns:calc(50% - 10px) calc(50% - 10px)}}@media (max-width:575px){.grid-3-cols{grid-template-columns:100%}}.quick-prompts-extended{align-items:flex-start!important;margin-left:0!important}.border-shape .s27-scroll::-webkit-scrollbar{border-radius:30px;width:3px}.border-shape .s27-scroll::-webkit-scrollbar-track{background:#f1f1f1;border-radius:30px}.border-shape .s27-scroll::-webkit-scrollbar-thumb{background:#888;border-radius:30px}.box{display:table;height:275px;margin:10px 0;width:100%}.tiktokwrapper{display:grid;gap:10px;grid-template-columns:repeat(2,1fr);height:100%}.tiktokwrapper .tiktokshell{background:#3d2b8f;border:2px solid #fff;border-radius:5px;box-shadow:0 0 6px #494949;height:100%;min-height:275px;min-width:160px;position:relative;width:100%}.tiktokwrapper .overlymask{background-image:url(https://e1cdn.social27.com/digitalevents/HiveGpt/screen-overlay.png);background-position:0 0;bottom:0;height:100%;left:0;position:absolute;width:100%;z-index:6}.tiktokwrapper .videoPhotobox{bottom:0;height:272px;left:0;overflow:hidden;position:absolute;width:auto;z-index:6}.tiktokwrapper .videoPhotobox video{-o-object-fit:cover;border-radius:0;cursor:pointer;height:270px;object-fit:cover;outline:0;transition:.3s ease-in-out;width:100%}.tiktokwrapper .videoPhotobox img{-o-object-fit:cover;height:100%;object-fit:cover;width:100%}.tiktokwrapper .playBtn{align-items:center;border:none;cursor:pointer;display:flex;height:40px;justify-content:center;left:0;margin:0 auto;position:absolute;right:0;top:105px;transition:all 1s;width:40px;z-index:10}.tiktokwrapper .playBtn:hover{transform:scale(1.2)}.tiktokwrapper .noPhoto{align-items:center;border:none;cursor:pointer;display:flex;height:40px;justify-content:center;left:0;margin:0 auto;position:absolute;right:0;top:105px;transition:all 1s;z-index:6}.tiktokwrapper .noPhoto h3{color:#fff;font-size:46px}.tiktokwrapper .onshell-content{bottom:10px;left:5px;position:absolute;z-index:10}.tiktokwrapper .onshell-content .title-shell{margin:0 10px}.tiktokwrapper .onshell-content h3{color:#fff;font-size:13px;font-weight:500}.tiktokwrapper .onshell-content .companyName{color:#eaeaea;font-size:12px;font-weight:400}.tiktokwrapper .onshell-content .button-shell button{background:#4e4e4e;border:none;border-radius:2px;color:#fff;font-size:11px;margin:0 1px;padding:4px 7px;text-transform:capitalize}.tiktokwrapper .onshell-content .Connectbtn{background:linear-gradient(149deg,#06f,#06f)!important}.skeleton-box{background-color:#dddbdd;display:inline-block;height:1em;overflow:hidden;position:relative}.skeleton-box:after{animation:shimmer 2s infinite;background-image:linear-gradient(90deg,hsla(0,0%,100%,0),hsla(0,0%,100%,.2) 20%,hsla(0,0%,100%,.5) 60%,hsla(0,0%,100%,0));bottom:0;content:\"\";left:0;position:absolute;right:0;top:0;transform:translateX(-100%);z-index:0}@keyframes shimmer{to{transform:translateX(100%)}}.blog-post__headline{font-size:1.25em;font-weight:700}.blog-post__meta{color:#6b6b6b;font-size:.85em}.o-media{display:flex}.o-media__body{flex-grow:1;margin-left:1em}.o-vertical-spacing>*+*{margin-top:.75em}.o-vertical-spacing--l>*+*{margin-top:2em}.copy{background:none;border:none;cursor:pointer;padding:5px;transition:transform .2s ease}.copy.active{transform:scale(1.1)}.copy svg{fill:#566563;height:18px;width:18px}.copyBox{background:#f7f7f7;border-radius:13px;color:#566563;display:flex;float:right;gap:12px;padding:5px 10px;position:relative;width:135px}.copyBox button{background:transparent;border:none;color:#566563;cursor:pointer;padding:0;transition:all .3s}.copyBox button i{display:inline-block}.copyBox button:hover{color:#17235b}.copyBox button.up:hover i{animation:thumbsUpAnimation .5s ease-in-out;animation-fill-mode:forwards}.copyBox button.down:hover i{animation:thumbsDownAnimation .5s ease-in-out;animation-fill-mode:forwards}.din{display:inline-flex}.chatFooterWrapper{align-items:center;background-color:#f5f5f5;border-top:1px solid #ccc;flex-direction:column;justify-content:center}.chat-footer{background:#fff;flex-direction:column;margin-bottom:10px}.chat-footer,.topinfo-containerbox{align-items:center;display:flex;width:100%}.topinfo-containerbox{background:#f9f9f9;border-bottom:1px solid #efefef;justify-content:space-between;margin:0;padding:5px 10px 8px}.agents_note_wrapper{display:flex;justify-content:space-around}.bottombox-wrapper{display:flex;padding:10px;width:100%}.dropdown-wrapper{margin-right:10px;position:relative}.dropdown-header{align-items:center;background:#fff;border:1px solid #ddd;border-radius:48px;color:#414141!important;cursor:pointer;display:flex;font-size:14px;margin-bottom:0;padding:.5rem 1.5rem;white-space:nowrap}.dropdown-header span{margin-right:8px}.dropdown-menu{background-color:#fff;border:1px solid #ededed;border-radius:5px;bottom:100%!important;box-shadow:0 2px 4px rgba(0,0,0,.1);display:block;left:0;margin-bottom:10px;max-height:200px;overflow-y:auto;padding:0;position:absolute;top:auto;width:230px;z-index:1000}.dropdown-menu label{cursor:pointer;display:block;font-size:16px;padding:5px 15px}.dropdown-menu label input{height:16px;width:16px}.dropdown-menu label:hover{background-color:#f0f0f0}.border-shape{flex-grow:1}.form-control-1{border:1px solid #ddd;border-radius:5px;padding:10px;width:100%}.cta-footer,.text-left .note-section{align-items:center;display:flex}.text-left .note-section{background:#fff;border-radius:5px;box-shadow:0 2px 4px rgba(0,0,0,.1);margin-top:10px;max-width:800px;padding:10px;width:100%}.text-left .note{align-items:center;color:#555;display:flex}.text-left .note i{margin-right:8px}.text-left .note .text{font-size:14px}.card-container{display:flex;gap:15px}.custom-card{background:#fffefe;border:1px solid #ddd;border-radius:.25rem;box-shadow:0 4px 8px rgba(0,0,0,.1);margin-bottom:10px;overflow:hidden;width:18rem}.custom-card .card-body{padding:10px}.custom-card .card-title{font-size:1.25rem;font-weight:700}.custom-card .card-text{font-size:1rem;text-align:left}.custom-card .btn-primary{background-color:#007bff;border:none;border-radius:.25rem}.custom-card .card-footer{background-color:#f8f9fa;color:#6c757d;padding:10px;text-align:center}.list-container{list-style:none;padding:0}.list-container li{background:#f5f5f5;border-radius:8px;font-size:13px;margin-bottom:5px;padding:6px 12px}.list-container li:hover{color:#06f;cursor:pointer}.collapsible-container{margin-bottom:5px;overflow:hidden;width:100%}.collapsible-header{cursor:pointer;display:flex;padding:15px}.collapsible-header .header-icon{font-size:20px;margin-right:10px}.collapsible-header .header-title{flex:1;font-size:18px}.collapsible-header .toggle-icon{font-size:18px;margin-left:18px}.collapsible-content{background-color:#f8f9fa;color:#333;padding:15px;width:100%}.collapsible-content.show{display:block}.researchingCard{margin:0 auto}.card-header{background:#eee;border-bottom:0;border-radius:8px 8px 0 0;display:flex!important;padding:8px 15px;width:auto}.icon{font-size:20px;line-height:5px}.rotate{transform:rotate(180deg)}.collapse{display:none}.uptList{background:rgba(245,222,179,.1411764705882353);border-radius:0 0 10px 10px;margin-bottom:20px!important}.list-group-item{color:#000;font-size:13px}.sources-container{align-items:flex-start;display:flex;gap:15px}.source-card{background-color:#f0f3f5;border-radius:10px;box-sizing:border-box;cursor:pointer;display:flex;flex-direction:column;justify-content:space-between;padding:15px;position:relative;transition:box-shadow .3s ease;width:100%}.popup{background-color:#fff;border-radius:5px;box-shadow:0 4px 8px rgba(0,0,0,.2);left:50%;opacity:0;padding:10px;position:absolute;top:100%;transform:translateX(-50%) translateY(-10px);transition:opacity .3s ease,transform .3s ease;visibility:hidden;white-space:normal;width:100%;z-index:10}.popup h5{font-size:14px;font-weight:600;line-height:1.2;margin:5px 0 10px}.popup p{font-size:12px;line-height:1.4;margin:0}.popup h5:hover{color:#007bff;cursor:pointer}.popup .source-url{color:#000;text-decoration:none}.popup .source-url:hover{color:#007bff;cursor:pointer;text-decoration:underline}.source-card:hover .popup{opacity:1;transform:translateX(-50%) translateY(-15px);visibility:visible}.source-card:hover{box-shadow:0 4px 8px rgba(0,0,0,.1);transform:scale(1.05)}.source-title{-webkit-box-orient:vertical;-webkit-line-clamp:2;display:-webkit-box;font-size:14px;font-weight:500;height:55px;line-height:1.5;overflow:hidden;text-align:left;text-overflow:ellipsis}.source-title img{margin-left:10px;width:20px}.source-url{align-items:center;color:#6c757d;display:flex;font-size:12px;text-align:left}.source-url img{border-radius:50%;height:16px;margin-right:5px;width:16px}.sourceDraweContainer .container{background-color:#fff;padding:20px}.sourceDraweContainer .sources-list{list-style:none;padding:0}.sourceDraweContainer .sources-list li{align-items:flex-start;display:flex;margin-bottom:15px}.sourceDraweContainer .sources-list input[type=checkbox]{flex-shrink:0;margin-right:15px;margin-top:8px}.sourceDraweContainer .source-content{background-color:#f5f2f2;border:1px solid #ddd;border-radius:8px;box-shadow:0 2px 4px rgba(0,0,0,.1);cursor:pointer;flex:1;padding:12px}.sourceDraweContainer .source-content:hover{background:#ccc}.sourceDraweContainer .source-title{display:block;font-size:1rem;font-weight:500;height:auto!important;margin-bottom:4px}.sourceDraweContainer .source-description{display:block;font-size:.875rem}.sourceDraweContainer .image-container{align-items:center;display:flex;margin:10px 0}.sourceDraweContainer .image-container img{-o-object-fit:cover;border:1px solid #ddd;border-radius:50%;height:16px;margin-right:5px;object-fit:cover;width:16px}.sourceDraweContainer .image-container span{color:#555;font-size:13px}.closeButtonEditor{border:0;border-radius:100%;height:32px;padding:3px 0 0;position:absolute;right:10px;top:5px;width:32px}.closeButtonSource{background:none!important;border-color:transparent!important;box-shadow:none!important;color:inherit;cursor:pointer;float:right;margin-top:20px;transition:color .2s ease-in-out}.closeButtonSource.closeplaygroundbutton{display:none!important}.graph-img{background:hsla(0,0%,86.7%,.23137254901960785);border-radius:15px;padding:15px;width:70%}.chat-textarea{background-color:#fff;border:none;box-sizing:border-box;font-size:15px;height:30px;line-height:1.5;overflow-y:hidden;padding:10px;resize:none;transition:all 1s;width:100%}.chat-textarea:focus,.chat-textarea:hover{height:60px}.chat-textarea:focus{outline:none}.fixed-btn{background-color:#000;border:none;border-radius:8px 8px 0 0;color:#fff;cursor:pointer;font-size:16px;padding:5px 12px;position:fixed;right:-22px;top:46%;transform:translateY(-50%) rotate(270deg);transform-origin:center;transition:all .5s;z-index:1000000}.fixed-btn:hover{background-color:#5b5b5b}.fixed-btn-close{background-color:#000;border:none;border-radius:8px 8px 0 0;color:#fff;cursor:pointer;font-size:16px;padding:5px 16px;position:fixed;right:549px;top:46%;transform:translateY(-50%) rotate(270deg);transform-origin:center;transition:all .5s;z-index:1000000}.fixed-btn-close:hover{background-color:#5b5b5b}.btn.rotate{transform:rotate(-15deg)}.btn.rotate:hover{transform:rotate(0deg)}.btn.cta-chat{align-items:center;background:#f3f3f3;border:none;border-radius:50%;color:#666;cursor:pointer;display:flex;height:40px;justify-content:center;margin:0 auto;padding:5px;text-align:center;transition:all .5s;width:40px}.btn.cta-chat:hover{background:#d7d7d7;color:#666}.btn.cta-chat svg{vertical-align:middle}.chat-footer-upt{padding:4px}.workflowbox{align-items:center;border:1px solid transparent;border-radius:48px;color:#414141!important;cursor:pointer;display:flex;font-size:14px;margin-bottom:0;padding:.5rem 1.5rem;transition:all .5s;white-space:nowrap}.workflowbox:hover{background:#fff;border:1px solid #ddd}.workflowbox svg{margin:0 10px}.edit-boxDrawer{border-left:1px solid #ddd;box-shadow:1px 1px 15px hsla(0,0%,86.7%,.7686274509803922)!important}.edit-boxDrawer mat-drawer-content,ng-deep .edit-boxDrawer mat-drawer-content{margin-left:0!important;margin-right:0!important}.SearchTitle{font-size:16px!important;text-transform:capitalize}.exicution{margin:26px 0!important}.new-conversationbutton{align-items:center;background:#f5f5f5;border:1px solid #e3e3e3;border-radius:10px;cursor:pointer;display:flex;font-size:14px;justify-content:space-around;padding:6px;position:absolute;right:88px;top:10px;transition:all .5s;width:120px;z-index:1000}.new-conversationbutton:hover{background:#eee}.NoteTxt{margin:0 auto}.NoteTxt .text{margin:0 5px}.form-container{width:100%}.progress-container{align-items:center;display:flex}.circular-loader{border:4px solid rgba(0,0,0,.1);border-radius:50%;box-sizing:border-box;height:50px;position:relative;width:50px}.loader-spinner{animation:rotate-loader 1s linear infinite;border:2px solid #2196f3;border-radius:50%;border-top-color:transparent;box-sizing:border-box;height:100%;left:0;position:absolute;top:0;width:100%}.loader-text{color:#333;font-size:12px;font-weight:700;left:50%;position:absolute;top:50%;transform:translate(-50%,-50%)}.loader-label{color:#333;font-size:16px;margin-left:20px}.checkmark{align-items:center;display:flex;height:100%;justify-content:center;width:100%}.checkmark-circle{animation:stroke .6s ease-in-out forwards;stroke:#4caf50;stroke-dasharray:166;stroke-dashoffset:166;stroke-width:4}.checkmark-check{animation:stroke-check .4s ease-in-out .4s forwards;stroke:#4caf50;stroke-dasharray:48;stroke-dashoffset:48;stroke-linecap:round;stroke-linejoin:round;stroke-width:4}@keyframes stroke{to{stroke-dashoffset:0}}@keyframes stroke-check{to{stroke-dashoffset:0}}@keyframes rotate-loader{0%{transform:rotate(0deg)}to{transform:rotate(1turn)}}@keyframes checkmark-animation{0%{opacity:0;transform:scale(0)}to{opacity:1;transform:scale(1)}}.circular-loader.completed .loader-spinner{animation:none;transform:rotate(1turn)}.icon-button{background-color:transparent;border:none;color:#333;cursor:pointer;font-size:24px}.icon-button:focus{outline:none}.icon-button:hover{color:#007bff}.modal{background-color:rgba(0,0,0,.4);display:block;height:100%;left:0;padding-top:0;position:fixed;top:0;width:100%;z-index:1000001}.modal-content{background-color:#fff;border-radius:8px;box-shadow:0 4px 8px rgba(0,0,0,.1);height:600px;margin:5% auto;padding:20px;position:relative;width:82%}.close{color:#aaa;float:right;font-size:28px;font-weight:700}.close:focus,.close:hover{color:#000;cursor:pointer;text-decoration:none}.SearchTitle.user{text-transform:none!important}.SearchTitle.user,.SearchTitle.user h2,.SearchTitle.user p{font-size:30px!important}.title_chat{display:flex;margin:0;padding:0}.title_chat h2{align-items:center;display:flex;font-size:20px;gap:10px;margin:10px 0}.small-title{font-size:12px;margin:2px 0}.titleSection{margin:0}.titleSection h2{color:#000;font-size:20px;margin:0}.inputs-section{background-color:#f7f7f7;border-radius:5px;margin:0 0 10px;padding:10px 15px 0}.inputs-section h3{font-size:16px}.actions-section{background-color:#f9f9f9;border-radius:5px;height:500px;margin-bottom:20px;overflow-y:auto;padding:15px}.timeline{margin-bottom:20px;padding-left:40px;position:relative}.timeline:before{border-right:2px dashed #cecece;content:\"\";height:100%;left:19px;position:absolute}.timeline-item{margin-bottom:20px;position:relative}.timeline-item:before{background-color:#007bff;border-radius:50%;content:\"\";height:20px;left:-30px;position:absolute;top:0;width:20px;z-index:1}.timeline-item h4{color:#000;font-size:16px;font-weight:700;margin:0}.timeline-item pre{background-color:#fff;border:1px solid #ddd;border-radius:5px;padding:10px;white-space:pre-wrap}.timestamp-section{color:#666;font-style:italic;justify-content:space-between}.mic-btn{background-color:#ff4d4d;border:none;border-radius:50%;color:#fff;cursor:pointer;font-size:1.5em;padding:10px}.mic-btn:active{background-color:#f66}.actions-section h3{font-size:16px}.close-wrapper{display:flex;justify-content:right;position:absolute;right:22px;top:0;width:100%}.close_pop{color:#aaa;cursor:pointer;font-size:30px;font-weight:400;justify-content:center}.close_pop,.user-Box{align-items:center;display:flex}.bards{position:absolute;right:0;top:20px}::ng-deep .code-container{margin:20px 0;position:relative}::ng-deep .copy-button{background-color:#007bff;border:none;border-radius:4px;color:#fff;cursor:pointer;padding:5px 10px;position:absolute;right:10px;top:10px}::ng-deep .copy-button:hover{background-color:#0056b3}::ng-deep .code_block.diff{background-color:#f8f8f8;border-left:4px solid #ccc;overflow:auto;padding:10px}"]
|
|
1779
|
+
},] }
|
|
1780
|
+
];
|
|
1781
|
+
ChatDrawerComponent.ctorParameters = () => [
|
|
1782
|
+
{ type: FormBuilder },
|
|
1783
|
+
{ type: BotsService },
|
|
1784
|
+
{ type: ChangeDetectorRef },
|
|
1785
|
+
{ type: HttpClient },
|
|
1786
|
+
{ type: DomSanitizer },
|
|
1787
|
+
{ type: ElementRef },
|
|
1788
|
+
{ type: Renderer2 },
|
|
1789
|
+
{ type: SocketService },
|
|
1790
|
+
{ type: ConversationService }
|
|
1791
|
+
];
|
|
1792
|
+
ChatDrawerComponent.propDecorators = {
|
|
1793
|
+
chatMain: [{ type: ViewChild, args: ['chatMain',] }],
|
|
1794
|
+
myInput: [{ type: ViewChild, args: ['myInput',] }],
|
|
1795
|
+
closePlaygroundButtons: [{ type: ViewChildren, args: ['closeplaygroundbutton',] }],
|
|
1796
|
+
drawer: [{ type: ViewChild, args: ['drawer',] }],
|
|
1797
|
+
sourcesDrawer: [{ type: ViewChild, args: ['sourcesDrawer',] }],
|
|
1798
|
+
editorsDrawer: [{ type: ViewChild, args: ['editorsDrawer',] }],
|
|
1799
|
+
myTextarea: [{ type: ViewChild, args: ['myTextarea', { static: false },] }],
|
|
1800
|
+
copilotName: [{ type: Input }],
|
|
1801
|
+
firstName: [{ type: Input }],
|
|
1802
|
+
lastName: [{ type: Input }],
|
|
1803
|
+
apiKey: [{ type: Input }],
|
|
1804
|
+
bgBubbleAi: [{ type: Input }],
|
|
1805
|
+
bgBubbleUser: [{ type: Input }],
|
|
1806
|
+
bgGradient: [{ type: Input }],
|
|
1807
|
+
botName: [{ type: Input }],
|
|
1808
|
+
botSkills: [{ type: Input }],
|
|
1809
|
+
botId: [{ type: Input }],
|
|
1810
|
+
orgId: [{ type: Input }],
|
|
1811
|
+
closeButtonColor: [{ type: Input }],
|
|
1812
|
+
closeButtonbgColor: [{ type: Input }],
|
|
1813
|
+
credentials: [{ type: Input }],
|
|
1814
|
+
dateTimeColor: [{ type: Input }],
|
|
1815
|
+
dateTextColor: [{ type: Input }],
|
|
1816
|
+
eventId: [{ type: Input }],
|
|
1817
|
+
s27Token: [{ type: Input }],
|
|
1818
|
+
eventName: [{ type: Input }],
|
|
1819
|
+
botIcon: [{ type: Input }],
|
|
1820
|
+
formFieldBgColor: [{ type: Input }],
|
|
1821
|
+
formFieldTextColor: [{ type: Input }],
|
|
1822
|
+
fullView: [{ type: Input }],
|
|
1823
|
+
gradientColors: [{ type: Input }],
|
|
1824
|
+
greeting: [{ type: Input }],
|
|
1825
|
+
messageTextColorAi: [{ type: Input }],
|
|
1826
|
+
messageTextColorUser: [{ type: Input }],
|
|
1827
|
+
rules: [{ type: Input }],
|
|
1828
|
+
sendButtonColor: [{ type: Input }],
|
|
1829
|
+
sendButtonTextColor: [{ type: Input }],
|
|
1830
|
+
showClose: [{ type: Input }],
|
|
1831
|
+
thumbsDownMessages: [{ type: Input }],
|
|
1832
|
+
thumbsUpMessage: [{ type: Input }],
|
|
1833
|
+
timezone: [{ type: Input }],
|
|
1834
|
+
unknownResponses: [{ type: Input }],
|
|
1835
|
+
useOpenAi: [{ type: Input }],
|
|
1836
|
+
userId: [{ type: Input }],
|
|
1837
|
+
isDev: [{ type: Input }],
|
|
1838
|
+
againButtonColor: [{ type: Input }],
|
|
1839
|
+
againButtonTextColor: [{ type: Input }],
|
|
1840
|
+
feedbackEvent: [{ type: Output }],
|
|
1841
|
+
onCloseEvent: [{ type: Output }],
|
|
1842
|
+
openPage: [{ type: Output }],
|
|
1843
|
+
sessionActions: [{ type: Output }],
|
|
1844
|
+
closeBot: [{ type: Output }],
|
|
1845
|
+
connectWithUser: [{ type: Output }],
|
|
1846
|
+
scheduleMeeting: [{ type: Output }],
|
|
1847
|
+
refreshToken: [{ type: Output }]
|
|
1836
1848
|
};
|
|
1837
1849
|
|
|
1838
|
-
class ChatBotComponent {
|
|
1839
|
-
constructor() {
|
|
1840
|
-
this.visible = false;
|
|
1841
|
-
}
|
|
1842
|
-
toggle() {
|
|
1843
|
-
this.visible = !this.visible;
|
|
1844
|
-
}
|
|
1845
|
-
}
|
|
1846
|
-
ChatBotComponent.decorators = [
|
|
1847
|
-
{ type: Component, args: [{
|
|
1848
|
-
selector: 'hivegpt-chatbot',
|
|
1849
|
-
template: "<button mat-icon-button class=\"chat-button\" color=\"primary\" (click)=\"toggle()\">\
|
|
1850
|
-
styles: ["::-webkit-scrollbar{width:5px}::-webkit-scrollbar-track{background:#f1f1f1}::-webkit-scrollbar-thumb,::-webkit-scrollbar-thumb:hover{background:#e5ccbc}.spinner{align-items:center;display:flex;gap:2px;justify-content:center}.spinner>div{animation:bouncedelay 1.4s ease-in-out infinite;animation-fill-mode:both;background-color:#173330;border-radius:100%;display:inline-block;height:5px;width:5px}.spinner .bounce1{animation-delay:-.32s}.spinner .bounce2{animation-delay:-.16s}@keyframes bouncedelay{0%,80%,to{-webkit-transform:scale(0);transform:scale(0)}40%{-webkit-transform:scale(1);transform:scale(1)}}.chat-button{align-items:center;background:#17235b;border:#17235b;border-radius:50%;bottom:20px;color:#fff;display:inline-flex;font-size:24px;height:50px;justify-content:center;position:fixed;right:20px;width:50px}"]
|
|
1851
|
-
},] }
|
|
1852
|
-
];
|
|
1853
|
-
ChatBotComponent.propDecorators = {
|
|
1854
|
-
userId: [{ type: Input }],
|
|
1855
|
-
apiKey: [{ type: Input }],
|
|
1856
|
-
botName: [{ type: Input }],
|
|
1857
|
-
botSkills: [{ type: Input }],
|
|
1858
|
-
botId: [{ type: Input }],
|
|
1859
|
-
closeButtonColor: [{ type: Input }],
|
|
1860
|
-
gradientColors: [{ type: Input }],
|
|
1861
|
-
greeting: [{ type: Input }],
|
|
1862
|
-
sendButtonColor: [{ type: Input }],
|
|
1863
|
-
useOpenAi: [{ type: Input }],
|
|
1864
|
-
showClose: [{ type: Input }],
|
|
1865
|
-
bgGradient: [{ type: Input }],
|
|
1866
|
-
sendButtonTextColor: [{ type: Input }],
|
|
1867
|
-
fullView: [{ type: Input }],
|
|
1868
|
-
bgBubbleAi: [{ type: Input }],
|
|
1869
|
-
bgBubbleUser: [{ type: Input }],
|
|
1870
|
-
closeButtonbgColor: [{ type: Input }],
|
|
1871
|
-
messageTextColorAi: [{ type: Input }],
|
|
1872
|
-
messageTextColorUser: [{ type: Input }],
|
|
1873
|
-
dateTimeColor: [{ type: Input }],
|
|
1874
|
-
dateTextColor: [{ type: Input }],
|
|
1875
|
-
formFieldBgColor: [{ type: Input }],
|
|
1876
|
-
formFieldTextColor: [{ type: Input }],
|
|
1877
|
-
thumbsUpMessage: [{ type: Input }],
|
|
1878
|
-
thumbsDownMessages: [{ type: Input }],
|
|
1879
|
-
timezone: [{ type: Input }],
|
|
1880
|
-
eventName: [{ type: Input }],
|
|
1881
|
-
credentials: [{ type: Input }],
|
|
1882
|
-
unknownResponses: [{ type: Input }],
|
|
1883
|
-
rules: [{ type: Input }],
|
|
1884
|
-
eventId: [{ type: Input }]
|
|
1850
|
+
class ChatBotComponent {
|
|
1851
|
+
constructor() {
|
|
1852
|
+
this.visible = false;
|
|
1853
|
+
}
|
|
1854
|
+
toggle() {
|
|
1855
|
+
this.visible = !this.visible;
|
|
1856
|
+
}
|
|
1857
|
+
}
|
|
1858
|
+
ChatBotComponent.decorators = [
|
|
1859
|
+
{ type: Component, args: [{
|
|
1860
|
+
selector: 'hivegpt-chatbot',
|
|
1861
|
+
template: "<button mat-icon-button class=\"chat-button\" color=\"primary\" (click)=\"toggle()\">\n <mat-icon>chat</mat-icon>\n</button>\n\n<ng-container *ngIf=\"visible\">\n <hivegpt-chat-drawer\n [apiKey]=\"apiKey\"\n [bgBubbleAi]=\"bgBubbleAi\"\n [bgBubbleUser]=\"bgBubbleUser\"\n [bgGradient]=\"bgGradient\"\n [botName]=\"botName\"\n [closeButtonbgColor]=\"closeButtonbgColor\"\n [closeButtonColor]=\"closeButtonColor\"\n [credentials]=\"credentials\"\n [dateTextColor]=\"dateTextColor\"\n [dateTimeColor]=\"dateTimeColor\"\n [eventId]=\"eventId\"\n [eventName]=\"eventName\"\n [formFieldBgColor]=\"formFieldBgColor\"\n [formFieldTextColor]=\"formFieldTextColor\"\n [fullView]=\"fullView\"\n [greeting]=\"greeting\"\n [gradientColors]=\"gradientColors\"\n [messageTextColorAi]=\"messageTextColorAi\"\n [messageTextColorUser]=\"messageTextColorUser\"\n [sendButtonColor]=\"sendButtonColor\"\n [sendButtonTextColor]=\"sendButtonTextColor\"\n [showClose]=\"showClose\"\n [thumbsDownMessages]=\"thumbsDownMessages\"\n [thumbsUpMessage]=\"thumbsUpMessage\"\n [unknownResponses]=\"unknownResponses\"\n [useOpenAi]=\"useOpenAi\"\n [userId]=\"userId\"\n [botId]=\"botId\"\n >\n </hivegpt-chat-drawer>\n</ng-container>\n",
|
|
1862
|
+
styles: ["::-webkit-scrollbar{width:5px}::-webkit-scrollbar-track{background:#f1f1f1}::-webkit-scrollbar-thumb,::-webkit-scrollbar-thumb:hover{background:#e5ccbc}.spinner{align-items:center;display:flex;gap:2px;justify-content:center}.spinner>div{animation:bouncedelay 1.4s ease-in-out infinite;animation-fill-mode:both;background-color:#173330;border-radius:100%;display:inline-block;height:5px;width:5px}.spinner .bounce1{animation-delay:-.32s}.spinner .bounce2{animation-delay:-.16s}@keyframes bouncedelay{0%,80%,to{-webkit-transform:scale(0);transform:scale(0)}40%{-webkit-transform:scale(1);transform:scale(1)}}.chat-button{align-items:center;background:#17235b;border:#17235b;border-radius:50%;bottom:20px;color:#fff;display:inline-flex;font-size:24px;height:50px;justify-content:center;position:fixed;right:20px;width:50px}"]
|
|
1863
|
+
},] }
|
|
1864
|
+
];
|
|
1865
|
+
ChatBotComponent.propDecorators = {
|
|
1866
|
+
userId: [{ type: Input }],
|
|
1867
|
+
apiKey: [{ type: Input }],
|
|
1868
|
+
botName: [{ type: Input }],
|
|
1869
|
+
botSkills: [{ type: Input }],
|
|
1870
|
+
botId: [{ type: Input }],
|
|
1871
|
+
closeButtonColor: [{ type: Input }],
|
|
1872
|
+
gradientColors: [{ type: Input }],
|
|
1873
|
+
greeting: [{ type: Input }],
|
|
1874
|
+
sendButtonColor: [{ type: Input }],
|
|
1875
|
+
useOpenAi: [{ type: Input }],
|
|
1876
|
+
showClose: [{ type: Input }],
|
|
1877
|
+
bgGradient: [{ type: Input }],
|
|
1878
|
+
sendButtonTextColor: [{ type: Input }],
|
|
1879
|
+
fullView: [{ type: Input }],
|
|
1880
|
+
bgBubbleAi: [{ type: Input }],
|
|
1881
|
+
bgBubbleUser: [{ type: Input }],
|
|
1882
|
+
closeButtonbgColor: [{ type: Input }],
|
|
1883
|
+
messageTextColorAi: [{ type: Input }],
|
|
1884
|
+
messageTextColorUser: [{ type: Input }],
|
|
1885
|
+
dateTimeColor: [{ type: Input }],
|
|
1886
|
+
dateTextColor: [{ type: Input }],
|
|
1887
|
+
formFieldBgColor: [{ type: Input }],
|
|
1888
|
+
formFieldTextColor: [{ type: Input }],
|
|
1889
|
+
thumbsUpMessage: [{ type: Input }],
|
|
1890
|
+
thumbsDownMessages: [{ type: Input }],
|
|
1891
|
+
timezone: [{ type: Input }],
|
|
1892
|
+
eventName: [{ type: Input }],
|
|
1893
|
+
credentials: [{ type: Input }],
|
|
1894
|
+
unknownResponses: [{ type: Input }],
|
|
1895
|
+
rules: [{ type: Input }],
|
|
1896
|
+
eventId: [{ type: Input }]
|
|
1885
1897
|
};
|
|
1886
1898
|
|
|
1887
|
-
class SafeHtmlPipe {
|
|
1888
|
-
constructor(sanitizer) {
|
|
1889
|
-
this.sanitizer = sanitizer;
|
|
1890
|
-
}
|
|
1891
|
-
transform(html) {
|
|
1892
|
-
return html ? this.sanitizer.bypassSecurityTrustHtml(html) : '';
|
|
1893
|
-
}
|
|
1894
|
-
}
|
|
1895
|
-
SafeHtmlPipe.decorators = [
|
|
1896
|
-
{ type: Pipe, args: [{
|
|
1897
|
-
name: 'safeHtml',
|
|
1898
|
-
},] }
|
|
1899
|
-
];
|
|
1900
|
-
SafeHtmlPipe.ctorParameters = () => [
|
|
1901
|
-
{ type: DomSanitizer }
|
|
1899
|
+
class SafeHtmlPipe {
|
|
1900
|
+
constructor(sanitizer) {
|
|
1901
|
+
this.sanitizer = sanitizer;
|
|
1902
|
+
}
|
|
1903
|
+
transform(html) {
|
|
1904
|
+
return html ? this.sanitizer.bypassSecurityTrustHtml(html) : '';
|
|
1905
|
+
}
|
|
1906
|
+
}
|
|
1907
|
+
SafeHtmlPipe.decorators = [
|
|
1908
|
+
{ type: Pipe, args: [{
|
|
1909
|
+
name: 'safeHtml',
|
|
1910
|
+
},] }
|
|
1911
|
+
];
|
|
1912
|
+
SafeHtmlPipe.ctorParameters = () => [
|
|
1913
|
+
{ type: DomSanitizer }
|
|
1902
1914
|
];
|
|
1903
1915
|
|
|
1904
|
-
class VideoPlayerComponent {
|
|
1905
|
-
constructor(doc, el, cdr) {
|
|
1906
|
-
this.doc = doc;
|
|
1907
|
-
this.el = el;
|
|
1908
|
-
this.cdr = cdr;
|
|
1909
|
-
this.isMuted = true;
|
|
1910
|
-
this.isFullscreen = false;
|
|
1911
|
-
this.isFullscreenvideoPlaying = false;
|
|
1912
|
-
this.connectWithUser = new EventEmitter();
|
|
1913
|
-
this.scheduleMeeting = new EventEmitter();
|
|
1914
|
-
}
|
|
1915
|
-
ngOnInit() {
|
|
1916
|
-
}
|
|
1917
|
-
toggleSound(isMuted = null) {
|
|
1918
|
-
this.isMuted = isMuted != null ? isMuted : !this.isMuted;
|
|
1919
|
-
setTimeout(() => {
|
|
1920
|
-
const video = this.doc
|
|
1921
|
-
.getElementById(this.video.id.toString());
|
|
1922
|
-
if (video) {
|
|
1923
|
-
video.muted = this.isMuted;
|
|
1924
|
-
this.video.isMuted = this.isMuted;
|
|
1925
|
-
}
|
|
1926
|
-
this.cdr.markForCheck();
|
|
1927
|
-
//this.muteToggle.emit(this.isMuted);
|
|
1928
|
-
});
|
|
1929
|
-
}
|
|
1930
|
-
togglePlay(playState, videoEl) {
|
|
1931
|
-
this.videoObj.isPlaying = !this.videoObj.isPlaying;
|
|
1932
|
-
setTimeout(() => {
|
|
1933
|
-
if (playState) {
|
|
1934
|
-
this.videoObj.isPlaying = true;
|
|
1935
|
-
videoEl.play();
|
|
1936
|
-
var pauseBtn = document.getElementById('pause-btn');
|
|
1937
|
-
pauseBtn.classList.add('hide-pause-btn');
|
|
1938
|
-
this.toggleSound(false);
|
|
1939
|
-
}
|
|
1940
|
-
else {
|
|
1941
|
-
this.videoObj.isPlaying = false;
|
|
1942
|
-
videoEl.pause();
|
|
1943
|
-
}
|
|
1944
|
-
this.cdr.markForCheck();
|
|
1945
|
-
});
|
|
1946
|
-
}
|
|
1947
|
-
ngAfterViewInit() {
|
|
1948
|
-
if (window.innerWidth <= 576) {
|
|
1949
|
-
this.observer = new IntersectionObserver((entries) => {
|
|
1950
|
-
if (entries[0].isIntersecting === true) {
|
|
1951
|
-
this.video.nativeElement.play();
|
|
1952
|
-
}
|
|
1953
|
-
else {
|
|
1954
|
-
this.video.nativeElement.pause();
|
|
1955
|
-
}
|
|
1956
|
-
}, {
|
|
1957
|
-
threshold: 0.75,
|
|
1958
|
-
});
|
|
1959
|
-
this.observer.observe(this.el.nativeElement);
|
|
1960
|
-
}
|
|
1961
|
-
}
|
|
1962
|
-
toggleFullscreen() {
|
|
1963
|
-
this.isFullscreen = !this.isFullscreen;
|
|
1964
|
-
if (!this.isFullscreen) {
|
|
1965
|
-
this.fullscreenvideo.nativeElement.pause();
|
|
1966
|
-
}
|
|
1967
|
-
}
|
|
1968
|
-
toggleFullscreenPlay() {
|
|
1969
|
-
this.isFullscreenvideoPlaying = !this.isFullscreenvideoPlaying;
|
|
1970
|
-
if (this.isFullscreenvideoPlaying) {
|
|
1971
|
-
this.fullscreenvideo.nativeElement.play();
|
|
1972
|
-
}
|
|
1973
|
-
else {
|
|
1974
|
-
this.fullscreenvideo.nativeElement.pause();
|
|
1975
|
-
}
|
|
1976
|
-
}
|
|
1977
|
-
followUser(userId) {
|
|
1978
|
-
this.connectWithUser.emit(userId);
|
|
1979
|
-
}
|
|
1980
|
-
checkPendingSentRequest(userId) {
|
|
1981
|
-
var _a;
|
|
1982
|
-
return (_a = this.myPendingSentRequests) === null || _a === void 0 ? void 0 : _a.find(a => a == userId);
|
|
1983
|
-
}
|
|
1984
|
-
canUnfollowUser() {
|
|
1985
|
-
return false;
|
|
1986
|
-
}
|
|
1987
|
-
canFollowUser() {
|
|
1988
|
-
return true;
|
|
1989
|
-
}
|
|
1990
|
-
getIniNames(firstName, lastName) {
|
|
1991
|
-
if (!firstName && !lastName) {
|
|
1992
|
-
return '';
|
|
1993
|
-
}
|
|
1994
|
-
if (firstName && lastName)
|
|
1995
|
-
return (firstName.charAt(0).toUpperCase() + lastName.charAt(0).toUpperCase());
|
|
1996
|
-
else
|
|
1997
|
-
return firstName.charAt(0).toUpperCase();
|
|
1998
|
-
}
|
|
1999
|
-
}
|
|
2000
|
-
VideoPlayerComponent.decorators = [
|
|
2001
|
-
{ type: Component, args: [{
|
|
2002
|
-
selector: 'app-video-player',
|
|
2003
|
-
template: "<div class=\"video-wrapper\" >\
|
|
2004
|
-
styles: [".video-wrapper{position:relative}.video-wrapper video{-o-object-fit:cover;border-radius:5px;cursor:pointer;height:330px;object-fit:cover;outline:0;transition:.3s ease-in-out;width:100%}.video-wrapper .video-actions{display:flex;flex-direction:column;position:absolute;right:10px;top:10px}.video-wrapper .video-actions .action{color:#fff;cursor:pointer;margin-bottom:5px}.video-wrapper .author-details{bottom:18px;display:flex;flex-direction:column;justify-content:flex-start;left:12px;position:absolute;right:12px;transition:.3s ease-in-out}.video-wrapper .author-details .author-image{border-radius:50%;height:34px;margin-right:6px;overflow:hidden;width:34px}.video-wrapper .author-details .author-image img{-o-object-fit:cover;height:100%;object-fit:cover;width:100%}.video-wrapper .author-details .author-name,.video-wrapper .author-details .video-title{color:#fff;display:block;font-size:14px;mix-blend-mode:hard-light}.video-wrapper .connect-btn{bottom:20px;opacity:0;outline:0;position:absolute;text-align:center;transition:.3s ease-in-out;width:100%}@media only screen and (max-width:576px){.video-wrapper .connect-btn{opacity:1;right:20px;width:unset}}.video-wrapper .connect-btn button{margin:auto}.video-wrapper:hover .author-details{opacity:0}@media only screen and (max-width:576px){.video-wrapper:hover .author-details{opacity:1}}.video-wrapper:hover .connect-btn{opacity:1}.video-wrapper .half-opacity{opacity:.2}.video-wrapper .no-opacity{background-color:transparent}.like-btn{margin-bottom:20px;text-align:center;transition:.2s ease-in-out}.like-btn .count{font-size:16px;margin-left:3px}.like-btn span{cursor:pointer;font-size:30px}.like-btn:hover{transform:scale(1.1)}.like-btn.like{color:#025be7}.like-btn.dislike{color:#8d8d8d}.like-btn.info{color:#aeae3f}.full-screen.show{align-items:center;background:rgba(27,26,26,.9607843137254902);display:flex;height:100%;justify-content:center;left:0;position:fixed;top:0;width:100%;z-index:9999}.full-screen.show .video-wrapper video{height:270px;transform:none!important;transition:none;width:300px}.full-screen .close-btn{cursor:pointer;left:10px;position:absolute;top:10px}.full-screen .close-btn span{color:#fff}.main-controls{background-color:rgba(0,0,0,.3);bottom:0;left:0;right:0;top:0}.main-controls,.main-controls .play-pause-btn{align-items:center;display:flex;justify-content:center;position:absolute}.main-controls .play-pause-btn{background:none;border:none;color:#fff;line-height:0;top:34%}.main-controls .play-pause-btn.playing{cursor:pointer;left:50%;position:absolute;top:40%;transform:translate(-50%,-50%)}.main-controls .play-pause-btn.playing span{color:#fff;text-shadow:0 0 6px rgba(47,47,47,.36)}.main-controls .play-pause-btn:focus{outline:none}.main-controls .play-pause-btn .material-icons{font-size:40px}.main-controls .play-pause-btn .mat-icon{height:auto;width:auto}.main-controls .half-opacity{opacity:.2}.main-controls .no-opacity{background-color:transparent}button.transparent-btn{background:transparent;border:0!important}.pause_btn{height:100%;opacity:.02!important;width:100%}.pause_btn:hover{background-color:rgba(0,0,0,.7411764705882353);opacity:1!important}.hide-pause-btn{opacity:0!important}.no-photo{align-items:center;display:flex;font-size:14px;height:35px;justify-content:center;width:35px}.overlymask-video{background-image:linear-gradient(hsla(0,0%,100%,.058823529411764705),rgba(0,0,0,.1803921568627451));background-position:0 bottom;height:275px;position:absolute;width:100%;z-index:0}"]
|
|
2005
|
-
},] }
|
|
2006
|
-
];
|
|
2007
|
-
VideoPlayerComponent.ctorParameters = () => [
|
|
2008
|
-
{ type: undefined, decorators: [{ type: Inject, args: [DOCUMENT,] }] },
|
|
2009
|
-
{ type: ElementRef },
|
|
2010
|
-
{ type: ChangeDetectorRef }
|
|
2011
|
-
];
|
|
2012
|
-
VideoPlayerComponent.propDecorators = {
|
|
2013
|
-
currentUserId: [{ type: Input }],
|
|
2014
|
-
user: [{ type: Input }],
|
|
2015
|
-
eventId: [{ type: Input }],
|
|
2016
|
-
videoObj: [{ type: Input }],
|
|
2017
|
-
isDev: [{ type: Input }],
|
|
2018
|
-
type: [{ type: Input }],
|
|
2019
|
-
video: [{ type: ViewChild, args: ['video',] }],
|
|
2020
|
-
fullscreenvideo: [{ type: ViewChild, args: ['fullscreenvideo',] }],
|
|
2021
|
-
connectWithUser: [{ type: Output }],
|
|
2022
|
-
scheduleMeeting: [{ type: Output }]
|
|
1916
|
+
class VideoPlayerComponent {
|
|
1917
|
+
constructor(doc, el, cdr) {
|
|
1918
|
+
this.doc = doc;
|
|
1919
|
+
this.el = el;
|
|
1920
|
+
this.cdr = cdr;
|
|
1921
|
+
this.isMuted = true;
|
|
1922
|
+
this.isFullscreen = false;
|
|
1923
|
+
this.isFullscreenvideoPlaying = false;
|
|
1924
|
+
this.connectWithUser = new EventEmitter();
|
|
1925
|
+
this.scheduleMeeting = new EventEmitter();
|
|
1926
|
+
}
|
|
1927
|
+
ngOnInit() {
|
|
1928
|
+
}
|
|
1929
|
+
toggleSound(isMuted = null) {
|
|
1930
|
+
this.isMuted = isMuted != null ? isMuted : !this.isMuted;
|
|
1931
|
+
setTimeout(() => {
|
|
1932
|
+
const video = this.doc
|
|
1933
|
+
.getElementById(this.video.id.toString());
|
|
1934
|
+
if (video) {
|
|
1935
|
+
video.muted = this.isMuted;
|
|
1936
|
+
this.video.isMuted = this.isMuted;
|
|
1937
|
+
}
|
|
1938
|
+
this.cdr.markForCheck();
|
|
1939
|
+
//this.muteToggle.emit(this.isMuted);
|
|
1940
|
+
});
|
|
1941
|
+
}
|
|
1942
|
+
togglePlay(playState, videoEl) {
|
|
1943
|
+
this.videoObj.isPlaying = !this.videoObj.isPlaying;
|
|
1944
|
+
setTimeout(() => {
|
|
1945
|
+
if (playState) {
|
|
1946
|
+
this.videoObj.isPlaying = true;
|
|
1947
|
+
videoEl.play();
|
|
1948
|
+
var pauseBtn = document.getElementById('pause-btn');
|
|
1949
|
+
pauseBtn.classList.add('hide-pause-btn');
|
|
1950
|
+
this.toggleSound(false);
|
|
1951
|
+
}
|
|
1952
|
+
else {
|
|
1953
|
+
this.videoObj.isPlaying = false;
|
|
1954
|
+
videoEl.pause();
|
|
1955
|
+
}
|
|
1956
|
+
this.cdr.markForCheck();
|
|
1957
|
+
});
|
|
1958
|
+
}
|
|
1959
|
+
ngAfterViewInit() {
|
|
1960
|
+
if (window.innerWidth <= 576) {
|
|
1961
|
+
this.observer = new IntersectionObserver((entries) => {
|
|
1962
|
+
if (entries[0].isIntersecting === true) {
|
|
1963
|
+
this.video.nativeElement.play();
|
|
1964
|
+
}
|
|
1965
|
+
else {
|
|
1966
|
+
this.video.nativeElement.pause();
|
|
1967
|
+
}
|
|
1968
|
+
}, {
|
|
1969
|
+
threshold: 0.75,
|
|
1970
|
+
});
|
|
1971
|
+
this.observer.observe(this.el.nativeElement);
|
|
1972
|
+
}
|
|
1973
|
+
}
|
|
1974
|
+
toggleFullscreen() {
|
|
1975
|
+
this.isFullscreen = !this.isFullscreen;
|
|
1976
|
+
if (!this.isFullscreen) {
|
|
1977
|
+
this.fullscreenvideo.nativeElement.pause();
|
|
1978
|
+
}
|
|
1979
|
+
}
|
|
1980
|
+
toggleFullscreenPlay() {
|
|
1981
|
+
this.isFullscreenvideoPlaying = !this.isFullscreenvideoPlaying;
|
|
1982
|
+
if (this.isFullscreenvideoPlaying) {
|
|
1983
|
+
this.fullscreenvideo.nativeElement.play();
|
|
1984
|
+
}
|
|
1985
|
+
else {
|
|
1986
|
+
this.fullscreenvideo.nativeElement.pause();
|
|
1987
|
+
}
|
|
1988
|
+
}
|
|
1989
|
+
followUser(userId) {
|
|
1990
|
+
this.connectWithUser.emit(userId);
|
|
1991
|
+
}
|
|
1992
|
+
checkPendingSentRequest(userId) {
|
|
1993
|
+
var _a;
|
|
1994
|
+
return (_a = this.myPendingSentRequests) === null || _a === void 0 ? void 0 : _a.find(a => a == userId);
|
|
1995
|
+
}
|
|
1996
|
+
canUnfollowUser() {
|
|
1997
|
+
return false;
|
|
1998
|
+
}
|
|
1999
|
+
canFollowUser() {
|
|
2000
|
+
return true;
|
|
2001
|
+
}
|
|
2002
|
+
getIniNames(firstName, lastName) {
|
|
2003
|
+
if (!firstName && !lastName) {
|
|
2004
|
+
return '';
|
|
2005
|
+
}
|
|
2006
|
+
if (firstName && lastName)
|
|
2007
|
+
return (firstName.charAt(0).toUpperCase() + lastName.charAt(0).toUpperCase());
|
|
2008
|
+
else
|
|
2009
|
+
return firstName.charAt(0).toUpperCase();
|
|
2010
|
+
}
|
|
2011
|
+
}
|
|
2012
|
+
VideoPlayerComponent.decorators = [
|
|
2013
|
+
{ type: Component, args: [{
|
|
2014
|
+
selector: 'app-video-player',
|
|
2015
|
+
template: "<div class=\"video-wrapper\" >\n <div class=\"overlymask-video\"></div>\n <video (click)=\"toggleFullscreen()\" #video [loop]=\"true\" [muted]=\"isMuted\" [src]=\"videoObj.processedUrls || videoObj.url\" playsinline\n [controls]=\"false\"></video>\n <div class=\"main-controls\" [class.no-opacity]=\"video.isPlaying\">\n <button mat-icon-button *ngIf=\"!videoObj.isPlaying\"\n attr.aria-label=\"Play Video\"\n title=\"Play Video\" class=\"play-pause-btn\"\n (click)=\"togglePlay(true, video)\">\n <!-- <mat-icon alt=\"Play\">play_arrow</mat-icon> -->\n <span class=\"material-icons notranslate \" aria-hidden=\"true\">play_circle_outline</span>\n </button>\n\n <button mat-icon-button id=\"pause-btn\" [hidden]=\"!videoObj.isPlaying\" class=\"pause_btn play-pause-btn playing\"\n title=\"Pause Video\"\n [class.half-opacity]=\"video.isPlaying\" (click)=\"togglePlay(false, video)\">\n <!-- <mat-icon alt=\"Pause\">pause</mat-icon> -->\n <span class=\"material-icons notranslate \" aria-hidden=\"true\">pause_circle_outline</span>\n </button>\n </div>\n <div class=\"video-actions\">\n <button class=\"button-trasparent action\" (click)=\"toggleSound()\" title=\"Mute\" *ngIf=\"isMuted\">\n <span class=\"material-icons notranslate \" aria-hidden=\"true\">volume_off</span>\n </button>\n <button class=\"button-trasparent action\" (click)=\"toggleSound()\" title=\"Unmute\" *ngIf=\"!isMuted\">\n <span class=\"material-icons notranslate \" aria-hidden=\"true\">volume_up</span>\n </button>\n\n </div>\n</div>\n\n<div class=\"full-screen\" *ngIf=\"isFullscreen\" [ngClass]=\"{'show': isFullscreen}\">\n <div class=\"video-wrapper\">\n <video #fullscreenvideo (click)=\"toggleFullscreenPlay()\" [loop]=\"true\" [muted]=\"isMuted\" [src]=\"videoObj.processedUrls || videoObj.url\"\n playsinline [controls]=\"false\"></video>\n <div (click)=\"toggleFullscreen()\" class=\"close-btn\">\n <span class=\"material-icons notranslate \">clear</span>\n </div>\n <div class=\"video-actions\">\n <button *ngIf=\"!video.isPlaying\" title=\"Play\"\n class=\"material-icons notranslate body-text-color fs-h2 play position-absolute transparent-btn\" (click)=\"togglePlay(true, video)\">\n play_circle_outline\n </button>\n <button id=\"pause-btn\" [hidden]=\"!videoObj.isPlaying\" title=\"Pause\"\n class=\"pause_btn material-icons body-text-color fs-h2 play position-absolute transparent-btn\"\n [class.half-opacity]=\"video.isPlaying\" (click)=\"togglePlay(false, video)\">\n pause_circle_outline\n </button>\n </div>\n </div>\n</div>\n",
|
|
2016
|
+
styles: [".video-wrapper{position:relative}.video-wrapper video{-o-object-fit:cover;border-radius:5px;cursor:pointer;height:330px;object-fit:cover;outline:0;transition:.3s ease-in-out;width:100%}.video-wrapper .video-actions{display:flex;flex-direction:column;position:absolute;right:10px;top:10px}.video-wrapper .video-actions .action{color:#fff;cursor:pointer;margin-bottom:5px}.video-wrapper .author-details{bottom:18px;display:flex;flex-direction:column;justify-content:flex-start;left:12px;position:absolute;right:12px;transition:.3s ease-in-out}.video-wrapper .author-details .author-image{border-radius:50%;height:34px;margin-right:6px;overflow:hidden;width:34px}.video-wrapper .author-details .author-image img{-o-object-fit:cover;height:100%;object-fit:cover;width:100%}.video-wrapper .author-details .author-name,.video-wrapper .author-details .video-title{color:#fff;display:block;font-size:14px;mix-blend-mode:hard-light}.video-wrapper .connect-btn{bottom:20px;opacity:0;outline:0;position:absolute;text-align:center;transition:.3s ease-in-out;width:100%}@media only screen and (max-width:576px){.video-wrapper .connect-btn{opacity:1;right:20px;width:unset}}.video-wrapper .connect-btn button{margin:auto}.video-wrapper:hover .author-details{opacity:0}@media only screen and (max-width:576px){.video-wrapper:hover .author-details{opacity:1}}.video-wrapper:hover .connect-btn{opacity:1}.video-wrapper .half-opacity{opacity:.2}.video-wrapper .no-opacity{background-color:transparent}.like-btn{margin-bottom:20px;text-align:center;transition:.2s ease-in-out}.like-btn .count{font-size:16px;margin-left:3px}.like-btn span{cursor:pointer;font-size:30px}.like-btn:hover{transform:scale(1.1)}.like-btn.like{color:#025be7}.like-btn.dislike{color:#8d8d8d}.like-btn.info{color:#aeae3f}.full-screen.show{align-items:center;background:rgba(27,26,26,.9607843137254902);display:flex;height:100%;justify-content:center;left:0;position:fixed;top:0;width:100%;z-index:9999}.full-screen.show .video-wrapper video{height:270px;transform:none!important;transition:none;width:300px}.full-screen .close-btn{cursor:pointer;left:10px;position:absolute;top:10px}.full-screen .close-btn span{color:#fff}.main-controls{background-color:rgba(0,0,0,.3);bottom:0;left:0;right:0;top:0}.main-controls,.main-controls .play-pause-btn{align-items:center;display:flex;justify-content:center;position:absolute}.main-controls .play-pause-btn{background:none;border:none;color:#fff;line-height:0;top:34%}.main-controls .play-pause-btn.playing{cursor:pointer;left:50%;position:absolute;top:40%;transform:translate(-50%,-50%)}.main-controls .play-pause-btn.playing span{color:#fff;text-shadow:0 0 6px rgba(47,47,47,.36)}.main-controls .play-pause-btn:focus{outline:none}.main-controls .play-pause-btn .material-icons{font-size:40px}.main-controls .play-pause-btn .mat-icon{height:auto;width:auto}.main-controls .half-opacity{opacity:.2}.main-controls .no-opacity{background-color:transparent}button.transparent-btn{background:transparent;border:0!important}.pause_btn{height:100%;opacity:.02!important;width:100%}.pause_btn:hover{background-color:rgba(0,0,0,.7411764705882353);opacity:1!important}.hide-pause-btn{opacity:0!important}.no-photo{align-items:center;display:flex;font-size:14px;height:35px;justify-content:center;width:35px}.overlymask-video{background-image:linear-gradient(hsla(0,0%,100%,.058823529411764705),rgba(0,0,0,.1803921568627451));background-position:0 bottom;height:275px;position:absolute;width:100%;z-index:0}"]
|
|
2017
|
+
},] }
|
|
2018
|
+
];
|
|
2019
|
+
VideoPlayerComponent.ctorParameters = () => [
|
|
2020
|
+
{ type: undefined, decorators: [{ type: Inject, args: [DOCUMENT,] }] },
|
|
2021
|
+
{ type: ElementRef },
|
|
2022
|
+
{ type: ChangeDetectorRef }
|
|
2023
|
+
];
|
|
2024
|
+
VideoPlayerComponent.propDecorators = {
|
|
2025
|
+
currentUserId: [{ type: Input }],
|
|
2026
|
+
user: [{ type: Input }],
|
|
2027
|
+
eventId: [{ type: Input }],
|
|
2028
|
+
videoObj: [{ type: Input }],
|
|
2029
|
+
isDev: [{ type: Input }],
|
|
2030
|
+
type: [{ type: Input }],
|
|
2031
|
+
video: [{ type: ViewChild, args: ['video',] }],
|
|
2032
|
+
fullscreenvideo: [{ type: ViewChild, args: ['fullscreenvideo',] }],
|
|
2033
|
+
connectWithUser: [{ type: Output }],
|
|
2034
|
+
scheduleMeeting: [{ type: Output }]
|
|
2023
2035
|
};
|
|
2024
2036
|
|
|
2025
|
-
class BotHtmlEditorComponent {
|
|
2026
|
-
constructor(cdr, http) {
|
|
2027
|
-
this.cdr = cdr;
|
|
2028
|
-
this.http = http;
|
|
2029
|
-
this.documentName = 'doc name';
|
|
2030
|
-
this.quillConfig = {
|
|
2031
|
-
toolbar: [
|
|
2032
|
-
[{ header: '1' }, { header: '2' }, { font: [] }],
|
|
2033
|
-
[{ list: 'ordered' }, { list: 'bullet' }],
|
|
2034
|
-
['bold', 'italic', 'underline'],
|
|
2035
|
-
['link'],
|
|
2036
|
-
['clean'],
|
|
2037
|
-
],
|
|
2038
|
-
};
|
|
2039
|
-
}
|
|
2040
|
-
ngOnInit() {
|
|
2041
|
-
this.environment = prod_environment;
|
|
2042
|
-
setTimeout(() => {
|
|
2043
|
-
if (this.isDocInEditMode) {
|
|
2044
|
-
console.log('In Edit mode');
|
|
2045
|
-
this.filldataInForm();
|
|
2046
|
-
}
|
|
2047
|
-
else {
|
|
2048
|
-
console.log('In save mode');
|
|
2049
|
-
}
|
|
2050
|
-
}, 2500);
|
|
2051
|
-
}
|
|
2052
|
-
filldataInForm() {
|
|
2053
|
-
var _a, _b;
|
|
2054
|
-
if (this.documentContent) {
|
|
2055
|
-
this.documentName = (_a = this.documentContent) === null || _a === void 0 ? void 0 : _a.name;
|
|
2056
|
-
this.editorContent = (_b = this.documentContent) === null || _b === void 0 ? void 0 : _b.content;
|
|
2057
|
-
this.cdr.detectChanges();
|
|
2058
|
-
}
|
|
2059
|
-
}
|
|
2060
|
-
saveContent() {
|
|
2061
|
-
if (!this.isDocInEditMode) {
|
|
2062
|
-
this.saveContent_http().subscribe();
|
|
2063
|
-
}
|
|
2064
|
-
else {
|
|
2065
|
-
this.saveContent_http().subscribe();
|
|
2066
|
-
}
|
|
2067
|
-
}
|
|
2068
|
-
saveContent_http() {
|
|
2069
|
-
console.log('API call function');
|
|
2070
|
-
const url = `${this.environment.AGENTS_API}/ConversationDocuments?conversationId=${this.conversationId}&botId=${this.botId}`;
|
|
2071
|
-
const headers = new HttpHeaders({
|
|
2072
|
-
'Content-Type': 'application/json',
|
|
2073
|
-
apiKey: 'WIz/qAm+EEmfOkFaUA/weA==',
|
|
2074
|
-
});
|
|
2075
|
-
let data = {
|
|
2076
|
-
name: this.documentName,
|
|
2077
|
-
content: this.editorContent,
|
|
2078
|
-
};
|
|
2079
|
-
return this.http.post(url, data, { headers }).pipe(switchMap((res) => {
|
|
2080
|
-
if (res) {
|
|
2081
|
-
// alert('Saved Successfully');
|
|
2082
|
-
}
|
|
2083
|
-
this.cdr.markForCheck();
|
|
2084
|
-
return of(res);
|
|
2085
|
-
}), catchError((error) => {
|
|
2086
|
-
console.error('Error fetching chatbot config: ', error);
|
|
2087
|
-
return of(null);
|
|
2088
|
-
}));
|
|
2089
|
-
}
|
|
2090
|
-
updateContent_http() {
|
|
2091
|
-
console.log('API call function');
|
|
2092
|
-
const url = `${this.environment.AGENTS_API}/ConversationDocuments/rename?conversationId=${this.conversationId}&botId=${this.botId}`;
|
|
2093
|
-
const headers = new HttpHeaders({
|
|
2094
|
-
'Content-Type': 'application/json',
|
|
2095
|
-
apiKey: 'WIz/qAm+EEmfOkFaUA/weA==',
|
|
2096
|
-
});
|
|
2097
|
-
let data = {
|
|
2098
|
-
name: this.documentName,
|
|
2099
|
-
content: this.editorContent,
|
|
2100
|
-
};
|
|
2101
|
-
return this.http.put(url, data, { headers }).pipe(switchMap((res) => {
|
|
2102
|
-
if (res) {
|
|
2103
|
-
// alert('Updated Successfully');
|
|
2104
|
-
}
|
|
2105
|
-
this.cdr.markForCheck();
|
|
2106
|
-
return of(res);
|
|
2107
|
-
}), catchError((error) => {
|
|
2108
|
-
console.error('Error fetching chatbot config: ', error);
|
|
2109
|
-
return of(null);
|
|
2110
|
-
}));
|
|
2111
|
-
}
|
|
2112
|
-
}
|
|
2113
|
-
BotHtmlEditorComponent.decorators = [
|
|
2114
|
-
{ type: Component, args: [{
|
|
2115
|
-
selector: 'lib-bot-html-editor',
|
|
2116
|
-
template: "<div style=\"padding: 12px\">\
|
|
2117
|
-
styles: [".save-btn{background-color:#f0f0f0;border:none;color:#333;margin-top:22px;position:absolute;right:16px;width:56px}"]
|
|
2118
|
-
},] }
|
|
2119
|
-
];
|
|
2120
|
-
BotHtmlEditorComponent.ctorParameters = () => [
|
|
2121
|
-
{ type: ChangeDetectorRef },
|
|
2122
|
-
{ type: HttpClient }
|
|
2123
|
-
];
|
|
2124
|
-
BotHtmlEditorComponent.propDecorators = {
|
|
2125
|
-
editorContent: [{ type: Input }],
|
|
2126
|
-
isDocInEditMode: [{ type: Input }],
|
|
2127
|
-
documentContent: [{ type: Input }],
|
|
2128
|
-
conversationId: [{ type: Input }],
|
|
2129
|
-
botId: [{ type: Input }]
|
|
2037
|
+
class BotHtmlEditorComponent {
|
|
2038
|
+
constructor(cdr, http) {
|
|
2039
|
+
this.cdr = cdr;
|
|
2040
|
+
this.http = http;
|
|
2041
|
+
this.documentName = 'doc name';
|
|
2042
|
+
this.quillConfig = {
|
|
2043
|
+
toolbar: [
|
|
2044
|
+
[{ header: '1' }, { header: '2' }, { font: [] }],
|
|
2045
|
+
[{ list: 'ordered' }, { list: 'bullet' }],
|
|
2046
|
+
['bold', 'italic', 'underline'],
|
|
2047
|
+
['link'],
|
|
2048
|
+
['clean'],
|
|
2049
|
+
],
|
|
2050
|
+
};
|
|
2051
|
+
}
|
|
2052
|
+
ngOnInit() {
|
|
2053
|
+
this.environment = prod_environment;
|
|
2054
|
+
setTimeout(() => {
|
|
2055
|
+
if (this.isDocInEditMode) {
|
|
2056
|
+
console.log('In Edit mode');
|
|
2057
|
+
this.filldataInForm();
|
|
2058
|
+
}
|
|
2059
|
+
else {
|
|
2060
|
+
console.log('In save mode');
|
|
2061
|
+
}
|
|
2062
|
+
}, 2500);
|
|
2063
|
+
}
|
|
2064
|
+
filldataInForm() {
|
|
2065
|
+
var _a, _b;
|
|
2066
|
+
if (this.documentContent) {
|
|
2067
|
+
this.documentName = (_a = this.documentContent) === null || _a === void 0 ? void 0 : _a.name;
|
|
2068
|
+
this.editorContent = (_b = this.documentContent) === null || _b === void 0 ? void 0 : _b.content;
|
|
2069
|
+
this.cdr.detectChanges();
|
|
2070
|
+
}
|
|
2071
|
+
}
|
|
2072
|
+
saveContent() {
|
|
2073
|
+
if (!this.isDocInEditMode) {
|
|
2074
|
+
this.saveContent_http().subscribe();
|
|
2075
|
+
}
|
|
2076
|
+
else {
|
|
2077
|
+
this.saveContent_http().subscribe();
|
|
2078
|
+
}
|
|
2079
|
+
}
|
|
2080
|
+
saveContent_http() {
|
|
2081
|
+
console.log('API call function');
|
|
2082
|
+
const url = `${this.environment.AGENTS_API}/ConversationDocuments?conversationId=${this.conversationId}&botId=${this.botId}`;
|
|
2083
|
+
const headers = new HttpHeaders({
|
|
2084
|
+
'Content-Type': 'application/json',
|
|
2085
|
+
apiKey: 'WIz/qAm+EEmfOkFaUA/weA==',
|
|
2086
|
+
});
|
|
2087
|
+
let data = {
|
|
2088
|
+
name: this.documentName,
|
|
2089
|
+
content: this.editorContent,
|
|
2090
|
+
};
|
|
2091
|
+
return this.http.post(url, data, { headers }).pipe(switchMap((res) => {
|
|
2092
|
+
if (res) {
|
|
2093
|
+
// alert('Saved Successfully');
|
|
2094
|
+
}
|
|
2095
|
+
this.cdr.markForCheck();
|
|
2096
|
+
return of(res);
|
|
2097
|
+
}), catchError((error) => {
|
|
2098
|
+
console.error('Error fetching chatbot config: ', error);
|
|
2099
|
+
return of(null);
|
|
2100
|
+
}));
|
|
2101
|
+
}
|
|
2102
|
+
updateContent_http() {
|
|
2103
|
+
console.log('API call function');
|
|
2104
|
+
const url = `${this.environment.AGENTS_API}/ConversationDocuments/rename?conversationId=${this.conversationId}&botId=${this.botId}`;
|
|
2105
|
+
const headers = new HttpHeaders({
|
|
2106
|
+
'Content-Type': 'application/json',
|
|
2107
|
+
apiKey: 'WIz/qAm+EEmfOkFaUA/weA==',
|
|
2108
|
+
});
|
|
2109
|
+
let data = {
|
|
2110
|
+
name: this.documentName,
|
|
2111
|
+
content: this.editorContent,
|
|
2112
|
+
};
|
|
2113
|
+
return this.http.put(url, data, { headers }).pipe(switchMap((res) => {
|
|
2114
|
+
if (res) {
|
|
2115
|
+
// alert('Updated Successfully');
|
|
2116
|
+
}
|
|
2117
|
+
this.cdr.markForCheck();
|
|
2118
|
+
return of(res);
|
|
2119
|
+
}), catchError((error) => {
|
|
2120
|
+
console.error('Error fetching chatbot config: ', error);
|
|
2121
|
+
return of(null);
|
|
2122
|
+
}));
|
|
2123
|
+
}
|
|
2124
|
+
}
|
|
2125
|
+
BotHtmlEditorComponent.decorators = [
|
|
2126
|
+
{ type: Component, args: [{
|
|
2127
|
+
selector: 'lib-bot-html-editor',
|
|
2128
|
+
template: "<div style=\"padding: 12px\">\n <div style=\"margin-top: 42px\" class=\"form-group\">\n <input [(ngModel)]=\"documentName\" class=\"form-control\" type=\"text\" />\n <button (click)=\"saveContent()\" class=\"save-btn\">Save</button>\n </div>\n\n <quill-editor\n [(ngModel)]=\"editorContent\"\n [modules]=\"quillConfig\"\n ></quill-editor>\n</div>\n",
|
|
2129
|
+
styles: [".save-btn{background-color:#f0f0f0;border:none;color:#333;margin-top:22px;position:absolute;right:16px;width:56px}"]
|
|
2130
|
+
},] }
|
|
2131
|
+
];
|
|
2132
|
+
BotHtmlEditorComponent.ctorParameters = () => [
|
|
2133
|
+
{ type: ChangeDetectorRef },
|
|
2134
|
+
{ type: HttpClient }
|
|
2135
|
+
];
|
|
2136
|
+
BotHtmlEditorComponent.propDecorators = {
|
|
2137
|
+
editorContent: [{ type: Input }],
|
|
2138
|
+
isDocInEditMode: [{ type: Input }],
|
|
2139
|
+
documentContent: [{ type: Input }],
|
|
2140
|
+
conversationId: [{ type: Input }],
|
|
2141
|
+
botId: [{ type: Input }]
|
|
2130
2142
|
};
|
|
2131
2143
|
|
|
2132
|
-
class HiveGptModule {
|
|
2133
|
-
}
|
|
2134
|
-
HiveGptModule.decorators = [
|
|
2135
|
-
{ type: NgModule, args: [{
|
|
2136
|
-
declarations: [ChatBotComponent, ChatDrawerComponent, VideoPlayerComponent, SafeHtmlPipe, BotHtmlEditorComponent],
|
|
2137
|
-
imports: [CommonModule, MatIconModule, MatSidenavModule, FormsModule, QuillModule],
|
|
2138
|
-
exports: [ChatBotComponent, ChatDrawerComponent, VideoPlayerComponent]
|
|
2139
|
-
},] }
|
|
2144
|
+
class HiveGptModule {
|
|
2145
|
+
}
|
|
2146
|
+
HiveGptModule.decorators = [
|
|
2147
|
+
{ type: NgModule, args: [{
|
|
2148
|
+
declarations: [ChatBotComponent, ChatDrawerComponent, VideoPlayerComponent, SafeHtmlPipe, BotHtmlEditorComponent],
|
|
2149
|
+
imports: [CommonModule, MatIconModule, MatSidenavModule, FormsModule, QuillModule],
|
|
2150
|
+
exports: [ChatBotComponent, ChatDrawerComponent, VideoPlayerComponent]
|
|
2151
|
+
},] }
|
|
2140
2152
|
];
|
|
2141
2153
|
|
|
2142
|
-
/*
|
|
2143
|
-
* Public API Surface of hive-gpt
|
|
2154
|
+
/*
|
|
2155
|
+
* Public API Surface of hive-gpt
|
|
2144
2156
|
*/
|
|
2145
2157
|
|
|
2146
|
-
/**
|
|
2147
|
-
* Generated bundle index. Do not edit.
|
|
2158
|
+
/**
|
|
2159
|
+
* Generated bundle index. Do not edit.
|
|
2148
2160
|
*/
|
|
2149
2161
|
|
|
2150
2162
|
export { ChatBotComponent, ChatDrawerComponent, HiveGptModule, BotsService as ɵa, SocketService as ɵb, ConversationService as ɵc, NotificationSocket as ɵd, VideoPlayerComponent as ɵe, SafeHtmlPipe as ɵf, BotHtmlEditorComponent as ɵg };
|