@aslaluroba/help-center 3.0.13 → 3.1.0
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/fesm2022/aslaluroba-help-center.mjs +881 -307
- package/fesm2022/aslaluroba-help-center.mjs.map +1 -1
- package/index.d.ts +5 -275
- package/package.json +3 -3
- package/public_api.d.ts +12 -0
- package/src/app/chat/chat.component.d.ts +38 -0
- package/src/app/chat/components/chat-avatar/chat-avatar.component.d.ts +8 -0
- package/src/app/chat/components/chat-input/chat-input.component.d.ts +42 -0
- package/src/app/chat/components/chat-message/chat-message.component.d.ts +18 -0
- package/src/app/chat/components/chat-separator/chat-separator.component.d.ts +5 -0
- package/src/app/chat/components/chat-typing-indicator/chat-typing-indicator.component.d.ts +5 -0
- package/src/app/chat/components/image-attachment/image-attachment.component.d.ts +18 -0
- package/src/app/chat/components/image-preview-dialog/image-preview-dialog.component.d.ts +25 -0
- package/src/app/help-center-widget/components/arrow-animation/arrow-animation.component.d.ts +11 -0
- package/src/app/help-center-widget/components/footer/footer.component.d.ts +7 -0
- package/src/app/help-center-widget/components/help-button/help-button.component.d.ts +8 -0
- package/src/app/help-center-widget/components/help-popup/help-popup.component.d.ts +105 -0
- package/src/app/help-center-widget/components/index.d.ts +5 -0
- package/src/app/help-center-widget/components/intro-section/intro-section.component.d.ts +11 -0
- package/src/app/help-center-widget/help-center-widget.component.d.ts +134 -0
- package/src/app/help-screen-data/help-screen-data.component.d.ts +59 -0
- package/src/app/language.service.d.ts +11 -0
- package/src/app/pipes/translate.pipe.d.ts +9 -0
- package/src/app/services/ably.service.d.ts +13 -0
- package/src/app/services/api.service.d.ts +16 -0
- package/src/app/services/file-upload.service.d.ts +33 -0
- package/src/app/services/help-center-config.service.d.ts +12 -0
- package/src/app/services/theme.service.d.ts +40 -0
- package/src/app/services/token.service.d.ts +10 -0
- package/src/app/services/translation.service.d.ts +15 -0
- package/src/app/shared/components/back-button/back-button.component.d.ts +10 -0
- package/src/app/shared/components/back-button/index.d.ts +1 -0
- package/src/app/shared/components/button/button.component.d.ts +36 -0
- package/src/app/shared/components/button/index.d.ts +1 -0
- package/src/app/shared/components/card/card.component.d.ts +38 -0
- package/src/app/shared/components/card/index.d.ts +1 -0
- package/src/app/shared/components/chat-header/chat-header.component.d.ts +11 -0
- package/src/app/shared/components/chat-header/index.d.ts +1 -0
- package/src/app/shared/components/close-button/close-button.component.d.ts +9 -0
- package/src/app/shared/components/close-button/index.d.ts +1 -0
- package/src/app/shared/components/confirmation-dialog/confirmation-dialog.component.d.ts +12 -0
- package/src/app/shared/components/confirmation-dialog/index.d.ts +1 -0
- package/src/app/shared/components/header/header.component.d.ts +16 -0
- package/src/app/shared/components/header/index.d.ts +1 -0
- package/src/app/shared/components/index.d.ts +13 -0
- package/src/app/shared/components/loading/index.d.ts +1 -0
- package/src/app/shared/components/loading/loading.component.d.ts +6 -0
- package/src/app/shared/components/logo/index.d.ts +1 -0
- package/src/app/shared/components/logo/logo.component.d.ts +9 -0
- package/src/app/shared/components/markdown-renderer/index.d.ts +1 -0
- package/src/app/shared/components/markdown-renderer/markdown-renderer.component.d.ts +16 -0
- package/src/app/shared/components/menu-dropdown/index.d.ts +1 -0
- package/src/app/shared/components/menu-dropdown/menu-dropdown.component.d.ts +11 -0
- package/src/app/shared/components/review-dialog/index.d.ts +1 -0
- package/src/app/shared/components/review-dialog/review-dialog.component.d.ts +32 -0
- package/src/app/shared/components/simple-close-button/index.d.ts +1 -0
- package/src/app/shared/components/simple-close-button/simple-close-button.component.d.ts +7 -0
- package/src/app/types.d.ts +73 -0
|
@@ -1,11 +1,13 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { EventEmitter, Output, Input, Component,
|
|
2
|
+
import { Injectable, inject, EventEmitter, Output, Input, Component, Pipe, HostBinding, ViewEncapsulation, ViewChild, signal, computed, HostListener } from '@angular/core';
|
|
3
3
|
import * as i1 from '@angular/common';
|
|
4
4
|
import { CommonModule } from '@angular/common';
|
|
5
5
|
import * as i1$1 from '@angular/forms';
|
|
6
6
|
import { FormsModule } from '@angular/forms';
|
|
7
7
|
import * as Ably from 'ably';
|
|
8
|
-
import {
|
|
8
|
+
import { HttpClient, HttpHeaders, HttpEventType } from '@angular/common/http';
|
|
9
|
+
import { BehaviorSubject, from, throwError, Observable, forkJoin, catchError as catchError$1, of, firstValueFrom } from 'rxjs';
|
|
10
|
+
import { switchMap, map, catchError, filter } from 'rxjs/operators';
|
|
9
11
|
import { marked } from 'marked';
|
|
10
12
|
import 'prismjs';
|
|
11
13
|
import 'prismjs/components/prism-typescript';
|
|
@@ -82,12 +84,22 @@ class ClientAblyService {
|
|
|
82
84
|
// Subscribe to assistant/system responses
|
|
83
85
|
this.channel.subscribe('ReceiveMessage', (message) => {
|
|
84
86
|
try {
|
|
85
|
-
const
|
|
86
|
-
? message.data
|
|
87
|
-
: message.data
|
|
88
|
-
const
|
|
89
|
-
|
|
90
|
-
|
|
87
|
+
const messageData = typeof message.data === 'string'
|
|
88
|
+
? { content: message.data }
|
|
89
|
+
: message.data || {};
|
|
90
|
+
const messageContent = typeof messageData === 'string'
|
|
91
|
+
? messageData
|
|
92
|
+
: messageData?.content || messageData?.message || '';
|
|
93
|
+
const senderType = messageData?.senderType || 3; // Assistant
|
|
94
|
+
const needsAgent = messageData?.needsAgent ||
|
|
95
|
+
messageData?.actionType == 'needs_agent' ||
|
|
96
|
+
false;
|
|
97
|
+
const attachments = messageData?.attachments || messageData?.attachmentIds;
|
|
98
|
+
// Pass message as object if it has attachments, otherwise as string for backward compatibility
|
|
99
|
+
const messageToPass = attachments?.length > 0
|
|
100
|
+
? { content: messageContent, attachments }
|
|
101
|
+
: messageContent;
|
|
102
|
+
onMessageReceived(messageToPass, senderType, needsAgent);
|
|
91
103
|
}
|
|
92
104
|
catch (error) {
|
|
93
105
|
console.error('Error processing ReceiveMessage:', error);
|
|
@@ -155,44 +167,82 @@ class ClientAblyService {
|
|
|
155
167
|
}
|
|
156
168
|
}
|
|
157
169
|
|
|
158
|
-
class
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
170
|
+
class ApiService {
|
|
171
|
+
getTokenFunction = null;
|
|
172
|
+
baseUrl = 'https://babylai.net/api';
|
|
173
|
+
/**
|
|
174
|
+
* Initialize the API service with optional configuration
|
|
175
|
+
* @param config Configuration object containing token function and optional base URL
|
|
176
|
+
*/
|
|
177
|
+
initialize(config) {
|
|
178
|
+
if (!config.getToken) {
|
|
179
|
+
throw new Error('getToken function is required for API initialization');
|
|
180
|
+
}
|
|
181
|
+
this.getTokenFunction = config.getToken;
|
|
182
|
+
if (config.baseUrl) {
|
|
183
|
+
this.baseUrl = config.baseUrl;
|
|
184
|
+
}
|
|
165
185
|
}
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
}
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
handleTogglePopup() {
|
|
185
|
-
this.togglePopup.emit();
|
|
186
|
+
async getValidToken(forceRefresh = false) {
|
|
187
|
+
if (!this.getTokenFunction) {
|
|
188
|
+
throw new Error('API service not initialized. Call initialize({ getToken }) first.');
|
|
189
|
+
}
|
|
190
|
+
let storedToken = localStorage.getItem('chatbot-token');
|
|
191
|
+
let storedExpiry = localStorage.getItem('chatbot-token-expiry');
|
|
192
|
+
const currentTime = Math.floor(Date.now() / 1000);
|
|
193
|
+
if (!storedToken || !storedExpiry || currentTime >= Number(storedExpiry) || forceRefresh) {
|
|
194
|
+
const tokenResponse = await this.getTokenFunction();
|
|
195
|
+
if (!tokenResponse) {
|
|
196
|
+
throw new Error('Invalid token response from getToken function');
|
|
197
|
+
}
|
|
198
|
+
storedToken = tokenResponse;
|
|
199
|
+
storedExpiry = String(currentTime + 900); // 15 minutes expiry
|
|
200
|
+
localStorage.setItem('chatbot-token', storedToken);
|
|
201
|
+
localStorage.setItem('chatbot-token-expiry', storedExpiry);
|
|
202
|
+
}
|
|
203
|
+
return storedToken;
|
|
186
204
|
}
|
|
187
|
-
|
|
188
|
-
|
|
205
|
+
async fetchWithAuth(url, options, retry = true) {
|
|
206
|
+
if (!options.headers) {
|
|
207
|
+
options.headers = {};
|
|
208
|
+
}
|
|
209
|
+
const headers = options.headers;
|
|
210
|
+
headers['Authorization'] = `Bearer ${await this.getValidToken()}`;
|
|
211
|
+
let response = await fetch(url, options);
|
|
212
|
+
if ((response.status === 401 || response.status === 403) && retry) {
|
|
213
|
+
console.warn('Token expired. Fetching new token...');
|
|
214
|
+
const newToken = await this.getValidToken(true);
|
|
215
|
+
headers['Authorization'] = `Bearer ${newToken}`;
|
|
216
|
+
response = await fetch(url, options);
|
|
217
|
+
}
|
|
218
|
+
return response;
|
|
219
|
+
}
|
|
220
|
+
async apiRequest(endpoint, method = 'GET', body = null, customHeaders = {}) {
|
|
221
|
+
const url = `${this.baseUrl}/${endpoint}`;
|
|
222
|
+
const options = {
|
|
223
|
+
method,
|
|
224
|
+
headers: {
|
|
225
|
+
'Content-Type': 'application/json',
|
|
226
|
+
...customHeaders
|
|
227
|
+
},
|
|
228
|
+
body: body ? JSON.stringify(body) : null
|
|
229
|
+
};
|
|
230
|
+
const response = await this.fetchWithAuth(url, options);
|
|
231
|
+
if (!response.ok) {
|
|
232
|
+
const errorData = await response.json();
|
|
233
|
+
throw new Error(errorData.message || 'API request failed');
|
|
234
|
+
}
|
|
235
|
+
return response;
|
|
236
|
+
}
|
|
237
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.11", ngImport: i0, type: ApiService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
238
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.11", ngImport: i0, type: ApiService, providedIn: 'root' });
|
|
189
239
|
}
|
|
190
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
191
|
-
type:
|
|
192
|
-
args: [{
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
240
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.11", ngImport: i0, type: ApiService, decorators: [{
|
|
241
|
+
type: Injectable,
|
|
242
|
+
args: [{
|
|
243
|
+
providedIn: 'root'
|
|
244
|
+
}]
|
|
245
|
+
}] });
|
|
196
246
|
|
|
197
247
|
// src/app/services/translation.service.ts
|
|
198
248
|
class TranslationService {
|
|
@@ -265,26 +315,207 @@ class TranslationService {
|
|
|
265
315
|
getCurrentLang() {
|
|
266
316
|
return this._currentLang.value;
|
|
267
317
|
}
|
|
268
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
269
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
318
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.11", ngImport: i0, type: TranslationService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
319
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.11", ngImport: i0, type: TranslationService, providedIn: 'root' });
|
|
270
320
|
}
|
|
271
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
321
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.11", ngImport: i0, type: TranslationService, decorators: [{
|
|
272
322
|
type: Injectable,
|
|
273
323
|
args: [{
|
|
274
324
|
providedIn: 'root'
|
|
275
325
|
}]
|
|
276
326
|
}], ctorParameters: () => [] });
|
|
277
327
|
|
|
328
|
+
// src/app/language.service.ts
|
|
329
|
+
class LanguageService {
|
|
330
|
+
translationService;
|
|
331
|
+
constructor(translationService) {
|
|
332
|
+
this.translationService = translationService;
|
|
333
|
+
}
|
|
334
|
+
switchLanguage(language) {
|
|
335
|
+
this.translationService.setLanguage(language);
|
|
336
|
+
}
|
|
337
|
+
getCurrentLang() {
|
|
338
|
+
return this.translationService.getCurrentLang();
|
|
339
|
+
}
|
|
340
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.11", ngImport: i0, type: LanguageService, deps: [{ token: TranslationService }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
341
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.11", ngImport: i0, type: LanguageService, providedIn: 'root' });
|
|
342
|
+
}
|
|
343
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.11", ngImport: i0, type: LanguageService, decorators: [{
|
|
344
|
+
type: Injectable,
|
|
345
|
+
args: [{
|
|
346
|
+
providedIn: 'root'
|
|
347
|
+
}]
|
|
348
|
+
}], ctorParameters: () => [{ type: TranslationService }] });
|
|
349
|
+
|
|
350
|
+
class FileUploadService {
|
|
351
|
+
http = inject(HttpClient);
|
|
352
|
+
apiService = inject(ApiService);
|
|
353
|
+
languageService = inject(LanguageService);
|
|
354
|
+
/**
|
|
355
|
+
* Get presigned upload URL from the API
|
|
356
|
+
*/
|
|
357
|
+
presignUpload(chatSessionId, file) {
|
|
358
|
+
const request = {
|
|
359
|
+
name: file.name,
|
|
360
|
+
contentType: file.type,
|
|
361
|
+
sizeBytes: file.size,
|
|
362
|
+
pathData: {
|
|
363
|
+
type: 1,
|
|
364
|
+
chatSessionId,
|
|
365
|
+
},
|
|
366
|
+
};
|
|
367
|
+
return from(this.apiService.apiRequest('NewFile/presign-upload', 'POST', request, {
|
|
368
|
+
'Accept-Language': this.languageService.getCurrentLang(),
|
|
369
|
+
})).pipe(switchMap(async (response) => await response.json()), map((data) => data), catchError((error) => {
|
|
370
|
+
console.error('Error getting presigned upload URL:', error);
|
|
371
|
+
return throwError(() => error);
|
|
372
|
+
}));
|
|
373
|
+
}
|
|
374
|
+
/**
|
|
375
|
+
* Upload file to S3 using presigned URL
|
|
376
|
+
* Returns Observable with progress events
|
|
377
|
+
*/
|
|
378
|
+
uploadToS3(uploadUrl, file) {
|
|
379
|
+
const headers = new HttpHeaders({
|
|
380
|
+
'Content-Type': file.type,
|
|
381
|
+
});
|
|
382
|
+
return this.http
|
|
383
|
+
.put(uploadUrl, file, {
|
|
384
|
+
headers,
|
|
385
|
+
reportProgress: true,
|
|
386
|
+
observe: 'events',
|
|
387
|
+
})
|
|
388
|
+
.pipe(catchError((error) => {
|
|
389
|
+
if (error.status === 0) {
|
|
390
|
+
console.error('CORS error - S3 bucket needs CORS configuration', error);
|
|
391
|
+
}
|
|
392
|
+
return throwError(() => error);
|
|
393
|
+
}));
|
|
394
|
+
}
|
|
395
|
+
/**
|
|
396
|
+
* Get presigned download URL for a file
|
|
397
|
+
*/
|
|
398
|
+
presignDownload(fileId) {
|
|
399
|
+
return from(this.apiService.apiRequest(`NewFile/${fileId}/presign-download`, 'GET', null, {
|
|
400
|
+
'Accept-Language': this.languageService.getCurrentLang(),
|
|
401
|
+
})).pipe(switchMap(async (response) => await response.json()), map((data) => data), catchError((error) => {
|
|
402
|
+
console.error(`Failed to get download URL for ${fileId}`, error);
|
|
403
|
+
return throwError(() => error);
|
|
404
|
+
}));
|
|
405
|
+
}
|
|
406
|
+
/**
|
|
407
|
+
* Upload multiple files in parallel
|
|
408
|
+
* Returns array of upload results
|
|
409
|
+
*/
|
|
410
|
+
uploadFiles(chatSessionId, files) {
|
|
411
|
+
if (files.length === 0) {
|
|
412
|
+
return new Observable((observer) => {
|
|
413
|
+
observer.next([]);
|
|
414
|
+
observer.complete();
|
|
415
|
+
});
|
|
416
|
+
}
|
|
417
|
+
// Upload files in parallel
|
|
418
|
+
const uploadObservables = files.map((file) => this.uploadSingleFile(chatSessionId, file));
|
|
419
|
+
// Use forkJoin to wait for all uploads to complete
|
|
420
|
+
return forkJoin(uploadObservables);
|
|
421
|
+
}
|
|
422
|
+
/**
|
|
423
|
+
* Upload a single file
|
|
424
|
+
*/
|
|
425
|
+
uploadSingleFile(chatSessionId, file) {
|
|
426
|
+
return this.presignUpload(chatSessionId, file).pipe(switchMap((presignResponse) => this.uploadToS3(presignResponse.uploadUrl, file).pipe(
|
|
427
|
+
// Filter to get only the final response event
|
|
428
|
+
filter((event) => event.type === HttpEventType.Response), map((event) => {
|
|
429
|
+
if (event.status === 200 || event.status === 204) {
|
|
430
|
+
return {
|
|
431
|
+
fileId: presignResponse.id,
|
|
432
|
+
success: true,
|
|
433
|
+
};
|
|
434
|
+
}
|
|
435
|
+
return {
|
|
436
|
+
fileId: presignResponse.id,
|
|
437
|
+
success: false,
|
|
438
|
+
error: `Upload failed with status ${event.status}`,
|
|
439
|
+
};
|
|
440
|
+
}), catchError((error) => {
|
|
441
|
+
return new Observable((observer) => {
|
|
442
|
+
observer.next({
|
|
443
|
+
fileId: presignResponse.id,
|
|
444
|
+
success: false,
|
|
445
|
+
error: error.message || 'Upload failed',
|
|
446
|
+
});
|
|
447
|
+
observer.complete();
|
|
448
|
+
});
|
|
449
|
+
}))), catchError((error) => {
|
|
450
|
+
return new Observable((observer) => {
|
|
451
|
+
observer.next({
|
|
452
|
+
fileId: '',
|
|
453
|
+
success: false,
|
|
454
|
+
error: error.message || 'Failed to get presigned URL',
|
|
455
|
+
});
|
|
456
|
+
observer.complete();
|
|
457
|
+
});
|
|
458
|
+
}));
|
|
459
|
+
}
|
|
460
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.11", ngImport: i0, type: FileUploadService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
461
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.11", ngImport: i0, type: FileUploadService, providedIn: 'root' });
|
|
462
|
+
}
|
|
463
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.11", ngImport: i0, type: FileUploadService, decorators: [{
|
|
464
|
+
type: Injectable,
|
|
465
|
+
args: [{
|
|
466
|
+
providedIn: 'root',
|
|
467
|
+
}]
|
|
468
|
+
}] });
|
|
469
|
+
|
|
470
|
+
class ArrowAnimationComponent {
|
|
471
|
+
showArrowAnimation = false;
|
|
472
|
+
isPopupOpen = false;
|
|
473
|
+
messageLabel = null;
|
|
474
|
+
closeArrowAnimation = new EventEmitter();
|
|
475
|
+
handleCloseArrowAnimation() {
|
|
476
|
+
this.closeArrowAnimation.emit();
|
|
477
|
+
}
|
|
478
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.11", ngImport: i0, type: ArrowAnimationComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
479
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.11", type: ArrowAnimationComponent, isStandalone: true, selector: "app-arrow-animation", inputs: { showArrowAnimation: "showArrowAnimation", isPopupOpen: "isPopupOpen", messageLabel: "messageLabel" }, outputs: { closeArrowAnimation: "closeArrowAnimation" }, ngImport: i0, template: "@if (showArrowAnimation && !isPopupOpen) {\n<div class=\"arrow-animation\">\n <div class=\"message-box\">\n <p>\n {{\n messageLabel ||\n \"Need assistance Or You want to try the Product? Click here\"\n }}\n </p>\n <button class=\"close-button\" (click)=\"handleCloseArrowAnimation()\">\n <svg width=\"12\" height=\"12\" viewBox=\"0 0 12 12\">\n <path\n d=\"M1 1L11 11M1 11L11 1\"\n stroke=\"currentColor\"\n strokeWidth=\"2\"\n />\n </svg>\n </button>\n <div class=\"arrow-tip\"></div>\n </div>\n</div>\n}\n", styles: ["@keyframes float{0%,to{transform:translateY(0)}50%{transform:translateY(-10px)}}.arrow-animation{position:fixed;bottom:5rem;right:1rem;z-index:1300;display:flex;flex-direction:column;align-items:flex-end;animation:float 3s infinite ease-in-out}.arrow-animation .message-box{background-color:var(--babylai-primary-color, #ad49e1);color:#fff;padding:.75rem 1rem;border-radius:9999px;box-shadow:#64646f33 0 7px 29px;margin-bottom:1rem;max-width:200px;position:relative}.arrow-animation .message-box p{font-size:.75rem;font-weight:700;margin:0}.arrow-animation .message-box .close-button{position:absolute;top:-8px;right:-8px;width:1.25rem;height:1.25rem;border-radius:9999px;background-color:var(--black-white-50);border:none;cursor:pointer;display:flex;align-items:center;justify-content:center;color:var(--black-white-700);padding:3px}.arrow-animation .message-box .close-button:hover{background-color:var(--babylai-primary-color-700, #451d5a);color:#fff}.arrow-animation .message-box .arrow-tip{position:absolute;bottom:-10px;right:1.25rem;width:0;height:0;border-left:10px solid transparent;border-right:10px solid transparent;border-top:10px solid var(--babylai-primary-color, #ad49e1)}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }] });
|
|
480
|
+
}
|
|
481
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.11", ngImport: i0, type: ArrowAnimationComponent, decorators: [{
|
|
482
|
+
type: Component,
|
|
483
|
+
args: [{ selector: 'app-arrow-animation', standalone: true, imports: [CommonModule], template: "@if (showArrowAnimation && !isPopupOpen) {\n<div class=\"arrow-animation\">\n <div class=\"message-box\">\n <p>\n {{\n messageLabel ||\n \"Need assistance Or You want to try the Product? Click here\"\n }}\n </p>\n <button class=\"close-button\" (click)=\"handleCloseArrowAnimation()\">\n <svg width=\"12\" height=\"12\" viewBox=\"0 0 12 12\">\n <path\n d=\"M1 1L11 11M1 11L11 1\"\n stroke=\"currentColor\"\n strokeWidth=\"2\"\n />\n </svg>\n </button>\n <div class=\"arrow-tip\"></div>\n </div>\n</div>\n}\n", styles: ["@keyframes float{0%,to{transform:translateY(0)}50%{transform:translateY(-10px)}}.arrow-animation{position:fixed;bottom:5rem;right:1rem;z-index:1300;display:flex;flex-direction:column;align-items:flex-end;animation:float 3s infinite ease-in-out}.arrow-animation .message-box{background-color:var(--babylai-primary-color, #ad49e1);color:#fff;padding:.75rem 1rem;border-radius:9999px;box-shadow:#64646f33 0 7px 29px;margin-bottom:1rem;max-width:200px;position:relative}.arrow-animation .message-box p{font-size:.75rem;font-weight:700;margin:0}.arrow-animation .message-box .close-button{position:absolute;top:-8px;right:-8px;width:1.25rem;height:1.25rem;border-radius:9999px;background-color:var(--black-white-50);border:none;cursor:pointer;display:flex;align-items:center;justify-content:center;color:var(--black-white-700);padding:3px}.arrow-animation .message-box .close-button:hover{background-color:var(--babylai-primary-color-700, #451d5a);color:#fff}.arrow-animation .message-box .arrow-tip{position:absolute;bottom:-10px;right:1.25rem;width:0;height:0;border-left:10px solid transparent;border-right:10px solid transparent;border-top:10px solid var(--babylai-primary-color, #ad49e1)}\n"] }]
|
|
484
|
+
}], propDecorators: { showArrowAnimation: [{
|
|
485
|
+
type: Input
|
|
486
|
+
}], isPopupOpen: [{
|
|
487
|
+
type: Input
|
|
488
|
+
}], messageLabel: [{
|
|
489
|
+
type: Input
|
|
490
|
+
}], closeArrowAnimation: [{
|
|
491
|
+
type: Output
|
|
492
|
+
}] } });
|
|
493
|
+
|
|
494
|
+
class HelpButtonComponent {
|
|
495
|
+
togglePopup = new EventEmitter();
|
|
496
|
+
handleTogglePopup() {
|
|
497
|
+
this.togglePopup.emit();
|
|
498
|
+
}
|
|
499
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.11", ngImport: i0, type: HelpButtonComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
500
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.11", type: HelpButtonComponent, isStandalone: true, selector: "app-help-button", outputs: { togglePopup: "togglePopup" }, ngImport: i0, template: "<button class=\"help-button\" (click)=\"handleTogglePopup()\">\n <span class=\"help-button-content\">\n <svg\n class=\"help-button-logo\"\n viewBox=\"0 0 55 53\"\n fill=\"currentColor\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <path\n d=\"M8.53125 19.1353C8.53125 12.2804 14.0883 6.72339 20.9432 6.72339H41.6298C48.4847 6.72339 54.0418 12.2804 54.0418 19.1353V52.2339H20.9432C14.0883 52.2339 8.53125 46.6769 8.53125 39.8219V19.1353Z\"\n fill=\"#E5E5E5\"\n />\n <path\n d=\"M0 12.412C0 5.55702 5.55702 0 12.412 0H33.0985C39.9535 0 45.5105 5.55702 45.5105 12.412V33.0985C45.5105 39.9535 39.9535 45.5105 33.0985 45.5105H0V12.412Z\"\n fill=\"white\"\n />\n <path\n d=\"M14.3684 15.2203C14.3696 15.2162 14.3701 15.2142 14.3704 15.2132C14.5505 14.5816 15.4457 14.5816 15.6258 15.2132C15.6261 15.2142 15.6267 15.2162 15.6278 15.2203C15.6309 15.2311 15.6324 15.2365 15.6338 15.2416C16.4708 18.1971 18.7808 20.5071 21.7364 21.3441C21.7414 21.3455 21.7468 21.3471 21.7576 21.3501C21.7617 21.3512 21.7637 21.3518 21.7647 21.3521C22.3963 21.5322 22.3963 22.4274 21.7647 22.6075C21.7637 22.6078 21.7617 22.6084 21.7576 22.6095C21.7468 22.6126 21.7414 22.6141 21.7364 22.6155C18.7808 23.4525 16.4708 25.7625 15.6338 28.7181C15.6324 28.7231 15.6309 28.7285 15.6278 28.7393C15.6267 28.7434 15.6261 28.7454 15.6258 28.7464C15.4457 29.378 14.5505 29.378 14.3704 28.7464C14.3701 28.7454 14.3696 28.7434 14.3684 28.7393C14.3654 28.7285 14.3638 28.7231 14.3624 28.7181C13.5254 25.7625 11.2154 23.4525 8.25988 22.6155C8.25481 22.6141 8.24942 22.6126 8.23864 22.6095C8.23454 22.6084 8.2325 22.6078 8.23155 22.6075C7.5999 22.4274 7.5999 21.5322 8.23155 21.3521C8.2325 21.3518 8.23454 21.3512 8.23864 21.3501C8.24942 21.3471 8.25481 21.3455 8.25988 21.3441C11.2154 20.5071 13.5254 18.1971 14.3624 15.2416C14.3638 15.2365 14.3654 15.2311 14.3684 15.2203Z\"\n fill=\"currentColor\"\n />\n <path\n d=\"M36.7198 21.8503C36.7198 24.9207 34.2886 27.4098 31.2896 27.4098C28.2906 27.4098 25.8594 24.9207 25.8594 21.8503C25.8594 18.7799 28.2906 16.2908 31.2896 16.2908C34.2886 16.2908 36.7198 18.7799 36.7198 21.8503Z\"\n fill=\"currentColor\"\n />\n </svg>\n </span>\n</button>\n", styles: [".help-button{width:3.5rem;height:3.5rem;border-radius:9999px;background-color:var(--babylai-primary-color, #ad49e1);color:#fff;border:none;cursor:pointer;display:flex;align-items:center;justify-content:center;box-shadow:#64646f33 0 7px 29px;transition:transform .2s ease-out;position:fixed;bottom:1.25rem;right:1.25rem;z-index:1000}.help-button:hover{background-color:var(--babylai-primary-color-300, #d49cee);transform:scale(1.05)}.help-button:active{transform:scale(.95)}.help-button-content{display:flex;align-items:center;justify-content:center}.help-button-logo{width:1.5rem;height:1.5rem;color:var(--babylai-primary-color, #ad49e1)}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }] });
|
|
501
|
+
}
|
|
502
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.11", ngImport: i0, type: HelpButtonComponent, decorators: [{
|
|
503
|
+
type: Component,
|
|
504
|
+
args: [{ selector: 'app-help-button', standalone: true, imports: [CommonModule], template: "<button class=\"help-button\" (click)=\"handleTogglePopup()\">\n <span class=\"help-button-content\">\n <svg\n class=\"help-button-logo\"\n viewBox=\"0 0 55 53\"\n fill=\"currentColor\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <path\n d=\"M8.53125 19.1353C8.53125 12.2804 14.0883 6.72339 20.9432 6.72339H41.6298C48.4847 6.72339 54.0418 12.2804 54.0418 19.1353V52.2339H20.9432C14.0883 52.2339 8.53125 46.6769 8.53125 39.8219V19.1353Z\"\n fill=\"#E5E5E5\"\n />\n <path\n d=\"M0 12.412C0 5.55702 5.55702 0 12.412 0H33.0985C39.9535 0 45.5105 5.55702 45.5105 12.412V33.0985C45.5105 39.9535 39.9535 45.5105 33.0985 45.5105H0V12.412Z\"\n fill=\"white\"\n />\n <path\n d=\"M14.3684 15.2203C14.3696 15.2162 14.3701 15.2142 14.3704 15.2132C14.5505 14.5816 15.4457 14.5816 15.6258 15.2132C15.6261 15.2142 15.6267 15.2162 15.6278 15.2203C15.6309 15.2311 15.6324 15.2365 15.6338 15.2416C16.4708 18.1971 18.7808 20.5071 21.7364 21.3441C21.7414 21.3455 21.7468 21.3471 21.7576 21.3501C21.7617 21.3512 21.7637 21.3518 21.7647 21.3521C22.3963 21.5322 22.3963 22.4274 21.7647 22.6075C21.7637 22.6078 21.7617 22.6084 21.7576 22.6095C21.7468 22.6126 21.7414 22.6141 21.7364 22.6155C18.7808 23.4525 16.4708 25.7625 15.6338 28.7181C15.6324 28.7231 15.6309 28.7285 15.6278 28.7393C15.6267 28.7434 15.6261 28.7454 15.6258 28.7464C15.4457 29.378 14.5505 29.378 14.3704 28.7464C14.3701 28.7454 14.3696 28.7434 14.3684 28.7393C14.3654 28.7285 14.3638 28.7231 14.3624 28.7181C13.5254 25.7625 11.2154 23.4525 8.25988 22.6155C8.25481 22.6141 8.24942 22.6126 8.23864 22.6095C8.23454 22.6084 8.2325 22.6078 8.23155 22.6075C7.5999 22.4274 7.5999 21.5322 8.23155 21.3521C8.2325 21.3518 8.23454 21.3512 8.23864 21.3501C8.24942 21.3471 8.25481 21.3455 8.25988 21.3441C11.2154 20.5071 13.5254 18.1971 14.3624 15.2416C14.3638 15.2365 14.3654 15.2311 14.3684 15.2203Z\"\n fill=\"currentColor\"\n />\n <path\n d=\"M36.7198 21.8503C36.7198 24.9207 34.2886 27.4098 31.2896 27.4098C28.2906 27.4098 25.8594 24.9207 25.8594 21.8503C25.8594 18.7799 28.2906 16.2908 31.2896 16.2908C34.2886 16.2908 36.7198 18.7799 36.7198 21.8503Z\"\n fill=\"currentColor\"\n />\n </svg>\n </span>\n</button>\n", styles: [".help-button{width:3.5rem;height:3.5rem;border-radius:9999px;background-color:var(--babylai-primary-color, #ad49e1);color:#fff;border:none;cursor:pointer;display:flex;align-items:center;justify-content:center;box-shadow:#64646f33 0 7px 29px;transition:transform .2s ease-out;position:fixed;bottom:1.25rem;right:1.25rem;z-index:1000}.help-button:hover{background-color:var(--babylai-primary-color-300, #d49cee);transform:scale(1.05)}.help-button:active{transform:scale(.95)}.help-button-content{display:flex;align-items:center;justify-content:center}.help-button-logo{width:1.5rem;height:1.5rem;color:var(--babylai-primary-color, #ad49e1)}\n"] }]
|
|
505
|
+
}], propDecorators: { togglePopup: [{
|
|
506
|
+
type: Output
|
|
507
|
+
}] } });
|
|
508
|
+
|
|
278
509
|
// src/app/pipes/translate.pipe.ts
|
|
279
510
|
class TranslatePipe {
|
|
280
511
|
translationService = inject(TranslationService);
|
|
281
512
|
transform(key) {
|
|
282
513
|
return this.translationService.translate(key);
|
|
283
514
|
}
|
|
284
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
285
|
-
static ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "
|
|
515
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.11", ngImport: i0, type: TranslatePipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
|
|
516
|
+
static ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "19.2.11", ngImport: i0, type: TranslatePipe, isStandalone: true, name: "translate" });
|
|
286
517
|
}
|
|
287
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
518
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.11", ngImport: i0, type: TranslatePipe, decorators: [{
|
|
288
519
|
type: Pipe,
|
|
289
520
|
args: [{
|
|
290
521
|
name: 'translate',
|
|
@@ -321,8 +552,8 @@ class ButtonComponent {
|
|
|
321
552
|
}
|
|
322
553
|
return classes.join(' ');
|
|
323
554
|
}
|
|
324
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
325
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "
|
|
555
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.11", ngImport: i0, type: ButtonComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
556
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.11", type: ButtonComponent, isStandalone: true, selector: "app-button", inputs: { variant: "variant", type: "type", disabled: "disabled", fullWidth: "fullWidth", className: "className", size: "size", direction: "direction" }, outputs: { onClick: "onClick" }, ngImport: i0, template: `
|
|
326
557
|
<button
|
|
327
558
|
[type]="type"
|
|
328
559
|
[disabled]="disabled"
|
|
@@ -334,7 +565,7 @@ class ButtonComponent {
|
|
|
334
565
|
</button>
|
|
335
566
|
`, isInline: true, styles: [".button{cursor:pointer;transition:all .2s ease-out;display:inline-flex;align-items:center;justify-content:center;position:relative}.button:focus-visible{outline:2px solid var(--ring);outline-offset:2px;box-shadow:0 0 0 2px var(--background),0 0 0 4px var(--ring)}.button--rtl{direction:rtl}.button--rtl img{transform:scaleX(-1)}.button--default{background-color:var(--babylai-primary-color, #ad49e1);color:#fff;padding:.5rem 1rem;border-radius:9999px;border:none}.button--default:hover{background-color:var(--babylai-primary-color-300, #d49cee)}.button--outline{background-color:transparent;color:var(--babylai-primary-color, #ad49e1);border:1px solid var(--babylai-primary-color, #ad49e1);padding:.5rem 1rem;border-radius:9999px}.button--outline:hover{background-color:rgba(var(--babylai-primary-color, #ad49e1),.1);border-color:var(--babylai-primary-color-600, #672b87)}.button--outline:focus-visible{background-color:rgba(var(--babylai-primary-color, #ad49e1),.1);border-color:var(--ring)}.button--icon-bg{background-color:var(--babylai-primary-color, #ad49e1);color:#fff;padding:.75rem 1rem;border-radius:9999px;width:2.5rem;height:2.5rem;display:flex;align-items:center;justify-content:center;border:none}.button--icon-bg:hover{background-color:var(--babylai-primary-color-300, #d49cee)}.button--icon-bg.button--white-bg{background-color:var(--black-white-50)}.button--icon-bg.button--white-bg:hover{background-color:var(--black-white-100)}.button--icon-bg.button--light-bg{background-color:var(--babylai-primary-color-100, #f6ecfc);color:var(--babylai-primary-color, #ad49e1)}.button--icon-bg.button--light-bg:hover{background-color:var(--babylai-primary-color-200, #deb6f3)}.button--icon-bg.button--close-button{color:var(--babylai-primary-color, #ad49e1);padding:.5rem;border:none}.button--icon-bg.button--close-button:hover{background-color:var(--babylai-primary-color-300, #d49cee)}.button--icon-bg.button--small{padding:.5rem;width:1.75rem;height:1.75rem}.button--icon-bg.button--icon{padding:.75rem}.button--icon-only{background-color:transparent;border:none;padding:.25rem;display:flex;align-items:center;justify-content:center}.button--full-width{width:100%!important;display:flex!important}.button:disabled{opacity:.5;cursor:not-allowed}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }] });
|
|
336
567
|
}
|
|
337
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
568
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.11", ngImport: i0, type: ButtonComponent, decorators: [{
|
|
338
569
|
type: Component,
|
|
339
570
|
args: [{ selector: 'app-button', standalone: true, imports: [CommonModule], template: `
|
|
340
571
|
<button
|
|
@@ -365,10 +596,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.1", ngImpor
|
|
|
365
596
|
type: Output
|
|
366
597
|
}] } });
|
|
367
598
|
class ButtonContentComponent {
|
|
368
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
369
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "
|
|
599
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.11", ngImport: i0, type: ButtonContentComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
600
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.11", type: ButtonContentComponent, isStandalone: true, selector: "app-button-content", ngImport: i0, template: ` <ng-content></ng-content> `, isInline: true, dependencies: [{ kind: "ngmodule", type: CommonModule }] });
|
|
370
601
|
}
|
|
371
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
602
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.11", ngImport: i0, type: ButtonContentComponent, decorators: [{
|
|
372
603
|
type: Component,
|
|
373
604
|
args: [{
|
|
374
605
|
selector: 'app-button-content',
|
|
@@ -381,8 +612,8 @@ class IconButtonComponent {
|
|
|
381
612
|
className = '';
|
|
382
613
|
disabled = false;
|
|
383
614
|
onClick = new EventEmitter();
|
|
384
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
385
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "
|
|
615
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.11", ngImport: i0, type: IconButtonComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
616
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.11", type: IconButtonComponent, isStandalone: true, selector: "app-icon-button", inputs: { className: "className", disabled: "disabled" }, outputs: { onClick: "onClick" }, ngImport: i0, template: `
|
|
386
617
|
<app-button
|
|
387
618
|
variant="icon-bg"
|
|
388
619
|
[className]="className"
|
|
@@ -393,7 +624,7 @@ class IconButtonComponent {
|
|
|
393
624
|
</app-button>
|
|
394
625
|
`, isInline: true, dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "component", type: ButtonComponent, selector: "app-button", inputs: ["variant", "type", "disabled", "fullWidth", "className", "size", "direction"], outputs: ["onClick"] }] });
|
|
395
626
|
}
|
|
396
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
627
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.11", ngImport: i0, type: IconButtonComponent, decorators: [{
|
|
397
628
|
type: Component,
|
|
398
629
|
args: [{
|
|
399
630
|
selector: 'app-icon-button',
|
|
@@ -421,8 +652,8 @@ class TransparentIconButtonComponent {
|
|
|
421
652
|
className = '';
|
|
422
653
|
disabled = false;
|
|
423
654
|
onClick = new EventEmitter();
|
|
424
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
425
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "
|
|
655
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.11", ngImport: i0, type: TransparentIconButtonComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
656
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.11", type: TransparentIconButtonComponent, isStandalone: true, selector: "app-transparent-icon-button", inputs: { className: "className", disabled: "disabled" }, outputs: { onClick: "onClick" }, ngImport: i0, template: `
|
|
426
657
|
<app-button
|
|
427
658
|
variant="icon-only"
|
|
428
659
|
[className]="className"
|
|
@@ -433,7 +664,7 @@ class TransparentIconButtonComponent {
|
|
|
433
664
|
</app-button>
|
|
434
665
|
`, isInline: true, dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "component", type: ButtonComponent, selector: "app-button", inputs: ["variant", "type", "disabled", "fullWidth", "className", "size", "direction"], outputs: ["onClick"] }] });
|
|
435
666
|
}
|
|
436
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
667
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.11", ngImport: i0, type: TransparentIconButtonComponent, decorators: [{
|
|
437
668
|
type: Component,
|
|
438
669
|
args: [{
|
|
439
670
|
selector: 'app-transparent-icon-button',
|
|
@@ -469,10 +700,10 @@ class CardComponent {
|
|
|
469
700
|
}
|
|
470
701
|
return classes.join(' ');
|
|
471
702
|
}
|
|
472
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
473
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "
|
|
703
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.11", ngImport: i0, type: CardComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
704
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.11", type: CardComponent, isStandalone: true, selector: "app-card", inputs: { variant: "variant", class: "class" }, host: { properties: { "class": "this.hostClasses" } }, ngImport: i0, template: `<ng-content></ng-content>`, isInline: true, styles: [".card{z-index:1;width:100%;box-sizing:border-box}.card--default{border-radius:.5rem;border:1px solid var(--border);background-color:var(--card);color:var(--card-foreground);box-shadow:#64646f33 0 7px 29px}.card--rounded{border-radius:1.5rem;background-color:var(--card);padding:.25rem .5rem;display:block}.card--shadowed{border-radius:.5rem;border:1px solid var(--border);background-color:var(--card);color:var(--card-foreground);box-shadow:#64646f33 0 7px 29px}.card__header{display:flex;flex-direction:column;gap:.375rem;padding:1.5rem;width:100%}.card__title{font-weight:600;line-height:1;letter-spacing:-.02em;width:100%}.card__description{font-size:.875rem;color:var(--muted-foreground);width:100%}.card__content{padding:0;width:100%;box-sizing:border-box}.card__footer{display:flex;align-items:center;padding:1.5rem;padding-top:0;width:100%}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }], encapsulation: i0.ViewEncapsulation.None });
|
|
474
705
|
}
|
|
475
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
706
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.11", ngImport: i0, type: CardComponent, decorators: [{
|
|
476
707
|
type: Component,
|
|
477
708
|
args: [{ selector: 'app-card', standalone: true, imports: [CommonModule], template: `<ng-content></ng-content>`, encapsulation: ViewEncapsulation.None, styles: [".card{z-index:1;width:100%;box-sizing:border-box}.card--default{border-radius:.5rem;border:1px solid var(--border);background-color:var(--card);color:var(--card-foreground);box-shadow:#64646f33 0 7px 29px}.card--rounded{border-radius:1.5rem;background-color:var(--card);padding:.25rem .5rem;display:block}.card--shadowed{border-radius:.5rem;border:1px solid var(--border);background-color:var(--card);color:var(--card-foreground);box-shadow:#64646f33 0 7px 29px}.card__header{display:flex;flex-direction:column;gap:.375rem;padding:1.5rem;width:100%}.card__title{font-weight:600;line-height:1;letter-spacing:-.02em;width:100%}.card__description{font-size:.875rem;color:var(--muted-foreground);width:100%}.card__content{padding:0;width:100%;box-sizing:border-box}.card__footer{display:flex;align-items:center;padding:1.5rem;padding-top:0;width:100%}\n"] }]
|
|
478
709
|
}], propDecorators: { variant: [{
|
|
@@ -492,10 +723,10 @@ class CardHeaderComponent {
|
|
|
492
723
|
}
|
|
493
724
|
return classes.join(' ');
|
|
494
725
|
}
|
|
495
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
496
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "
|
|
726
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.11", ngImport: i0, type: CardHeaderComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
727
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.11", type: CardHeaderComponent, isStandalone: true, selector: "app-card-header", inputs: { class: "class" }, host: { properties: { "class": "this.hostClasses" } }, ngImport: i0, template: `<ng-content></ng-content>`, isInline: true, styles: [".card{z-index:1;width:100%;box-sizing:border-box}.card--default{border-radius:.5rem;border:1px solid var(--border);background-color:var(--card);color:var(--card-foreground);box-shadow:#64646f33 0 7px 29px}.card--rounded{border-radius:1.5rem;background-color:var(--card);padding:.25rem .5rem;display:block}.card--shadowed{border-radius:.5rem;border:1px solid var(--border);background-color:var(--card);color:var(--card-foreground);box-shadow:#64646f33 0 7px 29px}.card__header{display:flex;flex-direction:column;gap:.375rem;padding:1.5rem;width:100%}.card__title{font-weight:600;line-height:1;letter-spacing:-.02em;width:100%}.card__description{font-size:.875rem;color:var(--muted-foreground);width:100%}.card__content{padding:0;width:100%;box-sizing:border-box}.card__footer{display:flex;align-items:center;padding:1.5rem;padding-top:0;width:100%}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }], encapsulation: i0.ViewEncapsulation.None });
|
|
497
728
|
}
|
|
498
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
729
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.11", ngImport: i0, type: CardHeaderComponent, decorators: [{
|
|
499
730
|
type: Component,
|
|
500
731
|
args: [{ selector: 'app-card-header', standalone: true, imports: [CommonModule], template: `<ng-content></ng-content>`, encapsulation: ViewEncapsulation.None, styles: [".card{z-index:1;width:100%;box-sizing:border-box}.card--default{border-radius:.5rem;border:1px solid var(--border);background-color:var(--card);color:var(--card-foreground);box-shadow:#64646f33 0 7px 29px}.card--rounded{border-radius:1.5rem;background-color:var(--card);padding:.25rem .5rem;display:block}.card--shadowed{border-radius:.5rem;border:1px solid var(--border);background-color:var(--card);color:var(--card-foreground);box-shadow:#64646f33 0 7px 29px}.card__header{display:flex;flex-direction:column;gap:.375rem;padding:1.5rem;width:100%}.card__title{font-weight:600;line-height:1;letter-spacing:-.02em;width:100%}.card__description{font-size:.875rem;color:var(--muted-foreground);width:100%}.card__content{padding:0;width:100%;box-sizing:border-box}.card__footer{display:flex;align-items:center;padding:1.5rem;padding-top:0;width:100%}\n"] }]
|
|
501
732
|
}], propDecorators: { class: [{
|
|
@@ -513,10 +744,10 @@ class CardTitleComponent {
|
|
|
513
744
|
}
|
|
514
745
|
return classes.join(' ');
|
|
515
746
|
}
|
|
516
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
517
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "
|
|
747
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.11", ngImport: i0, type: CardTitleComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
748
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.11", type: CardTitleComponent, isStandalone: true, selector: "app-card-title", inputs: { class: "class" }, host: { properties: { "class": "this.hostClasses" } }, ngImport: i0, template: `<ng-content></ng-content>`, isInline: true, styles: [".card{z-index:1;width:100%;box-sizing:border-box}.card--default{border-radius:.5rem;border:1px solid var(--border);background-color:var(--card);color:var(--card-foreground);box-shadow:#64646f33 0 7px 29px}.card--rounded{border-radius:1.5rem;background-color:var(--card);padding:.25rem .5rem;display:block}.card--shadowed{border-radius:.5rem;border:1px solid var(--border);background-color:var(--card);color:var(--card-foreground);box-shadow:#64646f33 0 7px 29px}.card__header{display:flex;flex-direction:column;gap:.375rem;padding:1.5rem;width:100%}.card__title{font-weight:600;line-height:1;letter-spacing:-.02em;width:100%}.card__description{font-size:.875rem;color:var(--muted-foreground);width:100%}.card__content{padding:0;width:100%;box-sizing:border-box}.card__footer{display:flex;align-items:center;padding:1.5rem;padding-top:0;width:100%}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }], encapsulation: i0.ViewEncapsulation.None });
|
|
518
749
|
}
|
|
519
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
750
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.11", ngImport: i0, type: CardTitleComponent, decorators: [{
|
|
520
751
|
type: Component,
|
|
521
752
|
args: [{ selector: 'app-card-title', standalone: true, imports: [CommonModule], template: `<ng-content></ng-content>`, encapsulation: ViewEncapsulation.None, styles: [".card{z-index:1;width:100%;box-sizing:border-box}.card--default{border-radius:.5rem;border:1px solid var(--border);background-color:var(--card);color:var(--card-foreground);box-shadow:#64646f33 0 7px 29px}.card--rounded{border-radius:1.5rem;background-color:var(--card);padding:.25rem .5rem;display:block}.card--shadowed{border-radius:.5rem;border:1px solid var(--border);background-color:var(--card);color:var(--card-foreground);box-shadow:#64646f33 0 7px 29px}.card__header{display:flex;flex-direction:column;gap:.375rem;padding:1.5rem;width:100%}.card__title{font-weight:600;line-height:1;letter-spacing:-.02em;width:100%}.card__description{font-size:.875rem;color:var(--muted-foreground);width:100%}.card__content{padding:0;width:100%;box-sizing:border-box}.card__footer{display:flex;align-items:center;padding:1.5rem;padding-top:0;width:100%}\n"] }]
|
|
522
753
|
}], propDecorators: { class: [{
|
|
@@ -534,10 +765,10 @@ class CardDescriptionComponent {
|
|
|
534
765
|
}
|
|
535
766
|
return classes.join(' ');
|
|
536
767
|
}
|
|
537
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
538
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "
|
|
768
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.11", ngImport: i0, type: CardDescriptionComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
769
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.11", type: CardDescriptionComponent, isStandalone: true, selector: "app-card-description", inputs: { class: "class" }, host: { properties: { "class": "this.hostClasses" } }, ngImport: i0, template: `<ng-content></ng-content>`, isInline: true, styles: [".card{z-index:1;width:100%;box-sizing:border-box}.card--default{border-radius:.5rem;border:1px solid var(--border);background-color:var(--card);color:var(--card-foreground);box-shadow:#64646f33 0 7px 29px}.card--rounded{border-radius:1.5rem;background-color:var(--card);padding:.25rem .5rem;display:block}.card--shadowed{border-radius:.5rem;border:1px solid var(--border);background-color:var(--card);color:var(--card-foreground);box-shadow:#64646f33 0 7px 29px}.card__header{display:flex;flex-direction:column;gap:.375rem;padding:1.5rem;width:100%}.card__title{font-weight:600;line-height:1;letter-spacing:-.02em;width:100%}.card__description{font-size:.875rem;color:var(--muted-foreground);width:100%}.card__content{padding:0;width:100%;box-sizing:border-box}.card__footer{display:flex;align-items:center;padding:1.5rem;padding-top:0;width:100%}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }], encapsulation: i0.ViewEncapsulation.None });
|
|
539
770
|
}
|
|
540
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
771
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.11", ngImport: i0, type: CardDescriptionComponent, decorators: [{
|
|
541
772
|
type: Component,
|
|
542
773
|
args: [{ selector: 'app-card-description', standalone: true, imports: [CommonModule], template: `<ng-content></ng-content>`, encapsulation: ViewEncapsulation.None, styles: [".card{z-index:1;width:100%;box-sizing:border-box}.card--default{border-radius:.5rem;border:1px solid var(--border);background-color:var(--card);color:var(--card-foreground);box-shadow:#64646f33 0 7px 29px}.card--rounded{border-radius:1.5rem;background-color:var(--card);padding:.25rem .5rem;display:block}.card--shadowed{border-radius:.5rem;border:1px solid var(--border);background-color:var(--card);color:var(--card-foreground);box-shadow:#64646f33 0 7px 29px}.card__header{display:flex;flex-direction:column;gap:.375rem;padding:1.5rem;width:100%}.card__title{font-weight:600;line-height:1;letter-spacing:-.02em;width:100%}.card__description{font-size:.875rem;color:var(--muted-foreground);width:100%}.card__content{padding:0;width:100%;box-sizing:border-box}.card__footer{display:flex;align-items:center;padding:1.5rem;padding-top:0;width:100%}\n"] }]
|
|
543
774
|
}], propDecorators: { class: [{
|
|
@@ -555,10 +786,10 @@ class CardContentComponent {
|
|
|
555
786
|
}
|
|
556
787
|
return classes.join(' ');
|
|
557
788
|
}
|
|
558
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
559
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "
|
|
789
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.11", ngImport: i0, type: CardContentComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
790
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.11", type: CardContentComponent, isStandalone: true, selector: "app-card-content", inputs: { class: "class" }, host: { properties: { "class": "this.hostClasses" } }, ngImport: i0, template: `<ng-content></ng-content>`, isInline: true, styles: [".card{z-index:1;width:100%;box-sizing:border-box}.card--default{border-radius:.5rem;border:1px solid var(--border);background-color:var(--card);color:var(--card-foreground);box-shadow:#64646f33 0 7px 29px}.card--rounded{border-radius:1.5rem;background-color:var(--card);padding:.25rem .5rem;display:block}.card--shadowed{border-radius:.5rem;border:1px solid var(--border);background-color:var(--card);color:var(--card-foreground);box-shadow:#64646f33 0 7px 29px}.card__header{display:flex;flex-direction:column;gap:.375rem;padding:1.5rem;width:100%}.card__title{font-weight:600;line-height:1;letter-spacing:-.02em;width:100%}.card__description{font-size:.875rem;color:var(--muted-foreground);width:100%}.card__content{padding:0;width:100%;box-sizing:border-box}.card__footer{display:flex;align-items:center;padding:1.5rem;padding-top:0;width:100%}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }], encapsulation: i0.ViewEncapsulation.None });
|
|
560
791
|
}
|
|
561
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
792
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.11", ngImport: i0, type: CardContentComponent, decorators: [{
|
|
562
793
|
type: Component,
|
|
563
794
|
args: [{ selector: 'app-card-content', standalone: true, imports: [CommonModule], template: `<ng-content></ng-content>`, encapsulation: ViewEncapsulation.None, styles: [".card{z-index:1;width:100%;box-sizing:border-box}.card--default{border-radius:.5rem;border:1px solid var(--border);background-color:var(--card);color:var(--card-foreground);box-shadow:#64646f33 0 7px 29px}.card--rounded{border-radius:1.5rem;background-color:var(--card);padding:.25rem .5rem;display:block}.card--shadowed{border-radius:.5rem;border:1px solid var(--border);background-color:var(--card);color:var(--card-foreground);box-shadow:#64646f33 0 7px 29px}.card__header{display:flex;flex-direction:column;gap:.375rem;padding:1.5rem;width:100%}.card__title{font-weight:600;line-height:1;letter-spacing:-.02em;width:100%}.card__description{font-size:.875rem;color:var(--muted-foreground);width:100%}.card__content{padding:0;width:100%;box-sizing:border-box}.card__footer{display:flex;align-items:center;padding:1.5rem;padding-top:0;width:100%}\n"] }]
|
|
564
795
|
}], propDecorators: { class: [{
|
|
@@ -576,10 +807,10 @@ class CardFooterComponent {
|
|
|
576
807
|
}
|
|
577
808
|
return classes.join(' ');
|
|
578
809
|
}
|
|
579
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
580
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "
|
|
810
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.11", ngImport: i0, type: CardFooterComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
811
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.11", type: CardFooterComponent, isStandalone: true, selector: "app-card-footer", inputs: { class: "class" }, host: { properties: { "class": "this.hostClasses" } }, ngImport: i0, template: `<ng-content></ng-content>`, isInline: true, styles: [".card{z-index:1;width:100%;box-sizing:border-box}.card--default{border-radius:.5rem;border:1px solid var(--border);background-color:var(--card);color:var(--card-foreground);box-shadow:#64646f33 0 7px 29px}.card--rounded{border-radius:1.5rem;background-color:var(--card);padding:.25rem .5rem;display:block}.card--shadowed{border-radius:.5rem;border:1px solid var(--border);background-color:var(--card);color:var(--card-foreground);box-shadow:#64646f33 0 7px 29px}.card__header{display:flex;flex-direction:column;gap:.375rem;padding:1.5rem;width:100%}.card__title{font-weight:600;line-height:1;letter-spacing:-.02em;width:100%}.card__description{font-size:.875rem;color:var(--muted-foreground);width:100%}.card__content{padding:0;width:100%;box-sizing:border-box}.card__footer{display:flex;align-items:center;padding:1.5rem;padding-top:0;width:100%}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }], encapsulation: i0.ViewEncapsulation.None });
|
|
581
812
|
}
|
|
582
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
813
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.11", ngImport: i0, type: CardFooterComponent, decorators: [{
|
|
583
814
|
type: Component,
|
|
584
815
|
args: [{ selector: 'app-card-footer', standalone: true, imports: [CommonModule], template: `<ng-content></ng-content>`, encapsulation: ViewEncapsulation.None, styles: [".card{z-index:1;width:100%;box-sizing:border-box}.card--default{border-radius:.5rem;border:1px solid var(--border);background-color:var(--card);color:var(--card-foreground);box-shadow:#64646f33 0 7px 29px}.card--rounded{border-radius:1.5rem;background-color:var(--card);padding:.25rem .5rem;display:block}.card--shadowed{border-radius:.5rem;border:1px solid var(--border);background-color:var(--card);color:var(--card-foreground);box-shadow:#64646f33 0 7px 29px}.card__header{display:flex;flex-direction:column;gap:.375rem;padding:1.5rem;width:100%}.card__title{font-weight:600;line-height:1;letter-spacing:-.02em;width:100%}.card__description{font-size:.875rem;color:var(--muted-foreground);width:100%}.card__content{padding:0;width:100%;box-sizing:border-box}.card__footer{display:flex;align-items:center;padding:1.5rem;padding-top:0;width:100%}\n"] }]
|
|
585
816
|
}], propDecorators: { class: [{
|
|
@@ -624,10 +855,10 @@ class HelpScreenDataComponent {
|
|
|
624
855
|
handleStartChat(option) {
|
|
625
856
|
this.handleStartNewChat.emit(option);
|
|
626
857
|
}
|
|
627
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
628
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "
|
|
858
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.11", ngImport: i0, type: HelpScreenDataComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
859
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.11", type: HelpScreenDataComponent, isStandalone: true, selector: "app-help-screen-data", inputs: { helpScreenData: "helpScreenData", title: "title" }, outputs: { handleStartNewChat: "handleStartNewChat" }, ngImport: i0, template: "<div class=\"help-screen\">\n <h1 class=\"help-screen__title\">\n {{ 'PickTopicTitle' | translate }}\n </h1>\n @for (item of helpScreenData?.options; track item.id) {\n <app-card [id]=\"item.id\" variant=\"rounded\" class=\"help-screen__card\" (click)=\"toggleExpand(item.id)\">\n <app-card-content>\n <!-- Header section (always visible) -->\n <div class=\"help-screen__header\">\n <h4 class=\"help-screen__title-text\">{{ item.title }}</h4>\n <div class=\"help-screen__arrow-container\" [ngClass]=\"{\n 'help-screen__arrow-container--expanded': expandedItemId === item.id,\n 'help-screen__arrow-container--collapsed': expandedItemId !== item.id\n }\">\n <!-- <img src=\"/icons/arrow-stripped-colored.svg\" alt=\"arrow-down\" /> -->\n <svg class=\"help-screen__header__back-button-icon\" fill=\"currentColor\"\n xmlns=\"http://www.w3.org/2000/svg\">\n <path d=\"M7 15L1 8L2.5 6.25M7 1L5 3.333\" stroke=\"currentColor\" stroke-width=\"1.5\" stroke-linecap=\"round\"\n stroke-linejoin=\"round\" />\n </svg>\n </div>\n </div>\n\n <!-- Expanded content (visible only when expanded) -->\n @if (expandedItemId === item.id) {\n <div class=\"help-screen__content\">\n @for (paragraph of item.paragraphs; track paragraph) {\n <div class=\"help-screen__paragraph\">\n {{ paragraph }}\n </div>\n }\n </div>\n @if (item?.chatWithUs) {\n <footer class=\"help-screen__footer\">\n <app-button variant=\"default\" [fullWidth]=\"true\" (click)=\"handleStartChat(item)\">\n {{ 'ChatNow' | translate }}\n </app-button>\n </footer>\n }\n }\n </app-card-content>\n </app-card>\n }\n</div>", styles: ["@keyframes slideDown{0%{opacity:0;transform:translateY(-10px)}to{opacity:1;transform:translateY(0)}}.help-screen{display:flex;flex-direction:column;gap:1rem;position:relative}.help-screen__title{font-size:2.25rem;font-weight:700;color:var(--card-foreground);margin-top:.5rem;margin-bottom:1rem;line-height:1}.help-screen__card{cursor:pointer;transition:all .3s cubic-bezier(.4,0,.2,1);transform-origin:top;background-color:var(--card)}.help-screen__card:hover{box-shadow:#64646f33 0 7px 29px;transform:translateY(-2px)}.help-screen__card.expanded{background-color:var(--secondary)}.help-screen__header{display:flex;align-items:center;justify-content:space-between;padding:.5rem}.help-screen__header__back-button-icon{width:1rem;height:1rem}.help-screen__title-text{font-size:.875rem;color:var(--card-foreground);font-weight:500}.help-screen__arrow-container{display:flex;align-items:center;justify-content:center;width:1.5rem;height:1.5rem;border-radius:9999px;color:var(--babylai-primary-color, #ad49e1);transition:transform .3s cubic-bezier(.4,0,.2,1)}.help-screen__arrow-container--expanded{transform:rotate(90deg)}.help-screen__arrow-container--collapsed{transform:rotate(270deg)}.help-screen__arrow-container img{width:.75rem;height:.75rem}.help-screen__content{animation:slideDown .3s cubic-bezier(.4,0,.2,1);display:flex;flex-direction:column;gap:.5rem;padding:0 1.5rem 1.5rem;transform-origin:top}.help-screen__paragraph{font-size:1rem;color:var(--card-foreground)}.help-screen__footer{font-size:.75rem;padding:0 1.5rem 1.5rem}.help-screen__button{width:100%;margin-top:.5rem;animation:slideDown .3s cubic-bezier(.4,0,.2,1) .1s}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "component", type: CardComponent, selector: "app-card", inputs: ["variant", "class"] }, { kind: "component", type: CardContentComponent, selector: "app-card-content", inputs: ["class"] }, { kind: "component", type: ButtonComponent, selector: "app-button", inputs: ["variant", "type", "disabled", "fullWidth", "className", "size", "direction"], outputs: ["onClick"] }, { kind: "pipe", type: TranslatePipe, name: "translate" }] });
|
|
629
860
|
}
|
|
630
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
861
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.11", ngImport: i0, type: HelpScreenDataComponent, decorators: [{
|
|
631
862
|
type: Component,
|
|
632
863
|
args: [{ selector: 'app-help-screen-data', standalone: true, imports: [CommonModule, CardComponent, CardContentComponent, ButtonComponent, TranslatePipe], template: "<div class=\"help-screen\">\n <h1 class=\"help-screen__title\">\n {{ 'PickTopicTitle' | translate }}\n </h1>\n @for (item of helpScreenData?.options; track item.id) {\n <app-card [id]=\"item.id\" variant=\"rounded\" class=\"help-screen__card\" (click)=\"toggleExpand(item.id)\">\n <app-card-content>\n <!-- Header section (always visible) -->\n <div class=\"help-screen__header\">\n <h4 class=\"help-screen__title-text\">{{ item.title }}</h4>\n <div class=\"help-screen__arrow-container\" [ngClass]=\"{\n 'help-screen__arrow-container--expanded': expandedItemId === item.id,\n 'help-screen__arrow-container--collapsed': expandedItemId !== item.id\n }\">\n <!-- <img src=\"/icons/arrow-stripped-colored.svg\" alt=\"arrow-down\" /> -->\n <svg class=\"help-screen__header__back-button-icon\" fill=\"currentColor\"\n xmlns=\"http://www.w3.org/2000/svg\">\n <path d=\"M7 15L1 8L2.5 6.25M7 1L5 3.333\" stroke=\"currentColor\" stroke-width=\"1.5\" stroke-linecap=\"round\"\n stroke-linejoin=\"round\" />\n </svg>\n </div>\n </div>\n\n <!-- Expanded content (visible only when expanded) -->\n @if (expandedItemId === item.id) {\n <div class=\"help-screen__content\">\n @for (paragraph of item.paragraphs; track paragraph) {\n <div class=\"help-screen__paragraph\">\n {{ paragraph }}\n </div>\n }\n </div>\n @if (item?.chatWithUs) {\n <footer class=\"help-screen__footer\">\n <app-button variant=\"default\" [fullWidth]=\"true\" (click)=\"handleStartChat(item)\">\n {{ 'ChatNow' | translate }}\n </app-button>\n </footer>\n }\n }\n </app-card-content>\n </app-card>\n }\n</div>", styles: ["@keyframes slideDown{0%{opacity:0;transform:translateY(-10px)}to{opacity:1;transform:translateY(0)}}.help-screen{display:flex;flex-direction:column;gap:1rem;position:relative}.help-screen__title{font-size:2.25rem;font-weight:700;color:var(--card-foreground);margin-top:.5rem;margin-bottom:1rem;line-height:1}.help-screen__card{cursor:pointer;transition:all .3s cubic-bezier(.4,0,.2,1);transform-origin:top;background-color:var(--card)}.help-screen__card:hover{box-shadow:#64646f33 0 7px 29px;transform:translateY(-2px)}.help-screen__card.expanded{background-color:var(--secondary)}.help-screen__header{display:flex;align-items:center;justify-content:space-between;padding:.5rem}.help-screen__header__back-button-icon{width:1rem;height:1rem}.help-screen__title-text{font-size:.875rem;color:var(--card-foreground);font-weight:500}.help-screen__arrow-container{display:flex;align-items:center;justify-content:center;width:1.5rem;height:1.5rem;border-radius:9999px;color:var(--babylai-primary-color, #ad49e1);transition:transform .3s cubic-bezier(.4,0,.2,1)}.help-screen__arrow-container--expanded{transform:rotate(90deg)}.help-screen__arrow-container--collapsed{transform:rotate(270deg)}.help-screen__arrow-container img{width:.75rem;height:.75rem}.help-screen__content{animation:slideDown .3s cubic-bezier(.4,0,.2,1);display:flex;flex-direction:column;gap:.5rem;padding:0 1.5rem 1.5rem;transform-origin:top}.help-screen__paragraph{font-size:1rem;color:var(--card-foreground)}.help-screen__footer{font-size:.75rem;padding:0 1.5rem 1.5rem}.help-screen__button{width:100%;margin-top:.5rem;animation:slideDown .3s cubic-bezier(.4,0,.2,1) .1s}\n"] }]
|
|
633
864
|
}], propDecorators: { helpScreenData: [{
|
|
@@ -640,14 +871,14 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.1", ngImpor
|
|
|
640
871
|
|
|
641
872
|
class LoadingComponent {
|
|
642
873
|
variant = 'default';
|
|
643
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
644
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "
|
|
874
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.11", ngImport: i0, type: LoadingComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
875
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.11", type: LoadingComponent, isStandalone: true, selector: "app-loading", inputs: { variant: "variant" }, ngImport: i0, template: `
|
|
645
876
|
<div class="loading">
|
|
646
877
|
<div class="loader" [class.loader--primary]="variant === 'primary'"></div>
|
|
647
878
|
</div>
|
|
648
879
|
`, isInline: true, styles: [".loading{display:flex;flex-direction:column;align-items:center;justify-content:center;width:100%;height:100%;padding:4rem 0}@media (min-width: breakpoint(\"md\")){.loading{padding:7rem 0}}.loading__logo{width:5rem;height:5rem}.loader{width:50px;aspect-ratio:1;display:grid;border:4px solid rgba(0,0,0,0);border-radius:50%;border-right-color:#fff;animation:l15 1s infinite linear}.loader:before,.loader:after{content:\"\";grid-area:1/1;margin:2px;border:inherit;border-radius:50%;animation:l15 2s infinite}.loader:after{margin:8px;animation-duration:3s}.loader--primary{border-right-color:var(--babylai-primary-color, #ad49e1)}.loader--primary:before,.loader--primary:after{border-right-color:var(--babylai-primary-color, #ad49e1)}@keyframes l15{to{transform:rotate(1turn)}}\n"] });
|
|
649
880
|
}
|
|
650
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
881
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.11", ngImport: i0, type: LoadingComponent, decorators: [{
|
|
651
882
|
type: Component,
|
|
652
883
|
args: [{ selector: 'app-loading', template: `
|
|
653
884
|
<div class="loading">
|
|
@@ -693,8 +924,8 @@ class MarkdownRendererComponent {
|
|
|
693
924
|
}
|
|
694
925
|
}
|
|
695
926
|
}
|
|
696
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
697
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "
|
|
927
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.11", ngImport: i0, type: MarkdownRendererComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
928
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.11", type: MarkdownRendererComponent, isStandalone: true, selector: "app-markdown-renderer", inputs: { content: "content", inline: "inline", cssClass: "cssClass", dir: "dir" }, viewQueries: [{ propertyName: "markdownContainer", first: true, predicate: ["markdownContainer"], descendants: true }], ngImport: i0, template: `
|
|
698
929
|
<div
|
|
699
930
|
#markdownContainer
|
|
700
931
|
[class]="cssClass"
|
|
@@ -703,7 +934,7 @@ class MarkdownRendererComponent {
|
|
|
703
934
|
></div>
|
|
704
935
|
`, isInline: true, dependencies: [{ kind: "ngmodule", type: CommonModule }] });
|
|
705
936
|
}
|
|
706
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
937
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.11", ngImport: i0, type: MarkdownRendererComponent, decorators: [{
|
|
707
938
|
type: Component,
|
|
708
939
|
args: [{ selector: 'app-markdown-renderer', standalone: true, imports: [CommonModule], template: `
|
|
709
940
|
<div
|
|
@@ -730,10 +961,10 @@ class ChatAvatarComponent {
|
|
|
730
961
|
senderType = 1;
|
|
731
962
|
needsAgent = false;
|
|
732
963
|
isHidden = false;
|
|
733
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
734
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "
|
|
964
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.11", ngImport: i0, type: ChatAvatarComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
965
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.11", type: ChatAvatarComponent, isStandalone: true, selector: "app-chat-avatar", inputs: { senderType: "senderType", needsAgent: "needsAgent", isHidden: "isHidden" }, ngImport: i0, template: "<div\n class=\"chat__avatar\"\n [class.chat__avatar--hidden]=\"isHidden\"\n>\n @if (senderType === 3) {\n <span class=\"chat__avatar-wrapper chat__avatar-wrapper--assistant\">\n <svg\n class=\"chat__avatar-image\"\n viewBox=\"0 0 55 53\"\n fill=\"currentColor\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <path\n d=\"M8.53125 19.1353C8.53125 12.2804 14.0883 6.72339 20.9432 6.72339H41.6298C48.4847 6.72339 54.0418 12.2804 54.0418 19.1353V52.2339H20.9432C14.0883 52.2339 8.53125 46.6769 8.53125 39.8219V19.1353Z\"\n fill=\"#E5E5E5\"\n />\n <path\n d=\"M0 12.412C0 5.55702 5.55702 0 12.412 0H33.0985C39.9535 0 45.5105 5.55702 45.5105 12.412V33.0985C45.5105 39.9535 39.9535 45.5105 33.0985 45.5105H0V12.412Z\"\n fill=\"white\"\n />\n <path\n d=\"M14.3684 15.2203C14.3696 15.2162 14.3701 15.2142 14.3704 15.2132C14.5505 14.5816 15.4457 14.5816 15.6258 15.2132C15.6261 15.2142 15.6267 15.2162 15.6278 15.2203C15.6309 15.2311 15.6324 15.2365 15.6338 15.2416C16.4708 18.1971 18.7808 20.5071 21.7364 21.3441C21.7414 21.3455 21.7468 21.3471 21.7576 21.3501C21.7617 21.3512 21.7637 21.3518 21.7647 21.3521C22.3963 21.5322 22.3963 22.4274 21.7647 22.6075C21.7637 22.6078 21.7617 22.6084 21.7576 22.6095C21.7468 22.6126 21.7414 22.6141 21.7364 22.6155C18.7808 23.4525 16.4708 25.7625 15.6338 28.7181C15.6324 28.7231 15.6309 28.7285 15.6278 28.7393C15.6267 28.7434 15.6261 28.7454 15.6258 28.7464C15.4457 29.378 14.5505 29.378 14.3704 28.7464C14.3701 28.7454 14.3696 28.7434 14.3684 28.7393C14.3654 28.7285 14.3638 28.7231 14.3624 28.7181C13.5254 25.7625 11.2154 23.4525 8.25988 22.6155C8.25481 22.6141 8.24942 22.6126 8.23864 22.6095C8.23454 22.6084 8.2325 22.6078 8.23155 22.6075C7.5999 22.4274 7.5999 21.5322 8.23155 21.3521C8.2325 21.3518 8.23454 21.3512 8.23864 21.3501C8.24942 21.3471 8.25481 21.3455 8.25988 21.3441C11.2154 20.5071 13.5254 18.1971 14.3624 15.2416C14.3638 15.2365 14.3654 15.2311 14.3684 15.2203Z\"\n fill=\"currentColor\"\n />\n <path\n d=\"M36.7198 21.8503C36.7198 24.9207 34.2886 27.4098 31.2896 27.4098C28.2906 27.4098 25.8594 24.9207 25.8594 21.8503C25.8594 18.7799 28.2906 16.2908 31.2896 16.2908C34.2886 16.2908 36.7198 18.7799 36.7198 21.8503Z\"\n fill=\"currentColor\"\n />\n </svg>\n </span>\n } @else if (needsAgent || senderType === 2) {\n <span class=\"chat__avatar-wrapper chat__avatar-wrapper--agent\">\n <svg\n class=\"chat__avatar-image\"\n viewBox=\"0 0 12 14\"\n fill=\"currentColor\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <path\n d=\"M5.99479 5.66658C7.46755 5.66658 8.66146 4.47268 8.66146 2.99992C8.66146 1.52716 7.46755 0.333252 5.99479 0.333252C4.52203 0.333252 3.32812 1.52716 3.32812 2.99992C3.32812 4.47268 4.52203 5.66658 5.99479 5.66658Z\"\n fill=\"currentColor\"\n />\n <path\n d=\"M11.3307 10.6665C11.3307 12.3232 11.3307 13.6665 5.9974 13.6665C0.664062 13.6665 0.664062 12.3232 0.664062 10.6665C0.664062 9.00984 3.05206 7.6665 5.9974 7.6665C8.94273 7.6665 11.3307 9.00984 11.3307 10.6665Z\"\n fill=\"currentColor\"\n />\n </svg>\n </span>\n }\n</div>\n", styles: [".chat__avatar--hidden{visibility:hidden}.chat__avatar-wrapper{display:flex;align-items:center;justify-content:center;width:2rem;height:2rem;border-radius:9999px;padding:.5rem}.chat__avatar-wrapper--assistant{background-color:var(--babylai-primary-color, #ad49e1)}.chat__avatar-wrapper--agent{background-color:var(--black-white-50)}.chat__avatar-image{width:100%;color:var(--babylai-primary-color-500, #ad49e1)}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }] });
|
|
735
966
|
}
|
|
736
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
967
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.11", ngImport: i0, type: ChatAvatarComponent, decorators: [{
|
|
737
968
|
type: Component,
|
|
738
969
|
args: [{ selector: 'app-chat-avatar', standalone: true, imports: [CommonModule], template: "<div\n class=\"chat__avatar\"\n [class.chat__avatar--hidden]=\"isHidden\"\n>\n @if (senderType === 3) {\n <span class=\"chat__avatar-wrapper chat__avatar-wrapper--assistant\">\n <svg\n class=\"chat__avatar-image\"\n viewBox=\"0 0 55 53\"\n fill=\"currentColor\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <path\n d=\"M8.53125 19.1353C8.53125 12.2804 14.0883 6.72339 20.9432 6.72339H41.6298C48.4847 6.72339 54.0418 12.2804 54.0418 19.1353V52.2339H20.9432C14.0883 52.2339 8.53125 46.6769 8.53125 39.8219V19.1353Z\"\n fill=\"#E5E5E5\"\n />\n <path\n d=\"M0 12.412C0 5.55702 5.55702 0 12.412 0H33.0985C39.9535 0 45.5105 5.55702 45.5105 12.412V33.0985C45.5105 39.9535 39.9535 45.5105 33.0985 45.5105H0V12.412Z\"\n fill=\"white\"\n />\n <path\n d=\"M14.3684 15.2203C14.3696 15.2162 14.3701 15.2142 14.3704 15.2132C14.5505 14.5816 15.4457 14.5816 15.6258 15.2132C15.6261 15.2142 15.6267 15.2162 15.6278 15.2203C15.6309 15.2311 15.6324 15.2365 15.6338 15.2416C16.4708 18.1971 18.7808 20.5071 21.7364 21.3441C21.7414 21.3455 21.7468 21.3471 21.7576 21.3501C21.7617 21.3512 21.7637 21.3518 21.7647 21.3521C22.3963 21.5322 22.3963 22.4274 21.7647 22.6075C21.7637 22.6078 21.7617 22.6084 21.7576 22.6095C21.7468 22.6126 21.7414 22.6141 21.7364 22.6155C18.7808 23.4525 16.4708 25.7625 15.6338 28.7181C15.6324 28.7231 15.6309 28.7285 15.6278 28.7393C15.6267 28.7434 15.6261 28.7454 15.6258 28.7464C15.4457 29.378 14.5505 29.378 14.3704 28.7464C14.3701 28.7454 14.3696 28.7434 14.3684 28.7393C14.3654 28.7285 14.3638 28.7231 14.3624 28.7181C13.5254 25.7625 11.2154 23.4525 8.25988 22.6155C8.25481 22.6141 8.24942 22.6126 8.23864 22.6095C8.23454 22.6084 8.2325 22.6078 8.23155 22.6075C7.5999 22.4274 7.5999 21.5322 8.23155 21.3521C8.2325 21.3518 8.23454 21.3512 8.23864 21.3501C8.24942 21.3471 8.25481 21.3455 8.25988 21.3441C11.2154 20.5071 13.5254 18.1971 14.3624 15.2416C14.3638 15.2365 14.3654 15.2311 14.3684 15.2203Z\"\n fill=\"currentColor\"\n />\n <path\n d=\"M36.7198 21.8503C36.7198 24.9207 34.2886 27.4098 31.2896 27.4098C28.2906 27.4098 25.8594 24.9207 25.8594 21.8503C25.8594 18.7799 28.2906 16.2908 31.2896 16.2908C34.2886 16.2908 36.7198 18.7799 36.7198 21.8503Z\"\n fill=\"currentColor\"\n />\n </svg>\n </span>\n } @else if (needsAgent || senderType === 2) {\n <span class=\"chat__avatar-wrapper chat__avatar-wrapper--agent\">\n <svg\n class=\"chat__avatar-image\"\n viewBox=\"0 0 12 14\"\n fill=\"currentColor\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <path\n d=\"M5.99479 5.66658C7.46755 5.66658 8.66146 4.47268 8.66146 2.99992C8.66146 1.52716 7.46755 0.333252 5.99479 0.333252C4.52203 0.333252 3.32812 1.52716 3.32812 2.99992C3.32812 4.47268 4.52203 5.66658 5.99479 5.66658Z\"\n fill=\"currentColor\"\n />\n <path\n d=\"M11.3307 10.6665C11.3307 12.3232 11.3307 13.6665 5.9974 13.6665C0.664062 13.6665 0.664062 12.3232 0.664062 10.6665C0.664062 9.00984 3.05206 7.6665 5.9974 7.6665C8.94273 7.6665 11.3307 9.00984 11.3307 10.6665Z\"\n fill=\"currentColor\"\n />\n </svg>\n </span>\n }\n</div>\n", styles: [".chat__avatar--hidden{visibility:hidden}.chat__avatar-wrapper{display:flex;align-items:center;justify-content:center;width:2rem;height:2rem;border-radius:9999px;padding:.5rem}.chat__avatar-wrapper--assistant{background-color:var(--babylai-primary-color, #ad49e1)}.chat__avatar-wrapper--agent{background-color:var(--black-white-50)}.chat__avatar-image{width:100%;color:var(--babylai-primary-color-500, #ad49e1)}\n"] }]
|
|
739
970
|
}], propDecorators: { senderType: [{
|
|
@@ -744,18 +975,199 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.1", ngImpor
|
|
|
744
975
|
type: Input
|
|
745
976
|
}] } });
|
|
746
977
|
|
|
978
|
+
class ImageAttachmentComponent {
|
|
979
|
+
fileId = '';
|
|
980
|
+
enablePreview = true;
|
|
981
|
+
className = '';
|
|
982
|
+
imageClick = new EventEmitter();
|
|
983
|
+
fileUploadService = inject(FileUploadService);
|
|
984
|
+
imageUrl = signal(null);
|
|
985
|
+
isLoading = signal(true);
|
|
986
|
+
hasError = signal(false);
|
|
987
|
+
ngOnInit() {
|
|
988
|
+
if (this.fileId) {
|
|
989
|
+
this.loadImage();
|
|
990
|
+
}
|
|
991
|
+
}
|
|
992
|
+
ngOnDestroy() {
|
|
993
|
+
// Clean up object URL if created
|
|
994
|
+
const url = this.imageUrl();
|
|
995
|
+
if (url && url.startsWith('blob:')) {
|
|
996
|
+
URL.revokeObjectURL(url);
|
|
997
|
+
}
|
|
998
|
+
}
|
|
999
|
+
loadImage() {
|
|
1000
|
+
this.isLoading.set(true);
|
|
1001
|
+
this.hasError.set(false);
|
|
1002
|
+
this.fileUploadService
|
|
1003
|
+
.presignDownload(this.fileId)
|
|
1004
|
+
.pipe(catchError$1((error) => {
|
|
1005
|
+
console.error('Error loading image:', error);
|
|
1006
|
+
this.hasError.set(true);
|
|
1007
|
+
this.isLoading.set(false);
|
|
1008
|
+
return of(null);
|
|
1009
|
+
}))
|
|
1010
|
+
.subscribe((response) => {
|
|
1011
|
+
if (response?.downloadUrl) {
|
|
1012
|
+
this.imageUrl.set(response.downloadUrl);
|
|
1013
|
+
this.isLoading.set(false);
|
|
1014
|
+
}
|
|
1015
|
+
else {
|
|
1016
|
+
this.hasError.set(true);
|
|
1017
|
+
this.isLoading.set(false);
|
|
1018
|
+
}
|
|
1019
|
+
});
|
|
1020
|
+
}
|
|
1021
|
+
handleClick() {
|
|
1022
|
+
if (this.enablePreview && this.imageUrl()) {
|
|
1023
|
+
this.imageClick.emit();
|
|
1024
|
+
}
|
|
1025
|
+
}
|
|
1026
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.11", ngImport: i0, type: ImageAttachmentComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1027
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.11", type: ImageAttachmentComponent, isStandalone: true, selector: "app-image-attachment", inputs: { fileId: "fileId", enablePreview: "enablePreview", className: "className" }, outputs: { imageClick: "imageClick" }, ngImport: i0, template: "<div\n class=\"image-attachment\"\n [class]=\"className\"\n (click)=\"handleClick()\"\n [class.image-attachment--clickable]=\"enablePreview && imageUrl()\"\n>\n @if (isLoading()) {\n <div class=\"image-attachment__loading\">...</div>\n } @else if (hasError()) {\n <div class=\"image-attachment__error\">!</div>\n } @else if (imageUrl()) {\n <img\n [src]=\"imageUrl()!\"\n [alt]=\"'Image attachment'\"\n class=\"image-attachment__image\"\n loading=\"lazy\"\n />\n }\n</div>\n\n", styles: [".image-attachment{display:inline-flex;align-items:center;justify-content:center;width:50px;height:50px;border-radius:calc(var(--radius) - 2px);overflow:hidden;background-color:var(--muted);flex-shrink:0}.image-attachment--clickable{cursor:pointer;transition:opacity .2s ease-in-out}.image-attachment--clickable:hover{opacity:.8}.image-attachment__image{width:100%;height:100%;object-fit:cover;display:block}.image-attachment__loading{font-size:.875rem;color:var(--muted-foreground)}.image-attachment__error{font-size:.875rem;color:var(--destructive);font-weight:600}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }] });
|
|
1028
|
+
}
|
|
1029
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.11", ngImport: i0, type: ImageAttachmentComponent, decorators: [{
|
|
1030
|
+
type: Component,
|
|
1031
|
+
args: [{ selector: 'app-image-attachment', standalone: true, imports: [CommonModule], template: "<div\n class=\"image-attachment\"\n [class]=\"className\"\n (click)=\"handleClick()\"\n [class.image-attachment--clickable]=\"enablePreview && imageUrl()\"\n>\n @if (isLoading()) {\n <div class=\"image-attachment__loading\">...</div>\n } @else if (hasError()) {\n <div class=\"image-attachment__error\">!</div>\n } @else if (imageUrl()) {\n <img\n [src]=\"imageUrl()!\"\n [alt]=\"'Image attachment'\"\n class=\"image-attachment__image\"\n loading=\"lazy\"\n />\n }\n</div>\n\n", styles: [".image-attachment{display:inline-flex;align-items:center;justify-content:center;width:50px;height:50px;border-radius:calc(var(--radius) - 2px);overflow:hidden;background-color:var(--muted);flex-shrink:0}.image-attachment--clickable{cursor:pointer;transition:opacity .2s ease-in-out}.image-attachment--clickable:hover{opacity:.8}.image-attachment__image{width:100%;height:100%;object-fit:cover;display:block}.image-attachment__loading{font-size:.875rem;color:var(--muted-foreground)}.image-attachment__error{font-size:.875rem;color:var(--destructive);font-weight:600}\n"] }]
|
|
1032
|
+
}], propDecorators: { fileId: [{
|
|
1033
|
+
type: Input
|
|
1034
|
+
}], enablePreview: [{
|
|
1035
|
+
type: Input
|
|
1036
|
+
}], className: [{
|
|
1037
|
+
type: Input
|
|
1038
|
+
}], imageClick: [{
|
|
1039
|
+
type: Output
|
|
1040
|
+
}] } });
|
|
1041
|
+
|
|
1042
|
+
class ImagePreviewDialogComponent {
|
|
1043
|
+
imageUrls = [];
|
|
1044
|
+
initialIndex = 0;
|
|
1045
|
+
isOpen = false;
|
|
1046
|
+
close = new EventEmitter();
|
|
1047
|
+
currentIndex = signal(0);
|
|
1048
|
+
currentImageUrl = computed(() => {
|
|
1049
|
+
const index = this.currentIndex();
|
|
1050
|
+
return this.imageUrls[index] || null;
|
|
1051
|
+
});
|
|
1052
|
+
imageCounter = computed(() => {
|
|
1053
|
+
return `${this.currentIndex() + 1} / ${this.imageUrls.length}`;
|
|
1054
|
+
});
|
|
1055
|
+
hasMultipleImages = computed(() => this.imageUrls.length > 1);
|
|
1056
|
+
canGoPrevious = computed(() => this.currentIndex() > 0);
|
|
1057
|
+
canGoNext = computed(() => this.currentIndex() < this.imageUrls.length - 1);
|
|
1058
|
+
ngOnInit() {
|
|
1059
|
+
this.currentIndex.set(this.initialIndex);
|
|
1060
|
+
}
|
|
1061
|
+
ngOnChanges(changes) {
|
|
1062
|
+
if (changes['initialIndex'] && this.isOpen) {
|
|
1063
|
+
this.currentIndex.set(this.initialIndex);
|
|
1064
|
+
}
|
|
1065
|
+
if (changes['isOpen'] && this.isOpen) {
|
|
1066
|
+
this.currentIndex.set(this.initialIndex);
|
|
1067
|
+
}
|
|
1068
|
+
}
|
|
1069
|
+
handleEscapeKey(event) {
|
|
1070
|
+
if (this.isOpen) {
|
|
1071
|
+
this.handleClose();
|
|
1072
|
+
}
|
|
1073
|
+
}
|
|
1074
|
+
handleArrowLeft(event) {
|
|
1075
|
+
if (this.isOpen) {
|
|
1076
|
+
event.preventDefault();
|
|
1077
|
+
this.handlePrevious();
|
|
1078
|
+
}
|
|
1079
|
+
}
|
|
1080
|
+
handleArrowRight(event) {
|
|
1081
|
+
if (this.isOpen) {
|
|
1082
|
+
event.preventDefault();
|
|
1083
|
+
this.handleNext();
|
|
1084
|
+
}
|
|
1085
|
+
}
|
|
1086
|
+
handleClose() {
|
|
1087
|
+
this.close.emit();
|
|
1088
|
+
}
|
|
1089
|
+
handleBackdropClick(event) {
|
|
1090
|
+
// Close if clicking on the backdrop (not the image)
|
|
1091
|
+
if (event.target.classList.contains('image-preview-dialog__backdrop')) {
|
|
1092
|
+
this.handleClose();
|
|
1093
|
+
}
|
|
1094
|
+
}
|
|
1095
|
+
handlePrevious() {
|
|
1096
|
+
if (this.canGoPrevious()) {
|
|
1097
|
+
this.currentIndex.update((index) => index - 1);
|
|
1098
|
+
}
|
|
1099
|
+
}
|
|
1100
|
+
handleNext() {
|
|
1101
|
+
if (this.canGoNext()) {
|
|
1102
|
+
this.currentIndex.update((index) => index + 1);
|
|
1103
|
+
}
|
|
1104
|
+
}
|
|
1105
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.11", ngImport: i0, type: ImagePreviewDialogComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1106
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.11", type: ImagePreviewDialogComponent, isStandalone: true, selector: "app-image-preview-dialog", inputs: { imageUrls: "imageUrls", initialIndex: "initialIndex", isOpen: "isOpen" }, outputs: { close: "close" }, host: { listeners: { "document:keydown.escape": "handleEscapeKey($event)", "document:keydown.arrowleft": "handleArrowLeft($event)", "document:keydown.arrowright": "handleArrowRight($event)" } }, usesOnChanges: true, ngImport: i0, template: "@if (isOpen) {\n <div\n class=\"image-preview-dialog__backdrop\"\n (click)=\"handleBackdropClick($event)\"\n >\n <div class=\"image-preview-dialog__container\">\n <button\n class=\"image-preview-dialog__close\"\n (click)=\"handleClose()\"\n type=\"button\"\n aria-label=\"Close preview\"\n >\n <svg\n width=\"24\"\n height=\"24\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <path\n d=\"M18 6L6 18M6 6L18 18\"\n stroke=\"currentColor\"\n stroke-width=\"2\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n />\n </svg>\n </button>\n\n @if (hasMultipleImages()) {\n <button\n class=\"image-preview-dialog__nav image-preview-dialog__nav--previous\"\n [class.image-preview-dialog__nav--disabled]=\"!canGoPrevious()\"\n (click)=\"handlePrevious()\"\n type=\"button\"\n aria-label=\"Previous image\"\n [disabled]=\"!canGoPrevious()\"\n >\n <svg\n width=\"24\"\n height=\"24\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <path\n d=\"M15 18L9 12L15 6\"\n stroke=\"currentColor\"\n stroke-width=\"2\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n />\n </svg>\n </button>\n\n <button\n class=\"image-preview-dialog__nav image-preview-dialog__nav--next\"\n [class.image-preview-dialog__nav--disabled]=\"!canGoNext()\"\n (click)=\"handleNext()\"\n type=\"button\"\n aria-label=\"Next image\"\n [disabled]=\"!canGoNext()\"\n >\n <svg\n width=\"24\"\n height=\"24\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <path\n d=\"M9 18L15 12L9 6\"\n stroke=\"currentColor\"\n stroke-width=\"2\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n />\n </svg>\n </button>\n }\n\n <div class=\"image-preview-dialog__image-container\">\n @if (currentImageUrl()) {\n <img\n [src]=\"currentImageUrl()!\"\n [alt]=\"'Image preview'\"\n class=\"image-preview-dialog__image\"\n />\n }\n </div>\n\n @if (hasMultipleImages()) {\n <div class=\"image-preview-dialog__counter\">\n {{ imageCounter() }}\n </div>\n }\n </div>\n </div>\n}\n\n", styles: [".image-preview-dialog__backdrop{position:fixed;inset:0;background-color:#000000e6;display:flex;align-items:center;justify-content:center;z-index:9999;padding:1rem}.image-preview-dialog__container{position:relative;width:100%;height:100%;display:flex;align-items:center;justify-content:center;max-width:90vw;max-height:90vh;z-index:1}.image-preview-dialog__close{position:absolute;top:1rem;inset-inline-end:1rem;z-index:10001;width:2.5rem;height:2.5rem;display:flex;align-items:center;justify-content:center;border-radius:9999px;background-color:#ffffff1a;border:1px solid rgba(255,255,255,.2);color:#fff;cursor:pointer;transition:all .2s ease-in-out;pointer-events:auto}.image-preview-dialog__close:hover{background-color:#fff3;transform:scale(1.1)}.image-preview-dialog__close svg{width:1.5rem;height:1.5rem;pointer-events:none}.image-preview-dialog__nav{position:absolute;top:50%;transform:translateY(-50%);z-index:10001;width:3rem;height:3rem;display:flex;align-items:center;justify-content:center;border-radius:9999px;background-color:#ffffff1a;border:1px solid rgba(255,255,255,.2);color:#fff;cursor:pointer;transition:all .2s ease-in-out;pointer-events:auto}.image-preview-dialog__nav:hover:not(.image-preview-dialog__nav--disabled){background-color:#fff3;transform:translateY(-50%) scale(1.1)}.image-preview-dialog__nav--disabled{opacity:.3;cursor:not-allowed}.image-preview-dialog__nav--previous{inset-inline-start:1rem}.image-preview-dialog__nav--next{inset-inline-end:1rem}.image-preview-dialog__nav svg{width:1.5rem;height:1.5rem;pointer-events:none}.image-preview-dialog__image-container{position:relative;width:100%;height:100%;display:flex;align-items:center;justify-content:center;overflow:hidden;z-index:1}.image-preview-dialog__image{max-width:100%;max-height:100%;object-fit:contain;border-radius:calc(var(--radius) - 2px);pointer-events:none}.image-preview-dialog__counter{position:absolute;bottom:1rem;left:50%;transform:translate(-50%);padding:.5rem 1rem;background-color:#0009;color:#fff;border-radius:9999px;font-size:.875rem;font-weight:500;z-index:10001;pointer-events:none}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }] });
|
|
1107
|
+
}
|
|
1108
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.11", ngImport: i0, type: ImagePreviewDialogComponent, decorators: [{
|
|
1109
|
+
type: Component,
|
|
1110
|
+
args: [{ selector: 'app-image-preview-dialog', standalone: true, imports: [CommonModule], template: "@if (isOpen) {\n <div\n class=\"image-preview-dialog__backdrop\"\n (click)=\"handleBackdropClick($event)\"\n >\n <div class=\"image-preview-dialog__container\">\n <button\n class=\"image-preview-dialog__close\"\n (click)=\"handleClose()\"\n type=\"button\"\n aria-label=\"Close preview\"\n >\n <svg\n width=\"24\"\n height=\"24\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <path\n d=\"M18 6L6 18M6 6L18 18\"\n stroke=\"currentColor\"\n stroke-width=\"2\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n />\n </svg>\n </button>\n\n @if (hasMultipleImages()) {\n <button\n class=\"image-preview-dialog__nav image-preview-dialog__nav--previous\"\n [class.image-preview-dialog__nav--disabled]=\"!canGoPrevious()\"\n (click)=\"handlePrevious()\"\n type=\"button\"\n aria-label=\"Previous image\"\n [disabled]=\"!canGoPrevious()\"\n >\n <svg\n width=\"24\"\n height=\"24\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <path\n d=\"M15 18L9 12L15 6\"\n stroke=\"currentColor\"\n stroke-width=\"2\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n />\n </svg>\n </button>\n\n <button\n class=\"image-preview-dialog__nav image-preview-dialog__nav--next\"\n [class.image-preview-dialog__nav--disabled]=\"!canGoNext()\"\n (click)=\"handleNext()\"\n type=\"button\"\n aria-label=\"Next image\"\n [disabled]=\"!canGoNext()\"\n >\n <svg\n width=\"24\"\n height=\"24\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <path\n d=\"M9 18L15 12L9 6\"\n stroke=\"currentColor\"\n stroke-width=\"2\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n />\n </svg>\n </button>\n }\n\n <div class=\"image-preview-dialog__image-container\">\n @if (currentImageUrl()) {\n <img\n [src]=\"currentImageUrl()!\"\n [alt]=\"'Image preview'\"\n class=\"image-preview-dialog__image\"\n />\n }\n </div>\n\n @if (hasMultipleImages()) {\n <div class=\"image-preview-dialog__counter\">\n {{ imageCounter() }}\n </div>\n }\n </div>\n </div>\n}\n\n", styles: [".image-preview-dialog__backdrop{position:fixed;inset:0;background-color:#000000e6;display:flex;align-items:center;justify-content:center;z-index:9999;padding:1rem}.image-preview-dialog__container{position:relative;width:100%;height:100%;display:flex;align-items:center;justify-content:center;max-width:90vw;max-height:90vh;z-index:1}.image-preview-dialog__close{position:absolute;top:1rem;inset-inline-end:1rem;z-index:10001;width:2.5rem;height:2.5rem;display:flex;align-items:center;justify-content:center;border-radius:9999px;background-color:#ffffff1a;border:1px solid rgba(255,255,255,.2);color:#fff;cursor:pointer;transition:all .2s ease-in-out;pointer-events:auto}.image-preview-dialog__close:hover{background-color:#fff3;transform:scale(1.1)}.image-preview-dialog__close svg{width:1.5rem;height:1.5rem;pointer-events:none}.image-preview-dialog__nav{position:absolute;top:50%;transform:translateY(-50%);z-index:10001;width:3rem;height:3rem;display:flex;align-items:center;justify-content:center;border-radius:9999px;background-color:#ffffff1a;border:1px solid rgba(255,255,255,.2);color:#fff;cursor:pointer;transition:all .2s ease-in-out;pointer-events:auto}.image-preview-dialog__nav:hover:not(.image-preview-dialog__nav--disabled){background-color:#fff3;transform:translateY(-50%) scale(1.1)}.image-preview-dialog__nav--disabled{opacity:.3;cursor:not-allowed}.image-preview-dialog__nav--previous{inset-inline-start:1rem}.image-preview-dialog__nav--next{inset-inline-end:1rem}.image-preview-dialog__nav svg{width:1.5rem;height:1.5rem;pointer-events:none}.image-preview-dialog__image-container{position:relative;width:100%;height:100%;display:flex;align-items:center;justify-content:center;overflow:hidden;z-index:1}.image-preview-dialog__image{max-width:100%;max-height:100%;object-fit:contain;border-radius:calc(var(--radius) - 2px);pointer-events:none}.image-preview-dialog__counter{position:absolute;bottom:1rem;left:50%;transform:translate(-50%);padding:.5rem 1rem;background-color:#0009;color:#fff;border-radius:9999px;font-size:.875rem;font-weight:500;z-index:10001;pointer-events:none}\n"] }]
|
|
1111
|
+
}], propDecorators: { imageUrls: [{
|
|
1112
|
+
type: Input
|
|
1113
|
+
}], initialIndex: [{
|
|
1114
|
+
type: Input
|
|
1115
|
+
}], isOpen: [{
|
|
1116
|
+
type: Input
|
|
1117
|
+
}], close: [{
|
|
1118
|
+
type: Output
|
|
1119
|
+
}], handleEscapeKey: [{
|
|
1120
|
+
type: HostListener,
|
|
1121
|
+
args: ['document:keydown.escape', ['$event']]
|
|
1122
|
+
}], handleArrowLeft: [{
|
|
1123
|
+
type: HostListener,
|
|
1124
|
+
args: ['document:keydown.arrowleft', ['$event']]
|
|
1125
|
+
}], handleArrowRight: [{
|
|
1126
|
+
type: HostListener,
|
|
1127
|
+
args: ['document:keydown.arrowright', ['$event']]
|
|
1128
|
+
}] } });
|
|
1129
|
+
|
|
747
1130
|
class ChatMessageComponent {
|
|
748
1131
|
message;
|
|
749
1132
|
needsAgent = false;
|
|
750
1133
|
currentLang = 'en';
|
|
751
1134
|
isHidden = false;
|
|
1135
|
+
fileUploadService = inject(FileUploadService);
|
|
1136
|
+
previewImageUrls = signal([]);
|
|
1137
|
+
previewImageIndex = signal(-1);
|
|
1138
|
+
isPreviewOpen = signal(false);
|
|
1139
|
+
hasAttachments = computed(() => this.message.attachmentIds !== undefined &&
|
|
1140
|
+
this.message.attachmentIds.length > 0);
|
|
752
1141
|
cleanMessageContent(content) {
|
|
753
1142
|
return content.replace(/```/g, '\\`\\`\\`');
|
|
754
1143
|
}
|
|
755
|
-
|
|
756
|
-
|
|
1144
|
+
handleImageClick(clickedIndex) {
|
|
1145
|
+
if (!this.message.attachmentIds || this.message.attachmentIds.length === 0) {
|
|
1146
|
+
return;
|
|
1147
|
+
}
|
|
1148
|
+
// Fetch all download URLs
|
|
1149
|
+
const downloadObservables = this.message.attachmentIds.map((fileId) => this.fileUploadService.presignDownload(fileId).pipe(catchError$1((error) => {
|
|
1150
|
+
console.error(`Error loading image ${fileId}:`, error);
|
|
1151
|
+
return of(null);
|
|
1152
|
+
})));
|
|
1153
|
+
forkJoin(downloadObservables).subscribe((responses) => {
|
|
1154
|
+
const urls = responses
|
|
1155
|
+
.filter((r) => r !== null)
|
|
1156
|
+
.map((r) => r.downloadUrl);
|
|
1157
|
+
this.previewImageUrls.set(urls);
|
|
1158
|
+
this.previewImageIndex.set(clickedIndex);
|
|
1159
|
+
this.isPreviewOpen.set(true);
|
|
1160
|
+
});
|
|
1161
|
+
}
|
|
1162
|
+
closePreview() {
|
|
1163
|
+
this.isPreviewOpen.set(false);
|
|
1164
|
+
this.previewImageUrls.set([]);
|
|
1165
|
+
this.previewImageIndex.set(-1);
|
|
1166
|
+
}
|
|
1167
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.11", ngImport: i0, type: ChatMessageComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1168
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.11", type: ChatMessageComponent, isStandalone: true, selector: "app-chat-message", inputs: { message: "message", needsAgent: "needsAgent", currentLang: "currentLang", isHidden: "isHidden" }, ngImport: i0, template: "<div\n class=\"chat__message-container\"\n [class.chat__message-container--user]=\"message.senderType === 1\"\n>\n <app-chat-avatar\n [senderType]=\"message.senderType\"\n [needsAgent]=\"needsAgent\"\n [isHidden]=\"isHidden\"\n />\n <app-card\n variant=\"rounded\"\n [class]=\"\n 'chat__message ' +\n (message.senderType === 1\n ? 'chat__message--user'\n : 'chat__message--assistant')\n \"\n >\n <app-card-content>\n @if (hasAttachments()) {\n <div class=\"chat__message-attachments\">\n @for (fileId of message.attachmentIds; track fileId; let i = $index) {\n <app-image-attachment\n [fileId]=\"fileId\"\n [enablePreview]=\"true\"\n (imageClick)=\"handleImageClick(i)\"\n />\n }\n </div>\n }\n <div class=\"chat__message-content\">\n <app-markdown-renderer\n [content]=\"cleanMessageContent(message.messageContent)\"\n [inline]=\"false\"\n [cssClass]=\"'prose' + (message.senderType === 1 ? ' prose-invert' : '')\"\n [dir]=\"currentLang === 'ar' ? 'rtl' : 'ltr'\"\n >\n </app-markdown-renderer>\n </div>\n </app-card-content>\n </app-card>\n</div>\n\n<app-image-preview-dialog\n [imageUrls]=\"previewImageUrls()\"\n [initialIndex]=\"previewImageIndex()\"\n [isOpen]=\"isPreviewOpen()\"\n (close)=\"closePreview()\"\n/>\n", styles: [".chat__message-container{display:flex;align-items:flex-start;gap:.75rem}.chat__message-container--user{flex-direction:row-reverse}.chat__message{max-width:80%;position:relative;border-radius:1rem;padding:1rem}.chat__message--user{align-self:flex-start;background-color:var(--babylai-primary-color, #ad49e1);color:#fff;direction:rtl}.chat__message--assistant,.chat__message--agent{align-self:flex-end;background-color:var(--card);color:var(--card-foreground);direction:rtl}.chat__message-attachments{display:flex;flex-wrap:wrap;gap:.5rem;margin-bottom:.5rem}.chat__message-content :global(.prose){max-width:none;word-break:break-words}.chat__message-content :global(.prose)>*:first-child{margin-top:0}.chat__message-content :global(.prose)>*:last-child{margin-bottom:0}.chat__message-content :global(.prose)>p,.chat__message-content :global(.prose)>ul,.chat__message-content :global(.prose)>ol,.chat__message-content :global(.prose)>blockquote{margin:.5rem 0}.chat__message-content :global(.prose).prose-invert{color:var(--card-foreground)}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "component", type: CardComponent, selector: "app-card", inputs: ["variant", "class"] }, { kind: "component", type: CardContentComponent, selector: "app-card-content", inputs: ["class"] }, { kind: "component", type: MarkdownRendererComponent, selector: "app-markdown-renderer", inputs: ["content", "inline", "cssClass", "dir"] }, { kind: "component", type: ChatAvatarComponent, selector: "app-chat-avatar", inputs: ["senderType", "needsAgent", "isHidden"] }, { kind: "component", type: ImageAttachmentComponent, selector: "app-image-attachment", inputs: ["fileId", "enablePreview", "className"], outputs: ["imageClick"] }, { kind: "component", type: ImagePreviewDialogComponent, selector: "app-image-preview-dialog", inputs: ["imageUrls", "initialIndex", "isOpen"], outputs: ["close"] }] });
|
|
757
1169
|
}
|
|
758
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
1170
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.11", ngImport: i0, type: ChatMessageComponent, decorators: [{
|
|
759
1171
|
type: Component,
|
|
760
1172
|
args: [{ selector: 'app-chat-message', standalone: true, imports: [
|
|
761
1173
|
CommonModule,
|
|
@@ -763,7 +1175,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.1", ngImpor
|
|
|
763
1175
|
CardContentComponent,
|
|
764
1176
|
MarkdownRendererComponent,
|
|
765
1177
|
ChatAvatarComponent,
|
|
766
|
-
|
|
1178
|
+
ImageAttachmentComponent,
|
|
1179
|
+
ImagePreviewDialogComponent,
|
|
1180
|
+
], template: "<div\n class=\"chat__message-container\"\n [class.chat__message-container--user]=\"message.senderType === 1\"\n>\n <app-chat-avatar\n [senderType]=\"message.senderType\"\n [needsAgent]=\"needsAgent\"\n [isHidden]=\"isHidden\"\n />\n <app-card\n variant=\"rounded\"\n [class]=\"\n 'chat__message ' +\n (message.senderType === 1\n ? 'chat__message--user'\n : 'chat__message--assistant')\n \"\n >\n <app-card-content>\n @if (hasAttachments()) {\n <div class=\"chat__message-attachments\">\n @for (fileId of message.attachmentIds; track fileId; let i = $index) {\n <app-image-attachment\n [fileId]=\"fileId\"\n [enablePreview]=\"true\"\n (imageClick)=\"handleImageClick(i)\"\n />\n }\n </div>\n }\n <div class=\"chat__message-content\">\n <app-markdown-renderer\n [content]=\"cleanMessageContent(message.messageContent)\"\n [inline]=\"false\"\n [cssClass]=\"'prose' + (message.senderType === 1 ? ' prose-invert' : '')\"\n [dir]=\"currentLang === 'ar' ? 'rtl' : 'ltr'\"\n >\n </app-markdown-renderer>\n </div>\n </app-card-content>\n </app-card>\n</div>\n\n<app-image-preview-dialog\n [imageUrls]=\"previewImageUrls()\"\n [initialIndex]=\"previewImageIndex()\"\n [isOpen]=\"isPreviewOpen()\"\n (close)=\"closePreview()\"\n/>\n", styles: [".chat__message-container{display:flex;align-items:flex-start;gap:.75rem}.chat__message-container--user{flex-direction:row-reverse}.chat__message{max-width:80%;position:relative;border-radius:1rem;padding:1rem}.chat__message--user{align-self:flex-start;background-color:var(--babylai-primary-color, #ad49e1);color:#fff;direction:rtl}.chat__message--assistant,.chat__message--agent{align-self:flex-end;background-color:var(--card);color:var(--card-foreground);direction:rtl}.chat__message-attachments{display:flex;flex-wrap:wrap;gap:.5rem;margin-bottom:.5rem}.chat__message-content :global(.prose){max-width:none;word-break:break-words}.chat__message-content :global(.prose)>*:first-child{margin-top:0}.chat__message-content :global(.prose)>*:last-child{margin-bottom:0}.chat__message-content :global(.prose)>p,.chat__message-content :global(.prose)>ul,.chat__message-content :global(.prose)>ol,.chat__message-content :global(.prose)>blockquote{margin:.5rem 0}.chat__message-content :global(.prose).prose-invert{color:var(--card-foreground)}\n"] }]
|
|
767
1181
|
}], propDecorators: { message: [{
|
|
768
1182
|
type: Input
|
|
769
1183
|
}], needsAgent: [{
|
|
@@ -775,19 +1189,19 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.1", ngImpor
|
|
|
775
1189
|
}] } });
|
|
776
1190
|
|
|
777
1191
|
class ChatSeparatorComponent {
|
|
778
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
779
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "
|
|
1192
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.11", ngImport: i0, type: ChatSeparatorComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1193
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.11", type: ChatSeparatorComponent, isStandalone: true, selector: "app-chat-separator", ngImport: i0, template: "<div class=\"chat__separator\">\n <svg\n width=\"100%\"\n height=\"14\"\n viewBox=\"0 0 327 14\"\n fill=\"currentColor\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <line x1=\"132.5\" y1=\"7.5\" y2=\"7.5\" stroke=\"currentColor\" />\n <path\n d=\"M162.891 0.464864C162.892 0.460907 162.893 0.458928 162.893 0.458012C163.067 -0.152671 163.933 -0.152671 164.107 0.458012C164.107 0.458928 164.108 0.460907 164.109 0.464864C164.112 0.475291 164.113 0.480505 164.115 0.4854C164.924 3.34287 167.157 5.57619 170.015 6.38539C170.019 6.38678 170.025 6.38825 170.035 6.39119C170.039 6.3923 170.041 6.39286 170.042 6.39312C170.653 6.56727 170.653 7.43274 170.042 7.60688C170.041 7.60714 170.039 7.6077 170.035 7.60881C170.025 7.61175 170.019 7.61322 170.015 7.61461C167.157 8.42381 164.924 10.6571 164.115 13.5146C164.113 13.5195 164.112 13.5247 164.109 13.5351C164.108 13.5391 164.107 13.5411 164.107 13.542C163.933 14.1527 163.067 14.1527 162.893 13.542C162.893 13.5411 162.892 13.5391 162.891 13.5351C162.888 13.5247 162.887 13.5195 162.885 13.5146C162.076 10.6571 159.843 8.42381 156.985 7.61461C156.981 7.61322 156.975 7.61175 156.965 7.60881C156.961 7.6077 156.959 7.60714 156.958 7.60688C156.347 7.43274 156.347 6.56727 156.958 6.39312C156.959 6.39286 156.961 6.3923 156.965 6.39119C156.975 6.38825 156.981 6.38678 156.985 6.38539C159.843 5.57619 162.076 3.34287 162.885 0.4854C162.887 0.480505 162.888 0.475291 162.891 0.464864Z\"\n fill=\"currentColor\"\n />\n <line x1=\"327\" y1=\"7.5\" x2=\"194.5\" y2=\"7.5\" stroke=\"currentColor\" />\n </svg>\n</div>\n", styles: [".chat__separator{width:100%;color:var(--babylai-primary-color, #ad49e1)}.chat__separator img{width:100%}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }] });
|
|
780
1194
|
}
|
|
781
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
1195
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.11", ngImport: i0, type: ChatSeparatorComponent, decorators: [{
|
|
782
1196
|
type: Component,
|
|
783
1197
|
args: [{ selector: 'app-chat-separator', standalone: true, imports: [CommonModule], template: "<div class=\"chat__separator\">\n <svg\n width=\"100%\"\n height=\"14\"\n viewBox=\"0 0 327 14\"\n fill=\"currentColor\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <line x1=\"132.5\" y1=\"7.5\" y2=\"7.5\" stroke=\"currentColor\" />\n <path\n d=\"M162.891 0.464864C162.892 0.460907 162.893 0.458928 162.893 0.458012C163.067 -0.152671 163.933 -0.152671 164.107 0.458012C164.107 0.458928 164.108 0.460907 164.109 0.464864C164.112 0.475291 164.113 0.480505 164.115 0.4854C164.924 3.34287 167.157 5.57619 170.015 6.38539C170.019 6.38678 170.025 6.38825 170.035 6.39119C170.039 6.3923 170.041 6.39286 170.042 6.39312C170.653 6.56727 170.653 7.43274 170.042 7.60688C170.041 7.60714 170.039 7.6077 170.035 7.60881C170.025 7.61175 170.019 7.61322 170.015 7.61461C167.157 8.42381 164.924 10.6571 164.115 13.5146C164.113 13.5195 164.112 13.5247 164.109 13.5351C164.108 13.5391 164.107 13.5411 164.107 13.542C163.933 14.1527 163.067 14.1527 162.893 13.542C162.893 13.5411 162.892 13.5391 162.891 13.5351C162.888 13.5247 162.887 13.5195 162.885 13.5146C162.076 10.6571 159.843 8.42381 156.985 7.61461C156.981 7.61322 156.975 7.61175 156.965 7.60881C156.961 7.6077 156.959 7.60714 156.958 7.60688C156.347 7.43274 156.347 6.56727 156.958 6.39312C156.959 6.39286 156.961 6.3923 156.965 6.39119C156.975 6.38825 156.981 6.38678 156.985 6.38539C159.843 5.57619 162.076 3.34287 162.885 0.4854C162.887 0.480505 162.888 0.475291 162.891 0.464864Z\"\n fill=\"currentColor\"\n />\n <line x1=\"327\" y1=\"7.5\" x2=\"194.5\" y2=\"7.5\" stroke=\"currentColor\" />\n </svg>\n</div>\n", styles: [".chat__separator{width:100%;color:var(--babylai-primary-color, #ad49e1)}.chat__separator img{width:100%}\n"] }]
|
|
784
1198
|
}] });
|
|
785
1199
|
|
|
786
1200
|
class ChatTypingIndicatorComponent {
|
|
787
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
788
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "
|
|
1201
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.11", ngImport: i0, type: ChatTypingIndicatorComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1202
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.11", type: ChatTypingIndicatorComponent, isStandalone: true, selector: "app-chat-typing-indicator", ngImport: i0, template: "<div class=\"chat__typing\">\n <app-chat-avatar [senderType]=\"3\" [needsAgent]=\"false\" [isHidden]=\"false\" />\n <app-card\n variant=\"rounded\"\n class=\"chat__typing_indicator\"\n >\n <app-card-content>\n <div id=\"wave\">\n <span class=\"dot\"></span>\n <span class=\"dot\"></span>\n <span class=\"dot\"></span>\n </div>\n </app-card-content>\n </app-card>\n</div>\n", styles: [".chat__typing{display:flex;align-items:flex-start;gap:.5rem}.chat__typing_indicator{border-radius:1rem;padding:1rem}#wave{position:relative;text-align:start}#wave .dot{display:inline-block;width:.5rem;height:.5rem;border-radius:9999px;margin-right:.25rem;background:var(--babylai-primary-color, #ad49e1);animation:wave 1.3s linear infinite}#wave .dot:nth-child(2){animation-delay:-1.1s}#wave .dot:nth-child(3){animation-delay:-.9s}@keyframes wave{0%,60%,to{transform:initial}30%{transform:translateY(-10px)}}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "component", type: CardComponent, selector: "app-card", inputs: ["variant", "class"] }, { kind: "component", type: CardContentComponent, selector: "app-card-content", inputs: ["class"] }, { kind: "component", type: ChatAvatarComponent, selector: "app-chat-avatar", inputs: ["senderType", "needsAgent", "isHidden"] }] });
|
|
789
1203
|
}
|
|
790
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
1204
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.11", ngImport: i0, type: ChatTypingIndicatorComponent, decorators: [{
|
|
791
1205
|
type: Component,
|
|
792
1206
|
args: [{ selector: 'app-chat-typing-indicator', standalone: true, imports: [CommonModule, CardComponent, CardContentComponent, ChatAvatarComponent], template: "<div class=\"chat__typing\">\n <app-chat-avatar [senderType]=\"3\" [needsAgent]=\"false\" [isHidden]=\"false\" />\n <app-card\n variant=\"rounded\"\n class=\"chat__typing_indicator\"\n >\n <app-card-content>\n <div id=\"wave\">\n <span class=\"dot\"></span>\n <span class=\"dot\"></span>\n <span class=\"dot\"></span>\n </div>\n </app-card-content>\n </app-card>\n</div>\n", styles: [".chat__typing{display:flex;align-items:flex-start;gap:.5rem}.chat__typing_indicator{border-radius:1rem;padding:1rem}#wave{position:relative;text-align:start}#wave .dot{display:inline-block;width:.5rem;height:.5rem;border-radius:9999px;margin-right:.25rem;background:var(--babylai-primary-color, #ad49e1);animation:wave 1.3s linear infinite}#wave .dot:nth-child(2){animation-delay:-1.1s}#wave .dot:nth-child(3){animation-delay:-.9s}@keyframes wave{0%,60%,to{transform:initial}30%{transform:translateY(-10px)}}\n"] }]
|
|
793
1207
|
}] });
|
|
@@ -796,16 +1210,214 @@ class ChatInputComponent {
|
|
|
796
1210
|
isChatClosed = false;
|
|
797
1211
|
assistantStatus = '';
|
|
798
1212
|
currentLang = 'en';
|
|
1213
|
+
set sessionId(value) {
|
|
1214
|
+
this._sessionId = value;
|
|
1215
|
+
// When sessionId becomes available, upload any pending files
|
|
1216
|
+
if (value) {
|
|
1217
|
+
// Use setTimeout to ensure the component has updated
|
|
1218
|
+
setTimeout(() => this.uploadPendingFiles(), 0);
|
|
1219
|
+
}
|
|
1220
|
+
}
|
|
1221
|
+
get sessionId() {
|
|
1222
|
+
return this._sessionId;
|
|
1223
|
+
}
|
|
1224
|
+
_sessionId = null;
|
|
799
1225
|
sendMessage = new EventEmitter();
|
|
800
1226
|
messageInput;
|
|
801
|
-
|
|
1227
|
+
fileInput;
|
|
1228
|
+
fileUploadService = inject(FileUploadService);
|
|
1229
|
+
messageContent = signal('');
|
|
1230
|
+
selectedFiles = signal([]);
|
|
1231
|
+
previewImageUrl = signal(null);
|
|
1232
|
+
previewImageIndex = signal(-1);
|
|
1233
|
+
isUploading = computed(() => this.selectedFiles().some((f) => f.uploading));
|
|
1234
|
+
hasUploadErrors = computed(() => {
|
|
1235
|
+
const files = this.selectedFiles();
|
|
1236
|
+
// Only return true if there are files AND all of them have errors
|
|
1237
|
+
// If no files are selected, there are no errors
|
|
1238
|
+
return (files.length > 0 &&
|
|
1239
|
+
files.every((f) => f.error !== null && f.uploadedId === null));
|
|
1240
|
+
});
|
|
1241
|
+
canSend = computed(() => {
|
|
1242
|
+
// Send button should only depend on message text and assistant status
|
|
1243
|
+
// Attachments are optional and should not affect send button state
|
|
1244
|
+
const hasText = this.messageContent().trim().length > 0;
|
|
1245
|
+
const notTyping = this.assistantStatus !== 'typing';
|
|
1246
|
+
const notClosed = !this.isChatClosed;
|
|
1247
|
+
const result = hasText && notTyping && notClosed;
|
|
1248
|
+
return result;
|
|
1249
|
+
});
|
|
1250
|
+
ngOnInit() {
|
|
1251
|
+
// Component initialization
|
|
1252
|
+
}
|
|
1253
|
+
ngOnDestroy() {
|
|
1254
|
+
// Clean up blob URLs
|
|
1255
|
+
this.selectedFiles().forEach((file) => {
|
|
1256
|
+
if (file.previewUrl.startsWith('blob:')) {
|
|
1257
|
+
URL.revokeObjectURL(file.previewUrl);
|
|
1258
|
+
}
|
|
1259
|
+
});
|
|
1260
|
+
if (this.previewImageUrl()?.startsWith('blob:')) {
|
|
1261
|
+
URL.revokeObjectURL(this.previewImageUrl());
|
|
1262
|
+
}
|
|
1263
|
+
}
|
|
1264
|
+
handleFileSelect(event) {
|
|
1265
|
+
const input = event.target;
|
|
1266
|
+
const files = input.files;
|
|
1267
|
+
if (!files || files.length === 0)
|
|
1268
|
+
return;
|
|
1269
|
+
const imageFiles = Array.from(files).filter((file) => file.type.startsWith('image/'));
|
|
1270
|
+
if (imageFiles.length === 0) {
|
|
1271
|
+
alert('Please select image files only');
|
|
1272
|
+
return;
|
|
1273
|
+
}
|
|
1274
|
+
// Create preview URLs and add to selected files
|
|
1275
|
+
const newFiles = imageFiles.map((file) => ({
|
|
1276
|
+
file,
|
|
1277
|
+
previewUrl: URL.createObjectURL(file),
|
|
1278
|
+
uploading: false,
|
|
1279
|
+
uploadedId: null,
|
|
1280
|
+
error: null,
|
|
1281
|
+
}));
|
|
1282
|
+
this.selectedFiles.update((current) => [...current, ...newFiles]);
|
|
1283
|
+
// Start uploading files if sessionId is available
|
|
1284
|
+
// Otherwise, files will be uploaded when sessionId becomes available
|
|
1285
|
+
if (this.sessionId) {
|
|
1286
|
+
this.uploadFiles(imageFiles);
|
|
1287
|
+
}
|
|
1288
|
+
// If no sessionId, files are stored and will be uploaded when session is created
|
|
1289
|
+
// Reset file input
|
|
1290
|
+
if (input) {
|
|
1291
|
+
input.value = '';
|
|
1292
|
+
}
|
|
1293
|
+
}
|
|
1294
|
+
handleAttachClick() {
|
|
1295
|
+
this.fileInput?.nativeElement?.click();
|
|
1296
|
+
}
|
|
1297
|
+
removeFile(index) {
|
|
1298
|
+
const file = this.selectedFiles()[index];
|
|
1299
|
+
if (file.previewUrl.startsWith('blob:')) {
|
|
1300
|
+
URL.revokeObjectURL(file.previewUrl);
|
|
1301
|
+
}
|
|
1302
|
+
this.selectedFiles.update((current) => current.filter((_, i) => i !== index));
|
|
1303
|
+
}
|
|
1304
|
+
/**
|
|
1305
|
+
* Upload pending files that don't have an uploadedId yet
|
|
1306
|
+
*/
|
|
1307
|
+
uploadPendingFiles() {
|
|
1308
|
+
if (!this.sessionId)
|
|
1309
|
+
return;
|
|
1310
|
+
const pendingFiles = this.selectedFiles().filter((f) => !f.uploadedId && !f.uploading && !f.error);
|
|
1311
|
+
if (pendingFiles.length > 0) {
|
|
1312
|
+
const filesToUpload = pendingFiles.map((f) => f.file);
|
|
1313
|
+
this.uploadFiles(filesToUpload);
|
|
1314
|
+
}
|
|
1315
|
+
}
|
|
1316
|
+
uploadFiles(files) {
|
|
1317
|
+
if (!this.sessionId || files.length === 0) {
|
|
1318
|
+
// If no sessionId, files will be uploaded later when session is created
|
|
1319
|
+
// Don't mark them as error - just wait
|
|
1320
|
+
return;
|
|
1321
|
+
}
|
|
1322
|
+
// Create a map of file names to track which file corresponds to which result
|
|
1323
|
+
const fileMap = new Map();
|
|
1324
|
+
files.forEach((file, index) => {
|
|
1325
|
+
fileMap.set(file, index);
|
|
1326
|
+
});
|
|
1327
|
+
// Mark files as uploading
|
|
1328
|
+
this.selectedFiles.update((current) => current.map((f) => {
|
|
1329
|
+
if (files.includes(f.file)) {
|
|
1330
|
+
return { ...f, uploading: true, error: null };
|
|
1331
|
+
}
|
|
1332
|
+
return f;
|
|
1333
|
+
}));
|
|
1334
|
+
// Upload files
|
|
1335
|
+
this.fileUploadService
|
|
1336
|
+
.uploadFiles(this.sessionId, files)
|
|
1337
|
+
.pipe(catchError$1((error) => {
|
|
1338
|
+
console.error('Error uploading files:', error);
|
|
1339
|
+
// Mark all uploading files as failed
|
|
1340
|
+
this.selectedFiles.update((current) => current.map((f) => {
|
|
1341
|
+
if (files.includes(f.file)) {
|
|
1342
|
+
return {
|
|
1343
|
+
...f,
|
|
1344
|
+
uploading: false,
|
|
1345
|
+
error: 'Upload failed',
|
|
1346
|
+
};
|
|
1347
|
+
}
|
|
1348
|
+
return f;
|
|
1349
|
+
}));
|
|
1350
|
+
return of([]);
|
|
1351
|
+
}))
|
|
1352
|
+
.subscribe((results) => {
|
|
1353
|
+
// Update selected files with upload results
|
|
1354
|
+
// Match results to files by index
|
|
1355
|
+
this.selectedFiles.update((current) => {
|
|
1356
|
+
return current.map((f) => {
|
|
1357
|
+
const fileIndex = fileMap.get(f.file);
|
|
1358
|
+
if (fileIndex !== undefined && results[fileIndex]) {
|
|
1359
|
+
const result = results[fileIndex];
|
|
1360
|
+
return {
|
|
1361
|
+
...f,
|
|
1362
|
+
uploading: false,
|
|
1363
|
+
uploadedId: result.success ? result.fileId : null,
|
|
1364
|
+
error: result.success ? null : result.error || 'Upload failed',
|
|
1365
|
+
};
|
|
1366
|
+
}
|
|
1367
|
+
return f;
|
|
1368
|
+
});
|
|
1369
|
+
});
|
|
1370
|
+
});
|
|
1371
|
+
}
|
|
802
1372
|
handleSendMessage() {
|
|
803
|
-
if (!this.
|
|
1373
|
+
if (!this.canSend())
|
|
804
1374
|
return;
|
|
805
|
-
|
|
806
|
-
|
|
1375
|
+
// Get files that are already uploaded
|
|
1376
|
+
const uploadedIds = this.selectedFiles()
|
|
1377
|
+
.map((f) => f.uploadedId)
|
|
1378
|
+
.filter((id) => id !== null);
|
|
1379
|
+
// Check if there are pending files that need to be uploaded
|
|
1380
|
+
const pendingFiles = this.selectedFiles().filter((f) => !f.uploadedId && !f.uploading && !f.error);
|
|
1381
|
+
// If there are pending files but no sessionId, emit with empty attachmentIds
|
|
1382
|
+
// The parent component will create session and we'll upload files after
|
|
1383
|
+
// If there are pending files and sessionId exists, upload them first
|
|
1384
|
+
if (pendingFiles.length > 0 && this.sessionId) {
|
|
1385
|
+
// Mark files as uploading
|
|
1386
|
+
const filesToUpload = pendingFiles.map((f) => f.file);
|
|
1387
|
+
this.uploadFiles(filesToUpload);
|
|
1388
|
+
// Wait a bit for uploads to start, then emit
|
|
1389
|
+
// Note: In a real scenario, we might want to wait for uploads to complete
|
|
1390
|
+
// For now, we'll emit and let the upload continue in background
|
|
1391
|
+
// The uploadedIds will be empty if uploads haven't completed yet
|
|
1392
|
+
}
|
|
1393
|
+
this.sendMessage.emit({
|
|
1394
|
+
text: this.messageContent(),
|
|
1395
|
+
attachmentIds: uploadedIds,
|
|
1396
|
+
pendingFiles: pendingFiles.length > 0 && !this.sessionId
|
|
1397
|
+
? pendingFiles.map((f) => f.file)
|
|
1398
|
+
: [],
|
|
1399
|
+
});
|
|
1400
|
+
// Clear message and files
|
|
1401
|
+
this.messageContent.set('');
|
|
1402
|
+
this.selectedFiles().forEach((f) => {
|
|
1403
|
+
if (f.previewUrl.startsWith('blob:')) {
|
|
1404
|
+
URL.revokeObjectURL(f.previewUrl);
|
|
1405
|
+
}
|
|
1406
|
+
});
|
|
1407
|
+
this.selectedFiles.set([]);
|
|
807
1408
|
this.adjustTextareaHeight();
|
|
808
1409
|
}
|
|
1410
|
+
handlePreviewImage(index) {
|
|
1411
|
+
const file = this.selectedFiles()[index];
|
|
1412
|
+
if (file) {
|
|
1413
|
+
this.previewImageUrl.set(file.previewUrl);
|
|
1414
|
+
this.previewImageIndex.set(index);
|
|
1415
|
+
}
|
|
1416
|
+
}
|
|
1417
|
+
closePreview() {
|
|
1418
|
+
this.previewImageUrl.set(null);
|
|
1419
|
+
this.previewImageIndex.set(-1);
|
|
1420
|
+
}
|
|
809
1421
|
adjustTextareaHeight() {
|
|
810
1422
|
const textarea = this.messageInput?.nativeElement;
|
|
811
1423
|
if (textarea) {
|
|
@@ -813,23 +1425,28 @@ class ChatInputComponent {
|
|
|
813
1425
|
textarea.style.height = textarea.scrollHeight + 'px';
|
|
814
1426
|
}
|
|
815
1427
|
}
|
|
816
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
817
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.1", type: ChatInputComponent, isStandalone: true, selector: "app-chat-input", inputs: { isChatClosed: "isChatClosed", assistantStatus: "assistantStatus", currentLang: "currentLang" }, outputs: { sendMessage: "sendMessage" }, viewQueries: [{ propertyName: "messageInput", first: true, predicate: ["messageInput"], descendants: true }], ngImport: i0, template: "<form (ngSubmit)=\"handleSendMessage()\" class=\"chat__input-container\">\n <div class=\"chat__input-wrapper\">\n <input\n type=\"text\"\n [(ngModel)]=\"messageContent\"\n name=\"messageContent\"\n [placeholder]=\"'ChatPlaceholder' | translate\"\n [disabled]=\"isChatClosed\"\n class=\"chat__input\"\n #messageInput\n />\n <button\n type=\"submit\"\n [disabled]=\"\n !messageContent.trim() || isChatClosed || assistantStatus === 'typing'\n \"\n class=\"chat__send-button\"\n >\n <svg\n class=\"chat__send-button-icon\"\n [class.chat__send-button-icon--rtl]=\"currentLang === 'ar'\"\n viewBox=\"0 0 19 19\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <path\n d=\"M18.2346 2.68609C18.6666 1.49109 17.5086 0.33309 16.3136 0.76609L1.70855 6.04809C0.509554 6.48209 0.364554 8.11809 1.46755 8.75709L6.12955 11.4561L10.2926 7.29309C10.4812 7.11093 10.7338 7.01014 10.996 7.01242C11.2582 7.01469 11.509 7.11986 11.6944 7.30527C11.8798 7.49068 11.9849 7.74149 11.9872 8.00369C11.9895 8.26589 11.8887 8.51849 11.7066 8.70709L7.54355 12.8701L10.2436 17.5321C10.8816 18.6351 12.5176 18.4891 12.9516 17.2911L18.2346 2.68609Z\"\n fill=\"white\"\n />\n </svg>\n </button>\n </div>\n</form>\n", styles: [".chat__input-container,.chat__input-wrapper{position:relative;width:100%}.chat__input{width:100%;padding-inline:1rem 4rem;padding-block:1rem;border-radius:9999px;border:1px solid var(--border);background-color:var(--input);color:var(--foreground);font-size:1rem;transition:all .2s ease-in-out;font-size:.875rem}.chat__input:focus{outline:none;box-shadow:0 0 0 2px rgba(var(--babylai-primary-color, #ad49e1),.1)}.chat__input:disabled{background-color:var(--muted);color:var(--muted-foreground);cursor:not-allowed;opacity:.6}.chat__input::placeholder{color:var(--muted-foreground);opacity:.8}.chat__send-button{position:absolute!important;inset-inline-end:1rem;top:50%;transform:translateY(-50%);width:1.75rem;height:1.75rem;padding:.375rem;display:inline-flex;align-items:center;justify-content:center;border-radius:9999px;background-color:var(--babylai-primary-color, #ad49e1);transition:all .2s ease-in-out;opacity:1;border:none}.chat__send-button:hover:not(:disabled){background-color:var(--babylai-primary-color-600, #672b87);transform:translateY(-50%) scale(1.05)}.chat__send-button:disabled{cursor:not-allowed;opacity:.5;background-color:var(--muted)}.chat__send-button-icon{width:100%;height:100%;object-fit:contain;filter:brightness(0) invert(1)}.chat__send-button-icon--rtl{transform:rotate(270deg)}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1$1.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i1$1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "directive", type: i1$1.NgForm, selector: "form:not([ngNoForm]):not([formGroup]),ng-form,[ngForm]", inputs: ["ngFormOptions"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "pipe", type: TranslatePipe, name: "translate" }] });
|
|
1428
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.11", ngImport: i0, type: ChatInputComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1429
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.11", type: ChatInputComponent, isStandalone: true, selector: "app-chat-input", inputs: { isChatClosed: "isChatClosed", assistantStatus: "assistantStatus", currentLang: "currentLang", sessionId: "sessionId" }, outputs: { sendMessage: "sendMessage" }, viewQueries: [{ propertyName: "messageInput", first: true, predicate: ["messageInput"], descendants: true }, { propertyName: "fileInput", first: true, predicate: ["fileInput"], descendants: true }], ngImport: i0, template: "<div class=\"chat__input-container\">\n @if (selectedFiles().length > 0) {\n <div class=\"chat__file-preview\">\n @for (file of selectedFiles(); track $index) {\n <div class=\"chat__file-preview-item\">\n <img\n [src]=\"file.previewUrl\"\n [alt]=\"file.file.name\"\n class=\"chat__file-preview-image\"\n [class.chat__file-preview-image--uploading]=\"file.uploading\"\n (click)=\"handlePreviewImage($index)\"\n />\n @if (file.uploading) {\n <div class=\"chat__file-preview-progress-overlay\">\n <svg\n class=\"chat__file-preview-progress-circle\"\n viewBox=\"0 0 36 36\"\n >\n <circle\n class=\"chat__file-preview-progress-circle-bg\"\n cx=\"18\"\n cy=\"18\"\n r=\"16\"\n fill=\"none\"\n />\n <circle\n class=\"chat__file-preview-progress-circle-fg\"\n cx=\"18\"\n cy=\"18\"\n r=\"16\"\n fill=\"none\"\n />\n </svg>\n </div>\n }\n @if (file.error) {\n <div class=\"chat__file-preview-error\" [title]=\"file.error\">\n !\n </div>\n }\n <button\n type=\"button\"\n class=\"chat__file-preview-remove\"\n (click)=\"removeFile($index)\"\n aria-label=\"Remove image\"\n >\n <svg\n width=\"16\"\n height=\"16\"\n viewBox=\"0 0 16 16\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <path\n d=\"M12 4L4 12M4 4L12 12\"\n stroke=\"currentColor\"\n stroke-width=\"2\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n />\n </svg>\n </button>\n </div>\n }\n </div>\n }\n\n <form (ngSubmit)=\"handleSendMessage()\" class=\"chat__input-form\">\n <input\n type=\"file\"\n #fileInput\n accept=\"image/*\"\n multiple\n (change)=\"handleFileSelect($event)\"\n class=\"chat__file-input\"\n [disabled]=\"isChatClosed\"\n />\n <div class=\"chat__input-wrapper\">\n <button\n type=\"button\"\n class=\"chat__attach-button\"\n (click)=\"handleAttachClick()\"\n [disabled]=\"isChatClosed\"\n aria-label=\"Attach image\"\n >\n <svg\n width=\"20\"\n height=\"20\"\n viewBox=\"0 0 20 20\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <path\n d=\"M18.5 9.5L10.5 17.5C8.5 19.5 5.5 19.5 3.5 17.5C1.5 15.5 1.5 12.5 3.5 10.5L11.5 2.5C12.6 1.4 14.4 1.4 15.5 2.5C16.6 3.6 16.6 5.4 15.5 6.5L7.5 14.5C7 15 6.2 15 5.7 14.5C5.2 14 5.2 13.2 5.7 12.7L12.7 5.7\"\n stroke=\"currentColor\"\n stroke-width=\"2\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n />\n </svg>\n </button>\n <input\n type=\"text\"\n [ngModel]=\"messageContent()\"\n (ngModelChange)=\"messageContent.set($event)\"\n name=\"messageContent\"\n [placeholder]=\"'ChatPlaceholder' | translate\"\n [disabled]=\"isChatClosed\"\n class=\"chat__input\"\n #messageInput\n />\n <button\n type=\"submit\"\n [disabled]=\"!canSend() || isChatClosed\"\n class=\"chat__send-button\"\n >\n <svg\n class=\"chat__send-button-icon\"\n [class.chat__send-button-icon--rtl]=\"currentLang === 'ar'\"\n viewBox=\"0 0 19 19\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <path\n d=\"M18.2346 2.68609C18.6666 1.49109 17.5086 0.33309 16.3136 0.76609L1.70855 6.04809C0.509554 6.48209 0.364554 8.11809 1.46755 8.75709L6.12955 11.4561L10.2926 7.29309C10.4812 7.11093 10.7338 7.01014 10.996 7.01242C11.2582 7.01469 11.509 7.11986 11.6944 7.30527C11.8798 7.49068 11.9849 7.74149 11.9872 8.00369C11.9895 8.26589 11.8887 8.51849 11.7066 8.70709L7.54355 12.8701L10.2436 17.5321C10.8816 18.6351 12.5176 18.4891 12.9516 17.2911L18.2346 2.68609Z\"\n fill=\"white\"\n />\n </svg>\n </button>\n </div>\n </form>\n</div>\n", styles: [".chat__input-container,.chat__input-form{position:relative;width:100%}.chat__file-input{position:absolute;opacity:0;width:0;height:0;pointer-events:none}.chat__input-wrapper{position:relative;width:100%;display:flex;align-items:center;gap:.5rem}.chat__attach-button{display:inline-flex;align-items:center;justify-content:center;width:2rem;height:2rem;padding:.5rem;border-radius:9999px;background-color:transparent;border:none;color:var(--muted-foreground);cursor:pointer;transition:all .2s ease-in-out;flex-shrink:0}.chat__attach-button:hover:not(:disabled){color:var(--foreground);background-color:var(--muted)}.chat__attach-button:disabled{cursor:not-allowed;opacity:.5}.chat__attach-button svg{width:100%;height:100%}.chat__input{flex:1;width:100%;padding-inline:1rem 4rem;padding-block:1rem;border-radius:9999px;border:1px solid var(--border);background-color:var(--input);color:var(--foreground);font-size:1rem;transition:all .2s ease-in-out;font-size:.875rem}.chat__input:focus{outline:none;box-shadow:0 0 0 2px rgba(var(--babylai-primary-color, #ad49e1),.1)}.chat__input:disabled{background-color:var(--muted);color:var(--muted-foreground);cursor:not-allowed;opacity:.6}.chat__input::placeholder{color:var(--muted-foreground);opacity:.8}.chat__send-button{position:absolute!important;inset-inline-end:1rem;top:50%;transform:translateY(-50%);width:1.75rem;height:1.75rem;padding:.375rem;display:inline-flex;align-items:center;justify-content:center;border-radius:9999px;background-color:var(--babylai-primary-color, #ad49e1);transition:all .2s ease-in-out;opacity:1;border:none}.chat__send-button:hover:not(:disabled){background-color:var(--babylai-primary-color-600, #672b87);transform:translateY(-50%) scale(1.05)}.chat__send-button:disabled{cursor:not-allowed;opacity:.5;background-color:var(--muted)}.chat__send-button-icon{width:100%;height:100%;object-fit:contain;filter:brightness(0) invert(1)}.chat__send-button-icon--rtl{transform:rotate(270deg)}.chat__file-preview{display:flex;gap:.5rem;padding:.5rem;margin-bottom:.5rem;overflow-x:auto;scrollbar-width:thin}.chat__file-preview::-webkit-scrollbar{height:4px}.chat__file-preview::-webkit-scrollbar-track{background:var(--muted);border-radius:9999px}.chat__file-preview::-webkit-scrollbar-thumb{background:var(--muted-foreground);border-radius:9999px}.chat__file-preview-item{position:relative;width:50px;height:50px;border-radius:calc(var(--radius) - 2px);overflow:hidden;flex-shrink:0;background-color:var(--muted)}.chat__file-preview-image{width:100%;height:100%;object-fit:cover;cursor:pointer;transition:opacity .2s ease-in-out}.chat__file-preview-image:hover{opacity:.8}.chat__file-preview-image--uploading{opacity:.6}.chat__file-preview-progress-overlay{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;background-color:#0000004d;border-radius:calc(var(--radius) - 2px)}.chat__file-preview-progress-circle{width:32px;height:32px;transform:rotate(-90deg)}.chat__file-preview-progress-circle-bg{stroke:#fff3;stroke-width:3}.chat__file-preview-progress-circle-fg{stroke:var(--babylai-primary-color, #ad49e1);stroke-width:3;stroke-linecap:round;stroke-dasharray:100.48;stroke-dashoffset:100.48;animation:circular-progress 2s ease-in-out infinite}@keyframes circular-progress{0%{stroke-dashoffset:100.48}50%{stroke-dashoffset:25.12}to{stroke-dashoffset:100.48}}.chat__file-preview-error{position:absolute;top:2px;inset-inline-end:2px;width:16px;height:16px;display:flex;align-items:center;justify-content:center;border-radius:9999px;background-color:var(--destructive);color:#fff;font-size:.75rem;font-weight:600}.chat__file-preview-remove{position:absolute;top:2px;inset-inline-start:2px;width:20px;height:20px;display:flex;align-items:center;justify-content:center;border-radius:9999px;background-color:#0009;color:#fff;border:none;cursor:pointer;transition:all .2s ease-in-out;opacity:0}.chat__file-preview-item:hover .chat__file-preview-remove{opacity:1}.chat__file-preview-remove:hover{background-color:#000c;transform:scale(1.1)}.chat__file-preview-remove svg{width:12px;height:12px}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1$1.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i1$1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "directive", type: i1$1.NgForm, selector: "form:not([ngNoForm]):not([formGroup]),ng-form,[ngForm]", inputs: ["ngFormOptions"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "pipe", type: TranslatePipe, name: "translate" }] });
|
|
818
1430
|
}
|
|
819
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
1431
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.11", ngImport: i0, type: ChatInputComponent, decorators: [{
|
|
820
1432
|
type: Component,
|
|
821
|
-
args: [{ selector: 'app-chat-input', standalone: true, imports: [CommonModule, FormsModule, TranslatePipe], template: "<form (ngSubmit)=\"handleSendMessage()\" class=\"chat__input-
|
|
1433
|
+
args: [{ selector: 'app-chat-input', standalone: true, imports: [CommonModule, FormsModule, TranslatePipe], template: "<div class=\"chat__input-container\">\n @if (selectedFiles().length > 0) {\n <div class=\"chat__file-preview\">\n @for (file of selectedFiles(); track $index) {\n <div class=\"chat__file-preview-item\">\n <img\n [src]=\"file.previewUrl\"\n [alt]=\"file.file.name\"\n class=\"chat__file-preview-image\"\n [class.chat__file-preview-image--uploading]=\"file.uploading\"\n (click)=\"handlePreviewImage($index)\"\n />\n @if (file.uploading) {\n <div class=\"chat__file-preview-progress-overlay\">\n <svg\n class=\"chat__file-preview-progress-circle\"\n viewBox=\"0 0 36 36\"\n >\n <circle\n class=\"chat__file-preview-progress-circle-bg\"\n cx=\"18\"\n cy=\"18\"\n r=\"16\"\n fill=\"none\"\n />\n <circle\n class=\"chat__file-preview-progress-circle-fg\"\n cx=\"18\"\n cy=\"18\"\n r=\"16\"\n fill=\"none\"\n />\n </svg>\n </div>\n }\n @if (file.error) {\n <div class=\"chat__file-preview-error\" [title]=\"file.error\">\n !\n </div>\n }\n <button\n type=\"button\"\n class=\"chat__file-preview-remove\"\n (click)=\"removeFile($index)\"\n aria-label=\"Remove image\"\n >\n <svg\n width=\"16\"\n height=\"16\"\n viewBox=\"0 0 16 16\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <path\n d=\"M12 4L4 12M4 4L12 12\"\n stroke=\"currentColor\"\n stroke-width=\"2\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n />\n </svg>\n </button>\n </div>\n }\n </div>\n }\n\n <form (ngSubmit)=\"handleSendMessage()\" class=\"chat__input-form\">\n <input\n type=\"file\"\n #fileInput\n accept=\"image/*\"\n multiple\n (change)=\"handleFileSelect($event)\"\n class=\"chat__file-input\"\n [disabled]=\"isChatClosed\"\n />\n <div class=\"chat__input-wrapper\">\n <button\n type=\"button\"\n class=\"chat__attach-button\"\n (click)=\"handleAttachClick()\"\n [disabled]=\"isChatClosed\"\n aria-label=\"Attach image\"\n >\n <svg\n width=\"20\"\n height=\"20\"\n viewBox=\"0 0 20 20\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <path\n d=\"M18.5 9.5L10.5 17.5C8.5 19.5 5.5 19.5 3.5 17.5C1.5 15.5 1.5 12.5 3.5 10.5L11.5 2.5C12.6 1.4 14.4 1.4 15.5 2.5C16.6 3.6 16.6 5.4 15.5 6.5L7.5 14.5C7 15 6.2 15 5.7 14.5C5.2 14 5.2 13.2 5.7 12.7L12.7 5.7\"\n stroke=\"currentColor\"\n stroke-width=\"2\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n />\n </svg>\n </button>\n <input\n type=\"text\"\n [ngModel]=\"messageContent()\"\n (ngModelChange)=\"messageContent.set($event)\"\n name=\"messageContent\"\n [placeholder]=\"'ChatPlaceholder' | translate\"\n [disabled]=\"isChatClosed\"\n class=\"chat__input\"\n #messageInput\n />\n <button\n type=\"submit\"\n [disabled]=\"!canSend() || isChatClosed\"\n class=\"chat__send-button\"\n >\n <svg\n class=\"chat__send-button-icon\"\n [class.chat__send-button-icon--rtl]=\"currentLang === 'ar'\"\n viewBox=\"0 0 19 19\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <path\n d=\"M18.2346 2.68609C18.6666 1.49109 17.5086 0.33309 16.3136 0.76609L1.70855 6.04809C0.509554 6.48209 0.364554 8.11809 1.46755 8.75709L6.12955 11.4561L10.2926 7.29309C10.4812 7.11093 10.7338 7.01014 10.996 7.01242C11.2582 7.01469 11.509 7.11986 11.6944 7.30527C11.8798 7.49068 11.9849 7.74149 11.9872 8.00369C11.9895 8.26589 11.8887 8.51849 11.7066 8.70709L7.54355 12.8701L10.2436 17.5321C10.8816 18.6351 12.5176 18.4891 12.9516 17.2911L18.2346 2.68609Z\"\n fill=\"white\"\n />\n </svg>\n </button>\n </div>\n </form>\n</div>\n", styles: [".chat__input-container,.chat__input-form{position:relative;width:100%}.chat__file-input{position:absolute;opacity:0;width:0;height:0;pointer-events:none}.chat__input-wrapper{position:relative;width:100%;display:flex;align-items:center;gap:.5rem}.chat__attach-button{display:inline-flex;align-items:center;justify-content:center;width:2rem;height:2rem;padding:.5rem;border-radius:9999px;background-color:transparent;border:none;color:var(--muted-foreground);cursor:pointer;transition:all .2s ease-in-out;flex-shrink:0}.chat__attach-button:hover:not(:disabled){color:var(--foreground);background-color:var(--muted)}.chat__attach-button:disabled{cursor:not-allowed;opacity:.5}.chat__attach-button svg{width:100%;height:100%}.chat__input{flex:1;width:100%;padding-inline:1rem 4rem;padding-block:1rem;border-radius:9999px;border:1px solid var(--border);background-color:var(--input);color:var(--foreground);font-size:1rem;transition:all .2s ease-in-out;font-size:.875rem}.chat__input:focus{outline:none;box-shadow:0 0 0 2px rgba(var(--babylai-primary-color, #ad49e1),.1)}.chat__input:disabled{background-color:var(--muted);color:var(--muted-foreground);cursor:not-allowed;opacity:.6}.chat__input::placeholder{color:var(--muted-foreground);opacity:.8}.chat__send-button{position:absolute!important;inset-inline-end:1rem;top:50%;transform:translateY(-50%);width:1.75rem;height:1.75rem;padding:.375rem;display:inline-flex;align-items:center;justify-content:center;border-radius:9999px;background-color:var(--babylai-primary-color, #ad49e1);transition:all .2s ease-in-out;opacity:1;border:none}.chat__send-button:hover:not(:disabled){background-color:var(--babylai-primary-color-600, #672b87);transform:translateY(-50%) scale(1.05)}.chat__send-button:disabled{cursor:not-allowed;opacity:.5;background-color:var(--muted)}.chat__send-button-icon{width:100%;height:100%;object-fit:contain;filter:brightness(0) invert(1)}.chat__send-button-icon--rtl{transform:rotate(270deg)}.chat__file-preview{display:flex;gap:.5rem;padding:.5rem;margin-bottom:.5rem;overflow-x:auto;scrollbar-width:thin}.chat__file-preview::-webkit-scrollbar{height:4px}.chat__file-preview::-webkit-scrollbar-track{background:var(--muted);border-radius:9999px}.chat__file-preview::-webkit-scrollbar-thumb{background:var(--muted-foreground);border-radius:9999px}.chat__file-preview-item{position:relative;width:50px;height:50px;border-radius:calc(var(--radius) - 2px);overflow:hidden;flex-shrink:0;background-color:var(--muted)}.chat__file-preview-image{width:100%;height:100%;object-fit:cover;cursor:pointer;transition:opacity .2s ease-in-out}.chat__file-preview-image:hover{opacity:.8}.chat__file-preview-image--uploading{opacity:.6}.chat__file-preview-progress-overlay{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;background-color:#0000004d;border-radius:calc(var(--radius) - 2px)}.chat__file-preview-progress-circle{width:32px;height:32px;transform:rotate(-90deg)}.chat__file-preview-progress-circle-bg{stroke:#fff3;stroke-width:3}.chat__file-preview-progress-circle-fg{stroke:var(--babylai-primary-color, #ad49e1);stroke-width:3;stroke-linecap:round;stroke-dasharray:100.48;stroke-dashoffset:100.48;animation:circular-progress 2s ease-in-out infinite}@keyframes circular-progress{0%{stroke-dashoffset:100.48}50%{stroke-dashoffset:25.12}to{stroke-dashoffset:100.48}}.chat__file-preview-error{position:absolute;top:2px;inset-inline-end:2px;width:16px;height:16px;display:flex;align-items:center;justify-content:center;border-radius:9999px;background-color:var(--destructive);color:#fff;font-size:.75rem;font-weight:600}.chat__file-preview-remove{position:absolute;top:2px;inset-inline-start:2px;width:20px;height:20px;display:flex;align-items:center;justify-content:center;border-radius:9999px;background-color:#0009;color:#fff;border:none;cursor:pointer;transition:all .2s ease-in-out;opacity:0}.chat__file-preview-item:hover .chat__file-preview-remove{opacity:1}.chat__file-preview-remove:hover{background-color:#000c;transform:scale(1.1)}.chat__file-preview-remove svg{width:12px;height:12px}\n"] }]
|
|
822
1434
|
}], propDecorators: { isChatClosed: [{
|
|
823
1435
|
type: Input
|
|
824
1436
|
}], assistantStatus: [{
|
|
825
1437
|
type: Input
|
|
826
1438
|
}], currentLang: [{
|
|
827
1439
|
type: Input
|
|
1440
|
+
}], sessionId: [{
|
|
1441
|
+
type: Input
|
|
828
1442
|
}], sendMessage: [{
|
|
829
1443
|
type: Output
|
|
830
1444
|
}], messageInput: [{
|
|
831
1445
|
type: ViewChild,
|
|
832
1446
|
args: ['messageInput']
|
|
1447
|
+
}], fileInput: [{
|
|
1448
|
+
type: ViewChild,
|
|
1449
|
+
args: ['fileInput']
|
|
833
1450
|
}] } });
|
|
834
1451
|
|
|
835
1452
|
class ChatComponent {
|
|
@@ -840,6 +1457,7 @@ class ChatComponent {
|
|
|
840
1457
|
isChatClosed = false;
|
|
841
1458
|
currentLang = 'en';
|
|
842
1459
|
loading = false;
|
|
1460
|
+
sessionId = null;
|
|
843
1461
|
sendMessageEvent = new EventEmitter();
|
|
844
1462
|
chatMessagesContainer;
|
|
845
1463
|
firstAgentMessageIndex = -1;
|
|
@@ -857,8 +1475,8 @@ class ChatComponent {
|
|
|
857
1475
|
this.firstAgentMessageIndex = this.messages.findIndex((message) => message.senderType === 2);
|
|
858
1476
|
}
|
|
859
1477
|
}
|
|
860
|
-
handleSendMessage(
|
|
861
|
-
this.sendMessageEvent.emit(
|
|
1478
|
+
handleSendMessage(event) {
|
|
1479
|
+
this.sendMessageEvent.emit(event);
|
|
862
1480
|
}
|
|
863
1481
|
ngAfterViewChecked() {
|
|
864
1482
|
this.scrollToBottom();
|
|
@@ -875,10 +1493,10 @@ class ChatComponent {
|
|
|
875
1493
|
hasAgentMessageBeenSent(messages) {
|
|
876
1494
|
return messages.some((message) => message.senderType === 2 || message.senderType === 3);
|
|
877
1495
|
}
|
|
878
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
879
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "
|
|
1496
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.11", ngImport: i0, type: ChatComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1497
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.11", type: ChatComponent, isStandalone: true, selector: "app-chat", inputs: { messages: "messages", needsAgent: "needsAgent", assistantStatus: "assistantStatus", isAblyConnected: "isAblyConnected", isChatClosed: "isChatClosed", currentLang: "currentLang", loading: "loading", sessionId: "sessionId" }, outputs: { sendMessageEvent: "sendMessageEvent" }, viewQueries: [{ propertyName: "chatMessagesContainer", first: true, predicate: ["chatMessagesContainer"], descendants: true }], usesOnChanges: true, ngImport: i0, template: "<div class=\"chat\">\n <div class=\"chat__messages\" #chatMessagesContainer>\n @for (message of messages; track message.id; let i = $index) {\n <div class=\"chat__message-group\">\n @if (i === firstAgentMessageIndex && message.senderType === 2) {\n <app-chat-separator />\n }\n <app-chat-message [message]=\"message\" [needsAgent]=\"needsAgent\" [currentLang]=\"currentLang\"\n [isHidden]=\"i > 0 && messages[i - 1].senderType === message.senderType\" />\n </div>\n }\n\n @if (assistantStatus === 'typing' && firstAgentMessageIndex === -1) {\n <app-chat-typing-indicator />\n }\n @if (loading) {\n <div class=\"chat__loading\">\n <app-loading variant=\"primary\" />\n </div>\n }\n </div>\n\n <app-chat-input\n [isChatClosed]=\"isChatClosed\"\n [assistantStatus]=\"assistantStatus\"\n [currentLang]=\"currentLang\"\n [sessionId]=\"sessionId\"\n (sendMessage)=\"handleSendMessage($event)\"\n />\n</div>\n", styles: [".chat{display:flex;flex-direction:column;height:100%;overflow:hidden}.chat__messages{flex:1;overflow-y:auto;padding-bottom:1rem;display:flex;flex-direction:column;gap:1rem}.chat__message-group{display:flex;flex-direction:column;gap:.5rem}.chat__loading{display:flex;align-items:center;justify-content:center;height:100%}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "component", type: LoadingComponent, selector: "app-loading", inputs: ["variant"] }, { kind: "component", type: ChatMessageComponent, selector: "app-chat-message", inputs: ["message", "needsAgent", "currentLang", "isHidden"] }, { kind: "component", type: ChatSeparatorComponent, selector: "app-chat-separator" }, { kind: "component", type: ChatTypingIndicatorComponent, selector: "app-chat-typing-indicator" }, { kind: "component", type: ChatInputComponent, selector: "app-chat-input", inputs: ["isChatClosed", "assistantStatus", "currentLang", "sessionId"], outputs: ["sendMessage"] }] });
|
|
880
1498
|
}
|
|
881
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
1499
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.11", ngImport: i0, type: ChatComponent, decorators: [{
|
|
882
1500
|
type: Component,
|
|
883
1501
|
args: [{ selector: 'app-chat', standalone: true, imports: [
|
|
884
1502
|
CommonModule,
|
|
@@ -887,7 +1505,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.1", ngImpor
|
|
|
887
1505
|
ChatSeparatorComponent,
|
|
888
1506
|
ChatTypingIndicatorComponent,
|
|
889
1507
|
ChatInputComponent,
|
|
890
|
-
], template: "<div class=\"chat\">\n <div class=\"chat__messages\" #chatMessagesContainer>\n @for (message of messages; track message.id; let i = $index) {\n <div class=\"chat__message-group\">\n @if (i === firstAgentMessageIndex && message.senderType === 2) {\n <app-chat-separator />\n }\n <app-chat-message [message]=\"message\" [needsAgent]=\"needsAgent\" [currentLang]=\"currentLang\"\n [isHidden]=\"i > 0 && messages[i - 1].senderType === message.senderType\" />\n </div>\n }\n\n @if (assistantStatus === 'typing' && firstAgentMessageIndex === -1) {\n <app-chat-typing-indicator />\n }\n @if (loading) {\n <div class=\"chat__loading\">\n <app-loading variant=\"primary\" />\n </div>\n }\n </div>\n\n <app-chat-input
|
|
1508
|
+
], template: "<div class=\"chat\">\n <div class=\"chat__messages\" #chatMessagesContainer>\n @for (message of messages; track message.id; let i = $index) {\n <div class=\"chat__message-group\">\n @if (i === firstAgentMessageIndex && message.senderType === 2) {\n <app-chat-separator />\n }\n <app-chat-message [message]=\"message\" [needsAgent]=\"needsAgent\" [currentLang]=\"currentLang\"\n [isHidden]=\"i > 0 && messages[i - 1].senderType === message.senderType\" />\n </div>\n }\n\n @if (assistantStatus === 'typing' && firstAgentMessageIndex === -1) {\n <app-chat-typing-indicator />\n }\n @if (loading) {\n <div class=\"chat__loading\">\n <app-loading variant=\"primary\" />\n </div>\n }\n </div>\n\n <app-chat-input\n [isChatClosed]=\"isChatClosed\"\n [assistantStatus]=\"assistantStatus\"\n [currentLang]=\"currentLang\"\n [sessionId]=\"sessionId\"\n (sendMessage)=\"handleSendMessage($event)\"\n />\n</div>\n", styles: [".chat{display:flex;flex-direction:column;height:100%;overflow:hidden}.chat__messages{flex:1;overflow-y:auto;padding-bottom:1rem;display:flex;flex-direction:column;gap:1rem}.chat__message-group{display:flex;flex-direction:column;gap:.5rem}.chat__loading{display:flex;align-items:center;justify-content:center;height:100%}\n"] }]
|
|
891
1509
|
}], propDecorators: { messages: [{
|
|
892
1510
|
type: Input
|
|
893
1511
|
}], needsAgent: [{
|
|
@@ -902,6 +1520,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.1", ngImpor
|
|
|
902
1520
|
type: Input
|
|
903
1521
|
}], loading: [{
|
|
904
1522
|
type: Input
|
|
1523
|
+
}], sessionId: [{
|
|
1524
|
+
type: Input
|
|
905
1525
|
}], sendMessageEvent: [{
|
|
906
1526
|
type: Output
|
|
907
1527
|
}], chatMessagesContainer: [{
|
|
@@ -916,8 +1536,8 @@ class ConfirmationDialogComponent {
|
|
|
916
1536
|
cancelText = 'Cancel';
|
|
917
1537
|
onConfirm = new EventEmitter();
|
|
918
1538
|
onCancel = new EventEmitter();
|
|
919
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
920
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "
|
|
1539
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.11", ngImport: i0, type: ConfirmationDialogComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1540
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.11", type: ConfirmationDialogComponent, isStandalone: true, selector: "app-confirmation-dialog", inputs: { title: "title", body: "body", confirmText: "confirmText", cancelText: "cancelText" }, outputs: { onConfirm: "onConfirm", onCancel: "onCancel" }, ngImport: i0, template: `
|
|
921
1541
|
<div class="dialog">
|
|
922
1542
|
<div class="dialog__content">
|
|
923
1543
|
<h3 class="dialog__title">{{ title }}</h3>
|
|
@@ -934,7 +1554,7 @@ class ConfirmationDialogComponent {
|
|
|
934
1554
|
</div>
|
|
935
1555
|
`, isInline: true, styles: [".dialog{position:absolute;inset:0;background-color:rgba(var(--card-foreground),.5);z-index:50;display:flex;align-items:center;justify-content:center;border-radius:1.5rem}.dialog__content{background-color:var(--card);border-radius:1.5rem;padding:1.5rem;max-width:384px;width:100%;margin:0 1rem;box-shadow:0 0 3px 0 var(--babylai-primary-color-200)}.dialog__title{font-size:1rem;font-weight:700;margin-bottom:.5rem;text-align:center}.dialog__body{color:var(--card-foreground);margin-bottom:1.5rem;text-align:center}.dialog__actions{display:flex;gap:.75rem;justify-content:space-between;width:100%}.dialog__actions :host{width:100%}.dialog__actions app-button{flex:1;width:100%;display:block}.dialog__cancel-button{background-color:transparent!important;color:var(--card-foreground)!important;border:1px solid var(--card-foreground)!important;width:100%!important}.dialog__cancel-button:hover{background-color:rgba(var(--card-foreground),.1)!important;border-color:var(--card-foreground)!important}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "component", type: ButtonComponent, selector: "app-button", inputs: ["variant", "type", "disabled", "fullWidth", "className", "size", "direction"], outputs: ["onClick"] }] });
|
|
936
1556
|
}
|
|
937
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
1557
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.11", ngImport: i0, type: ConfirmationDialogComponent, decorators: [{
|
|
938
1558
|
type: Component,
|
|
939
1559
|
args: [{ selector: 'app-confirmation-dialog', standalone: true, imports: [CommonModule, ButtonComponent], template: `
|
|
940
1560
|
<div class="dialog">
|
|
@@ -1050,10 +1670,10 @@ class ReviewDialogComponent {
|
|
|
1050
1670
|
getCommentMinLength() {
|
|
1051
1671
|
return 10;
|
|
1052
1672
|
}
|
|
1053
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
1054
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "
|
|
1673
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.11", ngImport: i0, type: ReviewDialogComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1674
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.11", type: ReviewDialogComponent, isStandalone: true, selector: "app-review-dialog", inputs: { isOpen: "isOpen", isSubmitting: "isSubmitting" }, outputs: { close: "close", submitReview: "submitReview", skip: "skip" }, ngImport: i0, template: "@if (isOpen) {\n<div class=\"review-dialog-overlay\" (click)=\"onClose()\">\n <div class=\"review-dialog\" (click)=\"$event.stopPropagation()\">\n <!-- Header -->\n <div class=\"review-dialog__header\">\n <h3 class=\"review-dialog__title\">{{ 'ReviewDialogTitle' | translate }}</h3>\n <button class=\"review-dialog__close\" (click)=\"onClose()\" type=\"button\" [disabled]=\"isSubmitting\">\n <svg width=\"24\" height=\"24\" viewBox=\"0 0 24 24\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n <path d=\"M18 6L6 18M6 6L18 18\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"/>\n </svg>\n </button>\n </div>\n\n <!-- Divider -->\n <div class=\"review-dialog__divider\"></div>\n\n <!-- Content -->\n <div class=\"review-dialog__content\">\n <p class=\"review-dialog__description\">\n {{ 'ReviewDialogDescription' | translate }}\n </p>\n\n <!-- Rating Section -->\n <div class=\"review-dialog__rating-section\">\n <label class=\"review-dialog__label\">{{ 'ReviewDialogRatingLabel' | translate }}</label>\n <div class=\"review-dialog__stars\">\n @for (star of getStarsArray(); track star) {\n <button \n class=\"review-dialog__star\" \n [class.review-dialog__star--filled]=\"isStarFilled(star)\"\n [class.review-dialog__star--error]=\"ratingError\"\n [disabled]=\"isSubmitting\"\n (click)=\"onRatingClick(star)\"\n type=\"button\"\n >\n <svg width=\"24\" height=\"24\" viewBox=\"0 0 24 24\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n <path d=\"M12 2L15.09 8.26L22 9.27L17 14.14L18.18 21.02L12 17.77L5.82 21.02L7 14.14L2 9.27L8.91 8.26L12 2Z\" \n stroke=\"currentColor\" \n stroke-width=\"2\" \n stroke-linecap=\"round\" \n stroke-linejoin=\"round\"\n [attr.fill]=\"isStarFilled(star) ? 'currentColor' : 'none'\"/>\n </svg>\n </button>\n }\n </div>\n @if (ratingError) {\n <div class=\"review-dialog__error\">{{ ratingError }}</div>\n }\n </div>\n\n <!-- Comment Section -->\n <div class=\"review-dialog__comment-section\">\n <label class=\"review-dialog__label\">{{ 'ReviewDialogCommentLabel' | translate }}</label>\n <textarea \n class=\"review-dialog__textarea\"\n [class.review-dialog__textarea--error]=\"commentError\"\n [(ngModel)]=\"comment\"\n (ngModelChange)=\"onCommentChange()\"\n [placeholder]=\"'ReviewDialogCommentPlaceholder' | translate\"\n [maxlength]=\"getCommentMaxLength()\"\n [disabled]=\"isSubmitting\"\n rows=\"4\"\n ></textarea>\n <div class=\"review-dialog__comment-info\">\n <div class=\"review-dialog__char-count\">\n {{ getCommentLength() }}/{{ getCommentMaxLength() }} characters\n @if (getCommentLength() < getCommentMinLength()) {\n (minimum {{ getCommentMinLength() }})\n }\n </div>\n @if (commentError) {\n <div class=\"review-dialog__error\">{{ commentError }}</div>\n }\n </div>\n </div>\n </div>\n\n <!-- Divider -->\n <div class=\"review-dialog__divider\"></div>\n\n <!-- Actions -->\n <div class=\"review-dialog__actions\">\n <app-button \n variant=\"default\" \n [fullWidth]=\"true\" \n [disabled]=\"isSubmitting\"\n (click)=\"onSubmitReview()\"\n class=\"review-dialog__submit-btn\"\n >\n @if (isSubmitting) {\n Submitting...\n } @else {\n {{ 'ReviewDialogSubmitButton' | translate }}\n }\n </app-button>\n <app-button \n variant=\"outline\" \n [fullWidth]=\"true\" \n [disabled]=\"isSubmitting\"\n (click)=\"onSkip()\"\n class=\"review-dialog__skip-btn\"\n >\n {{ 'ReviewDialogSkipButton' | translate }}\n </app-button>\n </div>\n </div>\n</div>\n}\n", styles: [".review-dialog-overlay{position:absolute;inset:0;background-color:color-mix(in srgb,var(--card-foreground) 50%,transparent);z-index:50;display:flex;align-items:center;justify-content:center;border-radius:1.5rem}.review-dialog{background-color:var(--card);border-radius:1.5rem;max-width:384px;width:100%;margin:0 1rem;box-shadow:0 0 4px 0 var(--babylai-primary-color-200)}.review-dialog__header{display:flex;align-items:center;justify-content:space-between;padding:1rem}.review-dialog__title{color:var(--card-foreground);font-size:1rem;font-weight:700;margin:0}.review-dialog__close{background:none;border:none;color:var(--card-foreground);cursor:pointer;padding:.5rem;border-radius:9999px;display:flex;align-items:center;justify-content:center;transition:background-color .2s ease}.review-dialog__close:hover:not(:disabled){background-color:color-mix(in srgb,var(--card-foreground) 10%,transparent)}.review-dialog__close:disabled{opacity:.5;cursor:not-allowed}.review-dialog__divider{height:1px;background-color:var(--border)}.review-dialog__content{padding:1rem}.review-dialog__description{color:var(--card-foreground);font-size:.875rem;line-height:1.6}.review-dialog__label{color:var(--card-foreground);font-size:.875rem;font-weight:500;display:block;margin-bottom:.5rem}.review-dialog__stars{display:flex}.review-dialog__star{background:none;border:none;color:var(--card-foreground);cursor:pointer;padding:.25rem;border-radius:calc(var(--radius) - 4px);transition:all .2s ease;display:flex;align-items:center;justify-content:center}.review-dialog__star:hover{color:var(--babylai-primary-color);transform:scale(1.1)}.review-dialog__star--filled{color:var(--babylai-primary-color)}.review-dialog__star--error{color:var(--destructive)}.review-dialog__star:disabled{opacity:.5;cursor:not-allowed}.review-dialog__textarea{width:100%;background-color:var(--secondary);border:1px solid #4b5563;border-radius:.5rem;color:var(--card-foreground);font-size:.875rem;padding:.75rem;resize:vertical;min-height:100px;font-family:inherit}.review-dialog__textarea::placeholder{color:var(--card-foreground)}.review-dialog__textarea:focus{outline:none;border-color:var(--babylai-primary-color);box-shadow:0 0 0 3px color-mix(in srgb,var(--card-foreground) 10%,transparent)}.review-dialog__textarea--error{border-color:var(--destructive)}.review-dialog__textarea--error:focus{border-color:var(--destructive);box-shadow:0 0 0 3px #ef44441a}.review-dialog__textarea:disabled{opacity:.5;cursor:not-allowed;background-color:var(--secondary)}.review-dialog__error{color:var(--destructive);font-size:.75rem;margin-top:.25rem;display:flex;align-items:center;gap:.25rem}.review-dialog__comment-info{display:flex;flex-direction:column}.review-dialog__char-count{color:var(--card-foreground);font-size:.75rem;white-space:nowrap}.review-dialog__actions{display:flex;gap:.75rem;padding:1rem}.review-dialog__submit-btn{flex:1}.review-dialog__submit-btn:disabled{opacity:.5;cursor:not-allowed}.review-dialog__skip-btn{flex:1}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1$1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$1.MaxLengthValidator, selector: "[maxlength][formControlName],[maxlength][formControl],[maxlength][ngModel]", inputs: ["maxlength"] }, { kind: "directive", type: i1$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: ButtonComponent, selector: "app-button", inputs: ["variant", "type", "disabled", "fullWidth", "className", "size", "direction"], outputs: ["onClick"] }, { kind: "pipe", type: TranslatePipe, name: "translate" }] });
|
|
1055
1675
|
}
|
|
1056
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
1676
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.11", ngImport: i0, type: ReviewDialogComponent, decorators: [{
|
|
1057
1677
|
type: Component,
|
|
1058
1678
|
args: [{ selector: 'app-review-dialog', standalone: true, imports: [CommonModule, FormsModule, ButtonComponent, TranslatePipe], template: "@if (isOpen) {\n<div class=\"review-dialog-overlay\" (click)=\"onClose()\">\n <div class=\"review-dialog\" (click)=\"$event.stopPropagation()\">\n <!-- Header -->\n <div class=\"review-dialog__header\">\n <h3 class=\"review-dialog__title\">{{ 'ReviewDialogTitle' | translate }}</h3>\n <button class=\"review-dialog__close\" (click)=\"onClose()\" type=\"button\" [disabled]=\"isSubmitting\">\n <svg width=\"24\" height=\"24\" viewBox=\"0 0 24 24\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n <path d=\"M18 6L6 18M6 6L18 18\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"/>\n </svg>\n </button>\n </div>\n\n <!-- Divider -->\n <div class=\"review-dialog__divider\"></div>\n\n <!-- Content -->\n <div class=\"review-dialog__content\">\n <p class=\"review-dialog__description\">\n {{ 'ReviewDialogDescription' | translate }}\n </p>\n\n <!-- Rating Section -->\n <div class=\"review-dialog__rating-section\">\n <label class=\"review-dialog__label\">{{ 'ReviewDialogRatingLabel' | translate }}</label>\n <div class=\"review-dialog__stars\">\n @for (star of getStarsArray(); track star) {\n <button \n class=\"review-dialog__star\" \n [class.review-dialog__star--filled]=\"isStarFilled(star)\"\n [class.review-dialog__star--error]=\"ratingError\"\n [disabled]=\"isSubmitting\"\n (click)=\"onRatingClick(star)\"\n type=\"button\"\n >\n <svg width=\"24\" height=\"24\" viewBox=\"0 0 24 24\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n <path d=\"M12 2L15.09 8.26L22 9.27L17 14.14L18.18 21.02L12 17.77L5.82 21.02L7 14.14L2 9.27L8.91 8.26L12 2Z\" \n stroke=\"currentColor\" \n stroke-width=\"2\" \n stroke-linecap=\"round\" \n stroke-linejoin=\"round\"\n [attr.fill]=\"isStarFilled(star) ? 'currentColor' : 'none'\"/>\n </svg>\n </button>\n }\n </div>\n @if (ratingError) {\n <div class=\"review-dialog__error\">{{ ratingError }}</div>\n }\n </div>\n\n <!-- Comment Section -->\n <div class=\"review-dialog__comment-section\">\n <label class=\"review-dialog__label\">{{ 'ReviewDialogCommentLabel' | translate }}</label>\n <textarea \n class=\"review-dialog__textarea\"\n [class.review-dialog__textarea--error]=\"commentError\"\n [(ngModel)]=\"comment\"\n (ngModelChange)=\"onCommentChange()\"\n [placeholder]=\"'ReviewDialogCommentPlaceholder' | translate\"\n [maxlength]=\"getCommentMaxLength()\"\n [disabled]=\"isSubmitting\"\n rows=\"4\"\n ></textarea>\n <div class=\"review-dialog__comment-info\">\n <div class=\"review-dialog__char-count\">\n {{ getCommentLength() }}/{{ getCommentMaxLength() }} characters\n @if (getCommentLength() < getCommentMinLength()) {\n (minimum {{ getCommentMinLength() }})\n }\n </div>\n @if (commentError) {\n <div class=\"review-dialog__error\">{{ commentError }}</div>\n }\n </div>\n </div>\n </div>\n\n <!-- Divider -->\n <div class=\"review-dialog__divider\"></div>\n\n <!-- Actions -->\n <div class=\"review-dialog__actions\">\n <app-button \n variant=\"default\" \n [fullWidth]=\"true\" \n [disabled]=\"isSubmitting\"\n (click)=\"onSubmitReview()\"\n class=\"review-dialog__submit-btn\"\n >\n @if (isSubmitting) {\n Submitting...\n } @else {\n {{ 'ReviewDialogSubmitButton' | translate }}\n }\n </app-button>\n <app-button \n variant=\"outline\" \n [fullWidth]=\"true\" \n [disabled]=\"isSubmitting\"\n (click)=\"onSkip()\"\n class=\"review-dialog__skip-btn\"\n >\n {{ 'ReviewDialogSkipButton' | translate }}\n </app-button>\n </div>\n </div>\n</div>\n}\n", styles: [".review-dialog-overlay{position:absolute;inset:0;background-color:color-mix(in srgb,var(--card-foreground) 50%,transparent);z-index:50;display:flex;align-items:center;justify-content:center;border-radius:1.5rem}.review-dialog{background-color:var(--card);border-radius:1.5rem;max-width:384px;width:100%;margin:0 1rem;box-shadow:0 0 4px 0 var(--babylai-primary-color-200)}.review-dialog__header{display:flex;align-items:center;justify-content:space-between;padding:1rem}.review-dialog__title{color:var(--card-foreground);font-size:1rem;font-weight:700;margin:0}.review-dialog__close{background:none;border:none;color:var(--card-foreground);cursor:pointer;padding:.5rem;border-radius:9999px;display:flex;align-items:center;justify-content:center;transition:background-color .2s ease}.review-dialog__close:hover:not(:disabled){background-color:color-mix(in srgb,var(--card-foreground) 10%,transparent)}.review-dialog__close:disabled{opacity:.5;cursor:not-allowed}.review-dialog__divider{height:1px;background-color:var(--border)}.review-dialog__content{padding:1rem}.review-dialog__description{color:var(--card-foreground);font-size:.875rem;line-height:1.6}.review-dialog__label{color:var(--card-foreground);font-size:.875rem;font-weight:500;display:block;margin-bottom:.5rem}.review-dialog__stars{display:flex}.review-dialog__star{background:none;border:none;color:var(--card-foreground);cursor:pointer;padding:.25rem;border-radius:calc(var(--radius) - 4px);transition:all .2s ease;display:flex;align-items:center;justify-content:center}.review-dialog__star:hover{color:var(--babylai-primary-color);transform:scale(1.1)}.review-dialog__star--filled{color:var(--babylai-primary-color)}.review-dialog__star--error{color:var(--destructive)}.review-dialog__star:disabled{opacity:.5;cursor:not-allowed}.review-dialog__textarea{width:100%;background-color:var(--secondary);border:1px solid #4b5563;border-radius:.5rem;color:var(--card-foreground);font-size:.875rem;padding:.75rem;resize:vertical;min-height:100px;font-family:inherit}.review-dialog__textarea::placeholder{color:var(--card-foreground)}.review-dialog__textarea:focus{outline:none;border-color:var(--babylai-primary-color);box-shadow:0 0 0 3px color-mix(in srgb,var(--card-foreground) 10%,transparent)}.review-dialog__textarea--error{border-color:var(--destructive)}.review-dialog__textarea--error:focus{border-color:var(--destructive);box-shadow:0 0 0 3px #ef44441a}.review-dialog__textarea:disabled{opacity:.5;cursor:not-allowed;background-color:var(--secondary)}.review-dialog__error{color:var(--destructive);font-size:.75rem;margin-top:.25rem;display:flex;align-items:center;gap:.25rem}.review-dialog__comment-info{display:flex;flex-direction:column}.review-dialog__char-count{color:var(--card-foreground);font-size:.75rem;white-space:nowrap}.review-dialog__actions{display:flex;gap:.75rem;padding:1rem}.review-dialog__submit-btn{flex:1}.review-dialog__submit-btn:disabled{opacity:.5;cursor:not-allowed}.review-dialog__skip-btn{flex:1}\n"] }]
|
|
1059
1679
|
}], propDecorators: { isOpen: [{
|
|
@@ -1078,10 +1698,10 @@ class IntroSectionComponent {
|
|
|
1078
1698
|
handleNavigateToUrl(url) {
|
|
1079
1699
|
this.navigateToUrl.emit(url);
|
|
1080
1700
|
}
|
|
1081
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
1082
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "
|
|
1701
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.11", ngImport: i0, type: IntroSectionComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1702
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.11", type: IntroSectionComponent, isStandalone: true, selector: "app-intro-section", inputs: { currentLang: "currentLang" }, outputs: { showHelpScreenData: "showHelpScreenData", navigateToUrl: "navigateToUrl" }, ngImport: i0, template: "<div class=\"intro-section\">\n <h1 class=\"intro-title\">{{ \"ChatIntroMessage\" | translate }}</h1>\n</div>\n\n<div class=\"cards-section\">\n <app-card variant=\"rounded\" [class]=\"'babylai-p-8'\">\n <app-card-content>\n <div class=\"card-content\">\n <div class=\"babylai-info\">\n <div class=\"logo-container\">\n <svg\n class=\"logo\"\n viewBox=\"0 0 55 53\"\n fill=\"currentColor\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <path\n d=\"M8.53125 19.1353C8.53125 12.2804 14.0883 6.72339 20.9432 6.72339H41.6298C48.4847 6.72339 54.0418 12.2804 54.0418 19.1353V52.2339H20.9432C14.0883 52.2339 8.53125 46.6769 8.53125 39.8219V19.1353Z\"\n fill=\"#E5E5E5\"\n />\n <path\n d=\"M0 12.412C0 5.55702 5.55702 0 12.412 0H33.0985C39.9535 0 45.5105 5.55702 45.5105 12.412V33.0985C45.5105 39.9535 39.9535 45.5105 33.0985 45.5105H0V12.412Z\"\n fill=\"white\"\n />\n <path\n d=\"M14.3684 15.2203C14.3696 15.2162 14.3701 15.2142 14.3704 15.2132C14.5505 14.5816 15.4457 14.5816 15.6258 15.2132C15.6261 15.2142 15.6267 15.2162 15.6278 15.2203C15.6309 15.2311 15.6324 15.2365 15.6338 15.2416C16.4708 18.1971 18.7808 20.5071 21.7364 21.3441C21.7414 21.3455 21.7468 21.3471 21.7576 21.3501C21.7617 21.3512 21.7637 21.3518 21.7647 21.3521C22.3963 21.5322 22.3963 22.4274 21.7647 22.6075C21.7637 22.6078 21.7617 22.6084 21.7576 22.6095C21.7468 22.6126 21.7414 22.6141 21.7364 22.6155C18.7808 23.4525 16.4708 25.7625 15.6338 28.7181C15.6324 28.7231 15.6309 28.7285 15.6278 28.7393C15.6267 28.7434 15.6261 28.7454 15.6258 28.7464C15.4457 29.378 14.5505 29.378 14.3704 28.7464C14.3701 28.7454 14.3696 28.7434 14.3684 28.7393C14.3654 28.7285 14.3638 28.7231 14.3624 28.7181C13.5254 25.7625 11.2154 23.4525 8.25988 22.6155C8.25481 22.6141 8.24942 22.6126 8.23864 22.6095C8.23454 22.6084 8.2325 22.6078 8.23155 22.6075C7.5999 22.4274 7.5999 21.5322 8.23155 21.3521C8.2325 21.3518 8.23454 21.3512 8.23864 21.3501C8.24942 21.3471 8.25481 21.3455 8.25988 21.3441C11.2154 20.5071 13.5254 18.1971 14.3624 15.2416C14.3638 15.2365 14.3654 15.2311 14.3684 15.2203Z\"\n fill=\"currentColor\"\n />\n <path\n d=\"M36.7198 21.8503C36.7198 24.9207 34.2886 27.4098 31.2896 27.4098C28.2906 27.4098 25.8594 24.9207 25.8594 21.8503C25.8594 18.7799 28.2906 16.2908 31.2896 16.2908C34.2886 16.2908 36.7198 18.7799 36.7198 21.8503Z\"\n fill=\"currentColor\"\n />\n </svg>\n </div>\n <div class=\"info-text\">\n <h4 class=\"info-title\">\n {{ \"BabylaiTitle\" | translate }}\n </h4>\n <p class=\"info-description\">\n {{ \"BabylaiDescription\" | translate }}\n </p>\n </div>\n </div>\n <app-button\n variant=\"default\"\n [fullWidth]=\"true\"\n (click)=\"handleShowHelpScreenData()\"\n >\n {{ \"ChatNow\" | translate }}\n </app-button>\n </div>\n </app-card-content>\n </app-card>\n\n <app-card variant=\"rounded\" [class]=\"'babylai-p-6'\">\n <app-card-content>\n <div class=\"action-card\">\n <p class=\"action-text\">{{ \"TryBableAI\" | translate }}</p>\n <app-button\n variant=\"icon-bg\"\n (click)=\"handleNavigateToUrl('https://babylai.net/signup')\"\n >\n <svg\n width=\"100%\"\n height=\"100%\"\n [ngClass]=\"{\n icon: true,\n 'icon-rtl': currentLang === 'ar'\n }\"\n viewBox=\"0 0 9 16\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <path\n d=\"M1.5 0.999998L7.5 8L6 9.75M1.5 15L3.5 12.667\"\n stroke=\"white\"\n stroke-width=\"1.5\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n />\n </svg>\n </app-button>\n </div>\n </app-card-content>\n </app-card>\n\n <app-card variant=\"rounded\" [class]=\"'babylai-p-6'\">\n <app-card-content>\n <div class=\"action-card\">\n <p class=\"action-text\">{{ \"ContactUs\" | translate }}</p>\n <app-button\n variant=\"icon-bg\"\n (click)=\"handleNavigateToUrl('https://babylai.net')\"\n >\n <svg\n width=\"100%\"\n height=\"100%\"\n [ngClass]=\"{\n icon: true,\n 'icon-rtl': currentLang === 'ar'\n }\"\n viewBox=\"0 0 9 16\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <path\n d=\"M1.5 0.999998L7.5 8L6 9.75M1.5 15L3.5 12.667\"\n stroke=\"white\"\n stroke-width=\"1.5\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n />\n </svg>\n </app-button>\n </div>\n </app-card-content>\n </app-card>\n</div>\n", styles: [".intro-section{display:flex;flex-direction:column;gap:1rem;margin-top:2rem}.intro-section .intro-title{font-size:2.25rem;font-weight:700;color:var(--card-foreground);line-height:3.5rem}.cards-section{display:flex;flex-direction:column;gap:1rem;margin-top:2rem;width:100%;box-sizing:border-box;padding:0}.cards-section app-card{width:100%;display:block}.cards-section app-card ::ng-deep .card{width:100%;box-sizing:border-box}.cards-section app-card ::ng-deep .card__content{width:100%;box-sizing:border-box}.card-content{display:flex;flex-direction:column;gap:1rem;width:100%;box-sizing:border-box}.babylai-info{display:flex;align-items:center;justify-content:flex-start;gap:.75rem;width:100%}.logo-container{display:flex;align-items:center;justify-content:center;max-width:5rem;min-width:5rem;width:5rem;height:5rem;border-radius:9999px;background-color:var(--babylai-primary-color, #ad49e1);color:var(--babylai-primary-color, #ad49e1)}.logo-container .logo{width:3rem;height:3rem}.info-text{display:flex;flex-direction:column;align-items:flex-start;justify-content:flex-start;gap:0;flex:1}.info-text .info-title{font-size:1rem;color:var(--card-foreground);font-weight:600}.info-text .info-description{font-size:1rem;color:var(--card-foreground)}.action-card{display:flex;align-items:center;justify-content:space-between;gap:1rem;width:100%}.action-card .action-text{font-size:1rem;color:var(--card-foreground)}.action-card .icon{width:1.25rem;height:1.25rem}.action-card .icon-rtl{transform:rotate(180deg)}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "pipe", type: TranslatePipe, name: "translate" }, { kind: "component", type: CardComponent, selector: "app-card", inputs: ["variant", "class"] }, { kind: "component", type: CardContentComponent, selector: "app-card-content", inputs: ["class"] }, { kind: "component", type: ButtonComponent, selector: "app-button", inputs: ["variant", "type", "disabled", "fullWidth", "className", "size", "direction"], outputs: ["onClick"] }] });
|
|
1083
1703
|
}
|
|
1084
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
1704
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.11", ngImport: i0, type: IntroSectionComponent, decorators: [{
|
|
1085
1705
|
type: Component,
|
|
1086
1706
|
args: [{ selector: 'app-intro-section', standalone: true, imports: [
|
|
1087
1707
|
CommonModule,
|
|
@@ -1101,10 +1721,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.1", ngImpor
|
|
|
1101
1721
|
class FooterComponent {
|
|
1102
1722
|
showHelpScreenData = false;
|
|
1103
1723
|
showChat = false;
|
|
1104
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
1105
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "
|
|
1724
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.11", ngImport: i0, type: FooterComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1725
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.11", type: FooterComponent, isStandalone: true, selector: "app-footer", inputs: { showHelpScreenData: "showHelpScreenData", showChat: "showChat" }, ngImport: i0, template: "<div class=\"footer\">\n <a\n href=\"https://babylai.net\"\n target=\"_blank\"\n class=\"footer-link\"\n [ngClass]=\"{ 'light-text': !showHelpScreenData && !showChat }\"\n >\n {{ \"PoweredByBabylAI\" | translate }}\n </a>\n</div>\n", styles: [".footer{display:flex;justify-content:space-between;align-items:center;padding:.5rem 2rem}.footer .footer-link{font-size:.75rem;color:var(--card-foreground);width:100%;text-align:center;font-weight:700}.footer .footer-link.light-text{color:var(--card-foreground)}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "pipe", type: TranslatePipe, name: "translate" }] });
|
|
1106
1726
|
}
|
|
1107
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
1727
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.11", ngImport: i0, type: FooterComponent, decorators: [{
|
|
1108
1728
|
type: Component,
|
|
1109
1729
|
args: [{ selector: 'app-footer', standalone: true, imports: [CommonModule, TranslatePipe], template: "<div class=\"footer\">\n <a\n href=\"https://babylai.net\"\n target=\"_blank\"\n class=\"footer-link\"\n [ngClass]=\"{ 'light-text': !showHelpScreenData && !showChat }\"\n >\n {{ \"PoweredByBabylAI\" | translate }}\n </a>\n</div>\n", styles: [".footer{display:flex;justify-content:space-between;align-items:center;padding:.5rem 2rem}.footer .footer-link{font-size:.75rem;color:var(--card-foreground);width:100%;text-align:center;font-weight:700}.footer .footer-link.light-text{color:var(--card-foreground)}\n"] }]
|
|
1110
1730
|
}], propDecorators: { showHelpScreenData: [{
|
|
@@ -1120,10 +1740,10 @@ class BackButtonComponent {
|
|
|
1120
1740
|
get isRtl() {
|
|
1121
1741
|
return this.language === 'ar';
|
|
1122
1742
|
}
|
|
1123
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
1124
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "
|
|
1743
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.11", ngImport: i0, type: BackButtonComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1744
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.11", type: BackButtonComponent, isStandalone: true, selector: "app-back-button", inputs: { language: "language", size: "size" }, outputs: { onBack: "onBack" }, ngImport: i0, template: "<app-button\n [size]=\"size\"\n variant=\"icon-bg\"\n className=\"button--light-bg\"\n [direction]=\"isRtl ? 'rtl' : 'ltr'\"\n (click)=\"onBack.emit()\"\n>\n <svg\n [style.transform]=\"isRtl ? 'rotate(180deg)' : 'rotate(0deg)'\"\n class=\"back-button__icon\"\n width=\"8\"\n height=\"16\"\n viewBox=\"0 0 8 16\"\n fill=\"currentColor\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <path\n d=\"M7 15L1 8L2.5 6.25M7 1L5 3.333\"\n stroke=\"currentColor\"\n stroke-width=\"1.5\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n />\n </svg>\n</app-button>\n", styles: [".back-button__icon{width:100%;height:100%;color:var(--babylai-primary-color-500, #ad49e1)}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "component", type: ButtonComponent, selector: "app-button", inputs: ["variant", "type", "disabled", "fullWidth", "className", "size", "direction"], outputs: ["onClick"] }] });
|
|
1125
1745
|
}
|
|
1126
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
1746
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.11", ngImport: i0, type: BackButtonComponent, decorators: [{
|
|
1127
1747
|
type: Component,
|
|
1128
1748
|
args: [{ selector: 'app-back-button', standalone: true, imports: [CommonModule, ButtonComponent], template: "<app-button\n [size]=\"size\"\n variant=\"icon-bg\"\n className=\"button--light-bg\"\n [direction]=\"isRtl ? 'rtl' : 'ltr'\"\n (click)=\"onBack.emit()\"\n>\n <svg\n [style.transform]=\"isRtl ? 'rotate(180deg)' : 'rotate(0deg)'\"\n class=\"back-button__icon\"\n width=\"8\"\n height=\"16\"\n viewBox=\"0 0 8 16\"\n fill=\"currentColor\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <path\n d=\"M7 15L1 8L2.5 6.25M7 1L5 3.333\"\n stroke=\"currentColor\"\n stroke-width=\"1.5\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n />\n </svg>\n</app-button>\n", styles: [".back-button__icon{width:100%;height:100%;color:var(--babylai-primary-color-500, #ad49e1)}\n"] }]
|
|
1129
1749
|
}], propDecorators: { language: [{
|
|
@@ -1140,10 +1760,10 @@ class CloseButtonComponent {
|
|
|
1140
1760
|
get isRtl() {
|
|
1141
1761
|
return this.language === 'ar';
|
|
1142
1762
|
}
|
|
1143
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
1144
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "
|
|
1763
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.11", ngImport: i0, type: CloseButtonComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1764
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.11", type: CloseButtonComponent, isStandalone: true, selector: "app-close-button", inputs: { language: "language" }, outputs: { onClose: "onClose" }, ngImport: i0, template: "<app-button\n variant=\"icon-bg\"\n [direction]=\"isRtl ? 'rtl' : 'ltr'\"\n className=\"button--close-button\"\n (click)=\"onClose.emit()\"\n>\n <svg\n width=\"40\"\n height=\"40\"\n viewBox=\"0 0 55 55\"\n fill=\"currentColor\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <path\n d=\"M33.8568 21.1458L21.1484 33.8541M21.1484 21.1458L33.8568 33.8541M14.7943 5.48404C18.6562 3.24921 23.0407 2.07593 27.5026 2.08329C41.5402 2.08329 52.9193 13.4623 52.9193 27.5C52.9193 41.5376 41.5402 52.9166 27.5026 52.9166C13.465 52.9166 2.08594 41.5376 2.08594 27.5C2.08594 22.8716 3.32373 18.5279 5.48669 14.7916\"\n stroke=\"#fff\"\n stroke-width=\"3\"\n stroke-linecap=\"round\"\n />\n </svg>\n</app-button>\n", styles: [""], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "component", type: ButtonComponent, selector: "app-button", inputs: ["variant", "type", "disabled", "fullWidth", "className", "size", "direction"], outputs: ["onClick"] }] });
|
|
1145
1765
|
}
|
|
1146
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
1766
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.11", ngImport: i0, type: CloseButtonComponent, decorators: [{
|
|
1147
1767
|
type: Component,
|
|
1148
1768
|
args: [{ selector: 'app-close-button', standalone: true, imports: [CommonModule, ButtonComponent], template: "<app-button\n variant=\"icon-bg\"\n [direction]=\"isRtl ? 'rtl' : 'ltr'\"\n className=\"button--close-button\"\n (click)=\"onClose.emit()\"\n>\n <svg\n width=\"40\"\n height=\"40\"\n viewBox=\"0 0 55 55\"\n fill=\"currentColor\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <path\n d=\"M33.8568 21.1458L21.1484 33.8541M21.1484 21.1458L33.8568 33.8541M14.7943 5.48404C18.6562 3.24921 23.0407 2.07593 27.5026 2.08329C41.5402 2.08329 52.9193 13.4623 52.9193 27.5C52.9193 41.5376 41.5402 52.9166 27.5026 52.9166C13.465 52.9166 2.08594 41.5376 2.08594 27.5C2.08594 22.8716 3.32373 18.5279 5.48669 14.7916\"\n stroke=\"#fff\"\n stroke-width=\"3\"\n stroke-linecap=\"round\"\n />\n </svg>\n</app-button>\n" }]
|
|
1149
1769
|
}], propDecorators: { language: [{
|
|
@@ -1154,10 +1774,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.1", ngImpor
|
|
|
1154
1774
|
|
|
1155
1775
|
class SimpleCloseButtonComponent {
|
|
1156
1776
|
onClose = new EventEmitter();
|
|
1157
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
1158
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "
|
|
1777
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.11", ngImport: i0, type: SimpleCloseButtonComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1778
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.11", type: SimpleCloseButtonComponent, isStandalone: true, selector: "app-simple-close-button", outputs: { onClose: "onClose" }, ngImport: i0, template: "<app-button\n variant=\"icon-only\"\n class=\"simple-close-button\"\n (click)=\"onClose.emit()\"\n>\n <svg\n width=\"40\"\n height=\"40\"\n viewBox=\"0 0 55 55\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <path\n d=\"M33.8568 21.1458L21.1484 33.8541M21.1484 21.1458L33.8568 33.8541M14.7943 5.48404C18.6562 3.24921 23.0407 2.07593 27.5026 2.08329C41.5402 2.08329 52.9193 13.4623 52.9193 27.5C52.9193 41.5376 41.5402 52.9166 27.5026 52.9166C13.465 52.9166 2.08594 41.5376 2.08594 27.5C2.08594 22.8716 3.32373 18.5279 5.48669 14.7916\"\n stroke=\"white\"\n stroke-width=\"3\"\n stroke-linecap=\"round\"\n />\n </svg>\n</app-button>\n", styles: [".simple-close-button img{width:2.5rem;height:2.5rem}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "component", type: ButtonComponent, selector: "app-button", inputs: ["variant", "type", "disabled", "fullWidth", "className", "size", "direction"], outputs: ["onClick"] }] });
|
|
1159
1779
|
}
|
|
1160
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
1780
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.11", ngImport: i0, type: SimpleCloseButtonComponent, decorators: [{
|
|
1161
1781
|
type: Component,
|
|
1162
1782
|
args: [{ selector: 'app-simple-close-button', standalone: true, imports: [CommonModule, ButtonComponent], template: "<app-button\n variant=\"icon-only\"\n class=\"simple-close-button\"\n (click)=\"onClose.emit()\"\n>\n <svg\n width=\"40\"\n height=\"40\"\n viewBox=\"0 0 55 55\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <path\n d=\"M33.8568 21.1458L21.1484 33.8541M21.1484 21.1458L33.8568 33.8541M14.7943 5.48404C18.6562 3.24921 23.0407 2.07593 27.5026 2.08329C41.5402 2.08329 52.9193 13.4623 52.9193 27.5C52.9193 41.5376 41.5402 52.9166 27.5026 52.9166C13.465 52.9166 2.08594 41.5376 2.08594 27.5C2.08594 22.8716 3.32373 18.5279 5.48669 14.7916\"\n stroke=\"white\"\n stroke-width=\"3\"\n stroke-linecap=\"round\"\n />\n </svg>\n</app-button>\n", styles: [".simple-close-button img{width:2.5rem;height:2.5rem}\n"] }]
|
|
1163
1783
|
}], propDecorators: { onClose: [{
|
|
@@ -1167,7 +1787,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.1", ngImpor
|
|
|
1167
1787
|
class ThemeService {
|
|
1168
1788
|
primaryColor = '#ad49e1';
|
|
1169
1789
|
logoUrl = '';
|
|
1170
|
-
isDarkMode = signal(false
|
|
1790
|
+
isDarkMode = signal(false);
|
|
1171
1791
|
constructor() {
|
|
1172
1792
|
this.initializeDarkModeDetection();
|
|
1173
1793
|
}
|
|
@@ -1284,10 +1904,10 @@ class ThemeService {
|
|
|
1284
1904
|
this.setPrimaryColor(primaryColor);
|
|
1285
1905
|
this.setLogoUrl(logoUrl);
|
|
1286
1906
|
}
|
|
1287
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
1288
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
1907
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.11", ngImport: i0, type: ThemeService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
1908
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.11", ngImport: i0, type: ThemeService, providedIn: 'root' });
|
|
1289
1909
|
}
|
|
1290
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
1910
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.11", ngImport: i0, type: ThemeService, decorators: [{
|
|
1291
1911
|
type: Injectable,
|
|
1292
1912
|
args: [{
|
|
1293
1913
|
providedIn: 'root',
|
|
@@ -1301,10 +1921,10 @@ class LogoComponent {
|
|
|
1301
1921
|
get effectiveLogoUrl() {
|
|
1302
1922
|
return this.themeService.getLogoUrl();
|
|
1303
1923
|
}
|
|
1304
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
1305
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.1", type: LogoComponent, isStandalone: true, selector: "app-logo", inputs: { showLogo: "showLogo", size: "size" }, ngImport: i0, template: "@if (showLogo) { @if (effectiveLogoUrl) {\n<img\n [src]=\"effectiveLogoUrl\"\n [alt]=\"'Logo'\"\n class=\"logo\"\n [class.logo--small]=\"size === 'small'\"\n/>\n} @else {\n<svg\n xmlns=\"http://www.w3.org/2000/svg\"\n width=\"624\"\n height=\"203\"\n viewBox=\"0 0 624 203\"\n fill=\"none\"\n class=\"logo\"\n [class.logo--small]=\"size === 'small'\"\n>\n <path\n d=\"M33 74.5C33 47.9903 54.4903 26.5 81 26.5H161C187.51 26.5 209 47.9903 209 74.5V202.5H81C54.4903 202.5 33 181.01 33 154.5V74.5Z\"\n fill=\"#EBD3F8\"\n />\n <path\n d=\"M0 48.5C0 21.9903 21.4903 0.5 48 0.5H128C154.51 0.5 176 21.9903 176 48.5V128.5C176 155.01 154.51 176.5 128 176.5H0V48.5Z\"\n fill=\"#AD49E1\"\n />\n <path\n d=\"M55.5647 59.3595C55.5692 59.3436 55.5714 59.3357 55.5725 59.332C56.2691 56.8893 59.7309 56.8893 60.4275 59.332C60.4286 59.3357 60.4308 59.3436 60.4353 59.3595C60.447 59.4012 60.4529 59.422 60.4584 59.4416C63.6952 70.8715 72.6285 79.8048 84.0584 83.0416C84.078 83.0471 84.0988 83.053 84.1405 83.0647C84.1564 83.0692 84.1643 83.0714 84.1679 83.0725C86.6107 83.7691 86.6107 87.2309 84.1679 87.9275C84.1643 87.9286 84.1564 87.9308 84.1405 87.9353C84.0988 87.947 84.078 87.9529 84.0584 87.9584C72.6285 91.1952 63.6952 100.129 60.4584 111.558C60.4529 111.578 60.447 111.599 60.4353 111.641C60.4308 111.656 60.4286 111.664 60.4275 111.668C59.7309 114.111 56.2691 114.111 55.5725 111.668C55.5714 111.664 55.5692 111.656 55.5647 111.641C55.553 111.599 55.5471 111.578 55.5416 111.558C52.3048 100.129 43.3715 91.1952 31.9416 87.9584C31.922 87.9529 31.9012 87.947 31.8595 87.9353C31.8436 87.9308 31.8357 87.9286 31.832 87.9275C29.3893 87.2309 29.3893 83.7691 31.832 83.0725C31.8357 83.0714 31.8436 83.0692 31.8595 83.0647C31.9012 83.053 31.922 83.0471 31.9416 83.0416C43.3715 79.8048 52.3048 70.8715 55.5416 59.4416C55.5471 59.422 55.553 59.4012 55.5647 59.3595Z\"\n fill=\"#F9F9F9\"\n />\n <ellipse cx=\"121\" cy=\"85\" rx=\"21\" ry=\"21.5\" fill=\"#F9F9F9\" />\n <path d=\"M504.878 93.808V28.24H518.126V93.808H504.878Z\" fill=\"#AD49E1\" />\n <path\n d=\"M446 93.808L462.704 28.24H485.84L502.448 93.808H489.2L485.552 80.56H462.608L459.152 93.808H446ZM464.72 69.904H483.632L476.24 38.992H472.208L464.72 69.904Z\"\n fill=\"#AD49E1\"\n />\n <path d=\"M430.666 93.808V25.936H443.434V93.808H430.666Z\" fill=\"#18162C\" />\n <path\n d=\"M398.14 114.064L404.284 93.808H394.012L382.588 45.616H395.932L404.476 82.96H406.972L415.516 45.616H428.38L411.772 114.064H398.14Z\"\n fill=\"#18162C\"\n />\n <path\n d=\"M358.863 94.864C357.263 94.864 355.311 94.8 353.007 94.672C350.703 94.544 348.335 94.352 345.903 94.096C343.535 93.84 341.423 93.616 339.567 93.424V25.936H352.431V47.152C353.391 46.768 354.575 46.384 355.983 46C357.391 45.616 358.863 45.296 360.399 45.04C361.999 44.72 363.471 44.56 364.815 44.56C369.295 44.56 372.847 45.488 375.471 47.344C378.159 49.136 380.079 51.824 381.231 55.408C382.383 58.992 382.959 63.504 382.959 68.944C382.959 75.344 382.223 80.464 380.751 84.304C379.343 88.08 376.879 90.8 373.359 92.464C369.839 94.064 365.007 94.864 358.863 94.864ZM358.959 84.112C362.095 84.112 364.431 83.568 365.967 82.48C367.503 81.328 368.527 79.632 369.039 77.392C369.615 75.152 369.903 72.4 369.903 69.136C369.903 65.808 369.647 63.152 369.135 61.168C368.623 59.12 367.759 57.648 366.543 56.752C365.391 55.792 363.759 55.312 361.647 55.312C360.623 55.312 359.535 55.44 358.383 55.696C357.231 55.888 356.111 56.144 355.023 56.464C353.999 56.72 353.135 56.976 352.431 57.232V83.728C353.391 83.792 354.511 83.888 355.791 84.016C357.071 84.08 358.127 84.112 358.959 84.112Z\"\n fill=\"#18162C\"\n />\n <path\n d=\"M306.79 94.8639C301.798 94.8639 298.022 93.6159 295.462 91.1199C292.966 88.5599 291.718 84.7199 291.718 79.5999C291.718 76.0159 292.358 73.2319 293.638 71.2479C294.918 69.1999 296.806 67.7279 299.302 66.8319C301.862 65.8719 304.966 65.2959 308.614 65.1039L320.326 64.0479V61.1679C320.326 58.8639 319.75 57.2639 318.598 56.3679C317.446 55.4079 315.75 54.9279 313.51 54.9279C311.718 54.9279 309.638 54.9919 307.27 55.1199C304.966 55.2479 302.662 55.4079 300.358 55.5999C298.118 55.7919 296.166 55.9839 294.502 56.1759L294.118 47.1519C295.782 46.7679 297.766 46.3839 300.07 45.9999C302.438 45.5519 304.902 45.1999 307.462 44.9439C310.022 44.6879 312.39 44.5599 314.566 44.5599C318.662 44.5599 322.086 45.0719 324.838 46.0959C327.59 47.1199 329.67 48.8159 331.078 51.1839C332.486 53.4879 333.19 56.6239 333.19 60.5919V82.5759C333.318 83.4719 333.798 84.1759 334.63 84.6879C335.462 85.1359 336.422 85.4559 337.51 85.6479L337.222 94.4799C336.198 94.4799 335.174 94.4799 334.15 94.4799C333.19 94.5439 332.262 94.5439 331.366 94.4799C330.47 94.4799 329.67 94.4159 328.966 94.2879C327.494 94.0959 326.214 93.7119 325.126 93.1359C324.102 92.5599 323.27 91.9519 322.63 91.3119C321.606 91.7599 320.23 92.2719 318.502 92.8479C316.774 93.4239 314.886 93.9039 312.838 94.2879C310.854 94.6719 308.838 94.8639 306.79 94.8639ZM309.862 85.3599C311.078 85.3599 312.358 85.2319 313.702 84.9759C315.046 84.7199 316.294 84.4319 317.446 84.1119C318.662 83.7279 319.622 83.3759 320.326 83.0559V72.0159L310.534 72.8799C308.422 73.0719 306.886 73.7119 305.926 74.7999C305.03 75.8239 304.582 77.2959 304.582 79.2159C304.582 81.1359 304.998 82.6399 305.83 83.7279C306.726 84.8159 308.07 85.3599 309.862 85.3599Z\"\n fill=\"#18162C\"\n />\n <path\n d=\"M241 93.808V28.24H267.112C271.464 28.24 275.208 28.784 278.344 29.872C281.48 30.96 283.912 32.72 285.64 35.152C287.432 37.52 288.328 40.72 288.328 44.752C288.328 47.504 288.04 49.84 287.464 51.76C286.952 53.616 286.12 55.216 284.968 56.56C283.88 57.84 282.44 59.024 280.648 60.112C282.568 60.816 284.232 61.776 285.64 62.992C287.112 64.144 288.232 65.712 289 67.696C289.768 69.616 290.152 72.176 290.152 75.376C290.152 78.896 289.608 81.84 288.52 84.208C287.432 86.576 285.864 88.464 283.816 89.872C281.832 91.28 279.496 92.304 276.808 92.944C274.12 93.52 271.176 93.808 267.976 93.808H241ZM254.248 84.016H267.016C269.256 84.016 271.112 83.76 272.584 83.248C274.12 82.672 275.272 81.68 276.04 80.272C276.872 78.864 277.288 76.912 277.288 74.416C277.288 72.496 276.968 70.928 276.328 69.712C275.688 68.496 274.856 67.6 273.832 67.024C272.808 66.384 271.656 65.936 270.376 65.68C269.16 65.424 267.944 65.296 266.728 65.296H254.248V84.016ZM254.248 55.888H266.632C268.808 55.888 270.568 55.568 271.912 54.928C273.256 54.224 274.248 53.2 274.888 51.856C275.528 50.448 275.848 48.688 275.848 46.576C275.848 43.568 275.048 41.392 273.448 40.048C271.912 38.704 269.48 38.032 266.152 38.032H254.248V55.888Z\"\n fill=\"#18162C\"\n />\n <path\n d=\"M251.12 162.064V149.304L241.44 131.66H245.4L252.836 145.784L260.316 131.66H264.276L254.64 149.304V162.064H251.12ZM270.396 162.504C267.932 162.504 266.011 162.079 264.632 161.228C263.283 160.377 262.33 159.087 261.772 157.356C261.244 155.625 260.98 153.44 260.98 150.8C260.98 148.277 261.274 146.195 261.86 144.552C262.476 142.909 263.474 141.677 264.852 140.856C266.231 140.035 268.079 139.624 270.396 139.624C272.743 139.624 274.606 140.035 275.984 140.856C277.363 141.677 278.346 142.909 278.932 144.552C279.548 146.195 279.856 148.277 279.856 150.8C279.856 153.44 279.578 155.625 279.02 157.356C278.492 159.087 277.539 160.377 276.16 161.228C274.811 162.079 272.89 162.504 270.396 162.504ZM270.396 159.556C272.098 159.556 273.374 159.263 274.224 158.676C275.075 158.06 275.632 157.107 275.896 155.816C276.19 154.525 276.336 152.853 276.336 150.8C276.336 148.776 276.16 147.163 275.808 145.96C275.456 144.757 274.855 143.892 274.004 143.364C273.154 142.836 271.951 142.572 270.396 142.572C268.871 142.572 267.668 142.836 266.788 143.364C265.938 143.892 265.336 144.757 264.984 145.96C264.632 147.163 264.456 148.776 264.456 150.8C264.456 152.853 264.588 154.525 264.852 155.816C265.146 157.107 265.718 158.06 266.568 158.676C267.419 159.263 268.695 159.556 270.396 159.556ZM289.726 162.504C287.848 162.504 286.411 162.123 285.414 161.36C284.416 160.597 283.727 159.409 283.346 157.796C282.994 156.183 282.818 154.1 282.818 151.548V140.064H286.206V151.548C286.206 153.484 286.294 155.024 286.47 156.168C286.675 157.312 287.1 158.148 287.746 158.676C288.391 159.175 289.359 159.424 290.65 159.424C291.94 159.424 293.114 159.248 294.17 158.896C295.226 158.544 296.076 158.192 296.722 157.84V140.064H300.11V162.064H296.722V160.524C295.783 161.052 294.756 161.521 293.642 161.932C292.556 162.313 291.251 162.504 289.726 162.504ZM304.256 162.064V140.064H307.644V143.012C308.201 142.631 308.905 142.22 309.756 141.78C310.606 141.311 311.545 140.871 312.572 140.46C313.598 140.049 314.625 139.756 315.652 139.58V143.056C314.654 143.261 313.642 143.54 312.616 143.892C311.589 144.215 310.636 144.567 309.756 144.948C308.905 145.329 308.201 145.667 307.644 145.96V162.064H304.256ZM322.621 162.064L330.937 131.66H338.549L346.821 162.064H343.301L341.145 154.364H328.297L326.141 162.064H322.621ZM329.045 151.24H340.397L335.865 134.652H333.577L329.045 151.24ZM349.316 162.064V131.66H352.836V162.064H349.316ZM355.83 167.476L357.81 157.268H361.638L358.646 167.476H355.83ZM379.605 162.064V149.304L369.925 131.66H373.885L381.321 145.784L388.801 131.66H392.761L383.125 149.304V162.064H379.605ZM398.882 162.504C396.418 162.504 394.496 162.079 393.118 161.228C391.768 160.377 390.815 159.087 390.258 157.356C389.73 155.625 389.466 153.44 389.466 150.8C389.466 148.277 389.759 146.195 390.346 144.552C390.962 142.909 391.959 141.677 393.338 140.856C394.716 140.035 396.564 139.624 398.882 139.624C401.228 139.624 403.091 140.035 404.47 140.856C405.848 141.677 406.831 142.909 407.418 144.552C408.034 146.195 408.342 148.277 408.342 150.8C408.342 153.44 408.063 155.625 407.506 157.356C406.978 159.087 406.024 160.377 404.646 161.228C403.296 162.079 401.375 162.504 398.882 162.504ZM398.882 159.556C400.583 159.556 401.859 159.263 402.71 158.676C403.56 158.06 404.118 157.107 404.382 155.816C404.675 154.525 404.822 152.853 404.822 150.8C404.822 148.776 404.646 147.163 404.294 145.96C403.942 144.757 403.34 143.892 402.49 143.364C401.639 142.836 400.436 142.572 398.882 142.572C397.356 142.572 396.154 142.836 395.274 143.364C394.423 143.892 393.822 144.757 393.47 145.96C393.118 147.163 392.942 148.776 392.942 150.8C392.942 152.853 393.074 154.525 393.338 155.816C393.631 157.107 394.203 158.06 395.054 158.676C395.904 159.263 397.18 159.556 398.882 159.556ZM418.211 162.504C416.333 162.504 414.896 162.123 413.899 161.36C412.901 160.597 412.212 159.409 411.831 157.796C411.479 156.183 411.303 154.1 411.303 151.548V140.064H414.691V151.548C414.691 153.484 414.779 155.024 414.955 156.168C415.16 157.312 415.585 158.148 416.231 158.676C416.876 159.175 417.844 159.424 419.135 159.424C420.425 159.424 421.599 159.248 422.655 158.896C423.711 158.544 424.561 158.192 425.207 157.84V140.064H428.595V162.064H425.207V160.524C424.268 161.052 423.241 161.521 422.127 161.932C421.041 162.313 419.736 162.504 418.211 162.504ZM432.741 162.064V140.064H436.129V143.012C436.686 142.631 437.39 142.22 438.241 141.78C439.091 141.311 440.03 140.871 441.057 140.46C442.083 140.049 443.11 139.756 444.137 139.58V143.056C443.139 143.261 442.127 143.54 441.101 143.892C440.074 144.215 439.121 144.567 438.241 144.948C437.39 145.329 436.686 145.667 436.129 145.96V162.064H432.741ZM457.531 162.064L451.415 131.66H455.067L460.171 158.984H461.403L467.563 131.88H471.699L477.859 158.984H479.091L484.195 131.66H487.847L481.687 162.064H475.351L469.323 134.696H469.939L463.911 162.064H457.531ZM494.487 162.504C492.463 162.504 490.923 161.932 489.867 160.788C488.811 159.644 488.283 157.972 488.283 155.772C488.283 154.335 488.533 153.161 489.031 152.252C489.53 151.343 490.278 150.653 491.275 150.184C492.302 149.685 493.563 149.377 495.059 149.26L501.835 148.6V146.708C501.835 145.212 501.498 144.156 500.823 143.54C500.178 142.924 499.21 142.616 497.919 142.616C497.186 142.616 496.306 142.645 495.279 142.704C494.282 142.763 493.285 142.836 492.287 142.924C491.29 143.012 490.41 143.1 489.647 143.188L489.471 140.592C490.175 140.445 491.026 140.299 492.023 140.152C493.021 140.005 494.062 139.888 495.147 139.8C496.233 139.683 497.23 139.624 498.139 139.624C499.811 139.624 501.175 139.888 502.231 140.416C503.287 140.915 504.05 141.692 504.519 142.748C505.018 143.775 505.267 145.095 505.267 146.708V157.84C505.326 158.485 505.575 158.955 506.015 159.248C506.485 159.541 507.071 159.732 507.775 159.82L507.643 162.504C507.233 162.504 506.837 162.489 506.455 162.46C506.074 162.431 505.707 162.372 505.355 162.284C505.033 162.225 504.71 162.152 504.387 162.064C504.006 161.917 503.639 161.741 503.287 161.536C502.965 161.331 502.642 161.081 502.319 160.788C501.762 161.023 501.043 161.272 500.163 161.536C499.313 161.8 498.389 162.02 497.391 162.196C496.423 162.401 495.455 162.504 494.487 162.504ZM495.059 159.644C495.851 159.644 496.673 159.571 497.523 159.424C498.374 159.277 499.181 159.101 499.943 158.896C500.706 158.691 501.337 158.5 501.835 158.324V151.152L495.455 151.768C494.135 151.885 493.182 152.267 492.595 152.912C492.038 153.557 491.759 154.481 491.759 155.684C491.759 156.916 492.038 157.884 492.595 158.588C493.153 159.292 493.974 159.644 495.059 159.644ZM513.595 171.788L516.455 162.064H513.155L506.951 140.064H510.383L515.751 159.116H517.247L522.659 140.064H526.091L517.027 171.788H513.595Z\"\n fill=\"#18162C\"\n />\n</svg>\n} }\n", styles: [".logo{width:8rem;height:3rem;object-fit:contain}.logo--small{width:2.5rem;height:2.5rem}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }] });
|
|
1924
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.11", ngImport: i0, type: LogoComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1925
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.11", type: LogoComponent, isStandalone: true, selector: "app-logo", inputs: { showLogo: "showLogo", size: "size" }, ngImport: i0, template: "@if (showLogo) { @if (effectiveLogoUrl) {\n<img\n [src]=\"effectiveLogoUrl\"\n [alt]=\"'Logo'\"\n class=\"logo\"\n [class.logo--small]=\"size === 'small'\"\n/>\n} @else {\n<svg\n xmlns=\"http://www.w3.org/2000/svg\"\n width=\"624\"\n height=\"203\"\n viewBox=\"0 0 624 203\"\n fill=\"none\"\n class=\"logo\"\n [class.logo--small]=\"size === 'small'\"\n>\n <path\n d=\"M33 74.5C33 47.9903 54.4903 26.5 81 26.5H161C187.51 26.5 209 47.9903 209 74.5V202.5H81C54.4903 202.5 33 181.01 33 154.5V74.5Z\"\n fill=\"#EBD3F8\"\n />\n <path\n d=\"M0 48.5C0 21.9903 21.4903 0.5 48 0.5H128C154.51 0.5 176 21.9903 176 48.5V128.5C176 155.01 154.51 176.5 128 176.5H0V48.5Z\"\n fill=\"#AD49E1\"\n />\n <path\n d=\"M55.5647 59.3595C55.5692 59.3436 55.5714 59.3357 55.5725 59.332C56.2691 56.8893 59.7309 56.8893 60.4275 59.332C60.4286 59.3357 60.4308 59.3436 60.4353 59.3595C60.447 59.4012 60.4529 59.422 60.4584 59.4416C63.6952 70.8715 72.6285 79.8048 84.0584 83.0416C84.078 83.0471 84.0988 83.053 84.1405 83.0647C84.1564 83.0692 84.1643 83.0714 84.1679 83.0725C86.6107 83.7691 86.6107 87.2309 84.1679 87.9275C84.1643 87.9286 84.1564 87.9308 84.1405 87.9353C84.0988 87.947 84.078 87.9529 84.0584 87.9584C72.6285 91.1952 63.6952 100.129 60.4584 111.558C60.4529 111.578 60.447 111.599 60.4353 111.641C60.4308 111.656 60.4286 111.664 60.4275 111.668C59.7309 114.111 56.2691 114.111 55.5725 111.668C55.5714 111.664 55.5692 111.656 55.5647 111.641C55.553 111.599 55.5471 111.578 55.5416 111.558C52.3048 100.129 43.3715 91.1952 31.9416 87.9584C31.922 87.9529 31.9012 87.947 31.8595 87.9353C31.8436 87.9308 31.8357 87.9286 31.832 87.9275C29.3893 87.2309 29.3893 83.7691 31.832 83.0725C31.8357 83.0714 31.8436 83.0692 31.8595 83.0647C31.9012 83.053 31.922 83.0471 31.9416 83.0416C43.3715 79.8048 52.3048 70.8715 55.5416 59.4416C55.5471 59.422 55.553 59.4012 55.5647 59.3595Z\"\n fill=\"#F9F9F9\"\n />\n <ellipse cx=\"121\" cy=\"85\" rx=\"21\" ry=\"21.5\" fill=\"#F9F9F9\" />\n <path d=\"M504.878 93.808V28.24H518.126V93.808H504.878Z\" fill=\"#AD49E1\" />\n <path\n d=\"M446 93.808L462.704 28.24H485.84L502.448 93.808H489.2L485.552 80.56H462.608L459.152 93.808H446ZM464.72 69.904H483.632L476.24 38.992H472.208L464.72 69.904Z\"\n fill=\"#AD49E1\"\n />\n <path d=\"M430.666 93.808V25.936H443.434V93.808H430.666Z\" fill=\"#18162C\" />\n <path\n d=\"M398.14 114.064L404.284 93.808H394.012L382.588 45.616H395.932L404.476 82.96H406.972L415.516 45.616H428.38L411.772 114.064H398.14Z\"\n fill=\"#18162C\"\n />\n <path\n d=\"M358.863 94.864C357.263 94.864 355.311 94.8 353.007 94.672C350.703 94.544 348.335 94.352 345.903 94.096C343.535 93.84 341.423 93.616 339.567 93.424V25.936H352.431V47.152C353.391 46.768 354.575 46.384 355.983 46C357.391 45.616 358.863 45.296 360.399 45.04C361.999 44.72 363.471 44.56 364.815 44.56C369.295 44.56 372.847 45.488 375.471 47.344C378.159 49.136 380.079 51.824 381.231 55.408C382.383 58.992 382.959 63.504 382.959 68.944C382.959 75.344 382.223 80.464 380.751 84.304C379.343 88.08 376.879 90.8 373.359 92.464C369.839 94.064 365.007 94.864 358.863 94.864ZM358.959 84.112C362.095 84.112 364.431 83.568 365.967 82.48C367.503 81.328 368.527 79.632 369.039 77.392C369.615 75.152 369.903 72.4 369.903 69.136C369.903 65.808 369.647 63.152 369.135 61.168C368.623 59.12 367.759 57.648 366.543 56.752C365.391 55.792 363.759 55.312 361.647 55.312C360.623 55.312 359.535 55.44 358.383 55.696C357.231 55.888 356.111 56.144 355.023 56.464C353.999 56.72 353.135 56.976 352.431 57.232V83.728C353.391 83.792 354.511 83.888 355.791 84.016C357.071 84.08 358.127 84.112 358.959 84.112Z\"\n fill=\"#18162C\"\n />\n <path\n d=\"M306.79 94.8639C301.798 94.8639 298.022 93.6159 295.462 91.1199C292.966 88.5599 291.718 84.7199 291.718 79.5999C291.718 76.0159 292.358 73.2319 293.638 71.2479C294.918 69.1999 296.806 67.7279 299.302 66.8319C301.862 65.8719 304.966 65.2959 308.614 65.1039L320.326 64.0479V61.1679C320.326 58.8639 319.75 57.2639 318.598 56.3679C317.446 55.4079 315.75 54.9279 313.51 54.9279C311.718 54.9279 309.638 54.9919 307.27 55.1199C304.966 55.2479 302.662 55.4079 300.358 55.5999C298.118 55.7919 296.166 55.9839 294.502 56.1759L294.118 47.1519C295.782 46.7679 297.766 46.3839 300.07 45.9999C302.438 45.5519 304.902 45.1999 307.462 44.9439C310.022 44.6879 312.39 44.5599 314.566 44.5599C318.662 44.5599 322.086 45.0719 324.838 46.0959C327.59 47.1199 329.67 48.8159 331.078 51.1839C332.486 53.4879 333.19 56.6239 333.19 60.5919V82.5759C333.318 83.4719 333.798 84.1759 334.63 84.6879C335.462 85.1359 336.422 85.4559 337.51 85.6479L337.222 94.4799C336.198 94.4799 335.174 94.4799 334.15 94.4799C333.19 94.5439 332.262 94.5439 331.366 94.4799C330.47 94.4799 329.67 94.4159 328.966 94.2879C327.494 94.0959 326.214 93.7119 325.126 93.1359C324.102 92.5599 323.27 91.9519 322.63 91.3119C321.606 91.7599 320.23 92.2719 318.502 92.8479C316.774 93.4239 314.886 93.9039 312.838 94.2879C310.854 94.6719 308.838 94.8639 306.79 94.8639ZM309.862 85.3599C311.078 85.3599 312.358 85.2319 313.702 84.9759C315.046 84.7199 316.294 84.4319 317.446 84.1119C318.662 83.7279 319.622 83.3759 320.326 83.0559V72.0159L310.534 72.8799C308.422 73.0719 306.886 73.7119 305.926 74.7999C305.03 75.8239 304.582 77.2959 304.582 79.2159C304.582 81.1359 304.998 82.6399 305.83 83.7279C306.726 84.8159 308.07 85.3599 309.862 85.3599Z\"\n fill=\"#18162C\"\n />\n <path\n d=\"M241 93.808V28.24H267.112C271.464 28.24 275.208 28.784 278.344 29.872C281.48 30.96 283.912 32.72 285.64 35.152C287.432 37.52 288.328 40.72 288.328 44.752C288.328 47.504 288.04 49.84 287.464 51.76C286.952 53.616 286.12 55.216 284.968 56.56C283.88 57.84 282.44 59.024 280.648 60.112C282.568 60.816 284.232 61.776 285.64 62.992C287.112 64.144 288.232 65.712 289 67.696C289.768 69.616 290.152 72.176 290.152 75.376C290.152 78.896 289.608 81.84 288.52 84.208C287.432 86.576 285.864 88.464 283.816 89.872C281.832 91.28 279.496 92.304 276.808 92.944C274.12 93.52 271.176 93.808 267.976 93.808H241ZM254.248 84.016H267.016C269.256 84.016 271.112 83.76 272.584 83.248C274.12 82.672 275.272 81.68 276.04 80.272C276.872 78.864 277.288 76.912 277.288 74.416C277.288 72.496 276.968 70.928 276.328 69.712C275.688 68.496 274.856 67.6 273.832 67.024C272.808 66.384 271.656 65.936 270.376 65.68C269.16 65.424 267.944 65.296 266.728 65.296H254.248V84.016ZM254.248 55.888H266.632C268.808 55.888 270.568 55.568 271.912 54.928C273.256 54.224 274.248 53.2 274.888 51.856C275.528 50.448 275.848 48.688 275.848 46.576C275.848 43.568 275.048 41.392 273.448 40.048C271.912 38.704 269.48 38.032 266.152 38.032H254.248V55.888Z\"\n fill=\"#18162C\"\n />\n <path\n d=\"M251.12 162.064V149.304L241.44 131.66H245.4L252.836 145.784L260.316 131.66H264.276L254.64 149.304V162.064H251.12ZM270.396 162.504C267.932 162.504 266.011 162.079 264.632 161.228C263.283 160.377 262.33 159.087 261.772 157.356C261.244 155.625 260.98 153.44 260.98 150.8C260.98 148.277 261.274 146.195 261.86 144.552C262.476 142.909 263.474 141.677 264.852 140.856C266.231 140.035 268.079 139.624 270.396 139.624C272.743 139.624 274.606 140.035 275.984 140.856C277.363 141.677 278.346 142.909 278.932 144.552C279.548 146.195 279.856 148.277 279.856 150.8C279.856 153.44 279.578 155.625 279.02 157.356C278.492 159.087 277.539 160.377 276.16 161.228C274.811 162.079 272.89 162.504 270.396 162.504ZM270.396 159.556C272.098 159.556 273.374 159.263 274.224 158.676C275.075 158.06 275.632 157.107 275.896 155.816C276.19 154.525 276.336 152.853 276.336 150.8C276.336 148.776 276.16 147.163 275.808 145.96C275.456 144.757 274.855 143.892 274.004 143.364C273.154 142.836 271.951 142.572 270.396 142.572C268.871 142.572 267.668 142.836 266.788 143.364C265.938 143.892 265.336 144.757 264.984 145.96C264.632 147.163 264.456 148.776 264.456 150.8C264.456 152.853 264.588 154.525 264.852 155.816C265.146 157.107 265.718 158.06 266.568 158.676C267.419 159.263 268.695 159.556 270.396 159.556ZM289.726 162.504C287.848 162.504 286.411 162.123 285.414 161.36C284.416 160.597 283.727 159.409 283.346 157.796C282.994 156.183 282.818 154.1 282.818 151.548V140.064H286.206V151.548C286.206 153.484 286.294 155.024 286.47 156.168C286.675 157.312 287.1 158.148 287.746 158.676C288.391 159.175 289.359 159.424 290.65 159.424C291.94 159.424 293.114 159.248 294.17 158.896C295.226 158.544 296.076 158.192 296.722 157.84V140.064H300.11V162.064H296.722V160.524C295.783 161.052 294.756 161.521 293.642 161.932C292.556 162.313 291.251 162.504 289.726 162.504ZM304.256 162.064V140.064H307.644V143.012C308.201 142.631 308.905 142.22 309.756 141.78C310.606 141.311 311.545 140.871 312.572 140.46C313.598 140.049 314.625 139.756 315.652 139.58V143.056C314.654 143.261 313.642 143.54 312.616 143.892C311.589 144.215 310.636 144.567 309.756 144.948C308.905 145.329 308.201 145.667 307.644 145.96V162.064H304.256ZM322.621 162.064L330.937 131.66H338.549L346.821 162.064H343.301L341.145 154.364H328.297L326.141 162.064H322.621ZM329.045 151.24H340.397L335.865 134.652H333.577L329.045 151.24ZM349.316 162.064V131.66H352.836V162.064H349.316ZM355.83 167.476L357.81 157.268H361.638L358.646 167.476H355.83ZM379.605 162.064V149.304L369.925 131.66H373.885L381.321 145.784L388.801 131.66H392.761L383.125 149.304V162.064H379.605ZM398.882 162.504C396.418 162.504 394.496 162.079 393.118 161.228C391.768 160.377 390.815 159.087 390.258 157.356C389.73 155.625 389.466 153.44 389.466 150.8C389.466 148.277 389.759 146.195 390.346 144.552C390.962 142.909 391.959 141.677 393.338 140.856C394.716 140.035 396.564 139.624 398.882 139.624C401.228 139.624 403.091 140.035 404.47 140.856C405.848 141.677 406.831 142.909 407.418 144.552C408.034 146.195 408.342 148.277 408.342 150.8C408.342 153.44 408.063 155.625 407.506 157.356C406.978 159.087 406.024 160.377 404.646 161.228C403.296 162.079 401.375 162.504 398.882 162.504ZM398.882 159.556C400.583 159.556 401.859 159.263 402.71 158.676C403.56 158.06 404.118 157.107 404.382 155.816C404.675 154.525 404.822 152.853 404.822 150.8C404.822 148.776 404.646 147.163 404.294 145.96C403.942 144.757 403.34 143.892 402.49 143.364C401.639 142.836 400.436 142.572 398.882 142.572C397.356 142.572 396.154 142.836 395.274 143.364C394.423 143.892 393.822 144.757 393.47 145.96C393.118 147.163 392.942 148.776 392.942 150.8C392.942 152.853 393.074 154.525 393.338 155.816C393.631 157.107 394.203 158.06 395.054 158.676C395.904 159.263 397.18 159.556 398.882 159.556ZM418.211 162.504C416.333 162.504 414.896 162.123 413.899 161.36C412.901 160.597 412.212 159.409 411.831 157.796C411.479 156.183 411.303 154.1 411.303 151.548V140.064H414.691V151.548C414.691 153.484 414.779 155.024 414.955 156.168C415.16 157.312 415.585 158.148 416.231 158.676C416.876 159.175 417.844 159.424 419.135 159.424C420.425 159.424 421.599 159.248 422.655 158.896C423.711 158.544 424.561 158.192 425.207 157.84V140.064H428.595V162.064H425.207V160.524C424.268 161.052 423.241 161.521 422.127 161.932C421.041 162.313 419.736 162.504 418.211 162.504ZM432.741 162.064V140.064H436.129V143.012C436.686 142.631 437.39 142.22 438.241 141.78C439.091 141.311 440.03 140.871 441.057 140.46C442.083 140.049 443.11 139.756 444.137 139.58V143.056C443.139 143.261 442.127 143.54 441.101 143.892C440.074 144.215 439.121 144.567 438.241 144.948C437.39 145.329 436.686 145.667 436.129 145.96V162.064H432.741ZM457.531 162.064L451.415 131.66H455.067L460.171 158.984H461.403L467.563 131.88H471.699L477.859 158.984H479.091L484.195 131.66H487.847L481.687 162.064H475.351L469.323 134.696H469.939L463.911 162.064H457.531ZM494.487 162.504C492.463 162.504 490.923 161.932 489.867 160.788C488.811 159.644 488.283 157.972 488.283 155.772C488.283 154.335 488.533 153.161 489.031 152.252C489.53 151.343 490.278 150.653 491.275 150.184C492.302 149.685 493.563 149.377 495.059 149.26L501.835 148.6V146.708C501.835 145.212 501.498 144.156 500.823 143.54C500.178 142.924 499.21 142.616 497.919 142.616C497.186 142.616 496.306 142.645 495.279 142.704C494.282 142.763 493.285 142.836 492.287 142.924C491.29 143.012 490.41 143.1 489.647 143.188L489.471 140.592C490.175 140.445 491.026 140.299 492.023 140.152C493.021 140.005 494.062 139.888 495.147 139.8C496.233 139.683 497.23 139.624 498.139 139.624C499.811 139.624 501.175 139.888 502.231 140.416C503.287 140.915 504.05 141.692 504.519 142.748C505.018 143.775 505.267 145.095 505.267 146.708V157.84C505.326 158.485 505.575 158.955 506.015 159.248C506.485 159.541 507.071 159.732 507.775 159.82L507.643 162.504C507.233 162.504 506.837 162.489 506.455 162.46C506.074 162.431 505.707 162.372 505.355 162.284C505.033 162.225 504.71 162.152 504.387 162.064C504.006 161.917 503.639 161.741 503.287 161.536C502.965 161.331 502.642 161.081 502.319 160.788C501.762 161.023 501.043 161.272 500.163 161.536C499.313 161.8 498.389 162.02 497.391 162.196C496.423 162.401 495.455 162.504 494.487 162.504ZM495.059 159.644C495.851 159.644 496.673 159.571 497.523 159.424C498.374 159.277 499.181 159.101 499.943 158.896C500.706 158.691 501.337 158.5 501.835 158.324V151.152L495.455 151.768C494.135 151.885 493.182 152.267 492.595 152.912C492.038 153.557 491.759 154.481 491.759 155.684C491.759 156.916 492.038 157.884 492.595 158.588C493.153 159.292 493.974 159.644 495.059 159.644ZM513.595 171.788L516.455 162.064H513.155L506.951 140.064H510.383L515.751 159.116H517.247L522.659 140.064H526.091L517.027 171.788H513.595Z\"\n fill=\"#18162C\"\n />\n</svg>\n} }\n", styles: [".logo{width:8rem;height:3rem;object-fit:contain}.logo--small{width:2.5rem;height:2.5rem}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }] });
|
|
1306
1926
|
}
|
|
1307
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
1927
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.11", ngImport: i0, type: LogoComponent, decorators: [{
|
|
1308
1928
|
type: Component,
|
|
1309
1929
|
args: [{ selector: 'app-logo', standalone: true, imports: [CommonModule], template: "@if (showLogo) { @if (effectiveLogoUrl) {\n<img\n [src]=\"effectiveLogoUrl\"\n [alt]=\"'Logo'\"\n class=\"logo\"\n [class.logo--small]=\"size === 'small'\"\n/>\n} @else {\n<svg\n xmlns=\"http://www.w3.org/2000/svg\"\n width=\"624\"\n height=\"203\"\n viewBox=\"0 0 624 203\"\n fill=\"none\"\n class=\"logo\"\n [class.logo--small]=\"size === 'small'\"\n>\n <path\n d=\"M33 74.5C33 47.9903 54.4903 26.5 81 26.5H161C187.51 26.5 209 47.9903 209 74.5V202.5H81C54.4903 202.5 33 181.01 33 154.5V74.5Z\"\n fill=\"#EBD3F8\"\n />\n <path\n d=\"M0 48.5C0 21.9903 21.4903 0.5 48 0.5H128C154.51 0.5 176 21.9903 176 48.5V128.5C176 155.01 154.51 176.5 128 176.5H0V48.5Z\"\n fill=\"#AD49E1\"\n />\n <path\n d=\"M55.5647 59.3595C55.5692 59.3436 55.5714 59.3357 55.5725 59.332C56.2691 56.8893 59.7309 56.8893 60.4275 59.332C60.4286 59.3357 60.4308 59.3436 60.4353 59.3595C60.447 59.4012 60.4529 59.422 60.4584 59.4416C63.6952 70.8715 72.6285 79.8048 84.0584 83.0416C84.078 83.0471 84.0988 83.053 84.1405 83.0647C84.1564 83.0692 84.1643 83.0714 84.1679 83.0725C86.6107 83.7691 86.6107 87.2309 84.1679 87.9275C84.1643 87.9286 84.1564 87.9308 84.1405 87.9353C84.0988 87.947 84.078 87.9529 84.0584 87.9584C72.6285 91.1952 63.6952 100.129 60.4584 111.558C60.4529 111.578 60.447 111.599 60.4353 111.641C60.4308 111.656 60.4286 111.664 60.4275 111.668C59.7309 114.111 56.2691 114.111 55.5725 111.668C55.5714 111.664 55.5692 111.656 55.5647 111.641C55.553 111.599 55.5471 111.578 55.5416 111.558C52.3048 100.129 43.3715 91.1952 31.9416 87.9584C31.922 87.9529 31.9012 87.947 31.8595 87.9353C31.8436 87.9308 31.8357 87.9286 31.832 87.9275C29.3893 87.2309 29.3893 83.7691 31.832 83.0725C31.8357 83.0714 31.8436 83.0692 31.8595 83.0647C31.9012 83.053 31.922 83.0471 31.9416 83.0416C43.3715 79.8048 52.3048 70.8715 55.5416 59.4416C55.5471 59.422 55.553 59.4012 55.5647 59.3595Z\"\n fill=\"#F9F9F9\"\n />\n <ellipse cx=\"121\" cy=\"85\" rx=\"21\" ry=\"21.5\" fill=\"#F9F9F9\" />\n <path d=\"M504.878 93.808V28.24H518.126V93.808H504.878Z\" fill=\"#AD49E1\" />\n <path\n d=\"M446 93.808L462.704 28.24H485.84L502.448 93.808H489.2L485.552 80.56H462.608L459.152 93.808H446ZM464.72 69.904H483.632L476.24 38.992H472.208L464.72 69.904Z\"\n fill=\"#AD49E1\"\n />\n <path d=\"M430.666 93.808V25.936H443.434V93.808H430.666Z\" fill=\"#18162C\" />\n <path\n d=\"M398.14 114.064L404.284 93.808H394.012L382.588 45.616H395.932L404.476 82.96H406.972L415.516 45.616H428.38L411.772 114.064H398.14Z\"\n fill=\"#18162C\"\n />\n <path\n d=\"M358.863 94.864C357.263 94.864 355.311 94.8 353.007 94.672C350.703 94.544 348.335 94.352 345.903 94.096C343.535 93.84 341.423 93.616 339.567 93.424V25.936H352.431V47.152C353.391 46.768 354.575 46.384 355.983 46C357.391 45.616 358.863 45.296 360.399 45.04C361.999 44.72 363.471 44.56 364.815 44.56C369.295 44.56 372.847 45.488 375.471 47.344C378.159 49.136 380.079 51.824 381.231 55.408C382.383 58.992 382.959 63.504 382.959 68.944C382.959 75.344 382.223 80.464 380.751 84.304C379.343 88.08 376.879 90.8 373.359 92.464C369.839 94.064 365.007 94.864 358.863 94.864ZM358.959 84.112C362.095 84.112 364.431 83.568 365.967 82.48C367.503 81.328 368.527 79.632 369.039 77.392C369.615 75.152 369.903 72.4 369.903 69.136C369.903 65.808 369.647 63.152 369.135 61.168C368.623 59.12 367.759 57.648 366.543 56.752C365.391 55.792 363.759 55.312 361.647 55.312C360.623 55.312 359.535 55.44 358.383 55.696C357.231 55.888 356.111 56.144 355.023 56.464C353.999 56.72 353.135 56.976 352.431 57.232V83.728C353.391 83.792 354.511 83.888 355.791 84.016C357.071 84.08 358.127 84.112 358.959 84.112Z\"\n fill=\"#18162C\"\n />\n <path\n d=\"M306.79 94.8639C301.798 94.8639 298.022 93.6159 295.462 91.1199C292.966 88.5599 291.718 84.7199 291.718 79.5999C291.718 76.0159 292.358 73.2319 293.638 71.2479C294.918 69.1999 296.806 67.7279 299.302 66.8319C301.862 65.8719 304.966 65.2959 308.614 65.1039L320.326 64.0479V61.1679C320.326 58.8639 319.75 57.2639 318.598 56.3679C317.446 55.4079 315.75 54.9279 313.51 54.9279C311.718 54.9279 309.638 54.9919 307.27 55.1199C304.966 55.2479 302.662 55.4079 300.358 55.5999C298.118 55.7919 296.166 55.9839 294.502 56.1759L294.118 47.1519C295.782 46.7679 297.766 46.3839 300.07 45.9999C302.438 45.5519 304.902 45.1999 307.462 44.9439C310.022 44.6879 312.39 44.5599 314.566 44.5599C318.662 44.5599 322.086 45.0719 324.838 46.0959C327.59 47.1199 329.67 48.8159 331.078 51.1839C332.486 53.4879 333.19 56.6239 333.19 60.5919V82.5759C333.318 83.4719 333.798 84.1759 334.63 84.6879C335.462 85.1359 336.422 85.4559 337.51 85.6479L337.222 94.4799C336.198 94.4799 335.174 94.4799 334.15 94.4799C333.19 94.5439 332.262 94.5439 331.366 94.4799C330.47 94.4799 329.67 94.4159 328.966 94.2879C327.494 94.0959 326.214 93.7119 325.126 93.1359C324.102 92.5599 323.27 91.9519 322.63 91.3119C321.606 91.7599 320.23 92.2719 318.502 92.8479C316.774 93.4239 314.886 93.9039 312.838 94.2879C310.854 94.6719 308.838 94.8639 306.79 94.8639ZM309.862 85.3599C311.078 85.3599 312.358 85.2319 313.702 84.9759C315.046 84.7199 316.294 84.4319 317.446 84.1119C318.662 83.7279 319.622 83.3759 320.326 83.0559V72.0159L310.534 72.8799C308.422 73.0719 306.886 73.7119 305.926 74.7999C305.03 75.8239 304.582 77.2959 304.582 79.2159C304.582 81.1359 304.998 82.6399 305.83 83.7279C306.726 84.8159 308.07 85.3599 309.862 85.3599Z\"\n fill=\"#18162C\"\n />\n <path\n d=\"M241 93.808V28.24H267.112C271.464 28.24 275.208 28.784 278.344 29.872C281.48 30.96 283.912 32.72 285.64 35.152C287.432 37.52 288.328 40.72 288.328 44.752C288.328 47.504 288.04 49.84 287.464 51.76C286.952 53.616 286.12 55.216 284.968 56.56C283.88 57.84 282.44 59.024 280.648 60.112C282.568 60.816 284.232 61.776 285.64 62.992C287.112 64.144 288.232 65.712 289 67.696C289.768 69.616 290.152 72.176 290.152 75.376C290.152 78.896 289.608 81.84 288.52 84.208C287.432 86.576 285.864 88.464 283.816 89.872C281.832 91.28 279.496 92.304 276.808 92.944C274.12 93.52 271.176 93.808 267.976 93.808H241ZM254.248 84.016H267.016C269.256 84.016 271.112 83.76 272.584 83.248C274.12 82.672 275.272 81.68 276.04 80.272C276.872 78.864 277.288 76.912 277.288 74.416C277.288 72.496 276.968 70.928 276.328 69.712C275.688 68.496 274.856 67.6 273.832 67.024C272.808 66.384 271.656 65.936 270.376 65.68C269.16 65.424 267.944 65.296 266.728 65.296H254.248V84.016ZM254.248 55.888H266.632C268.808 55.888 270.568 55.568 271.912 54.928C273.256 54.224 274.248 53.2 274.888 51.856C275.528 50.448 275.848 48.688 275.848 46.576C275.848 43.568 275.048 41.392 273.448 40.048C271.912 38.704 269.48 38.032 266.152 38.032H254.248V55.888Z\"\n fill=\"#18162C\"\n />\n <path\n d=\"M251.12 162.064V149.304L241.44 131.66H245.4L252.836 145.784L260.316 131.66H264.276L254.64 149.304V162.064H251.12ZM270.396 162.504C267.932 162.504 266.011 162.079 264.632 161.228C263.283 160.377 262.33 159.087 261.772 157.356C261.244 155.625 260.98 153.44 260.98 150.8C260.98 148.277 261.274 146.195 261.86 144.552C262.476 142.909 263.474 141.677 264.852 140.856C266.231 140.035 268.079 139.624 270.396 139.624C272.743 139.624 274.606 140.035 275.984 140.856C277.363 141.677 278.346 142.909 278.932 144.552C279.548 146.195 279.856 148.277 279.856 150.8C279.856 153.44 279.578 155.625 279.02 157.356C278.492 159.087 277.539 160.377 276.16 161.228C274.811 162.079 272.89 162.504 270.396 162.504ZM270.396 159.556C272.098 159.556 273.374 159.263 274.224 158.676C275.075 158.06 275.632 157.107 275.896 155.816C276.19 154.525 276.336 152.853 276.336 150.8C276.336 148.776 276.16 147.163 275.808 145.96C275.456 144.757 274.855 143.892 274.004 143.364C273.154 142.836 271.951 142.572 270.396 142.572C268.871 142.572 267.668 142.836 266.788 143.364C265.938 143.892 265.336 144.757 264.984 145.96C264.632 147.163 264.456 148.776 264.456 150.8C264.456 152.853 264.588 154.525 264.852 155.816C265.146 157.107 265.718 158.06 266.568 158.676C267.419 159.263 268.695 159.556 270.396 159.556ZM289.726 162.504C287.848 162.504 286.411 162.123 285.414 161.36C284.416 160.597 283.727 159.409 283.346 157.796C282.994 156.183 282.818 154.1 282.818 151.548V140.064H286.206V151.548C286.206 153.484 286.294 155.024 286.47 156.168C286.675 157.312 287.1 158.148 287.746 158.676C288.391 159.175 289.359 159.424 290.65 159.424C291.94 159.424 293.114 159.248 294.17 158.896C295.226 158.544 296.076 158.192 296.722 157.84V140.064H300.11V162.064H296.722V160.524C295.783 161.052 294.756 161.521 293.642 161.932C292.556 162.313 291.251 162.504 289.726 162.504ZM304.256 162.064V140.064H307.644V143.012C308.201 142.631 308.905 142.22 309.756 141.78C310.606 141.311 311.545 140.871 312.572 140.46C313.598 140.049 314.625 139.756 315.652 139.58V143.056C314.654 143.261 313.642 143.54 312.616 143.892C311.589 144.215 310.636 144.567 309.756 144.948C308.905 145.329 308.201 145.667 307.644 145.96V162.064H304.256ZM322.621 162.064L330.937 131.66H338.549L346.821 162.064H343.301L341.145 154.364H328.297L326.141 162.064H322.621ZM329.045 151.24H340.397L335.865 134.652H333.577L329.045 151.24ZM349.316 162.064V131.66H352.836V162.064H349.316ZM355.83 167.476L357.81 157.268H361.638L358.646 167.476H355.83ZM379.605 162.064V149.304L369.925 131.66H373.885L381.321 145.784L388.801 131.66H392.761L383.125 149.304V162.064H379.605ZM398.882 162.504C396.418 162.504 394.496 162.079 393.118 161.228C391.768 160.377 390.815 159.087 390.258 157.356C389.73 155.625 389.466 153.44 389.466 150.8C389.466 148.277 389.759 146.195 390.346 144.552C390.962 142.909 391.959 141.677 393.338 140.856C394.716 140.035 396.564 139.624 398.882 139.624C401.228 139.624 403.091 140.035 404.47 140.856C405.848 141.677 406.831 142.909 407.418 144.552C408.034 146.195 408.342 148.277 408.342 150.8C408.342 153.44 408.063 155.625 407.506 157.356C406.978 159.087 406.024 160.377 404.646 161.228C403.296 162.079 401.375 162.504 398.882 162.504ZM398.882 159.556C400.583 159.556 401.859 159.263 402.71 158.676C403.56 158.06 404.118 157.107 404.382 155.816C404.675 154.525 404.822 152.853 404.822 150.8C404.822 148.776 404.646 147.163 404.294 145.96C403.942 144.757 403.34 143.892 402.49 143.364C401.639 142.836 400.436 142.572 398.882 142.572C397.356 142.572 396.154 142.836 395.274 143.364C394.423 143.892 393.822 144.757 393.47 145.96C393.118 147.163 392.942 148.776 392.942 150.8C392.942 152.853 393.074 154.525 393.338 155.816C393.631 157.107 394.203 158.06 395.054 158.676C395.904 159.263 397.18 159.556 398.882 159.556ZM418.211 162.504C416.333 162.504 414.896 162.123 413.899 161.36C412.901 160.597 412.212 159.409 411.831 157.796C411.479 156.183 411.303 154.1 411.303 151.548V140.064H414.691V151.548C414.691 153.484 414.779 155.024 414.955 156.168C415.16 157.312 415.585 158.148 416.231 158.676C416.876 159.175 417.844 159.424 419.135 159.424C420.425 159.424 421.599 159.248 422.655 158.896C423.711 158.544 424.561 158.192 425.207 157.84V140.064H428.595V162.064H425.207V160.524C424.268 161.052 423.241 161.521 422.127 161.932C421.041 162.313 419.736 162.504 418.211 162.504ZM432.741 162.064V140.064H436.129V143.012C436.686 142.631 437.39 142.22 438.241 141.78C439.091 141.311 440.03 140.871 441.057 140.46C442.083 140.049 443.11 139.756 444.137 139.58V143.056C443.139 143.261 442.127 143.54 441.101 143.892C440.074 144.215 439.121 144.567 438.241 144.948C437.39 145.329 436.686 145.667 436.129 145.96V162.064H432.741ZM457.531 162.064L451.415 131.66H455.067L460.171 158.984H461.403L467.563 131.88H471.699L477.859 158.984H479.091L484.195 131.66H487.847L481.687 162.064H475.351L469.323 134.696H469.939L463.911 162.064H457.531ZM494.487 162.504C492.463 162.504 490.923 161.932 489.867 160.788C488.811 159.644 488.283 157.972 488.283 155.772C488.283 154.335 488.533 153.161 489.031 152.252C489.53 151.343 490.278 150.653 491.275 150.184C492.302 149.685 493.563 149.377 495.059 149.26L501.835 148.6V146.708C501.835 145.212 501.498 144.156 500.823 143.54C500.178 142.924 499.21 142.616 497.919 142.616C497.186 142.616 496.306 142.645 495.279 142.704C494.282 142.763 493.285 142.836 492.287 142.924C491.29 143.012 490.41 143.1 489.647 143.188L489.471 140.592C490.175 140.445 491.026 140.299 492.023 140.152C493.021 140.005 494.062 139.888 495.147 139.8C496.233 139.683 497.23 139.624 498.139 139.624C499.811 139.624 501.175 139.888 502.231 140.416C503.287 140.915 504.05 141.692 504.519 142.748C505.018 143.775 505.267 145.095 505.267 146.708V157.84C505.326 158.485 505.575 158.955 506.015 159.248C506.485 159.541 507.071 159.732 507.775 159.82L507.643 162.504C507.233 162.504 506.837 162.489 506.455 162.46C506.074 162.431 505.707 162.372 505.355 162.284C505.033 162.225 504.71 162.152 504.387 162.064C504.006 161.917 503.639 161.741 503.287 161.536C502.965 161.331 502.642 161.081 502.319 160.788C501.762 161.023 501.043 161.272 500.163 161.536C499.313 161.8 498.389 162.02 497.391 162.196C496.423 162.401 495.455 162.504 494.487 162.504ZM495.059 159.644C495.851 159.644 496.673 159.571 497.523 159.424C498.374 159.277 499.181 159.101 499.943 158.896C500.706 158.691 501.337 158.5 501.835 158.324V151.152L495.455 151.768C494.135 151.885 493.182 152.267 492.595 152.912C492.038 153.557 491.759 154.481 491.759 155.684C491.759 156.916 492.038 157.884 492.595 158.588C493.153 159.292 493.974 159.644 495.059 159.644ZM513.595 171.788L516.455 162.064H513.155L506.951 140.064H510.383L515.751 159.116H517.247L522.659 140.064H526.091L517.027 171.788H513.595Z\"\n fill=\"#18162C\"\n />\n</svg>\n} }\n", styles: [".logo{width:8rem;height:3rem;object-fit:contain}.logo--small{width:2.5rem;height:2.5rem}\n"] }]
|
|
1310
1930
|
}], propDecorators: { showLogo: [{
|
|
@@ -1324,10 +1944,10 @@ class HeaderComponent {
|
|
|
1324
1944
|
get isRtl() {
|
|
1325
1945
|
return this.language === 'ar';
|
|
1326
1946
|
}
|
|
1327
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
1328
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "
|
|
1947
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.11", ngImport: i0, type: HeaderComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1948
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.11", type: HeaderComponent, isStandalone: true, selector: "app-header", inputs: { headerType: "headerType", showBackButton: "showBackButton", showLogo: "showLogo", language: "language", showCloseButton: "showCloseButton" }, outputs: { onBack: "onBack", onClose: "onClose" }, ngImport: i0, template: "<div class=\"header\">\n @if (showBackButton) {\n <app-back-button\n [size]=\"'medium'\"\n [language]=\"language\"\n (onBack)=\"onBack.emit()\"\n ></app-back-button>\n }\n \n @if (showCloseButton) {\n <app-close-button\n [language]=\"language\"\n (onClose)=\"onClose.emit()\"\n ></app-close-button>\n }\n \n <app-logo [showLogo]=\"showLogo\"></app-logo>\n\n @if (!showBackButton && !showCloseButton) {\n <app-simple-close-button\n (onClose)=\"onClose.emit()\"\n ></app-simple-close-button>\n }\n</div>\n", styles: [".header{padding:2rem 1.5rem 0;display:flex;align-items:center;justify-content:space-between}.header__back-button.icon-bg{background-color:var(--black-white-50)!important}.header__back-button-icon{width:100%;height:100%}.header__back-button-icon.rtl{transform:rotate(180deg)}.header__logo,.header__close-button img{width:2.5rem;height:2.5rem}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "component", type: BackButtonComponent, selector: "app-back-button", inputs: ["language", "size"], outputs: ["onBack"] }, { kind: "component", type: CloseButtonComponent, selector: "app-close-button", inputs: ["language"], outputs: ["onClose"] }, { kind: "component", type: SimpleCloseButtonComponent, selector: "app-simple-close-button", outputs: ["onClose"] }, { kind: "component", type: LogoComponent, selector: "app-logo", inputs: ["showLogo", "size"] }] });
|
|
1329
1949
|
}
|
|
1330
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
1950
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.11", ngImport: i0, type: HeaderComponent, decorators: [{
|
|
1331
1951
|
type: Component,
|
|
1332
1952
|
args: [{ selector: 'app-header', standalone: true, imports: [
|
|
1333
1953
|
CommonModule,
|
|
@@ -1366,10 +1986,10 @@ class MenuDropdownComponent {
|
|
|
1366
1986
|
this.isMenuOpen = false;
|
|
1367
1987
|
}
|
|
1368
1988
|
}
|
|
1369
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
1370
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "
|
|
1989
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.11", ngImport: i0, type: MenuDropdownComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1990
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.11", type: MenuDropdownComponent, isStandalone: true, selector: "app-menu-dropdown", inputs: { language: "language" }, outputs: { onClose: "onClose" }, host: { listeners: { "document:click": "onDocumentClick($event)" } }, ngImport: i0, template: "<div class=\"menu-dropdown\" data-menu-container>\n <app-button\n size=\"small\"\n variant=\"icon-bg\"\n className=\"menu-dropdown__button button--light-bg\"\n (click)=\"$event.stopPropagation(); isMenuOpen = !isMenuOpen\"\n >\n <svg\n width=\"14\"\n height=\"4\"\n viewBox=\"0 0 14 4\"\n fill=\"currentColor\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <path\n d=\"M3.25 1.8269C3.25 2.22473 3.09196 2.60626 2.81066 2.88756C2.52936 3.16887 2.14782 3.3269 1.75 3.3269C1.35218 3.3269 0.970644 3.16887 0.68934 2.88756C0.408035 2.60626 0.25 2.22473 0.25 1.8269C0.25 1.42908 0.408035 1.04755 0.68934 0.766244C0.970644 0.48494 1.35218 0.326904 1.75 0.326904C2.14782 0.326904 2.52936 0.48494 2.81066 0.766244C3.09196 1.04755 3.25 1.42908 3.25 1.8269ZM8.5 1.8269C8.5 2.22473 8.34196 2.60626 8.06066 2.88756C7.77936 3.16887 7.39782 3.3269 7 3.3269C6.60218 3.3269 6.22064 3.16887 5.93934 2.88756C5.65804 2.60626 5.5 2.22473 5.5 1.8269C5.5 1.42908 5.65804 1.04755 5.93934 0.766244C6.22064 0.48494 6.60218 0.326904 7 0.326904C7.39782 0.326904 7.77936 0.48494 8.06066 0.766244C8.34196 1.04755 8.5 1.42908 8.5 1.8269ZM13.75 1.8269C13.75 2.22473 13.592 2.60626 13.3107 2.88756C13.0294 3.16887 12.6478 3.3269 12.25 3.3269C11.8522 3.3269 11.4706 3.16887 11.1893 2.88756C10.908 2.60626 10.75 2.22473 10.75 1.8269C10.75 1.42908 10.908 1.04755 11.1893 0.766244C11.4706 0.48494 11.8522 0.326904 12.25 0.326904C12.6478 0.326904 13.0294 0.48494 13.3107 0.766244C13.592 1.04755 13.75 1.42908 13.75 1.8269Z\"\n fill=\"currentColor\"\n />\n </svg>\n </app-button>\n @if (isMenuOpen) {\n <div\n class=\"menu-dropdown__dropdown\"\n [ngClass]=\"{ rtl: isRtl, ltr: !isRtl }\"\n >\n <div class=\"menu-dropdown__content\">\n <button\n (click)=\"onClose.emit(); isMenuOpen = false\"\n class=\"menu-dropdown__button-item\"\n [ngClass]=\"{ rtl: isRtl, ltr: !isRtl }\"\n >\n {{ 'EndChat' | translate }}\n </button>\n </div>\n </div>\n }\n</div>\n", styles: [".menu-dropdown{position:relative}.menu-dropdown__dropdown{position:absolute;margin-top:.5rem;width:12rem;border-radius:.5rem;box-shadow:0 1px 3px #0000001a,0 1px 2px #0000000f;background-color:var(--card);border:1px solid rgba(0,0,0,.05);z-index:50}.menu-dropdown__dropdown-content{border-radius:.5rem}.menu-dropdown__dropdown.rtl{right:0}.menu-dropdown__dropdown.ltr{left:0}.menu-dropdown__button-item{display:block;width:100%;padding:1rem .5rem;font-size:.875rem;color:var(--card-foreground);background:none;border:none;cursor:pointer}.menu-dropdown__button-item:hover{background-color:transparent;text-decoration:underline;color:var(--babylai-primary-color)}.menu-dropdown__button-item.rtl{text-align:right}.menu-dropdown__button-item.ltr{text-align:left}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "component", type: ButtonComponent, selector: "app-button", inputs: ["variant", "type", "disabled", "fullWidth", "className", "size", "direction"], outputs: ["onClick"] }, { kind: "pipe", type: TranslatePipe, name: "translate" }] });
|
|
1371
1991
|
}
|
|
1372
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
1992
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.11", ngImport: i0, type: MenuDropdownComponent, decorators: [{
|
|
1373
1993
|
type: Component,
|
|
1374
1994
|
args: [{ selector: 'app-menu-dropdown', standalone: true, imports: [CommonModule, ButtonComponent, TranslatePipe], template: "<div class=\"menu-dropdown\" data-menu-container>\n <app-button\n size=\"small\"\n variant=\"icon-bg\"\n className=\"menu-dropdown__button button--light-bg\"\n (click)=\"$event.stopPropagation(); isMenuOpen = !isMenuOpen\"\n >\n <svg\n width=\"14\"\n height=\"4\"\n viewBox=\"0 0 14 4\"\n fill=\"currentColor\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <path\n d=\"M3.25 1.8269C3.25 2.22473 3.09196 2.60626 2.81066 2.88756C2.52936 3.16887 2.14782 3.3269 1.75 3.3269C1.35218 3.3269 0.970644 3.16887 0.68934 2.88756C0.408035 2.60626 0.25 2.22473 0.25 1.8269C0.25 1.42908 0.408035 1.04755 0.68934 0.766244C0.970644 0.48494 1.35218 0.326904 1.75 0.326904C2.14782 0.326904 2.52936 0.48494 2.81066 0.766244C3.09196 1.04755 3.25 1.42908 3.25 1.8269ZM8.5 1.8269C8.5 2.22473 8.34196 2.60626 8.06066 2.88756C7.77936 3.16887 7.39782 3.3269 7 3.3269C6.60218 3.3269 6.22064 3.16887 5.93934 2.88756C5.65804 2.60626 5.5 2.22473 5.5 1.8269C5.5 1.42908 5.65804 1.04755 5.93934 0.766244C6.22064 0.48494 6.60218 0.326904 7 0.326904C7.39782 0.326904 7.77936 0.48494 8.06066 0.766244C8.34196 1.04755 8.5 1.42908 8.5 1.8269ZM13.75 1.8269C13.75 2.22473 13.592 2.60626 13.3107 2.88756C13.0294 3.16887 12.6478 3.3269 12.25 3.3269C11.8522 3.3269 11.4706 3.16887 11.1893 2.88756C10.908 2.60626 10.75 2.22473 10.75 1.8269C10.75 1.42908 10.908 1.04755 11.1893 0.766244C11.4706 0.48494 11.8522 0.326904 12.25 0.326904C12.6478 0.326904 13.0294 0.48494 13.3107 0.766244C13.592 1.04755 13.75 1.42908 13.75 1.8269Z\"\n fill=\"currentColor\"\n />\n </svg>\n </app-button>\n @if (isMenuOpen) {\n <div\n class=\"menu-dropdown__dropdown\"\n [ngClass]=\"{ rtl: isRtl, ltr: !isRtl }\"\n >\n <div class=\"menu-dropdown__content\">\n <button\n (click)=\"onClose.emit(); isMenuOpen = false\"\n class=\"menu-dropdown__button-item\"\n [ngClass]=\"{ rtl: isRtl, ltr: !isRtl }\"\n >\n {{ 'EndChat' | translate }}\n </button>\n </div>\n </div>\n }\n</div>\n", styles: [".menu-dropdown{position:relative}.menu-dropdown__dropdown{position:absolute;margin-top:.5rem;width:12rem;border-radius:.5rem;box-shadow:0 1px 3px #0000001a,0 1px 2px #0000000f;background-color:var(--card);border:1px solid rgba(0,0,0,.05);z-index:50}.menu-dropdown__dropdown-content{border-radius:.5rem}.menu-dropdown__dropdown.rtl{right:0}.menu-dropdown__dropdown.ltr{left:0}.menu-dropdown__button-item{display:block;width:100%;padding:1rem .5rem;font-size:.875rem;color:var(--card-foreground);background:none;border:none;cursor:pointer}.menu-dropdown__button-item:hover{background-color:transparent;text-decoration:underline;color:var(--babylai-primary-color)}.menu-dropdown__button-item.rtl{text-align:right}.menu-dropdown__button-item.ltr{text-align:left}\n"] }]
|
|
1375
1995
|
}], propDecorators: { language: [{
|
|
@@ -1387,10 +2007,10 @@ class ChatHeaderComponent {
|
|
|
1387
2007
|
language = 'en';
|
|
1388
2008
|
onBack = new EventEmitter();
|
|
1389
2009
|
onClose = new EventEmitter();
|
|
1390
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
1391
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "
|
|
2010
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.11", ngImport: i0, type: ChatHeaderComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
2011
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.11", type: ChatHeaderComponent, isStandalone: true, selector: "app-chat-header", inputs: { showBackButton: "showBackButton", showLogo: "showLogo", language: "language" }, outputs: { onBack: "onBack", onClose: "onClose" }, ngImport: i0, template: "<div class=\"chat-header\">\n <div class=\"chat-header__actions\">\n @if (showBackButton) {\n <app-back-button\n [language]=\"language\"\n (onBack)=\"onBack.emit()\"\n [size]=\"'small'\"\n ></app-back-button>\n }\n\n <app-menu-dropdown\n [language]=\"language\"\n (onClose)=\"onClose.emit()\"\n ></app-menu-dropdown>\n </div>\n\n <app-logo [showLogo]=\"showLogo\"></app-logo>\n</div>\n", styles: [".chat-header{padding:1rem;display:flex;align-items:center;justify-content:space-between;background-color:var(--card);border-radius:1.5rem 1.5rem 0 0;position:relative}.chat-header__actions{display:flex;align-items:center;gap:.5rem}.chat-header__button{background-color:rgba(var(--babylai-primary-color-500, #ad49e1),.1)!important;width:2rem;height:2rem;padding:.5rem!important}.chat-header__button:hover{background-color:rgba(var(--babylai-primary-color-700, #451d5a),.1)!important}.chat-header__button img{width:100%;height:100%}.chat-header__button img.rtl{transform:rotate(180deg)!important}.chat-header__menu{position:relative}.chat-header__menu-dropdown{position:absolute;margin-top:.5rem;width:12rem;border-radius:.5rem;box-shadow:#64646f33 0 7px 29px;background-color:var(--black-white-50);border:1px solid rgba(0,0,0,.05);z-index:50}.chat-header__menu-dropdown-content{border-radius:.5rem}.chat-header__menu-dropdown.rtl{right:0}.chat-header__menu-dropdown.ltr{left:0}.chat-header__menu-button{display:block;width:100%;padding:1rem .5rem;font-size:.875rem;color:#374151}.chat-header__menu-button:hover{background-color:#f3f4f6}.chat-header__menu-button.rtl{text-align:right}.chat-header__menu-button.ltr{text-align:left}.chat-header__brand{display:flex;align-items:center;gap:.25rem;position:absolute;left:50%;transform:translate(-50%)}.chat-header__brand img{width:2.5rem;height:2.5rem}.chat-header__brand p{font-size:1rem;font-weight:700;color:var(--black-white-600)}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "component", type: BackButtonComponent, selector: "app-back-button", inputs: ["language", "size"], outputs: ["onBack"] }, { kind: "component", type: MenuDropdownComponent, selector: "app-menu-dropdown", inputs: ["language"], outputs: ["onClose"] }, { kind: "component", type: LogoComponent, selector: "app-logo", inputs: ["showLogo", "size"] }] });
|
|
1392
2012
|
}
|
|
1393
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
2013
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.11", ngImport: i0, type: ChatHeaderComponent, decorators: [{
|
|
1394
2014
|
type: Component,
|
|
1395
2015
|
args: [{ selector: 'app-chat-header', standalone: true, imports: [
|
|
1396
2016
|
CommonModule,
|
|
@@ -1479,8 +2099,8 @@ class HelpPopupComponent {
|
|
|
1479
2099
|
handleReviewSkip() {
|
|
1480
2100
|
this.reviewSkip.emit();
|
|
1481
2101
|
}
|
|
1482
|
-
handleSendMessage(
|
|
1483
|
-
this.sendMessageEvent.emit(
|
|
2102
|
+
handleSendMessage(event) {
|
|
2103
|
+
this.sendMessageEvent.emit(event);
|
|
1484
2104
|
}
|
|
1485
2105
|
handleStartNewChat(option) {
|
|
1486
2106
|
this.startNewChat.emit(option);
|
|
@@ -1494,10 +2114,10 @@ class HelpPopupComponent {
|
|
|
1494
2114
|
handleNavigateToUrl(url) {
|
|
1495
2115
|
this.navigateToUrl.emit(url);
|
|
1496
2116
|
}
|
|
1497
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
1498
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.1", type: HelpPopupComponent, isStandalone: true, selector: "app-help-popup", inputs: { isPopupOpen: "isPopupOpen", showHelpScreenData: "showHelpScreenData", showChat: "showChat", status: "status", error: "error", helpScreenData: "helpScreenData", messages: "messages", needsAgent: "needsAgent", assistantStatus: "assistantStatus", isAblyConnected: "isAblyConnected", isChatClosed: "isChatClosed", currentLang: "currentLang", chatIsLoading: "chatIsLoading", sessionId: "sessionId", isIntroScreenEnabled: "isIntroScreenEnabled", selectedOption: "selectedOption", selectedNestedOption: "selectedNestedOption", showEndChatConfirmation: "showEndChatConfirmation", showStartNewChatConfirmation: "showStartNewChatConfirmation", showReviewDialog: "showReviewDialog", isSubmittingReview: "isSubmittingReview" }, outputs: { closePopup: "closePopup", back: "back", showChatEvent: "showChatEvent", endChat: "endChat", confirmEndChat: "confirmEndChat", cancelEndChat: "cancelEndChat", confirmStartNewChat: "confirmStartNewChat", cancelStartNewChat: "cancelStartNewChat", reviewSubmit: "reviewSubmit", reviewSkip: "reviewSkip", sendMessageEvent: "sendMessageEvent", startNewChat: "startNewChat", showHelpScreenDataEvent: "showHelpScreenDataEvent", hideHelpScreenData: "hideHelpScreenData", navigateToUrl: "navigateToUrl" }, ngImport: i0, template: "@if (isPopupOpen) {\n<div\n class=\"help-popup\"\n [ngClass]=\"{\n 'is-open': isPopupOpen,\n 'is-closed': !isPopupOpen,\n 'babylai-bg-linear-to-b': isPopupOpen && !showHelpScreenData && !showChat\n }\"\n>\n @if (showEndChatConfirmation) {\n <app-confirmation-dialog\n [title]=\"'LeavingDialogTitle' | translate\"\n [body]=\"'LeavingDialogBody' | translate\"\n [confirmText]=\"'Confirm' | translate\"\n [cancelText]=\"'Cancel' | translate\"\n (onConfirm)=\"handleConfirmEndChat()\"\n (onCancel)=\"handleCancelEndChat()\"\n ></app-confirmation-dialog>\n }\n\n @if (showStartNewChatConfirmation) {\n <app-confirmation-dialog\n [title]=\"'StartNewChatDialogTitle' | translate\"\n [body]=\"'StartNewChatDialogBody' | translate\"\n [confirmText]=\"'Confirm' | translate\"\n [cancelText]=\"'Cancel' | translate\"\n (onConfirm)=\"handleConfirmStartNewChat()\"\n (onCancel)=\"handleCancelStartNewChat()\"\n ></app-confirmation-dialog>\n }\n\n <!-- Loading State -->\n @if (status === 'loading') {\n <div class=\"loading-state\">\n @if (!showHelpScreenData) {\n <app-header\n [showBackButton]=\"!!selectedOption || !!selectedNestedOption\"\n [showLogo]=\"true\"\n (onBack)=\"handleBack()\"\n (onClose)=\"handleClosePopup()\"\n [language]=\"currentLang\"\n ></app-header>\n } @if (showHelpScreenData) {\n <app-header\n [showCloseButton]=\"!isIntroScreenEnabled\"\n [showLogo]=\"true\"\n (onClose)=\"\n isIntroScreenEnabled ? handleHideHelpScreenData() : handleClosePopup()\n \"\n [language]=\"currentLang\"\n ></app-header>\n }\n <app-loading\n [variant]=\"!isIntroScreenEnabled ? 'primary' : 'default'\"\n ></app-loading>\n </div>\n }\n\n <!-- Error State -->\n @if (status === 'failed') {\n <div class=\"error-message\">\n <span>Error: {{ error }}</span>\n </div>\n }\n\n <!-- Content -->\n @if (status === 'succeeded') {\n <!-- Headers -->\n @if (isIntroScreenEnabled) { @if (!showHelpScreenData && !showChat) {\n <app-header\n [showBackButton]=\"!!selectedOption || !!selectedNestedOption\"\n [showLogo]=\"true\"\n (onBack)=\"handleBack()\"\n (onClose)=\"handleClosePopup()\"\n [language]=\"currentLang\"\n ></app-header>\n } } @if (showHelpScreenData && !showChat) {\n <app-header\n [showCloseButton]=\"!isIntroScreenEnabled\"\n [showBackButton]=\"isIntroScreenEnabled && showHelpScreenData\"\n [showLogo]=\"false\"\n (onClose)=\"\n isIntroScreenEnabled ? handleHideHelpScreenData() : handleClosePopup()\n \"\n (onBack)=\"isIntroScreenEnabled ? handleBack() : handleClosePopup()\"\n [language]=\"currentLang\"\n ></app-header>\n\n @if (showHelpScreenData && sessionId) {\n <app-button\n variant=\"icon-bg\"\n (click)=\"handleShowChat()\"\n class=\"chat-button\"\n className=\"button--icon\"\n >\n <svg\n class=\"icon-full\"\n viewBox=\"0 0 25 25\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <path\n d=\"M17.5 3.83801C15.9806 2.95874 14.2555 2.49712 12.5 2.50001C6.977 2.50001 2.5 6.97701 2.5 12.5C2.5 14.1 2.876 15.612 3.543 16.953C3.721 17.309 3.78 17.716 3.677 18.101L3.082 20.327C3.02307 20.5473 3.02312 20.7792 3.08216 20.9995C3.14119 21.2198 3.25712 21.4206 3.41831 21.5819C3.57951 21.7432 3.7803 21.8593 4.00053 21.9184C4.22075 21.9776 4.45267 21.9778 4.673 21.919L6.899 21.323C7.28538 21.2254 7.69414 21.2727 8.048 21.456C9.43095 22.1446 10.9551 22.502 12.5 22.5C18.023 22.5 22.5 18.023 22.5 12.5C22.5 10.679 22.013 8.97001 21.162 7.50001\"\n stroke=\"white\"\n stroke-width=\"2\"\n stroke-linecap=\"round\"\n />\n <path\n d=\"M8.5 12.5H8.509M12.491 12.5H12.5M16.491 12.5H16.5\"\n stroke=\"white\"\n stroke-width=\"2.66667\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n />\n </svg>\n </app-button>\n } } @if (showChat) {\n <app-chat-header\n [showBackButton]=\"showChat\"\n [showLogo]=\"true\"\n (onClose)=\"handleEndChat()\"\n (onBack)=\"handleBack()\"\n [language]=\"currentLang\"\n ></app-chat-header>\n\n <app-chat\n class=\"chat-container\"\n [messages]=\"messages\"\n [needsAgent]=\"needsAgent\"\n [assistantStatus]=\"assistantStatus\"\n [isAblyConnected]=\"isAblyConnected\"\n [isChatClosed]=\"isChatClosed\"\n (sendMessageEvent)=\"handleSendMessage($event)\"\n [currentLang]=\"currentLang\"\n [loading]=\"chatIsLoading\"\n ></app-chat>\n }\n\n <!-- Main Content -->\n @if (!showChat) {\n <div class=\"main-content\">\n @if (isIntroScreenEnabled) { @if (!showHelpScreenData) {\n <app-intro-section\n [currentLang]=\"currentLang\"\n (showHelpScreenData)=\"handleShowHelpScreenData()\"\n (navigateToUrl)=\"handleNavigateToUrl($event)\"\n ></app-intro-section>\n } } @if (showHelpScreenData) {\n <svg\n class=\"stars\"\n viewBox=\"0 0 244 196\"\n fill=\"currentColor\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <g opacity=\"0.15\">\n <path\n d=\"M61.0903 66.4434C61.101 66.4056 61.1063 66.3867 61.1088 66.3779C62.7734 60.5407 71.046 60.5407 72.7106 66.3779C72.7131 66.3867 72.7184 66.4056 72.7291 66.4434C72.7572 66.5431 72.7712 66.5929 72.7845 66.6397C80.5193 93.9529 101.867 115.3 129.18 123.035C129.227 123.048 129.276 123.062 129.376 123.09C129.414 123.101 129.433 123.106 129.441 123.109C135.279 124.773 135.279 133.046 129.441 134.711C129.433 134.713 129.414 134.718 129.376 134.729C129.276 134.757 129.227 134.771 129.18 134.784C101.867 142.519 80.5193 163.867 72.7845 191.18C72.7712 191.227 72.7572 191.276 72.7291 191.376C72.7184 191.414 72.7131 191.433 72.7106 191.441C71.046 197.279 62.7734 197.279 61.1088 191.441C61.1063 191.433 61.101 191.414 61.0903 191.376C61.0622 191.276 61.0482 191.227 61.035 191.18C53.3002 163.867 31.9529 142.519 4.63971 134.784C4.59292 134.771 4.54309 134.757 4.44342 134.729C4.40559 134.718 4.38668 134.713 4.37792 134.711C-1.45931 133.046 -1.45931 124.773 4.37792 123.109C4.38668 123.106 4.40559 123.101 4.44342 123.09C4.54309 123.062 4.59292 123.048 4.63971 123.035C31.9529 115.3 53.3002 93.9529 61.035 66.6397C61.0482 66.5929 61.0622 66.5431 61.0903 66.4434Z\"\n fill=\"currentColor\"\n />\n <path\n d=\"M188.17 50.6848C188.179 50.6534 188.183 50.6377 188.185 50.6305C189.525 45.7898 196.183 45.7898 197.523 50.6305C197.525 50.6377 197.529 50.6534 197.538 50.6848C197.561 50.7674 197.572 50.8088 197.583 50.8476C203.808 73.4975 220.99 91.2002 242.974 97.6144C243.012 97.6253 243.052 97.637 243.132 97.6603C243.162 97.6691 243.178 97.6736 243.185 97.6756C247.883 99.056 247.883 105.916 243.185 107.297C243.178 107.299 243.162 107.303 243.132 107.312C243.052 107.335 243.012 107.347 242.974 107.358C220.99 113.772 203.808 131.475 197.583 154.125C197.572 154.163 197.561 154.205 197.538 154.287C197.529 154.319 197.525 154.334 197.523 154.342C196.183 159.182 189.525 159.182 188.185 154.342C188.183 154.334 188.179 154.319 188.17 154.287C188.148 154.205 188.136 154.163 188.126 154.125C181.9 131.475 164.718 113.772 142.734 107.358C142.697 107.347 142.657 107.335 142.576 107.312C142.546 107.303 142.531 107.299 142.524 107.297C137.825 105.916 137.825 99.056 142.524 97.6756C142.531 97.6736 142.546 97.6691 142.576 97.6603C142.657 97.637 142.697 97.6253 142.734 97.6144C164.718 91.2002 181.9 73.4975 188.126 50.8476C188.136 50.8088 188.148 50.7674 188.17 50.6848Z\"\n fill=\"currentColor\"\n />\n <path\n d=\"M127.131 -17.2906C127.138 -17.3137 127.143 -17.3305 127.143 -17.3305C128.198 -20.8898 133.444 -20.8898 134.5 -17.3305C134.5 -17.3305 134.505 -17.3137 134.512 -17.2906C134.529 -17.2298 134.538 -17.1994 134.547 -17.1709C139.452 -0.516516 152.989 12.5001 170.309 17.2164C170.339 17.2245 170.371 17.2331 170.434 17.2502C170.458 17.2567 170.476 17.2615 170.476 17.2615C174.177 18.2765 174.177 23.3208 170.476 24.3357C170.476 24.3357 170.458 24.3405 170.434 24.347C170.371 24.3642 170.339 24.3727 170.309 24.3808C152.989 29.0971 139.452 42.1138 134.547 58.7681C134.538 58.7967 134.529 58.8271 134.512 58.8878C134.505 58.9109 134.5 58.9278 134.5 58.9278C133.444 62.4871 128.198 62.4871 127.143 58.9278C127.143 58.9278 127.138 58.9109 127.131 58.8878C127.113 58.8271 127.104 58.7967 127.096 58.7681C122.191 42.1138 108.653 29.0971 91.3329 24.3808C91.3032 24.3727 91.2716 24.3642 91.2084 24.347C91.1844 24.3405 91.1669 24.3357 91.1669 24.3357C87.4652 23.3208 87.4652 18.2765 91.1669 17.2615C91.1669 17.2615 91.1844 17.2567 91.2084 17.2502C91.2716 17.2331 91.3032 17.2245 91.3329 17.2164C108.653 12.5001 122.191 -0.516516 127.096 -17.1709C127.104 -17.1994 127.113 -17.2298 127.131 -17.2906Z\"\n fill=\"currentColor\"\n />\n </g>\n </svg>\n\n <app-help-screen-data\n [helpScreenData]=\"helpScreenData\"\n (handleStartNewChat)=\"handleStartNewChat($event)\"\n ></app-help-screen-data>\n }\n </div>\n }\n\n <!-- Footer -->\n <app-footer\n [showHelpScreenData]=\"showHelpScreenData\"\n [showChat]=\"showChat\"\n ></app-footer>\n\n <!-- Review Dialog -->\n <app-review-dialog\n [isOpen]=\"showReviewDialog\"\n [isSubmitting]=\"isSubmittingReview\"\n (close)=\"handleReviewSkip()\"\n (submitReview)=\"handleReviewSubmit($event)\"\n (skip)=\"handleReviewSkip()\"\n ></app-review-dialog>\n }\n</div>\n}\n", styles: [".help-popup{position:fixed;bottom:5rem;right:1.25rem;width:384px;height:calc(100vh - 12rem);max-height:800px;border-radius:1.5rem;box-shadow:#64646f33 0 7px 29px;display:flex;flex-direction:column;z-index:1000;background-color:var(--secondary);overflow:hidden}.help-popup.is-open{width:384px}.help-popup.is-closed{width:60px}.error-message{bottom:22.5rem;right:1.25rem;padding:1rem;border-radius:.5rem;box-shadow:#64646f33 0 7px 29px;height:100%;text-align:center;display:flex;align-items:center;justify-content:center}.chat-button{position:absolute;bottom:1.25rem;right:1.25rem;padding:.75rem!important}.chat-button--icon{padding:.25rem!important}.chat-container{height:100%;padding:1rem 1rem 0;max-height:85%}.main-content{flex:1;display:flex;flex-direction:column;gap:1rem;overflow-y:auto;padding:0 1.5rem;width:100%;box-sizing:border-box}.stars{position:absolute;top:0;inset-inline-end:0;width:10rem;height:10rem;color:var(--babylai-primary-color, #ad49e1)}.icon-full{width:100%}.babylai-bg-linear-to-b{background:var(--babylai-primary-color);background:linear-gradient(180deg,var(--babylai-primary-color) 1%,color-mix(in srgb,var(--babylai-primary-color) 1%,transparent) 100%)}@media (prefers-color-scheme: dark){.babylai-bg-linear-to-b{background:var(--babylai-storm-dust-950);background:linear-gradient(180deg,var(--babylai-storm-dust-950) 1%,color-mix(in srgb,var(--babylai-storm-dust-950) 60%,transparent) 100%)}}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "component", type: ButtonComponent, selector: "app-button", inputs: ["variant", "type", "disabled", "fullWidth", "className", "size", "direction"], outputs: ["onClick"] }, { kind: "component", type: HelpScreenDataComponent, selector: "app-help-screen-data", inputs: ["helpScreenData", "title"], outputs: ["handleStartNewChat"] }, { kind: "component", type: HeaderComponent, selector: "app-header", inputs: ["headerType", "showBackButton", "showLogo", "language", "showCloseButton"], outputs: ["onBack", "onClose"] }, { kind: "component", type: ChatHeaderComponent, selector: "app-chat-header", inputs: ["showBackButton", "showLogo", "language"], outputs: ["onBack", "onClose"] }, { kind: "component", type: ChatComponent, selector: "app-chat", inputs: ["messages", "needsAgent", "assistantStatus", "isAblyConnected", "isChatClosed", "currentLang", "loading"], outputs: ["sendMessageEvent"] }, { kind: "component", type: LoadingComponent, selector: "app-loading", inputs: ["variant"] }, { kind: "component", type: ConfirmationDialogComponent, selector: "app-confirmation-dialog", inputs: ["title", "body", "confirmText", "cancelText"], outputs: ["onConfirm", "onCancel"] }, { kind: "component", type: ReviewDialogComponent, selector: "app-review-dialog", inputs: ["isOpen", "isSubmitting"], outputs: ["close", "submitReview", "skip"] }, { kind: "component", type: IntroSectionComponent, selector: "app-intro-section", inputs: ["currentLang"], outputs: ["showHelpScreenData", "navigateToUrl"] }, { kind: "component", type: FooterComponent, selector: "app-footer", inputs: ["showHelpScreenData", "showChat"] }, { kind: "pipe", type: TranslatePipe, name: "translate" }] });
|
|
2117
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.11", ngImport: i0, type: HelpPopupComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
2118
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.11", type: HelpPopupComponent, isStandalone: true, selector: "app-help-popup", inputs: { isPopupOpen: "isPopupOpen", showHelpScreenData: "showHelpScreenData", showChat: "showChat", status: "status", error: "error", helpScreenData: "helpScreenData", messages: "messages", needsAgent: "needsAgent", assistantStatus: "assistantStatus", isAblyConnected: "isAblyConnected", isChatClosed: "isChatClosed", currentLang: "currentLang", chatIsLoading: "chatIsLoading", sessionId: "sessionId", isIntroScreenEnabled: "isIntroScreenEnabled", selectedOption: "selectedOption", selectedNestedOption: "selectedNestedOption", showEndChatConfirmation: "showEndChatConfirmation", showStartNewChatConfirmation: "showStartNewChatConfirmation", showReviewDialog: "showReviewDialog", isSubmittingReview: "isSubmittingReview" }, outputs: { closePopup: "closePopup", back: "back", showChatEvent: "showChatEvent", endChat: "endChat", confirmEndChat: "confirmEndChat", cancelEndChat: "cancelEndChat", confirmStartNewChat: "confirmStartNewChat", cancelStartNewChat: "cancelStartNewChat", reviewSubmit: "reviewSubmit", reviewSkip: "reviewSkip", sendMessageEvent: "sendMessageEvent", startNewChat: "startNewChat", showHelpScreenDataEvent: "showHelpScreenDataEvent", hideHelpScreenData: "hideHelpScreenData", navigateToUrl: "navigateToUrl" }, ngImport: i0, template: "@if (isPopupOpen) {\n<div\n class=\"help-popup\"\n [ngClass]=\"{\n 'is-open': isPopupOpen,\n 'is-closed': !isPopupOpen,\n 'babylai-bg-linear-to-b': isPopupOpen && !showHelpScreenData && !showChat\n }\"\n>\n @if (showEndChatConfirmation) {\n <app-confirmation-dialog\n [title]=\"'LeavingDialogTitle' | translate\"\n [body]=\"'LeavingDialogBody' | translate\"\n [confirmText]=\"'Confirm' | translate\"\n [cancelText]=\"'Cancel' | translate\"\n (onConfirm)=\"handleConfirmEndChat()\"\n (onCancel)=\"handleCancelEndChat()\"\n ></app-confirmation-dialog>\n }\n\n @if (showStartNewChatConfirmation) {\n <app-confirmation-dialog\n [title]=\"'StartNewChatDialogTitle' | translate\"\n [body]=\"'StartNewChatDialogBody' | translate\"\n [confirmText]=\"'Confirm' | translate\"\n [cancelText]=\"'Cancel' | translate\"\n (onConfirm)=\"handleConfirmStartNewChat()\"\n (onCancel)=\"handleCancelStartNewChat()\"\n ></app-confirmation-dialog>\n }\n\n <!-- Loading State -->\n @if (status === 'loading') {\n <div class=\"loading-state\">\n @if (!showHelpScreenData) {\n <app-header\n [showBackButton]=\"!!selectedOption || !!selectedNestedOption\"\n [showLogo]=\"true\"\n (onBack)=\"handleBack()\"\n (onClose)=\"handleClosePopup()\"\n [language]=\"currentLang\"\n ></app-header>\n } @if (showHelpScreenData) {\n <app-header\n [showCloseButton]=\"!isIntroScreenEnabled\"\n [showLogo]=\"true\"\n (onClose)=\"\n isIntroScreenEnabled ? handleHideHelpScreenData() : handleClosePopup()\n \"\n [language]=\"currentLang\"\n ></app-header>\n }\n <app-loading\n [variant]=\"!isIntroScreenEnabled ? 'primary' : 'default'\"\n ></app-loading>\n </div>\n }\n\n <!-- Error State -->\n @if (status === 'failed') {\n <div class=\"error-message\">\n <span>Error: {{ error }}</span>\n </div>\n }\n\n <!-- Content -->\n @if (status === 'succeeded') {\n <!-- Headers -->\n @if (isIntroScreenEnabled) { @if (!showHelpScreenData && !showChat) {\n <app-header\n [showBackButton]=\"!!selectedOption || !!selectedNestedOption\"\n [showLogo]=\"true\"\n (onBack)=\"handleBack()\"\n (onClose)=\"handleClosePopup()\"\n [language]=\"currentLang\"\n ></app-header>\n } } @if (showHelpScreenData && !showChat) {\n <app-header\n [showCloseButton]=\"!isIntroScreenEnabled\"\n [showBackButton]=\"isIntroScreenEnabled && showHelpScreenData\"\n [showLogo]=\"false\"\n (onClose)=\"\n isIntroScreenEnabled ? handleHideHelpScreenData() : handleClosePopup()\n \"\n (onBack)=\"isIntroScreenEnabled ? handleBack() : handleClosePopup()\"\n [language]=\"currentLang\"\n ></app-header>\n\n @if (showHelpScreenData && sessionId) {\n <app-button\n variant=\"icon-bg\"\n (click)=\"handleShowChat()\"\n class=\"chat-button\"\n className=\"button--icon\"\n >\n <svg\n class=\"icon-full\"\n viewBox=\"0 0 25 25\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <path\n d=\"M17.5 3.83801C15.9806 2.95874 14.2555 2.49712 12.5 2.50001C6.977 2.50001 2.5 6.97701 2.5 12.5C2.5 14.1 2.876 15.612 3.543 16.953C3.721 17.309 3.78 17.716 3.677 18.101L3.082 20.327C3.02307 20.5473 3.02312 20.7792 3.08216 20.9995C3.14119 21.2198 3.25712 21.4206 3.41831 21.5819C3.57951 21.7432 3.7803 21.8593 4.00053 21.9184C4.22075 21.9776 4.45267 21.9778 4.673 21.919L6.899 21.323C7.28538 21.2254 7.69414 21.2727 8.048 21.456C9.43095 22.1446 10.9551 22.502 12.5 22.5C18.023 22.5 22.5 18.023 22.5 12.5C22.5 10.679 22.013 8.97001 21.162 7.50001\"\n stroke=\"white\"\n stroke-width=\"2\"\n stroke-linecap=\"round\"\n />\n <path\n d=\"M8.5 12.5H8.509M12.491 12.5H12.5M16.491 12.5H16.5\"\n stroke=\"white\"\n stroke-width=\"2.66667\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n />\n </svg>\n </app-button>\n } } @if (showChat) {\n <app-chat-header\n [showBackButton]=\"showChat\"\n [showLogo]=\"true\"\n (onClose)=\"handleEndChat()\"\n (onBack)=\"handleBack()\"\n [language]=\"currentLang\"\n ></app-chat-header>\n\n <app-chat\n class=\"chat-container\"\n [messages]=\"messages\"\n [needsAgent]=\"needsAgent\"\n [assistantStatus]=\"assistantStatus\"\n [isAblyConnected]=\"isAblyConnected\"\n [isChatClosed]=\"isChatClosed\"\n (sendMessageEvent)=\"handleSendMessage($event)\"\n [currentLang]=\"currentLang\"\n [loading]=\"chatIsLoading\"\n [sessionId]=\"sessionId\"\n ></app-chat>\n }\n\n <!-- Main Content -->\n @if (!showChat) {\n <div class=\"main-content\">\n @if (isIntroScreenEnabled) { @if (!showHelpScreenData) {\n <app-intro-section\n [currentLang]=\"currentLang\"\n (showHelpScreenData)=\"handleShowHelpScreenData()\"\n (navigateToUrl)=\"handleNavigateToUrl($event)\"\n ></app-intro-section>\n } } @if (showHelpScreenData) {\n <svg\n class=\"stars\"\n viewBox=\"0 0 244 196\"\n fill=\"currentColor\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <g opacity=\"0.15\">\n <path\n d=\"M61.0903 66.4434C61.101 66.4056 61.1063 66.3867 61.1088 66.3779C62.7734 60.5407 71.046 60.5407 72.7106 66.3779C72.7131 66.3867 72.7184 66.4056 72.7291 66.4434C72.7572 66.5431 72.7712 66.5929 72.7845 66.6397C80.5193 93.9529 101.867 115.3 129.18 123.035C129.227 123.048 129.276 123.062 129.376 123.09C129.414 123.101 129.433 123.106 129.441 123.109C135.279 124.773 135.279 133.046 129.441 134.711C129.433 134.713 129.414 134.718 129.376 134.729C129.276 134.757 129.227 134.771 129.18 134.784C101.867 142.519 80.5193 163.867 72.7845 191.18C72.7712 191.227 72.7572 191.276 72.7291 191.376C72.7184 191.414 72.7131 191.433 72.7106 191.441C71.046 197.279 62.7734 197.279 61.1088 191.441C61.1063 191.433 61.101 191.414 61.0903 191.376C61.0622 191.276 61.0482 191.227 61.035 191.18C53.3002 163.867 31.9529 142.519 4.63971 134.784C4.59292 134.771 4.54309 134.757 4.44342 134.729C4.40559 134.718 4.38668 134.713 4.37792 134.711C-1.45931 133.046 -1.45931 124.773 4.37792 123.109C4.38668 123.106 4.40559 123.101 4.44342 123.09C4.54309 123.062 4.59292 123.048 4.63971 123.035C31.9529 115.3 53.3002 93.9529 61.035 66.6397C61.0482 66.5929 61.0622 66.5431 61.0903 66.4434Z\"\n fill=\"currentColor\"\n />\n <path\n d=\"M188.17 50.6848C188.179 50.6534 188.183 50.6377 188.185 50.6305C189.525 45.7898 196.183 45.7898 197.523 50.6305C197.525 50.6377 197.529 50.6534 197.538 50.6848C197.561 50.7674 197.572 50.8088 197.583 50.8476C203.808 73.4975 220.99 91.2002 242.974 97.6144C243.012 97.6253 243.052 97.637 243.132 97.6603C243.162 97.6691 243.178 97.6736 243.185 97.6756C247.883 99.056 247.883 105.916 243.185 107.297C243.178 107.299 243.162 107.303 243.132 107.312C243.052 107.335 243.012 107.347 242.974 107.358C220.99 113.772 203.808 131.475 197.583 154.125C197.572 154.163 197.561 154.205 197.538 154.287C197.529 154.319 197.525 154.334 197.523 154.342C196.183 159.182 189.525 159.182 188.185 154.342C188.183 154.334 188.179 154.319 188.17 154.287C188.148 154.205 188.136 154.163 188.126 154.125C181.9 131.475 164.718 113.772 142.734 107.358C142.697 107.347 142.657 107.335 142.576 107.312C142.546 107.303 142.531 107.299 142.524 107.297C137.825 105.916 137.825 99.056 142.524 97.6756C142.531 97.6736 142.546 97.6691 142.576 97.6603C142.657 97.637 142.697 97.6253 142.734 97.6144C164.718 91.2002 181.9 73.4975 188.126 50.8476C188.136 50.8088 188.148 50.7674 188.17 50.6848Z\"\n fill=\"currentColor\"\n />\n <path\n d=\"M127.131 -17.2906C127.138 -17.3137 127.143 -17.3305 127.143 -17.3305C128.198 -20.8898 133.444 -20.8898 134.5 -17.3305C134.5 -17.3305 134.505 -17.3137 134.512 -17.2906C134.529 -17.2298 134.538 -17.1994 134.547 -17.1709C139.452 -0.516516 152.989 12.5001 170.309 17.2164C170.339 17.2245 170.371 17.2331 170.434 17.2502C170.458 17.2567 170.476 17.2615 170.476 17.2615C174.177 18.2765 174.177 23.3208 170.476 24.3357C170.476 24.3357 170.458 24.3405 170.434 24.347C170.371 24.3642 170.339 24.3727 170.309 24.3808C152.989 29.0971 139.452 42.1138 134.547 58.7681C134.538 58.7967 134.529 58.8271 134.512 58.8878C134.505 58.9109 134.5 58.9278 134.5 58.9278C133.444 62.4871 128.198 62.4871 127.143 58.9278C127.143 58.9278 127.138 58.9109 127.131 58.8878C127.113 58.8271 127.104 58.7967 127.096 58.7681C122.191 42.1138 108.653 29.0971 91.3329 24.3808C91.3032 24.3727 91.2716 24.3642 91.2084 24.347C91.1844 24.3405 91.1669 24.3357 91.1669 24.3357C87.4652 23.3208 87.4652 18.2765 91.1669 17.2615C91.1669 17.2615 91.1844 17.2567 91.2084 17.2502C91.2716 17.2331 91.3032 17.2245 91.3329 17.2164C108.653 12.5001 122.191 -0.516516 127.096 -17.1709C127.104 -17.1994 127.113 -17.2298 127.131 -17.2906Z\"\n fill=\"currentColor\"\n />\n </g>\n </svg>\n\n <app-help-screen-data\n [helpScreenData]=\"helpScreenData\"\n (handleStartNewChat)=\"handleStartNewChat($event)\"\n ></app-help-screen-data>\n }\n </div>\n }\n\n <!-- Footer -->\n <app-footer\n [showHelpScreenData]=\"showHelpScreenData\"\n [showChat]=\"showChat\"\n ></app-footer>\n\n <!-- Review Dialog -->\n <app-review-dialog\n [isOpen]=\"showReviewDialog\"\n [isSubmitting]=\"isSubmittingReview\"\n (close)=\"handleReviewSkip()\"\n (submitReview)=\"handleReviewSubmit($event)\"\n (skip)=\"handleReviewSkip()\"\n ></app-review-dialog>\n }\n</div>\n}\n", styles: [".help-popup{position:fixed;bottom:5rem;right:1.25rem;width:384px;height:calc(100vh - 12rem);max-height:800px;border-radius:1.5rem;box-shadow:#64646f33 0 7px 29px;display:flex;flex-direction:column;z-index:1000;background-color:var(--secondary);overflow:hidden}.help-popup.is-open{width:384px}.help-popup.is-closed{width:60px}.error-message{bottom:22.5rem;right:1.25rem;padding:1rem;border-radius:.5rem;box-shadow:#64646f33 0 7px 29px;height:100%;text-align:center;display:flex;align-items:center;justify-content:center}.chat-button{position:absolute;bottom:1.25rem;right:1.25rem;padding:.75rem!important}.chat-button--icon{padding:.25rem!important}.chat-container{height:100%;padding:1rem 1rem 0;max-height:85%}.main-content{flex:1;display:flex;flex-direction:column;gap:1rem;overflow-y:auto;padding:0 1.5rem;width:100%;box-sizing:border-box}.stars{position:absolute;top:0;inset-inline-end:0;width:10rem;height:10rem;color:var(--babylai-primary-color, #ad49e1)}.icon-full{width:100%}.babylai-bg-linear-to-b{background:var(--babylai-primary-color);background:linear-gradient(180deg,var(--babylai-primary-color) 1%,color-mix(in srgb,var(--babylai-primary-color) 1%,transparent) 100%)}@media (prefers-color-scheme: dark){.babylai-bg-linear-to-b{background:var(--babylai-storm-dust-950);background:linear-gradient(180deg,var(--babylai-storm-dust-950) 1%,color-mix(in srgb,var(--babylai-storm-dust-950) 60%,transparent) 100%)}}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "pipe", type: TranslatePipe, name: "translate" }, { kind: "component", type: ButtonComponent, selector: "app-button", inputs: ["variant", "type", "disabled", "fullWidth", "className", "size", "direction"], outputs: ["onClick"] }, { kind: "component", type: HelpScreenDataComponent, selector: "app-help-screen-data", inputs: ["helpScreenData", "title"], outputs: ["handleStartNewChat"] }, { kind: "component", type: HeaderComponent, selector: "app-header", inputs: ["headerType", "showBackButton", "showLogo", "language", "showCloseButton"], outputs: ["onBack", "onClose"] }, { kind: "component", type: ChatHeaderComponent, selector: "app-chat-header", inputs: ["showBackButton", "showLogo", "language"], outputs: ["onBack", "onClose"] }, { kind: "component", type: ChatComponent, selector: "app-chat", inputs: ["messages", "needsAgent", "assistantStatus", "isAblyConnected", "isChatClosed", "currentLang", "loading", "sessionId"], outputs: ["sendMessageEvent"] }, { kind: "component", type: LoadingComponent, selector: "app-loading", inputs: ["variant"] }, { kind: "component", type: ConfirmationDialogComponent, selector: "app-confirmation-dialog", inputs: ["title", "body", "confirmText", "cancelText"], outputs: ["onConfirm", "onCancel"] }, { kind: "component", type: ReviewDialogComponent, selector: "app-review-dialog", inputs: ["isOpen", "isSubmitting"], outputs: ["close", "submitReview", "skip"] }, { kind: "component", type: IntroSectionComponent, selector: "app-intro-section", inputs: ["currentLang"], outputs: ["showHelpScreenData", "navigateToUrl"] }, { kind: "component", type: FooterComponent, selector: "app-footer", inputs: ["showHelpScreenData", "showChat"] }] });
|
|
1499
2119
|
}
|
|
1500
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
2120
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.11", ngImport: i0, type: HelpPopupComponent, decorators: [{
|
|
1501
2121
|
type: Component,
|
|
1502
2122
|
args: [{ selector: 'app-help-popup', standalone: true, imports: [
|
|
1503
2123
|
CommonModule,
|
|
@@ -1512,7 +2132,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.1", ngImpor
|
|
|
1512
2132
|
ReviewDialogComponent,
|
|
1513
2133
|
IntroSectionComponent,
|
|
1514
2134
|
FooterComponent,
|
|
1515
|
-
], template: "@if (isPopupOpen) {\n<div\n class=\"help-popup\"\n [ngClass]=\"{\n 'is-open': isPopupOpen,\n 'is-closed': !isPopupOpen,\n 'babylai-bg-linear-to-b': isPopupOpen && !showHelpScreenData && !showChat\n }\"\n>\n @if (showEndChatConfirmation) {\n <app-confirmation-dialog\n [title]=\"'LeavingDialogTitle' | translate\"\n [body]=\"'LeavingDialogBody' | translate\"\n [confirmText]=\"'Confirm' | translate\"\n [cancelText]=\"'Cancel' | translate\"\n (onConfirm)=\"handleConfirmEndChat()\"\n (onCancel)=\"handleCancelEndChat()\"\n ></app-confirmation-dialog>\n }\n\n @if (showStartNewChatConfirmation) {\n <app-confirmation-dialog\n [title]=\"'StartNewChatDialogTitle' | translate\"\n [body]=\"'StartNewChatDialogBody' | translate\"\n [confirmText]=\"'Confirm' | translate\"\n [cancelText]=\"'Cancel' | translate\"\n (onConfirm)=\"handleConfirmStartNewChat()\"\n (onCancel)=\"handleCancelStartNewChat()\"\n ></app-confirmation-dialog>\n }\n\n <!-- Loading State -->\n @if (status === 'loading') {\n <div class=\"loading-state\">\n @if (!showHelpScreenData) {\n <app-header\n [showBackButton]=\"!!selectedOption || !!selectedNestedOption\"\n [showLogo]=\"true\"\n (onBack)=\"handleBack()\"\n (onClose)=\"handleClosePopup()\"\n [language]=\"currentLang\"\n ></app-header>\n } @if (showHelpScreenData) {\n <app-header\n [showCloseButton]=\"!isIntroScreenEnabled\"\n [showLogo]=\"true\"\n (onClose)=\"\n isIntroScreenEnabled ? handleHideHelpScreenData() : handleClosePopup()\n \"\n [language]=\"currentLang\"\n ></app-header>\n }\n <app-loading\n [variant]=\"!isIntroScreenEnabled ? 'primary' : 'default'\"\n ></app-loading>\n </div>\n }\n\n <!-- Error State -->\n @if (status === 'failed') {\n <div class=\"error-message\">\n <span>Error: {{ error }}</span>\n </div>\n }\n\n <!-- Content -->\n @if (status === 'succeeded') {\n <!-- Headers -->\n @if (isIntroScreenEnabled) { @if (!showHelpScreenData && !showChat) {\n <app-header\n [showBackButton]=\"!!selectedOption || !!selectedNestedOption\"\n [showLogo]=\"true\"\n (onBack)=\"handleBack()\"\n (onClose)=\"handleClosePopup()\"\n [language]=\"currentLang\"\n ></app-header>\n } } @if (showHelpScreenData && !showChat) {\n <app-header\n [showCloseButton]=\"!isIntroScreenEnabled\"\n [showBackButton]=\"isIntroScreenEnabled && showHelpScreenData\"\n [showLogo]=\"false\"\n (onClose)=\"\n isIntroScreenEnabled ? handleHideHelpScreenData() : handleClosePopup()\n \"\n (onBack)=\"isIntroScreenEnabled ? handleBack() : handleClosePopup()\"\n [language]=\"currentLang\"\n ></app-header>\n\n @if (showHelpScreenData && sessionId) {\n <app-button\n variant=\"icon-bg\"\n (click)=\"handleShowChat()\"\n class=\"chat-button\"\n className=\"button--icon\"\n >\n <svg\n class=\"icon-full\"\n viewBox=\"0 0 25 25\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <path\n d=\"M17.5 3.83801C15.9806 2.95874 14.2555 2.49712 12.5 2.50001C6.977 2.50001 2.5 6.97701 2.5 12.5C2.5 14.1 2.876 15.612 3.543 16.953C3.721 17.309 3.78 17.716 3.677 18.101L3.082 20.327C3.02307 20.5473 3.02312 20.7792 3.08216 20.9995C3.14119 21.2198 3.25712 21.4206 3.41831 21.5819C3.57951 21.7432 3.7803 21.8593 4.00053 21.9184C4.22075 21.9776 4.45267 21.9778 4.673 21.919L6.899 21.323C7.28538 21.2254 7.69414 21.2727 8.048 21.456C9.43095 22.1446 10.9551 22.502 12.5 22.5C18.023 22.5 22.5 18.023 22.5 12.5C22.5 10.679 22.013 8.97001 21.162 7.50001\"\n stroke=\"white\"\n stroke-width=\"2\"\n stroke-linecap=\"round\"\n />\n <path\n d=\"M8.5 12.5H8.509M12.491 12.5H12.5M16.491 12.5H16.5\"\n stroke=\"white\"\n stroke-width=\"2.66667\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n />\n </svg>\n </app-button>\n } } @if (showChat) {\n <app-chat-header\n [showBackButton]=\"showChat\"\n [showLogo]=\"true\"\n (onClose)=\"handleEndChat()\"\n (onBack)=\"handleBack()\"\n [language]=\"currentLang\"\n ></app-chat-header>\n\n <app-chat\n class=\"chat-container\"\n [messages]=\"messages\"\n [needsAgent]=\"needsAgent\"\n [assistantStatus]=\"assistantStatus\"\n [isAblyConnected]=\"isAblyConnected\"\n [isChatClosed]=\"isChatClosed\"\n (sendMessageEvent)=\"handleSendMessage($event)\"\n [currentLang]=\"currentLang\"\n [loading]=\"chatIsLoading\"\n ></app-chat>\n }\n\n <!-- Main Content -->\n @if (!showChat) {\n <div class=\"main-content\">\n @if (isIntroScreenEnabled) { @if (!showHelpScreenData) {\n <app-intro-section\n [currentLang]=\"currentLang\"\n (showHelpScreenData)=\"handleShowHelpScreenData()\"\n (navigateToUrl)=\"handleNavigateToUrl($event)\"\n ></app-intro-section>\n } } @if (showHelpScreenData) {\n <svg\n class=\"stars\"\n viewBox=\"0 0 244 196\"\n fill=\"currentColor\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <g opacity=\"0.15\">\n <path\n d=\"M61.0903 66.4434C61.101 66.4056 61.1063 66.3867 61.1088 66.3779C62.7734 60.5407 71.046 60.5407 72.7106 66.3779C72.7131 66.3867 72.7184 66.4056 72.7291 66.4434C72.7572 66.5431 72.7712 66.5929 72.7845 66.6397C80.5193 93.9529 101.867 115.3 129.18 123.035C129.227 123.048 129.276 123.062 129.376 123.09C129.414 123.101 129.433 123.106 129.441 123.109C135.279 124.773 135.279 133.046 129.441 134.711C129.433 134.713 129.414 134.718 129.376 134.729C129.276 134.757 129.227 134.771 129.18 134.784C101.867 142.519 80.5193 163.867 72.7845 191.18C72.7712 191.227 72.7572 191.276 72.7291 191.376C72.7184 191.414 72.7131 191.433 72.7106 191.441C71.046 197.279 62.7734 197.279 61.1088 191.441C61.1063 191.433 61.101 191.414 61.0903 191.376C61.0622 191.276 61.0482 191.227 61.035 191.18C53.3002 163.867 31.9529 142.519 4.63971 134.784C4.59292 134.771 4.54309 134.757 4.44342 134.729C4.40559 134.718 4.38668 134.713 4.37792 134.711C-1.45931 133.046 -1.45931 124.773 4.37792 123.109C4.38668 123.106 4.40559 123.101 4.44342 123.09C4.54309 123.062 4.59292 123.048 4.63971 123.035C31.9529 115.3 53.3002 93.9529 61.035 66.6397C61.0482 66.5929 61.0622 66.5431 61.0903 66.4434Z\"\n fill=\"currentColor\"\n />\n <path\n d=\"M188.17 50.6848C188.179 50.6534 188.183 50.6377 188.185 50.6305C189.525 45.7898 196.183 45.7898 197.523 50.6305C197.525 50.6377 197.529 50.6534 197.538 50.6848C197.561 50.7674 197.572 50.8088 197.583 50.8476C203.808 73.4975 220.99 91.2002 242.974 97.6144C243.012 97.6253 243.052 97.637 243.132 97.6603C243.162 97.6691 243.178 97.6736 243.185 97.6756C247.883 99.056 247.883 105.916 243.185 107.297C243.178 107.299 243.162 107.303 243.132 107.312C243.052 107.335 243.012 107.347 242.974 107.358C220.99 113.772 203.808 131.475 197.583 154.125C197.572 154.163 197.561 154.205 197.538 154.287C197.529 154.319 197.525 154.334 197.523 154.342C196.183 159.182 189.525 159.182 188.185 154.342C188.183 154.334 188.179 154.319 188.17 154.287C188.148 154.205 188.136 154.163 188.126 154.125C181.9 131.475 164.718 113.772 142.734 107.358C142.697 107.347 142.657 107.335 142.576 107.312C142.546 107.303 142.531 107.299 142.524 107.297C137.825 105.916 137.825 99.056 142.524 97.6756C142.531 97.6736 142.546 97.6691 142.576 97.6603C142.657 97.637 142.697 97.6253 142.734 97.6144C164.718 91.2002 181.9 73.4975 188.126 50.8476C188.136 50.8088 188.148 50.7674 188.17 50.6848Z\"\n fill=\"currentColor\"\n />\n <path\n d=\"M127.131 -17.2906C127.138 -17.3137 127.143 -17.3305 127.143 -17.3305C128.198 -20.8898 133.444 -20.8898 134.5 -17.3305C134.5 -17.3305 134.505 -17.3137 134.512 -17.2906C134.529 -17.2298 134.538 -17.1994 134.547 -17.1709C139.452 -0.516516 152.989 12.5001 170.309 17.2164C170.339 17.2245 170.371 17.2331 170.434 17.2502C170.458 17.2567 170.476 17.2615 170.476 17.2615C174.177 18.2765 174.177 23.3208 170.476 24.3357C170.476 24.3357 170.458 24.3405 170.434 24.347C170.371 24.3642 170.339 24.3727 170.309 24.3808C152.989 29.0971 139.452 42.1138 134.547 58.7681C134.538 58.7967 134.529 58.8271 134.512 58.8878C134.505 58.9109 134.5 58.9278 134.5 58.9278C133.444 62.4871 128.198 62.4871 127.143 58.9278C127.143 58.9278 127.138 58.9109 127.131 58.8878C127.113 58.8271 127.104 58.7967 127.096 58.7681C122.191 42.1138 108.653 29.0971 91.3329 24.3808C91.3032 24.3727 91.2716 24.3642 91.2084 24.347C91.1844 24.3405 91.1669 24.3357 91.1669 24.3357C87.4652 23.3208 87.4652 18.2765 91.1669 17.2615C91.1669 17.2615 91.1844 17.2567 91.2084 17.2502C91.2716 17.2331 91.3032 17.2245 91.3329 17.2164C108.653 12.5001 122.191 -0.516516 127.096 -17.1709C127.104 -17.1994 127.113 -17.2298 127.131 -17.2906Z\"\n fill=\"currentColor\"\n />\n </g>\n </svg>\n\n <app-help-screen-data\n [helpScreenData]=\"helpScreenData\"\n (handleStartNewChat)=\"handleStartNewChat($event)\"\n ></app-help-screen-data>\n }\n </div>\n }\n\n <!-- Footer -->\n <app-footer\n [showHelpScreenData]=\"showHelpScreenData\"\n [showChat]=\"showChat\"\n ></app-footer>\n\n <!-- Review Dialog -->\n <app-review-dialog\n [isOpen]=\"showReviewDialog\"\n [isSubmitting]=\"isSubmittingReview\"\n (close)=\"handleReviewSkip()\"\n (submitReview)=\"handleReviewSubmit($event)\"\n (skip)=\"handleReviewSkip()\"\n ></app-review-dialog>\n }\n</div>\n}\n", styles: [".help-popup{position:fixed;bottom:5rem;right:1.25rem;width:384px;height:calc(100vh - 12rem);max-height:800px;border-radius:1.5rem;box-shadow:#64646f33 0 7px 29px;display:flex;flex-direction:column;z-index:1000;background-color:var(--secondary);overflow:hidden}.help-popup.is-open{width:384px}.help-popup.is-closed{width:60px}.error-message{bottom:22.5rem;right:1.25rem;padding:1rem;border-radius:.5rem;box-shadow:#64646f33 0 7px 29px;height:100%;text-align:center;display:flex;align-items:center;justify-content:center}.chat-button{position:absolute;bottom:1.25rem;right:1.25rem;padding:.75rem!important}.chat-button--icon{padding:.25rem!important}.chat-container{height:100%;padding:1rem 1rem 0;max-height:85%}.main-content{flex:1;display:flex;flex-direction:column;gap:1rem;overflow-y:auto;padding:0 1.5rem;width:100%;box-sizing:border-box}.stars{position:absolute;top:0;inset-inline-end:0;width:10rem;height:10rem;color:var(--babylai-primary-color, #ad49e1)}.icon-full{width:100%}.babylai-bg-linear-to-b{background:var(--babylai-primary-color);background:linear-gradient(180deg,var(--babylai-primary-color) 1%,color-mix(in srgb,var(--babylai-primary-color) 1%,transparent) 100%)}@media (prefers-color-scheme: dark){.babylai-bg-linear-to-b{background:var(--babylai-storm-dust-950);background:linear-gradient(180deg,var(--babylai-storm-dust-950) 1%,color-mix(in srgb,var(--babylai-storm-dust-950) 60%,transparent) 100%)}}\n"] }]
|
|
2135
|
+
], template: "@if (isPopupOpen) {\n<div\n class=\"help-popup\"\n [ngClass]=\"{\n 'is-open': isPopupOpen,\n 'is-closed': !isPopupOpen,\n 'babylai-bg-linear-to-b': isPopupOpen && !showHelpScreenData && !showChat\n }\"\n>\n @if (showEndChatConfirmation) {\n <app-confirmation-dialog\n [title]=\"'LeavingDialogTitle' | translate\"\n [body]=\"'LeavingDialogBody' | translate\"\n [confirmText]=\"'Confirm' | translate\"\n [cancelText]=\"'Cancel' | translate\"\n (onConfirm)=\"handleConfirmEndChat()\"\n (onCancel)=\"handleCancelEndChat()\"\n ></app-confirmation-dialog>\n }\n\n @if (showStartNewChatConfirmation) {\n <app-confirmation-dialog\n [title]=\"'StartNewChatDialogTitle' | translate\"\n [body]=\"'StartNewChatDialogBody' | translate\"\n [confirmText]=\"'Confirm' | translate\"\n [cancelText]=\"'Cancel' | translate\"\n (onConfirm)=\"handleConfirmStartNewChat()\"\n (onCancel)=\"handleCancelStartNewChat()\"\n ></app-confirmation-dialog>\n }\n\n <!-- Loading State -->\n @if (status === 'loading') {\n <div class=\"loading-state\">\n @if (!showHelpScreenData) {\n <app-header\n [showBackButton]=\"!!selectedOption || !!selectedNestedOption\"\n [showLogo]=\"true\"\n (onBack)=\"handleBack()\"\n (onClose)=\"handleClosePopup()\"\n [language]=\"currentLang\"\n ></app-header>\n } @if (showHelpScreenData) {\n <app-header\n [showCloseButton]=\"!isIntroScreenEnabled\"\n [showLogo]=\"true\"\n (onClose)=\"\n isIntroScreenEnabled ? handleHideHelpScreenData() : handleClosePopup()\n \"\n [language]=\"currentLang\"\n ></app-header>\n }\n <app-loading\n [variant]=\"!isIntroScreenEnabled ? 'primary' : 'default'\"\n ></app-loading>\n </div>\n }\n\n <!-- Error State -->\n @if (status === 'failed') {\n <div class=\"error-message\">\n <span>Error: {{ error }}</span>\n </div>\n }\n\n <!-- Content -->\n @if (status === 'succeeded') {\n <!-- Headers -->\n @if (isIntroScreenEnabled) { @if (!showHelpScreenData && !showChat) {\n <app-header\n [showBackButton]=\"!!selectedOption || !!selectedNestedOption\"\n [showLogo]=\"true\"\n (onBack)=\"handleBack()\"\n (onClose)=\"handleClosePopup()\"\n [language]=\"currentLang\"\n ></app-header>\n } } @if (showHelpScreenData && !showChat) {\n <app-header\n [showCloseButton]=\"!isIntroScreenEnabled\"\n [showBackButton]=\"isIntroScreenEnabled && showHelpScreenData\"\n [showLogo]=\"false\"\n (onClose)=\"\n isIntroScreenEnabled ? handleHideHelpScreenData() : handleClosePopup()\n \"\n (onBack)=\"isIntroScreenEnabled ? handleBack() : handleClosePopup()\"\n [language]=\"currentLang\"\n ></app-header>\n\n @if (showHelpScreenData && sessionId) {\n <app-button\n variant=\"icon-bg\"\n (click)=\"handleShowChat()\"\n class=\"chat-button\"\n className=\"button--icon\"\n >\n <svg\n class=\"icon-full\"\n viewBox=\"0 0 25 25\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <path\n d=\"M17.5 3.83801C15.9806 2.95874 14.2555 2.49712 12.5 2.50001C6.977 2.50001 2.5 6.97701 2.5 12.5C2.5 14.1 2.876 15.612 3.543 16.953C3.721 17.309 3.78 17.716 3.677 18.101L3.082 20.327C3.02307 20.5473 3.02312 20.7792 3.08216 20.9995C3.14119 21.2198 3.25712 21.4206 3.41831 21.5819C3.57951 21.7432 3.7803 21.8593 4.00053 21.9184C4.22075 21.9776 4.45267 21.9778 4.673 21.919L6.899 21.323C7.28538 21.2254 7.69414 21.2727 8.048 21.456C9.43095 22.1446 10.9551 22.502 12.5 22.5C18.023 22.5 22.5 18.023 22.5 12.5C22.5 10.679 22.013 8.97001 21.162 7.50001\"\n stroke=\"white\"\n stroke-width=\"2\"\n stroke-linecap=\"round\"\n />\n <path\n d=\"M8.5 12.5H8.509M12.491 12.5H12.5M16.491 12.5H16.5\"\n stroke=\"white\"\n stroke-width=\"2.66667\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n />\n </svg>\n </app-button>\n } } @if (showChat) {\n <app-chat-header\n [showBackButton]=\"showChat\"\n [showLogo]=\"true\"\n (onClose)=\"handleEndChat()\"\n (onBack)=\"handleBack()\"\n [language]=\"currentLang\"\n ></app-chat-header>\n\n <app-chat\n class=\"chat-container\"\n [messages]=\"messages\"\n [needsAgent]=\"needsAgent\"\n [assistantStatus]=\"assistantStatus\"\n [isAblyConnected]=\"isAblyConnected\"\n [isChatClosed]=\"isChatClosed\"\n (sendMessageEvent)=\"handleSendMessage($event)\"\n [currentLang]=\"currentLang\"\n [loading]=\"chatIsLoading\"\n [sessionId]=\"sessionId\"\n ></app-chat>\n }\n\n <!-- Main Content -->\n @if (!showChat) {\n <div class=\"main-content\">\n @if (isIntroScreenEnabled) { @if (!showHelpScreenData) {\n <app-intro-section\n [currentLang]=\"currentLang\"\n (showHelpScreenData)=\"handleShowHelpScreenData()\"\n (navigateToUrl)=\"handleNavigateToUrl($event)\"\n ></app-intro-section>\n } } @if (showHelpScreenData) {\n <svg\n class=\"stars\"\n viewBox=\"0 0 244 196\"\n fill=\"currentColor\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <g opacity=\"0.15\">\n <path\n d=\"M61.0903 66.4434C61.101 66.4056 61.1063 66.3867 61.1088 66.3779C62.7734 60.5407 71.046 60.5407 72.7106 66.3779C72.7131 66.3867 72.7184 66.4056 72.7291 66.4434C72.7572 66.5431 72.7712 66.5929 72.7845 66.6397C80.5193 93.9529 101.867 115.3 129.18 123.035C129.227 123.048 129.276 123.062 129.376 123.09C129.414 123.101 129.433 123.106 129.441 123.109C135.279 124.773 135.279 133.046 129.441 134.711C129.433 134.713 129.414 134.718 129.376 134.729C129.276 134.757 129.227 134.771 129.18 134.784C101.867 142.519 80.5193 163.867 72.7845 191.18C72.7712 191.227 72.7572 191.276 72.7291 191.376C72.7184 191.414 72.7131 191.433 72.7106 191.441C71.046 197.279 62.7734 197.279 61.1088 191.441C61.1063 191.433 61.101 191.414 61.0903 191.376C61.0622 191.276 61.0482 191.227 61.035 191.18C53.3002 163.867 31.9529 142.519 4.63971 134.784C4.59292 134.771 4.54309 134.757 4.44342 134.729C4.40559 134.718 4.38668 134.713 4.37792 134.711C-1.45931 133.046 -1.45931 124.773 4.37792 123.109C4.38668 123.106 4.40559 123.101 4.44342 123.09C4.54309 123.062 4.59292 123.048 4.63971 123.035C31.9529 115.3 53.3002 93.9529 61.035 66.6397C61.0482 66.5929 61.0622 66.5431 61.0903 66.4434Z\"\n fill=\"currentColor\"\n />\n <path\n d=\"M188.17 50.6848C188.179 50.6534 188.183 50.6377 188.185 50.6305C189.525 45.7898 196.183 45.7898 197.523 50.6305C197.525 50.6377 197.529 50.6534 197.538 50.6848C197.561 50.7674 197.572 50.8088 197.583 50.8476C203.808 73.4975 220.99 91.2002 242.974 97.6144C243.012 97.6253 243.052 97.637 243.132 97.6603C243.162 97.6691 243.178 97.6736 243.185 97.6756C247.883 99.056 247.883 105.916 243.185 107.297C243.178 107.299 243.162 107.303 243.132 107.312C243.052 107.335 243.012 107.347 242.974 107.358C220.99 113.772 203.808 131.475 197.583 154.125C197.572 154.163 197.561 154.205 197.538 154.287C197.529 154.319 197.525 154.334 197.523 154.342C196.183 159.182 189.525 159.182 188.185 154.342C188.183 154.334 188.179 154.319 188.17 154.287C188.148 154.205 188.136 154.163 188.126 154.125C181.9 131.475 164.718 113.772 142.734 107.358C142.697 107.347 142.657 107.335 142.576 107.312C142.546 107.303 142.531 107.299 142.524 107.297C137.825 105.916 137.825 99.056 142.524 97.6756C142.531 97.6736 142.546 97.6691 142.576 97.6603C142.657 97.637 142.697 97.6253 142.734 97.6144C164.718 91.2002 181.9 73.4975 188.126 50.8476C188.136 50.8088 188.148 50.7674 188.17 50.6848Z\"\n fill=\"currentColor\"\n />\n <path\n d=\"M127.131 -17.2906C127.138 -17.3137 127.143 -17.3305 127.143 -17.3305C128.198 -20.8898 133.444 -20.8898 134.5 -17.3305C134.5 -17.3305 134.505 -17.3137 134.512 -17.2906C134.529 -17.2298 134.538 -17.1994 134.547 -17.1709C139.452 -0.516516 152.989 12.5001 170.309 17.2164C170.339 17.2245 170.371 17.2331 170.434 17.2502C170.458 17.2567 170.476 17.2615 170.476 17.2615C174.177 18.2765 174.177 23.3208 170.476 24.3357C170.476 24.3357 170.458 24.3405 170.434 24.347C170.371 24.3642 170.339 24.3727 170.309 24.3808C152.989 29.0971 139.452 42.1138 134.547 58.7681C134.538 58.7967 134.529 58.8271 134.512 58.8878C134.505 58.9109 134.5 58.9278 134.5 58.9278C133.444 62.4871 128.198 62.4871 127.143 58.9278C127.143 58.9278 127.138 58.9109 127.131 58.8878C127.113 58.8271 127.104 58.7967 127.096 58.7681C122.191 42.1138 108.653 29.0971 91.3329 24.3808C91.3032 24.3727 91.2716 24.3642 91.2084 24.347C91.1844 24.3405 91.1669 24.3357 91.1669 24.3357C87.4652 23.3208 87.4652 18.2765 91.1669 17.2615C91.1669 17.2615 91.1844 17.2567 91.2084 17.2502C91.2716 17.2331 91.3032 17.2245 91.3329 17.2164C108.653 12.5001 122.191 -0.516516 127.096 -17.1709C127.104 -17.1994 127.113 -17.2298 127.131 -17.2906Z\"\n fill=\"currentColor\"\n />\n </g>\n </svg>\n\n <app-help-screen-data\n [helpScreenData]=\"helpScreenData\"\n (handleStartNewChat)=\"handleStartNewChat($event)\"\n ></app-help-screen-data>\n }\n </div>\n }\n\n <!-- Footer -->\n <app-footer\n [showHelpScreenData]=\"showHelpScreenData\"\n [showChat]=\"showChat\"\n ></app-footer>\n\n <!-- Review Dialog -->\n <app-review-dialog\n [isOpen]=\"showReviewDialog\"\n [isSubmitting]=\"isSubmittingReview\"\n (close)=\"handleReviewSkip()\"\n (submitReview)=\"handleReviewSubmit($event)\"\n (skip)=\"handleReviewSkip()\"\n ></app-review-dialog>\n }\n</div>\n}\n", styles: [".help-popup{position:fixed;bottom:5rem;right:1.25rem;width:384px;height:calc(100vh - 12rem);max-height:800px;border-radius:1.5rem;box-shadow:#64646f33 0 7px 29px;display:flex;flex-direction:column;z-index:1000;background-color:var(--secondary);overflow:hidden}.help-popup.is-open{width:384px}.help-popup.is-closed{width:60px}.error-message{bottom:22.5rem;right:1.25rem;padding:1rem;border-radius:.5rem;box-shadow:#64646f33 0 7px 29px;height:100%;text-align:center;display:flex;align-items:center;justify-content:center}.chat-button{position:absolute;bottom:1.25rem;right:1.25rem;padding:.75rem!important}.chat-button--icon{padding:.25rem!important}.chat-container{height:100%;padding:1rem 1rem 0;max-height:85%}.main-content{flex:1;display:flex;flex-direction:column;gap:1rem;overflow-y:auto;padding:0 1.5rem;width:100%;box-sizing:border-box}.stars{position:absolute;top:0;inset-inline-end:0;width:10rem;height:10rem;color:var(--babylai-primary-color, #ad49e1)}.icon-full{width:100%}.babylai-bg-linear-to-b{background:var(--babylai-primary-color);background:linear-gradient(180deg,var(--babylai-primary-color) 1%,color-mix(in srgb,var(--babylai-primary-color) 1%,transparent) 100%)}@media (prefers-color-scheme: dark){.babylai-bg-linear-to-b{background:var(--babylai-storm-dust-950);background:linear-gradient(180deg,var(--babylai-storm-dust-950) 1%,color-mix(in srgb,var(--babylai-storm-dust-950) 60%,transparent) 100%)}}\n"] }]
|
|
1516
2136
|
}], propDecorators: { isPopupOpen: [{
|
|
1517
2137
|
type: Input
|
|
1518
2138
|
}], showHelpScreenData: [{
|
|
@@ -1587,87 +2207,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.1", ngImpor
|
|
|
1587
2207
|
type: Output
|
|
1588
2208
|
}] } });
|
|
1589
2209
|
|
|
1590
|
-
class ApiService {
|
|
1591
|
-
getTokenFunction = null;
|
|
1592
|
-
baseUrl = 'https://babylai.net/api';
|
|
1593
|
-
/**
|
|
1594
|
-
* Initialize the API service with optional configuration
|
|
1595
|
-
* @param config Configuration object containing token function and optional base URL
|
|
1596
|
-
*/
|
|
1597
|
-
initialize(config) {
|
|
1598
|
-
if (!config.getToken) {
|
|
1599
|
-
throw new Error('getToken function is required for API initialization');
|
|
1600
|
-
}
|
|
1601
|
-
this.getTokenFunction = config.getToken;
|
|
1602
|
-
if (config.baseUrl) {
|
|
1603
|
-
this.baseUrl = config.baseUrl;
|
|
1604
|
-
}
|
|
1605
|
-
}
|
|
1606
|
-
async getValidToken(forceRefresh = false) {
|
|
1607
|
-
if (!this.getTokenFunction) {
|
|
1608
|
-
throw new Error('API service not initialized. Call initialize({ getToken }) first.');
|
|
1609
|
-
}
|
|
1610
|
-
let storedToken = localStorage.getItem('chatbot-token');
|
|
1611
|
-
let storedExpiry = localStorage.getItem('chatbot-token-expiry');
|
|
1612
|
-
const currentTime = Math.floor(Date.now() / 1000);
|
|
1613
|
-
if (!storedToken || !storedExpiry || currentTime >= Number(storedExpiry) || forceRefresh) {
|
|
1614
|
-
const tokenResponse = await this.getTokenFunction();
|
|
1615
|
-
if (!tokenResponse) {
|
|
1616
|
-
throw new Error('Invalid token response from getToken function');
|
|
1617
|
-
}
|
|
1618
|
-
storedToken = tokenResponse;
|
|
1619
|
-
storedExpiry = String(currentTime + 900); // 15 minutes expiry
|
|
1620
|
-
localStorage.setItem('chatbot-token', storedToken);
|
|
1621
|
-
localStorage.setItem('chatbot-token-expiry', storedExpiry);
|
|
1622
|
-
}
|
|
1623
|
-
return storedToken;
|
|
1624
|
-
}
|
|
1625
|
-
async fetchWithAuth(url, options, retry = true) {
|
|
1626
|
-
if (!options.headers) {
|
|
1627
|
-
options.headers = {};
|
|
1628
|
-
}
|
|
1629
|
-
const headers = options.headers;
|
|
1630
|
-
headers['Authorization'] = `Bearer ${await this.getValidToken()}`;
|
|
1631
|
-
let response = await fetch(url, options);
|
|
1632
|
-
if ((response.status === 401 || response.status === 403) && retry) {
|
|
1633
|
-
console.warn('Token expired. Fetching new token...');
|
|
1634
|
-
const newToken = await this.getValidToken(true);
|
|
1635
|
-
headers['Authorization'] = `Bearer ${newToken}`;
|
|
1636
|
-
response = await fetch(url, options);
|
|
1637
|
-
}
|
|
1638
|
-
return response;
|
|
1639
|
-
}
|
|
1640
|
-
async apiRequest(endpoint, method = 'GET', body = null, customHeaders = {}) {
|
|
1641
|
-
const url = `${this.baseUrl}/${endpoint}`;
|
|
1642
|
-
const options = {
|
|
1643
|
-
method,
|
|
1644
|
-
headers: {
|
|
1645
|
-
'Content-Type': 'application/json',
|
|
1646
|
-
...customHeaders
|
|
1647
|
-
},
|
|
1648
|
-
body: body ? JSON.stringify(body) : null
|
|
1649
|
-
};
|
|
1650
|
-
const response = await this.fetchWithAuth(url, options);
|
|
1651
|
-
if (!response.ok) {
|
|
1652
|
-
const errorData = await response.json();
|
|
1653
|
-
throw new Error(errorData.message || 'API request failed');
|
|
1654
|
-
}
|
|
1655
|
-
return response;
|
|
1656
|
-
}
|
|
1657
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.1", ngImport: i0, type: ApiService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
1658
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.1", ngImport: i0, type: ApiService, providedIn: 'root' });
|
|
1659
|
-
}
|
|
1660
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.1", ngImport: i0, type: ApiService, decorators: [{
|
|
1661
|
-
type: Injectable,
|
|
1662
|
-
args: [{
|
|
1663
|
-
providedIn: 'root'
|
|
1664
|
-
}]
|
|
1665
|
-
}] });
|
|
1666
|
-
|
|
1667
2210
|
class HelpCenterWidgetComponent {
|
|
1668
2211
|
apiService;
|
|
1669
2212
|
translationService;
|
|
1670
2213
|
themeService;
|
|
2214
|
+
fileUploadService = inject(FileUploadService);
|
|
1671
2215
|
getToken;
|
|
1672
2216
|
helpScreenId;
|
|
1673
2217
|
showArrow = true;
|
|
@@ -1806,12 +2350,63 @@ class HelpCenterWidgetComponent {
|
|
|
1806
2350
|
throw error;
|
|
1807
2351
|
}
|
|
1808
2352
|
}
|
|
1809
|
-
async sendMessage(
|
|
1810
|
-
|
|
2353
|
+
async sendMessage(event) {
|
|
2354
|
+
// Handle both old format (string) and new format (object)
|
|
2355
|
+
let textToSend;
|
|
2356
|
+
let attachmentIds = [];
|
|
2357
|
+
let pendingFiles = [];
|
|
2358
|
+
if (typeof event === 'string') {
|
|
2359
|
+
textToSend = event || this.messageText;
|
|
2360
|
+
}
|
|
2361
|
+
else if (event) {
|
|
2362
|
+
textToSend = event.text || this.messageText;
|
|
2363
|
+
attachmentIds = event.attachmentIds || [];
|
|
2364
|
+
pendingFiles = event.pendingFiles || [];
|
|
2365
|
+
}
|
|
2366
|
+
else {
|
|
2367
|
+
textToSend = this.messageText;
|
|
2368
|
+
}
|
|
1811
2369
|
if (!textToSend.trim() || this.isChatClosed)
|
|
1812
2370
|
return;
|
|
1813
2371
|
try {
|
|
1814
2372
|
this.assistantStatus = 'typing';
|
|
2373
|
+
// Create session only when user sends first message (if not already exists)
|
|
2374
|
+
if (!this.sessionId) {
|
|
2375
|
+
console.debug('[HelpCenterWidget] Creating session on first message send', {
|
|
2376
|
+
selectedOption: this.selectedOption,
|
|
2377
|
+
hasSelectedOption: !!this.selectedOption,
|
|
2378
|
+
hasPendingFiles: pendingFiles.length > 0,
|
|
2379
|
+
});
|
|
2380
|
+
await this.createChatSession(this.selectedOption || undefined);
|
|
2381
|
+
}
|
|
2382
|
+
else {
|
|
2383
|
+
console.debug('[HelpCenterWidget] Using existing session', {
|
|
2384
|
+
sessionId: this.sessionId,
|
|
2385
|
+
});
|
|
2386
|
+
}
|
|
2387
|
+
// If there are pending files, upload them now that we have a session
|
|
2388
|
+
if (pendingFiles.length > 0 && this.sessionId) {
|
|
2389
|
+
console.debug('[HelpCenterWidget] Uploading pending files', {
|
|
2390
|
+
fileCount: pendingFiles.length,
|
|
2391
|
+
sessionId: this.sessionId,
|
|
2392
|
+
});
|
|
2393
|
+
try {
|
|
2394
|
+
const uploadResults = await firstValueFrom(this.fileUploadService.uploadFiles(this.sessionId, pendingFiles));
|
|
2395
|
+
// Add successfully uploaded file IDs to attachmentIds
|
|
2396
|
+
const newAttachmentIds = uploadResults
|
|
2397
|
+
.filter((r) => r.success)
|
|
2398
|
+
.map((r) => r.fileId);
|
|
2399
|
+
attachmentIds = [...attachmentIds, ...newAttachmentIds];
|
|
2400
|
+
console.debug('[HelpCenterWidget] Pending files uploaded', {
|
|
2401
|
+
uploadedCount: newAttachmentIds.length,
|
|
2402
|
+
totalAttachmentIds: attachmentIds.length,
|
|
2403
|
+
});
|
|
2404
|
+
}
|
|
2405
|
+
catch (uploadError) {
|
|
2406
|
+
console.error('Error uploading pending files:', uploadError);
|
|
2407
|
+
// Continue without the failed uploads
|
|
2408
|
+
}
|
|
2409
|
+
}
|
|
1815
2410
|
// Add user message
|
|
1816
2411
|
this.messages.push({
|
|
1817
2412
|
id: Date.now(),
|
|
@@ -1820,11 +2415,12 @@ class HelpCenterWidgetComponent {
|
|
|
1820
2415
|
messageContent: textToSend,
|
|
1821
2416
|
sentAt: new Date(),
|
|
1822
2417
|
isSeen: false,
|
|
2418
|
+
...(attachmentIds.length > 0 && { attachmentIds }),
|
|
1823
2419
|
});
|
|
1824
|
-
if (!this.sessionId) {
|
|
1825
|
-
await this.createChatSession(this.selectedOption || undefined);
|
|
1826
|
-
}
|
|
1827
2420
|
const messageDto = { messageContent: textToSend };
|
|
2421
|
+
if (attachmentIds.length > 0) {
|
|
2422
|
+
messageDto.attachmentIds = attachmentIds;
|
|
2423
|
+
}
|
|
1828
2424
|
await this.apiService.apiRequest(`Client/ClientChatSession/${this.sessionId}/send-message`, 'POST', messageDto, {
|
|
1829
2425
|
'Accept-Langauge': this.currentLang,
|
|
1830
2426
|
});
|
|
@@ -1851,13 +2447,24 @@ class HelpCenterWidgetComponent {
|
|
|
1851
2447
|
this.needsAgent = true;
|
|
1852
2448
|
}
|
|
1853
2449
|
const sender = this.getSenderType(parseInt(senderType));
|
|
2450
|
+
// Handle both string and object message formats
|
|
2451
|
+
let messageContent;
|
|
2452
|
+
let attachmentIds;
|
|
2453
|
+
if (typeof message === 'string') {
|
|
2454
|
+
messageContent = message;
|
|
2455
|
+
}
|
|
2456
|
+
else {
|
|
2457
|
+
messageContent = message.content || '';
|
|
2458
|
+
attachmentIds = message.attachments;
|
|
2459
|
+
}
|
|
1854
2460
|
this.messages.push({
|
|
1855
2461
|
id: Date.now(),
|
|
1856
2462
|
sender: sender,
|
|
1857
2463
|
senderType: parseInt(senderType),
|
|
1858
|
-
messageContent:
|
|
2464
|
+
messageContent: messageContent,
|
|
1859
2465
|
sentAt: new Date(),
|
|
1860
2466
|
isSeen: true,
|
|
2467
|
+
...(attachmentIds && attachmentIds.length > 0 && { attachmentIds }),
|
|
1861
2468
|
});
|
|
1862
2469
|
this.assistantStatus = 'idle';
|
|
1863
2470
|
this.scrollToBottom();
|
|
@@ -1905,42 +2512,25 @@ class HelpCenterWidgetComponent {
|
|
|
1905
2512
|
if (this.messages.length > 0 && !this.sessionId) {
|
|
1906
2513
|
this.messages = [];
|
|
1907
2514
|
}
|
|
2515
|
+
// Set the selected option - session will be created when user sends first message
|
|
1908
2516
|
this.selectedOption = option;
|
|
1909
|
-
|
|
1910
|
-
|
|
1911
|
-
|
|
1912
|
-
|
|
1913
|
-
|
|
1914
|
-
|
|
1915
|
-
|
|
1916
|
-
|
|
1917
|
-
|
|
1918
|
-
|
|
1919
|
-
|
|
1920
|
-
|
|
1921
|
-
|
|
1922
|
-
|
|
1923
|
-
|
|
1924
|
-
|
|
1925
|
-
|
|
1926
|
-
this.showChat = true;
|
|
1927
|
-
this.isChatClosed = false;
|
|
1928
|
-
this.showHelpScreenData = false;
|
|
1929
|
-
this.chatIsLoading = false;
|
|
1930
|
-
}
|
|
1931
|
-
catch (error) {
|
|
1932
|
-
console.error('Error starting chat:', error);
|
|
1933
|
-
this.chatIsLoading = false;
|
|
1934
|
-
// Show error message to user
|
|
1935
|
-
this.messages.push({
|
|
1936
|
-
id: Date.now(),
|
|
1937
|
-
sender: 'assistant',
|
|
1938
|
-
senderType: 3,
|
|
1939
|
-
messageContent: 'Failed to start chat. Please try again.\n فشل في بدء المحادثة. يرجى المحاولة مرة أخرى.',
|
|
1940
|
-
sentAt: new Date(),
|
|
1941
|
-
isSeen: true,
|
|
1942
|
-
});
|
|
1943
|
-
}
|
|
2517
|
+
// Update UI state - show chat without creating session
|
|
2518
|
+
this.showChat = true;
|
|
2519
|
+
this.isChatClosed = false;
|
|
2520
|
+
this.showHelpScreenData = false;
|
|
2521
|
+
this.chatIsLoading = false;
|
|
2522
|
+
// Add greeting message (without creating session)
|
|
2523
|
+
this.messages.push({
|
|
2524
|
+
id: Date.now(),
|
|
2525
|
+
sender: 'assistant',
|
|
2526
|
+
senderType: 3,
|
|
2527
|
+
messageContent: option.assistant?.greeting ||
|
|
2528
|
+
(this.currentLang === 'en'
|
|
2529
|
+
? 'Hello! How can I assist you today?'
|
|
2530
|
+
: 'مرحباً! كيف يمكنني مساعدتك اليوم؟'),
|
|
2531
|
+
sentAt: new Date(),
|
|
2532
|
+
isSeen: true,
|
|
2533
|
+
});
|
|
1944
2534
|
}
|
|
1945
2535
|
async startNewChatSession(option) {
|
|
1946
2536
|
try {
|
|
@@ -2138,6 +2728,12 @@ class HelpCenterWidgetComponent {
|
|
|
2138
2728
|
}
|
|
2139
2729
|
}
|
|
2140
2730
|
handleShowChat() {
|
|
2731
|
+
console.debug('[HelpCenterWidget] handleShowChat called', {
|
|
2732
|
+
sessionId: this.sessionId,
|
|
2733
|
+
hasActiveSession: this.hasActiveChatSession(),
|
|
2734
|
+
});
|
|
2735
|
+
// Just show chat - don't create session here
|
|
2736
|
+
// Session will be created when user sends first message
|
|
2141
2737
|
this.showChat = true;
|
|
2142
2738
|
this.showHelpScreenData = false;
|
|
2143
2739
|
}
|
|
@@ -2180,10 +2776,10 @@ class HelpCenterWidgetComponent {
|
|
|
2180
2776
|
navigateToUrl(url) {
|
|
2181
2777
|
window.open(url, '_blank');
|
|
2182
2778
|
}
|
|
2183
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
2184
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "
|
|
2779
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.11", ngImport: i0, type: HelpCenterWidgetComponent, deps: [{ token: ApiService }, { token: TranslationService }, { token: ThemeService }], target: i0.ɵɵFactoryTarget.Component });
|
|
2780
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.11", type: HelpCenterWidgetComponent, isStandalone: true, selector: "app-help-center-widget", inputs: { getToken: "getToken", helpScreenId: "helpScreenId", showArrow: "showArrow", messageLabel: "messageLabel", currentLang: "currentLang", isIntroScreenEnabled: "isIntroScreenEnabled", primaryColor: "primaryColor", logoUrl: "logoUrl" }, viewQueries: [{ propertyName: "chatMessagesContainer", first: true, predicate: ["chatMessagesContainer"], descendants: true }], usesOnChanges: true, ngImport: i0, template: "<div class=\"help-center-container\" [dir]=\"getDirection()\">\n <!-- TEST: Version mismatch fixed - Arrow Animation - SUCCESS! -->\n <app-arrow-animation\n [showArrowAnimation]=\"showArrowAnimation\"\n [isPopupOpen]=\"isPopupOpen\"\n [messageLabel]=\"messageLabel\"\n (closeArrowAnimation)=\"handleCloseArrowAnimation()\"\n ></app-arrow-animation>\n\n <!-- Help Button -->\n <app-help-button (togglePopup)=\"handleTogglePopup()\"></app-help-button>\n\n <!-- Help Popup -->\n <app-help-popup\n [isPopupOpen]=\"isPopupOpen\"\n [showHelpScreenData]=\"showHelpScreenData\"\n [showChat]=\"showChat\"\n [status]=\"status\"\n [error]=\"error\"\n [helpScreenData]=\"helpScreenData\"\n [messages]=\"messages\"\n [needsAgent]=\"needsAgent\"\n [assistantStatus]=\"assistantStatus\"\n [isAblyConnected]=\"isAblyConnected\"\n [isChatClosed]=\"isChatClosed\"\n [currentLang]=\"currentLang\"\n [chatIsLoading]=\"chatIsLoading\"\n [sessionId]=\"sessionId\"\n [isIntroScreenEnabled]=\"isIntroScreenEnabled\"\n [selectedOption]=\"selectedOption\"\n [selectedNestedOption]=\"selectedNestedOption\"\n [showEndChatConfirmation]=\"showEndChatConfirmation\"\n [showStartNewChatConfirmation]=\"showStartNewChatConfirmation\"\n [showReviewDialog]=\"showReviewDialog\"\n [isSubmittingReview]=\"isSubmittingReview\"\n (closePopup)=\"handleClosePopup()\"\n (back)=\"handleBack()\"\n (showChatEvent)=\"handleShowChat()\"\n (endChat)=\"handleEndChat()\"\n (confirmEndChat)=\"confirmEndChat()\"\n (cancelEndChat)=\"cancelEndChat()\"\n (confirmStartNewChat)=\"confirmStartNewChat()\"\n (cancelStartNewChat)=\"cancelStartNewChat()\"\n (reviewSubmit)=\"handleReviewSubmit($event)\"\n (reviewSkip)=\"handleReviewSkip()\"\n (sendMessageEvent)=\"sendMessage($event)\"\n (startNewChat)=\"handleStartNewChat($event)\"\n (showHelpScreenDataEvent)=\"handleShowHelpScreenData()\"\n (hideHelpScreenData)=\"handleHideHelpScreenData()\"\n (navigateToUrl)=\"navigateToUrl($event)\"\n > </app-help-popup>\n</div>\n", styles: [".help-center-container{position:fixed;bottom:1.25rem;right:1.25rem;z-index:1000;width:auto;height:auto;display:flex;flex-direction:column;align-items:flex-end}::ng-deep .babylai-p-6{padding:1.5rem!important}::ng-deep .babylai-p-8{padding:2rem!important}::ng-deep *,::ng-deep *:before,::ng-deep *:after{box-sizing:border-box;margin:0;padding:0}\n", "@import\"https://fonts.googleapis.com/css2?family=Cairo:wght@200..1000&display=swap\";*,*:before,*:after{box-sizing:border-box;margin:0;padding:0}body,h1,h2,h3,h4,h5,h6,p,figure,blockquote,dl,dd,ul,ol{margin:0;padding:0}ul,ol{list-style:none}html{scroll-behavior:smooth}body{min-height:100vh;text-rendering:optimizeSpeed;line-height:1.5;font-family:Cairo,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}img,picture{max-width:100%;display:block}input,button,textarea,select{font:inherit}@media (prefers-reduced-motion: reduce){*,*:before,*:after{animation-duration:.01ms!important;animation-iteration-count:1!important;transition-duration:.01ms!important;scroll-behavior:auto!important}}button{background:none;border:none;padding:0;cursor:pointer;font:inherit;color:inherit}a{color:inherit;text-decoration:none}table{border-collapse:collapse;border-spacing:0}:root{--black-white-50: #ffffff;--black-white-100: #f3f3f3;--black-white-200: #e2e2e2;--black-white-300: #919191;--black-white-400: #606060;--black-white-500: #333333;--black-white-600: #1f1f1f;--black-white-700: #171717;--black-white-800: #0a0a0a;--black-white-900: #050505;--black-white-950: #000000;--black-white-default: #333333;--babylai-storm-dust: #3d3d3d;--babylai-storm-dust-950: #262626;--babylai-primary-color: #ad49e1;--babylai-primary-color-100: #f6ecfc;--babylai-primary-color-200: #deb6f3;--babylai-primary-color-300: #d49cee;--babylai-primary-color-400: #c57fea;--babylai-primary-color-500: #ad49e1;--babylai-primary-color-600: #672b87;--babylai-primary-color-700: #451d5a;--babylai-primary-color-800: #220e2d;--babylai-primary-color-900: #110716;--babylai-primary-color-950: #0a0310;--background: #ffffff;--foreground: #333333;--card: #ffffff;--card-foreground: #333333;--popover: #ffffff;--popover-foreground: #333333;--secondary: #f3f3f3;--secondary-foreground: #333333;--muted: #f3f3f3;--muted-foreground: #606060;--accent: #f3f3f3;--accent-foreground: #333333;--destructive: #ef4444;--destructive-foreground: #ffffff;--border: #e2e2e2;--input: #e2e2e2;--ring: #ad49e1;--radius: .5rem}*:focus-visible{outline:2px solid var(--ring);outline-offset:2px;border-radius:2px}button:focus-visible{outline:2px solid var(--ring);outline-offset:2px;box-shadow:0 0 0 2px var(--background),0 0 0 4px var(--ring)}input:focus-visible,textarea:focus-visible,select:focus-visible{outline:2px solid var(--ring);outline-offset:2px;border-color:var(--ring)}a:focus-visible{outline:2px solid var(--ring);outline-offset:2px;text-decoration:underline}@media (prefers-contrast: high){:root{--background: #ffffff;--foreground: #000000;--card: #ffffff;--card-foreground: #000000;--border: #000000;--muted-foreground: #000000}}@media (prefers-color-scheme: dark){:root{--black-white-50: #000000;--black-white-100: #050505;--black-white-200: #0a0a0a;--black-white-300: #171717;--black-white-400: #1f1f1f;--black-white-500: #333333;--black-white-600: #606060;--black-white-700: #919191;--black-white-800: #e2e2e2;--black-white-900: #f3f3f3;--black-white-950: #ffffff;--black-white-default: #e2e2e2;--babylai-storm-dust: #262626;--babylai-storm-dust-950: #3d3d3d;--background: #121212;--foreground: #ffffff;--card: #262626;--card-foreground: #ffffff;--popover: #1e1e1e;--popover-foreground: #ffffff;--secondary: #3d3d3d;--secondary-foreground: #ffffff;--muted: #2a2a2a;--muted-foreground: #b3b3b3;--accent: #2a2a2a;--accent-foreground: #ffffff;--destructive: #ff6b6b;--destructive-foreground: #ffffff;--border: #404040;--input: var(--card);--ring: #ad49e1}body{background-color:var(--background);color:var(--foreground)}.card--default,.card--shadowed{box-shadow:0 4px 6px -1px #0000004d,0 2px 4px -1px #0003}.help-popup{box-shadow:0 10px 15px -3px #0006,0 4px 6px -2px #0000004d}*:focus-visible{outline:2px solid var(--ring);outline-offset:2px;border-radius:2px}button:focus-visible{outline:2px solid var(--ring);outline-offset:2px;box-shadow:0 0 0 2px var(--background),0 0 0 4px var(--ring)}input:focus-visible,textarea:focus-visible,select:focus-visible{outline:2px solid var(--ring);outline-offset:2px;border-color:var(--ring)}a:focus-visible{outline:2px solid var(--ring);outline-offset:2px;text-decoration:underline}}@media (prefers-color-scheme: dark) and (prefers-contrast: high){:root{--background: #000000;--foreground: #ffffff;--card: #000000;--card-foreground: #ffffff;--border: #ffffff;--muted-foreground: #ffffff}}@media (prefers-color-scheme: dark) and (prefers-reduced-motion: reduce){*,*:before,*:after{animation-duration:.01ms!important;animation-iteration-count:1!important;transition-duration:.01ms!important;scroll-behavior:auto!important}.button:hover{transform:none!important}.chat__send-button:hover:not(:disabled){transform:translateY(-50%)!important}}@keyframes accordion-down{0%{height:0}to{height:var(--radix-accordion-content-height)}}@keyframes accordion-up{0%{height:var(--radix-accordion-content-height)}to{height:0}}@keyframes float{0%,to{transform:translateY(0)}50%{transform:translateY(-10px)}}.animate-accordion-down{animation:accordion-down .2s ease-out}.animate-accordion-up{animation:accordion-up .2s ease-out}.animate-float{animation:float 3s infinite ease-in-out}html,body{font-family:Cairo,sans-serif}div#wave{position:relative}div#wave .dot{display:inline-block;width:8px;height:8px;border-radius:50%;margin-right:3px;background:#ad49e1;animation:wave 1.3s linear infinite}div#wave .dot:nth-child(2){animation-delay:-1.1s}div#wave .dot:nth-child(3){animation-delay:-.9s}@keyframes wave{0%,60%,to{transform:initial}30%{transform:translateY(-10px)}}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: FormsModule }, { kind: "component", type: ArrowAnimationComponent, selector: "app-arrow-animation", inputs: ["showArrowAnimation", "isPopupOpen", "messageLabel"], outputs: ["closeArrowAnimation"] }, { kind: "component", type: HelpButtonComponent, selector: "app-help-button", outputs: ["togglePopup"] }, { kind: "component", type: HelpPopupComponent, selector: "app-help-popup", inputs: ["isPopupOpen", "showHelpScreenData", "showChat", "status", "error", "helpScreenData", "messages", "needsAgent", "assistantStatus", "isAblyConnected", "isChatClosed", "currentLang", "chatIsLoading", "sessionId", "isIntroScreenEnabled", "selectedOption", "selectedNestedOption", "showEndChatConfirmation", "showStartNewChatConfirmation", "showReviewDialog", "isSubmittingReview"], outputs: ["closePopup", "back", "showChatEvent", "endChat", "confirmEndChat", "cancelEndChat", "confirmStartNewChat", "cancelStartNewChat", "reviewSubmit", "reviewSkip", "sendMessageEvent", "startNewChat", "showHelpScreenDataEvent", "hideHelpScreenData", "navigateToUrl"] }] });
|
|
2185
2781
|
}
|
|
2186
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
2782
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.11", ngImport: i0, type: HelpCenterWidgetComponent, decorators: [{
|
|
2187
2783
|
type: Component,
|
|
2188
2784
|
args: [{ selector: 'app-help-center-widget', standalone: true, imports: [
|
|
2189
2785
|
CommonModule,
|
|
@@ -2228,10 +2824,10 @@ class HelpCenterConfigService {
|
|
|
2228
2824
|
getTokenFn() {
|
|
2229
2825
|
return this._getTokenFn;
|
|
2230
2826
|
}
|
|
2231
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
2232
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
2827
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.11", ngImport: i0, type: HelpCenterConfigService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
2828
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.11", ngImport: i0, type: HelpCenterConfigService, providedIn: 'root' });
|
|
2233
2829
|
}
|
|
2234
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
2830
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.11", ngImport: i0, type: HelpCenterConfigService, decorators: [{
|
|
2235
2831
|
type: Injectable,
|
|
2236
2832
|
args: [{
|
|
2237
2833
|
providedIn: 'root'
|
|
@@ -2256,38 +2852,16 @@ class TokenService {
|
|
|
2256
2852
|
// Otherwise, return error that getTokenFn is not provided
|
|
2257
2853
|
throw new Error('getTokenFn is not provided');
|
|
2258
2854
|
}
|
|
2259
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
2260
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
2855
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.11", ngImport: i0, type: TokenService, deps: [{ token: HelpCenterConfigService }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
2856
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.11", ngImport: i0, type: TokenService, providedIn: 'root' });
|
|
2261
2857
|
}
|
|
2262
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
2858
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.11", ngImport: i0, type: TokenService, decorators: [{
|
|
2263
2859
|
type: Injectable,
|
|
2264
2860
|
args: [{
|
|
2265
2861
|
providedIn: 'root'
|
|
2266
2862
|
}]
|
|
2267
2863
|
}], ctorParameters: () => [{ type: HelpCenterConfigService }] });
|
|
2268
2864
|
|
|
2269
|
-
// src/app/language.service.ts
|
|
2270
|
-
class LanguageService {
|
|
2271
|
-
translationService;
|
|
2272
|
-
constructor(translationService) {
|
|
2273
|
-
this.translationService = translationService;
|
|
2274
|
-
}
|
|
2275
|
-
switchLanguage(language) {
|
|
2276
|
-
this.translationService.setLanguage(language);
|
|
2277
|
-
}
|
|
2278
|
-
getCurrentLang() {
|
|
2279
|
-
return this.translationService.getCurrentLang();
|
|
2280
|
-
}
|
|
2281
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.1", ngImport: i0, type: LanguageService, deps: [{ token: TranslationService }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
2282
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.1", ngImport: i0, type: LanguageService, providedIn: 'root' });
|
|
2283
|
-
}
|
|
2284
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.1", ngImport: i0, type: LanguageService, decorators: [{
|
|
2285
|
-
type: Injectable,
|
|
2286
|
-
args: [{
|
|
2287
|
-
providedIn: 'root'
|
|
2288
|
-
}]
|
|
2289
|
-
}], ctorParameters: () => [{ type: TranslationService }] });
|
|
2290
|
-
|
|
2291
2865
|
// Types
|
|
2292
2866
|
|
|
2293
2867
|
/**
|