@alan-ai/alan-sdk-web 1.8.69 → 1.8.70
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/alan_lib.js +279 -136
- package/dist/alan_lib.min.js +1 -1
- package/package.json +1 -1
package/dist/alan_lib.js
CHANGED
|
@@ -341,7 +341,7 @@
|
|
|
341
341
|
this._cleanups.push(f);
|
|
342
342
|
};
|
|
343
343
|
|
|
344
|
-
function fillAuth(values, ext) {
|
|
344
|
+
function fillAuth(values, ext, config) {
|
|
345
345
|
var auth = {};
|
|
346
346
|
for (var k in ext) {
|
|
347
347
|
auth[k] = ext[k];
|
|
@@ -363,6 +363,10 @@
|
|
|
363
363
|
if (ext && ext.appName) {
|
|
364
364
|
auth.appName = ext.appName;
|
|
365
365
|
}
|
|
366
|
+
|
|
367
|
+
if (auth && auth.withEdgeUrl) {
|
|
368
|
+
auth.edgeUrl = config ? config.url : undefined;
|
|
369
|
+
}
|
|
366
370
|
return auth;
|
|
367
371
|
}
|
|
368
372
|
|
|
@@ -384,7 +388,7 @@
|
|
|
384
388
|
throw new Error("Wrong projectId was provided: ", projectId);
|
|
385
389
|
}
|
|
386
390
|
|
|
387
|
-
connect._worker.postMessage(["connectProject", connect._config, fillAuth(auth, ext), mode]);
|
|
391
|
+
connect._worker.postMessage(["connectProject", connect._config, fillAuth(auth, ext, connect._config), mode]);
|
|
388
392
|
function signupEvent(name, handler) {
|
|
389
393
|
alanAudio.on(name, handler);
|
|
390
394
|
connect._addCleanup(function() {
|
|
@@ -429,7 +433,7 @@
|
|
|
429
433
|
throw new Error("Wrong projectId was provided");
|
|
430
434
|
}
|
|
431
435
|
|
|
432
|
-
connect._worker.postMessage(["connectProject", connect._config, fillAuth(auth, ext), mode]);
|
|
436
|
+
connect._worker.postMessage(["connectProject", connect._config, fillAuth(auth, ext, connect._config), mode]);
|
|
433
437
|
function signupEvent(name, handler) {
|
|
434
438
|
alanAudio.on(name, handler);
|
|
435
439
|
connect._addCleanup(function() {
|
|
@@ -89462,7 +89466,7 @@
|
|
|
89462
89466
|
expanded: false,
|
|
89463
89467
|
inlined: false,
|
|
89464
89468
|
options: null,
|
|
89465
|
-
loaderTimeoutMs:
|
|
89469
|
+
loaderTimeoutMs: 18e5,
|
|
89466
89470
|
defaults: {
|
|
89467
89471
|
minChatWidth: 250,
|
|
89468
89472
|
appearAnimationMs: 200,
|
|
@@ -89474,6 +89478,131 @@
|
|
|
89474
89478
|
}
|
|
89475
89479
|
};
|
|
89476
89480
|
|
|
89481
|
+
// alan_btn/src/assets/chatIcons.ts
|
|
89482
|
+
var chatIcons = {
|
|
89483
|
+
toogleChatSideBar: '<svg fill="#000000" width="24px" height="24px" viewBox="0 0 32 32" id="icon" xmlns="http://www.w3.org/2000/svg"><defs><style>.cls-1{fill:none;}</style></defs><path d="M28,4H4A2,2,0,0,0,2,6V26a2,2,0,0,0,2,2H28a2,2,0,0,0,2-2V6A2,2,0,0,0,28,4ZM4,6h6V26H4ZM28,26H12V6H28Z"/><rect id="_Transparent_Rectangle_" data-name="<Transparent Rectangle>" class="cls-1" width="32" height="32"/></svg>',
|
|
89484
|
+
closeChat: `<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
89485
|
+
<path d="M18.7071 6.70711C19.0976 6.31658 19.0976 5.68342 18.7071 5.29289C18.3166 4.90237 17.6834 4.90237 17.2929 5.29289L12 10.5858L6.70711 5.29289C6.31658 4.90237 5.68342 4.90237 5.29289 5.29289C4.90237 5.68342 4.90237 6.31658 5.29289 6.70711L10.5858 12L5.29289 17.2929C4.90237 17.6834 4.90237 18.3166 5.29289 18.7071C5.68342 19.0976 6.31658 19.0976 6.70711 18.7071L12 13.4142L17.2929 18.7071C17.6834 19.0976 18.3166 19.0976 18.7071 18.7071C19.0976 18.3166 19.0976 17.6834 18.7071 17.2929L13.4142 12L18.7071 6.70711Z" fill="#969EB0"/>
|
|
89486
|
+
</svg>
|
|
89487
|
+
`,
|
|
89488
|
+
plus: `<svg width="24px" height="24px" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
89489
|
+
<path d="M4 12H20M12 4V20" stroke="#000000" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>
|
|
89490
|
+
</svg>`,
|
|
89491
|
+
clear: `
|
|
89492
|
+
<svg width="28" height="26" viewBox="0 0 28 26" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
89493
|
+
<path class="alan-chat__plus-icon" fill-rule="evenodd" clip-rule="evenodd" d="M20.4167 13C16.8728 13 14 15.8728 14 19.4167C14 22.9605 16.8728 25.8333 20.4167 25.8333C23.9605 25.8333 26.8333 22.9605 26.8333 19.4167C26.8333 15.8728 23.9605 13 20.4167 13ZM20.4167 16.5C20.7388 16.5 21 16.7612 21 17.0833V18.8333H22.75C23.0722 18.8333 23.3333 19.0945 23.3333 19.4167C23.3333 19.7388 23.0722 20 22.75 20H21V21.75C21 22.0722 20.7388 22.3333 20.4167 22.3333C20.0945 22.3333 19.8333 22.0722 19.8333 21.75V20H18.0833C17.7612 20 17.5 19.7388 17.5 19.4167C17.5 19.0945 17.7612 18.8333 18.0833 18.8333H19.8333V17.0833C19.8333 16.7612 20.0945 16.5 20.4167 16.5Z"/>
|
|
89494
|
+
<path class="alan-chat__dialog-icon" fill-rule="evenodd" clip-rule="evenodd" d="M2.75006 13.375C2.75006 6.81661 8.06668 1.5 14.625 1.5C21.1834 1.5 26.5 6.81661 26.5 13.375C26.5 19.9334 21.1835 25.25 14.625 25.25C13.123 25.25 11.6833 24.9705 10.3571 24.4596C10.2434 24.4158 10.1776 24.3905 10.129 24.373C10.1231 24.3709 10.1179 24.3691 10.1136 24.3676L10.1085 24.368C10.0689 24.371 10.015 24.3765 9.91179 24.3871L3.46809 25.0532C3.20038 25.081 2.9211 25.1099 2.6875 25.1126C2.45533 25.1154 2.03684 25.1022 1.63558 24.8574C1.16523 24.5705 0.844876 24.0912 0.759601 23.547C0.686851 23.0826 0.834701 22.6909 0.925976 22.4774C1.01781 22.2626 1.15134 22.0156 1.27931 21.7787L3.34416 17.9569C3.43349 17.7915 3.48124 17.7025 3.51336 17.6363C3.51505 17.6329 3.51661 17.6295 3.51805 17.6265C3.51564 17.6179 3.51273 17.6076 3.5092 17.5958C3.48214 17.5041 3.44049 17.3799 3.36975 17.17C2.96755 15.9768 2.75006 14.7 2.75006 13.375Z" stroke-width="1.25"/>
|
|
89495
|
+
</svg>
|
|
89496
|
+
`,
|
|
89497
|
+
resizer: {
|
|
89498
|
+
left: `<svg width="14" height="14" viewBox="0 0 14 14" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
89499
|
+
<path fill-rule="evenodd" clip-rule="evenodd" d="M13.7266 0.273364C14.0911 0.63786 14.0911 1.22881 13.7266 1.59331L1.59331 13.7266C1.22881 14.0911 0.63786 14.0911 0.273364 13.7266C-0.0911215 13.3622 -0.0911215 12.7712 0.273364 12.4067L12.4067 0.273364C12.7712 -0.0911215 13.3622 -0.0911215 13.7266 0.273364ZM13.7266 6.80672C14.0911 7.17119 14.0911 7.76217 13.7266 8.12664L8.12664 13.7266C7.76217 14.0911 7.17119 14.0911 6.80672 13.7266C6.44225 13.3622 6.44225 12.7712 6.80672 12.4067L12.4067 6.80672C12.7712 6.44225 13.3622 6.44225 13.7266 6.80672Z" fill="#CCD4DD"/>
|
|
89500
|
+
</svg>
|
|
89501
|
+
`,
|
|
89502
|
+
right: `<svg width="14" height="14" viewBox="0 0 14 14" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
89503
|
+
<path fill-rule="evenodd" clip-rule="evenodd" d="M13.7266 0.273364C14.0911 0.63786 14.0911 1.22881 13.7266 1.59331L1.59331 13.7266C1.22881 14.0911 0.63786 14.0911 0.273364 13.7266C-0.0911215 13.3622 -0.0911215 12.7712 0.273364 12.4067L12.4067 0.273364C12.7712 -0.0911215 13.3622 -0.0911215 13.7266 0.273364ZM13.7266 6.80672C14.0911 7.17119 14.0911 7.76217 13.7266 8.12664L8.12664 13.7266C7.76217 14.0911 7.17119 14.0911 6.80672 13.7266C6.44225 13.3622 6.44225 12.7712 6.80672 12.4067L12.4067 6.80672C12.7712 6.44225 13.3622 6.44225 13.7266 6.80672Z" fill="#CCD4DD"/>
|
|
89504
|
+
</svg>
|
|
89505
|
+
`
|
|
89506
|
+
},
|
|
89507
|
+
send: `
|
|
89508
|
+
<svg width="44" height="28" viewBox="0 0 44 28" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
89509
|
+
<path d="M17.2915 17.7085L29.3026 5.69727M17.4375 18.0837L20.4438 25.8143C20.7086 26.4954 20.8411 26.8358 21.0319 26.9352C21.1973 27.0215 21.3944 27.0216 21.5598 26.9356C21.7507 26.8364 21.8836 26.4961 22.1493 25.8153L29.688 6.4971C29.9279 5.88261 30.0478 5.57536 29.9821 5.37903C29.9252 5.20853 29.7914 5.07473 29.6209 5.01777C29.4246 4.95219 29.1173 5.07209 28.5028 5.31188L9.18467 12.8507C8.50392 13.1164 8.16361 13.2492 8.06444 13.4401C7.97841 13.6056 7.97852 13.8027 8.06477 13.9681C8.16418 14.1589 8.50473 14.2913 9.18571 14.5562L16.9163 17.5625C17.0545 17.6163 17.1236 17.6432 17.1818 17.6847C17.2334 17.7214 17.2784 17.7666 17.3153 17.8182C17.3568 17.8763 17.3837 17.9455 17.4375 18.0837Z" stroke="#4A515D" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
|
|
89510
|
+
</svg>
|
|
89511
|
+
`,
|
|
89512
|
+
stopResponse: `
|
|
89513
|
+
<svg width="22" height="22" viewBox="0 0 22 22" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
89514
|
+
<path d="M6.38461 8.38458C6.38461 7.28001 7.28004 6.38458 8.38461 6.38458H13.6154C14.72 6.38458 15.6154 7.28001 15.6154 8.38458V13.6154C15.6154 14.7199 14.72 15.6154 13.6154 15.6154H8.38461C7.28004 15.6154 6.38461 14.7199 6.38461 13.6154V8.38458Z" stroke="black"/>
|
|
89515
|
+
<circle cx="11" cy="11" r="10" stroke="black"/>
|
|
89516
|
+
</svg>
|
|
89517
|
+
|
|
89518
|
+
`,
|
|
89519
|
+
mic: `
|
|
89520
|
+
<svg width="28" height="28" viewBox="0 0 28 28" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
89521
|
+
<path d="M21.4 12.8V15C21.4 19.2526 17.9526 22.7 13.7 22.7M13.7 22.7C9.4474 22.7 6 19.2526 6 15V12.8M13.7 22.7V26M9.3 26H18.1M13.7 18.3C11.8774 18.3 10.4 16.8226 10.4 15V7.3C10.4 5.47752 11.8774 4 13.7 4C15.5226 4 17 5.47752 17 7.3V15C17 16.8226 15.5226 18.3 13.7 18.3Z" stroke="#4A515D" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
|
|
89522
|
+
</svg>
|
|
89523
|
+
`,
|
|
89524
|
+
micPlayingBars: `<div class="alan-text-chat__animated-btn-bars">
|
|
89525
|
+
<div class="alan-text-chat__bar alan-text-chat__bar-1"></div>
|
|
89526
|
+
<div class="alan-text-chat__bar alan-text-chat__bar-2"></div>
|
|
89527
|
+
<div class="alan-text-chat__bar alan-text-chat__bar-3"></div>
|
|
89528
|
+
<div class="alan-text-chat__bar alan-text-chat__bar-3"></div>
|
|
89529
|
+
<div class="alan-text-chat__bar alan-text-chat__bar-2"></div>
|
|
89530
|
+
<div class="alan-text-chat__bar alan-text-chat__bar-1"></div>
|
|
89531
|
+
</div>
|
|
89532
|
+
`,
|
|
89533
|
+
noMic: `<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
89534
|
+
<path d="M15 9.4V5C15 3.34315 13.6569 2 12 2C10.8224 2 9.80325 2.67852 9.3122 3.66593M12 19V22M12 19C8.13401 19 5 15.866 5 12V10M12 19C15.866 19 19 15.866 19 12V10M8 22H16M2 2L22 22M12 15C10.3431 15 9 13.6569 9 12V9L14.1226 14.12C13.5796 14.6637 12.8291 15 12 15Z" stroke="#969EB0" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
|
|
89535
|
+
</svg>
|
|
89536
|
+
`,
|
|
89537
|
+
disconnected: `<svg class="alan-btn_disconnected-chat-icon-rotate" width="32" height="32" viewBox="0 0 32 32" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
89538
|
+
<path d="M26 14C26 14 23.995 11.2682 22.3662 9.63824C20.7373 8.00827 18.4864 7 16 7C11.0294 7 7 11.0294 7 16C7 20.9706 11.0294 25 16 25C20.1031 25 23.5649 22.2543 24.6482 18.5M26 14V8M26 14H20" stroke="#969EB0" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
|
|
89539
|
+
</svg>
|
|
89540
|
+
`,
|
|
89541
|
+
noWiFi: `<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
89542
|
+
<path d="M15.3119 10C16.6802 10.4263 17.9624 11.1191 19.08 12.05M22.5799 8.49997C19.6575 5.92394 15.8956 4.50262 11.9999 4.50262C11.3949 4.50262 10.7931 4.5369 10.1972 4.60447M8.52979 15.61C9.54499 14.8888 10.7595 14.5013 12.0048 14.5013C13.2501 14.5013 14.4646 14.8888 15.4798 15.61M12 19.5H12.01M1.19336 8.70076C2.52697 7.47869 4.06839 6.47975 5.75851 5.76306M4.73193 12.243C6.12934 11.012 7.84172 10.1302 9.73265 9.73393M15.6983 15.7751C14.6792 14.9763 13.3952 14.5 11.9999 14.5C10.5835 14.5 9.28172 14.9908 8.25537 15.8116M3 3L21 21" stroke="#969EB0" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
|
|
89543
|
+
</svg>
|
|
89544
|
+
`,
|
|
89545
|
+
mute: `
|
|
89546
|
+
<svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
89547
|
+
<path d="M18.3346 7.49998L13.3346 12.5M13.3346 7.49998L18.3346 12.5M8.0299 3.63805L5.39183 6.27612C5.2477 6.42025 5.17564 6.49231 5.09154 6.54385C5.01698 6.58954 4.93569 6.62321 4.85066 6.64362C4.75476 6.66665 4.65284 6.66665 4.44902 6.66665H3.0013C2.53459 6.66665 2.30124 6.66665 2.12298 6.75747C1.96617 6.83737 1.83869 6.96485 1.7588 7.12165C1.66797 7.29991 1.66797 7.53327 1.66797 7.99998V12C1.66797 12.4667 1.66797 12.7 1.7588 12.8783C1.83869 13.0351 1.96617 13.1626 2.12298 13.2425C2.30124 13.3333 2.53459 13.3333 3.0013 13.3333H4.44902C4.65284 13.3333 4.75476 13.3333 4.85066 13.3563C4.93569 13.3768 5.01698 13.4104 5.09154 13.4561C5.17564 13.5076 5.2477 13.5797 5.39183 13.7238L8.0299 16.3619C8.38688 16.7189 8.56537 16.8974 8.71861 16.9094C8.85158 16.9199 8.98152 16.8661 9.06814 16.7647C9.16797 16.6478 9.16797 16.3954 9.16797 15.8905V4.10946C9.16797 3.60461 9.16797 3.35219 9.06814 3.2353C8.98152 3.13388 8.85158 3.08006 8.71861 3.09052C8.56537 3.10258 8.38688 3.28107 8.0299 3.63805Z" stroke="#969EB0" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
|
|
89548
|
+
</svg>`,
|
|
89549
|
+
unmute: `<svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
89550
|
+
<path d="M16.4559 4.16665C17.637 5.80851 18.3327 7.82301 18.3327 9.99998C18.3327 12.177 17.637 14.1914 16.4559 15.8333M13.1204 6.66665C13.7795 7.61151 14.166 8.76061 14.166 9.99998C14.166 11.2394 13.7795 12.3885 13.1204 13.3333M8.02795 3.63805L5.38987 6.27612C5.24575 6.42025 5.17368 6.49231 5.08959 6.54385C5.01503 6.58954 4.93374 6.62321 4.84871 6.64362C4.7528 6.66665 4.65089 6.66665 4.44706 6.66665H2.99935C2.53264 6.66665 2.29928 6.66665 2.12102 6.75747C1.96422 6.83737 1.83674 6.96485 1.75684 7.12165C1.66602 7.29991 1.66602 7.53327 1.66602 7.99998V12C1.66602 12.4667 1.66602 12.7 1.75684 12.8783C1.83674 13.0351 1.96422 13.1626 2.12102 13.2425C2.29928 13.3333 2.53264 13.3333 2.99935 13.3333H4.44706C4.65089 13.3333 4.7528 13.3333 4.84871 13.3563C4.93374 13.3768 5.01503 13.4104 5.08959 13.4561C5.17368 13.5076 5.24575 13.5797 5.38987 13.7238L8.02794 16.3619C8.38492 16.7189 8.56342 16.8974 8.71666 16.9094C8.84962 16.9199 8.97956 16.8661 9.06618 16.7647C9.16602 16.6478 9.16602 16.3954 9.16602 15.8905V4.10946C9.16602 3.60461 9.16602 3.35219 9.06618 3.2353C8.97956 3.13388 8.84962 3.08006 8.71666 3.09052C8.56342 3.10258 8.38492 3.28107 8.02795 3.63805Z" stroke="#969EB0" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
|
|
89551
|
+
</svg>
|
|
89552
|
+
`,
|
|
89553
|
+
like: `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M16.5 5.202c0-2.442-1.14-4.198-3.007-4.198-1.026 0-1.378.601-1.746 2-.075.288-.112.429-.151.567-.101.36-.277.97-.527 1.831a.25.25 0 0 1-.03.065L8.174 9.953a5.884 5.884 0 0 1-2.855 2.327l-.473.18a2.75 2.75 0 0 0-1.716 3.092l.404 2.087a3.25 3.25 0 0 0 2.417 2.537l7.628 1.87a4.75 4.75 0 0 0 5.733-3.44l1.415-5.549a3.25 3.25 0 0 0-3.15-4.053h-1.822c.496-1.633.746-2.893.746-3.802ZM4.6 15.267a1.25 1.25 0 0 1 .78-1.405l.474-.182a7.385 7.385 0 0 0 3.582-2.92l2.867-4.485c.09-.14.159-.294.205-.455.252-.865.428-1.479.53-1.842.044-.154.085-.31.159-.593.19-.722.283-.881.295-.881.868 0 1.507.984 1.507 2.698 0 .885-.326 2.336-.984 4.315a.75.75 0 0 0 .711.987h2.85a1.751 1.751 0 0 1 1.696 2.182l-1.415 5.55a3.25 3.25 0 0 1-3.923 2.353l-7.628-1.87a1.75 1.75 0 0 1-1.301-1.366L4.6 15.267Z"></path></svg>`,
|
|
89554
|
+
likeSelected: `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M15.056 9.004c.46-1.427.693-2.677.693-3.754 0-2.398-.939-4.247-2.5-4.247-.847 0-1.109.504-1.437 1.747.018-.065-.163.634-.215.821-.101.359-.277.97-.527 1.831a.247.247 0 0 1-.03.065L8.174 9.953a5.885 5.885 0 0 1-2.855 2.326l-1.257.482a1.75 1.75 0 0 0-1.092 1.967l.686 3.539a2.25 2.25 0 0 0 1.673 1.757l8.25 2.022a4.75 4.75 0 0 0 5.733-3.44l1.574-6.173a2.75 2.75 0 0 0-2.665-3.43h-3.165Z"></path></svg>`,
|
|
89555
|
+
dislike: `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M16.5 17.985c0 2.442-1.14 4.199-3.007 4.199-.975 0-1.341-.543-1.69-1.796l-.207-.772c-.101-.359-.277-.97-.527-1.831a.25.25 0 0 0-.03-.065l-2.866-4.486a5.884 5.884 0 0 0-2.855-2.326l-.473-.181A2.75 2.75 0 0 1 3.13 7.634l.404-2.086A3.25 3.25 0 0 1 5.95 3.01l7.628-1.87a4.75 4.75 0 0 1 5.733 3.44l1.415 5.55a3.25 3.25 0 0 1-3.15 4.052h-1.822c.496 1.633.746 2.893.746 3.802ZM4.6 7.92a1.25 1.25 0 0 0 .78 1.406l.474.18a7.385 7.385 0 0 1 3.582 2.92l2.867 4.486c.09.141.159.294.205.455l.552 1.92.212.791c.14.488.21.606.22.606.868 0 1.507-.985 1.507-2.7 0-.884-.326-2.335-.984-4.314a.75.75 0 0 1 .711-.987h2.85a1.75 1.75 0 0 0 1.696-2.182l-1.415-5.55a3.25 3.25 0 0 0-3.923-2.353l-7.628 1.87a1.75 1.75 0 0 0-1.301 1.366L4.6 7.92Z"></path></svg>`,
|
|
89556
|
+
dislikeSelected: `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M15.056 14.183c.46 1.427.693 2.676.693 3.753 0 2.398-.939 4.247-2.5 4.247-.8 0-1.078-.45-1.383-1.546l-.27-1.022c-.1-.358-.276-.97-.526-1.83a.247.247 0 0 0-.03-.066l-2.866-4.485a5.885 5.885 0 0 0-2.855-2.327l-1.257-.481A1.75 1.75 0 0 1 2.97 8.458l.686-3.538a2.25 2.25 0 0 1 1.673-1.758l8.25-2.021a4.75 4.75 0 0 1 5.733 3.44l1.574 6.172a2.75 2.75 0 0 1-2.665 3.43h-3.165Z"></path></svg>`,
|
|
89557
|
+
copy: `<svg class="alan-btn__copy-icon" width="24px" height="24px" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
89558
|
+
<path fill-rule="evenodd" clip-rule="evenodd" d="M19.5 16.5L19.5 4.5L18.75 3.75H9L8.25 4.5L8.25 7.5L5.25 7.5L4.5 8.25V20.25L5.25 21H15L15.75 20.25V17.25H18.75L19.5 16.5ZM15.75 15.75L15.75 8.25L15 7.5L9.75 7.5V5.25L18 5.25V15.75H15.75ZM6 9L14.25 9L14.25 19.5L6 19.5L6 9Z" fill="#080341"/>
|
|
89559
|
+
</svg>`,
|
|
89560
|
+
copied: `<svg class="alan-btn__copied-icon" width="24px" height="24px" viewBox="0 0 24 24" role="img" xmlns="http://www.w3.org/2000/svg" aria-labelledby="okIconTitle" stroke="#000000" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" fill="none" color="#000000"> <title id="okIconTitle">Copied!</title> <polyline points="4 13 9 18 20 7"/> </svg>`,
|
|
89561
|
+
expandChat: `<svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
89562
|
+
<rect x="1.75" y="2.75" width="16.5" height="14.5" rx="1.25" stroke="#969EB0" stroke-width="1.5"/>
|
|
89563
|
+
<path fill-rule="evenodd" clip-rule="evenodd" d="M4.77344 11.0002C5.18765 11.0002 5.52344 11.336 5.52344 11.7502V13.2898C5.52344 13.4002 5.61298 13.4898 5.72344 13.4898L7.2949 13.4898C7.70911 13.4898 8.0449 13.8256 8.0449 14.2398C8.0449 14.654 7.70912 14.9898 7.29491 14.9898L5.27345 14.9898C4.58309 14.9898 4.02344 14.4302 4.02344 13.7398V11.7502C4.02344 11.336 4.35922 11.0002 4.77344 11.0002Z" fill="#969EB0"/>
|
|
89564
|
+
<path fill-rule="evenodd" clip-rule="evenodd" d="M15.25 9C14.8358 9 14.5 8.66421 14.5 8.25V6.71045C14.5 6.6 14.4105 6.51045 14.3 6.51045L12.7285 6.51046C12.3143 6.51047 11.9785 6.17468 11.9785 5.76047C11.9785 5.34625 12.3143 5.01047 12.7285 5.01046L14.75 5.01045C15.4404 5.01045 16 5.57009 16 6.26045V8.25C16 8.66421 15.6642 9 15.25 9Z" fill="#969EB0"/>
|
|
89565
|
+
</svg>`,
|
|
89566
|
+
collapseChat: `<svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
89567
|
+
<rect x="1.75" y="2.75" width="16.5" height="14.5" rx="1.25" stroke="#969EB0" stroke-width="1.5"/>
|
|
89568
|
+
<path fill-rule="evenodd" clip-rule="evenodd" d="M7.29492 14.9898C6.88071 14.9898 6.54492 14.654 6.54492 14.2398V12.7003C6.54492 12.5898 6.45538 12.5003 6.34492 12.5003L4.77346 12.5003C4.35925 12.5003 4.02346 12.1645 4.02346 11.7503C4.02346 11.3361 4.35924 11.0003 4.77345 11.0003L6.79491 11.0003C7.48527 11.0003 8.04492 11.5599 8.04492 12.2503V14.2398C8.04492 14.654 7.70914 14.9898 7.29492 14.9898Z" fill="#969EB0"/>
|
|
89569
|
+
<path fill-rule="evenodd" clip-rule="evenodd" d="M12.7285 5.01044C13.1427 5.01044 13.4785 5.34622 13.4785 5.76044V7.29998C13.4785 7.41044 13.5681 7.49998 13.6785 7.49998L15.25 7.49997C15.6642 7.49997 16 7.83576 16 8.24997C16 8.66418 15.6642 8.99997 15.25 8.99997L13.2285 8.99999C12.5382 8.99999 11.9785 8.44035 11.9785 7.74999V5.76044C11.9785 5.34622 12.3143 5.01044 12.7285 5.01044Z" fill="#969EB0"/>
|
|
89570
|
+
</svg>
|
|
89571
|
+
`,
|
|
89572
|
+
saveChatState: `<svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
89573
|
+
<path d="M2.375 12.875C2.375 15.1141 2.375 16.2337 3.07062 16.9294C3.76624 17.625 4.88583 17.625 7.125 17.625H11.875C14.1142 17.625 15.2337 17.625 15.9294 16.9294C16.625 16.2337 16.625 15.1141 16.625 12.875" stroke="#1C274C" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
|
|
89574
|
+
<path d="M9.50001 3.375V13.6667M9.50001 13.6667L12.6667 10.2031M9.50001 13.6667L6.33334 10.2031" stroke="#1C274C" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
|
|
89575
|
+
</svg>
|
|
89576
|
+
`
|
|
89577
|
+
};
|
|
89578
|
+
function getCloseChatIcon(textChatOptions) {
|
|
89579
|
+
return textChatOptions?.popup?.icons?.close?.svg || chatIcons.closeChat;
|
|
89580
|
+
}
|
|
89581
|
+
function getExpandChatIcon(textChatOptions) {
|
|
89582
|
+
return textChatOptions?.popup?.icons?.fullScreen?.svgExpand || chatIcons.expandChat;
|
|
89583
|
+
}
|
|
89584
|
+
function getCollapseChatIcon(textChatOptions) {
|
|
89585
|
+
return textChatOptions?.popup?.icons?.fullScreen?.svgCollapse || chatIcons.collapseChat;
|
|
89586
|
+
}
|
|
89587
|
+
function getSaveChatStateIcon(textChatOptions) {
|
|
89588
|
+
return textChatOptions?.popup?.icons?.saveChatState?.svg || chatIcons.saveChatState;
|
|
89589
|
+
}
|
|
89590
|
+
function getSendChatIcon(textChatOptions) {
|
|
89591
|
+
return textChatOptions?.popup?.icons?.send?.svg || chatIcons.send;
|
|
89592
|
+
}
|
|
89593
|
+
function getStopChatIcon(textChatOptions) {
|
|
89594
|
+
return textChatOptions?.popup?.icons?.stopResponse?.svg || chatIcons.stopResponse;
|
|
89595
|
+
}
|
|
89596
|
+
function getMicChatIcon(textChatOptions) {
|
|
89597
|
+
return textChatOptions?.popup?.icons?.mic?.svg || chatIcons.mic;
|
|
89598
|
+
}
|
|
89599
|
+
function getMuteChatIcon(textChatOptions) {
|
|
89600
|
+
return textChatOptions?.popup?.icons?.mute?.svgOff || chatIcons.mute;
|
|
89601
|
+
}
|
|
89602
|
+
function getUnmuteChatIcon(textChatOptions) {
|
|
89603
|
+
return textChatOptions?.popup?.icons?.mute?.svgOn || chatIcons.unmute;
|
|
89604
|
+
}
|
|
89605
|
+
|
|
89477
89606
|
// alan_btn/src/textChat/helpers/getMsgLoader.ts
|
|
89478
89607
|
function getMsgLoader(textChatOptions, message, onlyLoader) {
|
|
89479
89608
|
const isQueryProgressEnabled = textChatOptions?.bubbles?.waitingResponse?.queryProgress?.enabled;
|
|
@@ -89488,10 +89617,19 @@
|
|
|
89488
89617
|
if (onlyLoader) {
|
|
89489
89618
|
waitingResponseBubbleLabel = "";
|
|
89490
89619
|
}
|
|
89491
|
-
const content = isDefaultLayout ?
|
|
89492
|
-
|
|
89620
|
+
const content = isDefaultLayout ? `<span class="alan-btn__chat-incomming-msg-loader-label-default ${waitingResponseBubbleLabel?.length > 0 ? "with-text" : ""}">
|
|
89621
|
+
${getMsgStopBtn(textChatOptions, true)}
|
|
89622
|
+
${waitingResponseBubbleLabel || ""}</span>
|
|
89623
|
+
<div class="alan-btn__chat-incomming-msg-inner-wrapper ${waitingResponseBubbleLabel === "" ? "" : "with-text"}"><div class="alan-btn__chat-incomming-msg msg-1"> </div> <div class="alan-btn__chat-incomming-msg msg-2"> </div> <div class="alan-btn__chat-incomming-msg msg-3"> </div></div>` : `<span class="alan-btn__chat-incomming-msg-loader-icon alan-btn__chat-stop-response-holder">
|
|
89624
|
+
${getMsgStopBtn(textChatOptions, false)}
|
|
89625
|
+
</span>
|
|
89626
|
+
<span class="alan-btn__chat-incomming-msg-loader-label">${waitingResponseBubbleLabel}</span>`;
|
|
89493
89627
|
return `<div class="alan-btn__chat-incomming-msg-wrapper">${content}</div>`;
|
|
89494
89628
|
}
|
|
89629
|
+
function getMsgStopBtn(textChatOptions, shouldBeWrapped) {
|
|
89630
|
+
const content = `<div class="alan-btn__stop-response-btn">${getStopChatIcon(textChatOptions)}</div>`;
|
|
89631
|
+
return shouldBeWrapped ? `<div class="alan-btn__chat-stop-response-holder">${content}</div>` : content;
|
|
89632
|
+
}
|
|
89495
89633
|
function capitalize(str) {
|
|
89496
89634
|
return str.charAt(0).toUpperCase() + str.substring(1);
|
|
89497
89635
|
}
|
|
@@ -89712,121 +89850,6 @@
|
|
|
89712
89850
|
return defaultZIndex;
|
|
89713
89851
|
}
|
|
89714
89852
|
|
|
89715
|
-
// alan_btn/src/assets/chatIcons.ts
|
|
89716
|
-
var chatIcons = {
|
|
89717
|
-
toogleChatSideBar: '<svg fill="#000000" width="24px" height="24px" viewBox="0 0 32 32" id="icon" xmlns="http://www.w3.org/2000/svg"><defs><style>.cls-1{fill:none;}</style></defs><path d="M28,4H4A2,2,0,0,0,2,6V26a2,2,0,0,0,2,2H28a2,2,0,0,0,2-2V6A2,2,0,0,0,28,4ZM4,6h6V26H4ZM28,26H12V6H28Z"/><rect id="_Transparent_Rectangle_" data-name="<Transparent Rectangle>" class="cls-1" width="32" height="32"/></svg>',
|
|
89718
|
-
closeChat: `<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
89719
|
-
<path d="M18.7071 6.70711C19.0976 6.31658 19.0976 5.68342 18.7071 5.29289C18.3166 4.90237 17.6834 4.90237 17.2929 5.29289L12 10.5858L6.70711 5.29289C6.31658 4.90237 5.68342 4.90237 5.29289 5.29289C4.90237 5.68342 4.90237 6.31658 5.29289 6.70711L10.5858 12L5.29289 17.2929C4.90237 17.6834 4.90237 18.3166 5.29289 18.7071C5.68342 19.0976 6.31658 19.0976 6.70711 18.7071L12 13.4142L17.2929 18.7071C17.6834 19.0976 18.3166 19.0976 18.7071 18.7071C19.0976 18.3166 19.0976 17.6834 18.7071 17.2929L13.4142 12L18.7071 6.70711Z" fill="#969EB0"/>
|
|
89720
|
-
</svg>
|
|
89721
|
-
`,
|
|
89722
|
-
plus: `<svg width="24px" height="24px" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
89723
|
-
<path d="M4 12H20M12 4V20" stroke="#000000" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>
|
|
89724
|
-
</svg>`,
|
|
89725
|
-
clear: `
|
|
89726
|
-
<svg width="28" height="26" viewBox="0 0 28 26" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
89727
|
-
<path class="alan-chat__plus-icon" fill-rule="evenodd" clip-rule="evenodd" d="M20.4167 13C16.8728 13 14 15.8728 14 19.4167C14 22.9605 16.8728 25.8333 20.4167 25.8333C23.9605 25.8333 26.8333 22.9605 26.8333 19.4167C26.8333 15.8728 23.9605 13 20.4167 13ZM20.4167 16.5C20.7388 16.5 21 16.7612 21 17.0833V18.8333H22.75C23.0722 18.8333 23.3333 19.0945 23.3333 19.4167C23.3333 19.7388 23.0722 20 22.75 20H21V21.75C21 22.0722 20.7388 22.3333 20.4167 22.3333C20.0945 22.3333 19.8333 22.0722 19.8333 21.75V20H18.0833C17.7612 20 17.5 19.7388 17.5 19.4167C17.5 19.0945 17.7612 18.8333 18.0833 18.8333H19.8333V17.0833C19.8333 16.7612 20.0945 16.5 20.4167 16.5Z"/>
|
|
89728
|
-
<path class="alan-chat__dialog-icon" fill-rule="evenodd" clip-rule="evenodd" d="M2.75006 13.375C2.75006 6.81661 8.06668 1.5 14.625 1.5C21.1834 1.5 26.5 6.81661 26.5 13.375C26.5 19.9334 21.1835 25.25 14.625 25.25C13.123 25.25 11.6833 24.9705 10.3571 24.4596C10.2434 24.4158 10.1776 24.3905 10.129 24.373C10.1231 24.3709 10.1179 24.3691 10.1136 24.3676L10.1085 24.368C10.0689 24.371 10.015 24.3765 9.91179 24.3871L3.46809 25.0532C3.20038 25.081 2.9211 25.1099 2.6875 25.1126C2.45533 25.1154 2.03684 25.1022 1.63558 24.8574C1.16523 24.5705 0.844876 24.0912 0.759601 23.547C0.686851 23.0826 0.834701 22.6909 0.925976 22.4774C1.01781 22.2626 1.15134 22.0156 1.27931 21.7787L3.34416 17.9569C3.43349 17.7915 3.48124 17.7025 3.51336 17.6363C3.51505 17.6329 3.51661 17.6295 3.51805 17.6265C3.51564 17.6179 3.51273 17.6076 3.5092 17.5958C3.48214 17.5041 3.44049 17.3799 3.36975 17.17C2.96755 15.9768 2.75006 14.7 2.75006 13.375Z" stroke-width="1.25"/>
|
|
89729
|
-
</svg>
|
|
89730
|
-
`,
|
|
89731
|
-
resizer: {
|
|
89732
|
-
left: `<svg width="14" height="14" viewBox="0 0 14 14" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
89733
|
-
<path fill-rule="evenodd" clip-rule="evenodd" d="M13.7266 0.273364C14.0911 0.63786 14.0911 1.22881 13.7266 1.59331L1.59331 13.7266C1.22881 14.0911 0.63786 14.0911 0.273364 13.7266C-0.0911215 13.3622 -0.0911215 12.7712 0.273364 12.4067L12.4067 0.273364C12.7712 -0.0911215 13.3622 -0.0911215 13.7266 0.273364ZM13.7266 6.80672C14.0911 7.17119 14.0911 7.76217 13.7266 8.12664L8.12664 13.7266C7.76217 14.0911 7.17119 14.0911 6.80672 13.7266C6.44225 13.3622 6.44225 12.7712 6.80672 12.4067L12.4067 6.80672C12.7712 6.44225 13.3622 6.44225 13.7266 6.80672Z" fill="#CCD4DD"/>
|
|
89734
|
-
</svg>
|
|
89735
|
-
`,
|
|
89736
|
-
right: `<svg width="14" height="14" viewBox="0 0 14 14" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
89737
|
-
<path fill-rule="evenodd" clip-rule="evenodd" d="M13.7266 0.273364C14.0911 0.63786 14.0911 1.22881 13.7266 1.59331L1.59331 13.7266C1.22881 14.0911 0.63786 14.0911 0.273364 13.7266C-0.0911215 13.3622 -0.0911215 12.7712 0.273364 12.4067L12.4067 0.273364C12.7712 -0.0911215 13.3622 -0.0911215 13.7266 0.273364ZM13.7266 6.80672C14.0911 7.17119 14.0911 7.76217 13.7266 8.12664L8.12664 13.7266C7.76217 14.0911 7.17119 14.0911 6.80672 13.7266C6.44225 13.3622 6.44225 12.7712 6.80672 12.4067L12.4067 6.80672C12.7712 6.44225 13.3622 6.44225 13.7266 6.80672Z" fill="#CCD4DD"/>
|
|
89738
|
-
</svg>
|
|
89739
|
-
`
|
|
89740
|
-
},
|
|
89741
|
-
send: `
|
|
89742
|
-
<svg width="44" height="28" viewBox="0 0 44 28" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
89743
|
-
<path d="M17.2915 17.7085L29.3026 5.69727M17.4375 18.0837L20.4438 25.8143C20.7086 26.4954 20.8411 26.8358 21.0319 26.9352C21.1973 27.0215 21.3944 27.0216 21.5598 26.9356C21.7507 26.8364 21.8836 26.4961 22.1493 25.8153L29.688 6.4971C29.9279 5.88261 30.0478 5.57536 29.9821 5.37903C29.9252 5.20853 29.7914 5.07473 29.6209 5.01777C29.4246 4.95219 29.1173 5.07209 28.5028 5.31188L9.18467 12.8507C8.50392 13.1164 8.16361 13.2492 8.06444 13.4401C7.97841 13.6056 7.97852 13.8027 8.06477 13.9681C8.16418 14.1589 8.50473 14.2913 9.18571 14.5562L16.9163 17.5625C17.0545 17.6163 17.1236 17.6432 17.1818 17.6847C17.2334 17.7214 17.2784 17.7666 17.3153 17.8182C17.3568 17.8763 17.3837 17.9455 17.4375 18.0837Z" stroke="#4A515D" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
|
|
89744
|
-
</svg>
|
|
89745
|
-
`,
|
|
89746
|
-
mic: `
|
|
89747
|
-
<svg width="28" height="28" viewBox="0 0 28 28" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
89748
|
-
<path d="M21.4 12.8V15C21.4 19.2526 17.9526 22.7 13.7 22.7M13.7 22.7C9.4474 22.7 6 19.2526 6 15V12.8M13.7 22.7V26M9.3 26H18.1M13.7 18.3C11.8774 18.3 10.4 16.8226 10.4 15V7.3C10.4 5.47752 11.8774 4 13.7 4C15.5226 4 17 5.47752 17 7.3V15C17 16.8226 15.5226 18.3 13.7 18.3Z" stroke="#4A515D" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
|
|
89749
|
-
</svg>
|
|
89750
|
-
`,
|
|
89751
|
-
micPlayingBars: `<div class="alan-text-chat__animated-btn-bars">
|
|
89752
|
-
<div class="alan-text-chat__bar alan-text-chat__bar-1"></div>
|
|
89753
|
-
<div class="alan-text-chat__bar alan-text-chat__bar-2"></div>
|
|
89754
|
-
<div class="alan-text-chat__bar alan-text-chat__bar-3"></div>
|
|
89755
|
-
<div class="alan-text-chat__bar alan-text-chat__bar-3"></div>
|
|
89756
|
-
<div class="alan-text-chat__bar alan-text-chat__bar-2"></div>
|
|
89757
|
-
<div class="alan-text-chat__bar alan-text-chat__bar-1"></div>
|
|
89758
|
-
</div>
|
|
89759
|
-
`,
|
|
89760
|
-
noMic: `<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
89761
|
-
<path d="M15 9.4V5C15 3.34315 13.6569 2 12 2C10.8224 2 9.80325 2.67852 9.3122 3.66593M12 19V22M12 19C8.13401 19 5 15.866 5 12V10M12 19C15.866 19 19 15.866 19 12V10M8 22H16M2 2L22 22M12 15C10.3431 15 9 13.6569 9 12V9L14.1226 14.12C13.5796 14.6637 12.8291 15 12 15Z" stroke="#969EB0" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
|
|
89762
|
-
</svg>
|
|
89763
|
-
`,
|
|
89764
|
-
disconnected: `<svg class="alan-btn_disconnected-chat-icon-rotate" width="32" height="32" viewBox="0 0 32 32" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
89765
|
-
<path d="M26 14C26 14 23.995 11.2682 22.3662 9.63824C20.7373 8.00827 18.4864 7 16 7C11.0294 7 7 11.0294 7 16C7 20.9706 11.0294 25 16 25C20.1031 25 23.5649 22.2543 24.6482 18.5M26 14V8M26 14H20" stroke="#969EB0" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
|
|
89766
|
-
</svg>
|
|
89767
|
-
`,
|
|
89768
|
-
noWiFi: `<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
89769
|
-
<path d="M15.3119 10C16.6802 10.4263 17.9624 11.1191 19.08 12.05M22.5799 8.49997C19.6575 5.92394 15.8956 4.50262 11.9999 4.50262C11.3949 4.50262 10.7931 4.5369 10.1972 4.60447M8.52979 15.61C9.54499 14.8888 10.7595 14.5013 12.0048 14.5013C13.2501 14.5013 14.4646 14.8888 15.4798 15.61M12 19.5H12.01M1.19336 8.70076C2.52697 7.47869 4.06839 6.47975 5.75851 5.76306M4.73193 12.243C6.12934 11.012 7.84172 10.1302 9.73265 9.73393M15.6983 15.7751C14.6792 14.9763 13.3952 14.5 11.9999 14.5C10.5835 14.5 9.28172 14.9908 8.25537 15.8116M3 3L21 21" stroke="#969EB0" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
|
|
89770
|
-
</svg>
|
|
89771
|
-
`,
|
|
89772
|
-
mute: `
|
|
89773
|
-
<svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
89774
|
-
<path d="M18.3346 7.49998L13.3346 12.5M13.3346 7.49998L18.3346 12.5M8.0299 3.63805L5.39183 6.27612C5.2477 6.42025 5.17564 6.49231 5.09154 6.54385C5.01698 6.58954 4.93569 6.62321 4.85066 6.64362C4.75476 6.66665 4.65284 6.66665 4.44902 6.66665H3.0013C2.53459 6.66665 2.30124 6.66665 2.12298 6.75747C1.96617 6.83737 1.83869 6.96485 1.7588 7.12165C1.66797 7.29991 1.66797 7.53327 1.66797 7.99998V12C1.66797 12.4667 1.66797 12.7 1.7588 12.8783C1.83869 13.0351 1.96617 13.1626 2.12298 13.2425C2.30124 13.3333 2.53459 13.3333 3.0013 13.3333H4.44902C4.65284 13.3333 4.75476 13.3333 4.85066 13.3563C4.93569 13.3768 5.01698 13.4104 5.09154 13.4561C5.17564 13.5076 5.2477 13.5797 5.39183 13.7238L8.0299 16.3619C8.38688 16.7189 8.56537 16.8974 8.71861 16.9094C8.85158 16.9199 8.98152 16.8661 9.06814 16.7647C9.16797 16.6478 9.16797 16.3954 9.16797 15.8905V4.10946C9.16797 3.60461 9.16797 3.35219 9.06814 3.2353C8.98152 3.13388 8.85158 3.08006 8.71861 3.09052C8.56537 3.10258 8.38688 3.28107 8.0299 3.63805Z" stroke="#969EB0" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
|
|
89775
|
-
</svg>`,
|
|
89776
|
-
unmute: `<svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
89777
|
-
<path d="M16.4559 4.16665C17.637 5.80851 18.3327 7.82301 18.3327 9.99998C18.3327 12.177 17.637 14.1914 16.4559 15.8333M13.1204 6.66665C13.7795 7.61151 14.166 8.76061 14.166 9.99998C14.166 11.2394 13.7795 12.3885 13.1204 13.3333M8.02795 3.63805L5.38987 6.27612C5.24575 6.42025 5.17368 6.49231 5.08959 6.54385C5.01503 6.58954 4.93374 6.62321 4.84871 6.64362C4.7528 6.66665 4.65089 6.66665 4.44706 6.66665H2.99935C2.53264 6.66665 2.29928 6.66665 2.12102 6.75747C1.96422 6.83737 1.83674 6.96485 1.75684 7.12165C1.66602 7.29991 1.66602 7.53327 1.66602 7.99998V12C1.66602 12.4667 1.66602 12.7 1.75684 12.8783C1.83674 13.0351 1.96422 13.1626 2.12102 13.2425C2.29928 13.3333 2.53264 13.3333 2.99935 13.3333H4.44706C4.65089 13.3333 4.7528 13.3333 4.84871 13.3563C4.93374 13.3768 5.01503 13.4104 5.08959 13.4561C5.17368 13.5076 5.24575 13.5797 5.38987 13.7238L8.02794 16.3619C8.38492 16.7189 8.56342 16.8974 8.71666 16.9094C8.84962 16.9199 8.97956 16.8661 9.06618 16.7647C9.16602 16.6478 9.16602 16.3954 9.16602 15.8905V4.10946C9.16602 3.60461 9.16602 3.35219 9.06618 3.2353C8.97956 3.13388 8.84962 3.08006 8.71666 3.09052C8.56342 3.10258 8.38492 3.28107 8.02795 3.63805Z" stroke="#969EB0" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
|
|
89778
|
-
</svg>
|
|
89779
|
-
`,
|
|
89780
|
-
like: `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M16.5 5.202c0-2.442-1.14-4.198-3.007-4.198-1.026 0-1.378.601-1.746 2-.075.288-.112.429-.151.567-.101.36-.277.97-.527 1.831a.25.25 0 0 1-.03.065L8.174 9.953a5.884 5.884 0 0 1-2.855 2.327l-.473.18a2.75 2.75 0 0 0-1.716 3.092l.404 2.087a3.25 3.25 0 0 0 2.417 2.537l7.628 1.87a4.75 4.75 0 0 0 5.733-3.44l1.415-5.549a3.25 3.25 0 0 0-3.15-4.053h-1.822c.496-1.633.746-2.893.746-3.802ZM4.6 15.267a1.25 1.25 0 0 1 .78-1.405l.474-.182a7.385 7.385 0 0 0 3.582-2.92l2.867-4.485c.09-.14.159-.294.205-.455.252-.865.428-1.479.53-1.842.044-.154.085-.31.159-.593.19-.722.283-.881.295-.881.868 0 1.507.984 1.507 2.698 0 .885-.326 2.336-.984 4.315a.75.75 0 0 0 .711.987h2.85a1.751 1.751 0 0 1 1.696 2.182l-1.415 5.55a3.25 3.25 0 0 1-3.923 2.353l-7.628-1.87a1.75 1.75 0 0 1-1.301-1.366L4.6 15.267Z"></path></svg>`,
|
|
89781
|
-
likeSelected: `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M15.056 9.004c.46-1.427.693-2.677.693-3.754 0-2.398-.939-4.247-2.5-4.247-.847 0-1.109.504-1.437 1.747.018-.065-.163.634-.215.821-.101.359-.277.97-.527 1.831a.247.247 0 0 1-.03.065L8.174 9.953a5.885 5.885 0 0 1-2.855 2.326l-1.257.482a1.75 1.75 0 0 0-1.092 1.967l.686 3.539a2.25 2.25 0 0 0 1.673 1.757l8.25 2.022a4.75 4.75 0 0 0 5.733-3.44l1.574-6.173a2.75 2.75 0 0 0-2.665-3.43h-3.165Z"></path></svg>`,
|
|
89782
|
-
dislike: `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M16.5 17.985c0 2.442-1.14 4.199-3.007 4.199-.975 0-1.341-.543-1.69-1.796l-.207-.772c-.101-.359-.277-.97-.527-1.831a.25.25 0 0 0-.03-.065l-2.866-4.486a5.884 5.884 0 0 0-2.855-2.326l-.473-.181A2.75 2.75 0 0 1 3.13 7.634l.404-2.086A3.25 3.25 0 0 1 5.95 3.01l7.628-1.87a4.75 4.75 0 0 1 5.733 3.44l1.415 5.55a3.25 3.25 0 0 1-3.15 4.052h-1.822c.496 1.633.746 2.893.746 3.802ZM4.6 7.92a1.25 1.25 0 0 0 .78 1.406l.474.18a7.385 7.385 0 0 1 3.582 2.92l2.867 4.486c.09.141.159.294.205.455l.552 1.92.212.791c.14.488.21.606.22.606.868 0 1.507-.985 1.507-2.7 0-.884-.326-2.335-.984-4.314a.75.75 0 0 1 .711-.987h2.85a1.75 1.75 0 0 0 1.696-2.182l-1.415-5.55a3.25 3.25 0 0 0-3.923-2.353l-7.628 1.87a1.75 1.75 0 0 0-1.301 1.366L4.6 7.92Z"></path></svg>`,
|
|
89783
|
-
dislikeSelected: `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M15.056 14.183c.46 1.427.693 2.676.693 3.753 0 2.398-.939 4.247-2.5 4.247-.8 0-1.078-.45-1.383-1.546l-.27-1.022c-.1-.358-.276-.97-.526-1.83a.247.247 0 0 0-.03-.066l-2.866-4.485a5.885 5.885 0 0 0-2.855-2.327l-1.257-.481A1.75 1.75 0 0 1 2.97 8.458l.686-3.538a2.25 2.25 0 0 1 1.673-1.758l8.25-2.021a4.75 4.75 0 0 1 5.733 3.44l1.574 6.172a2.75 2.75 0 0 1-2.665 3.43h-3.165Z"></path></svg>`,
|
|
89784
|
-
copy: `<svg class="alan-btn__copy-icon" width="24px" height="24px" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
89785
|
-
<path fill-rule="evenodd" clip-rule="evenodd" d="M19.5 16.5L19.5 4.5L18.75 3.75H9L8.25 4.5L8.25 7.5L5.25 7.5L4.5 8.25V20.25L5.25 21H15L15.75 20.25V17.25H18.75L19.5 16.5ZM15.75 15.75L15.75 8.25L15 7.5L9.75 7.5V5.25L18 5.25V15.75H15.75ZM6 9L14.25 9L14.25 19.5L6 19.5L6 9Z" fill="#080341"/>
|
|
89786
|
-
</svg>`,
|
|
89787
|
-
copied: `<svg class="alan-btn__copied-icon" width="24px" height="24px" viewBox="0 0 24 24" role="img" xmlns="http://www.w3.org/2000/svg" aria-labelledby="okIconTitle" stroke="#000000" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" fill="none" color="#000000"> <title id="okIconTitle">Copied!</title> <polyline points="4 13 9 18 20 7"/> </svg>`,
|
|
89788
|
-
expandChat: `<svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
89789
|
-
<rect x="1.75" y="2.75" width="16.5" height="14.5" rx="1.25" stroke="#969EB0" stroke-width="1.5"/>
|
|
89790
|
-
<path fill-rule="evenodd" clip-rule="evenodd" d="M4.77344 11.0002C5.18765 11.0002 5.52344 11.336 5.52344 11.7502V13.2898C5.52344 13.4002 5.61298 13.4898 5.72344 13.4898L7.2949 13.4898C7.70911 13.4898 8.0449 13.8256 8.0449 14.2398C8.0449 14.654 7.70912 14.9898 7.29491 14.9898L5.27345 14.9898C4.58309 14.9898 4.02344 14.4302 4.02344 13.7398V11.7502C4.02344 11.336 4.35922 11.0002 4.77344 11.0002Z" fill="#969EB0"/>
|
|
89791
|
-
<path fill-rule="evenodd" clip-rule="evenodd" d="M15.25 9C14.8358 9 14.5 8.66421 14.5 8.25V6.71045C14.5 6.6 14.4105 6.51045 14.3 6.51045L12.7285 6.51046C12.3143 6.51047 11.9785 6.17468 11.9785 5.76047C11.9785 5.34625 12.3143 5.01047 12.7285 5.01046L14.75 5.01045C15.4404 5.01045 16 5.57009 16 6.26045V8.25C16 8.66421 15.6642 9 15.25 9Z" fill="#969EB0"/>
|
|
89792
|
-
</svg>`,
|
|
89793
|
-
collapseChat: `<svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
89794
|
-
<rect x="1.75" y="2.75" width="16.5" height="14.5" rx="1.25" stroke="#969EB0" stroke-width="1.5"/>
|
|
89795
|
-
<path fill-rule="evenodd" clip-rule="evenodd" d="M7.29492 14.9898C6.88071 14.9898 6.54492 14.654 6.54492 14.2398V12.7003C6.54492 12.5898 6.45538 12.5003 6.34492 12.5003L4.77346 12.5003C4.35925 12.5003 4.02346 12.1645 4.02346 11.7503C4.02346 11.3361 4.35924 11.0003 4.77345 11.0003L6.79491 11.0003C7.48527 11.0003 8.04492 11.5599 8.04492 12.2503V14.2398C8.04492 14.654 7.70914 14.9898 7.29492 14.9898Z" fill="#969EB0"/>
|
|
89796
|
-
<path fill-rule="evenodd" clip-rule="evenodd" d="M12.7285 5.01044C13.1427 5.01044 13.4785 5.34622 13.4785 5.76044V7.29998C13.4785 7.41044 13.5681 7.49998 13.6785 7.49998L15.25 7.49997C15.6642 7.49997 16 7.83576 16 8.24997C16 8.66418 15.6642 8.99997 15.25 8.99997L13.2285 8.99999C12.5382 8.99999 11.9785 8.44035 11.9785 7.74999V5.76044C11.9785 5.34622 12.3143 5.01044 12.7285 5.01044Z" fill="#969EB0"/>
|
|
89797
|
-
</svg>
|
|
89798
|
-
`,
|
|
89799
|
-
saveChatState: `<svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
89800
|
-
<path d="M2.375 12.875C2.375 15.1141 2.375 16.2337 3.07062 16.9294C3.76624 17.625 4.88583 17.625 7.125 17.625H11.875C14.1142 17.625 15.2337 17.625 15.9294 16.9294C16.625 16.2337 16.625 15.1141 16.625 12.875" stroke="#1C274C" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
|
|
89801
|
-
<path d="M9.50001 3.375V13.6667M9.50001 13.6667L12.6667 10.2031M9.50001 13.6667L6.33334 10.2031" stroke="#1C274C" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
|
|
89802
|
-
</svg>
|
|
89803
|
-
`
|
|
89804
|
-
};
|
|
89805
|
-
function getCloseChatIcon(textChatOptions) {
|
|
89806
|
-
return textChatOptions?.popup?.icons?.close?.svg || chatIcons.closeChat;
|
|
89807
|
-
}
|
|
89808
|
-
function getExpandChatIcon(textChatOptions) {
|
|
89809
|
-
return textChatOptions?.popup?.icons?.fullScreen?.svgExpand || chatIcons.expandChat;
|
|
89810
|
-
}
|
|
89811
|
-
function getCollapseChatIcon(textChatOptions) {
|
|
89812
|
-
return textChatOptions?.popup?.icons?.fullScreen?.svgCollapse || chatIcons.collapseChat;
|
|
89813
|
-
}
|
|
89814
|
-
function getSaveChatStateIcon(textChatOptions) {
|
|
89815
|
-
return textChatOptions?.popup?.icons?.saveChatState?.svg || chatIcons.saveChatState;
|
|
89816
|
-
}
|
|
89817
|
-
function getSendChatIcon(textChatOptions) {
|
|
89818
|
-
return textChatOptions?.popup?.icons?.send?.svg || chatIcons.send;
|
|
89819
|
-
}
|
|
89820
|
-
function getMicChatIcon(textChatOptions) {
|
|
89821
|
-
return textChatOptions?.popup?.icons?.mic?.svg || chatIcons.mic;
|
|
89822
|
-
}
|
|
89823
|
-
function getMuteChatIcon(textChatOptions) {
|
|
89824
|
-
return textChatOptions?.popup?.icons?.mute?.svgOff || chatIcons.mute;
|
|
89825
|
-
}
|
|
89826
|
-
function getUnmuteChatIcon(textChatOptions) {
|
|
89827
|
-
return textChatOptions?.popup?.icons?.mute?.svgOn || chatIcons.unmute;
|
|
89828
|
-
}
|
|
89829
|
-
|
|
89830
89853
|
// alan_btn/src/textChat/fullscreen.ts
|
|
89831
89854
|
function openChatInFullScreen(chatHolderDiv) {
|
|
89832
89855
|
chatHolderDiv.classList.add("alan-btn_text-chat-full-screen");
|
|
@@ -90469,6 +90492,8 @@
|
|
|
90469
90492
|
const textareaRightPadding = getNumPropVal(textChatOptions?.textarea?.padding?.right, 42);
|
|
90470
90493
|
const textareaBottomPadding = getNumPropVal(textChatOptions?.textarea?.padding?.bottom, 12);
|
|
90471
90494
|
const textareaLeftPadding = getNumPropVal(textChatOptions?.textarea?.padding?.left, 12);
|
|
90495
|
+
const stopResponseIconDefaultColor = textChatOptions?.popup?.icons?.stopResponse?.default?.fill || `#171717`;
|
|
90496
|
+
const stopResponseIconHoverColor = textChatOptions?.popup?.icons?.stopResponse?.hover?.fill || `#0078ff`;
|
|
90472
90497
|
const requestBubbleLabelTopPadding = getNumPropVal(textChatOptions?.bubbles?.request?.label?.padding?.top, 0);
|
|
90473
90498
|
const requestBubbleLabelRightPadding = getNumPropVal(textChatOptions?.bubbles?.request?.label?.padding?.right, 0);
|
|
90474
90499
|
const requestBubbleLabelBottomPadding = getNumPropVal(textChatOptions?.bubbles?.request?.label?.padding?.bottom, 4);
|
|
@@ -91211,6 +91236,41 @@
|
|
|
91211
91236
|
keyFrames += getStyleSheetMarker() + `.alan-btn__chat.alan-btn__disconnected .alan-btn__chat-send-btn svg path {
|
|
91212
91237
|
opacity: 1;
|
|
91213
91238
|
}`;
|
|
91239
|
+
keyFrames += getStyleSheetMarker() + `.alan-btn__chat .alan-btn__chat-stop-response-holder {
|
|
91240
|
+
cursor: pointer;
|
|
91241
|
+
display: flex;
|
|
91242
|
+
}`;
|
|
91243
|
+
keyFrames += getStyleSheetMarker() + `.alan-btn__chat .alan-btn__chat-stop-response-holder .alan-btn__stop-response-btn svg path {
|
|
91244
|
+
stroke: ${stopResponseIconDefaultColor};
|
|
91245
|
+
}`;
|
|
91246
|
+
keyFrames += getStyleSheetMarker() + `.alan-btn__chat .alan-btn__chat-stop-response-holder .alan-btn__stop-response-btn svg circle {
|
|
91247
|
+
stroke: ${stopResponseIconDefaultColor};
|
|
91248
|
+
}`;
|
|
91249
|
+
keyFrames += getStyleSheetMarker() + `.alan-btn__chat .alan-btn__chat-stop-response-holder .alan-btn__stop-response-btn svg rect {
|
|
91250
|
+
fill: ${stopResponseIconDefaultColor};
|
|
91251
|
+
}`;
|
|
91252
|
+
keyFrames += getStyleSheetMarker() + `.alan-btn__chat .alan-btn__chat-stop-response-holder .alan-btn__stop-response-btn:hover svg path {
|
|
91253
|
+
stroke: ${stopResponseIconHoverColor};
|
|
91254
|
+
}`;
|
|
91255
|
+
keyFrames += getStyleSheetMarker() + `.alan-btn__chat .alan-btn__chat-stop-response-holder .alan-btn__stop-response-btn:hover svg circle {
|
|
91256
|
+
stroke: ${stopResponseIconHoverColor};
|
|
91257
|
+
}`;
|
|
91258
|
+
keyFrames += getStyleSheetMarker() + `.alan-btn__chat .alan-btn__chat-stop-response-holder .alan-btn__stop-response-btn:hover svg rect {
|
|
91259
|
+
fill: ${stopResponseIconHoverColor};
|
|
91260
|
+
}`;
|
|
91261
|
+
keyFrames += getStyleSheetMarker() + `.alan-btn__chat .alan-btn__chat-stop-response-holder:hover .alan-btn__stop-response-btn {
|
|
91262
|
+
opacity: 1;
|
|
91263
|
+
transition: opacity 300ms ease-in-out;
|
|
91264
|
+
}`;
|
|
91265
|
+
keyFrames += getStyleSheetMarker() + `.alan-btn__chat .alan-btn__stop-response-btn {
|
|
91266
|
+
display: inline-flex;
|
|
91267
|
+
align-items: center;
|
|
91268
|
+
justify-content: center;
|
|
91269
|
+
}`;
|
|
91270
|
+
keyFrames += getStyleSheetMarker() + `.alan-btn__chat .alan-btn__stop-response-btn svg {
|
|
91271
|
+
max-width: 22px;
|
|
91272
|
+
max-height: 22px;
|
|
91273
|
+
}`;
|
|
91214
91274
|
keyFrames += getStyleSheetMarker() + `.alan-btn__chat.alan-btn__disconnected .alan-btn__chat-mic-btn {
|
|
91215
91275
|
opacity: 0.2;
|
|
91216
91276
|
pointer-events: none;
|
|
@@ -91787,11 +91847,15 @@
|
|
|
91787
91847
|
keyFrames += getCssForTextChatLinks(getStyleSheetMarker(), uiState.textChat.options);
|
|
91788
91848
|
keyFrames += getCssForCommandsBlock(getStyleSheetMarker(), uiState.textChat.options);
|
|
91789
91849
|
keyFrames += getStyleSheetMarker() + `.alan-incoming-msg {
|
|
91850
|
+
padding-left: 12px;
|
|
91790
91851
|
display: flex;
|
|
91791
91852
|
align-items: center;
|
|
91792
91853
|
overflow: hidden;
|
|
91793
91854
|
animation:chat-bubble-appear-w-opacity 300ms ease-in-out forwards 100ms, hide-buble 300ms forwards ease ${uiState.textChat.loaderTimeoutMs}ms !important;
|
|
91794
91855
|
}`;
|
|
91856
|
+
keyFrames += getStyleSheetMarker() + `.alan-hide-msg-immidiatelly {
|
|
91857
|
+
display: none!important;
|
|
91858
|
+
}`;
|
|
91795
91859
|
keyFrames += getStyleSheetMarker() + `.alan-hidden-loader {
|
|
91796
91860
|
display: none!important;
|
|
91797
91861
|
}`;
|
|
@@ -92094,10 +92158,14 @@
|
|
|
92094
92158
|
const waitingResponseBubbleLabelIconAlignment = textChatOptions?.bubbles?.waitingResponse?.alignment || "center";
|
|
92095
92159
|
const waitingResponseBubbleLoaderIcon = textChatOptions?.bubbles?.waitingResponse?.icon?.svg;
|
|
92096
92160
|
const waitingResponseBubbleLoaderIconGap = getNumPropVal(textChatOptions?.bubbles?.waitingResponse?.icon?.gap, 8);
|
|
92161
|
+
const responseBubbleBg = textChatOptions?.bubbles?.response?.backgroundColor || `#ffffff`;
|
|
92162
|
+
const responseBubbleFontColor = textChatOptions?.bubbles?.response?.color || `#171717`;
|
|
92097
92163
|
const [responseLabelWidth, responseLabelHeight] = parseSvgSize(waitingResponseBubbleLoaderIcon);
|
|
92098
92164
|
keyFrames += styleSheetMarker + `.alan-btn__chat-incomming-msg-wrapper {
|
|
92099
92165
|
display: flex;
|
|
92166
|
+
max-width: 100%;
|
|
92100
92167
|
align-items: ${waitingResponseBubbleLabelIconAlignment};
|
|
92168
|
+
gap: ${waitingResponseBubbleLoaderIconGap}px;
|
|
92101
92169
|
${waitingResponseBubbleLayout !== "default" ? `
|
|
92102
92170
|
gap: ${waitingResponseBubbleLoaderIconGap}px;
|
|
92103
92171
|
` : ``}
|
|
@@ -92113,6 +92181,34 @@
|
|
|
92113
92181
|
}`;
|
|
92114
92182
|
keyFrames += styleSheetMarker + `.alan-btn__chat-incomming-msg-loader-label {
|
|
92115
92183
|
display: inline-block;
|
|
92184
|
+
max-width: 90%;
|
|
92185
|
+
white-space: nowrap;
|
|
92186
|
+
overflow: hidden;
|
|
92187
|
+
text-overflow: ellipsis;
|
|
92188
|
+
}`;
|
|
92189
|
+
keyFrames += styleSheetMarker + `.alan-btn__chat-incomming-msg-loader-label-default {
|
|
92190
|
+
position: relative;
|
|
92191
|
+
overflow: hidden;
|
|
92192
|
+
white-space: nowrap;
|
|
92193
|
+
max-width: calc(100% - 20px);
|
|
92194
|
+
display: inline-block;
|
|
92195
|
+
display: flex;
|
|
92196
|
+
gap: 4px;
|
|
92197
|
+
}`;
|
|
92198
|
+
keyFrames += styleSheetMarker + `.alan-btn__chat-incomming-msg-loader-label-default svg path {
|
|
92199
|
+
stroke: ${responseBubbleFontColor};
|
|
92200
|
+
}`;
|
|
92201
|
+
keyFrames += styleSheetMarker + `.alan-btn__chat-incomming-msg-loader-label-default svg circle {
|
|
92202
|
+
stroke: ${responseBubbleFontColor};
|
|
92203
|
+
}`;
|
|
92204
|
+
keyFrames += styleSheetMarker + `.alan-btn__chat-incomming-msg-loader-label-default.with-text::after {
|
|
92205
|
+
position: absolute;
|
|
92206
|
+
top: 0;
|
|
92207
|
+
right: 0;
|
|
92208
|
+
content: '';
|
|
92209
|
+
height: 100%;
|
|
92210
|
+
width: 20px;
|
|
92211
|
+
background: linear-gradient(90deg, rgba(255, 255, 255, 0) 0%, ${responseBubbleBg} 100%);
|
|
92116
92212
|
}`;
|
|
92117
92213
|
keyFrames += styleSheetMarker + `.alan-btn__chat-incomming-msg-inner-wrapper {
|
|
92118
92214
|
display: flex;
|
|
@@ -93512,23 +93608,32 @@ code.hljs {
|
|
|
93512
93608
|
const iframeEls = document.querySelectorAll("#" + iframeId);
|
|
93513
93609
|
iframeEls.forEach((iframeEl) => {
|
|
93514
93610
|
const responseWrapper = iframeEl.closest(".alan-btn__chat-response, .chat-bubble_message");
|
|
93515
|
-
if (
|
|
93516
|
-
|
|
93517
|
-
|
|
93611
|
+
if (Math.abs(iframeEl.clientHeight - height) !== 20) {
|
|
93612
|
+
iframeEl.style.height = (+height > maxIFrameHeight ? maxIFrameHeight : height) + "px";
|
|
93613
|
+
}
|
|
93614
|
+
if (!responseWrapper) {
|
|
93615
|
+
iframeEl.style.width = "100%";
|
|
93616
|
+
return;
|
|
93617
|
+
}
|
|
93618
|
+
if (withSvg) {
|
|
93619
|
+
responseWrapper.classList.add("with-svg");
|
|
93620
|
+
} else {
|
|
93621
|
+
if (height < 650) {
|
|
93622
|
+
changeWidthIfNeeded(iframeEl, width);
|
|
93518
93623
|
} else {
|
|
93519
|
-
if (
|
|
93520
|
-
iframeEl
|
|
93624
|
+
if (responseWrapper.clientWidth <= width) {
|
|
93625
|
+
changeWidthIfNeeded(iframeEl, width);
|
|
93521
93626
|
} else {
|
|
93522
|
-
|
|
93523
|
-
iframeEl.style.width = width + "px";
|
|
93524
|
-
} else {
|
|
93525
|
-
iframeEl.style.width = "100%";
|
|
93526
|
-
}
|
|
93627
|
+
iframeEl.style.width = "100%";
|
|
93527
93628
|
}
|
|
93528
93629
|
}
|
|
93529
93630
|
}
|
|
93530
|
-
iframeEl.style.height = (+height > maxIFrameHeight ? maxIFrameHeight : height) + "px";
|
|
93531
93631
|
});
|
|
93632
|
+
function changeWidthIfNeeded(iframeEl, newWidth) {
|
|
93633
|
+
if (Math.abs(iframeEl.clientWidth - newWidth) !== 20) {
|
|
93634
|
+
iframeEl.style.width = newWidth + "px";
|
|
93635
|
+
}
|
|
93636
|
+
}
|
|
93532
93637
|
}
|
|
93533
93638
|
function onIFrameSizeListener(event) {
|
|
93534
93639
|
if (event.data && event.data.source !== "alan-chat-iframe") {
|
|
@@ -93565,6 +93670,7 @@ code.hljs {
|
|
|
93565
93670
|
|
|
93566
93671
|
// alan_btn/src/textChat/saveChatStateToFile.ts
|
|
93567
93672
|
var adjustIFrameSizeString = adjustIFrameSize.toString();
|
|
93673
|
+
var addImgToThePageString = addImgToThePage.toString();
|
|
93568
93674
|
var onIFrameSizeListenerString = onIFrameSizeListener.toString();
|
|
93569
93675
|
async function saveChatState(chatName, chatEl, width, projectId, headContent, codeContent) {
|
|
93570
93676
|
const chatConteiner = chatEl.cloneNode(true);
|
|
@@ -93598,6 +93704,7 @@ code.hljs {
|
|
|
93598
93704
|
<!DOCTYPE html>
|
|
93599
93705
|
<html lang="en">
|
|
93600
93706
|
<head>
|
|
93707
|
+
<meta charset="UTF-8">
|
|
93601
93708
|
<title>Alan Text Chat History</title>
|
|
93602
93709
|
${headContent ? headContent : ""}
|
|
93603
93710
|
<style>
|
|
@@ -93708,6 +93815,7 @@ code.hljs {
|
|
|
93708
93815
|
${codeContent ? codeContent : ""}
|
|
93709
93816
|
<script>
|
|
93710
93817
|
${adjustIFrameSizeString}
|
|
93818
|
+
${addImgToThePageString}
|
|
93711
93819
|
window.addEventListener("message", ${onIFrameSizeListenerString});
|
|
93712
93820
|
<script>
|
|
93713
93821
|
</body>
|
|
@@ -93793,8 +93901,16 @@ code.hljs {
|
|
|
93793
93901
|
|
|
93794
93902
|
// alan_btn/alan_btn.ts
|
|
93795
93903
|
var import_lodash2 = __toESM(require_lodash());
|
|
93904
|
+
|
|
93905
|
+
// alan_btn/src/textChat/helpers/getMsgReqId.ts
|
|
93906
|
+
function getMsgReqId(msg) {
|
|
93907
|
+
return msg.reqId || msg?.ctx?.reqId;
|
|
93908
|
+
;
|
|
93909
|
+
}
|
|
93910
|
+
|
|
93911
|
+
// alan_btn/alan_btn.ts
|
|
93796
93912
|
(function(ns) {
|
|
93797
|
-
uiState.lib.version = "alan-version.1.8.
|
|
93913
|
+
uiState.lib.version = "alan-version.1.8.70".replace("alan-version.", "");
|
|
93798
93914
|
if (window.alanBtn) {
|
|
93799
93915
|
console.warn("Alan: the Alan Button source code has already added (v." + uiState.lib.version + ")");
|
|
93800
93916
|
}
|
|
@@ -93822,6 +93938,7 @@ code.hljs {
|
|
|
93822
93938
|
var textChatIsHidden = true;
|
|
93823
93939
|
var voiceEnabledInTextChat = true;
|
|
93824
93940
|
var textChatMessages = [];
|
|
93941
|
+
var canceledRequests = [];
|
|
93825
93942
|
var textChatScrollPosition = null;
|
|
93826
93943
|
var sentMessageInd = null;
|
|
93827
93944
|
var sentMessages = [];
|
|
@@ -95988,8 +96105,23 @@ code.hljs {
|
|
|
95988
96105
|
${LEARN_MORE_LABEL}
|
|
95989
96106
|
` + msg.links?.map((link) => link.href).join("\n") : "")
|
|
95990
96107
|
);
|
|
96108
|
+
return;
|
|
95991
96109
|
}
|
|
95992
96110
|
}
|
|
96111
|
+
clickedEl = e.target;
|
|
96112
|
+
clickedEl = clickedEl.closest(".alan-btn__chat-stop-response-holder");
|
|
96113
|
+
if (clickedEl) {
|
|
96114
|
+
const responseBubble = clickedEl.closest("[data-msg-index]");
|
|
96115
|
+
const msgInd = responseBubble.getAttribute("data-msg-index");
|
|
96116
|
+
const msg = textChatMessages[msgInd];
|
|
96117
|
+
if (responseBubble && msg) {
|
|
96118
|
+
const curMsgReqId = getMsgReqId(msg);
|
|
96119
|
+
canceledRequests.push(curMsgReqId);
|
|
96120
|
+
responseBubble.classList.add("alan-hide-msg-immidiatelly");
|
|
96121
|
+
saveMessageHistory();
|
|
96122
|
+
}
|
|
96123
|
+
enableTextareaInTheChat();
|
|
96124
|
+
}
|
|
95993
96125
|
}, false);
|
|
95994
96126
|
window.addEventListener("click", (e) => {
|
|
95995
96127
|
var clickedEl = e.target;
|
|
@@ -96011,6 +96143,10 @@ ${LEARN_MORE_LABEL}
|
|
|
96011
96143
|
function renderMessageInTextChat(msg, noAnimation, immidiateScroll) {
|
|
96012
96144
|
if (!uiState.textChat.available)
|
|
96013
96145
|
return;
|
|
96146
|
+
if (isMsgShouldBeSkipped(msg)) {
|
|
96147
|
+
console.info("isMsgShouldBeSkipped true");
|
|
96148
|
+
return;
|
|
96149
|
+
}
|
|
96014
96150
|
let innerMsgPart = "";
|
|
96015
96151
|
let msgHtml = "";
|
|
96016
96152
|
const msgHolder = document.getElementById("chatMessages");
|
|
@@ -96314,6 +96450,7 @@ ${LEARN_MORE_LABEL}
|
|
|
96314
96450
|
}
|
|
96315
96451
|
async function _sendText(text) {
|
|
96316
96452
|
var msg = { text, type: "request", name: "text" };
|
|
96453
|
+
sentMessageInd = null;
|
|
96317
96454
|
clearMessageProgressStatusInterval();
|
|
96318
96455
|
renderMessageInTextChat(msg);
|
|
96319
96456
|
var res = await sendText(text);
|
|
@@ -96328,6 +96465,10 @@ ${LEARN_MORE_LABEL}
|
|
|
96328
96465
|
saveSentMessages(text);
|
|
96329
96466
|
}
|
|
96330
96467
|
var lastSendMsgTs = null;
|
|
96468
|
+
function isMsgShouldBeSkipped(msg) {
|
|
96469
|
+
const regId = getMsgReqId(msg);
|
|
96470
|
+
return canceledRequests.indexOf(regId) > -1;
|
|
96471
|
+
}
|
|
96331
96472
|
function enableTextareaInTheChat() {
|
|
96332
96473
|
var textareaHolderEl = document.getElementById("textarea-holder");
|
|
96333
96474
|
textareaHolderEl.classList.remove("alan-btn__inactive");
|
|
@@ -96345,6 +96486,7 @@ ${LEARN_MORE_LABEL}
|
|
|
96345
96486
|
lastSendMsgTs = setTimeout(() => {
|
|
96346
96487
|
enableTextareaInTheChat();
|
|
96347
96488
|
}, 5e3);
|
|
96489
|
+
lastSendMsgTs = Date.now();
|
|
96348
96490
|
if (text.trim() === "")
|
|
96349
96491
|
return;
|
|
96350
96492
|
textareaEl.value = "";
|
|
@@ -96793,7 +96935,7 @@ ${LEARN_MORE_LABEL}
|
|
|
96793
96935
|
expandCollapseChatBtnImg.innerHTML = `${getExpandChatIcon(uiState?.textChat?.options)}${getCollapseChatIcon(uiState?.textChat?.options)}`;
|
|
96794
96936
|
addNeedClassesToExpandCollapseBtn(expandCollapseChatBtnImg);
|
|
96795
96937
|
}
|
|
96796
|
-
|
|
96938
|
+
manageSendStopBtnIconPosition(chatSendBtn, textareaInnerDiv, textareaHolderDiv);
|
|
96797
96939
|
manageUnmuteAlanIconPosition(unmuteAlanBtn, rightHeaderIconsHolder, leftHeaderIconsHolder);
|
|
96798
96940
|
if (voiceEnabledInTextChat) {
|
|
96799
96941
|
chatTextarea.setAttribute("placeholder", "Ask me anything...");
|
|
@@ -96973,7 +97115,7 @@ ${LEARN_MORE_LABEL}
|
|
|
96973
97115
|
}
|
|
96974
97116
|
}
|
|
96975
97117
|
}
|
|
96976
|
-
function
|
|
97118
|
+
function manageSendStopBtnIconPosition(chatSendBtn, footerInnerDiv, footerHolderDiv) {
|
|
96977
97119
|
var textareaInnerDiv = footerInnerDiv || document.getElementById("textarea-inner-holder");
|
|
96978
97120
|
var textareaHolderDiv = footerHolderDiv || document.getElementById("textarea-holder-content");
|
|
96979
97121
|
if (chatSendBtn) {
|
|
@@ -97322,6 +97464,7 @@ ${LEARN_MORE_LABEL}
|
|
|
97322
97464
|
if (uiState.textChat.available) {
|
|
97323
97465
|
var simpleAlanBtn = document.getElementById("chat-mic-btn");
|
|
97324
97466
|
var sendBtn = document.getElementById("chat-send-btn");
|
|
97467
|
+
var stopBtn = document.getElementById("chat-stop-btn");
|
|
97325
97468
|
var textChatEl = document.getElementById("alan-text-chat");
|
|
97326
97469
|
if (textChatEl) {
|
|
97327
97470
|
switch (newState) {
|
|
@@ -97339,7 +97482,7 @@ ${LEARN_MORE_LABEL}
|
|
|
97339
97482
|
default:
|
|
97340
97483
|
textChatEl.classList.remove("alan-btn__mic-active");
|
|
97341
97484
|
textChatEl.classList.remove("alan-btn__disconnected");
|
|
97342
|
-
|
|
97485
|
+
manageSendStopBtnIconPosition(sendBtn, stopBtn);
|
|
97343
97486
|
break;
|
|
97344
97487
|
}
|
|
97345
97488
|
if (simpleAlanBtn) {
|