ai12z 3.16.1-alpha.5 → 3.17.1-alpha.2
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/cjs/ai12z-beacon.cjs.entry.js +2 -2
- package/dist/cjs/ai12z-bot.cjs.entry.js +53 -42
- package/dist/cjs/ai12z-category_2.cjs.entry.js +21 -13
- package/dist/cjs/ai12z-chat-message.cjs.entry.js +4 -4
- package/dist/cjs/ai12z-chat_2.cjs.entry.js +23 -23
- package/dist/cjs/ai12z-container.cjs.entry.js +4 -4
- package/dist/cjs/ai12z-cta.cjs.entry.js +8 -9
- package/dist/cjs/ai12z-form.cjs.entry.js +3 -3
- package/dist/cjs/ai12z-inline-search.cjs.entry.js +5 -5
- package/dist/cjs/ai12z-knowledge-box.cjs.entry.js +14 -11
- package/dist/cjs/ai12z-search-panel.cjs.entry.js +1 -1
- package/dist/cjs/ai12z-spinner.cjs.entry.js +1 -1
- package/dist/cjs/{beacon-CHsypFIj.js → beacon-DwOvY6Ne.js} +44 -38
- package/dist/cjs/chat-avatar_6.cjs.entry.js +12 -12
- package/dist/cjs/chatbot-history_2.cjs.entry.js +1 -1
- package/dist/cjs/{ctaHelpers-DL-PGlAx.js → ctaHelpers-CdztrD6A.js} +1 -1
- package/dist/cjs/dynamic-form.cjs.entry.js +2 -2
- package/dist/cjs/image-uploader_2.cjs.entry.js +1 -1
- package/dist/cjs/{index-CHyfwy-h.js → index-B6xfVjPU.js} +1 -1
- package/dist/cjs/index.cjs.js +11 -11
- package/dist/cjs/item-list.cjs.entry.js +2 -2
- package/dist/cjs/{keyboard-shortcuts-BfEhZKK-.js → keyboard-shortcuts-CBUd9KfQ.js} +2 -2
- package/dist/cjs/library.cjs.js +1 -1
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/{parseHelper-B8pslVtS.js → parseHelper-BuoIRCbd.js} +1 -1
- package/dist/cjs/{processCarouselData-DVJtwUsv.js → processCarouselData-BXglENd8.js} +1 -1
- package/dist/cjs/{reCaptchaHelpers-Djq71pt4.js → reCaptchaHelpers-DIDQT22p.js} +1 -1
- package/dist/cjs/search-results-page.cjs.entry.js +32 -36
- package/dist/cjs/{socket-service-Dqfi4_qU.js → socket-service-j9VBg1pS.js} +1 -1
- package/dist/cjs/{styleSheetRegistry-CsHfoS0d.js → styleSheetRegistry-kcL2qS1d.js} +1 -1
- package/dist/cjs/{surveyHelpers-D0AfNAN8.js → surveyHelpers-B9t5lxy4.js} +1 -1
- package/dist/cjs/{utils-BsCPba57.js → utils-DZMolZh2.js} +3 -0
- package/dist/collection/components/ai12z-bot/ai12z-bot.js +44 -33
- package/dist/collection/components/ai12z-bot/chat-history.js +1 -1
- package/dist/collection/components/ai12z-bot/components/hamburger-menu/hamburger-menu.js +4 -4
- package/dist/collection/components/ai12z-bot/components/interaction-buttons/interaction-buttons.js +5 -5
- package/dist/collection/components/ai12z-bot/components/liveagent-chat/liveagent-chat.js +1 -1
- package/dist/collection/components/ai12z-bot/components/typing-indicator/typing-indicator.js +1 -1
- package/dist/collection/components/ai12z-container/ai12z-container.js +1 -1
- package/dist/collection/components/ai12z-cta/ai12z-cta.js +3 -4
- package/dist/collection/components/ai12z-cta/components/Category.js +12 -4
- package/dist/collection/components/ai12z-cta/components/Chat.js +5 -5
- package/dist/collection/components/ai12z-cta/components/DynamicForm.js +1 -1
- package/dist/collection/components/ai12z-cta/components/audiorecorder/audio-recorder.js +7 -6
- package/dist/collection/components/ai12z-form/ai12z-form.js +1 -1
- package/dist/collection/components/ai12z-inline-search/ai12z-inline-search.js +3 -3
- package/dist/collection/components/ai12z-knowledge-box/ai12z-knowledge-box.js +8 -5
- package/dist/collection/components/ai12z-knowledge-box/components/ai12z-chat-message.js +2 -2
- package/dist/collection/components/ai12z-search-panel/search-results-view.js +27 -31
- package/dist/collection/components/input/ImageUploader.js +1 -1
- package/dist/collection/components/input/Input.js +9 -9
- package/dist/collection/components/spinner/Spinner.js +1 -1
- package/dist/collection/utils/beacon.js +43 -37
- package/dist/collection/utils/ctaHelpers.js +0 -16
- package/dist/collection/utils/utils.js +3 -0
- package/dist/components/ai12z-beacon.js +1 -1
- package/dist/components/ai12z-bot.js +1 -1
- package/dist/components/ai12z-category.js +1 -1
- package/dist/components/ai12z-chat-message.js +1 -1
- package/dist/components/ai12z-chat.js +1 -1
- package/dist/components/ai12z-container.js +1 -1
- package/dist/components/ai12z-cta.js +1 -1
- package/dist/components/ai12z-form.js +1 -1
- package/dist/components/ai12z-inline-search.js +1 -1
- package/dist/components/ai12z-input-form.js +1 -1
- package/dist/components/ai12z-knowledge-box.js +1 -1
- package/dist/components/ai12z-search-panel.js +1 -1
- package/dist/components/ai12z-spinner.js +1 -1
- package/dist/components/audio-recorder.js +1 -1
- package/dist/components/chatbot-history.js +1 -1
- package/dist/components/dynamic-form.js +1 -1
- package/dist/components/hamburger-menu.js +1 -1
- package/dist/components/image-uploader.js +1 -1
- package/dist/components/index.js +1 -1
- package/dist/components/interaction-buttons.js +1 -1
- package/dist/components/item-list.js +1 -1
- package/dist/components/live-agent-chat.js +1 -1
- package/dist/components/{p-c6Z5KXDQ.js → p--Lo7lrbl.js} +1 -1
- package/dist/components/p-4jDAiNAG.js +1 -0
- package/dist/components/{p-BRLTYejK.js → p-6PVjY_1U.js} +1 -1
- package/dist/components/{p-Dcm7MWBo.js → p-B2V-wD9o.js} +1 -1
- package/dist/components/{p-Cywgam3s.js → p-BJOnT4k4.js} +1 -1
- package/dist/components/p-BL-11f6q.js +1 -0
- package/dist/components/{p-Dcj3Mokc.js → p-BO_7DTeV.js} +1 -1
- package/dist/components/{p-9LYL2tKU.js → p-BSf2OXiK.js} +1 -1
- package/dist/components/p-Bt_KWVYc.js +1 -0
- package/dist/components/p-Buj5Gn09.js +1 -0
- package/dist/components/p-C01IHdTU.js +1 -0
- package/dist/components/p-C0ycOUZ8.js +1 -0
- package/dist/components/{p-CWoExQML.js → p-C7OMI_aS.js} +1 -1
- package/dist/components/{p-Caiprvn4.js → p-C92f-4Xe.js} +1 -1
- package/dist/components/{p-DOynMJxg.js → p-CNxI_jB-.js} +1 -1
- package/dist/components/{p-BeRVlX-3.js → p-CW_iO9zy.js} +1 -1
- package/dist/components/p-CaMH5wYq.js +1 -0
- package/dist/components/{p-BO2WmSX3.js → p-CtGazkHl.js} +1 -1
- package/dist/components/{p-D_3pXSAZ.js → p-D0PteXe-.js} +1 -1
- package/dist/components/{p-UVgSZ7fz.js → p-D338smYm.js} +1 -1
- package/dist/components/p-DMdu_2Pr.js +2 -0
- package/dist/components/p-DVE50Spy.js +1 -0
- package/dist/components/{p-Dc7unp-V.js → p-DjI5tnxC.js} +1 -1
- package/dist/components/p-Ds7D6ZCB.js +1 -0
- package/dist/components/p-Dx_iq8hO.js +1 -0
- package/dist/components/{p-BjX5cCOG.js → p-HK5PYpCA.js} +1 -1
- package/dist/components/{p-DURIlC18.js → p-M51H23z5.js} +1 -1
- package/dist/components/{p-ClSkLu41.js → p-ZASkuPTc.js} +1 -1
- package/dist/components/privacy-modal.js +1 -1
- package/dist/components/search-results-page.js +1 -1
- package/dist/components/typing-indicator.js +1 -1
- package/dist/esm/ai12z-beacon.entry.js +2 -2
- package/dist/esm/ai12z-bot.entry.js +53 -42
- package/dist/esm/ai12z-category_2.entry.js +21 -13
- package/dist/esm/ai12z-chat-message.entry.js +4 -4
- package/dist/esm/ai12z-chat_2.entry.js +23 -23
- package/dist/esm/ai12z-container.entry.js +4 -4
- package/dist/esm/ai12z-cta.entry.js +8 -9
- package/dist/esm/ai12z-form.entry.js +3 -3
- package/dist/esm/ai12z-inline-search.entry.js +5 -5
- package/dist/esm/ai12z-knowledge-box.entry.js +14 -11
- package/dist/esm/ai12z-search-panel.entry.js +1 -1
- package/dist/esm/ai12z-spinner.entry.js +1 -1
- package/dist/esm/{beacon-CvlGzRRz.js → beacon-DOd-Eyt3.js} +44 -38
- package/dist/esm/chat-avatar_6.entry.js +12 -12
- package/dist/esm/chatbot-history_2.entry.js +1 -1
- package/dist/esm/{ctaHelpers-GH6upqgA.js → ctaHelpers-CA0BowjW.js} +1 -1
- package/dist/esm/dynamic-form.entry.js +2 -2
- package/dist/esm/image-uploader_2.entry.js +1 -1
- package/dist/esm/{index-CjSLTZFw.js → index-DhYLboA_.js} +1 -1
- package/dist/esm/index.js +11 -11
- package/dist/esm/item-list.entry.js +2 -2
- package/dist/esm/{keyboard-shortcuts-DNhwh88a.js → keyboard-shortcuts-IO5j9uXN.js} +2 -2
- package/dist/esm/library.js +1 -1
- package/dist/esm/loader.js +1 -1
- package/dist/esm/{parseHelper-B4cZLEeX.js → parseHelper-DD7WYvgn.js} +1 -1
- package/dist/esm/{processCarouselData-CgoPoIF_.js → processCarouselData-CAknSAMc.js} +1 -1
- package/dist/esm/{reCaptchaHelpers-O2ugKpWf.js → reCaptchaHelpers-CaQ3SVz2.js} +1 -1
- package/dist/esm/search-results-page.entry.js +32 -36
- package/dist/esm/{socket-service-B6aew9Me.js → socket-service-BOJYqySQ.js} +1 -1
- package/dist/esm/{styleSheetRegistry-DxStYIoa.js → styleSheetRegistry-CN6-rDNE.js} +1 -1
- package/dist/esm/{surveyHelpers-Cbq2vpWj.js → surveyHelpers-Bz38XWys.js} +1 -1
- package/dist/esm/{utils-qg8o2dBJ.js → utils-BRjWPcMA.js} +3 -0
- package/dist/library/index.esm.js +1 -1
- package/dist/library/library.esm.js +1 -1
- package/dist/library/{p-9f812fb1.entry.js → p-0111358b.entry.js} +1 -1
- package/dist/library/{p-eb4f0ea7.entry.js → p-0be2c23a.entry.js} +1 -1
- package/dist/library/{p-751e9420.entry.js → p-1f95c06c.entry.js} +1 -1
- package/dist/library/{p-4e8c0e1b.entry.js → p-221d7e46.entry.js} +1 -1
- package/dist/library/{p-DPxJK7tl.js → p-2OHqjSAB.js} +1 -1
- package/dist/library/{p-ceb2e683.entry.js → p-460007fb.entry.js} +1 -1
- package/dist/library/{p-2d8497d9.entry.js → p-47c7c1b3.entry.js} +1 -1
- package/dist/library/{p-bb534b71.entry.js → p-4f2bd961.entry.js} +1 -1
- package/dist/library/{p-f5bb347f.entry.js → p-51299820.entry.js} +1 -1
- package/dist/library/p-57010a13.entry.js +1 -0
- package/dist/library/{p-ad825010.entry.js → p-5b35b8ce.entry.js} +1 -1
- package/dist/library/{p-64e9659d.entry.js → p-7ffdb912.entry.js} +1 -1
- package/dist/library/p-880947da.entry.js +1 -0
- package/dist/library/{p-25f8585a.entry.js → p-8b1e5b00.entry.js} +1 -1
- package/dist/library/p-8f1bffc1.entry.js +1 -0
- package/dist/library/{p-4a41a902.entry.js → p-99cde2a6.entry.js} +2 -2
- package/dist/library/{p-FOOni1Nh.js → p-BBdGlaiy.js} +1 -1
- package/dist/library/{p-CrPwKEk_.js → p-BdxoiM8M.js} +1 -1
- package/dist/library/{p-DkZf86Si.js → p-CliFNIj3.js} +1 -1
- package/dist/library/{p-TJudQcMS.js → p-DKkcidUt.js} +2 -2
- package/dist/library/p-De893Lcf.js +1 -0
- package/dist/library/{p-DheNz53W.js → p-G2JbXetS.js} +1 -1
- package/dist/library/{p-CZBOULiw.js → p-NAZgDh2j.js} +1 -1
- package/dist/library/p-bbcbf218.entry.js +1 -0
- package/dist/library/p-f680df18.entry.js +1 -0
- package/dist/library/p-f9ae5fb0.entry.js +1 -0
- package/dist/library/{p-Cwv5wtEw.js → p-hl4njVg0.js} +1 -1
- package/dist/library/{p-CzTa5Msf.js → p-usGJJG-Q.js} +1 -1
- package/dist/types/components/ai12z-bot/ai12z-bot.d.ts +3 -0
- package/dist/types/components/ai12z-cta/components/Category.d.ts +2 -1
- package/dist/types/components/ai12z-search-panel/search-results-view.d.ts +1 -0
- package/dist/types/utils/ctaHelpers.d.ts +0 -1
- package/dist/types/utils/utils.d.ts +1 -1
- package/package.json +2 -2
- package/readme.md +0 -2
- package/dist/components/p--yAsbu4H.js +0 -1
- package/dist/components/p-6FdpADZf.js +0 -1
- package/dist/components/p-7D8UwFfY.js +0 -1
- package/dist/components/p-BVqv7Ldi.js +0 -1
- package/dist/components/p-CAK1__lu.js +0 -2
- package/dist/components/p-CfANO9-0.js +0 -1
- package/dist/components/p-DBojmc3T.js +0 -1
- package/dist/components/p-Di0FiI3Q.js +0 -1
- package/dist/components/p-DxKyMupy.js +0 -1
- package/dist/components/p-kJpnWRAF.js +0 -1
- package/dist/components/p-tcK5_WYS.js +0 -1
- package/dist/library/p-16b01d52.entry.js +0 -1
- package/dist/library/p-58b00a22.entry.js +0 -1
- package/dist/library/p-6e1f9c89.entry.js +0 -1
- package/dist/library/p-BNcQ63DZ.js +0 -1
- package/dist/library/p-b277fee9.entry.js +0 -1
- package/dist/library/p-cbf75654.entry.js +0 -1
- package/dist/library/p-d45bc8fa.entry.js +0 -1
- /package/dist/components/{p-CHrTVomR.js → p-djQQf6su.js} +0 -0
- /package/dist/library/{p-D5HnlfHT.js → p-OGzQSgcP.js} +0 -0
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
var index = require('./index-v8T1EJAJ.js');
|
|
4
|
-
var beacon = require('./beacon-
|
|
5
|
-
require('./utils-
|
|
4
|
+
var beacon = require('./beacon-DwOvY6Ne.js');
|
|
5
|
+
require('./utils-DZMolZh2.js');
|
|
6
6
|
|
|
7
7
|
const Ai12zBeacon = class {
|
|
8
8
|
constructor(hostRef) {
|
|
@@ -2,20 +2,20 @@
|
|
|
2
2
|
|
|
3
3
|
var index = require('./index-v8T1EJAJ.js');
|
|
4
4
|
var responseAdapter = require('./response-adapter-CKKyyhMj.js');
|
|
5
|
-
var processCarouselData = require('./processCarouselData-
|
|
5
|
+
var processCarouselData = require('./processCarouselData-BXglENd8.js');
|
|
6
6
|
var logger$2 = require('./logger-2ZBZCKdM.js');
|
|
7
|
-
var utils = require('./utils-
|
|
8
|
-
var index$1 = require('./index-
|
|
7
|
+
var utils = require('./utils-DZMolZh2.js');
|
|
8
|
+
var index$1 = require('./index-B6xfVjPU.js');
|
|
9
9
|
var globalStore = require('./global-store-R6x06KvJ.js');
|
|
10
|
-
var reCaptchaHelpers = require('./reCaptchaHelpers-
|
|
10
|
+
var reCaptchaHelpers = require('./reCaptchaHelpers-DIDQT22p.js');
|
|
11
11
|
var botHelpers = require('./botHelpers-D5Dj7TRA.js');
|
|
12
|
-
var surveyHelpers = require('./surveyHelpers-
|
|
12
|
+
var surveyHelpers = require('./surveyHelpers-B9t5lxy4.js');
|
|
13
13
|
var scriptStyleLoader = require('./scriptStyleLoader-D-bqKqSb.js');
|
|
14
|
-
var keyboardShortcuts = require('./keyboard-shortcuts-
|
|
15
|
-
var ctaHelpers = require('./ctaHelpers-
|
|
14
|
+
var keyboardShortcuts = require('./keyboard-shortcuts-CBUd9KfQ.js');
|
|
15
|
+
var ctaHelpers = require('./ctaHelpers-CdztrD6A.js');
|
|
16
16
|
var appStore = require('./app-store-BtkiHvcw.js');
|
|
17
|
-
var parseHelper = require('./parseHelper-
|
|
18
|
-
var beacon = require('./beacon-
|
|
17
|
+
var parseHelper = require('./parseHelper-BuoIRCbd.js');
|
|
18
|
+
var beacon = require('./beacon-DwOvY6Ne.js');
|
|
19
19
|
var bodyScrollLock = require('./bodyScrollLock-C7gKTAfx.js');
|
|
20
20
|
require('./_commonjsHelpers-MBWFX2dn.js');
|
|
21
21
|
|
|
@@ -1092,6 +1092,7 @@ const Ai12zBot = class {
|
|
|
1092
1092
|
// finding-agent placeholder is tracked via data-finding-agent attribute in the DOM
|
|
1093
1093
|
// private originalTitle: string = document.title
|
|
1094
1094
|
this.unreadCount = 0;
|
|
1095
|
+
this.hasPersistedConversationId = false;
|
|
1095
1096
|
this.liveAgentButtonText = "Talk to a Live Agent";
|
|
1096
1097
|
this.isLiveAgentEnabled = false;
|
|
1097
1098
|
this.isTypingIndicatorVisible = false;
|
|
@@ -1807,7 +1808,9 @@ const Ai12zBot = class {
|
|
|
1807
1808
|
this.timestamp = utils.formatTimestamp(new Date());
|
|
1808
1809
|
this.updateScreenSize();
|
|
1809
1810
|
await this.configBot();
|
|
1810
|
-
|
|
1811
|
+
if (!this.botSettings.disableBeacon) {
|
|
1812
|
+
void beacon.initBeacon(this.dataKey, this.dataMode);
|
|
1813
|
+
}
|
|
1811
1814
|
this.visitorID = "ai12z-" + localStorage.getItem(`ai12z-visitorId`);
|
|
1812
1815
|
// Now safely read state with valid pId
|
|
1813
1816
|
this.hydrateStateFromStorage();
|
|
@@ -1835,6 +1838,7 @@ const Ai12zBot = class {
|
|
|
1835
1838
|
}
|
|
1836
1839
|
this.isExpanded = botState.isExpanded;
|
|
1837
1840
|
this.conversationId = botState.conversationId;
|
|
1841
|
+
this.hasPersistedConversationId = Boolean(botState.conversationId);
|
|
1838
1842
|
if (!botState.newChat) {
|
|
1839
1843
|
this.messages = [...(botState.messages || [])];
|
|
1840
1844
|
}
|
|
@@ -2019,6 +2023,9 @@ const Ai12zBot = class {
|
|
|
2019
2023
|
this.announceMessage = "";
|
|
2020
2024
|
}, 1000);
|
|
2021
2025
|
}
|
|
2026
|
+
isFirstExchange() {
|
|
2027
|
+
return !this.hasPersistedConversationId;
|
|
2028
|
+
}
|
|
2022
2029
|
syncBodyScrollLock(shouldOpen, wasOpen = this.isOpened) {
|
|
2023
2030
|
if (shouldOpen && !wasOpen) {
|
|
2024
2031
|
bodyScrollLock.bodyScrollLock.acquire("ai12z-bot");
|
|
@@ -2261,6 +2268,13 @@ const Ai12zBot = class {
|
|
|
2261
2268
|
this.currentDomId = id;
|
|
2262
2269
|
if (idChanged)
|
|
2263
2270
|
this.messages = [...this.messages];
|
|
2271
|
+
// capture once, before handleEndResponse mutates this.messages and the submit flow advances.
|
|
2272
|
+
const isFirstExchange = this.isFirstExchange();
|
|
2273
|
+
if (isFirstExchange && !this.botSettings.disableBeacon) {
|
|
2274
|
+
// Persist before emitting so downstream listeners see the conversation id as already stored.
|
|
2275
|
+
beacon.setConversationId(this.dataKey, this.dataMode, data.conversationId);
|
|
2276
|
+
this.hasPersistedConversationId = true;
|
|
2277
|
+
}
|
|
2264
2278
|
if (!orphaned) {
|
|
2265
2279
|
this.messageReceived.emit({ data, domId: this.currentDomId });
|
|
2266
2280
|
}
|
|
@@ -2331,16 +2345,13 @@ const Ai12zBot = class {
|
|
|
2331
2345
|
}
|
|
2332
2346
|
// ✅ Common cleanup
|
|
2333
2347
|
this.conversationId = data.conversationId;
|
|
2334
|
-
if (this.messages.length === 2) {
|
|
2335
|
-
beacon.setConversationId(this.dataKey, this.dataMode, this.conversationId);
|
|
2336
|
-
}
|
|
2337
2348
|
// this.saveConversation()
|
|
2338
2349
|
ctaHelpers.saveConversation((_b = this.botSettings) === null || _b === void 0 ? void 0 : _b.pId, this.messages, this.conversationId, (_d = (_c = this.botSettings._id) === null || _c === void 0 ? void 0 : _c.$oid) !== null && _d !== void 0 ? _d : "", this.visitorID, "bot", {
|
|
2339
2350
|
isMinimized: this.isMinimized,
|
|
2340
2351
|
isOpened: this.isOpened,
|
|
2341
2352
|
isExpanded: this.isExpanded,
|
|
2342
2353
|
});
|
|
2343
|
-
if (this.visitorID &&
|
|
2354
|
+
if (this.visitorID && isFirstExchange) {
|
|
2344
2355
|
const sessionKey = botHelpers.getBotStateKey(this.botSettings.pId, (_f = this.botSettings._id) === null || _f === void 0 ? void 0 : _f.$oid);
|
|
2345
2356
|
sessionStorage.setItem(sessionKey, JSON.stringify({
|
|
2346
2357
|
isMinimized: this.isMinimized,
|
|
@@ -2730,8 +2741,14 @@ const Ai12zBot = class {
|
|
|
2730
2741
|
clearTimeout(this.autoScrollTimer);
|
|
2731
2742
|
this.autoScrollTimer = setTimeout(() => this.scrollToBottom(), 60);
|
|
2732
2743
|
}
|
|
2744
|
+
checkLiveAgentBusinessHours() {
|
|
2745
|
+
var _a, _b, _c, _d, _f, _g;
|
|
2746
|
+
const businessHours = (_c = (_b = (_a = this.botSettings) === null || _a === void 0 ? void 0 : _a.liveagent) === null || _b === void 0 ? void 0 : _b.businessHours) !== null && _c !== void 0 ? _c : null;
|
|
2747
|
+
const timezone = (_g = (_f = (_d = this.botSettings) === null || _d === void 0 ? void 0 : _d.liveagent) === null || _f === void 0 ? void 0 : _f.timezone) !== null && _g !== void 0 ? _g : null;
|
|
2748
|
+
return businessHours && timezone ? botHelpers.checkBusinessHours(businessHours, timezone) : true;
|
|
2749
|
+
}
|
|
2733
2750
|
checkLiveAgentMode() {
|
|
2734
|
-
var _a, _b, _c, _d
|
|
2751
|
+
var _a, _b, _c, _d;
|
|
2735
2752
|
const isLiveAgentConfigured = ((_b = (_a = this.botSettings) === null || _a === void 0 ? void 0 : _a.liveagent) === null || _b === void 0 ? void 0 : _b.providers) && Object.keys((_d = (_c = this.botSettings) === null || _c === void 0 ? void 0 : _c.liveagent) === null || _d === void 0 ? void 0 : _d.providers).length > 0;
|
|
2736
2753
|
/**
|
|
2737
2754
|
* Check if live agent is enabled
|
|
@@ -2741,9 +2758,7 @@ const Ai12zBot = class {
|
|
|
2741
2758
|
* and there is a conversation history to refer to.
|
|
2742
2759
|
* This prevents the live agent from being connected immediately when the chat is opened.
|
|
2743
2760
|
*/
|
|
2744
|
-
const
|
|
2745
|
-
const tz = (_l = (_k = (_j = this.botSettings) === null || _j === void 0 ? void 0 : _j.liveagent) === null || _k === void 0 ? void 0 : _k.timezone) !== null && _l !== void 0 ? _l : null;
|
|
2746
|
-
const withinHours = bh && tz ? botHelpers.checkBusinessHours(bh, tz) : true;
|
|
2761
|
+
const withinHours = this.checkLiveAgentBusinessHours();
|
|
2747
2762
|
this.isLiveAgentEnabled = isLiveAgentConfigured && this.messages.length > 1 && withinHours;
|
|
2748
2763
|
}
|
|
2749
2764
|
openEndLiveAgentDialog() {
|
|
@@ -2816,7 +2831,7 @@ const Ai12zBot = class {
|
|
|
2816
2831
|
ChatEventBus.off("AGENT_SESSION_INFO", this.handleAgentSessionInfo);
|
|
2817
2832
|
}
|
|
2818
2833
|
async connectLiveChat() {
|
|
2819
|
-
var _a, _b, _c, _d, _f, _g, _h, _j, _k, _l, _m, _o
|
|
2834
|
+
var _a, _b, _c, _d, _f, _g, _h, _j, _k, _l, _m, _o;
|
|
2820
2835
|
this.announce("Connecting to live agent");
|
|
2821
2836
|
this.clearEvents();
|
|
2822
2837
|
const liveAgentProviderNames = Object.keys((_c = (_b = (_a = this.botSettings) === null || _a === void 0 ? void 0 : _a.liveagent) === null || _b === void 0 ? void 0 : _b.providers) !== null && _c !== void 0 ? _c : {});
|
|
@@ -2829,8 +2844,6 @@ const Ai12zBot = class {
|
|
|
2829
2844
|
console.warn("Multiple live agent providers found, using the first one");
|
|
2830
2845
|
}
|
|
2831
2846
|
let liveAgentSettings = (_h = (_g = (_f = (_d = this.botSettings) === null || _d === void 0 ? void 0 : _d.liveagent) === null || _f === void 0 ? void 0 : _f.providers) === null || _g === void 0 ? void 0 : _g[liveAgentProviderNames[0]]) !== null && _h !== void 0 ? _h : null;
|
|
2832
|
-
let liveAgentBusinessHours = (_l = (_k = (_j = this.botSettings) === null || _j === void 0 ? void 0 : _j.liveagent) === null || _k === void 0 ? void 0 : _k.businessHours) !== null && _l !== void 0 ? _l : null;
|
|
2833
|
-
let liveAgentTimezone = (_p = (_o = (_m = this.botSettings) === null || _m === void 0 ? void 0 : _m.liveagent) === null || _o === void 0 ? void 0 : _o.timezone) !== null && _p !== void 0 ? _p : null;
|
|
2834
2847
|
if (!liveAgentSettings) {
|
|
2835
2848
|
console.error("No live agent settings found for the provider", liveAgentProviderNames[0]);
|
|
2836
2849
|
this.announce("Live agent settings are unavailable");
|
|
@@ -2854,25 +2867,23 @@ const Ai12zBot = class {
|
|
|
2854
2867
|
extraPrechatFormDetails,
|
|
2855
2868
|
};
|
|
2856
2869
|
this.liveAgentProviderName = liveAgentProviderNames[0];
|
|
2857
|
-
|
|
2858
|
-
|
|
2859
|
-
|
|
2860
|
-
|
|
2861
|
-
|
|
2862
|
-
|
|
2863
|
-
|
|
2864
|
-
|
|
2865
|
-
|
|
2866
|
-
|
|
2867
|
-
|
|
2868
|
-
|
|
2869
|
-
|
|
2870
|
-
|
|
2871
|
-
|
|
2872
|
-
|
|
2873
|
-
|
|
2874
|
-
return;
|
|
2875
|
-
}
|
|
2870
|
+
let isWithinBusinessHours;
|
|
2871
|
+
try {
|
|
2872
|
+
isWithinBusinessHours = this.checkLiveAgentBusinessHours();
|
|
2873
|
+
}
|
|
2874
|
+
catch (e) {
|
|
2875
|
+
console.error("AI12Z: unexpected error evaluating business hours — blocking live agent connection", e);
|
|
2876
|
+
this.announce("Unexpected error evaluating business hours. Live agent connection blocked.");
|
|
2877
|
+
this.addEventMessage("Unexpected error evaluating business hours. Please try again later.");
|
|
2878
|
+
this.isTypingIndicatorVisible = false;
|
|
2879
|
+
return;
|
|
2880
|
+
}
|
|
2881
|
+
if (!isWithinBusinessHours) {
|
|
2882
|
+
const outsideHoursMsg = (_k = (_j = liveAgentSettings.config) === null || _j === void 0 ? void 0 : _j.outsideBusinessHoursMessage) !== null && _k !== void 0 ? _k : "Our live agents are currently offline. Please try again during our business hours.";
|
|
2883
|
+
this.addEventMessage(outsideHoursMsg);
|
|
2884
|
+
this.announce("Live agents are currently offline");
|
|
2885
|
+
this.isTypingIndicatorVisible = false;
|
|
2886
|
+
return;
|
|
2876
2887
|
}
|
|
2877
2888
|
if (liveAgentProviderNames[0] === "liveagent") {
|
|
2878
2889
|
if (!this.liveAgentRef) {
|
|
@@ -2889,7 +2900,7 @@ const Ai12zBot = class {
|
|
|
2889
2900
|
else {
|
|
2890
2901
|
// Coerce to number; enforce minimum of 5 s to prevent misconfigured values;
|
|
2891
2902
|
// fall back to 30 s when unset, non-numeric, or below the minimum.
|
|
2892
|
-
const rawWait = Number((
|
|
2903
|
+
const rawWait = Number((_l = liveAgentSettings === null || liveAgentSettings === void 0 ? void 0 : liveAgentSettings.config) === null || _l === void 0 ? void 0 : _l.maxWaitTime);
|
|
2893
2904
|
const waitSeconds = Number.isFinite(rawWait) && rawWait >= 5 ? rawWait : 300;
|
|
2894
2905
|
const timeoutMs = waitSeconds * 1000;
|
|
2895
2906
|
// Step 1: register all listeners before connecting so no events are missed
|
|
@@ -2931,7 +2942,7 @@ const Ai12zBot = class {
|
|
|
2931
2942
|
this.liveAgentConversationId = "";
|
|
2932
2943
|
this.isLiveAgent = false;
|
|
2933
2944
|
this.isTypingIndicatorVisible = false;
|
|
2934
|
-
const timeoutMsg = (
|
|
2945
|
+
const timeoutMsg = (_o = (_m = liveAgentSettings.config) === null || _m === void 0 ? void 0 : _m.maxWaitMessage) !== null && _o !== void 0 ? _o : "Sorry, no agents are available at the moment.";
|
|
2935
2946
|
this.removeFindingAgentPlaceholder();
|
|
2936
2947
|
this.addEventMessage(timeoutMsg);
|
|
2937
2948
|
this.liveAgentEventHandler.disconnectLiveAgent();
|
|
@@ -2,11 +2,11 @@
|
|
|
2
2
|
|
|
3
3
|
var index = require('./index-v8T1EJAJ.js');
|
|
4
4
|
var SearchResult = require('./SearchResult-CvTJr55G.js');
|
|
5
|
-
var utils = require('./utils-
|
|
5
|
+
var utils = require('./utils-DZMolZh2.js');
|
|
6
6
|
var _commonjsHelpers = require('./_commonjsHelpers-MBWFX2dn.js');
|
|
7
7
|
var appStore = require('./app-store-BtkiHvcw.js');
|
|
8
|
-
var parseHelper = require('./parseHelper-
|
|
9
|
-
require('./ctaHelpers-
|
|
8
|
+
var parseHelper = require('./parseHelper-BuoIRCbd.js');
|
|
9
|
+
require('./ctaHelpers-CdztrD6A.js');
|
|
10
10
|
require('./logger-2ZBZCKdM.js');
|
|
11
11
|
|
|
12
12
|
const categoryCss = () => `ai12z-category{font-family:var(--ai12z-font-family) !important;font-size:var(--ai12z-search-font-size, var(--ai12z-font-size)) !important}.custom-title{font-size:var(--ai12z-category-font-size);color:var(--ai12z-category-font-color)}`;
|
|
@@ -19,11 +19,10 @@ const Category = class {
|
|
|
19
19
|
clearResultsHandler(_state) {
|
|
20
20
|
this.categories = {};
|
|
21
21
|
}
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
if (this.categoryList && this.categoryList.length > 0) {
|
|
22
|
+
watchCategoryList(newValue) {
|
|
23
|
+
if (newValue && newValue.length > 0) {
|
|
25
24
|
/*group by category*/
|
|
26
|
-
let grouped =
|
|
25
|
+
let grouped = newValue.reduce((result, currentValue) => {
|
|
27
26
|
(result[currentValue["category"]] = result[currentValue["category"]] || []).push(currentValue);
|
|
28
27
|
return result;
|
|
29
28
|
}, {});
|
|
@@ -33,11 +32,19 @@ const Category = class {
|
|
|
33
32
|
this.categories = {};
|
|
34
33
|
}
|
|
35
34
|
}
|
|
35
|
+
componentWillLoad() {
|
|
36
|
+
this.watchCategoryList(this.categoryList);
|
|
37
|
+
}
|
|
36
38
|
render() {
|
|
37
39
|
return Object.entries(this.categories).map(([key, value], _index) => {
|
|
38
40
|
return (index.h(index.Fragment, null, index.h("div", null, index.h("h1", { class: "custom-title" }, key)), index.h(SearchResult.SearchResult, { results: value, linkTarget: this.linkTarget })));
|
|
39
41
|
});
|
|
40
42
|
}
|
|
43
|
+
static get watchers() { return {
|
|
44
|
+
"categoryList": [{
|
|
45
|
+
"watchCategoryList": 0
|
|
46
|
+
}]
|
|
47
|
+
}; }
|
|
41
48
|
};
|
|
42
49
|
Category.style = categoryCss();
|
|
43
50
|
|
|
@@ -6543,8 +6550,9 @@ const AudioRecorder = class {
|
|
|
6543
6550
|
this.record = this.wavesurfer.registerPlugin(n.create({
|
|
6544
6551
|
renderRecordedAudio: false,
|
|
6545
6552
|
scrollingWaveform: true,
|
|
6546
|
-
continuousWaveform: true,
|
|
6547
|
-
|
|
6553
|
+
// continuousWaveform: true,
|
|
6554
|
+
continuousWaveform: false,
|
|
6555
|
+
// continuousWaveformDuration: 30, // optional
|
|
6548
6556
|
mimeType: "audio/wav",
|
|
6549
6557
|
}));
|
|
6550
6558
|
// Render recorded audio
|
|
@@ -6669,17 +6677,17 @@ const AudioRecorder = class {
|
|
|
6669
6677
|
render() {
|
|
6670
6678
|
const minutes = Math.floor(this.time / 60);
|
|
6671
6679
|
const seconds = this.time % 60;
|
|
6672
|
-
return (index.h("div", { key: '
|
|
6680
|
+
return (index.h("div", { key: '3a61fd0cccae8abbf374222a23165af7c0a2946f', class: "flex w-full" }, (this.isRecording || this.isProcessing) && (index.h("div", { key: 'a463fefecfdd3ef0b1255a033a7ec75cfb3b9405', class: `relative flex items-center w-full rounded-full` }, this.isRecording && (index.h("button", { key: '38bc942c1430cb6d2e8c17c1729e3739e44ef1de', "aria-label": "Cancel Recording", onClick: e => {
|
|
6673
6681
|
e.preventDefault();
|
|
6674
6682
|
this.stopRecording("cancel");
|
|
6675
|
-
}, class: "w-10 h-10 rounded-full flex items-center justify-center text-white" }, "\u274C")), index.h("div", { key: '
|
|
6683
|
+
}, class: "w-10 h-10 rounded-full flex items-center justify-center text-white" }, "\u274C")), index.h("div", { key: 'ca74d03882f73b309ac2e7b5385818fd924c6254', id: "mic", style: { width: "100%" } }), this.isRecording && !this.isProcessing ? (index.h("div", { class: "ml-auto text-blue-600 font-semibold" }, String(minutes).padStart(2, "0"), ":", String(seconds).padStart(2, "0"))) : null, (this.isRecording || this.isProcessing) && (index.h("button", { key: '7391ecfdc0574a8ddf5e10f13ade8e244a2014a2', "aria-label": "Confirm Recording", disabled: this.isProcessing, onClick: e => {
|
|
6676
6684
|
e.preventDefault();
|
|
6677
6685
|
if (!this.isProcessing)
|
|
6678
6686
|
this.stopRecording("stop");
|
|
6679
|
-
}, class: `w-10 h-10 ml-2 rounded-full flex items-center justify-center ${this.isProcessing ? "cursor-not-allowed" : "text-blue-600"}` }, this.isProcessing ? (index.h("svg", { class: "activity-spinner", viewBox: "0 0 24 24", xmlns: "http://www.w3.org/2000/svg" }, index.h("line", { x1: "12", y1: "2", x2: "12", y2: "5", "stroke-width": "2", "stroke-linecap": "round", style: { "--n": "0" } }), index.h("line", { x1: "16.24", y1: "3.76", x2: "14.12", y2: "5.88", "stroke-width": "2", "stroke-linecap": "round", style: { "--n": "1" } }), index.h("line", { x1: "19", y1: "7.76", x2: "16.24", y2: "9.24", "stroke-width": "2", "stroke-linecap": "round", style: { "--n": "2" } }), index.h("line", { x1: "20", y1: "12", x2: "17", y2: "12", "stroke-width": "2", "stroke-linecap": "round", style: { "--n": "3" } }), index.h("line", { x1: "19", y1: "16.24", x2: "16.24", y2: "14.76", "stroke-width": "2", "stroke-linecap": "round", style: { "--n": "4" } }), index.h("line", { x1: "16.24", y1: "20.24", x2: "14.12", y2: "18.12", "stroke-width": "2", "stroke-linecap": "round", style: { "--n": "5" } }), index.h("line", { x1: "12", y1: "22", x2: "12", y2: "19", "stroke-width": "2", "stroke-linecap": "round", style: { "--n": "6" } }), index.h("line", { x1: "7.76", y1: "20.24", x2: "9.88", y2: "18.12", "stroke-width": "2", "stroke-linecap": "round", style: { "--n": "7" } }), index.h("line", { x1: "5", y1: "16.24", x2: "7.76", y2: "14.76", "stroke-width": "2", "stroke-linecap": "round", style: { "--n": "8" } }), index.h("line", { x1: "4", y1: "12", x2: "7", y2: "12", "stroke-width": "2", "stroke-linecap": "round", style: { "--n": "9" } }), index.h("line", { x1: "5", y1: "7.76", x2: "7.76", y2: "9.24", "stroke-width": "2", "stroke-linecap": "round", style: { "--n": "10" } }), index.h("line", { x1: "7.76", y1: "3.76", x2: "9.88", y2: "5.88", "stroke-width": "2", "stroke-linecap": "round", style: { "--n": "11" } }))) : (index.h("span", { class: "text-blue-600 font-sans" }, "\u2714")))))), !this.isRecording && !this.isProcessing && (index.h("button", { key: '
|
|
6687
|
+
}, class: `w-10 h-10 ml-2 rounded-full flex items-center justify-center ${this.isProcessing ? "cursor-not-allowed" : "text-blue-600"}` }, this.isProcessing ? (index.h("svg", { class: "activity-spinner", viewBox: "0 0 24 24", xmlns: "http://www.w3.org/2000/svg" }, index.h("line", { x1: "12", y1: "2", x2: "12", y2: "5", "stroke-width": "2", "stroke-linecap": "round", style: { "--n": "0" } }), index.h("line", { x1: "16.24", y1: "3.76", x2: "14.12", y2: "5.88", "stroke-width": "2", "stroke-linecap": "round", style: { "--n": "1" } }), index.h("line", { x1: "19", y1: "7.76", x2: "16.24", y2: "9.24", "stroke-width": "2", "stroke-linecap": "round", style: { "--n": "2" } }), index.h("line", { x1: "20", y1: "12", x2: "17", y2: "12", "stroke-width": "2", "stroke-linecap": "round", style: { "--n": "3" } }), index.h("line", { x1: "19", y1: "16.24", x2: "16.24", y2: "14.76", "stroke-width": "2", "stroke-linecap": "round", style: { "--n": "4" } }), index.h("line", { x1: "16.24", y1: "20.24", x2: "14.12", y2: "18.12", "stroke-width": "2", "stroke-linecap": "round", style: { "--n": "5" } }), index.h("line", { x1: "12", y1: "22", x2: "12", y2: "19", "stroke-width": "2", "stroke-linecap": "round", style: { "--n": "6" } }), index.h("line", { x1: "7.76", y1: "20.24", x2: "9.88", y2: "18.12", "stroke-width": "2", "stroke-linecap": "round", style: { "--n": "7" } }), index.h("line", { x1: "5", y1: "16.24", x2: "7.76", y2: "14.76", "stroke-width": "2", "stroke-linecap": "round", style: { "--n": "8" } }), index.h("line", { x1: "4", y1: "12", x2: "7", y2: "12", "stroke-width": "2", "stroke-linecap": "round", style: { "--n": "9" } }), index.h("line", { x1: "5", y1: "7.76", x2: "7.76", y2: "9.24", "stroke-width": "2", "stroke-linecap": "round", style: { "--n": "10" } }), index.h("line", { x1: "7.76", y1: "3.76", x2: "9.88", y2: "5.88", "stroke-width": "2", "stroke-linecap": "round", style: { "--n": "11" } }))) : (index.h("span", { class: "text-blue-600 font-sans" }, "\u2714")))))), !this.isRecording && !this.isProcessing && (index.h("button", { key: '074a9ae606bc564537fac0666f143d2464ea3fcd', "aria-label": "Start Recording", title: "Start Recording", onClick: e => {
|
|
6680
6688
|
e.preventDefault();
|
|
6681
6689
|
this.startRecording();
|
|
6682
|
-
}, class: `flex ${this.componentType === "search" || this.componentType === "cta" ? "p-1.5 mr-0.5 self-center mt-0.5" : "w-10 h-8 p-0 mt-4"}` }, index.h("svg", { key: '
|
|
6690
|
+
}, class: `flex ${this.componentType === "search" || this.componentType === "cta" ? "p-1.5 mr-0.5 self-center mt-0.5" : "w-10 h-8 p-0 mt-4"}` }, index.h("svg", { key: '93ad9e4839efd9b6a29b3e2a7d1f83340b50a89e', xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 20 20", class: `w-5 h-5 translate-y-[0.5px] ${this.componentType === "search" || this.componentType === "cta" ? "mic-icon" : "mic-botIcon"}` }, index.h("path", { key: '6672944fcf0ba983b344a857b1bc8b704c4322c9', d: "M7 4a3 3 0 016 0v6a3 3 0 11-6 0V4z" }), index.h("path", { key: '85ef503991add4f986e84fbed3e5f79ba1e162ed', d: "M5.5 9.643a.75.75 0 00-1.5 0V10c0 3.06 2.29 5.585 5.25 5.954V17.5h-1.5a.75.75 0 000 1.5h4.5a.75.75 0 000-1.5h-1.5v-1.546A6.001 6.001 0 0016 10v-.357a.75.75 0 00-1.5 0V10a4.5 4.5 0 01-9 0v-.357z" }))))));
|
|
6683
6691
|
}
|
|
6684
6692
|
get element() { return index.getElement(this); }
|
|
6685
6693
|
};
|
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
|
|
3
3
|
var index = require('./index-v8T1EJAJ.js');
|
|
4
4
|
var botHelpers = require('./botHelpers-D5Dj7TRA.js');
|
|
5
|
-
var styleSheetRegistry = require('./styleSheetRegistry-
|
|
6
|
-
require('./utils-
|
|
5
|
+
var styleSheetRegistry = require('./styleSheetRegistry-kcL2qS1d.js');
|
|
6
|
+
require('./utils-DZMolZh2.js');
|
|
7
7
|
|
|
8
8
|
const ai12zChatMessageCss = () => `.show-more-btn{background:none;color:var(--ai12z-knowledge-box-show-more-color, #4a8aff);font-size:16px;cursor:pointer;font-weight:500;border-radius:6px;transition:color 0.2s ease, background 0.2s ease;border:1px solid var(--ai12z-knowledge-box-show-more-border, blue);padding:10px;border-radius:20px;align-items:center;justify-content:center;margin:auto;display:block;z-index:20;position:relative;width:30%}.show-more-btn:hover{color:var(--ai12z-knowledge-box-show-more-hover-color, #1a73e8);background:rgba(74, 138, 255, 0.08)}.show-more-btn:active{background:rgba(74, 138, 255, 0.15)}.show-more-btn svg{vertical-align:middle;gap:5px;transition:transform 0.3s ease-in-out;display:inline-block;margin-left:10px;font-size:20}.message-text{line-height:1.55;font-size:15px;color:var(--ai12z-knowledge-box-text-color, #1e1e1e);transition:max-height 0.5s cubic-bezier(0.4, 0, 0.2, 1);overflow:hidden}.fade-overlay{position:absolute;bottom:0;left:0;right:0;height:100px;z-index:10;pointer-events:none;opacity:1;transition:opacity 0.3s ease-in-out;background:linear-gradient( to bottom, rgba(255, 255, 255, 0) 0%, var(--ai12z-knowledge-box-bg-color, #ffffff) 85% )}.chat-message{position:relative;}.custom-line-clamp{overflow:hidden;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:var(--line-clamp);line-clamp:var(--line-clamp)}.ai12z-form-honeypot{position:absolute;left:-10000px;top:auto;width:1px;height:1px;overflow:hidden}.ai12zBtn{background-color:var(--ai12z-knowledge-box-primary-color);color:white;padding:5px 10px;border:none;border-radius:5px;cursor:pointer;text-decoration:none;margin:5px}`;
|
|
9
9
|
|
|
@@ -156,9 +156,9 @@ const Ai12zChatMessage = class {
|
|
|
156
156
|
render() {
|
|
157
157
|
var _a, _b, _c, _d;
|
|
158
158
|
const lineClamp = (_b = (_a = this.kbSettings) === null || _a === void 0 ? void 0 : _a.numberOfLines) !== null && _b !== void 0 ? _b : 10;
|
|
159
|
-
return (index.h("div", { key: '
|
|
159
|
+
return (index.h("div", { key: '54f51ffb7c06bbb20fc1088c0fb63a8669d7ba45', class: "chat-message" }, index.h("div", { key: '281bc75361bcfadb4611eefeb9697d525b9e2d27', ref: (el) => this.messageRef = el, class: { 'message-text': true, "custom-line-clamp": !this.isExpanded && !this.isCollapsing && this.showButton }, style: {
|
|
160
160
|
"--line-clamp": `${lineClamp}`,
|
|
161
|
-
}, innerHTML: this.text, onClick: this.showButton ? this.toggleExpand : undefined }), !this.isExpanded && this.showButton && this.canExpand && index.h("div", { key: '
|
|
161
|
+
}, innerHTML: this.text, onClick: this.showButton ? this.toggleExpand : undefined }), !this.isExpanded && this.showButton && this.canExpand && index.h("div", { key: 'd6e262dbca0934b97fafb3dd7723b3b9333d8e10', class: "fade-overlay" }), this.showButton && this.canExpand && index.h("button", { key: 'e1e711b71656763ecdeb1cb6f73166528f023914', class: "show-more-btn", onClick: this.toggleExpand }, this.isExpanded ? (((_c = this.kbSettings) === null || _c === void 0 ? void 0 : _c.showLessButtonLabel) || "Show less") : (((_d = this.kbSettings) === null || _d === void 0 ? void 0 : _d.showMoreButtonLabel) || "Show more"), this.isExpanded ? index.h("svg", { width: "1em", height: "1em", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round" }, index.h("polyline", { points: "6 9 12 15 18 9" })) : index.h("svg", { width: "1em", height: "1em", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round" }, index.h("polyline", { points: "18 15 12 9 6 15" })))));
|
|
162
162
|
}
|
|
163
163
|
get el() { return index.getElement(this); }
|
|
164
164
|
static get watchers() { return {
|
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
var index = require('./index-v8T1EJAJ.js');
|
|
4
|
-
var processCarouselData = require('./processCarouselData-
|
|
5
|
-
var parseHelper = require('./parseHelper-
|
|
6
|
-
var utils = require('./utils-
|
|
7
|
-
var ctaHelpers = require('./ctaHelpers-
|
|
8
|
-
var index$1 = require('./index-
|
|
9
|
-
var socketService = require('./socket-service-
|
|
10
|
-
var surveyHelpers = require('./surveyHelpers-
|
|
11
|
-
var keyboardShortcuts = require('./keyboard-shortcuts-
|
|
4
|
+
var processCarouselData = require('./processCarouselData-BXglENd8.js');
|
|
5
|
+
var parseHelper = require('./parseHelper-BuoIRCbd.js');
|
|
6
|
+
var utils = require('./utils-DZMolZh2.js');
|
|
7
|
+
var ctaHelpers = require('./ctaHelpers-CdztrD6A.js');
|
|
8
|
+
var index$1 = require('./index-B6xfVjPU.js');
|
|
9
|
+
var socketService = require('./socket-service-j9VBg1pS.js');
|
|
10
|
+
var surveyHelpers = require('./surveyHelpers-B9t5lxy4.js');
|
|
11
|
+
var keyboardShortcuts = require('./keyboard-shortcuts-CBUd9KfQ.js');
|
|
12
12
|
var analyticsService = require('./analyticsService-CkAva47S.js');
|
|
13
13
|
var botHelpers = require('./botHelpers-D5Dj7TRA.js');
|
|
14
|
-
var beacon = require('./beacon-
|
|
14
|
+
var beacon = require('./beacon-DwOvY6Ne.js');
|
|
15
15
|
require('./_commonjsHelpers-MBWFX2dn.js');
|
|
16
16
|
require('./logger-2ZBZCKdM.js');
|
|
17
17
|
require('./response-adapter-CKKyyhMj.js');
|
|
@@ -400,6 +400,9 @@ const MyChat = class {
|
|
|
400
400
|
}
|
|
401
401
|
this.scrollToLatestBubble();
|
|
402
402
|
this.isProcessingEndResponse = true;
|
|
403
|
+
if (this.chats.length === 2 && !this.settings.disableBeacon) {
|
|
404
|
+
beacon.setConversationId(this.apiKey, this.env, event.detail.conversationId);
|
|
405
|
+
}
|
|
403
406
|
// const idx = this.chats.findIndex(item => item.id === this.aiMessageId)
|
|
404
407
|
requestAnimationFrame(async () => {
|
|
405
408
|
var _a, _b, _c, _d;
|
|
@@ -455,9 +458,6 @@ const MyChat = class {
|
|
|
455
458
|
});
|
|
456
459
|
// ✅ Common cleanup
|
|
457
460
|
this.conversationId = event.detail.conversationId;
|
|
458
|
-
if (this.chats.length === 2) {
|
|
459
|
-
beacon.setConversationId(this.apiKey, this.env, this.conversationId);
|
|
460
|
-
}
|
|
461
461
|
ctaHelpers.saveConversation(this.getProjectId(), this.chats, this.conversationId, (_d = (_c = (_b = this.settings) === null || _b === void 0 ? void 0 : _b._id) === null || _c === void 0 ? void 0 : _c.$oid) !== null && _d !== void 0 ? _d : "", "ai12z-cta-history", "search");
|
|
462
462
|
this.aiMessageId = "";
|
|
463
463
|
}
|
|
@@ -1142,7 +1142,7 @@ const MyChat = class {
|
|
|
1142
1142
|
render() {
|
|
1143
1143
|
var _a;
|
|
1144
1144
|
const email = "";
|
|
1145
|
-
return (index.h("div", { key: '
|
|
1145
|
+
return (index.h("div", { key: '19726973405085efbdf60798ceae80d8b0c8d1d9' }, index.h("ul", { key: '75a7be393d0b66ed126bbb945b6161de9426e3fb', id: "main-content", tabindex: "-1", class: {
|
|
1146
1146
|
"chat-list": true,
|
|
1147
1147
|
"custom-list": this.componentType === "search",
|
|
1148
1148
|
// "custom-chat-top-height": this.componentType === "search",
|
|
@@ -1209,7 +1209,7 @@ const MyChat = class {
|
|
|
1209
1209
|
projectId: this.getProjectId(),
|
|
1210
1210
|
questionText: analyticsService.getQuestionText(this.chats, chat.insightId) || "",
|
|
1211
1211
|
}), class: "chat-thumbs-up", "aria-label": "Thumbs Down", tabindex: "0" }, index.h("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 24 24", "stroke-width": "1.5", stroke: "currentColor", class: "w-6 h-6" }, index.h("path", { "stroke-linecap": "round", "stroke-linejoin": "round", d: "M7.498 15.25H4.372c-1.026 0-1.945-.694-2.054-1.715a12.137 12.137 0 0 1-.068-1.285c0-2.848.992-5.464 2.649-7.521C5.287 4.247 5.886 4 6.504 4h4.016a4.5 4.5 0 0 1 1.423.23l3.114 1.04a4.5 4.5 0 0 0 1.423.23h1.294M7.498 15.25c.618 0 .991.724.725 1.282A7.471 7.471 0 0 0 7.5 19.75 2.25 2.25 0 0 0 9.75 22a.75.75 0 0 0 .75-.75v-.633c0-.573.11-1.14.322-1.672.304-.76.93-1.33 1.653-1.715a9.04 9.04 0 0 0 2.86-2.4c.498-.634 1.226-1.08 2.032-1.08h.384m-10.253 1.5H9.7m8.075-9.75c.01.05.027.1.05.148.593 1.2.925 2.55.925 3.977 0 1.487-.36 2.89-.999 4.125m.023-8.25c-.076-.365.183-.75.575-.75h.908c.889 0 1.713.518 1.972 1.368.339 1.11.521 2.287.521 3.507 0 1.553-.295 3.036-.831 4.398-.306.774-1.086 1.227-1.918 1.227h-1.053c-.472 0-.745-.556-.5-.96a8.95 8.95 0 0 0 .303-.54" }))), index.h("button", { class: "copy-btn", tabindex: "0", "aria-label": "Send Email" }, index.h("a", { href: `mailto:${email}?subject=${encodeURIComponent((_e = this.chats[idx - 1]) === null || _e === void 0 ? void 0 : _e.message)}&body=${encodeURIComponent(this.removeHtmlTags(chat.clipboard))}`, target: "_blank", "aria-label": "Send Email" }, index.h("svg", { viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg", stroke: "currentColor", "stroke-width": "0.3", class: "w-6 h-6" }, index.h("path", { "fill-rule": "evenodd", "clip-rule": "evenodd", d: "M3.75 5.25L3 6V18L3.75 18.75H20.25L21 18V6L20.25 5.25H3.75ZM4.5 7.6955V17.25H19.5V7.69525L11.9999 14.5136L4.5 7.6955ZM18.3099 6.75H5.68986L11.9999 12.4864L18.3099 6.75Z", fill: "currentColor" }), " "))))))));
|
|
1212
|
-
}), index.h("div", { key: '
|
|
1212
|
+
}), index.h("div", { key: 'f4204e65c85c358653d91d74ce47c77f03382d12', class: "scroll-bottom" }))));
|
|
1213
1213
|
}
|
|
1214
1214
|
get element() { return index.getElement(this); }
|
|
1215
1215
|
static get watchers() { return {
|
|
@@ -1567,21 +1567,21 @@ const InputForm = class {
|
|
|
1567
1567
|
// this.icon_width = url.searchParams.get("w") || "28"
|
|
1568
1568
|
// this.icon_height = url.searchParams.get("h") || "28"
|
|
1569
1569
|
// }
|
|
1570
|
-
return (index.h("div", { key: '
|
|
1570
|
+
return (index.h("div", { key: '7c42e9070f1c5d7cc138693c1ddcb587684a6c70' }, index.h("form", { key: 'dc2169e6d3f3a7c44eed880d29a69d3616c64280', class: "w-full flex flex-col gap-1.5 sticky", onSubmit: this.handleFormSubmit }, index.h("div", { key: 'b8ba078963ce77b650e2d3f1f8ccfbdd397ee8b7', class: `flex-1 flex flex-col relative w-full rounded-3xl px-1 ${this.componentType === "inline" ? "inline-searchbar-bgcolor" : "searchbar-bgcolor"}`, dir: "LTR", ref: el => (this.searchFormElem = el) }, index.h("div", { key: '79b20c40c94bc652ddd6f5f372fa97a2f3646d1a', class: "flex items-center" }, index.h("div", { key: '48f6dc8ead7b4297d18725d5fc13525eeebb4b08', class: "ml-1 self-center flex space-x-1" }, !this.hideAllButtons && (index.h("div", { key: '4f44318b1fe3b4a9a360d51721e1ebaf80f8817f', class: "ai12z-plus-anchor relative inline-block", style: { width: "5%" } }, index.h("button", { key: '226ab1dde47a5cd76cb515caad6653a626d9f4eb', class: "plus-icon", "aria-label": "Options", title: "Add images or capture screen", tabindex: "0", "aria-haspopup": "menu", "aria-expanded": this.isOpen ? "true" : "false", "aria-controls": `ai12z-options-menu-${this.instanceId}`, ref: el => (this.plusButtonElem = el), onKeyDown: this.handleTriggerKeyDown, onClick: e => {
|
|
1571
1571
|
e.stopPropagation();
|
|
1572
1572
|
this.toggleBox(e);
|
|
1573
|
-
} }, index.h("svg", { key: '
|
|
1573
|
+
} }, index.h("svg", { key: '58a5e1a2fa3419e101b0fb73065145af4fe2f283', xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 20 20", fill: "currentColor", width: "20", height: "20" }, index.h("path", { key: '84444d3d1f7436456d2d0004ee1f2ec6371fca08', d: "M10.75 4.75a.75.75 0 0 0-1.5 0v4.5h-4.5a.75.75 0 0 0 0 1.5h4.5v4.5a.75.75 0 0 0 1.5 0v-4.5h4.5a.75.75 0 0 0 0-1.5h-4.5v-4.5Z" }))), index.h("div", { key: '382ce6992a13ba4e9db4a854044863702dab4c7f', class: "ai12z-plus-menu", id: `ai12z-options-menu-${this.instanceId}`, "data-open": this.isOpen ? "true" : "false", role: "menu", "aria-orientation": "vertical", "aria-label": "Input options", onKeyDown: this.handleMenuKeyDown, ref: el => (this.menuElem = el) }, index.h("ul", { key: 'ca290a730cb52512440929d5115c80a8c2f8e403', class: "ai12z-menu-list" }, this.isImageUpload && (index.h("li", { key: 'fe7ba6eb4663da261cc50bbdb8fdaf9f78284548', role: "none", class: "ai12z-menu-item--uploader" }, index.h("image-uploader", { key: '8552b458871e39417131a20aac81df027560c992', maxImages: 10, images: this.imagesBase64List, targetElement: this.searchInputElem, onImagesChange: this.handleImageChange, onError: this.handleImageError, ref: el => (this.imageUploaderRef = el) }))), index.h("li", { key: '566f3aa616e36b58fd8bcb515222bc79811b1ad9', role: "none" }, index.h("button", { key: '66662889c49e4261caf3d0f25bed7b7d711b8484', type: "button", role: "menuitem", tabindex: -1, class: "ai12z-menu-item", "aria-label": "Capture screen", onClick: () => {
|
|
1574
1574
|
this.captureScreen();
|
|
1575
1575
|
this.closeMenu(true);
|
|
1576
|
-
} }, index.h("span", { key: '
|
|
1576
|
+
} }, index.h("span", { key: 'e52ccaaea1c2a073b5a8c8001078c7f6ad54e1da', class: "ai12z-menu-item__icon" }, index.h("svg", { key: 'e20629230e327c40eb099f93445bdc33ceb744de', xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", fill: "currentColor", width: "20", height: "20" }, index.h("path", { key: '82b207ca09ca982100faba929365544930592c3b', d: "M12 9a3.75 3.75 0 1 0 0 7.5A3.75 3.75 0 0 0 12 9Z" }), index.h("path", { key: '9de2f9701c7e2f2519bd9874d05c1756abf08b35', "fill-rule": "evenodd", d: "M9.344 3.071a49.52 49.52 0 0 1 5.312 0c.967.052 1.83.585 2.332 1.39l.821 1.317c.24.383.645.643 1.11.71.386.054.77.113 1.152.177 1.432.239 2.429 1.493 2.429 2.909V18a3 3 0 0 1-3 3h-15a3 3 0 0 1-3-3V9.574c0-1.416.997-2.67 2.429-2.909.382-.064.766-.123 1.151-.178a1.56 1.56 0 0 0 1.11-.71l.822-1.315a2.942 2.942 0 0 1 2.332-1.39ZM6.75 12.75a5.25 5.25 0 1 1 10.5 0 5.25 5.25 0 0 1-10.5 0Zm12-1.5a.75.75 0 1 0 0-1.5.75.75 0 0 0 0 1.5Z", "clip-rule": "evenodd" }))), index.h("span", { key: '1107d24b22754416215ebf0487d4d5531744ad7b', class: "ai12z-menu-item__label" }, "Capture"))), index.h("li", { key: '941057003ca2b61f602076a2fcfcca852c594b22', role: "none" }, index.h("button", { key: '2d953a40091bc1163c239730acb3e56e7d761947', type: "button", role: "menuitem", tabindex: -1, class: "ai12z-menu-item", "aria-label": "Start Over", "aria-disabled": this.chatLength === 0 ? "true" : "false", onClick: e => {
|
|
1577
1577
|
if (this.chatLength === 0)
|
|
1578
1578
|
return;
|
|
1579
1579
|
this.handleFollowUp(e);
|
|
1580
1580
|
this.closeMenu(true);
|
|
1581
|
-
} }, index.h("span", { key: '
|
|
1581
|
+
} }, index.h("span", { key: '89bf46b6102b75ac998f8592dd081b3d7ac80e30', class: "ai12z-menu-item__icon" }, index.h("svg", { key: '9a4624eafe2563d792232a7040f799a4c90f0743', width: "20", height: "20", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round" }, index.h("path", { key: '857d6181fc1252bcaff8986348766903f7145db8', d: "M21.5 2v6h-6M2.5 22v-6h6M2 11.5a10 10 0 0 1 18.8-4.3M22 12.5a10 10 0 0 1-18.8 4.2" }))), index.h("span", { key: '4342314590af5c52dee8dd8cc9c37da5f890bc2c', class: "ai12z-menu-item__label" }, "Start Over"))), index.h("li", { key: 'ff2793104059d88ea8ccd580794b9bfee25cffbc', role: "none" }, index.h("button", { key: '1ae65047698825425967ae6217ae96ae8ce0af01', type: "button", role: "menuitem", tabindex: -1, class: "ai12z-menu-item", "aria-label": "View Recent Chat", onClick: e => {
|
|
1582
1582
|
this.handleRecentChat(e);
|
|
1583
1583
|
this.closeMenu(true);
|
|
1584
|
-
} }, index.h("span", { key: '
|
|
1584
|
+
} }, index.h("span", { key: '7ddc54280e621560399fbce8fb9b827c8fb42abb', class: "ai12z-menu-item__icon" }, index.h("svg", { key: '9d1876b8331a59e4b49fb96dd5cf263d8c2e1cad', xmlns: "http://www.w3.org/2000/svg", width: "20", height: "20", fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round" }, index.h("path", { key: '185bb67ad4cdf45749d2eff12a059b980a1a8052', d: "M21 15a4 4 0 0 1-4 4H7l-4 4V7a4 4 0 0 1 4-4h10a4 4 0 0 1 4 4z" }), index.h("path", { key: 'd22013e8057604e4d73c253c34408e3576430e58', d: "M12 7v5l3 2" }))), index.h("span", { key: 'e2453013820e91872f19efd4f840796366d46c77', class: "ai12z-menu-item__label" }, "View Recent Chat")))))))), !this.hideAllButtons && (index.h("div", { key: 'befa212132aa56e7c83aee675c62a8e26e65036c', class: "scrollbar-hidden text-left bg-transparent dark:text-gray-100 outline-none w-full rounded-xl resize-none h-fit max-h-80 overflow-auto" }, index.h("div", { key: '1ba4a975f882d789d913a43a175808d8d39d38d1', class: "relative w-full min-w-full h-full min-h-fit flex items-center input-prose" }, index.h("div", { key: '936c01b9fc7e998800517cd8c84203888be85e90', id: `previewContainer-${this.instanceId}`, draggable: true }), index.h("label", { key: 'f724dc8a7ecedfb3b0744b9640298805edf03e82', htmlFor: `searchInput-${this.instanceId}`, class: "sr-only" }, "Your message"), index.h("textarea", { key: '7e29fb0e770efe7f2d1522b9132c5198c4f14fa1', readOnly: this.submitted, "aria-describedby": this.emptyMessageError ? `message-error-${this.instanceId} search-hint-${this.instanceId}` : `search-hint-${this.instanceId}`, "aria-invalid": this.emptyMessageError, id: `searchInput-${this.instanceId}`, ref: el => {
|
|
1585
1585
|
this.searchInputElem = el;
|
|
1586
1586
|
// Autofocus once on first mount, and never while the
|
|
1587
1587
|
// options menu is open — otherwise unrelated re-renders
|
|
@@ -1593,7 +1593,7 @@ const InputForm = class {
|
|
|
1593
1593
|
}
|
|
1594
1594
|
}, placeholder: this.placeholder, autoComplete: "off", class: "w-full p-1 custom-input", value: this.searchInput, rows: 1, onInput: utils.debounce(e => this.handleInputChange(e), 500), onKeyUp: this.adjustHeight, onKeyDown: this.handleKeyDown, onFocus: () => this.searchFormElem.classList.add("input-focus-color"), onBlur: () => this.searchFormElem.classList.remove("input-focus-color"), onPaste: e => {
|
|
1595
1595
|
this.handlePaste(e);
|
|
1596
|
-
} }), index.h("div", { key: '
|
|
1596
|
+
} }), index.h("div", { key: 'afc7aaa56b3522d9c8669f00ff4825f063b5383e', role: "status", "aria-live": "polite", "aria-atomic": "true", class: "sr-only" }, this.announceMessage), index.h("span", { key: 'f75e54c74c0c4ec11a623d039e561b0f5d884260', id: `search-hint-${this.instanceId}`, class: "sr-only" }, "Press Enter to send, Shift+Enter for new line")))), index.h("div", { key: 'b2c706fd8ec405d7b2e2627638ba13a8c00ddb2a', class: "p-1 self-end flex space-x-1 flex-row", style: { width: this.hideAllButtons ? "100%" : "auto" } }, index.h("div", { key: 'a32b1ffc262aa2682e7a661ffb1d33bf75cbea57', "aria-label": "Record voice", class: "flex self-center", style: { width: this.hideAllButtons ? "100%" : "auto" } }, this.isEnableMic && (index.h("audio-recorder", { key: '15b4fa7e527dc01d3b5ee4c5578dd8f535fec6c8', "component-type": "cta", onStartRecord: _ev => {
|
|
1597
1597
|
// console.log("test", ev)
|
|
1598
1598
|
this.hideAllButtons = true;
|
|
1599
1599
|
}, onStopRecord: _ev => {
|
|
@@ -1611,14 +1611,14 @@ const InputForm = class {
|
|
|
1611
1611
|
});
|
|
1612
1612
|
}
|
|
1613
1613
|
}, 1000);
|
|
1614
|
-
}, style: { width: "100%" } }))), " ", !this.hideAllButtons && (index.h("div", { key: '
|
|
1614
|
+
}, style: { width: "100%" } }))), " ", !this.hideAllButtons && (index.h("div", { key: '818c0dc10014f80b7606a73789ca067ec4860ae5', class: "flex items-center" }, index.h("div", { key: '4e9f59fc6c4c7d424ddb46563b447a241a1b998d', "aria-label": "Send message", class: "flex" }, index.h("button", { key: 'a19da51b9119cda37555c66420ba79f73843f832', id: `send-message-button-${this.instanceId}`, class: "btn-bg-color text-white transition rounded-full p-1.5 self-center",
|
|
1615
1615
|
// type="submit"
|
|
1616
|
-
disabled: this.submitted, onClick: this.handleAskAI, tabindex: "0", "aria-label": "Send Message", title: "Send Message" }, index.h("svg", { key: '
|
|
1616
|
+
disabled: this.submitted, onClick: this.handleAskAI, tabindex: "0", "aria-label": "Send Message", title: "Send Message" }, index.h("svg", { key: '69e383d261ffb92f93aed72be1daad0f8573db23', xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 16 16", fill: "currentColor", class: "size-6" }, index.h("path", { key: '6c3eb5a3055dfe9a3056f23e5d408150b63b30ed', "fill-rule": "evenodd", d: "M8 14a.75.75 0 0 1-.75-.75V4.56L4.03 7.78a.75.75 0 0 1-1.06-1.06l4.5-4.5a.75.75 0 0 1 1.06 0l4.5 4.5a.75.75 0 0 1-1.06 1.06L8.75 4.56v8.69A.75.75 0 0 1 8 14Z", "clip-rule": "evenodd" })))))))), this.imagesBase64List.length > 0 && (index.h("div", { key: 'a6e55fc7c0eeae9a3350e84e3bd7fcc3eea5e06e', class: "flex flex-wrap gap-2 mx-1 mt-2.5 mb-1" }, this.imagesBase64List.map((img, idx) => (index.h("div", { class: "image-Container sc-ai12z-input-form", key: idx }, index.h("img", { src: img, style: { width: "70px", height: "50px", borderRadius: "12px" } }), index.h("span", { class: "delete-image sc-ai12z-input-form cursor-pointer ml-1", onClick: () => {
|
|
1617
1617
|
this.imagesBase64List = this.imagesBase64List.filter((_, i) => i !== idx);
|
|
1618
1618
|
if (this.imageUploaderRef && typeof this.imageUploaderRef.removeImageAtIndex === "function") {
|
|
1619
1619
|
this.imageUploaderRef.removeImageAtIndex(idx);
|
|
1620
1620
|
}
|
|
1621
|
-
} }, "\u00D7"))))))), this.showErrorMessage && (index.h("div", { key: '
|
|
1621
|
+
} }, "\u00D7"))))))), this.showErrorMessage && (index.h("div", { key: '703e617f0e374c0c9d83c3d744b258b43f49c540', class: "flex" }, " ", index.h("p", { key: '5224231ef0d8bcaf4f39b6a3ac100c6b4a0959f2', class: "error-msg", innerHTML: this.errorMessage }))), this.emptyMessageError && (index.h("div", { key: '3d933dbf56bde332066f40a838b2903314e73c52', class: "flex" }, index.h("p", { key: '98423eb51cbc01287e2ed3104b1eb3951c388a8f', id: `message-error-${this.instanceId}`, class: "error-msg", role: "alert" }, "Message cannot be empty. Please enter a message to send."))), this.chatLength === 0 && (index.h("div", { key: '3eaca3f631eb04755fa9e6623a7c5814878f1254', class: "enter-tip", role: "tooltip" }, "Tip: Press Enter to send, Shift+Enter for new line", " ", index.h("button", { key: 'cfdc4b2eb43641a781585e3e999ac54302da0d44', onClick: () => (this.showShortcutsDialog = true), class: "keyboard-shortcuts-btn", "aria-label": "Show keyboard shortcuts", title: "Keyboard shortcuts (?)", tabindex: "0" }, index.h("svg", { key: 'fa85440cb0fcdd8ca01e6ceccb06af38ffad8fd7', width: "13", height: "13", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round" }, index.h("circle", { key: '847f62af182e0f12ded557395ea99f132314f4d3', cx: "12", cy: "12", r: "10" }), index.h("path", { key: '275bd98694c58a21f2e481a9128a3c6c1b9de7cd', d: "M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3" }), index.h("line", { key: '6bac5d6dd7180ca06b68c631cc22c52e6cba556a', x1: "12", y1: "17", x2: "12.01", y2: "17" })))))), this.showShortcutsDialog && (index.h("keyboard-shortcuts-dialog", { key: 'd3b4532e028a0e69c34681fc80c2c8b6afe219c5', show: this.showShortcutsDialog, shortcuts: this.shortcuts, onCloseDialog: () => (this.showShortcutsDialog = false) }))));
|
|
1622
1622
|
}
|
|
1623
1623
|
get el() { return index.getElement(this); }
|
|
1624
1624
|
};
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
var index = require('./index-v8T1EJAJ.js');
|
|
4
|
-
var utils = require('./utils-
|
|
5
|
-
var processCarouselData = require('./processCarouselData-
|
|
4
|
+
var utils = require('./utils-DZMolZh2.js');
|
|
5
|
+
var processCarouselData = require('./processCarouselData-BXglENd8.js');
|
|
6
6
|
var botHelpers = require('./botHelpers-D5Dj7TRA.js');
|
|
7
|
-
var index$1 = require('./index-
|
|
7
|
+
var index$1 = require('./index-B6xfVjPU.js');
|
|
8
8
|
require('./_commonjsHelpers-MBWFX2dn.js');
|
|
9
9
|
|
|
10
10
|
/*! @license DOMPurify 3.3.3 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.3.3/LICENSE */
|
|
@@ -1644,7 +1644,7 @@ const Ai12zContainer = class {
|
|
|
1644
1644
|
}
|
|
1645
1645
|
}
|
|
1646
1646
|
render() {
|
|
1647
|
-
return (index.h("div", { key: '
|
|
1647
|
+
return (index.h("div", { key: 'ec7c4261c505fb29882acf30d0c9c10a8703dc51', class: "ai12z-container-root" }, this.isLoading && index.h("div", { key: 'ab3899fe20a637293b1fa5c24b40edf9cc20f333', class: "state-message" }, "Loading..."), !this.isLoading && this.error && index.h("div", { key: 'd70e83ff89ab6df1b090e7034f021c71466796c6', class: "state-message error" }, this.error), !this.isLoading && !this.error && this.renderByType()));
|
|
1648
1648
|
}
|
|
1649
1649
|
get el() { return index.getElement(this); }
|
|
1650
1650
|
static get watchers() { return {
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
var index = require('./index-v8T1EJAJ.js');
|
|
4
|
-
var utils = require('./utils-
|
|
4
|
+
var utils = require('./utils-DZMolZh2.js');
|
|
5
5
|
var SearchResult = require('./SearchResult-CvTJr55G.js');
|
|
6
|
-
var socketService = require('./socket-service-
|
|
6
|
+
var socketService = require('./socket-service-j9VBg1pS.js');
|
|
7
7
|
var globalStore = require('./global-store-R6x06KvJ.js');
|
|
8
|
-
var reCaptchaHelpers = require('./reCaptchaHelpers-
|
|
9
|
-
var ctaHelpers = require('./ctaHelpers-
|
|
10
|
-
var beacon = require('./beacon-
|
|
8
|
+
var reCaptchaHelpers = require('./reCaptchaHelpers-DIDQT22p.js');
|
|
9
|
+
var ctaHelpers = require('./ctaHelpers-CdztrD6A.js');
|
|
10
|
+
var beacon = require('./beacon-DwOvY6Ne.js');
|
|
11
11
|
var appStore = require('./app-store-BtkiHvcw.js');
|
|
12
12
|
var bodyScrollLock = require('./bodyScrollLock-C7gKTAfx.js');
|
|
13
13
|
require('./response-adapter-CKKyyhMj.js');
|
|
@@ -344,10 +344,9 @@ const Ai12zCta = class {
|
|
|
344
344
|
appStore.setParentComponentState("cta", this.dataKey, this.dataMode);
|
|
345
345
|
await this.configCtaSettings();
|
|
346
346
|
// Initialize global beacon for session tracking
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
// this.socketService = SocketService.createInstance(this.dataMode)
|
|
347
|
+
if (!this.ctaSettings.disableBeacon) {
|
|
348
|
+
beacon.initBeacon(this.dataKey, this.dataMode);
|
|
349
|
+
}
|
|
351
350
|
const slot = this.el["children"];
|
|
352
351
|
let slotHasContent = slot && slot.length > 0;
|
|
353
352
|
this.detectTextByLang();
|