@hivegpt/hiveai-angular 0.0.381 → 0.0.382
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/bundles/hivegpt-hiveai-angular.umd.js +3145 -0
- package/bundles/hivegpt-hiveai-angular.umd.js.map +1 -0
- package/bundles/hivegpt-hiveai-angular.umd.min.js +2 -0
- package/bundles/hivegpt-hiveai-angular.umd.min.js.map +1 -0
- package/environments/environment.d.ts +15 -0
- package/environments/environment.d.ts.map +1 -0
- package/esm2015/environments/environment.js +15 -0
- package/esm2015/hivegpt-hiveai-angular.js +13 -0
- package/esm2015/lib/components/NotificationSocket.js +39 -0
- package/esm2015/lib/components/bot-html-editor/bot-html-editor.component.js +112 -0
- package/esm2015/lib/components/bot.service.js +50 -0
- package/esm2015/lib/components/chat-drawer/chat-drawer.component.js +1743 -0
- package/esm2015/lib/components/chatbot/chatbot.component.js +50 -0
- package/esm2015/lib/components/conversation.service.js +49 -0
- package/esm2015/lib/components/socket-service.service.js +72 -0
- package/esm2015/lib/components/translations/translation.service.js +244 -0
- package/esm2015/lib/components/video-player/video-player.component.js +123 -0
- package/esm2015/lib/hivegpt.module.js +21 -0
- package/esm2015/lib/models/video.js +2 -0
- package/esm2015/lib/pipes/safe-html.pipe.js +19 -0
- package/esm2015/lib/utils/utils.js +36 -0
- package/esm2015/public-api.js +7 -0
- package/fesm2015/hivegpt-hiveai-angular.js +2541 -0
- package/fesm2015/hivegpt-hiveai-angular.js.map +1 -0
- package/hivegpt-hiveai-angular.d.ts +13 -0
- package/hivegpt-hiveai-angular.d.ts.map +1 -0
- package/hivegpt-hiveai-angular.metadata.json +1 -0
- package/lib/components/NotificationSocket.d.ts +5 -0
- package/lib/components/NotificationSocket.d.ts.map +1 -0
- package/lib/components/bot-html-editor/bot-html-editor.component.d.ts +36 -0
- package/lib/components/bot-html-editor/bot-html-editor.component.d.ts.map +1 -0
- package/lib/components/bot.service.d.ts +12 -0
- package/lib/components/bot.service.d.ts.map +1 -0
- package/lib/components/chat-drawer/chat-drawer.component.d.ts +255 -0
- package/lib/components/chat-drawer/chat-drawer.component.d.ts.map +1 -0
- package/lib/components/chatbot/chatbot.component.d.ts +36 -0
- package/lib/components/chatbot/chatbot.component.d.ts.map +1 -0
- package/lib/components/conversation.service.d.ts +13 -0
- package/lib/components/conversation.service.d.ts.map +1 -0
- package/lib/components/socket-service.service.d.ts +20 -0
- package/lib/components/socket-service.service.d.ts.map +1 -0
- package/lib/components/translations/translation.service.d.ts +8 -0
- package/lib/components/translations/translation.service.d.ts.map +1 -0
- package/lib/components/video-player/video-player.component.d.ts +36 -0
- package/lib/components/video-player/video-player.component.d.ts.map +1 -0
- package/lib/hivegpt.module.d.ts +3 -0
- package/lib/hivegpt.module.d.ts.map +1 -0
- package/lib/models/video.d.ts +35 -0
- package/lib/models/video.d.ts.map +1 -0
- package/lib/pipes/safe-html.pipe.d.ts +8 -0
- package/lib/pipes/safe-html.pipe.d.ts.map +1 -0
- package/lib/utils/utils.d.ts +3 -0
- package/lib/utils/utils.d.ts.map +1 -0
- package/package.json +10 -10
- package/{src/public-api.ts → public-api.d.ts} +1 -4
- package/public-api.d.ts.map +1 -0
- package/karma.conf.js +0 -32
- package/ng-package.json +0 -7
- package/src/environments/environment.ts +0 -19
- package/src/lib/components/NotificationSocket.ts +0 -38
- package/src/lib/components/bot-html-editor/bot-html-editor.component.css +0 -10
- package/src/lib/components/bot-html-editor/bot-html-editor.component.html +0 -11
- package/src/lib/components/bot-html-editor/bot-html-editor.component.spec.ts +0 -25
- package/src/lib/components/bot-html-editor/bot-html-editor.component.ts +0 -152
- package/src/lib/components/bot.service.ts +0 -52
- package/src/lib/components/chat-drawer/chat-drawer.component.html +0 -1586
- package/src/lib/components/chat-drawer/chat-drawer.component.scss +0 -2907
- package/src/lib/components/chat-drawer/chat-drawer.component.ts +0 -2143
- package/src/lib/components/chatbot/chatbot.component.html +0 -37
- package/src/lib/components/chatbot/chatbot.component.scss +0 -97
- package/src/lib/components/chatbot/chatbot.component.ts +0 -44
- package/src/lib/components/conversation.service.spec.ts +0 -16
- package/src/lib/components/conversation.service.ts +0 -54
- package/src/lib/components/socket-service.service.spec.ts +0 -16
- package/src/lib/components/socket-service.service.ts +0 -77
- package/src/lib/components/translations/translation.service.ts +0 -221
- package/src/lib/components/video-player/video-player.component.html +0 -51
- package/src/lib/components/video-player/video-player.component.scss +0 -262
- package/src/lib/components/video-player/video-player.component.ts +0 -148
- package/src/lib/hivegpt.module.ts +0 -18
- package/src/lib/models/video.ts +0 -36
- package/src/lib/pipes/safe-html.pipe.ts +0 -16
- package/src/lib/utils/utils.ts +0 -37
- package/tsconfig.lib.json +0 -25
- package/tsconfig.lib.prod.json +0 -10
- package/tsconfig.spec.json +0 -17
- package/tslint.json +0 -17
|
@@ -0,0 +1,3145 @@
|
|
|
1
|
+
(function (global, factory) {
|
|
2
|
+
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/common/http'), require('@angular/core'), require('@angular/platform-browser'), require('rxjs'), require('rxjs/operators'), require('ngx-socket-io'), require('@angular/forms'), require('microsoft-cognitiveservices-speech-sdk'), require('marked'), require('@angular/common'), require('@angular/material/icon'), require('@angular/material/sidenav'), require('ngx-quill')) :
|
|
3
|
+
typeof define === 'function' && define.amd ? define('@hivegpt/hiveai-angular', ['exports', '@angular/common/http', '@angular/core', '@angular/platform-browser', 'rxjs', 'rxjs/operators', 'ngx-socket-io', '@angular/forms', 'microsoft-cognitiveservices-speech-sdk', 'marked', '@angular/common', '@angular/material/icon', '@angular/material/sidenav', 'ngx-quill'], factory) :
|
|
4
|
+
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory((global.hivegpt = global.hivegpt || {}, global.hivegpt["hiveai-angular"] = {}), global.ng.common.http, global.ng.core, global.ng.platformBrowser, global.rxjs, global.rxjs.operators, global.ngxSocketIo, global.ng.forms, global.SpeechSDK, global.marked, global.ng.common, global.ng.material.icon, global.ng.material.sidenav, global.ngxQuill));
|
|
5
|
+
})(this, (function (exports, i1, i0, platformBrowser, rxjs, operators, ngxSocketIo, forms, SpeechSDK, marked, common, icon, sidenav, ngxQuill) { 'use strict';
|
|
6
|
+
|
|
7
|
+
function _interopNamespace(e) {
|
|
8
|
+
if (e && e.__esModule) return e;
|
|
9
|
+
var n = Object.create(null);
|
|
10
|
+
if (e) {
|
|
11
|
+
Object.keys(e).forEach(function (k) {
|
|
12
|
+
if (k !== 'default') {
|
|
13
|
+
var d = Object.getOwnPropertyDescriptor(e, k);
|
|
14
|
+
Object.defineProperty(n, k, d.get ? d : {
|
|
15
|
+
enumerable: true,
|
|
16
|
+
get: function () { return e[k]; }
|
|
17
|
+
});
|
|
18
|
+
}
|
|
19
|
+
});
|
|
20
|
+
}
|
|
21
|
+
n["default"] = e;
|
|
22
|
+
return Object.freeze(n);
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
var i1__namespace = /*#__PURE__*/_interopNamespace(i1);
|
|
26
|
+
var i0__namespace = /*#__PURE__*/_interopNamespace(i0);
|
|
27
|
+
var SpeechSDK__namespace = /*#__PURE__*/_interopNamespace(SpeechSDK);
|
|
28
|
+
var marked__namespace = /*#__PURE__*/_interopNamespace(marked);
|
|
29
|
+
|
|
30
|
+
/******************************************************************************
|
|
31
|
+
Copyright (c) Microsoft Corporation.
|
|
32
|
+
|
|
33
|
+
Permission to use, copy, modify, and/or distribute this software for any
|
|
34
|
+
purpose with or without fee is hereby granted.
|
|
35
|
+
|
|
36
|
+
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
|
37
|
+
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
|
38
|
+
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
|
39
|
+
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
|
40
|
+
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
41
|
+
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
42
|
+
PERFORMANCE OF THIS SOFTWARE.
|
|
43
|
+
***************************************************************************** */
|
|
44
|
+
/* global Reflect, Promise, SuppressedError, Symbol, Iterator */
|
|
45
|
+
var extendStatics = function (d, b) {
|
|
46
|
+
extendStatics = Object.setPrototypeOf ||
|
|
47
|
+
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
48
|
+
function (d, b) { for (var p in b)
|
|
49
|
+
if (Object.prototype.hasOwnProperty.call(b, p))
|
|
50
|
+
d[p] = b[p]; };
|
|
51
|
+
return extendStatics(d, b);
|
|
52
|
+
};
|
|
53
|
+
function __extends(d, b) {
|
|
54
|
+
if (typeof b !== "function" && b !== null)
|
|
55
|
+
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
|
56
|
+
extendStatics(d, b);
|
|
57
|
+
function __() { this.constructor = d; }
|
|
58
|
+
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
59
|
+
}
|
|
60
|
+
var __assign = function () {
|
|
61
|
+
__assign = Object.assign || function __assign(t) {
|
|
62
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
63
|
+
s = arguments[i];
|
|
64
|
+
for (var p in s)
|
|
65
|
+
if (Object.prototype.hasOwnProperty.call(s, p))
|
|
66
|
+
t[p] = s[p];
|
|
67
|
+
}
|
|
68
|
+
return t;
|
|
69
|
+
};
|
|
70
|
+
return __assign.apply(this, arguments);
|
|
71
|
+
};
|
|
72
|
+
function __rest(s, e) {
|
|
73
|
+
var t = {};
|
|
74
|
+
for (var p in s)
|
|
75
|
+
if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
76
|
+
t[p] = s[p];
|
|
77
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
78
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
79
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
80
|
+
t[p[i]] = s[p[i]];
|
|
81
|
+
}
|
|
82
|
+
return t;
|
|
83
|
+
}
|
|
84
|
+
function __decorate(decorators, target, key, desc) {
|
|
85
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
86
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function")
|
|
87
|
+
r = Reflect.decorate(decorators, target, key, desc);
|
|
88
|
+
else
|
|
89
|
+
for (var i = decorators.length - 1; i >= 0; i--)
|
|
90
|
+
if (d = decorators[i])
|
|
91
|
+
r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
92
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
93
|
+
}
|
|
94
|
+
function __param(paramIndex, decorator) {
|
|
95
|
+
return function (target, key) { decorator(target, key, paramIndex); };
|
|
96
|
+
}
|
|
97
|
+
function __esDecorate(ctor, descriptorIn, decorators, contextIn, initializers, extraInitializers) {
|
|
98
|
+
function accept(f) { if (f !== void 0 && typeof f !== "function")
|
|
99
|
+
throw new TypeError("Function expected"); return f; }
|
|
100
|
+
var kind = contextIn.kind, key = kind === "getter" ? "get" : kind === "setter" ? "set" : "value";
|
|
101
|
+
var target = !descriptorIn && ctor ? contextIn["static"] ? ctor : ctor.prototype : null;
|
|
102
|
+
var descriptor = descriptorIn || (target ? Object.getOwnPropertyDescriptor(target, contextIn.name) : {});
|
|
103
|
+
var _, done = false;
|
|
104
|
+
for (var i = decorators.length - 1; i >= 0; i--) {
|
|
105
|
+
var context = {};
|
|
106
|
+
for (var p in contextIn)
|
|
107
|
+
context[p] = p === "access" ? {} : contextIn[p];
|
|
108
|
+
for (var p in contextIn.access)
|
|
109
|
+
context.access[p] = contextIn.access[p];
|
|
110
|
+
context.addInitializer = function (f) { if (done)
|
|
111
|
+
throw new TypeError("Cannot add initializers after decoration has completed"); extraInitializers.push(accept(f || null)); };
|
|
112
|
+
var result = (0, decorators[i])(kind === "accessor" ? { get: descriptor.get, set: descriptor.set } : descriptor[key], context);
|
|
113
|
+
if (kind === "accessor") {
|
|
114
|
+
if (result === void 0)
|
|
115
|
+
continue;
|
|
116
|
+
if (result === null || typeof result !== "object")
|
|
117
|
+
throw new TypeError("Object expected");
|
|
118
|
+
if (_ = accept(result.get))
|
|
119
|
+
descriptor.get = _;
|
|
120
|
+
if (_ = accept(result.set))
|
|
121
|
+
descriptor.set = _;
|
|
122
|
+
if (_ = accept(result.init))
|
|
123
|
+
initializers.unshift(_);
|
|
124
|
+
}
|
|
125
|
+
else if (_ = accept(result)) {
|
|
126
|
+
if (kind === "field")
|
|
127
|
+
initializers.unshift(_);
|
|
128
|
+
else
|
|
129
|
+
descriptor[key] = _;
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
if (target)
|
|
133
|
+
Object.defineProperty(target, contextIn.name, descriptor);
|
|
134
|
+
done = true;
|
|
135
|
+
}
|
|
136
|
+
;
|
|
137
|
+
function __runInitializers(thisArg, initializers, value) {
|
|
138
|
+
var useValue = arguments.length > 2;
|
|
139
|
+
for (var i = 0; i < initializers.length; i++) {
|
|
140
|
+
value = useValue ? initializers[i].call(thisArg, value) : initializers[i].call(thisArg);
|
|
141
|
+
}
|
|
142
|
+
return useValue ? value : void 0;
|
|
143
|
+
}
|
|
144
|
+
;
|
|
145
|
+
function __propKey(x) {
|
|
146
|
+
return typeof x === "symbol" ? x : "".concat(x);
|
|
147
|
+
}
|
|
148
|
+
;
|
|
149
|
+
function __setFunctionName(f, name, prefix) {
|
|
150
|
+
if (typeof name === "symbol")
|
|
151
|
+
name = name.description ? "[".concat(name.description, "]") : "";
|
|
152
|
+
return Object.defineProperty(f, "name", { configurable: true, value: prefix ? "".concat(prefix, " ", name) : name });
|
|
153
|
+
}
|
|
154
|
+
;
|
|
155
|
+
function __metadata(metadataKey, metadataValue) {
|
|
156
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function")
|
|
157
|
+
return Reflect.metadata(metadataKey, metadataValue);
|
|
158
|
+
}
|
|
159
|
+
function __awaiter(thisArg, _arguments, P, generator) {
|
|
160
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
161
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
162
|
+
function fulfilled(value) { try {
|
|
163
|
+
step(generator.next(value));
|
|
164
|
+
}
|
|
165
|
+
catch (e) {
|
|
166
|
+
reject(e);
|
|
167
|
+
} }
|
|
168
|
+
function rejected(value) { try {
|
|
169
|
+
step(generator["throw"](value));
|
|
170
|
+
}
|
|
171
|
+
catch (e) {
|
|
172
|
+
reject(e);
|
|
173
|
+
} }
|
|
174
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
175
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
176
|
+
});
|
|
177
|
+
}
|
|
178
|
+
function __generator(thisArg, body) {
|
|
179
|
+
var _ = { label: 0, sent: function () { if (t[0] & 1)
|
|
180
|
+
throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype);
|
|
181
|
+
return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function () { return this; }), g;
|
|
182
|
+
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
183
|
+
function step(op) {
|
|
184
|
+
if (f)
|
|
185
|
+
throw new TypeError("Generator is already executing.");
|
|
186
|
+
while (g && (g = 0, op[0] && (_ = 0)), _)
|
|
187
|
+
try {
|
|
188
|
+
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done)
|
|
189
|
+
return t;
|
|
190
|
+
if (y = 0, t)
|
|
191
|
+
op = [op[0] & 2, t.value];
|
|
192
|
+
switch (op[0]) {
|
|
193
|
+
case 0:
|
|
194
|
+
case 1:
|
|
195
|
+
t = op;
|
|
196
|
+
break;
|
|
197
|
+
case 4:
|
|
198
|
+
_.label++;
|
|
199
|
+
return { value: op[1], done: false };
|
|
200
|
+
case 5:
|
|
201
|
+
_.label++;
|
|
202
|
+
y = op[1];
|
|
203
|
+
op = [0];
|
|
204
|
+
continue;
|
|
205
|
+
case 7:
|
|
206
|
+
op = _.ops.pop();
|
|
207
|
+
_.trys.pop();
|
|
208
|
+
continue;
|
|
209
|
+
default:
|
|
210
|
+
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) {
|
|
211
|
+
_ = 0;
|
|
212
|
+
continue;
|
|
213
|
+
}
|
|
214
|
+
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) {
|
|
215
|
+
_.label = op[1];
|
|
216
|
+
break;
|
|
217
|
+
}
|
|
218
|
+
if (op[0] === 6 && _.label < t[1]) {
|
|
219
|
+
_.label = t[1];
|
|
220
|
+
t = op;
|
|
221
|
+
break;
|
|
222
|
+
}
|
|
223
|
+
if (t && _.label < t[2]) {
|
|
224
|
+
_.label = t[2];
|
|
225
|
+
_.ops.push(op);
|
|
226
|
+
break;
|
|
227
|
+
}
|
|
228
|
+
if (t[2])
|
|
229
|
+
_.ops.pop();
|
|
230
|
+
_.trys.pop();
|
|
231
|
+
continue;
|
|
232
|
+
}
|
|
233
|
+
op = body.call(thisArg, _);
|
|
234
|
+
}
|
|
235
|
+
catch (e) {
|
|
236
|
+
op = [6, e];
|
|
237
|
+
y = 0;
|
|
238
|
+
}
|
|
239
|
+
finally {
|
|
240
|
+
f = t = 0;
|
|
241
|
+
}
|
|
242
|
+
if (op[0] & 5)
|
|
243
|
+
throw op[1];
|
|
244
|
+
return { value: op[0] ? op[1] : void 0, done: true };
|
|
245
|
+
}
|
|
246
|
+
}
|
|
247
|
+
var __createBinding = Object.create ? (function (o, m, k, k2) {
|
|
248
|
+
if (k2 === undefined)
|
|
249
|
+
k2 = k;
|
|
250
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
251
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
252
|
+
desc = { enumerable: true, get: function () { return m[k]; } };
|
|
253
|
+
}
|
|
254
|
+
Object.defineProperty(o, k2, desc);
|
|
255
|
+
}) : (function (o, m, k, k2) {
|
|
256
|
+
if (k2 === undefined)
|
|
257
|
+
k2 = k;
|
|
258
|
+
o[k2] = m[k];
|
|
259
|
+
});
|
|
260
|
+
function __exportStar(m, o) {
|
|
261
|
+
for (var p in m)
|
|
262
|
+
if (p !== "default" && !Object.prototype.hasOwnProperty.call(o, p))
|
|
263
|
+
__createBinding(o, m, p);
|
|
264
|
+
}
|
|
265
|
+
function __values(o) {
|
|
266
|
+
var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
|
|
267
|
+
if (m)
|
|
268
|
+
return m.call(o);
|
|
269
|
+
if (o && typeof o.length === "number")
|
|
270
|
+
return {
|
|
271
|
+
next: function () {
|
|
272
|
+
if (o && i >= o.length)
|
|
273
|
+
o = void 0;
|
|
274
|
+
return { value: o && o[i++], done: !o };
|
|
275
|
+
}
|
|
276
|
+
};
|
|
277
|
+
throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
|
|
278
|
+
}
|
|
279
|
+
function __read(o, n) {
|
|
280
|
+
var m = typeof Symbol === "function" && o[Symbol.iterator];
|
|
281
|
+
if (!m)
|
|
282
|
+
return o;
|
|
283
|
+
var i = m.call(o), r, ar = [], e;
|
|
284
|
+
try {
|
|
285
|
+
while ((n === void 0 || n-- > 0) && !(r = i.next()).done)
|
|
286
|
+
ar.push(r.value);
|
|
287
|
+
}
|
|
288
|
+
catch (error) {
|
|
289
|
+
e = { error: error };
|
|
290
|
+
}
|
|
291
|
+
finally {
|
|
292
|
+
try {
|
|
293
|
+
if (r && !r.done && (m = i["return"]))
|
|
294
|
+
m.call(i);
|
|
295
|
+
}
|
|
296
|
+
finally {
|
|
297
|
+
if (e)
|
|
298
|
+
throw e.error;
|
|
299
|
+
}
|
|
300
|
+
}
|
|
301
|
+
return ar;
|
|
302
|
+
}
|
|
303
|
+
/** @deprecated */
|
|
304
|
+
function __spread() {
|
|
305
|
+
for (var ar = [], i = 0; i < arguments.length; i++)
|
|
306
|
+
ar = ar.concat(__read(arguments[i]));
|
|
307
|
+
return ar;
|
|
308
|
+
}
|
|
309
|
+
/** @deprecated */
|
|
310
|
+
function __spreadArrays() {
|
|
311
|
+
for (var s = 0, i = 0, il = arguments.length; i < il; i++)
|
|
312
|
+
s += arguments[i].length;
|
|
313
|
+
for (var r = Array(s), k = 0, i = 0; i < il; i++)
|
|
314
|
+
for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)
|
|
315
|
+
r[k] = a[j];
|
|
316
|
+
return r;
|
|
317
|
+
}
|
|
318
|
+
function __spreadArray(to, from, pack) {
|
|
319
|
+
if (pack || arguments.length === 2)
|
|
320
|
+
for (var i = 0, l = from.length, ar; i < l; i++) {
|
|
321
|
+
if (ar || !(i in from)) {
|
|
322
|
+
if (!ar)
|
|
323
|
+
ar = Array.prototype.slice.call(from, 0, i);
|
|
324
|
+
ar[i] = from[i];
|
|
325
|
+
}
|
|
326
|
+
}
|
|
327
|
+
return to.concat(ar || Array.prototype.slice.call(from));
|
|
328
|
+
}
|
|
329
|
+
function __await(v) {
|
|
330
|
+
return this instanceof __await ? (this.v = v, this) : new __await(v);
|
|
331
|
+
}
|
|
332
|
+
function __asyncGenerator(thisArg, _arguments, generator) {
|
|
333
|
+
if (!Symbol.asyncIterator)
|
|
334
|
+
throw new TypeError("Symbol.asyncIterator is not defined.");
|
|
335
|
+
var g = generator.apply(thisArg, _arguments || []), i, q = [];
|
|
336
|
+
return i = Object.create((typeof AsyncIterator === "function" ? AsyncIterator : Object).prototype), verb("next"), verb("throw"), verb("return", awaitReturn), i[Symbol.asyncIterator] = function () { return this; }, i;
|
|
337
|
+
function awaitReturn(f) { return function (v) { return Promise.resolve(v).then(f, reject); }; }
|
|
338
|
+
function verb(n, f) { if (g[n]) {
|
|
339
|
+
i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); };
|
|
340
|
+
if (f)
|
|
341
|
+
i[n] = f(i[n]);
|
|
342
|
+
} }
|
|
343
|
+
function resume(n, v) { try {
|
|
344
|
+
step(g[n](v));
|
|
345
|
+
}
|
|
346
|
+
catch (e) {
|
|
347
|
+
settle(q[0][3], e);
|
|
348
|
+
} }
|
|
349
|
+
function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }
|
|
350
|
+
function fulfill(value) { resume("next", value); }
|
|
351
|
+
function reject(value) { resume("throw", value); }
|
|
352
|
+
function settle(f, v) { if (f(v), q.shift(), q.length)
|
|
353
|
+
resume(q[0][0], q[0][1]); }
|
|
354
|
+
}
|
|
355
|
+
function __asyncDelegator(o) {
|
|
356
|
+
var i, p;
|
|
357
|
+
return i = {}, verb("next"), verb("throw", function (e) { throw e; }), verb("return"), i[Symbol.iterator] = function () { return this; }, i;
|
|
358
|
+
function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: false } : f ? f(v) : v; } : f; }
|
|
359
|
+
}
|
|
360
|
+
function __asyncValues(o) {
|
|
361
|
+
if (!Symbol.asyncIterator)
|
|
362
|
+
throw new TypeError("Symbol.asyncIterator is not defined.");
|
|
363
|
+
var m = o[Symbol.asyncIterator], i;
|
|
364
|
+
return m ? m.call(o) : (o = typeof __values === "function" ? __values(o) : o[Symbol.iterator](), i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i);
|
|
365
|
+
function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }
|
|
366
|
+
function settle(resolve, reject, d, v) { Promise.resolve(v).then(function (v) { resolve({ value: v, done: d }); }, reject); }
|
|
367
|
+
}
|
|
368
|
+
function __makeTemplateObject(cooked, raw) {
|
|
369
|
+
if (Object.defineProperty) {
|
|
370
|
+
Object.defineProperty(cooked, "raw", { value: raw });
|
|
371
|
+
}
|
|
372
|
+
else {
|
|
373
|
+
cooked.raw = raw;
|
|
374
|
+
}
|
|
375
|
+
return cooked;
|
|
376
|
+
}
|
|
377
|
+
;
|
|
378
|
+
var __setModuleDefault = Object.create ? (function (o, v) {
|
|
379
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
380
|
+
}) : function (o, v) {
|
|
381
|
+
o["default"] = v;
|
|
382
|
+
};
|
|
383
|
+
var ownKeys = function (o) {
|
|
384
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
385
|
+
var ar = [];
|
|
386
|
+
for (var k in o)
|
|
387
|
+
if (Object.prototype.hasOwnProperty.call(o, k))
|
|
388
|
+
ar[ar.length] = k;
|
|
389
|
+
return ar;
|
|
390
|
+
};
|
|
391
|
+
return ownKeys(o);
|
|
392
|
+
};
|
|
393
|
+
function __importStar(mod) {
|
|
394
|
+
if (mod && mod.__esModule)
|
|
395
|
+
return mod;
|
|
396
|
+
var result = {};
|
|
397
|
+
if (mod != null)
|
|
398
|
+
for (var k = ownKeys(mod), i = 0; i < k.length; i++)
|
|
399
|
+
if (k[i] !== "default")
|
|
400
|
+
__createBinding(result, mod, k[i]);
|
|
401
|
+
__setModuleDefault(result, mod);
|
|
402
|
+
return result;
|
|
403
|
+
}
|
|
404
|
+
function __importDefault(mod) {
|
|
405
|
+
return (mod && mod.__esModule) ? mod : { default: mod };
|
|
406
|
+
}
|
|
407
|
+
function __classPrivateFieldGet(receiver, state, kind, f) {
|
|
408
|
+
if (kind === "a" && !f)
|
|
409
|
+
throw new TypeError("Private accessor was defined without a getter");
|
|
410
|
+
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver))
|
|
411
|
+
throw new TypeError("Cannot read private member from an object whose class did not declare it");
|
|
412
|
+
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
|
|
413
|
+
}
|
|
414
|
+
function __classPrivateFieldSet(receiver, state, value, kind, f) {
|
|
415
|
+
if (kind === "m")
|
|
416
|
+
throw new TypeError("Private method is not writable");
|
|
417
|
+
if (kind === "a" && !f)
|
|
418
|
+
throw new TypeError("Private accessor was defined without a setter");
|
|
419
|
+
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver))
|
|
420
|
+
throw new TypeError("Cannot write private member to an object whose class did not declare it");
|
|
421
|
+
return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
|
|
422
|
+
}
|
|
423
|
+
function __classPrivateFieldIn(state, receiver) {
|
|
424
|
+
if (receiver === null || (typeof receiver !== "object" && typeof receiver !== "function"))
|
|
425
|
+
throw new TypeError("Cannot use 'in' operator on non-object");
|
|
426
|
+
return typeof state === "function" ? receiver === state : state.has(receiver);
|
|
427
|
+
}
|
|
428
|
+
function __addDisposableResource(env, value, async) {
|
|
429
|
+
if (value !== null && value !== void 0) {
|
|
430
|
+
if (typeof value !== "object" && typeof value !== "function")
|
|
431
|
+
throw new TypeError("Object expected.");
|
|
432
|
+
var dispose, inner;
|
|
433
|
+
if (async) {
|
|
434
|
+
if (!Symbol.asyncDispose)
|
|
435
|
+
throw new TypeError("Symbol.asyncDispose is not defined.");
|
|
436
|
+
dispose = value[Symbol.asyncDispose];
|
|
437
|
+
}
|
|
438
|
+
if (dispose === void 0) {
|
|
439
|
+
if (!Symbol.dispose)
|
|
440
|
+
throw new TypeError("Symbol.dispose is not defined.");
|
|
441
|
+
dispose = value[Symbol.dispose];
|
|
442
|
+
if (async)
|
|
443
|
+
inner = dispose;
|
|
444
|
+
}
|
|
445
|
+
if (typeof dispose !== "function")
|
|
446
|
+
throw new TypeError("Object not disposable.");
|
|
447
|
+
if (inner)
|
|
448
|
+
dispose = function () { try {
|
|
449
|
+
inner.call(this);
|
|
450
|
+
}
|
|
451
|
+
catch (e) {
|
|
452
|
+
return Promise.reject(e);
|
|
453
|
+
} };
|
|
454
|
+
env.stack.push({ value: value, dispose: dispose, async: async });
|
|
455
|
+
}
|
|
456
|
+
else if (async) {
|
|
457
|
+
env.stack.push({ async: true });
|
|
458
|
+
}
|
|
459
|
+
return value;
|
|
460
|
+
}
|
|
461
|
+
var _SuppressedError = typeof SuppressedError === "function" ? SuppressedError : function (error, suppressed, message) {
|
|
462
|
+
var e = new Error(message);
|
|
463
|
+
return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e;
|
|
464
|
+
};
|
|
465
|
+
function __disposeResources(env) {
|
|
466
|
+
function fail(e) {
|
|
467
|
+
env.error = env.hasError ? new _SuppressedError(e, env.error, "An error was suppressed during disposal.") : e;
|
|
468
|
+
env.hasError = true;
|
|
469
|
+
}
|
|
470
|
+
var r, s = 0;
|
|
471
|
+
function next() {
|
|
472
|
+
while (r = env.stack.pop()) {
|
|
473
|
+
try {
|
|
474
|
+
if (!r.async && s === 1)
|
|
475
|
+
return s = 0, env.stack.push(r), Promise.resolve().then(next);
|
|
476
|
+
if (r.dispose) {
|
|
477
|
+
var result = r.dispose.call(r.value);
|
|
478
|
+
if (r.async)
|
|
479
|
+
return s |= 2, Promise.resolve(result).then(next, function (e) { fail(e); return next(); });
|
|
480
|
+
}
|
|
481
|
+
else
|
|
482
|
+
s |= 1;
|
|
483
|
+
}
|
|
484
|
+
catch (e) {
|
|
485
|
+
fail(e);
|
|
486
|
+
}
|
|
487
|
+
}
|
|
488
|
+
if (s === 1)
|
|
489
|
+
return env.hasError ? Promise.reject(env.error) : Promise.resolve();
|
|
490
|
+
if (env.hasError)
|
|
491
|
+
throw env.error;
|
|
492
|
+
}
|
|
493
|
+
return next();
|
|
494
|
+
}
|
|
495
|
+
function __rewriteRelativeImportExtension(path, preserveJsx) {
|
|
496
|
+
if (typeof path === "string" && /^\.\.?\//.test(path)) {
|
|
497
|
+
return path.replace(/\.(tsx)$|((?:\.d)?)((?:\.[^./]+?)?)\.([cm]?)ts$/i, function (m, tsx, d, ext, cm) {
|
|
498
|
+
return tsx ? preserveJsx ? ".jsx" : ".js" : d && (!ext || !cm) ? m : (d + ext + "." + cm.toLowerCase() + "js");
|
|
499
|
+
});
|
|
500
|
+
}
|
|
501
|
+
return path;
|
|
502
|
+
}
|
|
503
|
+
var tslib_es6 = {
|
|
504
|
+
__extends: __extends,
|
|
505
|
+
__assign: __assign,
|
|
506
|
+
__rest: __rest,
|
|
507
|
+
__decorate: __decorate,
|
|
508
|
+
__param: __param,
|
|
509
|
+
__esDecorate: __esDecorate,
|
|
510
|
+
__runInitializers: __runInitializers,
|
|
511
|
+
__propKey: __propKey,
|
|
512
|
+
__setFunctionName: __setFunctionName,
|
|
513
|
+
__metadata: __metadata,
|
|
514
|
+
__awaiter: __awaiter,
|
|
515
|
+
__generator: __generator,
|
|
516
|
+
__createBinding: __createBinding,
|
|
517
|
+
__exportStar: __exportStar,
|
|
518
|
+
__values: __values,
|
|
519
|
+
__read: __read,
|
|
520
|
+
__spread: __spread,
|
|
521
|
+
__spreadArrays: __spreadArrays,
|
|
522
|
+
__spreadArray: __spreadArray,
|
|
523
|
+
__await: __await,
|
|
524
|
+
__asyncGenerator: __asyncGenerator,
|
|
525
|
+
__asyncDelegator: __asyncDelegator,
|
|
526
|
+
__asyncValues: __asyncValues,
|
|
527
|
+
__makeTemplateObject: __makeTemplateObject,
|
|
528
|
+
__importStar: __importStar,
|
|
529
|
+
__importDefault: __importDefault,
|
|
530
|
+
__classPrivateFieldGet: __classPrivateFieldGet,
|
|
531
|
+
__classPrivateFieldSet: __classPrivateFieldSet,
|
|
532
|
+
__classPrivateFieldIn: __classPrivateFieldIn,
|
|
533
|
+
__addDisposableResource: __addDisposableResource,
|
|
534
|
+
__disposeResources: __disposeResources,
|
|
535
|
+
__rewriteRelativeImportExtension: __rewriteRelativeImportExtension,
|
|
536
|
+
};
|
|
537
|
+
|
|
538
|
+
var TranslationService = /** @class */ (function () {
|
|
539
|
+
function TranslationService() {
|
|
540
|
+
this.eventId = null;
|
|
541
|
+
this.translationsData = [
|
|
542
|
+
{
|
|
543
|
+
Key: "Copy",
|
|
544
|
+
DefaultValue: "Copy",
|
|
545
|
+
Translations: {
|
|
546
|
+
en: "Copy",
|
|
547
|
+
fr: "Copier",
|
|
548
|
+
it: "Copia",
|
|
549
|
+
es: "Copiar",
|
|
550
|
+
de: "Kopieren",
|
|
551
|
+
"pt-br": "Copiar",
|
|
552
|
+
ar: "نسخ",
|
|
553
|
+
zh: "复制",
|
|
554
|
+
ru: "Копировать"
|
|
555
|
+
}
|
|
556
|
+
},
|
|
557
|
+
{
|
|
558
|
+
Key: "May I assist you with anything else",
|
|
559
|
+
DefaultValue: "Great. May I assist you with anything else?",
|
|
560
|
+
Translations: {
|
|
561
|
+
en: "Great. May I assist you with anything else?",
|
|
562
|
+
fr: "Parfait. Puis-je vous aider avec autre chose ?",
|
|
563
|
+
it: "Perfetto. Posso aiutarti con qualcos'altro?",
|
|
564
|
+
es: "Genial. ¿Puedo ayudarte con algo más?",
|
|
565
|
+
de: "Super. Kann ich Ihnen noch bei etwas anderem helfen?",
|
|
566
|
+
"pt-br": "Ótimo. Posso ajudar com mais alguma coisa?",
|
|
567
|
+
ar: "رائع. هل يمكنني مساعدتك في أي شيء آخر؟",
|
|
568
|
+
zh: "太好了。还有什么我可以帮您的吗?",
|
|
569
|
+
ru: "Отлично. Могу ли я помочь вам с чем-то ещё?"
|
|
570
|
+
}
|
|
571
|
+
},
|
|
572
|
+
{
|
|
573
|
+
Key: "We are sorry we've not been able to answer your question",
|
|
574
|
+
DefaultValue: "We are sorry we've not been able to answer your question. However, our dedicated support team is happy to help. Please <a href=\"mailto:support@social27.com\">click here</a> and a human agent will assist you as soon as possible.",
|
|
575
|
+
Translations: {
|
|
576
|
+
en: "We are sorry we've not been able to answer your question. However, our dedicated support team is happy to help. Please <a href=\"mailto:support@social27.com\">click here</a> and a human agent will assist you as soon as possible.",
|
|
577
|
+
fr: "Nous sommes désolés de ne pas avoir pu répondre à votre question. Cependant, notre équipe d'assistance se fera un plaisir de vous aider. Veuillez <a href=\"mailto:support@social27.com\">cliquer ici</a> et un agent humain vous assistera dès que possible.",
|
|
578
|
+
it: "Ci dispiace di non essere riusciti a rispondere alla tua domanda. Tuttavia, il nostro team di supporto dedicato sarà lieto di aiutarti. Ti preghiamo di <a href=\"mailto:support@social27.com\">fare clic qui</a> e un operatore umano ti assisterà al più presto.",
|
|
579
|
+
es: "Lamentamos no haber podido responder a tu pregunta. Sin embargo, nuestro equipo de soporte estará encantado de ayudarte. Por favor, <a href=\"mailto:support@social27.com\">haz clic aquí</a> y un agente humano te asistirá lo antes posible.",
|
|
580
|
+
de: "Es tut uns leid, dass wir Ihre Frage nicht beantworten konnten. Unser engagiertes Support-Team hilft Ihnen jedoch gerne weiter. Bitte <a href=\"mailto:support@social27.com\">klicken Sie hier</a>, und ein menschlicher Mitarbeiter wird Ihnen so bald wie möglich helfen.",
|
|
581
|
+
"pt-br": "Lamentamos não ter conseguido responder à sua pergunta. No entanto, nossa equipe de suporte dedicada ficará feliz em ajudar. Por favor, <a href=\"mailto:support@social27.com\">clique aqui</a> e um agente humano o ajudará o mais rápido possível.",
|
|
582
|
+
ar: "نأسف لعدم تمكننا من الإجابة على سؤالك. ومع ذلك، يسعد فريق الدعم المخصص لدينا بمساعدتك. يرجى <a href=\"mailto:support@social27.com\">النقر هنا</a> وسيساعدك أحد الوكلاء البشريين في أقرب وقت ممكن.",
|
|
583
|
+
zh: "很抱歉我们未能回答您的问题。不过,我们的专属支持团队很乐意为您提供帮助。请<a href=\"mailto:support@social27.com\">点击这里</a>,人工客服将尽快为您提供协助。",
|
|
584
|
+
ru: "К сожалению, мы не смогли ответить на ваш вопрос. Однако наша служба поддержки с радостью вам поможет. Пожалуйста, <a href=\"mailto:support@social27.com\">нажмите здесь</a>, и наш оператор свяжется с вами как можно скорее."
|
|
585
|
+
}
|
|
586
|
+
},
|
|
587
|
+
{
|
|
588
|
+
Key: 'Ask anything',
|
|
589
|
+
DefaultValue: 'Ask anything',
|
|
590
|
+
Translations: {
|
|
591
|
+
en: 'Ask anything',
|
|
592
|
+
fr: 'Demandez ce que vous voulez',
|
|
593
|
+
it: 'Chiedi qualsiasi cosa',
|
|
594
|
+
es: 'Pregunta lo que quieras',
|
|
595
|
+
de: 'Frag alles',
|
|
596
|
+
'pt-br': 'Pergunte qualquer coisa',
|
|
597
|
+
ar: 'اسأل أي شيء',
|
|
598
|
+
zh: '随便问',
|
|
599
|
+
ru: 'Спросите что угодно',
|
|
600
|
+
},
|
|
601
|
+
},
|
|
602
|
+
{
|
|
603
|
+
Key: 'Assistant',
|
|
604
|
+
DefaultValue: 'Assistant',
|
|
605
|
+
Translations: {
|
|
606
|
+
en: 'Assistant',
|
|
607
|
+
fr: 'Assistant',
|
|
608
|
+
it: 'Assistente',
|
|
609
|
+
es: 'Asistente',
|
|
610
|
+
de: 'Assistent',
|
|
611
|
+
'pt-br': 'Assistente',
|
|
612
|
+
ar: 'مساعد',
|
|
613
|
+
zh: '助手',
|
|
614
|
+
ru: 'Ассистент',
|
|
615
|
+
},
|
|
616
|
+
},
|
|
617
|
+
{
|
|
618
|
+
Key: 'Your personal or company information is kept private and secure within this chat.',
|
|
619
|
+
DefaultValue: 'Your personal or company information is kept private and secure within this chat.',
|
|
620
|
+
Translations: {
|
|
621
|
+
en: 'Your personal or company information is kept private and secure within this chat.',
|
|
622
|
+
fr: 'Vos informations personnelles ou celles de votre entreprise sont conservées privées et sécurisées dans cette conversation.',
|
|
623
|
+
it: "Le tue informazioni personali o aziendali sono mantenute private e sicure all'interno di questa chat.",
|
|
624
|
+
es: 'Tu información personal o de la empresa se mantiene privada y segura dentro de este chat.',
|
|
625
|
+
de: 'Ihre persönlichen oder geschäftlichen Informationen bleiben in diesem Chat privat und sicher.',
|
|
626
|
+
'pt-br': 'Suas informações pessoais ou da empresa são mantidas privadas e seguras dentro deste chat.',
|
|
627
|
+
ar: 'تظل معلوماتك الشخصية أو معلومات شركتك خاصة وآمنة داخل هذه المحادثة.',
|
|
628
|
+
zh: '您的个人或公司信息在此聊天中保持私密和安全。',
|
|
629
|
+
ru: 'Ваша личная или корпоративная информация остается конфиденциальной и защищенной в этом чате.',
|
|
630
|
+
},
|
|
631
|
+
},
|
|
632
|
+
{
|
|
633
|
+
Key: 'Send message',
|
|
634
|
+
DefaultValue: 'Send message',
|
|
635
|
+
Translations: {
|
|
636
|
+
en: 'Send message',
|
|
637
|
+
fr: 'Envoyer un message',
|
|
638
|
+
it: 'Invia messaggio',
|
|
639
|
+
es: 'Enviar mensaje',
|
|
640
|
+
de: 'Nachricht senden',
|
|
641
|
+
'pt-br': 'Enviar mensagem',
|
|
642
|
+
ar: 'إرسال رسالة',
|
|
643
|
+
zh: '发送消息',
|
|
644
|
+
ru: 'Отправить сообщение',
|
|
645
|
+
},
|
|
646
|
+
},
|
|
647
|
+
{
|
|
648
|
+
Key: 'Platform GPT',
|
|
649
|
+
DefaultValue: 'Platform GPT',
|
|
650
|
+
Translations: {
|
|
651
|
+
en: 'Platform GPT',
|
|
652
|
+
fr: 'Plateforme GPT',
|
|
653
|
+
it: 'Piattaforma GPT',
|
|
654
|
+
es: 'Plataforma GPT',
|
|
655
|
+
de: 'Plattform GPT',
|
|
656
|
+
'pt-br': 'Plataforma GPT',
|
|
657
|
+
ar: 'منصة GPT',
|
|
658
|
+
zh: '平台 GPT',
|
|
659
|
+
ru: 'Платформа GPT',
|
|
660
|
+
},
|
|
661
|
+
},
|
|
662
|
+
{
|
|
663
|
+
Key: 'New Chat',
|
|
664
|
+
DefaultValue: 'New Chat',
|
|
665
|
+
Translations: {
|
|
666
|
+
en: 'New Chat',
|
|
667
|
+
fr: 'Nouvelle conversation',
|
|
668
|
+
it: 'Nuova chat',
|
|
669
|
+
es: 'Nuevo chat',
|
|
670
|
+
de: 'Neuer Chat',
|
|
671
|
+
'pt-br': 'Novo chat',
|
|
672
|
+
ar: 'محادثة جديدة',
|
|
673
|
+
zh: '新聊天',
|
|
674
|
+
ru: 'Новый чат',
|
|
675
|
+
},
|
|
676
|
+
},
|
|
677
|
+
{
|
|
678
|
+
Key: 'You',
|
|
679
|
+
DefaultValue: 'You',
|
|
680
|
+
Translations: {
|
|
681
|
+
en: 'You',
|
|
682
|
+
fr: 'Vous',
|
|
683
|
+
it: 'Tu',
|
|
684
|
+
es: 'Tú',
|
|
685
|
+
de: 'Du',
|
|
686
|
+
'pt-br': 'Você',
|
|
687
|
+
ar: 'أنت',
|
|
688
|
+
zh: '您',
|
|
689
|
+
ru: 'Вы',
|
|
690
|
+
},
|
|
691
|
+
},
|
|
692
|
+
{
|
|
693
|
+
Key: 'Write your message',
|
|
694
|
+
DefaultValue: 'Write your message',
|
|
695
|
+
Translations: {
|
|
696
|
+
en: 'Write your message',
|
|
697
|
+
fr: 'Écrivez votre message',
|
|
698
|
+
it: 'Scrivi il tuo messaggio',
|
|
699
|
+
es: 'Escribe tu mensaje',
|
|
700
|
+
de: 'Schreiben Sie Ihre Nachricht',
|
|
701
|
+
'pt-br': 'Escreva sua mensagem',
|
|
702
|
+
ar: 'اكتب رسالتك',
|
|
703
|
+
zh: '写下您的消息',
|
|
704
|
+
ru: 'Напишите ваше сообщение',
|
|
705
|
+
},
|
|
706
|
+
},
|
|
707
|
+
{
|
|
708
|
+
Key: 'Send',
|
|
709
|
+
DefaultValue: 'Send',
|
|
710
|
+
Translations: {
|
|
711
|
+
en: 'Send',
|
|
712
|
+
fr: 'Envoyer',
|
|
713
|
+
it: 'Invia',
|
|
714
|
+
es: 'Enviar',
|
|
715
|
+
de: 'Senden',
|
|
716
|
+
'pt-br': 'Enviar',
|
|
717
|
+
ar: 'إرسال',
|
|
718
|
+
zh: '发送',
|
|
719
|
+
ru: 'Отправить',
|
|
720
|
+
},
|
|
721
|
+
},
|
|
722
|
+
{
|
|
723
|
+
Key: 'Call Interface',
|
|
724
|
+
DefaultValue: 'Call Interface',
|
|
725
|
+
Translations: {
|
|
726
|
+
en: 'Call Interface',
|
|
727
|
+
fr: "Interface d'appel",
|
|
728
|
+
it: 'Interfaccia chiamata',
|
|
729
|
+
es: 'Interfaz de llamada',
|
|
730
|
+
de: 'Anrufoberfläche',
|
|
731
|
+
'pt-br': 'Interface de chamada',
|
|
732
|
+
ar: 'واجهة الاتصال',
|
|
733
|
+
zh: '呼叫界面',
|
|
734
|
+
ru: 'Интерфейс звонка',
|
|
735
|
+
},
|
|
736
|
+
},
|
|
737
|
+
{
|
|
738
|
+
Key: 'Close',
|
|
739
|
+
DefaultValue: 'Close',
|
|
740
|
+
Translations: {
|
|
741
|
+
en: 'Close',
|
|
742
|
+
fr: 'Fermer',
|
|
743
|
+
it: 'Chiudi',
|
|
744
|
+
es: 'Cerrar',
|
|
745
|
+
de: 'Schließen',
|
|
746
|
+
'pt-br': 'Fechar',
|
|
747
|
+
ar: 'إغلاق',
|
|
748
|
+
zh: '关闭',
|
|
749
|
+
ru: 'Закрыть',
|
|
750
|
+
},
|
|
751
|
+
},
|
|
752
|
+
];
|
|
753
|
+
}
|
|
754
|
+
TranslationService.prototype.setEventId = function (id) {
|
|
755
|
+
this.eventId = id;
|
|
756
|
+
};
|
|
757
|
+
TranslationService.prototype.getTranslation = function (key) {
|
|
758
|
+
console.log('eventId', this.eventId);
|
|
759
|
+
// let lang = String(this.getLang(this.eventId)).replace(/^"|"$/g, '');
|
|
760
|
+
var lang = (localStorage.getItem('defaultLanguage-' + this.eventId) || 'en').replace(/^"|"$/g, '');
|
|
761
|
+
var entry = this.translationsData.find(function (item) { return item.Key === key; });
|
|
762
|
+
if (!entry) {
|
|
763
|
+
return key; // fallback
|
|
764
|
+
}
|
|
765
|
+
return entry.Translations[lang] || entry.DefaultValue || key;
|
|
766
|
+
};
|
|
767
|
+
TranslationService.prototype.getLang = function (eventId) {
|
|
768
|
+
var suffix = eventId ? "-" + eventId : '';
|
|
769
|
+
var storageKey = "defaultLanguage" + suffix;
|
|
770
|
+
return localStorage.getItem(storageKey) || 'en';
|
|
771
|
+
};
|
|
772
|
+
return TranslationService;
|
|
773
|
+
}());
|
|
774
|
+
TranslationService.ɵprov = i0__namespace.ɵɵdefineInjectable({ factory: function TranslationService_Factory() { return new TranslationService(); }, token: TranslationService, providedIn: "root" });
|
|
775
|
+
TranslationService.decorators = [
|
|
776
|
+
{ type: i0.Injectable, args: [{
|
|
777
|
+
providedIn: 'root',
|
|
778
|
+
},] }
|
|
779
|
+
];
|
|
780
|
+
|
|
781
|
+
var formatHoursAndMinutes = function (date) {
|
|
782
|
+
var hours = date.getHours() % 12;
|
|
783
|
+
var minutes = date.getMinutes();
|
|
784
|
+
var amPm = date.getHours() < 12 ? 'AM' : 'PM';
|
|
785
|
+
if (hours === 0)
|
|
786
|
+
hours = 12;
|
|
787
|
+
var formattedHours = hours < 10 ? "0" + hours : hours;
|
|
788
|
+
var formattedMinutes = minutes < 10 ? "0" + minutes : minutes;
|
|
789
|
+
return formattedHours + ":" + formattedMinutes + " " + amPm;
|
|
790
|
+
};
|
|
791
|
+
var ɵ0 = formatHoursAndMinutes;
|
|
792
|
+
var formatNow = function (timezone) {
|
|
793
|
+
var now = new Date();
|
|
794
|
+
if (timezone) {
|
|
795
|
+
var options = {
|
|
796
|
+
hour12: true,
|
|
797
|
+
hour: 'numeric',
|
|
798
|
+
minute: 'numeric',
|
|
799
|
+
timeZone: timezone,
|
|
800
|
+
};
|
|
801
|
+
return now.toLocaleString('en-US', options);
|
|
802
|
+
}
|
|
803
|
+
return formatHoursAndMinutes(now);
|
|
804
|
+
};
|
|
805
|
+
var formatTimeStamps = function (timezone, timestamps) {
|
|
806
|
+
var date = new Date(timestamps + 'Z');
|
|
807
|
+
var options = {
|
|
808
|
+
hour12: true,
|
|
809
|
+
hour: 'numeric',
|
|
810
|
+
minute: 'numeric',
|
|
811
|
+
timeZone: timezone,
|
|
812
|
+
};
|
|
813
|
+
return date.toLocaleString('en-US', options);
|
|
814
|
+
};
|
|
815
|
+
|
|
816
|
+
var prod_environment = {
|
|
817
|
+
USERS_API: 'https://es-user.social27.com/api',
|
|
818
|
+
BASE_URL: 'https://agent-api.hivegpt.ai',
|
|
819
|
+
AGENTS_API: 'https://hive-ai.social27.com/api',
|
|
820
|
+
API_KEY: '82595783-dc9c-4513-8204-709818d51be3',
|
|
821
|
+
SocketUrl: 'https://notif-v2-ws.social27.com/'
|
|
822
|
+
};
|
|
823
|
+
var dev_environment = {
|
|
824
|
+
USERS_API: 'https://pre-user.social27.com/api',
|
|
825
|
+
BASE_URL: 'https://pre-agent-api.hivegpt.ai',
|
|
826
|
+
AGENTS_API: 'https://hive-pre-ai.social27.com/api',
|
|
827
|
+
API_KEY: '66d59244c50b8fb597a101t1',
|
|
828
|
+
SocketUrl: 'https://notif-ws-staging.social27.com/',
|
|
829
|
+
};
|
|
830
|
+
|
|
831
|
+
var ConversationService = /** @class */ (function () {
|
|
832
|
+
function ConversationService() {
|
|
833
|
+
this.conversationStorageKeyPrefix = 'conversationKey_';
|
|
834
|
+
this.sessionStorageKeyPrefix = 'sessionKey_';
|
|
835
|
+
this.userSpecificNotification = new rxjs.Subject();
|
|
836
|
+
}
|
|
837
|
+
ConversationService.prototype.generateKey = function () {
|
|
838
|
+
var timestamp = Math.floor(new Date().getTime() / 1000).toString(16);
|
|
839
|
+
var randomHex = 'xxxxxxxxxxxxxxxx'.replace(/[x]/g, function () {
|
|
840
|
+
return Math.floor(Math.random() * 16).toString(16);
|
|
841
|
+
});
|
|
842
|
+
return timestamp + randomHex;
|
|
843
|
+
};
|
|
844
|
+
ConversationService.prototype.getKey = function (botId, resetKey) {
|
|
845
|
+
if (resetKey === void 0) { resetKey = false; }
|
|
846
|
+
var storageKey = "" + this.conversationStorageKeyPrefix + botId;
|
|
847
|
+
var value = localStorage.getItem(storageKey);
|
|
848
|
+
if (!value || resetKey) {
|
|
849
|
+
value = this.generateKey();
|
|
850
|
+
localStorage.setItem(storageKey, value);
|
|
851
|
+
}
|
|
852
|
+
return value;
|
|
853
|
+
};
|
|
854
|
+
ConversationService.prototype.getSessionKey = function (sessionId, resetKey) {
|
|
855
|
+
if (resetKey === void 0) { resetKey = false; }
|
|
856
|
+
var storageKey = "" + this.sessionStorageKeyPrefix + sessionId;
|
|
857
|
+
var value = localStorage.getItem(storageKey);
|
|
858
|
+
if (!value || resetKey) {
|
|
859
|
+
value = this.generateKey();
|
|
860
|
+
localStorage.setItem(storageKey, value);
|
|
861
|
+
}
|
|
862
|
+
return value;
|
|
863
|
+
};
|
|
864
|
+
ConversationService.prototype.sendValidatedUserData = function (message) {
|
|
865
|
+
this.userSpecificNotification.next(message);
|
|
866
|
+
};
|
|
867
|
+
ConversationService.prototype.getUserSpecificNotification = function () {
|
|
868
|
+
return this.userSpecificNotification.asObservable();
|
|
869
|
+
};
|
|
870
|
+
return ConversationService;
|
|
871
|
+
}());
|
|
872
|
+
ConversationService.ɵprov = i0__namespace.ɵɵdefineInjectable({ factory: function ConversationService_Factory() { return new ConversationService(); }, token: ConversationService, providedIn: "root" });
|
|
873
|
+
ConversationService.decorators = [
|
|
874
|
+
{ type: i0.Injectable, args: [{
|
|
875
|
+
providedIn: 'root',
|
|
876
|
+
},] }
|
|
877
|
+
];
|
|
878
|
+
ConversationService.ctorParameters = function () { return []; };
|
|
879
|
+
|
|
880
|
+
var NotificationSocket = /** @class */ (function (_super) {
|
|
881
|
+
__extends(NotificationSocket, _super);
|
|
882
|
+
function NotificationSocket() {
|
|
883
|
+
var _this = _super.call(this, socketConfig) || this;
|
|
884
|
+
// Log connection status
|
|
885
|
+
_this.on('connect', function () {
|
|
886
|
+
console.log('Socket connected');
|
|
887
|
+
});
|
|
888
|
+
_this.on('disconnect', function () {
|
|
889
|
+
console.warn('Socket disconnected');
|
|
890
|
+
});
|
|
891
|
+
_this.on('connect_error', function (err) {
|
|
892
|
+
console.error('Socket connection error:', err);
|
|
893
|
+
});
|
|
894
|
+
return _this;
|
|
895
|
+
}
|
|
896
|
+
return NotificationSocket;
|
|
897
|
+
}(ngxSocketIo.Socket));
|
|
898
|
+
NotificationSocket.ɵprov = i0__namespace.ɵɵdefineInjectable({ factory: function NotificationSocket_Factory() { return new NotificationSocket(); }, token: NotificationSocket, providedIn: "root" });
|
|
899
|
+
NotificationSocket.decorators = [
|
|
900
|
+
{ type: i0.Injectable, args: [{
|
|
901
|
+
providedIn: 'root' // This ensures the service is available across the application
|
|
902
|
+
},] }
|
|
903
|
+
];
|
|
904
|
+
NotificationSocket.ctorParameters = function () { return []; };
|
|
905
|
+
var socketConfig = {
|
|
906
|
+
url: prod_environment.SocketUrl,
|
|
907
|
+
options: {
|
|
908
|
+
transports: ['websocket', 'polling'],
|
|
909
|
+
reconnection: true,
|
|
910
|
+
autoConnect: true,
|
|
911
|
+
upgrade: true,
|
|
912
|
+
reconnectionDelay: 1000,
|
|
913
|
+
reconnectionDelayMax: 5000,
|
|
914
|
+
reconnectionAttempts: Infinity
|
|
915
|
+
}
|
|
916
|
+
};
|
|
917
|
+
|
|
918
|
+
var SocketService = /** @class */ (function () {
|
|
919
|
+
function SocketService(conversationService, notificationSocket) {
|
|
920
|
+
this.conversationService = conversationService;
|
|
921
|
+
this.notificationSocket = notificationSocket;
|
|
922
|
+
this.isCommonSocketInitialized = false;
|
|
923
|
+
this.isUserSpecificSocketInitialized = false;
|
|
924
|
+
this.isUserSpecificEventReleased = true;
|
|
925
|
+
this.messageQueue = [];
|
|
926
|
+
this.releaseInterval = 1000;
|
|
927
|
+
this.intervalSetup = false;
|
|
928
|
+
this.startReleasingMessages();
|
|
929
|
+
}
|
|
930
|
+
SocketService.prototype.isSocketInitialized = function (isCommon) {
|
|
931
|
+
return isCommon
|
|
932
|
+
? this.isCommonSocketInitialized
|
|
933
|
+
: this.isUserSpecificSocketInitialized &&
|
|
934
|
+
!this.isUserSpecificEventReleased;
|
|
935
|
+
};
|
|
936
|
+
SocketService.prototype.disconnectSocketConnection = function () {
|
|
937
|
+
this.notificationSocket.disconnect();
|
|
938
|
+
};
|
|
939
|
+
SocketService.prototype.connectSocketConnection = function () {
|
|
940
|
+
this.notificationSocket.connect();
|
|
941
|
+
};
|
|
942
|
+
SocketService.prototype.registerUserSpecificHiveSocket = function (botId, conversation_id, org_id) {
|
|
943
|
+
var _this = this;
|
|
944
|
+
var commonNotification = 'commonNotification';
|
|
945
|
+
var groupId = "Hive_AI_Notifs_" + botId + "_" + conversation_id;
|
|
946
|
+
var groupId_org = "Hive_AI_Notifs_" + org_id;
|
|
947
|
+
// Remove any pre-existing listeners for commonNotification
|
|
948
|
+
// this.notificationSocket.removeAllListeners(commonNotification);
|
|
949
|
+
// Join the group again with updated botId and conversation_id
|
|
950
|
+
this.notificationSocket.emit('joinData', { groupId: groupId });
|
|
951
|
+
this.notificationSocket.emit('joinData', { groupId: groupId_org });
|
|
952
|
+
// Re-register for common notifications
|
|
953
|
+
this.notificationSocket.fromEvent(commonNotification).subscribe(function (res) {
|
|
954
|
+
console.log('Received commonNotification:', res);
|
|
955
|
+
_this.conversationService.sendValidatedUserData(res);
|
|
956
|
+
}, function (error) {
|
|
957
|
+
console.error('Error receiving commonNotification:', error);
|
|
958
|
+
});
|
|
959
|
+
};
|
|
960
|
+
SocketService.prototype.startReleasingMessages = function () {
|
|
961
|
+
var _this = this;
|
|
962
|
+
if (!this.intervalSetup) {
|
|
963
|
+
setInterval(function () {
|
|
964
|
+
if (_this.messageQueue.length > 0) {
|
|
965
|
+
var message = _this.messageQueue.shift(); // Remove the first message from the queue
|
|
966
|
+
// Handle the message here, e.g., send it to the server or process it
|
|
967
|
+
console.log('Releasing message from queue:', message);
|
|
968
|
+
// this.campaignService.sendValidatedUserData(message);
|
|
969
|
+
}
|
|
970
|
+
}, this.releaseInterval);
|
|
971
|
+
this.intervalSetup = true; // Prevents multiple intervals
|
|
972
|
+
}
|
|
973
|
+
};
|
|
974
|
+
return SocketService;
|
|
975
|
+
}());
|
|
976
|
+
SocketService.ɵprov = i0__namespace.ɵɵdefineInjectable({ factory: function SocketService_Factory() { return new SocketService(i0__namespace.ɵɵinject(ConversationService), i0__namespace.ɵɵinject(NotificationSocket)); }, token: SocketService, providedIn: "root" });
|
|
977
|
+
SocketService.decorators = [
|
|
978
|
+
{ type: i0.Injectable, args: [{
|
|
979
|
+
providedIn: 'root',
|
|
980
|
+
},] }
|
|
981
|
+
];
|
|
982
|
+
SocketService.ctorParameters = function () { return [
|
|
983
|
+
{ type: ConversationService },
|
|
984
|
+
{ type: NotificationSocket }
|
|
985
|
+
]; };
|
|
986
|
+
|
|
987
|
+
var BotsService = /** @class */ (function () {
|
|
988
|
+
function BotsService(http) {
|
|
989
|
+
this.http = http;
|
|
990
|
+
this.eventDescription = new rxjs.Subject();
|
|
991
|
+
this.bot_api = 'https://agent-api.hivegpt.ai/';
|
|
992
|
+
}
|
|
993
|
+
BotsService.prototype.fetchSpeechAuthorizationToken = function (botId, apiKey, domain) {
|
|
994
|
+
var headers = new i1.HttpHeaders({
|
|
995
|
+
'Content-Type': 'application/json',
|
|
996
|
+
'x-api-key': apiKey,
|
|
997
|
+
'hive-bot-id': botId,
|
|
998
|
+
'domain-authority': domain
|
|
999
|
+
});
|
|
1000
|
+
var apiUrl = this.bot_api + "speech/issue_token";
|
|
1001
|
+
var url = "" + apiUrl;
|
|
1002
|
+
return this.http.get(url, { headers: headers }).pipe(operators.map(function (resp) {
|
|
1003
|
+
return resp.token;
|
|
1004
|
+
}));
|
|
1005
|
+
};
|
|
1006
|
+
BotsService.prototype.getWorkflowsByOrgId = function (orgId) {
|
|
1007
|
+
var apiUrl = this.bot_api + "workflows";
|
|
1008
|
+
var url = apiUrl + "?org_id=" + orgId;
|
|
1009
|
+
return this.http.get(url).pipe(operators.map(function (resp) {
|
|
1010
|
+
return resp;
|
|
1011
|
+
}));
|
|
1012
|
+
};
|
|
1013
|
+
BotsService.prototype.getWorkflowExecutionById = function (executionId) {
|
|
1014
|
+
var apiUrl = this.bot_api + "workflows/execution/" + executionId;
|
|
1015
|
+
return this.http.get(apiUrl).pipe(operators.map(function (resp) {
|
|
1016
|
+
return resp;
|
|
1017
|
+
}));
|
|
1018
|
+
};
|
|
1019
|
+
return BotsService;
|
|
1020
|
+
}());
|
|
1021
|
+
BotsService.ɵprov = i0__namespace.ɵɵdefineInjectable({ factory: function BotsService_Factory() { return new BotsService(i0__namespace.ɵɵinject(i1__namespace.HttpClient)); }, token: BotsService, providedIn: "root" });
|
|
1022
|
+
BotsService.decorators = [
|
|
1023
|
+
{ type: i0.Injectable, args: [{
|
|
1024
|
+
providedIn: 'root',
|
|
1025
|
+
},] }
|
|
1026
|
+
];
|
|
1027
|
+
BotsService.ctorParameters = function () { return [
|
|
1028
|
+
{ type: i1.HttpClient }
|
|
1029
|
+
]; };
|
|
1030
|
+
|
|
1031
|
+
var ChatDrawerComponent = /** @class */ (function () {
|
|
1032
|
+
function ChatDrawerComponent(fb, botService, cdr, http, sanitizer, elementRef, renderer, socketService, conversationService, // private platform: Platform
|
|
1033
|
+
translationService) {
|
|
1034
|
+
var _this = this;
|
|
1035
|
+
this.fb = fb;
|
|
1036
|
+
this.botService = botService;
|
|
1037
|
+
this.cdr = cdr;
|
|
1038
|
+
this.http = http;
|
|
1039
|
+
this.sanitizer = sanitizer;
|
|
1040
|
+
this.elementRef = elementRef;
|
|
1041
|
+
this.renderer = renderer;
|
|
1042
|
+
this.socketService = socketService;
|
|
1043
|
+
this.conversationService = conversationService;
|
|
1044
|
+
this.translationService = translationService;
|
|
1045
|
+
this.bodyOverflowClass = 'body-overflow-hidden';
|
|
1046
|
+
this.isCollapsedTrue = false;
|
|
1047
|
+
this.copilotName = 'HiveXGPT';
|
|
1048
|
+
this.feedbackEvent = new i0.EventEmitter();
|
|
1049
|
+
this.onCloseEvent = new i0.EventEmitter();
|
|
1050
|
+
this.openPage = new i0.EventEmitter();
|
|
1051
|
+
this.sessionActions = new i0.EventEmitter();
|
|
1052
|
+
this.closeBot = new i0.EventEmitter();
|
|
1053
|
+
this.connectWithUser = new i0.EventEmitter();
|
|
1054
|
+
this.scheduleMeeting = new i0.EventEmitter();
|
|
1055
|
+
this.refreshToken = new i0.EventEmitter();
|
|
1056
|
+
this.openSupport = new i0.EventEmitter();
|
|
1057
|
+
this.autogenKey = 'Autogen_eDJTtEU-NB0RtIpzq1w';
|
|
1058
|
+
this.addToMyAgendaAction = 'add_to_my_agenda';
|
|
1059
|
+
this.myUpcomingSessionAction = 'my_upcomming_session';
|
|
1060
|
+
this.connectOrFollowAction = 'connect_or_follow';
|
|
1061
|
+
this.aiResponse = '';
|
|
1062
|
+
this.chatLog = [];
|
|
1063
|
+
this.decoder = new TextDecoder();
|
|
1064
|
+
this.feedbackDone = false;
|
|
1065
|
+
this.greetingMsg = '';
|
|
1066
|
+
this.hasBackdropValue = false;
|
|
1067
|
+
this.input = '';
|
|
1068
|
+
this.listenerAdded = false;
|
|
1069
|
+
this.loading = false;
|
|
1070
|
+
this.mode = 'over';
|
|
1071
|
+
this.quickPrompts = [];
|
|
1072
|
+
this.thumbsDownMsgIndex = 0;
|
|
1073
|
+
this.userName = '';
|
|
1074
|
+
this.showStartAgain = false;
|
|
1075
|
+
this.isIOSDevice = false;
|
|
1076
|
+
this.showFeedBackIconsIndex = null;
|
|
1077
|
+
this.temperature = 1;
|
|
1078
|
+
this.speakers = [];
|
|
1079
|
+
this.conSessionKey = '';
|
|
1080
|
+
this.currentWorkflowActionProgress = 0;
|
|
1081
|
+
this.currentWorkflowAction = '';
|
|
1082
|
+
this.recognizedText = '';
|
|
1083
|
+
this.authorizationToken = '';
|
|
1084
|
+
this.region = 'westeurope'; // Set your Azure region here
|
|
1085
|
+
this.domainAuthorityValue = "prod-lite";
|
|
1086
|
+
this.isChatingWithAi = false;
|
|
1087
|
+
this.readAllChunks = function (stream) {
|
|
1088
|
+
var reader = stream.getReader();
|
|
1089
|
+
var allSuggestions = [];
|
|
1090
|
+
reader.closed.catch(function (err) {
|
|
1091
|
+
if (err) {
|
|
1092
|
+
console.error('Error reading stream: ', err);
|
|
1093
|
+
}
|
|
1094
|
+
_this.isChatingWithAi = false;
|
|
1095
|
+
_this.scrollToBottom();
|
|
1096
|
+
return;
|
|
1097
|
+
});
|
|
1098
|
+
return new ReadableStream({
|
|
1099
|
+
start: function (controller) {
|
|
1100
|
+
return _this.pump(controller, reader, allSuggestions);
|
|
1101
|
+
},
|
|
1102
|
+
});
|
|
1103
|
+
};
|
|
1104
|
+
this.currentMessageForEditor = '';
|
|
1105
|
+
this.currentIndexForEditor = -1;
|
|
1106
|
+
this.isDropdownOpen = false;
|
|
1107
|
+
this.selectedAgents = [];
|
|
1108
|
+
this.allSelected = false;
|
|
1109
|
+
this.isDocInEditMode = false;
|
|
1110
|
+
this.isContentLoaded = false;
|
|
1111
|
+
this.isCollapsed = false;
|
|
1112
|
+
this.isCollapsedForGraph = false;
|
|
1113
|
+
this.isCollapsedForFGraph = false;
|
|
1114
|
+
// [
|
|
1115
|
+
// {
|
|
1116
|
+
// "title": "AI News January 2024: In-Depth and Concise - The AI Track",
|
|
1117
|
+
// "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.",
|
|
1118
|
+
// "link": "https://theaitrack.com/ai-news-january-2024/"
|
|
1119
|
+
// },
|
|
1120
|
+
// {
|
|
1121
|
+
// "title": "Top AI News, January 2024 - Everypixel Journal",
|
|
1122
|
+
// "desc": "In this monthly roundup, we spotlight the top AI news stories from January, including the OpenAI vs. The New York Times Lawsuit.",
|
|
1123
|
+
// "link": "https://journal.everypixel.com/top-ai-news-january-2024"
|
|
1124
|
+
// },
|
|
1125
|
+
// {
|
|
1126
|
+
// "title": "AI News July 2024: In-Depth and Concise - The AI Track",
|
|
1127
|
+
// "desc": "This page features AI News for July 2024, highlighting significant events such as Canva acquiring Leonardo AI.",
|
|
1128
|
+
// "link": "https://theaitrack.com/ai-news-july-2024-in-depth-and-concise/"
|
|
1129
|
+
// },
|
|
1130
|
+
// {
|
|
1131
|
+
// "title": "January news roundup: What's new in the world of AI? - Pluralsight",
|
|
1132
|
+
// "desc": "OpenAI’s new GPT store, business-ready ChatGPT plans, and a predicted rise in AI-powered cybercrime.",
|
|
1133
|
+
// "link": "https://www.pluralsight.com/resources/blog/data/ai-this-month-january-2024"
|
|
1134
|
+
// },
|
|
1135
|
+
// {
|
|
1136
|
+
// "title": "AI News August 2024: In-Depth and Concise - The AI Track",
|
|
1137
|
+
// "desc": "This page features AI News for August 2024, with highlights such as Nvidia delaying the “Blackwell” B200 AI chips delivery.",
|
|
1138
|
+
// "link": "https://theaitrack.com/ai-news-august-2024-in-depth-and-concise-duplicate/"
|
|
1139
|
+
// }
|
|
1140
|
+
// ]
|
|
1141
|
+
this.dateTime = { now: new Date().toISOString() };
|
|
1142
|
+
this.currentSourcesList = [];
|
|
1143
|
+
this.isShowEditorButton = true;
|
|
1144
|
+
this.isDrawerOpen = true;
|
|
1145
|
+
this.chatMain = new i0.ElementRef(null);
|
|
1146
|
+
// if (this.platform.IOS) {
|
|
1147
|
+
// this.isIOSDevice = true;
|
|
1148
|
+
// }
|
|
1149
|
+
}
|
|
1150
|
+
ChatDrawerComponent.prototype.getTranslation = function (key) {
|
|
1151
|
+
return this.translationService.getTranslation(key);
|
|
1152
|
+
};
|
|
1153
|
+
ChatDrawerComponent.prototype.ngOnChanges = function (changes) {
|
|
1154
|
+
// Handle eventId changes to update translation service
|
|
1155
|
+
if (changes.eventId && changes.eventId.currentValue) {
|
|
1156
|
+
this.translationService.setEventId(changes.eventId.currentValue);
|
|
1157
|
+
}
|
|
1158
|
+
if (changes.s27Token) {
|
|
1159
|
+
if (changes.s27Token.currentValue != changes.s27Token.previousValue) {
|
|
1160
|
+
this.s27Token = changes.s27Token.currentValue;
|
|
1161
|
+
console.log('isFetchDataFor: ', this.isFetchDataFor);
|
|
1162
|
+
console.log('msg: ', this.msg);
|
|
1163
|
+
console.log('chat: ', this.chat);
|
|
1164
|
+
if (this.is401) {
|
|
1165
|
+
if (this.isFetchDataFor) {
|
|
1166
|
+
this.fetchDataFor(this.msg, this.chat);
|
|
1167
|
+
}
|
|
1168
|
+
else {
|
|
1169
|
+
this.fetchData(this.msg);
|
|
1170
|
+
}
|
|
1171
|
+
}
|
|
1172
|
+
}
|
|
1173
|
+
}
|
|
1174
|
+
if (changes.orgId) {
|
|
1175
|
+
if (changes.orgId.currentValue != changes.orgId.previousValue &&
|
|
1176
|
+
changes.orgId.currentValue) {
|
|
1177
|
+
this.initializeSocket();
|
|
1178
|
+
}
|
|
1179
|
+
}
|
|
1180
|
+
};
|
|
1181
|
+
ChatDrawerComponent.prototype.ngOnInit = function () {
|
|
1182
|
+
var _this = this;
|
|
1183
|
+
// Set the eventId in translation service to get the correct language from localStorage
|
|
1184
|
+
if (this.eventId) {
|
|
1185
|
+
this.translationService.setEventId(this.eventId);
|
|
1186
|
+
}
|
|
1187
|
+
this.environment = this.isDev ? dev_environment : prod_environment;
|
|
1188
|
+
var domain = window.location.hostname;
|
|
1189
|
+
// Determine the header value based on the domain
|
|
1190
|
+
if (domain.includes('pre-app.social27.com')) {
|
|
1191
|
+
this.domainAuthorityValue = 'pre-prod-lite';
|
|
1192
|
+
}
|
|
1193
|
+
else if (domain.includes('app.social27.com')) {
|
|
1194
|
+
this.domainAuthorityValue = 'prod-lite';
|
|
1195
|
+
}
|
|
1196
|
+
else if (domain.includes('hivegpt.io')) {
|
|
1197
|
+
this.domainAuthorityValue = 'hivegpt';
|
|
1198
|
+
}
|
|
1199
|
+
// this.fetchMyConnections().subscribe();
|
|
1200
|
+
// this.fetchPendingRequests().subscribe();
|
|
1201
|
+
this.changeTemperature(this.temperature);
|
|
1202
|
+
this.fetchBotConfig().subscribe(function (res) {
|
|
1203
|
+
_this.cdr.markForCheck();
|
|
1204
|
+
_this.fetchChatHistory().subscribe(function (response) {
|
|
1205
|
+
_this.loading = false;
|
|
1206
|
+
_this.mapChatHistory(response);
|
|
1207
|
+
_this.cdr.markForCheck();
|
|
1208
|
+
}, function (err) {
|
|
1209
|
+
console.error('Error fetching chat history:', err);
|
|
1210
|
+
});
|
|
1211
|
+
}, function (err) {
|
|
1212
|
+
console.error('Error fetching chat history:', err);
|
|
1213
|
+
});
|
|
1214
|
+
// this.fetchAgents();
|
|
1215
|
+
// this.fetchEditorContent();
|
|
1216
|
+
this.cdr.markForCheck();
|
|
1217
|
+
// this.initializeSocket();
|
|
1218
|
+
this.botService.fetchSpeechAuthorizationToken(this.botId, this.apiKey, this.domainAuthorityValue).subscribe(function (token) {
|
|
1219
|
+
_this.authorizationToken = token;
|
|
1220
|
+
_this.initializeSpeechRecognizer(token);
|
|
1221
|
+
});
|
|
1222
|
+
};
|
|
1223
|
+
ChatDrawerComponent.prototype.initializeSocket = function () {
|
|
1224
|
+
var _this = this;
|
|
1225
|
+
try {
|
|
1226
|
+
this.socketService.disconnectSocketConnection();
|
|
1227
|
+
}
|
|
1228
|
+
catch (error) { }
|
|
1229
|
+
setTimeout(function () {
|
|
1230
|
+
_this.socketService.connectSocketConnection();
|
|
1231
|
+
setTimeout(function () {
|
|
1232
|
+
console.log('YES INIT');
|
|
1233
|
+
var conversation_id = _this.conversationService.getKey(_this.botId);
|
|
1234
|
+
_this.socketService.registerUserSpecificHiveSocket(_this.botId, conversation_id, _this.orgId);
|
|
1235
|
+
setTimeout(function () {
|
|
1236
|
+
_this.listenSockets();
|
|
1237
|
+
}, 300);
|
|
1238
|
+
}, 200);
|
|
1239
|
+
}, 300);
|
|
1240
|
+
};
|
|
1241
|
+
ChatDrawerComponent.prototype.listenSockets = function () {
|
|
1242
|
+
var _this = this;
|
|
1243
|
+
if (this.eventSubscription) {
|
|
1244
|
+
this.eventSubscription.unsubscribe();
|
|
1245
|
+
}
|
|
1246
|
+
console.log('Listen Socket');
|
|
1247
|
+
this.eventSubscription = this.conversationService
|
|
1248
|
+
.getUserSpecificNotification()
|
|
1249
|
+
.subscribe(function (res) {
|
|
1250
|
+
var _a, _b, _c, _d, _e, _f;
|
|
1251
|
+
console.log('Listen Socket response');
|
|
1252
|
+
console.log(res);
|
|
1253
|
+
// Check if OtherFields exists in the response
|
|
1254
|
+
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) {
|
|
1255
|
+
var _g = (_c = res === null || res === void 0 ? void 0 : res.m) === null || _c === void 0 ? void 0 : _c.OtherFields, percentage = _g.percentage, output = _g.output, action_name = _g.action_name, current_action_name_1 = _g.current_action_name, workflow_execution_id = _g.workflow_execution_id, time_stamp = _g.time_stamp;
|
|
1256
|
+
_this.currentWorkflowActionProgress = percentage;
|
|
1257
|
+
_this.currentWorkflowAction = action_name;
|
|
1258
|
+
var actionIndex = _this.workflowExecutionDetails.Actions.findIndex(function (a) { return a.Name == current_action_name_1; });
|
|
1259
|
+
if (actionIndex !== -1) {
|
|
1260
|
+
_this.workflowExecutionDetails.Actions[actionIndex]['Output'] = output;
|
|
1261
|
+
_this.workflowExecutionDetails.Actions[actionIndex]['InsertTimeStamp'] = formatTimeStamps(_this.timezone, time_stamp);
|
|
1262
|
+
}
|
|
1263
|
+
else {
|
|
1264
|
+
console.error("Action with name " + action_name + " not found");
|
|
1265
|
+
}
|
|
1266
|
+
_this.currentWorkflowExecutionDetails = _this.workflowExecutionDetails;
|
|
1267
|
+
if (_this.currentWorkflowActionProgress == 100) {
|
|
1268
|
+
_this.chatLog[_this.chatLog.length - 1]['WorkflowExecutionId'] = workflow_execution_id;
|
|
1269
|
+
_this.isChatingWithAi = false;
|
|
1270
|
+
_this.executingWorkflow = false;
|
|
1271
|
+
}
|
|
1272
|
+
_this.cdr.detectChanges();
|
|
1273
|
+
}
|
|
1274
|
+
else if ((_d = res === null || res === void 0 ? void 0 : res.m) === null || _d === void 0 ? void 0 : _d.OtherFields) {
|
|
1275
|
+
var _h = (_e = res === null || res === void 0 ? void 0 : res.m) === null || _e === void 0 ? void 0 : _e.OtherFields, conversation_id = _h.conversation_id, bot_id = _h.bot_id, message_id_1 = _h.message_id, answer = _h.answer, web_results = _h.web_results, search_results = _h.search_results, graphs = _h.graphs, execution_graphs = _h.execution_graphs, suggestions = _h.suggestions;
|
|
1276
|
+
console.log('message_id1');
|
|
1277
|
+
console.log((_f = res === null || res === void 0 ? void 0 : res.m) === null || _f === void 0 ? void 0 : _f.OtherFields);
|
|
1278
|
+
var currentChatMessage = _this.chatLog.find(function (p) { return p._id == message_id_1; });
|
|
1279
|
+
console.log(_this.chatLog);
|
|
1280
|
+
if (!currentChatMessage) {
|
|
1281
|
+
console.log('message_id2');
|
|
1282
|
+
console.log(message_id_1);
|
|
1283
|
+
currentChatMessage = {
|
|
1284
|
+
_id: message_id_1,
|
|
1285
|
+
type: 'ai',
|
|
1286
|
+
time: formatNow(_this.timezone),
|
|
1287
|
+
};
|
|
1288
|
+
_this.chatLog.push(currentChatMessage);
|
|
1289
|
+
_this.showFeedBackIconsIndex = _this.chatLog.length - 1;
|
|
1290
|
+
console.log('message_id3');
|
|
1291
|
+
console.log(message_id_1);
|
|
1292
|
+
_this.cdr.detectChanges();
|
|
1293
|
+
}
|
|
1294
|
+
// Handle the fields based on their presence
|
|
1295
|
+
if (search_results && Array.isArray(search_results)) {
|
|
1296
|
+
console.log('Online Search Terms:', search_results);
|
|
1297
|
+
currentChatMessage.searchTerms = search_results;
|
|
1298
|
+
_this.cdr.detectChanges();
|
|
1299
|
+
}
|
|
1300
|
+
if (web_results && Array.isArray(web_results)) {
|
|
1301
|
+
console.log('Web Results:', web_results);
|
|
1302
|
+
currentChatMessage.sourcesList = web_results;
|
|
1303
|
+
currentChatMessage.displayedSources = web_results === null || web_results === void 0 ? void 0 : web_results.slice(0, 3); // First 3 cards
|
|
1304
|
+
currentChatMessage.remainingSources = web_results === null || web_results === void 0 ? void 0 : web_results.slice(3); // Remaining items
|
|
1305
|
+
_this.cdr.detectChanges();
|
|
1306
|
+
}
|
|
1307
|
+
if (answer) {
|
|
1308
|
+
_this.isChatingWithAi = false;
|
|
1309
|
+
console.log('Answer:', answer);
|
|
1310
|
+
currentChatMessage.message = _this.processMessageForDisplay(answer);
|
|
1311
|
+
_this.cdr.detectChanges();
|
|
1312
|
+
_this.scrollToBottom();
|
|
1313
|
+
}
|
|
1314
|
+
if (graphs && Array.isArray(graphs)) {
|
|
1315
|
+
console.log('Graphs:', graphs);
|
|
1316
|
+
currentChatMessage.graphs = graphs;
|
|
1317
|
+
_this.cdr.detectChanges();
|
|
1318
|
+
}
|
|
1319
|
+
if (execution_graphs && Array.isArray(execution_graphs)) {
|
|
1320
|
+
console.log('Execution Graphs:', execution_graphs);
|
|
1321
|
+
currentChatMessage.executionGraphs = execution_graphs;
|
|
1322
|
+
_this.cdr.detectChanges();
|
|
1323
|
+
}
|
|
1324
|
+
if (suggestions && Array.isArray(suggestions)) {
|
|
1325
|
+
console.log('suggestions:', suggestions);
|
|
1326
|
+
currentChatMessage.relatedListItems = suggestions;
|
|
1327
|
+
_this.cdr.detectChanges();
|
|
1328
|
+
// Process online search terms as needed
|
|
1329
|
+
}
|
|
1330
|
+
// Add any other fields and their processing here
|
|
1331
|
+
}
|
|
1332
|
+
else {
|
|
1333
|
+
console.warn('OtherFields is missing in the response');
|
|
1334
|
+
}
|
|
1335
|
+
}, function (err) {
|
|
1336
|
+
_this.eventSubscription.unsubscribe();
|
|
1337
|
+
console.error('Error in fetching data from socket', err);
|
|
1338
|
+
});
|
|
1339
|
+
};
|
|
1340
|
+
ChatDrawerComponent.prototype.initializeSocketAndListen = function () { };
|
|
1341
|
+
ChatDrawerComponent.prototype.handleEvent = function (data, type) {
|
|
1342
|
+
switch (type) {
|
|
1343
|
+
case 'webresult':
|
|
1344
|
+
break;
|
|
1345
|
+
case 'answer':
|
|
1346
|
+
break;
|
|
1347
|
+
case 'graph':
|
|
1348
|
+
break;
|
|
1349
|
+
default:
|
|
1350
|
+
break;
|
|
1351
|
+
}
|
|
1352
|
+
};
|
|
1353
|
+
ChatDrawerComponent.prototype.ngOnDestroy = function () {
|
|
1354
|
+
if (this.eventSubscription) {
|
|
1355
|
+
this.eventSubscription.unsubscribe();
|
|
1356
|
+
}
|
|
1357
|
+
this.socketService.disconnectSocketConnection();
|
|
1358
|
+
//this.socketService.close();
|
|
1359
|
+
};
|
|
1360
|
+
ChatDrawerComponent.prototype.changeTemperature = function (newTemperature) {
|
|
1361
|
+
if (this.loading)
|
|
1362
|
+
return;
|
|
1363
|
+
this.temperature = newTemperature;
|
|
1364
|
+
var wrapper = document.querySelector('.hivegpt-chat-wrapper');
|
|
1365
|
+
// Remove existing theme classes from body
|
|
1366
|
+
wrapper === null || wrapper === void 0 ? void 0 : wrapper.classList.remove('creative', 'balanced', 'precise');
|
|
1367
|
+
switch (newTemperature) {
|
|
1368
|
+
case 0:
|
|
1369
|
+
wrapper === null || wrapper === void 0 ? void 0 : wrapper.classList.add('creative');
|
|
1370
|
+
break;
|
|
1371
|
+
case 1:
|
|
1372
|
+
wrapper === null || wrapper === void 0 ? void 0 : wrapper.classList.add('balanced');
|
|
1373
|
+
break;
|
|
1374
|
+
case 2:
|
|
1375
|
+
wrapper === null || wrapper === void 0 ? void 0 : wrapper.classList.add('precise');
|
|
1376
|
+
break;
|
|
1377
|
+
default:
|
|
1378
|
+
break;
|
|
1379
|
+
}
|
|
1380
|
+
};
|
|
1381
|
+
ChatDrawerComponent.prototype.onStartAgain = function () {
|
|
1382
|
+
if (this.loading)
|
|
1383
|
+
return;
|
|
1384
|
+
this.showStartAgain = false;
|
|
1385
|
+
this.chatLog = [];
|
|
1386
|
+
this.chatLog.push({
|
|
1387
|
+
type: 'ai',
|
|
1388
|
+
message: this.greetingMsg,
|
|
1389
|
+
time: formatNow(this.timezone),
|
|
1390
|
+
});
|
|
1391
|
+
this.archieveMessages().subscribe();
|
|
1392
|
+
};
|
|
1393
|
+
ChatDrawerComponent.prototype.archieveMessages = function () {
|
|
1394
|
+
var headers = new i1.HttpHeaders({
|
|
1395
|
+
'Content-Type': 'application/json',
|
|
1396
|
+
'x-api-key': this.apiKey,
|
|
1397
|
+
'hive-bot-id': this.botId,
|
|
1398
|
+
'domain-authority': this.domainAuthorityValue
|
|
1399
|
+
});
|
|
1400
|
+
var url = this.environment.BASE_URL + "/bot/clear-history/" + this.botId + "/" + this.userId;
|
|
1401
|
+
return this.http.post(url, { headers: headers }).pipe(operators.switchMap(function (res) {
|
|
1402
|
+
return rxjs.of(res);
|
|
1403
|
+
}), operators.catchError(function (error) {
|
|
1404
|
+
return rxjs.of(null);
|
|
1405
|
+
}));
|
|
1406
|
+
};
|
|
1407
|
+
ChatDrawerComponent.prototype.triggerSupport = function () {
|
|
1408
|
+
this.openSupport.emit();
|
|
1409
|
+
};
|
|
1410
|
+
ChatDrawerComponent.prototype.fetchBotConfig = function () {
|
|
1411
|
+
var _this = this;
|
|
1412
|
+
this.loading = true;
|
|
1413
|
+
var headers = new i1.HttpHeaders({
|
|
1414
|
+
'x-api-key': this.apiKey,
|
|
1415
|
+
'hive-bot-id': this.botId,
|
|
1416
|
+
'domain-authority': this.domainAuthorityValue
|
|
1417
|
+
});
|
|
1418
|
+
var url = this.environment.BASE_URL + "/bots?bot_id=" + this.botId;
|
|
1419
|
+
return this.http.get(url, { headers: headers }).pipe(operators.switchMap(function (res) {
|
|
1420
|
+
var _a;
|
|
1421
|
+
_this.botName = _this.getTranslation(res.Name);
|
|
1422
|
+
_this.botIcon = res.Icon;
|
|
1423
|
+
_this.botSkills = res === null || res === void 0 ? void 0 : res.Skills;
|
|
1424
|
+
_this.greetingMsg = res.Greeting;
|
|
1425
|
+
_this.thumbsDownMessages = ((_a = res === null || res === void 0 ? void 0 : res.NegativeResponses) === null || _a === void 0 ? void 0 : _a.length)
|
|
1426
|
+
? res.NegativeResponses
|
|
1427
|
+
: [
|
|
1428
|
+
_this.getTranslation("We are sorry we've not been able to answer your question"),
|
|
1429
|
+
];
|
|
1430
|
+
_this.quickPrompts = res.QuickPrompts;
|
|
1431
|
+
_this.cdr.markForCheck();
|
|
1432
|
+
_this.loading = false;
|
|
1433
|
+
return rxjs.of(res);
|
|
1434
|
+
}), operators.catchError(function (error) {
|
|
1435
|
+
console.error('Error fetching chatbot config: ', error);
|
|
1436
|
+
_this.loading = false;
|
|
1437
|
+
return rxjs.of(null);
|
|
1438
|
+
}));
|
|
1439
|
+
};
|
|
1440
|
+
ChatDrawerComponent.prototype.fetchChatHistory = function () {
|
|
1441
|
+
this.loading = true;
|
|
1442
|
+
this.conversationKey = this.conversationService.getKey(this.botId, false);
|
|
1443
|
+
this.conSessionKey = this.conversationService.getSessionKey(this.botId, false);
|
|
1444
|
+
var url = this.environment.BASE_URL + "/conversations/" + this.conversationKey + "?session_id=" + this.conSessionKey;
|
|
1445
|
+
var headers = new i1.HttpHeaders({
|
|
1446
|
+
accept: 'application/json',
|
|
1447
|
+
'x-api-key': this.apiKey,
|
|
1448
|
+
'hive-bot-id': this.botId,
|
|
1449
|
+
'domain-authority': this.domainAuthorityValue
|
|
1450
|
+
});
|
|
1451
|
+
return this.http
|
|
1452
|
+
.get(url, { headers: headers })
|
|
1453
|
+
.pipe(operators.catchError(this.handleError('fetchConversation')));
|
|
1454
|
+
};
|
|
1455
|
+
ChatDrawerComponent.prototype.handleError = function (operation, result) {
|
|
1456
|
+
if (operation === void 0) { operation = 'operation'; }
|
|
1457
|
+
return function (error) {
|
|
1458
|
+
console.error(operation + " failed: " + error.message);
|
|
1459
|
+
return rxjs.of(result);
|
|
1460
|
+
};
|
|
1461
|
+
};
|
|
1462
|
+
// fetchChatHistory() {
|
|
1463
|
+
// this.loading = true;
|
|
1464
|
+
// const headers = new HttpHeaders({
|
|
1465
|
+
// 'Content-Type': 'application/json',
|
|
1466
|
+
// 'x-api-key': this.apiKey,
|
|
1467
|
+
// });
|
|
1468
|
+
// return this.http
|
|
1469
|
+
// .get(`${this.environment.BASE_URL}/conversations/${this.conversationKey}`, { headers })
|
|
1470
|
+
// .pipe(
|
|
1471
|
+
// switchMap((res: any) => {
|
|
1472
|
+
// this.loading = false;
|
|
1473
|
+
// return of(res);
|
|
1474
|
+
// }),
|
|
1475
|
+
// catchError((error: any) => {
|
|
1476
|
+
// console.error('Error fetching chat history: ', error);
|
|
1477
|
+
// this.loading = false;
|
|
1478
|
+
// return of(null);
|
|
1479
|
+
// })
|
|
1480
|
+
// );
|
|
1481
|
+
// }
|
|
1482
|
+
ChatDrawerComponent.prototype.mapChatHistory = function (chats) {
|
|
1483
|
+
var _this = this;
|
|
1484
|
+
var _a;
|
|
1485
|
+
this.chatLog.push({
|
|
1486
|
+
type: 'ai',
|
|
1487
|
+
message: this.greetingMsg,
|
|
1488
|
+
time: formatNow(this.timezone),
|
|
1489
|
+
});
|
|
1490
|
+
if (chats && ((_a = chats === null || chats === void 0 ? void 0 : chats.Messages) === null || _a === void 0 ? void 0 : _a.length)) {
|
|
1491
|
+
chats === null || chats === void 0 ? void 0 : chats.Messages.forEach(function (chat) {
|
|
1492
|
+
if (chat.Type == 'user') {
|
|
1493
|
+
_this.chatLog.push({
|
|
1494
|
+
type: 'user',
|
|
1495
|
+
message: _this.processMessageForDisplay(chat.Text),
|
|
1496
|
+
time: formatTimeStamps(_this.timezone, chat.InsertTimestamp),
|
|
1497
|
+
copied: false,
|
|
1498
|
+
isCollapsedTrue: false,
|
|
1499
|
+
WorkflowExecutionId: chat.WorkflowExecutionId,
|
|
1500
|
+
_id: chat._id
|
|
1501
|
+
});
|
|
1502
|
+
}
|
|
1503
|
+
if (chat.Type == 'ai') {
|
|
1504
|
+
var sourcesList = chat.WebLinks || [];
|
|
1505
|
+
var displayedSources = chat.WebLinks.slice(0, 3); // First 3 cards
|
|
1506
|
+
var remainingSources = chat.WebLinks.slice(3); // Remaining items
|
|
1507
|
+
_this.chatLog.push({
|
|
1508
|
+
type: 'ai',
|
|
1509
|
+
message: _this.processMessageForDisplay(chat.Text),
|
|
1510
|
+
executionGraphs: chat.ExecutionGraphs,
|
|
1511
|
+
graphs: chat.Graphs,
|
|
1512
|
+
searchTerms: chat.SearchTerms,
|
|
1513
|
+
sourcesList: sourcesList,
|
|
1514
|
+
displayedSources: displayedSources,
|
|
1515
|
+
remainingSources: remainingSources,
|
|
1516
|
+
time: formatTimeStamps(_this.timezone, chat.InsertTimestamp),
|
|
1517
|
+
copied: false,
|
|
1518
|
+
isCollapsedTrue: false,
|
|
1519
|
+
_id: chat._id
|
|
1520
|
+
});
|
|
1521
|
+
_this.showFeedBackIconsIndex = _this.chatLog.length - 1;
|
|
1522
|
+
}
|
|
1523
|
+
});
|
|
1524
|
+
this.showStartAgain = true;
|
|
1525
|
+
}
|
|
1526
|
+
this.scrollToBottom();
|
|
1527
|
+
this.cdr.markForCheck();
|
|
1528
|
+
};
|
|
1529
|
+
ChatDrawerComponent.prototype.processMessage = function (message) {
|
|
1530
|
+
if (!message || !((message === null || message === void 0 ? void 0 : message.length) > 0)) {
|
|
1531
|
+
return '';
|
|
1532
|
+
}
|
|
1533
|
+
// console.log('here is my message')
|
|
1534
|
+
// console.log(message);
|
|
1535
|
+
message = message.trim();
|
|
1536
|
+
var markdownLinkRegex = /\[([^[]+)]\(([^)]+)\)/g;
|
|
1537
|
+
var urlRegex = /(?<!href=")\bhttps?:\/\/\S+(?<![.,])/gi;
|
|
1538
|
+
if (markdownLinkRegex.test(message)) {
|
|
1539
|
+
var html = message.replace(markdownLinkRegex, '<a href="$2" target="_blank">$1</a>');
|
|
1540
|
+
//console.log('Sanitized message: ', message);
|
|
1541
|
+
return this.sanitizeHtml(html);
|
|
1542
|
+
}
|
|
1543
|
+
if (urlRegex.test(message)) {
|
|
1544
|
+
var html = message.replace(urlRegex, '<a href="$&" target="_blank">$&</a>');
|
|
1545
|
+
// console.log('Sanitized message: ', message);
|
|
1546
|
+
return this.sanitizeHtml(html);
|
|
1547
|
+
}
|
|
1548
|
+
message = message.replace(/(?:\r\n|\r|\n)/g, '<br>');
|
|
1549
|
+
message = message.replace(/\*\*(.*?)\*\*/g, '<strong>$1</strong>');
|
|
1550
|
+
// Convert Markdown headers to HTML headers
|
|
1551
|
+
message = message.replace(/^(#{1,6})\s+(.*)$/gm, function (match, hashes, text) {
|
|
1552
|
+
var level = hashes.length;
|
|
1553
|
+
return "<h" + level + ">" + text + "</h" + level + ">";
|
|
1554
|
+
});
|
|
1555
|
+
this.cdr.markForCheck();
|
|
1556
|
+
var sanitizedMessage = this.sanitizeHtml(message);
|
|
1557
|
+
return sanitizedMessage;
|
|
1558
|
+
};
|
|
1559
|
+
ChatDrawerComponent.prototype.ngAfterViewChecked = function () {
|
|
1560
|
+
var _this = this;
|
|
1561
|
+
var feedbackLinks = this.elementRef.nativeElement.querySelectorAll('.feedback-link');
|
|
1562
|
+
feedbackLinks.forEach(function (link) {
|
|
1563
|
+
link.addEventListener('click', _this.onFeedbackClick.bind(_this, 'zendesk'));
|
|
1564
|
+
});
|
|
1565
|
+
// if (this.elementRef.nativeElement.querySelector('.feedback-link')) {
|
|
1566
|
+
// this.elementRef.nativeElement
|
|
1567
|
+
// .querySelector('.feedback-link')
|
|
1568
|
+
// .addEventListener('click', this.onFeedbackClick.bind(this, 'zendesk'));
|
|
1569
|
+
// }
|
|
1570
|
+
};
|
|
1571
|
+
ChatDrawerComponent.prototype.sanitizeHtml = function (html) {
|
|
1572
|
+
return this.sanitizer.bypassSecurityTrustHtml(html);
|
|
1573
|
+
};
|
|
1574
|
+
ChatDrawerComponent.prototype.onFeedbackClick = function (value) {
|
|
1575
|
+
this.feedbackEvent.emit(value);
|
|
1576
|
+
};
|
|
1577
|
+
ChatDrawerComponent.prototype.onClose = function () {
|
|
1578
|
+
this.renderer.removeClass(document.body, this.bodyOverflowClass);
|
|
1579
|
+
this.onCloseEvent.emit();
|
|
1580
|
+
};
|
|
1581
|
+
ChatDrawerComponent.prototype.sendMessageWithTile = function (prompt) {
|
|
1582
|
+
this.input = prompt;
|
|
1583
|
+
this.fetchData();
|
|
1584
|
+
this.scrollToBottom();
|
|
1585
|
+
};
|
|
1586
|
+
ChatDrawerComponent.prototype.fetchData = function (msg) {
|
|
1587
|
+
if (msg === void 0) { msg = null; }
|
|
1588
|
+
var _a;
|
|
1589
|
+
this.input = msg || ((_a = this.input) === null || _a === void 0 ? void 0 : _a.trim());
|
|
1590
|
+
this.msg = this.input;
|
|
1591
|
+
if (!this.input || this.loading) {
|
|
1592
|
+
return;
|
|
1593
|
+
}
|
|
1594
|
+
this.chatLog.push({
|
|
1595
|
+
type: 'user',
|
|
1596
|
+
message: this.processMessageForDisplay(this.input),
|
|
1597
|
+
time: formatNow(this.timezone),
|
|
1598
|
+
copied: false,
|
|
1599
|
+
isCollapsedTrue: false,
|
|
1600
|
+
});
|
|
1601
|
+
try {
|
|
1602
|
+
var textarea = this.myInput.nativeElement;
|
|
1603
|
+
textarea.style.height = 'hidden'; // Reset the height
|
|
1604
|
+
textarea.style.height = "62px";
|
|
1605
|
+
}
|
|
1606
|
+
catch (error) { }
|
|
1607
|
+
this.cdr.markForCheck();
|
|
1608
|
+
this.aiResponse = '';
|
|
1609
|
+
this.isChatingWithAi = true;
|
|
1610
|
+
this.makeAskRequest(this.input, this.agents, this.conversationKey);
|
|
1611
|
+
};
|
|
1612
|
+
ChatDrawerComponent.prototype.fetchDataFor = function (msg, chat) {
|
|
1613
|
+
var inputMsg = msg === null || msg === void 0 ? void 0 : msg.trim();
|
|
1614
|
+
if (!inputMsg || this.loading) {
|
|
1615
|
+
return;
|
|
1616
|
+
}
|
|
1617
|
+
try {
|
|
1618
|
+
chat.relatedListItems = [];
|
|
1619
|
+
this.cdr.detectChanges();
|
|
1620
|
+
}
|
|
1621
|
+
catch (error) { }
|
|
1622
|
+
this.scrollToBottom();
|
|
1623
|
+
this.chatLog.push({
|
|
1624
|
+
type: 'user',
|
|
1625
|
+
message: this.processMessageForDisplay(inputMsg),
|
|
1626
|
+
time: formatNow(this.timezone),
|
|
1627
|
+
copied: false,
|
|
1628
|
+
isCollapsedTrue: false,
|
|
1629
|
+
});
|
|
1630
|
+
this.cdr.markForCheck();
|
|
1631
|
+
this.aiResponse = '';
|
|
1632
|
+
this.isChatingWithAi = true;
|
|
1633
|
+
this.makeAskRequest(inputMsg, this.agents, this.conversationKey, msg, chat);
|
|
1634
|
+
};
|
|
1635
|
+
ChatDrawerComponent.prototype.fetchSmallTalk = function () {
|
|
1636
|
+
var _this = this;
|
|
1637
|
+
this.loading = true;
|
|
1638
|
+
this.cdr.markForCheck();
|
|
1639
|
+
var url = this.environment.BASE_URL + "/bot/small-talk/" + this.botId + "/" + this.userId;
|
|
1640
|
+
this.http
|
|
1641
|
+
.get(url, {
|
|
1642
|
+
headers: {
|
|
1643
|
+
'x-api-key': this.apiKey,
|
|
1644
|
+
'hive-bot-id': this.botId,
|
|
1645
|
+
'domain-authority': this.domainAuthorityValue
|
|
1646
|
+
},
|
|
1647
|
+
})
|
|
1648
|
+
.pipe(operators.catchError(function (error) {
|
|
1649
|
+
console.error('Error while fetching small talk:', error);
|
|
1650
|
+
return rxjs.of(null);
|
|
1651
|
+
}))
|
|
1652
|
+
.subscribe(function (response) {
|
|
1653
|
+
_this.loading = false;
|
|
1654
|
+
_this.cdr.markForCheck();
|
|
1655
|
+
if (!response) {
|
|
1656
|
+
return;
|
|
1657
|
+
}
|
|
1658
|
+
if (response && response.smallTalk) {
|
|
1659
|
+
_this.chatLog.push({
|
|
1660
|
+
type: 'ai',
|
|
1661
|
+
message: _this.processMessage(response.smallTalk),
|
|
1662
|
+
time: formatNow(_this.timezone),
|
|
1663
|
+
isFeedbackMsg: true,
|
|
1664
|
+
});
|
|
1665
|
+
_this.showFeedBackIconsIndex = _this.chatLog.length - 2;
|
|
1666
|
+
// this.scrollToBottom();
|
|
1667
|
+
_this.cdr.markForCheck();
|
|
1668
|
+
}
|
|
1669
|
+
});
|
|
1670
|
+
};
|
|
1671
|
+
ChatDrawerComponent.prototype.pump = function (controller, reader, allSuggestions) {
|
|
1672
|
+
var _this = this;
|
|
1673
|
+
reader.read().then(function (_g) {
|
|
1674
|
+
var done = _g.done, value = _g.value;
|
|
1675
|
+
var _a, _b, _c, _d;
|
|
1676
|
+
var lastItem = _this.chatLog[_this.chatLog.length - 1];
|
|
1677
|
+
if (done) {
|
|
1678
|
+
lastItem.message = _this.processMessageForDisplay(lastItem.message);
|
|
1679
|
+
_this.chatLog.pop();
|
|
1680
|
+
_this.chatLog.push(lastItem);
|
|
1681
|
+
if (allSuggestions === null || allSuggestions === void 0 ? void 0 : allSuggestions.length) {
|
|
1682
|
+
_this.chatLog.push({
|
|
1683
|
+
type: 'suggestions',
|
|
1684
|
+
suggestions: allSuggestions,
|
|
1685
|
+
});
|
|
1686
|
+
}
|
|
1687
|
+
controller.close();
|
|
1688
|
+
_this.isChatingWithAi = false;
|
|
1689
|
+
// this.scrollToBottom();
|
|
1690
|
+
_this.cdr.markForCheck();
|
|
1691
|
+
_this.showStartAgain = true;
|
|
1692
|
+
// setTimeout(() => {
|
|
1693
|
+
// this.fetchSmallTalk();
|
|
1694
|
+
// },1000)
|
|
1695
|
+
return;
|
|
1696
|
+
}
|
|
1697
|
+
var decodedChunk = _this.decoder.decode(value, { stream: true });
|
|
1698
|
+
_this.aiResponse += decodedChunk;
|
|
1699
|
+
if (lastItem.type === 'ai') {
|
|
1700
|
+
var suggestionsMatch = _this.aiResponse.match(/<sug>(.*?)<\/sug>/g);
|
|
1701
|
+
if (suggestionsMatch) {
|
|
1702
|
+
suggestionsMatch.forEach(function (match) {
|
|
1703
|
+
_this.aiResponse = _this.aiResponse.replace(match, '');
|
|
1704
|
+
allSuggestions.push(match === null || match === void 0 ? void 0 : match.replace(/<\/?sug>/g, ''));
|
|
1705
|
+
});
|
|
1706
|
+
}
|
|
1707
|
+
lastItem.message = _this.aiResponse;
|
|
1708
|
+
_this.cdr.markForCheck();
|
|
1709
|
+
}
|
|
1710
|
+
else {
|
|
1711
|
+
_this.isChatingWithAi = false;
|
|
1712
|
+
var aiFormattedData = void 0;
|
|
1713
|
+
try {
|
|
1714
|
+
console.log('parsing json ');
|
|
1715
|
+
aiFormattedData = JSON.parse(JSON.parse(_this.aiResponse));
|
|
1716
|
+
}
|
|
1717
|
+
catch (e) {
|
|
1718
|
+
try {
|
|
1719
|
+
console.log('parsing json 2');
|
|
1720
|
+
aiFormattedData = JSON.parse(_this.aiResponse);
|
|
1721
|
+
}
|
|
1722
|
+
catch (e) { }
|
|
1723
|
+
}
|
|
1724
|
+
console.log('parsing json done');
|
|
1725
|
+
if (aiFormattedData && ((_a = aiFormattedData === null || aiFormattedData === void 0 ? void 0 : aiFormattedData.section_id) === null || _a === void 0 ? void 0 : _a.length) > 0) {
|
|
1726
|
+
if (aiFormattedData.section_id == 'company_search' ||
|
|
1727
|
+
aiFormattedData.section_id == 'user_search' ||
|
|
1728
|
+
aiFormattedData.section_id == 'industry_company_search') {
|
|
1729
|
+
_this.fetchMyConnections().subscribe();
|
|
1730
|
+
_this.fetchPendingRequests().subscribe();
|
|
1731
|
+
}
|
|
1732
|
+
if (aiFormattedData.section_id == _this.myUpcomingSessionAction) {
|
|
1733
|
+
var speakerIds = [];
|
|
1734
|
+
(_b = aiFormattedData.content) === null || _b === void 0 ? void 0 : _b.forEach(function (session) {
|
|
1735
|
+
speakerIds = __spreadArray(__spreadArray([], __read(speakerIds)), __read(session.speakers));
|
|
1736
|
+
});
|
|
1737
|
+
if ((speakerIds === null || speakerIds === void 0 ? void 0 : speakerIds.length) > 0)
|
|
1738
|
+
_this.getSpeakersByStaffIds(speakerIds);
|
|
1739
|
+
}
|
|
1740
|
+
if (aiFormattedData.section_id == _this.addToMyAgendaAction &&
|
|
1741
|
+
((_c = aiFormattedData.content) === null || _c === void 0 ? void 0 : _c.length) > 0) {
|
|
1742
|
+
_this.openPage.next({
|
|
1743
|
+
sectionId: aiFormattedData.section_id,
|
|
1744
|
+
sessionIds: aiFormattedData.content,
|
|
1745
|
+
});
|
|
1746
|
+
}
|
|
1747
|
+
if (aiFormattedData.section_id == _this.connectOrFollowAction) {
|
|
1748
|
+
var usersLen = (_d = aiFormattedData.content) === null || _d === void 0 ? void 0 : _d.length;
|
|
1749
|
+
if (usersLen > 1) {
|
|
1750
|
+
_this.openPage.next({
|
|
1751
|
+
sectionId: 'open_networking_drawer',
|
|
1752
|
+
search: aiFormattedData.content,
|
|
1753
|
+
});
|
|
1754
|
+
}
|
|
1755
|
+
else if (usersLen == 1) {
|
|
1756
|
+
_this.openPage.next({
|
|
1757
|
+
sectionId: aiFormattedData.section_id,
|
|
1758
|
+
connetUserIds: [aiFormattedData.content[0].userId],
|
|
1759
|
+
});
|
|
1760
|
+
}
|
|
1761
|
+
}
|
|
1762
|
+
if (aiFormattedData.is_open_page == 'true') {
|
|
1763
|
+
_this.openPage.next({
|
|
1764
|
+
sectionId: aiFormattedData.section_id,
|
|
1765
|
+
search: aiFormattedData.content,
|
|
1766
|
+
});
|
|
1767
|
+
if (_this.isMobileBrowser()) {
|
|
1768
|
+
aiFormattedData.message +=
|
|
1769
|
+
'\n\n' + '<a id="closeBotNow">Click Here</a> to see results.';
|
|
1770
|
+
}
|
|
1771
|
+
}
|
|
1772
|
+
_this.chatLog.push({
|
|
1773
|
+
type: 'ai',
|
|
1774
|
+
message: aiFormattedData.message,
|
|
1775
|
+
action: aiFormattedData,
|
|
1776
|
+
time: formatNow(_this.timezone),
|
|
1777
|
+
});
|
|
1778
|
+
if (_this.isMobileBrowser()) {
|
|
1779
|
+
setTimeout(function () {
|
|
1780
|
+
_this.addCloseBotClickEvent();
|
|
1781
|
+
}, 500);
|
|
1782
|
+
}
|
|
1783
|
+
_this.aiResponse = '';
|
|
1784
|
+
}
|
|
1785
|
+
else {
|
|
1786
|
+
_this.chatLog.push({
|
|
1787
|
+
type: 'ai',
|
|
1788
|
+
message: _this.aiResponse,
|
|
1789
|
+
time: formatNow(_this.timezone),
|
|
1790
|
+
});
|
|
1791
|
+
}
|
|
1792
|
+
_this.showFeedBackIconsIndex = _this.chatLog.length - 1;
|
|
1793
|
+
_this.cdr.markForCheck();
|
|
1794
|
+
}
|
|
1795
|
+
_this.scrollToBottom();
|
|
1796
|
+
// Enqueue the next data chunk into our target stream
|
|
1797
|
+
controller.enqueue(value);
|
|
1798
|
+
_this.pump(controller, reader, allSuggestions);
|
|
1799
|
+
});
|
|
1800
|
+
};
|
|
1801
|
+
ChatDrawerComponent.prototype.submitFeedback = function (flag, message) {
|
|
1802
|
+
var _this = this;
|
|
1803
|
+
console.log(message);
|
|
1804
|
+
this.feedbackDone = true;
|
|
1805
|
+
this.showFeedBackIconsIndex = null;
|
|
1806
|
+
var conversation_id = this.conversationService.getKey(this.botId);
|
|
1807
|
+
var url = this.environment.AGENTS_API + "/Conversation/coPilot/" + this.botId + "/conversation/" + conversation_id + "/helpful-response";
|
|
1808
|
+
fetch(url, {
|
|
1809
|
+
method: 'POST',
|
|
1810
|
+
headers: {
|
|
1811
|
+
'Content-Type': 'application/json',
|
|
1812
|
+
'apiKey': 'Conversation_WIz/qAm+EEmfOkFaUA/weA==',
|
|
1813
|
+
'hive-bot-id': this.botId,
|
|
1814
|
+
'domain-authority': this.domainAuthorityValue
|
|
1815
|
+
},
|
|
1816
|
+
body: JSON.stringify({ messageId: message._id, isHelpful: flag }),
|
|
1817
|
+
}).then(function () {
|
|
1818
|
+
if (flag) {
|
|
1819
|
+
_this.chatLog.push({
|
|
1820
|
+
type: 'ai',
|
|
1821
|
+
message: _this.thumbsUpMessage ||
|
|
1822
|
+
_this.getTranslation('May I assist you with anything else'),
|
|
1823
|
+
time: formatNow(_this.timezone),
|
|
1824
|
+
isFeedbackMsg: true,
|
|
1825
|
+
});
|
|
1826
|
+
_this.scrollToBottom();
|
|
1827
|
+
_this.cdr.markForCheck();
|
|
1828
|
+
_this.feedbackDone = false;
|
|
1829
|
+
_this.showFeedBackIconsIndex = null;
|
|
1830
|
+
return;
|
|
1831
|
+
}
|
|
1832
|
+
_this.chatLog.push({
|
|
1833
|
+
type: 'ai',
|
|
1834
|
+
message: _this.processMessage(_this.thumbsDownMessages[_this.thumbsDownMsgIndex]),
|
|
1835
|
+
time: formatNow(_this.timezone),
|
|
1836
|
+
isFeedbackMsg: true,
|
|
1837
|
+
});
|
|
1838
|
+
_this.thumbsDownMsgIndex =
|
|
1839
|
+
(_this.thumbsDownMsgIndex + 1) % _this.thumbsDownMessages.length;
|
|
1840
|
+
_this.scrollToBottom();
|
|
1841
|
+
_this.cdr.markForCheck();
|
|
1842
|
+
setTimeout(function () {
|
|
1843
|
+
var supportLink = document.getElementById('supportLink88');
|
|
1844
|
+
if (supportLink) {
|
|
1845
|
+
supportLink.addEventListener('click', _this.triggerSupport.bind(_this));
|
|
1846
|
+
}
|
|
1847
|
+
}, 200);
|
|
1848
|
+
_this.feedbackDone = false;
|
|
1849
|
+
_this.showFeedBackIconsIndex = null;
|
|
1850
|
+
});
|
|
1851
|
+
};
|
|
1852
|
+
ChatDrawerComponent.prototype.handleKeydown = function (event) {
|
|
1853
|
+
if (event.key === 'Enter' && !event.shiftKey) {
|
|
1854
|
+
// Prevent default behavior (new line)
|
|
1855
|
+
event.preventDefault();
|
|
1856
|
+
// Call your submit function
|
|
1857
|
+
this.handleSubmit(event);
|
|
1858
|
+
}
|
|
1859
|
+
};
|
|
1860
|
+
ChatDrawerComponent.prototype.handleSubmit = function (event) {
|
|
1861
|
+
this.fetchData();
|
|
1862
|
+
this.scrollToBottom();
|
|
1863
|
+
};
|
|
1864
|
+
ChatDrawerComponent.prototype.handleUpClick = function (idx) {
|
|
1865
|
+
if (this.feedbackDone) {
|
|
1866
|
+
return;
|
|
1867
|
+
}
|
|
1868
|
+
this.submitFeedback(true, this.chatLog[idx]);
|
|
1869
|
+
this.chatLog[idx].liked = !this.chatLog[idx].liked;
|
|
1870
|
+
if (this.chatLog[idx].unliked) {
|
|
1871
|
+
this.chatLog[idx].unliked = !this.chatLog[idx].unliked;
|
|
1872
|
+
}
|
|
1873
|
+
this.cdr.markForCheck();
|
|
1874
|
+
};
|
|
1875
|
+
ChatDrawerComponent.prototype.handleDownClick = function (idx) {
|
|
1876
|
+
if (this.feedbackDone)
|
|
1877
|
+
return;
|
|
1878
|
+
this.submitFeedback(false, this.chatLog[idx]);
|
|
1879
|
+
this.chatLog[idx].unliked = !this.chatLog[idx].unliked;
|
|
1880
|
+
if (this.chatLog[idx].liked)
|
|
1881
|
+
this.chatLog[idx].liked = !this.chatLog[idx].liked;
|
|
1882
|
+
};
|
|
1883
|
+
// handleCopyClick(index: any) {
|
|
1884
|
+
// // Copy the message to the clipboard
|
|
1885
|
+
// const contentToCopy = this.chatLog[index].message;
|
|
1886
|
+
// console.log('contentToCopy');
|
|
1887
|
+
// console.log(contentToCopy);
|
|
1888
|
+
// navigator.clipboard.writeText(contentToCopy).then(() => {
|
|
1889
|
+
// // Indicate that the message was copied
|
|
1890
|
+
// this.chatLog[index].copied = true;
|
|
1891
|
+
// this.cdr.detectChanges();
|
|
1892
|
+
// // Reset the copied state after a delay
|
|
1893
|
+
// setTimeout(() => {
|
|
1894
|
+
// this.chatLog[index].copied = false;
|
|
1895
|
+
// this.cdr.detectChanges();
|
|
1896
|
+
// }, 2000); // Reset after 2 seconds
|
|
1897
|
+
// });
|
|
1898
|
+
// }
|
|
1899
|
+
ChatDrawerComponent.prototype.copyText = function (id, index) {
|
|
1900
|
+
var _this = this;
|
|
1901
|
+
// Get the text element
|
|
1902
|
+
var textElement = document.getElementById(id);
|
|
1903
|
+
// Create a temporary textarea element to copy the text
|
|
1904
|
+
var tempTextArea = document.createElement('textarea');
|
|
1905
|
+
tempTextArea.value = textElement.innerText;
|
|
1906
|
+
// Append the textarea to the body (necessary for the execCommand to work)
|
|
1907
|
+
document.body.appendChild(tempTextArea);
|
|
1908
|
+
// Select the text inside the textarea
|
|
1909
|
+
tempTextArea.select();
|
|
1910
|
+
// Copy the text to the clipboard
|
|
1911
|
+
document.execCommand('copy');
|
|
1912
|
+
// Remove the temporary textarea
|
|
1913
|
+
document.body.removeChild(tempTextArea);
|
|
1914
|
+
// Optionally, you can alert the user or change the button text to indicate the copy was successful
|
|
1915
|
+
// alert('Text copied to clipboard!');
|
|
1916
|
+
this.chatLog[index].copied = true;
|
|
1917
|
+
this.cdr.detectChanges();
|
|
1918
|
+
// Reset the copied state after a delay
|
|
1919
|
+
setTimeout(function () {
|
|
1920
|
+
_this.chatLog[index].copied = false;
|
|
1921
|
+
_this.cdr.detectChanges();
|
|
1922
|
+
}, 2000); // Reset after 2 seconds
|
|
1923
|
+
};
|
|
1924
|
+
ChatDrawerComponent.prototype.handleCopyClick = function (index) {
|
|
1925
|
+
// Copy the message to the clipboard
|
|
1926
|
+
var contentToCopy = this.chatLog[index].message;
|
|
1927
|
+
var resutlt = this.copyText('messageText_' + index, index);
|
|
1928
|
+
};
|
|
1929
|
+
ChatDrawerComponent.prototype.sanitizeHTML = function (html) {
|
|
1930
|
+
var doc = new DOMParser().parseFromString(html, 'text/html');
|
|
1931
|
+
// Create a new document fragment to hold the simplified content
|
|
1932
|
+
var fragment = document.createDocumentFragment();
|
|
1933
|
+
// Append the children of the body of the parsed document to the fragment
|
|
1934
|
+
Array.from(doc.body.childNodes).forEach(function (node) {
|
|
1935
|
+
fragment.appendChild(node.cloneNode(true));
|
|
1936
|
+
});
|
|
1937
|
+
// Create a new div element to hold the simplified HTML
|
|
1938
|
+
var simplifiedDiv = document.createElement('div');
|
|
1939
|
+
simplifiedDiv.appendChild(fragment);
|
|
1940
|
+
// Remove complex tags or attributes as needed
|
|
1941
|
+
// Example: remove scripts
|
|
1942
|
+
simplifiedDiv
|
|
1943
|
+
.querySelectorAll('script')
|
|
1944
|
+
.forEach(function (script) { return script.remove(); });
|
|
1945
|
+
// Return the simplified HTML as a string
|
|
1946
|
+
return simplifiedDiv.innerHTML;
|
|
1947
|
+
};
|
|
1948
|
+
ChatDrawerComponent.prototype.handleEditorClick = function (index) {
|
|
1949
|
+
var _this = this;
|
|
1950
|
+
if (this.currentIndexForEditor == -1) {
|
|
1951
|
+
this.currentIndexForEditor = index;
|
|
1952
|
+
this.currentMessageForEditor = this.sanitizeHTML(this.chatLog[index].message);
|
|
1953
|
+
this.currentMessageForEditor = this.currentMessageForEditor.replace('SafeValue must use [property]=binding:', '');
|
|
1954
|
+
this.cdr.detectChanges();
|
|
1955
|
+
}
|
|
1956
|
+
else {
|
|
1957
|
+
if (this.currentIndexForEditor == index) {
|
|
1958
|
+
this.currentMessageForEditor += this.sanitizeHTML(this.chatLog[index].message);
|
|
1959
|
+
this.currentMessageForEditor = this.currentMessageForEditor.replace('SafeValue must use [property]=binding:', '');
|
|
1960
|
+
this.cdr.detectChanges();
|
|
1961
|
+
}
|
|
1962
|
+
else {
|
|
1963
|
+
this.currentIndexForEditor = index;
|
|
1964
|
+
this.currentMessageForEditor = this.sanitizeHTML(this.chatLog[index].message);
|
|
1965
|
+
this.currentMessageForEditor = this.currentMessageForEditor.replace('SafeValue must use [property]=binding:', '');
|
|
1966
|
+
this.cdr.detectChanges();
|
|
1967
|
+
}
|
|
1968
|
+
}
|
|
1969
|
+
this.chatLog[index].isEditor = true;
|
|
1970
|
+
this.cdr.detectChanges();
|
|
1971
|
+
// Reset the copied state after a delay
|
|
1972
|
+
setTimeout(function () {
|
|
1973
|
+
_this.chatLog[index].isEditor = false;
|
|
1974
|
+
_this.cdr.detectChanges();
|
|
1975
|
+
}, 2000); // Reset after 2 seconds
|
|
1976
|
+
this.editorsDrawer.open();
|
|
1977
|
+
var button = document.getElementById('botcloseplaygroundbutton');
|
|
1978
|
+
if (button) {
|
|
1979
|
+
button.style.display = 'none';
|
|
1980
|
+
}
|
|
1981
|
+
this.cdr.detectChanges();
|
|
1982
|
+
};
|
|
1983
|
+
ChatDrawerComponent.prototype.scrollToBottom = function () {
|
|
1984
|
+
var _this = this;
|
|
1985
|
+
var counter = 0;
|
|
1986
|
+
var interval = setInterval(function () {
|
|
1987
|
+
_this.chatMain.nativeElement.scrollTop = _this.chatMain.nativeElement.scrollHeight;
|
|
1988
|
+
if (counter++ > 5)
|
|
1989
|
+
clearInterval(interval);
|
|
1990
|
+
}, 5);
|
|
1991
|
+
};
|
|
1992
|
+
ChatDrawerComponent.prototype.handleAction = function (action) {
|
|
1993
|
+
console.info('incoming action from the chatbot AI');
|
|
1994
|
+
console.info(action);
|
|
1995
|
+
if (action === null || action === void 0 ? void 0 : action.content) {
|
|
1996
|
+
}
|
|
1997
|
+
};
|
|
1998
|
+
ChatDrawerComponent.prototype.ngAfterViewInit = function () {
|
|
1999
|
+
var _this = this;
|
|
2000
|
+
// Check if the drawer is initially open and apply overflow hidden to body if so
|
|
2001
|
+
if (this.drawer.opened) {
|
|
2002
|
+
this.setBodyOverflow();
|
|
2003
|
+
}
|
|
2004
|
+
// Listen to changes in the drawer being opened or closed
|
|
2005
|
+
this.drawer.openedChange.subscribe(function (opened) {
|
|
2006
|
+
if (opened) {
|
|
2007
|
+
_this.setBodyOverflow();
|
|
2008
|
+
}
|
|
2009
|
+
else {
|
|
2010
|
+
_this.removeBodyOverflow();
|
|
2011
|
+
}
|
|
2012
|
+
});
|
|
2013
|
+
this.drawer.openedChange.subscribe(function (opened) {
|
|
2014
|
+
if (opened) {
|
|
2015
|
+
setTimeout(function () {
|
|
2016
|
+
if (_this.myTextarea && _this.myTextarea.nativeElement) {
|
|
2017
|
+
_this.myTextarea.nativeElement.focus(); // Focus on the textarea
|
|
2018
|
+
}
|
|
2019
|
+
});
|
|
2020
|
+
}
|
|
2021
|
+
});
|
|
2022
|
+
};
|
|
2023
|
+
ChatDrawerComponent.prototype.setBodyOverflow = function () {
|
|
2024
|
+
this.renderer.addClass(document.body, this.bodyOverflowClass);
|
|
2025
|
+
};
|
|
2026
|
+
ChatDrawerComponent.prototype.removeBodyOverflow = function () {
|
|
2027
|
+
this.renderer.removeClass(document.body, this.bodyOverflowClass);
|
|
2028
|
+
};
|
|
2029
|
+
ChatDrawerComponent.prototype.getSpeakersByStaffIds = function (ids) {
|
|
2030
|
+
var _this = this;
|
|
2031
|
+
var url = this.environment.USERS_API + "/events/" + this.eventId + "/users/get-by-staff-ids";
|
|
2032
|
+
fetch(url, {
|
|
2033
|
+
method: 'POST',
|
|
2034
|
+
headers: {
|
|
2035
|
+
'Content-Type': 'application/json',
|
|
2036
|
+
Authorization: 'Bearer ' + 'your_token_here',
|
|
2037
|
+
},
|
|
2038
|
+
body: JSON.stringify(ids),
|
|
2039
|
+
})
|
|
2040
|
+
.then(function (response) {
|
|
2041
|
+
if (response.ok) {
|
|
2042
|
+
return response.json(); // Parse the JSON body of the response
|
|
2043
|
+
}
|
|
2044
|
+
else {
|
|
2045
|
+
throw new Error('Network response was not ok.');
|
|
2046
|
+
}
|
|
2047
|
+
})
|
|
2048
|
+
.then(function (data) {
|
|
2049
|
+
if ((data === null || data === void 0 ? void 0 : data.length) > 0) {
|
|
2050
|
+
data.forEach(function (speaker) {
|
|
2051
|
+
_this.speakers[speaker.id] = speaker;
|
|
2052
|
+
});
|
|
2053
|
+
_this.cdr.markForCheck();
|
|
2054
|
+
}
|
|
2055
|
+
})
|
|
2056
|
+
.catch(function (err) {
|
|
2057
|
+
console.error('Error fetching data:', err);
|
|
2058
|
+
_this.loading = false;
|
|
2059
|
+
});
|
|
2060
|
+
};
|
|
2061
|
+
ChatDrawerComponent.prototype.performSessionAction = function (sessionId, action) {
|
|
2062
|
+
this.sessionActions.next({
|
|
2063
|
+
sessionId: sessionId,
|
|
2064
|
+
action: action,
|
|
2065
|
+
});
|
|
2066
|
+
};
|
|
2067
|
+
ChatDrawerComponent.prototype.addCloseBotClickEvent = function () {
|
|
2068
|
+
var _this = this;
|
|
2069
|
+
var element = this.elementRef.nativeElement.querySelector('#closeBotNow');
|
|
2070
|
+
if (element) {
|
|
2071
|
+
this.renderer.listen(element, 'click', function () {
|
|
2072
|
+
_this.closeBot.next();
|
|
2073
|
+
});
|
|
2074
|
+
}
|
|
2075
|
+
};
|
|
2076
|
+
ChatDrawerComponent.prototype.isMobileBrowser = function () {
|
|
2077
|
+
return /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent);
|
|
2078
|
+
};
|
|
2079
|
+
ChatDrawerComponent.prototype.connectToUser = function (userId) {
|
|
2080
|
+
var _this = this;
|
|
2081
|
+
this.connectWithUser.emit({
|
|
2082
|
+
connect: !this.canDisconnect(userId),
|
|
2083
|
+
userId: userId,
|
|
2084
|
+
});
|
|
2085
|
+
setTimeout(function () {
|
|
2086
|
+
_this.fetchMyConnections().subscribe(function (res) {
|
|
2087
|
+
_this.cdr.markForCheck();
|
|
2088
|
+
});
|
|
2089
|
+
_this.fetchPendingRequests().subscribe(function (res) {
|
|
2090
|
+
_this.cdr.markForCheck();
|
|
2091
|
+
});
|
|
2092
|
+
}, 500);
|
|
2093
|
+
};
|
|
2094
|
+
ChatDrawerComponent.prototype.scheduleMeetingWithUser = function (user) {
|
|
2095
|
+
this.scheduleMeeting.emit(user);
|
|
2096
|
+
};
|
|
2097
|
+
ChatDrawerComponent.prototype.canConnect = function (userId) {
|
|
2098
|
+
return !(this.canDisconnect(userId) ||
|
|
2099
|
+
this.pendingRequests.find(function (a) { return a == userId; }));
|
|
2100
|
+
};
|
|
2101
|
+
ChatDrawerComponent.prototype.canDisconnect = function (userId) {
|
|
2102
|
+
return this.myConnections.find(function (conn) { return conn.userId == userId; });
|
|
2103
|
+
};
|
|
2104
|
+
ChatDrawerComponent.prototype.fetchPendingRequests = function () {
|
|
2105
|
+
var _this = this;
|
|
2106
|
+
var headers = new i1.HttpHeaders({
|
|
2107
|
+
'Content-Type': 'application/json',
|
|
2108
|
+
apiKey: this.autogenKey,
|
|
2109
|
+
});
|
|
2110
|
+
return this.http
|
|
2111
|
+
.get(this.environment.USERS_API + "/events/" + this.eventId + "/connection-requests/autogen/pending-sent-requests?userId=" + this.userId, { headers: headers })
|
|
2112
|
+
.pipe(operators.switchMap(function (res) {
|
|
2113
|
+
_this.pendingRequests = res;
|
|
2114
|
+
_this.cdr.markForCheck();
|
|
2115
|
+
return rxjs.of(res);
|
|
2116
|
+
}), operators.catchError(function (error) {
|
|
2117
|
+
console.error('Error fetching pending requests: ', error);
|
|
2118
|
+
return rxjs.of(null);
|
|
2119
|
+
}));
|
|
2120
|
+
};
|
|
2121
|
+
ChatDrawerComponent.prototype.fetchMyConnections = function () {
|
|
2122
|
+
var _this = this;
|
|
2123
|
+
var headers = new i1.HttpHeaders({
|
|
2124
|
+
'Content-Type': 'application/json',
|
|
2125
|
+
apiKey: this.autogenKey,
|
|
2126
|
+
});
|
|
2127
|
+
return this.http
|
|
2128
|
+
.get(this.environment.USERS_API + "/events/" + this.eventId + "/users-connections/autogen?userId=" + this.userId, { headers: headers })
|
|
2129
|
+
.pipe(operators.switchMap(function (res) {
|
|
2130
|
+
_this.myConnections = res;
|
|
2131
|
+
_this.cdr.markForCheck();
|
|
2132
|
+
return rxjs.of(res);
|
|
2133
|
+
}), operators.catchError(function (error) {
|
|
2134
|
+
console.error('Error fetching pending requests: ', error);
|
|
2135
|
+
return rxjs.of(null);
|
|
2136
|
+
}));
|
|
2137
|
+
};
|
|
2138
|
+
// Toggle the dropdown visibility
|
|
2139
|
+
ChatDrawerComponent.prototype.toggleDropdown = function () {
|
|
2140
|
+
if (!this.agents)
|
|
2141
|
+
this.fetchAgents();
|
|
2142
|
+
this.isDropdownOpen = !this.isDropdownOpen;
|
|
2143
|
+
this.cdr.detectChanges();
|
|
2144
|
+
};
|
|
2145
|
+
ChatDrawerComponent.prototype.onSelectAll = function (event) {
|
|
2146
|
+
var _a;
|
|
2147
|
+
(_a = this.agents) === null || _a === void 0 ? void 0 : _a.forEach(function (agent) { return (agent.selected = false); });
|
|
2148
|
+
this.cdr.detectChanges();
|
|
2149
|
+
};
|
|
2150
|
+
ChatDrawerComponent.prototype.onAgentChange = function (agent) {
|
|
2151
|
+
//agent.selected = !agent.selected;
|
|
2152
|
+
//console.log(agent);
|
|
2153
|
+
var agentFound = this.agents.filter(function (p) { return p.id == agent.id; });
|
|
2154
|
+
if (agentFound && agentFound.length > 0) {
|
|
2155
|
+
agentFound[0].selected = !agentFound[0].selected;
|
|
2156
|
+
this.cdr.detectChanges();
|
|
2157
|
+
}
|
|
2158
|
+
this.cdr.detectChanges();
|
|
2159
|
+
};
|
|
2160
|
+
ChatDrawerComponent.prototype.areAllSelected = function () {
|
|
2161
|
+
var _a;
|
|
2162
|
+
return (_a = this.agents) === null || _a === void 0 ? void 0 : _a.every(function (agent) { return !agent.selected; });
|
|
2163
|
+
};
|
|
2164
|
+
ChatDrawerComponent.prototype.getDropdownHeaderText = function () {
|
|
2165
|
+
var _a;
|
|
2166
|
+
var selectedAgents = (_a = this.agents) === null || _a === void 0 ? void 0 : _a.filter(function (agent) { return agent.selected; });
|
|
2167
|
+
if (!selectedAgents) {
|
|
2168
|
+
return 'All Agents';
|
|
2169
|
+
}
|
|
2170
|
+
else {
|
|
2171
|
+
if (selectedAgents && (selectedAgents === null || selectedAgents === void 0 ? void 0 : selectedAgents.length) === 0) {
|
|
2172
|
+
return 'All Agents';
|
|
2173
|
+
}
|
|
2174
|
+
else {
|
|
2175
|
+
return (selectedAgents === null || selectedAgents === void 0 ? void 0 : selectedAgents.length) > 1
|
|
2176
|
+
? (selectedAgents === null || selectedAgents === void 0 ? void 0 : selectedAgents.length) + " Agents Selected"
|
|
2177
|
+
: (selectedAgents === null || selectedAgents === void 0 ? void 0 : selectedAgents.length) + " Agent Selected";
|
|
2178
|
+
}
|
|
2179
|
+
}
|
|
2180
|
+
};
|
|
2181
|
+
ChatDrawerComponent.prototype.fetchAgents_http = function () {
|
|
2182
|
+
var _this = this;
|
|
2183
|
+
this.loading = true;
|
|
2184
|
+
var url = this.environment.AGENTS_API + "/CoPilot/" + this.botId + "/active-agents";
|
|
2185
|
+
var headers = new i1.HttpHeaders({
|
|
2186
|
+
'Content-Type': 'application/json',
|
|
2187
|
+
});
|
|
2188
|
+
return this.http.post(url, {}, { headers: headers }).pipe(operators.switchMap(function (res) {
|
|
2189
|
+
if (res) {
|
|
2190
|
+
_this.agents = res.map(function (agent) { return (Object.assign(Object.assign({}, agent), { selected: false })); });
|
|
2191
|
+
}
|
|
2192
|
+
_this.cdr.markForCheck();
|
|
2193
|
+
return rxjs.of(res);
|
|
2194
|
+
}), operators.catchError(function (error) {
|
|
2195
|
+
console.error('Error fetching chatbot config: ', error);
|
|
2196
|
+
return rxjs.of(null);
|
|
2197
|
+
}));
|
|
2198
|
+
};
|
|
2199
|
+
ChatDrawerComponent.prototype.fetchContent_http = function () {
|
|
2200
|
+
var _this = this;
|
|
2201
|
+
this.isDocInEditMode = false;
|
|
2202
|
+
this.isContentLoaded = false;
|
|
2203
|
+
console.log('API call function');
|
|
2204
|
+
this.loading = true;
|
|
2205
|
+
var conversation_id = this.conversationService.getKey(this.botId);
|
|
2206
|
+
this.conversationId = conversation_id;
|
|
2207
|
+
var url = this.environment.AGENTS_API + "/ConversationDocuments?conversationId=" + conversation_id + "&botId=" + this.botId;
|
|
2208
|
+
var headers = new i1.HttpHeaders({
|
|
2209
|
+
'Content-Type': 'application/json',
|
|
2210
|
+
apiKey: 'WIz/qAm+EEmfOkFaUA/weA==',
|
|
2211
|
+
'domain-authority': this.domainAuthorityValue
|
|
2212
|
+
});
|
|
2213
|
+
return this.http.get(url, { headers: headers }).pipe(operators.switchMap(function (res) {
|
|
2214
|
+
if (res) {
|
|
2215
|
+
_this.isDocInEditMode = true;
|
|
2216
|
+
_this.documentContent = res;
|
|
2217
|
+
console.log('Get API callled success');
|
|
2218
|
+
_this.isContentLoaded = true;
|
|
2219
|
+
console.log(res);
|
|
2220
|
+
}
|
|
2221
|
+
_this.cdr.markForCheck();
|
|
2222
|
+
return rxjs.of(res);
|
|
2223
|
+
}), operators.catchError(function (error) {
|
|
2224
|
+
console.error('Error fetching chatbot config DJ: ', error);
|
|
2225
|
+
_this.isDocInEditMode = false;
|
|
2226
|
+
_this.isContentLoaded = true;
|
|
2227
|
+
if ((error === null || error === void 0 ? void 0 : error.status) == 404) {
|
|
2228
|
+
console.log('dash');
|
|
2229
|
+
_this.isDocInEditMode = false;
|
|
2230
|
+
_this.isContentLoaded = true;
|
|
2231
|
+
}
|
|
2232
|
+
return rxjs.of(null);
|
|
2233
|
+
}));
|
|
2234
|
+
};
|
|
2235
|
+
ChatDrawerComponent.prototype.fetchAgents = function () {
|
|
2236
|
+
this.fetchAgents_http().subscribe();
|
|
2237
|
+
};
|
|
2238
|
+
ChatDrawerComponent.prototype.fetchEditorContent = function () {
|
|
2239
|
+
this.fetchContent_http().subscribe();
|
|
2240
|
+
};
|
|
2241
|
+
// events/${eventId}/users-connections
|
|
2242
|
+
ChatDrawerComponent.prototype.processMessageForDisplay = function (markdown) {
|
|
2243
|
+
try {
|
|
2244
|
+
// Create a custom renderer to modify <a> tags
|
|
2245
|
+
var renderer = new marked__namespace.Renderer();
|
|
2246
|
+
// Customize anchor tags to include target="_blank"
|
|
2247
|
+
renderer.link = function (href, title, text) {
|
|
2248
|
+
return "<a href=\"" + href + "\" title=\"" + (title || '') + "\" target=\"_blank\">" + text + "</a>";
|
|
2249
|
+
};
|
|
2250
|
+
// Parse the markdown content to HTML using marked with the custom renderer
|
|
2251
|
+
var markdownContent = marked__namespace.parse(markdown, { renderer: renderer });
|
|
2252
|
+
// Sanitize the parsed HTML using Angular's DomSanitizer
|
|
2253
|
+
var sanitizedHtml = this.sanitizer.bypassSecurityTrustHtml(markdownContent);
|
|
2254
|
+
// Return the safe HTML content for display
|
|
2255
|
+
return sanitizedHtml;
|
|
2256
|
+
}
|
|
2257
|
+
catch (error) {
|
|
2258
|
+
console.error('Error processing markdown:', error);
|
|
2259
|
+
return ''; // Return an empty string or handle the error appropriately
|
|
2260
|
+
}
|
|
2261
|
+
};
|
|
2262
|
+
ChatDrawerComponent.prototype.prepareHtml = function (markdown) {
|
|
2263
|
+
var _this = this;
|
|
2264
|
+
if (!markdown || !(markdown.length > 0)) {
|
|
2265
|
+
console.error('Input Markdown is null or empty');
|
|
2266
|
+
return '';
|
|
2267
|
+
}
|
|
2268
|
+
// Convert Markdown headers (### or ##) to <strong> for bold headings
|
|
2269
|
+
var html = markdown.replace(/^(#{1,6})\s+(.*)$/gm, function (match, hashes, text) {
|
|
2270
|
+
var level = hashes.length;
|
|
2271
|
+
if (level === 3) {
|
|
2272
|
+
return "<h3><strong>" + text + "</strong></h3>";
|
|
2273
|
+
}
|
|
2274
|
+
else if (level === 4) {
|
|
2275
|
+
return "<h4><strong>" + text + "</strong></h4>";
|
|
2276
|
+
}
|
|
2277
|
+
return "<strong>" + text + "</strong>";
|
|
2278
|
+
});
|
|
2279
|
+
// Convert Markdown code blocks with language to preformatted HTML
|
|
2280
|
+
html = html.replace(/```(\w+)?\n([\s\S]*?)```/g, function (match, lang, code) {
|
|
2281
|
+
var escapedCode = _this.escapeHtml(code);
|
|
2282
|
+
var language = lang || 'plaintext';
|
|
2283
|
+
// Create a copy button for the code block
|
|
2284
|
+
return "\n <div class=\"code-container\">\n <button id=\"copy-button\" class=\"copy-button\" (click)=\"copyToClipboard('`" + escapedCode + "`')\">" + _this.getTranslation('Copy') + "</button>\n <pre class=\"code_block diff\"><code class=\"language-" + language + "\">" + escapedCode + "</code></pre>\n </div>";
|
|
2285
|
+
});
|
|
2286
|
+
// Convert inline code (wrapped in `backticks`) to inline <code> tags
|
|
2287
|
+
html = html.replace(/`([^`]+)`/g, '<code>$1</code>');
|
|
2288
|
+
// Convert Markdown bold to HTML <strong>
|
|
2289
|
+
html = html.replace(/\*\*(.*?)\*\*/g, '<strong>$1</strong>');
|
|
2290
|
+
// Convert numbered lists
|
|
2291
|
+
html = html.replace(/^\d+\.\s+(.*)$/gm, '<li>$1</li>');
|
|
2292
|
+
// Convert bullet point lists
|
|
2293
|
+
html = html.replace(/^\-\s+(.*)$/gm, '<li>$1</li>');
|
|
2294
|
+
// Convert Markdown links to HTML links
|
|
2295
|
+
html = html.replace(/\[([^\]]+)]\(([^)]+)\)/g, '<a href="$2" target="_blank">$1</a>');
|
|
2296
|
+
// Convert new lines to <br> tags for paragraphs
|
|
2297
|
+
html = html.replace(/(?:\r\n|\r|\n)/g, '<br>');
|
|
2298
|
+
return html;
|
|
2299
|
+
};
|
|
2300
|
+
// Helper function to escape HTML characters for code blocks
|
|
2301
|
+
ChatDrawerComponent.prototype.escapeHtml = function (code) {
|
|
2302
|
+
return code
|
|
2303
|
+
.replace(/&/g, '&')
|
|
2304
|
+
.replace(/</g, '<')
|
|
2305
|
+
.replace(/>/g, '>')
|
|
2306
|
+
.replace(/"/g, '"')
|
|
2307
|
+
.replace(/'/g, ''');
|
|
2308
|
+
};
|
|
2309
|
+
// Function to copy text to clipboard
|
|
2310
|
+
ChatDrawerComponent.prototype.copyToClipboard = function (text) {
|
|
2311
|
+
navigator.clipboard.writeText(text).then(function () {
|
|
2312
|
+
alert('Code copied to clipboard!');
|
|
2313
|
+
}, function (err) {
|
|
2314
|
+
console.error('Could not copy text: ', err);
|
|
2315
|
+
});
|
|
2316
|
+
};
|
|
2317
|
+
ChatDrawerComponent.prototype.toggleCollapse = function () {
|
|
2318
|
+
this.isCollapsed = !this.isCollapsed;
|
|
2319
|
+
this.cdr.detectChanges();
|
|
2320
|
+
};
|
|
2321
|
+
ChatDrawerComponent.prototype.toggleCollapseGraph = function () {
|
|
2322
|
+
this.isCollapsedForGraph = !this.isCollapsedForGraph;
|
|
2323
|
+
this.cdr.detectChanges();
|
|
2324
|
+
};
|
|
2325
|
+
ChatDrawerComponent.prototype.toggleCollapseFGraph = function () {
|
|
2326
|
+
this.isCollapsedForFGraph = !this.isCollapsedForFGraph;
|
|
2327
|
+
this.cdr.detectChanges();
|
|
2328
|
+
};
|
|
2329
|
+
// Extracts the domain from a URL
|
|
2330
|
+
ChatDrawerComponent.prototype.getDomainName = function (url) {
|
|
2331
|
+
try {
|
|
2332
|
+
var hostname = new URL(url).hostname;
|
|
2333
|
+
return hostname.replace(/^www\./, ''); // Remove 'www.' if present
|
|
2334
|
+
}
|
|
2335
|
+
catch (_a) {
|
|
2336
|
+
return 'unknown';
|
|
2337
|
+
}
|
|
2338
|
+
};
|
|
2339
|
+
// Generates the favicon URL
|
|
2340
|
+
ChatDrawerComponent.prototype.getFaviconUrl = function (url) {
|
|
2341
|
+
var domain = this.getDomainName(url);
|
|
2342
|
+
return "https://www.google.com/s2/favicons?sz=128&domain=" + domain;
|
|
2343
|
+
};
|
|
2344
|
+
ChatDrawerComponent.prototype.onCardClick = function (sources) {
|
|
2345
|
+
this.currentSourcesList = sources;
|
|
2346
|
+
this.cdr.detectChanges();
|
|
2347
|
+
this.sourcesDrawer.open();
|
|
2348
|
+
var button = document.getElementById('botcloseplaygroundbutton');
|
|
2349
|
+
if (button) {
|
|
2350
|
+
button.style.display = 'none';
|
|
2351
|
+
}
|
|
2352
|
+
};
|
|
2353
|
+
ChatDrawerComponent.prototype.openOuterEditor = function () {
|
|
2354
|
+
this.fetchEditorContent();
|
|
2355
|
+
this.editorsDrawer.open();
|
|
2356
|
+
this.isDrawerOpen = true;
|
|
2357
|
+
this.isShowEditorButton = false;
|
|
2358
|
+
this.cdr.detectChanges();
|
|
2359
|
+
var button = document.getElementById('botcloseplaygroundbutton');
|
|
2360
|
+
if (button) {
|
|
2361
|
+
button.style.display = 'none';
|
|
2362
|
+
}
|
|
2363
|
+
};
|
|
2364
|
+
ChatDrawerComponent.prototype.onCloseEditor = function () {
|
|
2365
|
+
this.editorsDrawer.close();
|
|
2366
|
+
this.isDrawerOpen = false;
|
|
2367
|
+
this.isShowEditorButton = true;
|
|
2368
|
+
this.cdr.detectChanges(); // Trigger change detection if needed
|
|
2369
|
+
this.onDrawerClosed();
|
|
2370
|
+
};
|
|
2371
|
+
ChatDrawerComponent.prototype.onCloseSource = function () {
|
|
2372
|
+
this.sourcesDrawer.close();
|
|
2373
|
+
this.isDrawerOpen = false;
|
|
2374
|
+
this.cdr.detectChanges(); // Trigger change detection if needed
|
|
2375
|
+
this.onDrawerClosed();
|
|
2376
|
+
};
|
|
2377
|
+
ChatDrawerComponent.prototype.onDrawerClosed = function () {
|
|
2378
|
+
var _this = this;
|
|
2379
|
+
setTimeout(function () {
|
|
2380
|
+
_this.isDrawerOpen = true;
|
|
2381
|
+
_this.cdr.detectChanges(); // Trigger change detection if needed
|
|
2382
|
+
// Use ngClass to dynamically apply the class
|
|
2383
|
+
var button = document.getElementById('botcloseplaygroundbutton');
|
|
2384
|
+
if (button) {
|
|
2385
|
+
button.style.display = 'block';
|
|
2386
|
+
}
|
|
2387
|
+
}, 800);
|
|
2388
|
+
};
|
|
2389
|
+
ChatDrawerComponent.prototype.toggleDrawer = function (todo) {
|
|
2390
|
+
this.isDrawerOpen = todo;
|
|
2391
|
+
this.cdr.detectChanges();
|
|
2392
|
+
this.updateButtonVisibility();
|
|
2393
|
+
};
|
|
2394
|
+
ChatDrawerComponent.prototype.updateButtonVisibility = function () {
|
|
2395
|
+
var button = document.getElementById('botcloseplaygroundbutton');
|
|
2396
|
+
if (button) {
|
|
2397
|
+
button.style.display = this.isDrawerOpen ? 'block' : 'none';
|
|
2398
|
+
}
|
|
2399
|
+
};
|
|
2400
|
+
ChatDrawerComponent.prototype.openLinkInNewTab = function (link) {
|
|
2401
|
+
window.open(link, '_blank');
|
|
2402
|
+
};
|
|
2403
|
+
ChatDrawerComponent.prototype.adjustTextareaHeight = function (event) {
|
|
2404
|
+
try {
|
|
2405
|
+
if (event.key === 'Enter' && !event.shiftKey) {
|
|
2406
|
+
// Prevents a new line from being added
|
|
2407
|
+
event.preventDefault();
|
|
2408
|
+
}
|
|
2409
|
+
}
|
|
2410
|
+
catch (error) {
|
|
2411
|
+
}
|
|
2412
|
+
var textarea = event.target;
|
|
2413
|
+
textarea.style.height = 'auto'; // Reset the height
|
|
2414
|
+
textarea.style.height = textarea.scrollHeight + "px"; // Adjust height to match content
|
|
2415
|
+
// Ensure the height doesn't exceed the max-height set in CSS
|
|
2416
|
+
if (textarea.scrollHeight > 150) {
|
|
2417
|
+
textarea.style.height = "150px"; // Adjust height to match content
|
|
2418
|
+
textarea.style.overflowY = 'auto'; // Enable scrolling if content exceeds 400px
|
|
2419
|
+
}
|
|
2420
|
+
else {
|
|
2421
|
+
textarea.style.overflowY = 'hidden'; // Hide scrollbar if content is within limits
|
|
2422
|
+
}
|
|
2423
|
+
};
|
|
2424
|
+
ChatDrawerComponent.prototype.toggleWorkflows = function (value) {
|
|
2425
|
+
var _this = this;
|
|
2426
|
+
if (value === void 0) { value = null; }
|
|
2427
|
+
if (!this.checkForCop29BotId()) {
|
|
2428
|
+
this.botService.getWorkflowsByOrgId(this.orgId).subscribe(function (res) {
|
|
2429
|
+
_this.orgWorkflows = res;
|
|
2430
|
+
_this.isWorkflowOpen = value == null ? !_this.isWorkflowOpen : value;
|
|
2431
|
+
if (!_this.isWorkflowOpen) {
|
|
2432
|
+
_this.selectedWorkflow = null;
|
|
2433
|
+
_this.openWorkflowInput = false;
|
|
2434
|
+
}
|
|
2435
|
+
_this.cdr.detectChanges();
|
|
2436
|
+
});
|
|
2437
|
+
}
|
|
2438
|
+
};
|
|
2439
|
+
ChatDrawerComponent.prototype.initializeForm = function () {
|
|
2440
|
+
var _a, _b;
|
|
2441
|
+
// Create form controls dynamically based on selectedWorkflow.Trigger.InputSchema
|
|
2442
|
+
var formControls = {};
|
|
2443
|
+
if ((_b = (_a = this.selectedWorkflow) === null || _a === void 0 ? void 0 : _a.Trigger) === null || _b === void 0 ? void 0 : _b.InputSchema) {
|
|
2444
|
+
this.selectedWorkflow.Trigger.InputSchema.forEach(function (input) {
|
|
2445
|
+
formControls[input.InputId] = [
|
|
2446
|
+
input.Value || '',
|
|
2447
|
+
input.Required ? forms.Validators.required : null,
|
|
2448
|
+
];
|
|
2449
|
+
});
|
|
2450
|
+
}
|
|
2451
|
+
// Initialize the form
|
|
2452
|
+
this.workflowForm = this.fb.group(formControls);
|
|
2453
|
+
};
|
|
2454
|
+
ChatDrawerComponent.prototype.onWorkflowSelected = function (workflow) {
|
|
2455
|
+
this.selectedWorkflow = workflow;
|
|
2456
|
+
this.initializeForm();
|
|
2457
|
+
this.isWorkflowOpen = false;
|
|
2458
|
+
this.openWorkflowInput = true;
|
|
2459
|
+
};
|
|
2460
|
+
ChatDrawerComponent.prototype.onWorkflowSubmit = function () {
|
|
2461
|
+
var container = document.getElementById('allChats');
|
|
2462
|
+
if (this.workflowForm.valid) {
|
|
2463
|
+
console.log(this.workflowForm.value);
|
|
2464
|
+
var input = this.prepareHtml(this.generateMarkdown(this.selectedWorkflow.Name, this.workflowForm.value));
|
|
2465
|
+
// update last two chatLog entries, set showWorkflowExecutionLoader = false
|
|
2466
|
+
try {
|
|
2467
|
+
this.chatLog[this.chatLog.length - 1]['showWorkflowExecutionLoader'] = false;
|
|
2468
|
+
this.chatLog[this.chatLog.length - 2]['showWorkflowExecutionLoader'] = false;
|
|
2469
|
+
}
|
|
2470
|
+
catch (error) { }
|
|
2471
|
+
this.chatLog.push({
|
|
2472
|
+
type: 'user',
|
|
2473
|
+
message: input,
|
|
2474
|
+
time: formatNow(this.timezone),
|
|
2475
|
+
copied: false,
|
|
2476
|
+
isCollapsedTrue: false,
|
|
2477
|
+
showWorkflowExecutionLoader: true,
|
|
2478
|
+
});
|
|
2479
|
+
console.log(input);
|
|
2480
|
+
this.currentWorkflowActionProgress = 0;
|
|
2481
|
+
this.currentWorkflowAction =
|
|
2482
|
+
'Executing ' + this.selectedWorkflow.Actions[0].Name;
|
|
2483
|
+
this.isChatingWithAi = true;
|
|
2484
|
+
this.executingWorkflow = true;
|
|
2485
|
+
this.workflowExecutionDetails = {
|
|
2486
|
+
Actions: this.selectedWorkflow.Actions,
|
|
2487
|
+
Inputs: this.workflowForm.value,
|
|
2488
|
+
workflowInputs: this.workflowForm.value,
|
|
2489
|
+
WorkflowName: this.selectedWorkflow.Name,
|
|
2490
|
+
};
|
|
2491
|
+
this.currentWorkflowExecutionDetails = this.workflowExecutionDetails;
|
|
2492
|
+
this.scrollToBottom();
|
|
2493
|
+
this.cdr.detectChanges();
|
|
2494
|
+
// execute the ask endpoint with workflow input
|
|
2495
|
+
this.makeAskRequest(input, this.agents, this.conversationKey, '', null, this.selectedWorkflow['_id'], this.workflowForm.value);
|
|
2496
|
+
}
|
|
2497
|
+
};
|
|
2498
|
+
ChatDrawerComponent.prototype.makeAskRequest = function (inputMsg, agents, conversationId, msg, chat, workflowId, workflow_inputs) {
|
|
2499
|
+
var _this = this;
|
|
2500
|
+
var _a;
|
|
2501
|
+
var url = this.environment.BASE_URL + "/ai/ask";
|
|
2502
|
+
var body = {
|
|
2503
|
+
user_question: inputMsg,
|
|
2504
|
+
user_id: this.userId,
|
|
2505
|
+
bot_id: this.botId,
|
|
2506
|
+
message_id: this.conversationService.generateKey(),
|
|
2507
|
+
session_id: this.conSessionKey,
|
|
2508
|
+
agents: (_a = agents === null || agents === void 0 ? void 0 : agents.filter(function (p) { return p.selected; }).map(function (p) { return p.id; })) !== null && _a !== void 0 ? _a : [],
|
|
2509
|
+
conversation_id: conversationId,
|
|
2510
|
+
first_name: this.firstName,
|
|
2511
|
+
last_name: this.lastName
|
|
2512
|
+
};
|
|
2513
|
+
if (workflowId) {
|
|
2514
|
+
body['workflow_id'] = workflowId;
|
|
2515
|
+
body['workflow_inputs'] = workflow_inputs;
|
|
2516
|
+
}
|
|
2517
|
+
fetch(url, {
|
|
2518
|
+
method: 'POST',
|
|
2519
|
+
headers: {
|
|
2520
|
+
'Content-Type': 'application/json',
|
|
2521
|
+
Authorization: 'Bearer ' + this.s27Token,
|
|
2522
|
+
'x-api-key': this.apiKey,
|
|
2523
|
+
'hive-bot-id': this.botId,
|
|
2524
|
+
'domain-authority': this.domainAuthorityValue
|
|
2525
|
+
},
|
|
2526
|
+
body: JSON.stringify(body),
|
|
2527
|
+
})
|
|
2528
|
+
.then(function (response) {
|
|
2529
|
+
if (response.status === 401 || response.status === 403) {
|
|
2530
|
+
_this.is401 = true;
|
|
2531
|
+
_this.refreshToken.emit();
|
|
2532
|
+
// If `msg` and `chat` exist, handle them
|
|
2533
|
+
if (msg && chat) {
|
|
2534
|
+
_this.msg = msg;
|
|
2535
|
+
_this.chat = chat;
|
|
2536
|
+
_this.isFetchDataFor = true;
|
|
2537
|
+
}
|
|
2538
|
+
}
|
|
2539
|
+
else {
|
|
2540
|
+
_this.is401 = false;
|
|
2541
|
+
}
|
|
2542
|
+
return response.json();
|
|
2543
|
+
})
|
|
2544
|
+
.then(function (data) {
|
|
2545
|
+
console.log(data);
|
|
2546
|
+
// Additional response handling if needed
|
|
2547
|
+
})
|
|
2548
|
+
.catch(function (err) {
|
|
2549
|
+
console.error('Error: ', err);
|
|
2550
|
+
_this.isChatingWithAi = false;
|
|
2551
|
+
});
|
|
2552
|
+
this.input = '';
|
|
2553
|
+
this.selectedWorkflow = null;
|
|
2554
|
+
this.openWorkflowInput = false;
|
|
2555
|
+
this.isWorkflowOpen = false;
|
|
2556
|
+
this.scrollToBottom();
|
|
2557
|
+
this.cdr.markForCheck();
|
|
2558
|
+
};
|
|
2559
|
+
ChatDrawerComponent.prototype.makeAskRequestold = function (inputMsg, agents, conversationId, msg, chat, workflowId, workflow_inputs) {
|
|
2560
|
+
var _this = this;
|
|
2561
|
+
var _a;
|
|
2562
|
+
var url = this.environment.BASE_URL + "/ai/ask";
|
|
2563
|
+
var body = {
|
|
2564
|
+
user_question: inputMsg,
|
|
2565
|
+
user_id: this.userId,
|
|
2566
|
+
bot_id: this.botId,
|
|
2567
|
+
message_id: this.conversationService.generateKey(),
|
|
2568
|
+
agents: (_a = agents === null || agents === void 0 ? void 0 : agents.filter(function (p) { return p.selected; }).map(function (p) { return p.id; })) !== null && _a !== void 0 ? _a : [],
|
|
2569
|
+
conversation_id: conversationId,
|
|
2570
|
+
first_name: this.firstName,
|
|
2571
|
+
last_name: this.lastName,
|
|
2572
|
+
};
|
|
2573
|
+
if (workflowId) {
|
|
2574
|
+
body['workflow_id'] = workflowId;
|
|
2575
|
+
body['workflow_inputs'] = workflow_inputs;
|
|
2576
|
+
}
|
|
2577
|
+
var headers = new i1.HttpHeaders({
|
|
2578
|
+
'Content-Type': 'application/json',
|
|
2579
|
+
'x-api-key': this.apiKey,
|
|
2580
|
+
'hive-bot-id': this.botId,
|
|
2581
|
+
'domain-authority': this.domainAuthorityValue,
|
|
2582
|
+
});
|
|
2583
|
+
this.http.post(url, body, { headers: headers })
|
|
2584
|
+
.subscribe({
|
|
2585
|
+
next: function (data) {
|
|
2586
|
+
console.log(data);
|
|
2587
|
+
// Additional response handling if needed
|
|
2588
|
+
},
|
|
2589
|
+
error: function (err) {
|
|
2590
|
+
console.error('Error: ', err);
|
|
2591
|
+
_this.isChatingWithAi = false;
|
|
2592
|
+
},
|
|
2593
|
+
});
|
|
2594
|
+
this.input = '';
|
|
2595
|
+
this.selectedWorkflow = null;
|
|
2596
|
+
this.openWorkflowInput = false;
|
|
2597
|
+
this.isWorkflowOpen = false;
|
|
2598
|
+
this.scrollToBottom();
|
|
2599
|
+
this.cdr.markForCheck();
|
|
2600
|
+
};
|
|
2601
|
+
ChatDrawerComponent.prototype.generateMarkdown = function (title, obj) {
|
|
2602
|
+
var e_1, _g;
|
|
2603
|
+
var _a;
|
|
2604
|
+
// Initialize markdown with the title
|
|
2605
|
+
var markdown = "## " + title + "\n";
|
|
2606
|
+
var _loop_1 = function (key, value) {
|
|
2607
|
+
key_label = ((_a = this_1.selectedWorkflow.Trigger.InputSchema.find(function (input) { return input.InputId === key; })) === null || _a === void 0 ? void 0 : _a.Label) || key;
|
|
2608
|
+
markdown += "- **" + key_label + "**: " + value + "\n";
|
|
2609
|
+
};
|
|
2610
|
+
var this_1 = this, key_label;
|
|
2611
|
+
try {
|
|
2612
|
+
// Loop through the object and append the field names and values
|
|
2613
|
+
for (var _h = __values(Object.entries(obj)), _j = _h.next(); !_j.done; _j = _h.next()) {
|
|
2614
|
+
var _k = __read(_j.value, 2), key = _k[0], value = _k[1];
|
|
2615
|
+
_loop_1(key, value);
|
|
2616
|
+
}
|
|
2617
|
+
}
|
|
2618
|
+
catch (e_1_1) { e_1 = { error: e_1_1 }; }
|
|
2619
|
+
finally {
|
|
2620
|
+
try {
|
|
2621
|
+
if (_j && !_j.done && (_g = _h.return)) _g.call(_h);
|
|
2622
|
+
}
|
|
2623
|
+
finally { if (e_1) throw e_1.error; }
|
|
2624
|
+
}
|
|
2625
|
+
return markdown;
|
|
2626
|
+
};
|
|
2627
|
+
ChatDrawerComponent.prototype.showWorkflowHistoryDetails = function (workflow_id) {
|
|
2628
|
+
var _this = this;
|
|
2629
|
+
if (!workflow_id) {
|
|
2630
|
+
this.workflowExecutionDetails = this.currentWorkflowExecutionDetails;
|
|
2631
|
+
this.showWorkflowExecutionDetails = true;
|
|
2632
|
+
this.cdr.detectChanges();
|
|
2633
|
+
return;
|
|
2634
|
+
}
|
|
2635
|
+
this.botService.getWorkflowExecutionById(workflow_id).subscribe(function (res) {
|
|
2636
|
+
if (res && res.Actions && Array.isArray(res.Actions)) {
|
|
2637
|
+
res.Actions = res.Actions.map(function (action) {
|
|
2638
|
+
if (action.InsertTimeStamp) {
|
|
2639
|
+
action.InsertTimeStamp = formatTimeStamps(_this.timezone, action.InsertTimeStamp);
|
|
2640
|
+
}
|
|
2641
|
+
return action;
|
|
2642
|
+
});
|
|
2643
|
+
}
|
|
2644
|
+
res.InsertTimeStamp = formatTimeStamps(_this.timezone, res.InsertTimeStamp);
|
|
2645
|
+
_this.workflowExecutionDetails = res;
|
|
2646
|
+
_this.showWorkflowExecutionDetails = true;
|
|
2647
|
+
_this.cdr.detectChanges();
|
|
2648
|
+
});
|
|
2649
|
+
};
|
|
2650
|
+
ChatDrawerComponent.prototype.closeModal = function () {
|
|
2651
|
+
this.showWorkflowExecutionDetails = false;
|
|
2652
|
+
};
|
|
2653
|
+
ChatDrawerComponent.prototype.objectToArray = function (obj) {
|
|
2654
|
+
return Object.keys(obj).map(function (key) { return ({ key: key, value: obj[key] }); });
|
|
2655
|
+
};
|
|
2656
|
+
ChatDrawerComponent.prototype.startNewConversation = function () {
|
|
2657
|
+
var _this = this;
|
|
2658
|
+
this.conversationKey = this.conversationService.getKey(this.botId, true);
|
|
2659
|
+
this.chatLog = [this.chatLog[0]];
|
|
2660
|
+
this.isChatingWithAi = false;
|
|
2661
|
+
setTimeout(function () {
|
|
2662
|
+
_this.initializeSocket();
|
|
2663
|
+
}, 200);
|
|
2664
|
+
this.scrollToBottom();
|
|
2665
|
+
this.cdr.detectChanges();
|
|
2666
|
+
};
|
|
2667
|
+
ChatDrawerComponent.prototype.initializeSpeechRecognizer = function (token) {
|
|
2668
|
+
var _this = this;
|
|
2669
|
+
this.speechConfig = SpeechSDK__namespace.SpeechConfig.fromAuthorizationToken(token, this.region);
|
|
2670
|
+
var audioConfig = SpeechSDK__namespace.AudioConfig.fromDefaultMicrophoneInput();
|
|
2671
|
+
this.recognizer = new SpeechSDK__namespace.SpeechRecognizer(this.speechConfig, audioConfig);
|
|
2672
|
+
this.recognizer.recognizing = function (s, e) {
|
|
2673
|
+
if (e.result.reason === SpeechSDK__namespace.ResultReason.RecognizingSpeech) {
|
|
2674
|
+
_this.input = e.result.text;
|
|
2675
|
+
console.log("Recognizing: " + e.result.text);
|
|
2676
|
+
_this.cdr.markForCheck();
|
|
2677
|
+
}
|
|
2678
|
+
};
|
|
2679
|
+
this.recognizer.recognized = function (s, e) {
|
|
2680
|
+
if (e.result.reason === SpeechSDK__namespace.ResultReason.RecognizedSpeech) {
|
|
2681
|
+
_this.input = e.result.text;
|
|
2682
|
+
console.log("Recognized: " + e.result.text);
|
|
2683
|
+
_this.toggleRecording();
|
|
2684
|
+
_this.cdr.markForCheck();
|
|
2685
|
+
}
|
|
2686
|
+
};
|
|
2687
|
+
this.recognizer.canceled = function (s, e) {
|
|
2688
|
+
console.error('Canceled: ', e.errorDetails);
|
|
2689
|
+
};
|
|
2690
|
+
this.recognizer.sessionStopped = function (s, e) {
|
|
2691
|
+
console.log('Session stopped.');
|
|
2692
|
+
_this.recognizer.stopContinuousRecognitionAsync();
|
|
2693
|
+
_this.fetchData();
|
|
2694
|
+
};
|
|
2695
|
+
};
|
|
2696
|
+
ChatDrawerComponent.prototype.toggleRecording = function () {
|
|
2697
|
+
this.isRecording = !this.isRecording;
|
|
2698
|
+
if (this.isRecording) {
|
|
2699
|
+
this.startRecognition();
|
|
2700
|
+
}
|
|
2701
|
+
else {
|
|
2702
|
+
this.stopRecognition();
|
|
2703
|
+
}
|
|
2704
|
+
};
|
|
2705
|
+
ChatDrawerComponent.prototype.startRecognition = function () {
|
|
2706
|
+
this.recognizer.startContinuousRecognitionAsync();
|
|
2707
|
+
};
|
|
2708
|
+
ChatDrawerComponent.prototype.stopRecognition = function () {
|
|
2709
|
+
this.recognizer.stopContinuousRecognitionAsync();
|
|
2710
|
+
};
|
|
2711
|
+
ChatDrawerComponent.prototype.checkForCop29BotId = function () {
|
|
2712
|
+
return this.botId == '66fa3f276c5d71e2717bfea8' || this.botId == '671633545652dd78efec848d';
|
|
2713
|
+
};
|
|
2714
|
+
ChatDrawerComponent.prototype.getLatestTime = function (time) {
|
|
2715
|
+
if (time) {
|
|
2716
|
+
return time;
|
|
2717
|
+
}
|
|
2718
|
+
return new Date().toLocaleTimeString([], {
|
|
2719
|
+
hour: '2-digit',
|
|
2720
|
+
minute: '2-digit',
|
|
2721
|
+
}); // returns current time in 'shortTime' format
|
|
2722
|
+
};
|
|
2723
|
+
return ChatDrawerComponent;
|
|
2724
|
+
}());
|
|
2725
|
+
ChatDrawerComponent.decorators = [
|
|
2726
|
+
{ type: i0.Component, args: [{
|
|
2727
|
+
selector: 'hivegpt-chat-drawer-package',
|
|
2728
|
+
template: "<button\n *ngIf=\"isShowEditorButton && !checkForCop29BotId()\"\n (click)=\"openOuterEditor()\"\n class=\"fixed-btn\"\n>\n <span style=\"font-size: 12px\" class=\"material-icons notranslate\">\n create\n </span>\n Editor\n</button>\n\n<button\n *ngIf=\"!isShowEditorButton\"\n (click)=\"onCloseEditor()\"\n class=\"fixed-btn-close\"\n>\n <span style=\"font-size: 12px\" class=\"material-icons notranslate\">\n close\n </span>\n {{ getTranslation(\"Close\") }}\n</button>\n\n<mat-drawer-container\n class=\"hivegpt-chat-wrapper\"\n [ngClass]=\"{ 'mat-drawer-container-has-open': isDrawerOpen }\"\n [class.ios-device]=\"isIOSDevice\"\n [hasBackdrop]=\"hasBackdropValue\"\n>\n <mat-drawer\n class=\"drawer\"\n #drawer\n [position]=\"'start'\"\n [mode]=\"'over'\"\n opened=\"true\"\n [class.full-width-drawer]=\"fullView\"\n [style.background]=\"\n 'linear-gradient(' + (bgGradient ? bgGradient.join(', ') : '') + ')'\n \"\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 {{ getTranslation(\"New Chat\") }}\n <span\n ><svg\n xmlns=\"http://www.w3.org/2000/svg\"\n width=\"14.061\"\n height=\"14.261\"\n viewBox=\"0 0 14.061 14.261\"\n >\n <path\n id=\"Path_164\"\n 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)\"\n fill=\"none\"\n stroke=\"#06f\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n stroke-width=\"1.5\"\n />\n </svg>\n </span>\n </div>\n <div class=\"sticky-header-chat\">\n <div class=\"title_chat\">\n <h2>\n <span>\n {{ getTranslation(botName) }}\n <svg\n *ngIf=\"!checkForCop29BotId()\"\n xmlns=\"http://www.w3.org/2000/svg\"\n width=\"31.499\"\n height=\"31.501\"\n viewBox=\"0 0 31.499 31.501\"\n >\n <path\n id=\"Icon_ion-shield-checkmark\"\n 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)\"\n fill=\"#06f\"\n />\n </svg>\n </span>\n <span *ngIf=\"!checkForCop29BotId()\">\n <p class=\"small-title\">\n {{ getTranslation(\"AI-powered\")\n }}<span>{{ getTranslation(\"copilot\") }}</span>\n </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\n id=\"allChats\"\n class=\"chat bot\"\n *ngFor=\"let chat of chatLog; let i = index\"\n >\n <div class=\"chat-box\">\n <div class=\"message\">\n <div\n class=\"time-cta\"\n [ngClass]=\"{\n 'time-cta din': showFeedBackIconsIndex === i,\n 'time-cta': showFeedBackIconsIndex != i\n }\"\n >\n <div class=\"Icon_TimeSTamp\" *ngIf=\"chat?.type === 'ai'\">\n <!-- <img [src]=\"botIcon\" [alt]=\"botName || 'Assistant'\" /> -->\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n width=\"44\"\n height=\"44\"\n viewBox=\"0 0 44 44\"\n >\n <g\n id=\"Group_121\"\n data-name=\"Group 121\"\n transform=\"translate(4843 -371)\"\n >\n <g\n id=\"Ellipse_18\"\n data-name=\"Ellipse 18\"\n transform=\"translate(-4843 371)\"\n fill=\"#fcfcfc\"\n stroke=\"#dfdfdf\"\n stroke-width=\"1\"\n >\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\n id=\"Group_120\"\n data-name=\"Group 120\"\n transform=\"translate(-4835.141 378.855)\"\n >\n <g\n id=\"Group_1\"\n data-name=\"Group 1\"\n transform=\"translate(7.29 0)\"\n >\n <path\n id=\"Path_1\"\n 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)\"\n fill=\"gray\"\n />\n </g>\n <g\n id=\"Group_2\"\n data-name=\"Group 2\"\n transform=\"translate(0 12.717)\"\n >\n <path\n id=\"Path_2\"\n 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)\"\n fill=\"gray\"\n />\n </g>\n <g\n id=\"Group_3\"\n data-name=\"Group 3\"\n transform=\"translate(14.793 12.717)\"\n >\n <path\n id=\"Path_3\"\n 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)\"\n fill=\"gray\"\n />\n </g>\n </g>\n </g>\n </svg>\n\n <div\n class=\"dateTime\"\n [style.color]=\"dateTimeColor ? '' : ''\"\n >\n <span>{{ getTranslation(\"Assistant\") }}</span>\n {{ chat?.time }}\n </div>\n </div>\n\n <div class=\"Icon_TimeSTamp\" *ngIf=\"chat?.type === 'user'\">\n <div class=\"user-Box\">\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n width=\"44\"\n height=\"44\"\n viewBox=\"0 0 44 44\"\n >\n <g\n id=\"Ellipse_17\"\n data-name=\"Ellipse 17\"\n fill=\"#fcfcfc\"\n stroke=\"#dfdfdf\"\n stroke-width=\"1\"\n >\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\n id=\"Icon_grommet-user-expert\"\n 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)\"\n fill=\"none\"\n stroke=\"gray\"\n stroke-width=\"1.5\"\n />\n </svg>\n\n <div class=\"dateTime\">\n <span>{{ getTranslation(\"You\") }}</span>\n {{ chat?.time }}\n </div>\n </div>\n <div class=\"bards\">\n <div\n class=\"bars\"\n *ngIf=\"\n chat?.WorkflowExecutionId ||\n chat?.showWorkflowExecutionLoader\n \"\n >\n <button\n class=\"icon-button\"\n (click)=\"\n showWorkflowHistoryDetails(chat.WorkflowExecutionId)\n \"\n >\n <i class=\"fas fa-bars\"></i>\n </button>\n </div>\n </div>\n </div>\n </div>\n <div class=\"researchingCard\">\n <div\n *ngIf=\"\n (chat?.searchTerms && chat?.searchTerms.length > 0) ||\n (chat?.sourcesList && chat?.sourcesList.length > 0)\n \"\n class=\"card-header d-flex align-items-center\"\n (click)=\"toggleCollapse()\"\n >\n <span class=\"icon\"\n ><i class=\"bx bx-plus-circle bx-sm\"></i\n ></span>\n <span class=\"ml-2\"\n >Researching\n <i\n id=\"toggleIcon\"\n class=\"toggle-icon ml-2 fa\"\n [ngClass]=\"{\n 'fa-chevron-down': isCollapsed,\n 'fa-chevron-up': !isCollapsed\n }\"\n ></i\n ></span>\n </div>\n <div\n *ngIf=\"chat?.searchTerms && chat?.searchTerms.length > 0\"\n [ngClass]=\"{ collapse: isCollapsed }\"\n >\n <ul class=\"list-group list-group-flush uptList\">\n <li\n *ngFor=\"let term of chat?.searchTerms\"\n class=\"list-group-item\"\n >\n Searching for\n <strong>{{ term }}</strong>\n </li>\n </ul>\n\n <h5\n class=\"mt-2\"\n *ngIf=\"chat?.sourcesList && chat?.sourcesList.length > 0\"\n >\n <i class=\"bx bx-unite\"></i> Sources\n </h5>\n <div\n class=\"sources-container\"\n *ngIf=\"chat?.sourcesList && chat?.sourcesList.length > 0\"\n >\n <div\n class=\"source-card\"\n *ngFor=\"\n let source of chat?.displayedSources;\n let i = index\n \"\n >\n <div>\n <div class=\"source-title\">{{ source.title }}</div>\n <div class=\"source-url\">\n <img\n class=\"relative block\"\n [src]=\"getFaviconUrl(source.link)\"\n [alt]=\"getDomainName(source.link) + ' favicon'\"\n />\n {{ getDomainName(source.link) }}\n </div>\n <div class=\"popup\">\n <div\n class=\"source-url\"\n (click)=\"openLinkInNewTab(source.link)\"\n >\n <img\n class=\"relative block\"\n [src]=\"getFaviconUrl(source.link)\"\n [alt]=\"getDomainName(source.link) + ' favicon'\"\n />\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\n *ngIf=\"\n chat?.remainingSources &&\n chat?.remainingSources.length > 0\n \"\n >\n <div\n class=\"source-card\"\n (click)=\"onCardClick(chat?.sourcesList)\"\n >\n <div>\n <div class=\"source-title\">\n <img\n *ngFor=\"\n let source of chat?.remainingSources;\n let i = index\n \"\n class=\"relative block\"\n [src]=\"getFaviconUrl(source.link)\"\n [alt]=\"getDomainName(source.link) + ' favicon'\"\n />\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\n *ngIf=\"chat?.type === 'ai' || chat?.type === 'user'\"\n [ngStyle]=\"{\n background:\n chat?.type === 'ai' && bgBubbleAi\n ? ''\n : chat?.type === 'user' && bgBubbleUser\n ? ''\n : ''\n }\"\n >\n <div id=\"messageText_{{ i }}\">\n <p\n *ngIf=\"chat?.type === 'ai' || chat?.type === 'user'\"\n [ngClass]=\"{\n 'SearchTitle ai': chat?.type === 'ai',\n 'SearchTitle user': chat?.type === 'user'\n }\"\n [ngStyle]=\"{\n background:\n chat?.type === 'ai' && messageTextColorAi\n ? messageTextColorAi\n : chat?.type === 'user' && messageTextColorUser\n ? messageTextColorUser\n : 'defaultBackground',\n color:\n chat?.type === 'ai' && messageTextColorAi\n ? messageTextColorAi\n : chat?.type === 'user' && messageTextColorUser\n ? messageTextColorUser\n : 'defaultColor'\n }\"\n [innerHTML]=\"chat?.message\"\n ></p>\n </div>\n </div>\n\n <div\n class=\"progress-container\"\n *ngIf=\"chat?.showWorkflowExecutionLoader\"\n >\n <div class=\"circular-loader\">\n <div\n class=\"loader-spinner\"\n *ngIf=\"currentWorkflowActionProgress < 100\"\n [ngStyle]=\"{\n transform: 'rotate(' + percentage * 3.6 + 'deg)'\n }\"\n ></div>\n <div\n class=\"checkmark\"\n *ngIf=\"currentWorkflowActionProgress == 100\"\n >\n <svg viewBox=\"0 0 52 52\">\n <circle\n class=\"checkmark-circle\"\n cx=\"26\"\n cy=\"26\"\n r=\"25\"\n fill=\"none\"\n />\n <path\n class=\"checkmark-check\"\n fill=\"none\"\n d=\"M14 27l7 7 16-16\"\n />\n </svg>\n </div>\n\n <div\n class=\"loader-text\"\n *ngIf=\"currentWorkflowActionProgress < 100\"\n >\n {{ currentWorkflowActionProgress }}%\n </div>\n </div>\n <div class=\"loader-label\">{{ currentWorkflowAction }}...</div>\n </div>\n\n <div\n class=\"exicution mt-2\"\n *ngIf=\"\n chat?.type === 'ai' &&\n chat?.graphs &&\n chat?.graphs.length > 0\n \"\n >\n <h5 *ngIf=\"chat?.type === 'ai'\">\n <i class=\"bx bx-network-chart\"></i> Graphs\n <i\n (click)=\"toggleCollapseFGraph()\"\n class=\"toggle-icon ml-2 fa\"\n [ngClass]=\"{\n 'fas fa-chevron-down': isCollapsedForFGraph,\n 'fas fa-chevron-up': !isCollapsedForFGraph\n }\"\n ></i>\n </h5>\n <img\n *ngFor=\"let image of chat?.graphs\"\n class=\"graph-img\"\n [ngClass]=\"{ collapse: isCollapsedForFGraph }\"\n [src]=\"image\"\n alt=\"\"\n />\n </div>\n <ng-container *ngIf=\"!checkForCop29BotId()\">\n <div\n class=\"exicution mt-2\"\n *ngIf=\"\n chat?.type === 'ai' &&\n chat?.executionGraphs &&\n chat?.executionGraphs?.length > 0\n \"\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\n (click)=\"toggleCollapseGraph()\"\n class=\"toggle-icon ml-2 fa\"\n [ngClass]=\"{\n 'fas fa-chevron-down': isCollapsedForGraph,\n 'fas fa-chevron-up': !isCollapsedForGraph\n }\"\n ></i>\n </h5>\n <img\n *ngFor=\"let image of chat?.executionGraphs\"\n class=\"graph-img\"\n [ngClass]=\"{ collapse: isCollapsedForGraph }\"\n [src]=\"image\"\n alt=\"\"\n />\n </div>\n </ng-container>\n <div class=\"cta\" *ngIf=\"chat?.type === 'ai' && i > 0\">\n <div\n class=\"copyBox\"\n title=\"Copy\"\n [ngClass]=\"\n showFeedBackIconsIndex == i ? 'show-always' : 'show-hover'\n \"\n >\n <button\n title=\"{{ chat?.copied ? 'Copied!' : 'Copy' }}\"\n class=\"copy\"\n [class.active]=\"chat?.copied\"\n (click)=\"handleCopyClick(i)\"\n >\n <i *ngIf=\"chat?.copied\">\n <svg\n width=\"18\"\n height=\"18\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <path\n d=\"M9 16.17L4.83 12L3.41 13.41L9 19L21 7L19.59 5.59L9 16.17Z\"\n fill=\"#566563\"\n />\n </svg>\n </i>\n\n <i *ngIf=\"!chat?.copied\">\n <svg\n width=\"18\"\n height=\"18\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\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 />\n </svg>\n </i>\n </button>\n\n <button\n *ngIf=\"!checkForCop29BotId()\"\n class=\"up copy\"\n title=\"{{ chat?.isEditor ? 'Added!' : 'Add to editor' }}\"\n (click)=\"handleEditorClick(i)\"\n >\n <svg\n *ngIf=\"!chat?.isEditor\"\n xmlns=\"http://www.w3.org/2000/svg\"\n width=\"20.152\"\n height=\"20.152\"\n viewBox=\"0 0 20.152 20.152\"\n >\n <g\n id=\"Icon_feather-edit\"\n data-name=\"Icon feather-edit\"\n transform=\"translate(-2.5 -2.166)\"\n >\n <path\n id=\"Path_166\"\n 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)\"\n fill=\"none\"\n stroke=\"#393939\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n stroke-width=\"1\"\n />\n <path\n id=\"Path_167\"\n 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)\"\n fill=\"none\"\n stroke=\"#393939\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n stroke-width=\"1\"\n />\n </g>\n </svg>\n\n <i *ngIf=\"chat?.isEditor\">\n <svg\n width=\"18\"\n height=\"18\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <path\n d=\"M9 16.17L4.83 12L3.41 13.41L9 19L21 7L19.59 5.59L9 16.17Z\"\n fill=\"#566563\"\n />\n </svg>\n </i>\n </button>\n\n <button\n class=\"up copy\"\n title=\"Like\"\n [class.active]=\"chat?.liked\"\n (click)=\"handleUpClick(i)\"\n >\n <i *ngIf=\"chat?.liked\">\n <svg\n width=\"18\"\n height=\"18\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\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 />\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 />\n </svg>\n </i>\n <i *ngIf=\"!chat?.liked\">\n <svg\n width=\"18\"\n height=\"18\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\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\"\n stroke=\"#566563\"\n />\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\"\n stroke=\"#566563\"\n />\n </svg>\n </i>\n </button>\n <button\n class=\"down copy\"\n title=\"Dislike\"\n [class.active]=\"chat?.unliked\"\n (click)=\"handleDownClick(i)\"\n >\n <i *ngIf=\"chat?.unliked\">\n <svg\n width=\"18\"\n height=\"18\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\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\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 />\n </svg>\n </i>\n\n <i *ngIf=\"!chat?.unliked\">\n <svg\n width=\"18\"\n height=\"18\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\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\"\n stroke=\"#566563\"\n />\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\"\n stroke=\"#566563\"\n />\n </svg>\n </i>\n </button>\n </div>\n </div>\n <div\n class=\"Related mt-2\"\n *ngIf=\"\n showFeedBackIconsIndex === i &&\n !isChatingWithAi &&\n chat?.relatedListItems &&\n chat?.relatedListItems.length > 0\n \"\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 </div>\n\n <div\n class=\"cta-faqs quick-prompts-extended\"\n *ngIf=\"i == 0 && quickPrompts?.length\"\n >\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\n *ngFor=\"let tile of quickPrompts\"\n (click)=\"sendMessageWithTile(tile.prompt)\"\n >\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\n *ngFor=\"let suggestion of chat?.suggestions\"\n (click)=\"sendMessageWithTile(suggestion)\"\n >\n <ng-container *ngIf=\"suggestion\">{{\n suggestion\n }}</ng-container>\n </button>\n </div>\n </div>\n <div\n *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 >\n <div class=\"box\">\n <div class=\"tiktokwrapper\">\n <div\n class=\"tiktokshell\"\n *ngFor=\"let user of chat?.action.users\"\n >\n <div class=\"videoPhotobox\">\n <ng-conatiner\n *ngIf=\"user?.photoPath && !user.userVideosModel\"\n >\n <img [src]=\"user?.photoPath\" />\n </ng-conatiner>\n <ng-conatiner *ngIf=\"user.userVideosModel\">\n <app-video-player\n *ngIf=\"user?.userVideosModel\"\n [isDev]=\"isDev\"\n [currentUserId]=\"userId\"\n [videoObj]=\"user?.userVideosModel\"\n [user]=\"user\"\n [eventId]=\"eventId\"\n type=\"1\"\n >\n </app-video-player>\n </ng-conatiner>\n </div>\n\n <div\n class=\"noPhoto\"\n *ngIf=\"!user?.photoPath && !user.userVideosModel\"\n >\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\n class=\"Connectbtn\"\n (click)=\"connectToUser(user.userId)\"\n >\n {{\n canConnect(user.userId)\n ? \"Connect\"\n : canDisconnect(user.userId)\n ? \"Disconnect\"\n : \"Request\n Sent\"\n }}\n </button>\n <button\n class=\"schedulebtn\"\n (click)=\"scheduleMeetingWithUser(user)\"\n >\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\n class=\"session-detail-wrapper card-background-session\"\n *ngFor=\"let upcomingSession of chat?.action.content\"\n >\n <div class=\"thumbnail\">\n <img\n 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 <!---->\n <!----><button\n class=\"play-btn color-primary\"\n title=\"Play Session: Introduction to the Imaging Radar Academy\"\n >\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\n class=\"d-flex justify-content-between align-items-center\"\n >\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\n (click)=\"\n performSessionAction(\n upcomingSession.id,\n 'view-session'\n )\n \"\n class=\"s27-btn-icon body-text-color\"\n title=\"View Session Information: Introduction to the Imaging Radar Academy\"\n >\n <span class=\"material-icons notranslate\">\n remove_red_eye\n </span>\n </button>\n\n <button\n (click)=\"\n performSessionAction(\n upcomingSession.id,\n 'add-to-agenda'\n )\n \"\n class=\"s27-btn-icon body-text-color\"\n >\n <span\n class=\"material-icons notranslate\"\n title=\"Add Session: Introduction to the Imaging Radar Academy to My agendaa\"\n >\n event_available\n </span>\n </button>\n <!---->\n <!---->\n <!---->\n <!---->\n\n <button\n (click)=\"\n performSessionAction(upcomingSession.id, 'play')\n \"\n class=\"s27-btn-icon body-text-color\"\n title=\"Copy session link to share\"\n >\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\n class=\"session-description color-secondary\"\n [innerHTML]=\"sanitizeHtml(upcomingSession.description)\"\n ></div>\n <ul\n class=\"speakers grid-2-cols\"\n *ngFor=\"let speakerId of upcomingSession.speakers\"\n >\n <li class=\"\">\n <div class=\"image\" title=\"Blair Wunderlich\">\n <img\n alt=\"Blair Wunderlich\"\n [src]=\"speakers[speakerId]?.photoPath\"\n class=\"\"\n />\n <!---->\n <!---->\n <!---->\n </div>\n <!---->\n <div\n class=\"content pl-3\"\n style=\"text-transform: none\"\n >\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=\"time-cta\">\n <div class=\"Icon_TimeSTamp\">\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n width=\"44\"\n height=\"44\"\n viewBox=\"0 0 44 44\"\n >\n <g\n id=\"Group_121\"\n data-name=\"Group 121\"\n transform=\"translate(4843 -371)\"\n >\n <g\n id=\"Ellipse_18\"\n data-name=\"Ellipse 18\"\n transform=\"translate(-4843 371)\"\n fill=\"#fcfcfc\"\n stroke=\"#dfdfdf\"\n stroke-width=\"1\"\n >\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\n id=\"Group_120\"\n data-name=\"Group 120\"\n transform=\"translate(-4835.141 378.855)\"\n >\n <g\n id=\"Group_1\"\n data-name=\"Group 1\"\n transform=\"translate(7.29 0)\"\n >\n <path\n id=\"Path_1\"\n 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)\"\n fill=\"gray\"\n />\n </g>\n <g\n id=\"Group_2\"\n data-name=\"Group 2\"\n transform=\"translate(0 12.717)\"\n >\n <path\n id=\"Path_2\"\n 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)\"\n fill=\"gray\"\n />\n </g>\n <g\n id=\"Group_3\"\n data-name=\"Group 3\"\n transform=\"translate(14.793 12.717)\"\n >\n <path\n id=\"Path_3\"\n 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)\"\n fill=\"gray\"\n />\n </g>\n </g>\n </g>\n </svg>\n <div\n class=\"dateTime\"\n [style.color]=\"dateTimeColor ? '' : ''\"\n >\n <span> {{ getTranslation(\"Assistant\") }}</span>\n {{ this.getLatestTime(chat?.time) }}\n </div>\n </div>\n </div>\n <div class=\"loaderbox\">\n <div class=\"loader-pkg\">\n <div class=\"loader--dot\"></div>\n <div class=\"loader--dot\"></div>\n <div class=\"loader--dot\"></div>\n <div class=\"loader--dot\"></div>\n <div class=\"loader--dot\"></div>\n <div class=\"loader--dot\"></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=\"time-cta\">\n <div class=\"Icon_TimeSTamp\">\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n width=\"44\"\n height=\"44\"\n viewBox=\"0 0 44 44\"\n >\n <g\n id=\"Group_121\"\n data-name=\"Group 121\"\n transform=\"translate(4843 -371)\"\n >\n <g\n id=\"Ellipse_18\"\n data-name=\"Ellipse 18\"\n transform=\"translate(-4843 371)\"\n fill=\"#fcfcfc\"\n stroke=\"#dfdfdf\"\n stroke-width=\"1\"\n >\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\n id=\"Group_120\"\n data-name=\"Group 120\"\n transform=\"translate(-4835.141 378.855)\"\n >\n <g\n id=\"Group_1\"\n data-name=\"Group 1\"\n transform=\"translate(7.29 0)\"\n >\n <path\n id=\"Path_1\"\n 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)\"\n fill=\"gray\"\n />\n </g>\n <g\n id=\"Group_2\"\n data-name=\"Group 2\"\n transform=\"translate(0 12.717)\"\n >\n <path\n id=\"Path_2\"\n 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)\"\n fill=\"gray\"\n />\n </g>\n <g\n id=\"Group_3\"\n data-name=\"Group 3\"\n transform=\"translate(14.793 12.717)\"\n >\n <path\n id=\"Path_3\"\n 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)\"\n fill=\"gray\"\n />\n </g>\n </g>\n </g>\n </svg>\n <div\n class=\"dateTime\"\n [style.color]=\"dateTimeColor ? '' : ''\"\n >\n <span>{{ \"Loading ...\" }}</span>\n </div>\n </div>\n </div>\n <div class=\"loaderbox\">\n <div class=\"loader-pkg\">\n <div class=\"loader--dot\"></div>\n <div class=\"loader--dot\"></div>\n <div class=\"loader--dot\"></div>\n <div class=\"loader--dot\"></div>\n <div class=\"loader--dot\"></div>\n <div class=\"loader--dot\"></div>\n </div>\n </div>\n </div>\n </div>\n </div>\n </div>\n </div>\n <!-- <div #chatMain></div> -->\n <div\n *ngIf=\"openWorkflowInput && selectedWorkflow && !executingWorkflow\"\n class=\"chatFooterWrapper\"\n >\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\n mat-icon-button\n class=\"closeButtonSource\"\n (click)=\"toggleWorkflows(false)\"\n >\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\n [formGroup]=\"workflowForm\"\n (ngSubmit)=\"onWorkflowSubmit()\"\n class=\"form-container\"\n >\n <div\n *ngFor=\"let input of selectedWorkflow?.Trigger?.InputSchema\"\n class=\"form-group\"\n >\n <label>{{ input.Label }}</label>\n\n <!-- Handle Text Input or Text Area based on requirement -->\n <textarea\n *ngIf=\"input.Type === 'string'\"\n formControlName=\"{{ input.InputId }}\"\n [placeholder]=\"input.Placeholder\"\n [rows]=\"2\"\n [required]=\"input.Required\"\n class=\"form-control\"\n ></textarea>\n\n <!-- Dropdown for Select Options -->\n <select\n *ngIf=\"input.Type === 'select'\"\n formControlName=\"{{ input.InputId }}\"\n class=\"form-control\"\n >\n <option\n *ngFor=\"let option of input.Options\"\n [value]=\"option.Value\"\n >\n {{ option.Label }}\n </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\">\n Submit\n </button>\n </div>\n </form>\n </div>\n </div>\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\" *ngIf=\"!checkForCop29BotId()\">\n <div class=\"agents_note_wrapper\">\n <div class=\"agents-dropdown-wrapper\">\n <div class=\"dropdown-wrapper\" (click)=\"toggleDropdown()\">\n <div class=\"dropdown-header\">\n <span>{{ getDropdownHeaderText() }}</span>\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n width=\"24\"\n height=\"24\"\n fill=\"none\"\n stroke=\"currentColor\"\n stroke-width=\"2\"\n viewBox=\"0 0 24 24\"\n >\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\n *ngFor=\"let agent of agents\"\n (click)=\"onAgentChange(agent)\"\n >\n <input type=\"checkbox\" [(ngModel)]=\"agent.selected\" />\n {{ agent.agentName }}\n </label>\n </div>\n </div>\n </div>\n </div>\n\n <div class=\"agents_note_wrapper\">\n <div class=\"agents-dropdown-wrapper\">\n <div class=\"dropdown-wrapper\" (click)=\"toggleWorkflows()\">\n <div class=\"dropdown-header\">\n <svg\n stroke=\"currentColor\"\n fill=\"currentColor\"\n stroke-width=\"0\"\n viewBox=\"0 0 256 256\"\n class=\"h-5 w-5\"\n height=\"1.3em\"\n width=\"1.3em\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\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></svg\n > Workflows\n </div>\n <div class=\"dropdown-menu\" *ngIf=\"isWorkflowOpen\">\n <label\n *ngFor=\"let orgWorkflow of orgWorkflows\"\n (click)=\"onWorkflowSelected(orgWorkflow)\"\n >\n {{ orgWorkflow.Name }}\n </label>\n </div>\n </div>\n </div>\n </div>\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\n [disabled]=\"isChatingWithAi\"\n class=\"form-control-1 s27-scroll chat-textarea\"\n placeholder=\"{{ getTranslation('Ask anything') }}\"\n [(ngModel)]=\"input\"\n (keydown)=\"handleKeydown($event)\"\n (input)=\"adjustTextareaHeight($event)\"\n #myInput\n ></textarea>\n\n <button\n (click)=\"toggleRecording()\"\n [disabled]=\"isChatingWithAi\"\n title=\"{{ isRecording ? 'Stop Recording' : 'Start Recording' }}\"\n class=\"btn cta-chat mr-1 vj-test\"\n >\n <svg\n *ngIf=\"!isRecording\"\n stroke=\"currentColor\"\n fill=\"currentColor\"\n stroke-width=\"0\"\n viewBox=\"0 0 512 512\"\n height=\"1em\"\n width=\"1em\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\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\n *ngIf=\"isRecording\"\n stroke=\"currentColor\"\n fill=\"currentColor\"\n stroke-width=\"0\"\n viewBox=\"0 0 24 24\"\n height=\"1em\"\n width=\"1em\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <!-- Square Stop Icon -->\n <path d=\"M5 5h14v14H5z\"></path>\n </svg>\n </button>\n\n <button\n class=\"btn cta-chat rotate\"\n (click)=\"handleSubmit()\"\n [style.background]=\"sendButtonColor ? sendButtonColor : ''\"\n [style.color]=\"sendButtonTextColor ? sendButtonTextColor : ''\"\n title=\"{{ getTranslation('Send Message') }}\"\n >\n <svg\n stroke=\"currentColor\"\n fill=\"currentColor\"\n stroke-width=\"0\"\n viewBox=\"0 0 512 512\"\n height=\"1em\"\n width=\"1em\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\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 <!-- new UI for Chat Message Section by Amit -->\n </div>\n\n <div class=\"NoteTxt\">\n <div class=\"note\">\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n width=\"12.882\"\n height=\"12.883\"\n viewBox=\"0 0 12.882 12.883\"\n >\n <path\n id=\"Icon_ion-shield-checkmark\"\n 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)\"\n fill=\"#06f\"\n />\n </svg>\n\n <span class=\"text\">{{\n getTranslation(\n \"Your personal or company information is kept private and secure\n within this chat.\"\n )\n }}</span>\n </div>\n </div>\n </mat-drawer-content>\n </mat-drawer>\n <mat-drawer\n class=\"drawer edit-boxDrawer\"\n style=\"width: 45%\"\n #sourcesDrawer\n [position]=\"'end'\"\n [mode]=\"'over'\"\n [style.background]=\"\n 'linear-gradient(' + (bgGradient ? bgGradient.join(', ') : '') + ')'\n \"\n >\n <mat-drawer-content>\n <div class=\"sourceDraweContainer\">\n <div class=\"container-fluid\">\n <button\n mat-icon-button\n class=\"closeButtonSource\"\n (click)=\"onCloseSource()\"\n >\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\"\n ><span class=\"ml-1\">{{ si + 1 }}.</span\n >{{ item.title }}</span\n >\n <span class=\"image-container\">\n <img\n class=\"relative block\"\n [src]=\"getFaviconUrl(item.link)\"\n [alt]=\"getDomainName(item.link) + ' favicon'\"\n />\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\n class=\"drawer edit-boxDrawer\"\n style=\"width: 45%\"\n #editorsDrawer\n [position]=\"'end'\"\n [mode]=\"'push'\"\n [style.background]=\"\n 'linear-gradient(' + (bgGradient ? bgGradient.join(', ') : '') + ')'\n \"\n >\n <mat-drawer-content>\n <lib-bot-html-editor\n *ngIf=\"isContentLoaded\"\n [editorContent]=\"currentMessageForEditor\"\n [isDocInEditMode]=\"isDocInEditMode\"\n [documentContent]=\"documentContent\"\n [conversationId]=\"conversationId\"\n [botId]=\"botId\"\n ></lib-bot-html-editor>\n </mat-drawer-content>\n </mat-drawer>\n</mat-drawer-container>\n\n<div *ngIf=\"showWorkflowExecutionDetails\" class=\"modal\">\n <div class=\"modal-content\">\n <div class=\"close-wrapper\">\n <span class=\"close_pop\" (click)=\"closeModal()\">×</span>\n </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\n *ngFor=\"let input of objectToArray(workflowExecutionDetails.Inputs)\"\n >\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\n *ngFor=\"let action of workflowExecutionDetails.Actions\"\n class=\"timeline-item\"\n >\n <div class=\"timestamp-section\">\n <h4>{{ action.ActionName || action.Name }}</h4>\n <p><strong></strong> {{ 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>\n <strong>Inserted At:</strong>\n {{ workflowExecutionDetails.InsertTimeStamp }}\n </p>\n </div>\n </div>\n</div>\n",
|
|
2729
|
+
changeDetection: i0.ChangeDetectionStrategy.OnPush,
|
|
2730
|
+
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}@media (max-width:768px){.sticky-header-chat{top:0}}::-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 .ai h3{font-size:1.3rem!important}.hivegpt-chat-wrapper .chat-main .chat-box{max-width:96%;width:100%}.hivegpt-chat-wrapper .chat-main .chat-box .message{margin-left:50px;margin-top:10px;min-height:40px;padding:0 20px 0 0;position:relative}@media (max-width:768px){.hivegpt-chat-wrapper .chat-main .chat-box .message{margin-left:0}}.hivegpt-chat-wrapper .chat-main .chat-box .message p{color:#000;color:#525252;font-family:Segoe UI,sans-serif;font-size:14px;font-style:normal;font-weight:400;line-height:160%;margin:0;text-align:left}.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:flow-root;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}@media (max-width:768px){.hivegpt-chat-wrapper .chat-main .chat .Icon_TimeSTamp{margin:0}}.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}@media (max-width:768px){.topinfo-containerbox{flex-direction:column}}.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:5px 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:#0f0f0f;font-size:15px;margin:1px 0;padding:0 18px}.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%,99.6%,.23137254901960785);border-radius:15px;padding:15px;width:90%}.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{background:#f9f9f9;margin:30px 0!important;padding:15px 20px}.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}@media (max-width:768px){.new-conversationbutton{align-items:center;font-size:11px!important;padding:0!important;position:fixed!important;right:18px!important;top:56px!important;width:90px!important}}.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{font-size:30px!important;text-transform:none!important}.SearchTitle.user h2,.SearchTitle.user p{font-size:1.7rem!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}@media (max-width:768px){.title_chat h2{align-items:start;flex-direction:column;font-size:16px}}.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:normal;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}::ng-deep .heading003{color:#06f;font-size:20px;font-weight:700}::ng-deep .listing{list-style:decimal;margin:0 25px;padding:0}.line{background-color:#e8e8e8;border-radius:15px;display:inline-block;height:15px;width:15px}.load-2 .line:last-child{animation:loadingB 1.5s 1s infinite;margin:5px 0}.load-2 .line:nth-last-child(2){animation:loadingB 1.5s .5s infinite;margin:5px 0}.load-2 .line:nth-last-child(3){animation:loadingB 1.5s 0s infinite;margin:5px 0}.load-1 .line:last-child{animation:loadingA 1.5s 1.2s infinite;margin:5px 0}.load-1 .line:nth-last-child(2){animation:loadingA 1.5s .8s infinite;margin:5px 0}.load-1 .line:nth-last-child(3){animation:loadingA 1.5s .2s infinite;margin:5px 0}@keyframes loadingB{0%{width:65px}50%{width:235px}to{width:65px}}@keyframes loadingA{0%{width:45px}50%{width:205px}to{width:45px}}.loaderbox{height:60px;margin:10px 0;position:relative}.loader-pkg{bottom:0;left:0;margin:0;top:0;width:250px}.loader--dot,.loader-pkg{height:20px;position:absolute}.loader--dot{animation-duration:3s;animation-iteration-count:infinite;animation-name:loader;animation-timing-function:ease-in-out;background-color:#1a6774;border-radius:100%;width:20px}.loader--dot:first-child{animation-delay:.5s;background-color:#618e93}.loader--dot:nth-child(5){animation-delay:.4s;background-color:#3fb0c3}.loader--dot:nth-child(4){animation-delay:.3s;background-color:#40b8cd}.loader--dot:nth-child(3){animation-delay:.2s;background-color:#ec8828}.loader--dot:nth-child(2){animation-delay:.1s;background-color:#fdc25d}.loader--dot:first-child{animation-delay:0s;background-color:#f4e3be}.loader--text{left:0;margin:0;position:absolute;top:200%;width:4rem}.loader--text:after{animation-duration:3s;animation-iteration-count:infinite;animation-name:loading-text;content:\"Loading\";font-weight:700}@keyframes loader{15%{transform:translateX(230px)}45%{transform:translateX(0)}65%{transform:translateX(230px)}95%{transform:translateX(0)}}@keyframes loading-text{0%{content:\"Loading\"}25%{content:\"Loading.\"}50%{content:\"Loading..\"}75%{content:\"Loading...\"}}::ng-deep .loaderbox{height:60px;margin:10px 0;position:relative}::ng-deep .loader-pkg{bottom:0;height:20px;left:0;margin:0;position:absolute;top:0;width:250px}::ng-deep .loader--dot{animation-duration:3s;animation-iteration-count:infinite;animation-name:loader;animation-timing-function:ease-in-out;background-color:#1a6774;border-radius:100%;height:20px;position:absolute;width:20px}::ng-deep .loader--dot:first-child{animation-delay:.5s;background-color:#618e93}::ng-deep .loader--dot:nth-child(5){animation-delay:.4s;background-color:#3fb0c3}::ng-deep .loader--dot:nth-child(4){animation-delay:.3s;background-color:#40b8cd}::ng-deep .loader--dot:nth-child(3){animation-delay:.2s;background-color:#ec8828}::ng-deep .loader--dot:nth-child(2){animation-delay:.1s;background-color:#fdc25d}::ng-deep .loader--dot:first-child{animation-delay:0s;background-color:#f4e3be}::ng-deep .loader--text{left:0;margin:0;position:absolute;top:200%;width:4rem}::ng-deep .loader--text:after{animation-duration:3s;animation-iteration-count:infinite;animation-name:loading-text;content:\"Loading\";font-weight:700}.agents-popwindowbox{background:#fff;padding:10px;width:100%}.agents-popwindowbox h3{color:#000;font-size:15px}.dropdown-menu-agents{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;padding:0;position:absolute;top:auto;width:270px;z-index:1000}.dropdown-menu-agents .scrollerbox{display:flex;flex:fit-content;flex-direction:column;height:215px;overflow-y:auto}.dropdown-menu-agents label{align-items:center;background:#f9f9f9;border-radius:2px;cursor:pointer;display:flex;font-size:13px;justify-content:start;line-height:16px;margin:2px 0;padding:7px}.dropdown-menu-agents label:hover{background:#ebebeb}.dropdown-menu-agents label input{opacity:0;position:absolute}.dropdown-menu-agents .input-check{border:2px solid #ccc;border-radius:4px;display:inline-block;height:23px;margin-right:5px;position:relative;top:0;transition:.5s;width:25px}.dropdown-menu-agents label input:checked~.input-check{animation:animate .7s ease;background:#06f;border-color:#06f}@keyframes animate{0%{transform:scale(1)}40%{transform:scale(1.3,.7)}55%{transform:scale(1)}70%{transform:scale(1.2,.8)}80%{transform:scale(1)}90%{transform:scale(1.1,.9)}to{transform:scale(1)}}.dropdown-menu-agents .input-check:before{border-bottom:3px solid #fff;border-left:3px solid #fff;content:\"\";height:6px;left:4px;position:absolute;top:6px;transform:scale(0) rotate(-45deg);transition:.5s;width:15px}.dropdown-menu-agents label input:checked~.input-check:before{transform:scale(1) rotate(-45deg)}::ng-deep .h1,::ng-deep h1{font-size:1.165rem}::ng-deep .h2,::ng-deep .h3,::ng-deep h2,::ng-deep h3{font-size:1.125rem}::ng-deep b,::ng-deep strong{font-weight:600}@media (max-width:768px){.note{line-height:15px;margin:0 auto;padding:3px 0 10px;width:90%}}.show-hover{display:none}.chat.bot:hover .show-hover{display:flex!important}"]
|
|
2731
|
+
},] }
|
|
2732
|
+
];
|
|
2733
|
+
ChatDrawerComponent.ctorParameters = function () { return [
|
|
2734
|
+
{ type: forms.FormBuilder },
|
|
2735
|
+
{ type: BotsService },
|
|
2736
|
+
{ type: i0.ChangeDetectorRef },
|
|
2737
|
+
{ type: i1.HttpClient },
|
|
2738
|
+
{ type: platformBrowser.DomSanitizer },
|
|
2739
|
+
{ type: i0.ElementRef },
|
|
2740
|
+
{ type: i0.Renderer2 },
|
|
2741
|
+
{ type: SocketService },
|
|
2742
|
+
{ type: ConversationService },
|
|
2743
|
+
{ type: TranslationService }
|
|
2744
|
+
]; };
|
|
2745
|
+
ChatDrawerComponent.propDecorators = {
|
|
2746
|
+
chatMain: [{ type: i0.ViewChild, args: ['chatMain',] }],
|
|
2747
|
+
myInput: [{ type: i0.ViewChild, args: ['myInput',] }],
|
|
2748
|
+
closePlaygroundButtons: [{ type: i0.ViewChildren, args: ['closeplaygroundbutton',] }],
|
|
2749
|
+
drawer: [{ type: i0.ViewChild, args: ['drawer',] }],
|
|
2750
|
+
sourcesDrawer: [{ type: i0.ViewChild, args: ['sourcesDrawer',] }],
|
|
2751
|
+
editorsDrawer: [{ type: i0.ViewChild, args: ['editorsDrawer',] }],
|
|
2752
|
+
myTextarea: [{ type: i0.ViewChild, args: ['myTextarea', { static: false },] }],
|
|
2753
|
+
copilotName: [{ type: i0.Input }],
|
|
2754
|
+
firstName: [{ type: i0.Input }],
|
|
2755
|
+
lastName: [{ type: i0.Input }],
|
|
2756
|
+
apiKey: [{ type: i0.Input }],
|
|
2757
|
+
bgBubbleAi: [{ type: i0.Input }],
|
|
2758
|
+
bgBubbleUser: [{ type: i0.Input }],
|
|
2759
|
+
bgGradient: [{ type: i0.Input }],
|
|
2760
|
+
botName: [{ type: i0.Input }],
|
|
2761
|
+
botSkills: [{ type: i0.Input }],
|
|
2762
|
+
botId: [{ type: i0.Input }],
|
|
2763
|
+
orgId: [{ type: i0.Input }],
|
|
2764
|
+
closeButtonColor: [{ type: i0.Input }],
|
|
2765
|
+
closeButtonbgColor: [{ type: i0.Input }],
|
|
2766
|
+
credentials: [{ type: i0.Input }],
|
|
2767
|
+
dateTimeColor: [{ type: i0.Input }],
|
|
2768
|
+
dateTextColor: [{ type: i0.Input }],
|
|
2769
|
+
eventId: [{ type: i0.Input }],
|
|
2770
|
+
s27Token: [{ type: i0.Input }],
|
|
2771
|
+
eventName: [{ type: i0.Input }],
|
|
2772
|
+
botIcon: [{ type: i0.Input }],
|
|
2773
|
+
formFieldBgColor: [{ type: i0.Input }],
|
|
2774
|
+
formFieldTextColor: [{ type: i0.Input }],
|
|
2775
|
+
fullView: [{ type: i0.Input }],
|
|
2776
|
+
gradientColors: [{ type: i0.Input }],
|
|
2777
|
+
greeting: [{ type: i0.Input }],
|
|
2778
|
+
messageTextColorAi: [{ type: i0.Input }],
|
|
2779
|
+
messageTextColorUser: [{ type: i0.Input }],
|
|
2780
|
+
rules: [{ type: i0.Input }],
|
|
2781
|
+
sendButtonColor: [{ type: i0.Input }],
|
|
2782
|
+
sendButtonTextColor: [{ type: i0.Input }],
|
|
2783
|
+
showClose: [{ type: i0.Input }],
|
|
2784
|
+
thumbsDownMessages: [{ type: i0.Input }],
|
|
2785
|
+
thumbsUpMessage: [{ type: i0.Input }],
|
|
2786
|
+
timezone: [{ type: i0.Input }],
|
|
2787
|
+
unknownResponses: [{ type: i0.Input }],
|
|
2788
|
+
useOpenAi: [{ type: i0.Input }],
|
|
2789
|
+
userId: [{ type: i0.Input }],
|
|
2790
|
+
isDev: [{ type: i0.Input }],
|
|
2791
|
+
againButtonColor: [{ type: i0.Input }],
|
|
2792
|
+
againButtonTextColor: [{ type: i0.Input }],
|
|
2793
|
+
feedbackEvent: [{ type: i0.Output }],
|
|
2794
|
+
onCloseEvent: [{ type: i0.Output }],
|
|
2795
|
+
openPage: [{ type: i0.Output }],
|
|
2796
|
+
sessionActions: [{ type: i0.Output }],
|
|
2797
|
+
closeBot: [{ type: i0.Output }],
|
|
2798
|
+
connectWithUser: [{ type: i0.Output }],
|
|
2799
|
+
scheduleMeeting: [{ type: i0.Output }],
|
|
2800
|
+
refreshToken: [{ type: i0.Output }],
|
|
2801
|
+
openSupport: [{ type: i0.Output }]
|
|
2802
|
+
};
|
|
2803
|
+
|
|
2804
|
+
var ChatBotComponent = /** @class */ (function () {
|
|
2805
|
+
function ChatBotComponent() {
|
|
2806
|
+
this.visible = false;
|
|
2807
|
+
}
|
|
2808
|
+
ChatBotComponent.prototype.toggle = function () {
|
|
2809
|
+
this.visible = !this.visible;
|
|
2810
|
+
};
|
|
2811
|
+
return ChatBotComponent;
|
|
2812
|
+
}());
|
|
2813
|
+
ChatBotComponent.decorators = [
|
|
2814
|
+
{ type: i0.Component, args: [{
|
|
2815
|
+
selector: 'hivegpt-chatbot',
|
|
2816
|
+
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",
|
|
2817
|
+
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}"]
|
|
2818
|
+
},] }
|
|
2819
|
+
];
|
|
2820
|
+
ChatBotComponent.propDecorators = {
|
|
2821
|
+
userId: [{ type: i0.Input }],
|
|
2822
|
+
apiKey: [{ type: i0.Input }],
|
|
2823
|
+
botName: [{ type: i0.Input }],
|
|
2824
|
+
botSkills: [{ type: i0.Input }],
|
|
2825
|
+
botId: [{ type: i0.Input }],
|
|
2826
|
+
closeButtonColor: [{ type: i0.Input }],
|
|
2827
|
+
gradientColors: [{ type: i0.Input }],
|
|
2828
|
+
greeting: [{ type: i0.Input }],
|
|
2829
|
+
sendButtonColor: [{ type: i0.Input }],
|
|
2830
|
+
useOpenAi: [{ type: i0.Input }],
|
|
2831
|
+
showClose: [{ type: i0.Input }],
|
|
2832
|
+
bgGradient: [{ type: i0.Input }],
|
|
2833
|
+
sendButtonTextColor: [{ type: i0.Input }],
|
|
2834
|
+
fullView: [{ type: i0.Input }],
|
|
2835
|
+
bgBubbleAi: [{ type: i0.Input }],
|
|
2836
|
+
bgBubbleUser: [{ type: i0.Input }],
|
|
2837
|
+
closeButtonbgColor: [{ type: i0.Input }],
|
|
2838
|
+
messageTextColorAi: [{ type: i0.Input }],
|
|
2839
|
+
messageTextColorUser: [{ type: i0.Input }],
|
|
2840
|
+
dateTimeColor: [{ type: i0.Input }],
|
|
2841
|
+
dateTextColor: [{ type: i0.Input }],
|
|
2842
|
+
formFieldBgColor: [{ type: i0.Input }],
|
|
2843
|
+
formFieldTextColor: [{ type: i0.Input }],
|
|
2844
|
+
thumbsUpMessage: [{ type: i0.Input }],
|
|
2845
|
+
thumbsDownMessages: [{ type: i0.Input }],
|
|
2846
|
+
timezone: [{ type: i0.Input }],
|
|
2847
|
+
eventName: [{ type: i0.Input }],
|
|
2848
|
+
credentials: [{ type: i0.Input }],
|
|
2849
|
+
unknownResponses: [{ type: i0.Input }],
|
|
2850
|
+
rules: [{ type: i0.Input }],
|
|
2851
|
+
eventId: [{ type: i0.Input }]
|
|
2852
|
+
};
|
|
2853
|
+
|
|
2854
|
+
var SafeHtmlPipe = /** @class */ (function () {
|
|
2855
|
+
function SafeHtmlPipe(sanitizer) {
|
|
2856
|
+
this.sanitizer = sanitizer;
|
|
2857
|
+
}
|
|
2858
|
+
SafeHtmlPipe.prototype.transform = function (html) {
|
|
2859
|
+
return html ? this.sanitizer.bypassSecurityTrustHtml(html) : '';
|
|
2860
|
+
};
|
|
2861
|
+
return SafeHtmlPipe;
|
|
2862
|
+
}());
|
|
2863
|
+
SafeHtmlPipe.decorators = [
|
|
2864
|
+
{ type: i0.Pipe, args: [{
|
|
2865
|
+
name: 'safeHtml',
|
|
2866
|
+
},] }
|
|
2867
|
+
];
|
|
2868
|
+
SafeHtmlPipe.ctorParameters = function () { return [
|
|
2869
|
+
{ type: platformBrowser.DomSanitizer }
|
|
2870
|
+
]; };
|
|
2871
|
+
|
|
2872
|
+
var VideoPlayerComponent = /** @class */ (function () {
|
|
2873
|
+
function VideoPlayerComponent(doc, el, cdr) {
|
|
2874
|
+
this.doc = doc;
|
|
2875
|
+
this.el = el;
|
|
2876
|
+
this.cdr = cdr;
|
|
2877
|
+
this.isMuted = true;
|
|
2878
|
+
this.isFullscreen = false;
|
|
2879
|
+
this.isFullscreenvideoPlaying = false;
|
|
2880
|
+
this.connectWithUser = new i0.EventEmitter();
|
|
2881
|
+
this.scheduleMeeting = new i0.EventEmitter();
|
|
2882
|
+
}
|
|
2883
|
+
VideoPlayerComponent.prototype.ngOnInit = function () {
|
|
2884
|
+
};
|
|
2885
|
+
VideoPlayerComponent.prototype.toggleSound = function (isMuted) {
|
|
2886
|
+
var _this = this;
|
|
2887
|
+
if (isMuted === void 0) { isMuted = null; }
|
|
2888
|
+
this.isMuted = isMuted != null ? isMuted : !this.isMuted;
|
|
2889
|
+
setTimeout(function () {
|
|
2890
|
+
var video = _this.doc
|
|
2891
|
+
.getElementById(_this.video.id.toString());
|
|
2892
|
+
if (video) {
|
|
2893
|
+
video.muted = _this.isMuted;
|
|
2894
|
+
_this.video.isMuted = _this.isMuted;
|
|
2895
|
+
}
|
|
2896
|
+
_this.cdr.markForCheck();
|
|
2897
|
+
//this.muteToggle.emit(this.isMuted);
|
|
2898
|
+
});
|
|
2899
|
+
};
|
|
2900
|
+
VideoPlayerComponent.prototype.togglePlay = function (playState, videoEl) {
|
|
2901
|
+
var _this = this;
|
|
2902
|
+
this.videoObj.isPlaying = !this.videoObj.isPlaying;
|
|
2903
|
+
setTimeout(function () {
|
|
2904
|
+
if (playState) {
|
|
2905
|
+
_this.videoObj.isPlaying = true;
|
|
2906
|
+
videoEl.play();
|
|
2907
|
+
var pauseBtn = document.getElementById('pause-btn');
|
|
2908
|
+
pauseBtn.classList.add('hide-pause-btn');
|
|
2909
|
+
_this.toggleSound(false);
|
|
2910
|
+
}
|
|
2911
|
+
else {
|
|
2912
|
+
_this.videoObj.isPlaying = false;
|
|
2913
|
+
videoEl.pause();
|
|
2914
|
+
}
|
|
2915
|
+
_this.cdr.markForCheck();
|
|
2916
|
+
});
|
|
2917
|
+
};
|
|
2918
|
+
VideoPlayerComponent.prototype.ngAfterViewInit = function () {
|
|
2919
|
+
var _this = this;
|
|
2920
|
+
if (window.innerWidth <= 576) {
|
|
2921
|
+
this.observer = new IntersectionObserver(function (entries) {
|
|
2922
|
+
if (entries[0].isIntersecting === true) {
|
|
2923
|
+
_this.video.nativeElement.play();
|
|
2924
|
+
}
|
|
2925
|
+
else {
|
|
2926
|
+
_this.video.nativeElement.pause();
|
|
2927
|
+
}
|
|
2928
|
+
}, {
|
|
2929
|
+
threshold: 0.75,
|
|
2930
|
+
});
|
|
2931
|
+
this.observer.observe(this.el.nativeElement);
|
|
2932
|
+
}
|
|
2933
|
+
};
|
|
2934
|
+
VideoPlayerComponent.prototype.toggleFullscreen = function () {
|
|
2935
|
+
this.isFullscreen = !this.isFullscreen;
|
|
2936
|
+
if (!this.isFullscreen) {
|
|
2937
|
+
this.fullscreenvideo.nativeElement.pause();
|
|
2938
|
+
}
|
|
2939
|
+
};
|
|
2940
|
+
VideoPlayerComponent.prototype.toggleFullscreenPlay = function () {
|
|
2941
|
+
this.isFullscreenvideoPlaying = !this.isFullscreenvideoPlaying;
|
|
2942
|
+
if (this.isFullscreenvideoPlaying) {
|
|
2943
|
+
this.fullscreenvideo.nativeElement.play();
|
|
2944
|
+
}
|
|
2945
|
+
else {
|
|
2946
|
+
this.fullscreenvideo.nativeElement.pause();
|
|
2947
|
+
}
|
|
2948
|
+
};
|
|
2949
|
+
VideoPlayerComponent.prototype.followUser = function (userId) {
|
|
2950
|
+
this.connectWithUser.emit(userId);
|
|
2951
|
+
};
|
|
2952
|
+
VideoPlayerComponent.prototype.checkPendingSentRequest = function (userId) {
|
|
2953
|
+
var _a;
|
|
2954
|
+
return (_a = this.myPendingSentRequests) === null || _a === void 0 ? void 0 : _a.find(function (a) { return a == userId; });
|
|
2955
|
+
};
|
|
2956
|
+
VideoPlayerComponent.prototype.canUnfollowUser = function () {
|
|
2957
|
+
return false;
|
|
2958
|
+
};
|
|
2959
|
+
VideoPlayerComponent.prototype.canFollowUser = function () {
|
|
2960
|
+
return true;
|
|
2961
|
+
};
|
|
2962
|
+
VideoPlayerComponent.prototype.getIniNames = function (firstName, lastName) {
|
|
2963
|
+
if (!firstName && !lastName) {
|
|
2964
|
+
return '';
|
|
2965
|
+
}
|
|
2966
|
+
if (firstName && lastName)
|
|
2967
|
+
return (firstName.charAt(0).toUpperCase() + lastName.charAt(0).toUpperCase());
|
|
2968
|
+
else
|
|
2969
|
+
return firstName.charAt(0).toUpperCase();
|
|
2970
|
+
};
|
|
2971
|
+
return VideoPlayerComponent;
|
|
2972
|
+
}());
|
|
2973
|
+
VideoPlayerComponent.decorators = [
|
|
2974
|
+
{ type: i0.Component, args: [{
|
|
2975
|
+
selector: 'app-video-player',
|
|
2976
|
+
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",
|
|
2977
|
+
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}"]
|
|
2978
|
+
},] }
|
|
2979
|
+
];
|
|
2980
|
+
VideoPlayerComponent.ctorParameters = function () { return [
|
|
2981
|
+
{ type: undefined, decorators: [{ type: i0.Inject, args: [common.DOCUMENT,] }] },
|
|
2982
|
+
{ type: i0.ElementRef },
|
|
2983
|
+
{ type: i0.ChangeDetectorRef }
|
|
2984
|
+
]; };
|
|
2985
|
+
VideoPlayerComponent.propDecorators = {
|
|
2986
|
+
currentUserId: [{ type: i0.Input }],
|
|
2987
|
+
user: [{ type: i0.Input }],
|
|
2988
|
+
eventId: [{ type: i0.Input }],
|
|
2989
|
+
videoObj: [{ type: i0.Input }],
|
|
2990
|
+
isDev: [{ type: i0.Input }],
|
|
2991
|
+
type: [{ type: i0.Input }],
|
|
2992
|
+
video: [{ type: i0.ViewChild, args: ['video',] }],
|
|
2993
|
+
fullscreenvideo: [{ type: i0.ViewChild, args: ['fullscreenvideo',] }],
|
|
2994
|
+
connectWithUser: [{ type: i0.Output }],
|
|
2995
|
+
scheduleMeeting: [{ type: i0.Output }]
|
|
2996
|
+
};
|
|
2997
|
+
|
|
2998
|
+
var BotHtmlEditorComponent = /** @class */ (function () {
|
|
2999
|
+
function BotHtmlEditorComponent(cdr, http) {
|
|
3000
|
+
this.cdr = cdr;
|
|
3001
|
+
this.http = http;
|
|
3002
|
+
this.documentName = 'doc name';
|
|
3003
|
+
this.quillConfig = {
|
|
3004
|
+
toolbar: [
|
|
3005
|
+
[{ header: '1' }, { header: '2' }, { font: [] }],
|
|
3006
|
+
[{ list: 'ordered' }, { list: 'bullet' }],
|
|
3007
|
+
['bold', 'italic', 'underline'],
|
|
3008
|
+
['link'],
|
|
3009
|
+
['clean'],
|
|
3010
|
+
],
|
|
3011
|
+
};
|
|
3012
|
+
}
|
|
3013
|
+
BotHtmlEditorComponent.prototype.ngOnInit = function () {
|
|
3014
|
+
var _this = this;
|
|
3015
|
+
this.environment = prod_environment;
|
|
3016
|
+
setTimeout(function () {
|
|
3017
|
+
if (_this.isDocInEditMode) {
|
|
3018
|
+
console.log('In Edit mode');
|
|
3019
|
+
_this.filldataInForm();
|
|
3020
|
+
}
|
|
3021
|
+
else {
|
|
3022
|
+
console.log('In save mode');
|
|
3023
|
+
}
|
|
3024
|
+
}, 2500);
|
|
3025
|
+
};
|
|
3026
|
+
BotHtmlEditorComponent.prototype.filldataInForm = function () {
|
|
3027
|
+
var _a, _b;
|
|
3028
|
+
if (this.documentContent) {
|
|
3029
|
+
this.documentName = (_a = this.documentContent) === null || _a === void 0 ? void 0 : _a.name;
|
|
3030
|
+
this.editorContent = (_b = this.documentContent) === null || _b === void 0 ? void 0 : _b.content;
|
|
3031
|
+
this.cdr.detectChanges();
|
|
3032
|
+
}
|
|
3033
|
+
};
|
|
3034
|
+
BotHtmlEditorComponent.prototype.saveContent = function () {
|
|
3035
|
+
if (!this.isDocInEditMode) {
|
|
3036
|
+
this.saveContent_http().subscribe();
|
|
3037
|
+
}
|
|
3038
|
+
else {
|
|
3039
|
+
this.saveContent_http().subscribe();
|
|
3040
|
+
}
|
|
3041
|
+
};
|
|
3042
|
+
BotHtmlEditorComponent.prototype.saveContent_http = function () {
|
|
3043
|
+
var _this = this;
|
|
3044
|
+
console.log('API call function');
|
|
3045
|
+
var url = this.environment.AGENTS_API + "/ConversationDocuments?conversationId=" + this.conversationId + "&botId=" + this.botId;
|
|
3046
|
+
var headers = new i1.HttpHeaders({
|
|
3047
|
+
'Content-Type': 'application/json',
|
|
3048
|
+
apiKey: 'WIz/qAm+EEmfOkFaUA/weA==',
|
|
3049
|
+
});
|
|
3050
|
+
var data = {
|
|
3051
|
+
name: this.documentName,
|
|
3052
|
+
content: this.editorContent,
|
|
3053
|
+
};
|
|
3054
|
+
return this.http.post(url, data, { headers: headers }).pipe(operators.switchMap(function (res) {
|
|
3055
|
+
if (res) {
|
|
3056
|
+
// alert('Saved Successfully');
|
|
3057
|
+
}
|
|
3058
|
+
_this.cdr.markForCheck();
|
|
3059
|
+
return rxjs.of(res);
|
|
3060
|
+
}), operators.catchError(function (error) {
|
|
3061
|
+
console.error('Error fetching chatbot config: ', error);
|
|
3062
|
+
return rxjs.of(null);
|
|
3063
|
+
}));
|
|
3064
|
+
};
|
|
3065
|
+
BotHtmlEditorComponent.prototype.updateContent_http = function () {
|
|
3066
|
+
var _this = this;
|
|
3067
|
+
console.log('API call function');
|
|
3068
|
+
var url = this.environment.AGENTS_API + "/ConversationDocuments/rename?conversationId=" + this.conversationId + "&botId=" + this.botId;
|
|
3069
|
+
var headers = new i1.HttpHeaders({
|
|
3070
|
+
'Content-Type': 'application/json',
|
|
3071
|
+
apiKey: 'WIz/qAm+EEmfOkFaUA/weA==',
|
|
3072
|
+
});
|
|
3073
|
+
var data = {
|
|
3074
|
+
name: this.documentName,
|
|
3075
|
+
content: this.editorContent,
|
|
3076
|
+
};
|
|
3077
|
+
return this.http.put(url, data, { headers: headers }).pipe(operators.switchMap(function (res) {
|
|
3078
|
+
if (res) {
|
|
3079
|
+
// alert('Updated Successfully');
|
|
3080
|
+
}
|
|
3081
|
+
_this.cdr.markForCheck();
|
|
3082
|
+
return rxjs.of(res);
|
|
3083
|
+
}), operators.catchError(function (error) {
|
|
3084
|
+
console.error('Error fetching chatbot config: ', error);
|
|
3085
|
+
return rxjs.of(null);
|
|
3086
|
+
}));
|
|
3087
|
+
};
|
|
3088
|
+
return BotHtmlEditorComponent;
|
|
3089
|
+
}());
|
|
3090
|
+
BotHtmlEditorComponent.decorators = [
|
|
3091
|
+
{ type: i0.Component, args: [{
|
|
3092
|
+
selector: 'lib-bot-html-editor',
|
|
3093
|
+
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",
|
|
3094
|
+
styles: [".save-btn{background-color:#f0f0f0;border:none;color:#333;margin-top:22px;position:absolute;right:16px;width:56px}"]
|
|
3095
|
+
},] }
|
|
3096
|
+
];
|
|
3097
|
+
BotHtmlEditorComponent.ctorParameters = function () { return [
|
|
3098
|
+
{ type: i0.ChangeDetectorRef },
|
|
3099
|
+
{ type: i1.HttpClient }
|
|
3100
|
+
]; };
|
|
3101
|
+
BotHtmlEditorComponent.propDecorators = {
|
|
3102
|
+
editorContent: [{ type: i0.Input }],
|
|
3103
|
+
isDocInEditMode: [{ type: i0.Input }],
|
|
3104
|
+
documentContent: [{ type: i0.Input }],
|
|
3105
|
+
conversationId: [{ type: i0.Input }],
|
|
3106
|
+
botId: [{ type: i0.Input }]
|
|
3107
|
+
};
|
|
3108
|
+
|
|
3109
|
+
var HiveGptModule = /** @class */ (function () {
|
|
3110
|
+
function HiveGptModule() {
|
|
3111
|
+
}
|
|
3112
|
+
return HiveGptModule;
|
|
3113
|
+
}());
|
|
3114
|
+
HiveGptModule.decorators = [
|
|
3115
|
+
{ type: i0.NgModule, args: [{
|
|
3116
|
+
declarations: [ChatBotComponent, ChatDrawerComponent, VideoPlayerComponent, SafeHtmlPipe, BotHtmlEditorComponent],
|
|
3117
|
+
imports: [common.CommonModule, icon.MatIconModule, sidenav.MatSidenavModule, forms.FormsModule, ngxQuill.QuillModule],
|
|
3118
|
+
exports: [ChatBotComponent, ChatDrawerComponent, VideoPlayerComponent]
|
|
3119
|
+
},] }
|
|
3120
|
+
];
|
|
3121
|
+
|
|
3122
|
+
/*
|
|
3123
|
+
* Public API Surface of hive-gpt
|
|
3124
|
+
*/
|
|
3125
|
+
|
|
3126
|
+
/**
|
|
3127
|
+
* Generated bundle index. Do not edit.
|
|
3128
|
+
*/
|
|
3129
|
+
|
|
3130
|
+
exports.ChatBotComponent = ChatBotComponent;
|
|
3131
|
+
exports.ChatDrawerComponent = ChatDrawerComponent;
|
|
3132
|
+
exports.HiveGptModule = HiveGptModule;
|
|
3133
|
+
exports["ɵa"] = BotsService;
|
|
3134
|
+
exports["ɵb"] = SocketService;
|
|
3135
|
+
exports["ɵc"] = ConversationService;
|
|
3136
|
+
exports["ɵd"] = NotificationSocket;
|
|
3137
|
+
exports["ɵe"] = TranslationService;
|
|
3138
|
+
exports["ɵf"] = VideoPlayerComponent;
|
|
3139
|
+
exports["ɵg"] = SafeHtmlPipe;
|
|
3140
|
+
exports["ɵh"] = BotHtmlEditorComponent;
|
|
3141
|
+
|
|
3142
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
3143
|
+
|
|
3144
|
+
}));
|
|
3145
|
+
//# sourceMappingURL=hivegpt-hiveai-angular.umd.js.map
|