ai12z 3.16.2 → 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 +50 -41
- 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 +21 -21
- 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-Bhd49ADQ.js → beacon-DwOvY6Ne.js} +26 -36
- 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 +41 -32
- 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 +3 -3
- 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 +25 -35
- 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-fVj5IyS0.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-C92f-4Xe.js +1 -0
- 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 +50 -41
- 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 +21 -21
- 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-BLOfGU2-.js → beacon-DOd-Eyt3.js} +26 -36
- 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-516bf868.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/package.json +2 -2
- package/readme.md +0 -2
- package/dist/components/p-7D8UwFfY.js +0 -1
- package/dist/components/p-B_GRAsXZ.js +0 -1
- package/dist/components/p-CAK1__lu.js +0 -2
- package/dist/components/p-CMc63lZp.js +0 -1
- package/dist/components/p-CO7OM6cu.js +0 -1
- package/dist/components/p-CYh3so8v.js +0 -1
- package/dist/components/p-CnIXGAt8.js +0 -1
- package/dist/components/p-DBojmc3T.js +0 -1
- package/dist/components/p-DKF8ThBg.js +0 -1
- package/dist/components/p-DxKyMupy.js +0 -1
- package/dist/components/p-HTPyCRCK.js +0 -1
- package/dist/components/p-kJpnWRAF.js +0 -1
- package/dist/library/p-03851cc8.entry.js +0 -1
- package/dist/library/p-65d17a5b.entry.js +0 -1
- package/dist/library/p-CTRVp5uQ.js +0 -1
- package/dist/library/p-b01d3dff.entry.js +0 -1
- package/dist/library/p-d45bc8fa.entry.js +0 -1
- package/dist/library/p-d4e410ff.entry.js +0 -1
- package/dist/library/p-f1b93099.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,9 +1,9 @@
|
|
|
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
|
require('./response-adapter-CKKyyhMj.js');
|
|
8
8
|
|
|
9
9
|
const ai12zInlineSearchCss = () => `:host{font-family:var(--ai12z-font-family) !important;font-size:var(--ai12z-font-size) !important;color:var(--ai12z-font-color, black);text-align:var(--ai12z-text-align, left)}`;
|
|
@@ -123,17 +123,17 @@ const Ai12zInlineSearch = class {
|
|
|
123
123
|
}
|
|
124
124
|
}
|
|
125
125
|
render() {
|
|
126
|
-
return (index.h("div", { key: '
|
|
126
|
+
return (index.h("div", { key: 'f4f570048ee779ed505852de68f5cb0f1959c403', style: { width: "100%" }, class: "container flex flex-col" }, this.resultPosition === "above" && (index.h("div", { key: '2eacaee05ab1acb5fba62593dcee301e95a0e25b', class: "relative custom-results" }, !this.isChat && !this.categorize && this.isOpen && index.h(SearchResult.SearchResult, { key: '0ee0992994f4945d5f7806af05e69aa4d255971b', results: this.searchResults }), !this.isChat && this.categorize && this.isOpen && index.h("ai12z-category", { key: 'c8e7dd32b3b217f17804f24e6575dee90a388a4b', categoryList: this.searchResults, linkTarget: "_blank" }))), this.resultPosition === "above" && (index.h("div", { key: '383d1ba11773470e2f2a0036c17c70e80907bd0d' }, this.isChat && (index.h("ai12z-chat", { key: 'c3a04e63dd26e2ef929569dc7982ace4af480cf7',
|
|
127
127
|
// socket={this.socket}
|
|
128
128
|
chats: this.conversationHistory, env: this.dataMode, query: this.formData.search, apiKey: this.dataKey, aiMessageId: this.aiMessageId, imgFiles: this.imgFiles, target: "_blank", voiceType: "default", voice: "Google US English", onFeedback: async (event) => {
|
|
129
129
|
const { feedback, insightId } = event.detail;
|
|
130
130
|
// console.log(feedback, insightId)
|
|
131
131
|
utils.sendFeedback(this.dataKey, this.dataMode, insightId, feedback);
|
|
132
|
-
}, componentType: "inline", chatPosition: this.resultPosition, socketIn: this.socketService, settings: this.settings })))), index.h("div", { key: '
|
|
132
|
+
}, componentType: "inline", chatPosition: this.resultPosition, socketIn: this.socketService, settings: this.settings })))), index.h("div", { key: '75317fbabfa1d145d3ae8686a4736bd7393c59d4', class: "search-bar" }, index.h("ai12z-input-form", { key: '7cf013d0e06963d601143ab733bbd1a45851b431', onAction: async (event) => {
|
|
133
133
|
const { value, type, followUp, imgFiles } = event.detail;
|
|
134
134
|
// console.log(value, type, followUp, imgFiles)
|
|
135
135
|
await this.handleSubmit(event, value, type, followUp, imgFiles);
|
|
136
|
-
}, isChat: this.isChat, placeholder: "AI search", buttonText: "Ask AI", iconSrc: "", followUpLabel: "Do you have a follow up question?", isImageUpload: true, isEnableMic: true, componentType: "inline" })), this.resultPosition === "below" && (index.h("div", { key: '
|
|
136
|
+
}, isChat: this.isChat, placeholder: "AI search", buttonText: "Ask AI", iconSrc: "", followUpLabel: "Do you have a follow up question?", isImageUpload: true, isEnableMic: true, componentType: "inline" })), this.resultPosition === "below" && (index.h("div", { key: '145bf7081f88e1ccb89fdb278dcac8784edbeb1b', class: "relative custom-results" }, !this.isChat && !this.categorize && this.isOpen && index.h(SearchResult.SearchResult, { key: '210cefd54f2a02cd852c9a0316a1bcf3fff2bf9f', results: this.searchResults }), !this.isChat && this.categorize && this.isOpen && index.h("ai12z-category", { key: '0492f9873a383281b44a0b0dc8ff380f3b478fc9', categoryList: this.searchResults, linkTarget: "_blank" }))), this.resultPosition === "below" && (index.h("div", { key: '7211ad794c25e12ed47226d5087699acfdf26dcf' }, this.isChat && (index.h("ai12z-chat", { key: 'b088ff88328e86a0f12dce65814fa21081fcda48',
|
|
137
137
|
// socket={this.socket}
|
|
138
138
|
chats: this.conversationHistory, env: this.dataMode, query: this.formData.search, apiKey: this.dataKey, aiMessageId: this.aiMessageId, imgFiles: this.imgFiles, target: "_blank", voiceType: "default", voice: "Google US English", onFeedback: async (event) => {
|
|
139
139
|
const { feedback, insightId } = event.detail;
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
var index = require('./index-v8T1EJAJ.js');
|
|
4
|
-
var utils = require('./utils-
|
|
5
|
-
var styleSheetRegistry = require('./styleSheetRegistry-
|
|
4
|
+
var utils = require('./utils-DZMolZh2.js');
|
|
5
|
+
var styleSheetRegistry = require('./styleSheetRegistry-kcL2qS1d.js');
|
|
6
6
|
var responseAdapter = require('./response-adapter-CKKyyhMj.js');
|
|
7
|
-
var processCarouselData = require('./processCarouselData-
|
|
7
|
+
var processCarouselData = require('./processCarouselData-BXglENd8.js');
|
|
8
8
|
var globalStore = require('./global-store-R6x06KvJ.js');
|
|
9
|
-
var index$1 = require('./index-
|
|
10
|
-
var surveyHelpers = require('./surveyHelpers-
|
|
9
|
+
var index$1 = require('./index-B6xfVjPU.js');
|
|
10
|
+
var surveyHelpers = require('./surveyHelpers-B9t5lxy4.js');
|
|
11
11
|
var botHelpers = require('./botHelpers-D5Dj7TRA.js');
|
|
12
12
|
var analyticsService = require('./analyticsService-CkAva47S.js');
|
|
13
|
-
var beacon = require('./beacon-
|
|
13
|
+
var beacon = require('./beacon-DwOvY6Ne.js');
|
|
14
14
|
require('./_commonjsHelpers-MBWFX2dn.js');
|
|
15
15
|
|
|
16
16
|
const ai12zKnowledgeBoxCss = () => `:host{font-family:var(--ai12z-knowledge-box-font-family) !important;font-size:var(--ai12z-knowledge-box-font-size) !important;color:var(--ai12z-knowledge-box-font-color, black);text-align:var(--ai12z-knowledge-box-text-align, left)}.ai12z-kb-wrapper{background-color:var(--ai12z-knowledge-box-bg-color)}.ai12z-suggest-container{padding:32px 32px 32px 32px;flex:none}.ai12z-suggest-answer{font-size:var(--ai12z-knowledge-box-font-size)}.ai12z-suggest-title{font-weight:700}.ai12z-suggest-align{float:left}.ai12z-suggest-relevance{text-align:end}.ai12z-suggest-error-msg{color:rgb(239 68 68)}.ai12z-suggest-hide{display:none}.ai12z-suggest-thumbs{margin-left:90%}.ai12z-suggest-thumbs-up{fill:var(--ai12z-feedback-selected);width:24px}.ai12z-suggest-thumbs-down{fill:var(--ai12z-feedback-selected);width:24px}.not-allowed{cursor:not-allowed}.ai12zBtn{background-color:var(--ai12z-knowledge-box-button-bgcolor);color:var(--ai12z-knowledge-box-button-color) !important;padding:5px 10px;border:none;border-radius:5px;cursor:pointer;text-decoration:none !important;margin:5px}.custom-privacy{color:var(--ai12z-knowledge-box-privacy-color);text-align:center;font-size:var(--ai12z-knowledge-box-privacy-font-size);margin-top:10px}button:focus-visible{outline:2px solid var(--ai12z-knowledge-box-focus-visible-color, #0A2A43);outline-offset:2px}button.kb-btn-primary:focus-visible{outline:2px solid var(--ai12z-knowledge-box-focus-visible-color-primary, --ai12z-knowledge-box-focus-visible-color);outline-offset:2px}button.kb-btn-secondary:focus-visible{outline:2px solid var(--ai12z-knowledge-box-focus-visible-color-secondary, --ai12z-knowledge-box-focus-visible-color)}.diamond-icon{color:var(--ai12z-knowledge-box-icon-color, #a5e6e6);width:28px;height:28px;transform-origin:center;}.diamond-icon.loading{animation:rotate 2s linear infinite}@keyframes rotate{from{transform:rotate(0deg)}to{transform:rotate(360deg)}}`;
|
|
@@ -365,7 +365,7 @@ const Ai12zKnowledgeBox = class {
|
|
|
365
365
|
this.handleMessage(messageData, `${this.domId}`); // Use the unique ID to handle messages
|
|
366
366
|
});
|
|
367
367
|
this.socket.on(endEvent, async (rawData) => {
|
|
368
|
-
var _a, _b;
|
|
368
|
+
var _a, _b, _c;
|
|
369
369
|
const data = protocol === "v2" ? responseAdapter.adaptCompleteToLegacy(rawData) : rawData;
|
|
370
370
|
this.isStreaming = false;
|
|
371
371
|
this.messageReceived.emit({ data, domId: this.domId });
|
|
@@ -379,7 +379,7 @@ const Ai12zKnowledgeBox = class {
|
|
|
379
379
|
// Save conversation id from response for later use
|
|
380
380
|
this.questionId = (_b = (_a = data.conversationId) !== null && _a !== void 0 ? _a : data.conversation_id) !== null && _b !== void 0 ? _b : this.questionId;
|
|
381
381
|
// If this is the very first conversation, inform the beacon util
|
|
382
|
-
if (this.questionId) {
|
|
382
|
+
if (this.questionId && !((_c = this.kbSettings) === null || _c === void 0 ? void 0 : _c.disableBeacon)) {
|
|
383
383
|
// `setConversationId` is idempotent and will no-op if already stored
|
|
384
384
|
try {
|
|
385
385
|
// Call asynchronously, don't await to avoid blocking UI
|
|
@@ -413,12 +413,15 @@ const Ai12zKnowledgeBox = class {
|
|
|
413
413
|
}
|
|
414
414
|
}
|
|
415
415
|
async componentWillLoad() {
|
|
416
|
+
var _a;
|
|
416
417
|
styleSheetRegistry.adoptStyleSheet(`https://cdn.ai12z.net/assets/bot/${index.Env.CDN_PATH}/tailwind.min.css`, this.el.shadowRoot);
|
|
417
418
|
this.socketConnection();
|
|
418
419
|
await this.getConfig();
|
|
419
420
|
// initialize beacon asynchronously so slow/blocked beacon endpoints
|
|
420
421
|
// don't delay component rendering
|
|
421
|
-
|
|
422
|
+
if (!((_a = this.kbSettings) === null || _a === void 0 ? void 0 : _a.disableBeacon)) {
|
|
423
|
+
void beacon.initBeacon(this.dataKey, this.dataMode);
|
|
424
|
+
}
|
|
422
425
|
const w = window;
|
|
423
426
|
if (!w.ai12z)
|
|
424
427
|
w.ai12z = {};
|
|
@@ -612,7 +615,7 @@ const Ai12zKnowledgeBox = class {
|
|
|
612
615
|
}
|
|
613
616
|
render() {
|
|
614
617
|
var _a, _b;
|
|
615
|
-
return (index.h("div", { key: '
|
|
618
|
+
return (index.h("div", { key: 'ef3c6a89af78dcdf267ea1190764eca774d53040', class: "ai12z-kb-wrapper" }, this.error ? index.h("p", { class: "ai12z-suggest-error-msg" }, "Error please try again!") : null, this.items.map(item => {
|
|
616
619
|
var _a, _b, _c, _d;
|
|
617
620
|
return (index.h("div", { class: "prose max-w-none ai12z-suggest-container" }, index.h("div", null, index.h("div", null, index.h("div", { class: "flex flex-row gap-1" }, index.h("div", { class: "flex items-center gap-2 mb-3", style: { width: "90%" } }, ((_a = this.kbSettings) === null || _a === void 0 ? void 0 : _a.showTitle) && (index.h("svg", { width: "28", height: "28", viewBox: "0 0 48 48", fill: "currentColor", xmlns: "http://www.w3.org/2000/svg", class: "diamond-icon" + (this.isLoading && !this.finalResponse ? " loading" : "") }, index.h("path", { d: "M24 2c-3 8-8 13-16 16 8 3 13 8 16 16 3-8 8-13 16-16-8-3-13-8-16-16z" }))), ((_b = this.kbSettings) === null || _b === void 0 ? void 0 : _b.showTitle) && (index.h("h5", { class: "text-lg font-semibold text-gray-800 m-0" }, !this.finalResponse ? "Generating..." : (_c = this.kbSettings.title) !== null && _c !== void 0 ? _c : "AI Overview"))), item.thumbsUpDown && !this.isLoading && (index.h("div", null, index.h("button", { id: `thumbsUp_${item.insightId}`, onClick: () => {
|
|
618
621
|
var _a;
|
|
@@ -633,7 +636,7 @@ const Ai12zKnowledgeBox = class {
|
|
|
633
636
|
questionText: this.question,
|
|
634
637
|
});
|
|
635
638
|
}, class: "chat-thumbs-down", "aria-label": "Thumbs Down" }, 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" }))))))), !this.isLoading && (index.h("div", null, ((_d = this.searchResults) === null || _d === void 0 ? void 0 : _d.controlType) !== "form" && (index.h("ai12z-chat-message", { id: item.id, text: this.currentStreamingText, kbSettings: this.kbSettings, "show-button": this.showButton, streaming: this.isStreaming && item.id === this.domId })), index.h("div", { class: { "ai12z-suggest-relevance": true, "ai12z-suggest-hide": !item["isRelevance"] } }, index.h("a", { href: "" }, item === null || item === void 0 ? void 0 : item["relevanceScore"])), index.h("div", { class: "custom-privacy" }, index.h("slot", { name: "custom-privacy" })))), this.isLoading && (index.h("div", { class: "w-full rounded-md", id: "spinner" }, index.h("div", { class: "flex animate-pulse space-x-4" }, index.h("div", { class: "flex-1 space-y-3 py-1" }, index.h("div", { class: "h-4 rounded bg-gray-200" }), index.h("div", { class: "space-y-3" }, index.h("div", { class: "grid grid-cols-3 gap-4" }, index.h("div", { class: "col-span-2 h-4 rounded bg-gray-200" }), index.h("div", { class: "col-span-1 h-4 rounded bg-gray-200" })), index.h("div", { class: "h-4 rounded bg-gray-200" })))))))));
|
|
636
|
-
}), ((_a = this.kbSettings) === null || _a === void 0 ? void 0 : _a.questionType) === "staticHtml" && this.items.length === 0 && this.welcomeReady && (index.h("div", { key: '
|
|
639
|
+
}), ((_a = this.kbSettings) === null || _a === void 0 ? void 0 : _a.questionType) === "staticHtml" && this.items.length === 0 && this.welcomeReady && (index.h("div", { key: 'd790f01dda101287914b65666d6062c3732fe4a2', class: "ai12z-suggest-answer", innerHTML: (_b = this.kbSettings.welcome) === null || _b === void 0 ? void 0 : _b.message }))));
|
|
637
640
|
}
|
|
638
641
|
static get assetsDirs() { return ["assets"]; }
|
|
639
642
|
get el() { return index.getElement(this); }
|
|
@@ -1,7 +1,7 @@
|
|
|
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
6
|
|
|
7
7
|
const ai12zSearchPanelCss = () => `:host{display:block;width:100%;font-family:var(--ai12z-font-family);font-size:var(--ai12z-font-size)}.input-focus-color{border:1px solid var(--ai12z-search-panel-focus-color)}.search-btn-bg-color{background-color:var(--ai12z-search-panel-button-bgcolor)}.input-border{border-bottom:1px solid var(--ai12z-search-panel-input-border-color)}.search-container{background-color:var(--ai12z-search-panel-bg)}.search-icon svg{width:20px;height:20px;color:var(--ai12z-search-panel-icon-color);}.search-input::-moz-placeholder{color:#999}.search-input::placeholder{color:#999}.search-results{width:100%;text-align:left}.cta-search-results{border-top-width:1px;border-bottom-width:0px;border-color:rgb(243 244 246)}.cta-search-results-list{position:relative;padding-bottom:20px;padding-top:20px}.cta-search-results-list:hover{background-color:var(--ai12z-hover-bg-color)}.cta-search-container{margin-left:auto;margin-right:auto;display:flex;max-width:896px;justify-content:space-between;-moz-column-gap:24px;column-gap:24px}.cta-search-container-two{display:flex;min-width:0px;-moz-column-gap:16px;column-gap:16px}.cta-search-container-three{min-width:0px;flex:1 1 auto}.cta-search-text{font-weight:600;line-height:24px;font-size:var(--ai12z-search-result-title-font-size);color:var(--ai12z-search-result-title-color)}.cta-search-text-position{position:absolute;left:0px;right:0px;top:-1px;bottom:0px}.cta-search-description{margin-top:4px;display:flex;font-size:var(--ai12z-search-result-description-font-size);line-height:16px;line-height:20px;color:var(--ai12z-search-result-description-color)}.cta-search-list-arrow{display:flex;align-items:center;flex-shrink:0;-moz-column-gap:16px;column-gap:16px}.custom-icon-width{width:64px}.results-icon svg{width:24px;height:24px}`;
|
|
@@ -10,7 +10,7 @@ const Spinner = class {
|
|
|
10
10
|
this.class = "w-6 h-6";
|
|
11
11
|
}
|
|
12
12
|
render() {
|
|
13
|
-
return index.h("div", { key: '
|
|
13
|
+
return index.h("div", { key: 'c0d62eddd7319f5efeb10e215c1ab1b4f5e44fc7', class: "loader " + this.class });
|
|
14
14
|
}
|
|
15
15
|
};
|
|
16
16
|
Spinner.style = spinnerCss();
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var utils = require('./utils-
|
|
3
|
+
var utils = require('./utils-DZMolZh2.js');
|
|
4
4
|
|
|
5
5
|
const SUPPORTED_ENGINES = [
|
|
6
6
|
"chatgpt",
|
|
@@ -146,22 +146,6 @@ function getBeaconRequestSignature() {
|
|
|
146
146
|
search: url.search,
|
|
147
147
|
});
|
|
148
148
|
}
|
|
149
|
-
async function waitForPendingBeacon(timeoutMs = 10000) {
|
|
150
|
-
const start = Date.now();
|
|
151
|
-
// poll for beacon id or for pending status to change
|
|
152
|
-
while (Date.now() - start < timeoutMs) {
|
|
153
|
-
const beaconId = sessionStorage.getItem("ai12zBeaconId");
|
|
154
|
-
if (beaconId)
|
|
155
|
-
return beaconId;
|
|
156
|
-
const state = getBeaconRequestState();
|
|
157
|
-
// if there's no pending request any more, break and let caller proceed
|
|
158
|
-
if (state.status !== "pending")
|
|
159
|
-
break;
|
|
160
|
-
// sleep briefly
|
|
161
|
-
await new Promise(resolve => setTimeout(resolve, 200));
|
|
162
|
-
}
|
|
163
|
-
return sessionStorage.getItem("ai12zBeaconId");
|
|
164
|
-
}
|
|
165
149
|
// Hosts for which beacon creation and conversation setting should be disabled.
|
|
166
150
|
const excludedBeaconHosts = ["ai12z.net"];
|
|
167
151
|
const allowedBeaconHosts = ["docs.ai12z.net"];
|
|
@@ -256,6 +240,7 @@ function buildBeacon() {
|
|
|
256
240
|
}
|
|
257
241
|
async function ensureBeacon(apiKey, env, force = false) {
|
|
258
242
|
const existingBeaconId = sessionStorage.getItem("ai12zBeaconId");
|
|
243
|
+
const state = getBeaconRequestState();
|
|
259
244
|
// If host is excluded, do not create or return a beacon id
|
|
260
245
|
if (isHostExcluded()) {
|
|
261
246
|
return null;
|
|
@@ -270,30 +255,35 @@ async function ensureBeacon(apiKey, env, force = false) {
|
|
|
270
255
|
// If caller requested force and there's already an in-flight create
|
|
271
256
|
// request, wait briefly for it to complete so we can reuse its beacon id
|
|
272
257
|
if (force) {
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
return waitedBeaconId;
|
|
278
|
-
// if waiting didn't produce an id, fall through and attempt creation
|
|
258
|
+
if (state.inFlight && state.signature === getBeaconRequestSignature()) {
|
|
259
|
+
const id = await state.inFlight.catch(() => null);
|
|
260
|
+
if (id)
|
|
261
|
+
return id;
|
|
279
262
|
}
|
|
280
263
|
}
|
|
281
264
|
if (!shouldCreateBeacon()) {
|
|
282
265
|
return sessionStorage.getItem("ai12zBeaconId");
|
|
283
266
|
}
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
267
|
+
const promise = (async () => {
|
|
268
|
+
try {
|
|
269
|
+
const response = await utils.createBeacon(env, {
|
|
270
|
+
apiKey,
|
|
271
|
+
beacon: buildBeacon(),
|
|
272
|
+
});
|
|
273
|
+
sessionStorage.setItem("ai12zBeaconId", response.beaconId);
|
|
274
|
+
markBeaconCreateResult("sent");
|
|
275
|
+
return response.beaconId;
|
|
276
|
+
}
|
|
277
|
+
catch (e) {
|
|
278
|
+
markBeaconCreateResult(undefined);
|
|
279
|
+
throw e;
|
|
280
|
+
}
|
|
281
|
+
finally {
|
|
282
|
+
delete state.inFlight;
|
|
283
|
+
}
|
|
284
|
+
})();
|
|
285
|
+
state.inFlight = promise;
|
|
286
|
+
return promise;
|
|
297
287
|
}
|
|
298
288
|
async function initBeacon(apiKey, env) {
|
|
299
289
|
try {
|
|
@@ -1,7 +1,7 @@
|
|
|
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 analyticsService = require('./analyticsService-CkAva47S.js');
|
|
6
6
|
var logger$1 = require('./logger-2ZBZCKdM.js');
|
|
7
7
|
|
|
@@ -77,15 +77,15 @@ const HamburgerMenu = class {
|
|
|
77
77
|
}
|
|
78
78
|
render() {
|
|
79
79
|
var _a, _b;
|
|
80
|
-
return (index.h("div", { key: '
|
|
80
|
+
return (index.h("div", { key: 'fb76552fc3799bef70ebddc3833e99b9058f180d', id: "dropdown-menu", role: "menu", class: `flex flex-col gap-y-1 grow-wrap absolute bg-white border-b border-gray-80 border-solid rounded-lg shadow-lg p-2 mt-4 min-w-[200px] left-5 overflow-hidden ${this.isToggled ? "show" : ""} dropdown-menu`, style: { height: "auto" }, ref: el => (this.menuV2Ref = el) }, (_b = (_a = this.botSettings) === null || _a === void 0 ? void 0 : _a.buttons) === null || _b === void 0 ? void 0 :
|
|
81
81
|
_b.map(button => (index.h("div", { class: "w-full dropdown-item" }, index.h("button", { class: "dropdown-item-button", role: "menuitem", "aria-label": button.label, onClick: _e => {
|
|
82
82
|
this.hamburgerMenuClick.emit({ button, type: 'menu' });
|
|
83
|
-
} }, button.label)))), index.h("div", { key: '
|
|
83
|
+
} }, button.label)))), index.h("div", { key: 'e9df71a3d62ac65517854d31816d08bdaff947e6', class: "w-full dropdown-item" }, index.h("button", { key: 'f043a9273787790c12e1a8a002982f16a21925b0', class: "dropdown-item-button", role: "menuitem", "aria-label": "Start Over", "aria-disabled": this.messages.length === 0, disabled: this.messages.length === 0, style: { opacity: this.messages.length === 0 ? "0.5" : "1", cursor: this.messages.length === 0 ? "not-allowed" : "pointer" }, onClick: ev => {
|
|
84
84
|
ev.preventDefault();
|
|
85
85
|
this.hamburgerMenuClick.emit({ type: 'startover', event: ev });
|
|
86
|
-
} }, "Start Over")), index.h("div", { key: '
|
|
86
|
+
} }, "Start Over")), index.h("div", { key: 'f434964275c80de42847907f60711eaef0ce0460', class: "w-full dropdown-item" }, index.h("button", { key: 'ed23384ef53f9e9b25a8215bafcfda0f51778f6c', class: "dropdown-item-button", role: "menuitem", "aria-label": "View Recent Chat", onClick: _e => {
|
|
87
87
|
this.hamburgerMenuClick.emit({ type: 'history' });
|
|
88
|
-
} }, "View Recent chat")), this.isLiveAgentEnabled && this.botSettings.enableHamburgerMenu && (index.h("div", { key: '
|
|
88
|
+
} }, "View Recent chat")), this.isLiveAgentEnabled && this.botSettings.enableHamburgerMenu && (index.h("div", { key: 'd0fdceeb92d6ec7b1754c5e338dddeaf6ca46081', class: "w-full dropdown-item" }, index.h("button", { key: '21d6f48f44898a459b0224cdab3f65ed0b93124c', class: `dropdown-item-button ${!this.isLiveAgentEnabled ? "opacity-50 cursor-not-allowed pointer-events-none" : "opacity-100 cursor-pointer"}`, role: "menuitem", "aria-label": this.liveAgentButtonText, style: { opacity: !this.isLiveAgentEnabled ? "0.5" : "1", cursor: !this.isLiveAgentEnabled ? "not-allowed" : "pointer" }, onClick: ev => {
|
|
89
89
|
ev.preventDefault();
|
|
90
90
|
if (!this.isLiveAgentEnabled)
|
|
91
91
|
return;
|
|
@@ -218,7 +218,7 @@ const InteractionButtons = class {
|
|
|
218
218
|
render() {
|
|
219
219
|
var _a;
|
|
220
220
|
const email = "";
|
|
221
|
-
return (index.h("div", { key: '
|
|
221
|
+
return (index.h("div", { key: '1301676693d2dae8759c238c2528b54d2179454e', class: "thumbs-container flex gap-2 mt-2" }, this.isPlayed && (index.h("button", { key: '10cd8e47e1c37f28f1238c1b7288db94b9ce8f3c', class: "copy-btn", tabindex: "0", "aria-label": "Stop Speaking", onClick: () => {
|
|
222
222
|
this.isPlayed = false;
|
|
223
223
|
window.speechSynthesis.cancel();
|
|
224
224
|
if (this.audioElement) {
|
|
@@ -228,8 +228,8 @@ const InteractionButtons = class {
|
|
|
228
228
|
this.audioElement = null; // Dereference the object
|
|
229
229
|
}
|
|
230
230
|
// this.isPlayed = false
|
|
231
|
-
} }, index.h("svg", { key: '
|
|
232
|
-
index.h("button", { key: '
|
|
231
|
+
} }, index.h("svg", { key: '7917d77a2ae82e41ecca58761b24bdd40ed901f8', width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg", class: "icon-md-heavy" }, index.h("path", { key: '709788d90a11ef6e33c4b504b58f5daab0d91d6d', "fill-rule": "evenodd", "clip-rule": "evenodd", d: "M2 12C2 6.47715 6.47715 2 12 2C17.5228 2 22 6.47715 22 12C22 17.5228 17.5228 22 12 22C6.47715 22 2 17.5228 2 12ZM9.5 8.5C8.94772 8.5 8.5 8.94772 8.5 9.5V14.5C8.5 15.0523 8.94772 15.5 9.5 15.5H14.5C15.0523 15.5 15.5 15.0523 15.5 14.5V9.5C15.5 8.94772 15.0523 8.5 14.5 8.5H9.5Z", fill: "currentColor" })))), !this.isPlayed && (index.h("button", { key: '007f1ba6c2f17d809dafb460e49e6d58cac83b2f', class: "copy-btn", tabindex: "0", onClick: () => this.speakText(utils.removeHtmlTags(this.message.text)), "aria-label": "Speak Text" }, index.h("svg", { key: 'ff62913d5c73c19b3b1bdf5b37057cc9e022fda4', class: "w-6 h-6", viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, index.h("path", { key: '8186495b322cd06040e9ea23e50d2c9ea50bebd4', "fill-rule": "evenodd", "clip-rule": "evenodd", d: "M11 4.9099C11 4.47485 10.4828 4.24734 10.1621 4.54132L6.67572 7.7372C6.49129 7.90626 6.25019 8.00005 6 8.00005H4C3.44772 8.00005 3 8.44776 3 9.00005V15C3 15.5523 3.44772 16 4 16H6C6.25019 16 6.49129 16.0938 6.67572 16.2629L10.1621 19.4588C10.4828 19.7527 11 19.5252 11 19.0902V4.9099ZM8.81069 3.06701C10.4142 1.59714 13 2.73463 13 4.9099V19.0902C13 21.2655 10.4142 22.403 8.81069 20.9331L5.61102 18H4C2.34315 18 1 16.6569 1 15V9.00005C1 7.34319 2.34315 6.00005 4 6.00005H5.61102L8.81069 3.06701ZM20.3166 6.35665C20.8019 6.09313 21.409 6.27296 21.6725 6.75833C22.5191 8.3176 22.9996 10.1042 22.9996 12.0001C22.9996 13.8507 22.5418 15.5974 21.7323 17.1302C21.4744 17.6185 20.8695 17.8054 20.3811 17.5475C19.8927 17.2896 19.7059 16.6846 19.9638 16.1962C20.6249 14.9444 20.9996 13.5175 20.9996 12.0001C20.9996 10.4458 20.6064 8.98627 19.9149 7.71262C19.6514 7.22726 19.8312 6.62017 20.3166 6.35665ZM15.7994 7.90049C16.241 7.5688 16.8679 7.65789 17.1995 8.09947C18.0156 9.18593 18.4996 10.5379 18.4996 12.0001C18.4996 13.3127 18.1094 14.5372 17.4385 15.5604C17.1357 16.0222 16.5158 16.1511 16.0539 15.8483C15.5921 15.5455 15.4632 14.9255 15.766 14.4637C16.2298 13.7564 16.4996 12.9113 16.4996 12.0001C16.4996 10.9859 16.1653 10.0526 15.6004 9.30063C15.2687 8.85905 15.3578 8.23218 15.7994 7.90049Z", fill: "currentColor" })))), !this.message.hideThumbsUpandDown &&
|
|
232
|
+
index.h("button", { key: '6f5dff07e526e2cdc47bc44b2f58a0f89fd53cce', id: `thumbsUp_${this.message.thumbsId}`, tabindex: "0", onClick: () => {
|
|
233
233
|
var _a;
|
|
234
234
|
thumbsUp(this.message.thumbsId, this.message.insightId, this.el, {
|
|
235
235
|
dataKey: this.dataKey,
|
|
@@ -238,7 +238,7 @@ const InteractionButtons = class {
|
|
|
238
238
|
projectId: this.projectId,
|
|
239
239
|
questionText: ((_a = this.chatArray[this.currentIndex - 1]) === null || _a === void 0 ? void 0 : _a.text) || "",
|
|
240
240
|
});
|
|
241
|
-
}, class: "chat-thumbs-up", "aria-label": "Thumbs Up" }, index.h("svg", { key: '
|
|
241
|
+
}, class: "chat-thumbs-up", "aria-label": "Thumbs Up" }, index.h("svg", { key: '2cd7fdb5e05b9b74faeebe6eed0bca21e646f69a', 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", { key: '3804be8337ef4725d77d371c6236d443355223e7', "stroke-linecap": "round", "stroke-linejoin": "round", d: "M6.633 10.25c.806 0 1.533-.446 2.031-1.08a9.041 9.041 0 0 1 2.861-2.4c.723-.384 1.35-.956 1.653-1.715a4.498 4.498 0 0 0 .322-1.672V2.75a.75.75 0 0 1 .75-.75 2.25 2.25 0 0 1 2.25 2.25c0 1.152-.26 2.243-.723 3.218-.266.558.107 1.282.725 1.282m0 0h3.126c1.026 0 1.945.694 2.054 1.715.045.422.068.85.068 1.285a11.95 11.95 0 0 1-2.649 7.521c-.388.482-.987.729-1.605.729H13.48c-.483 0-.964-.078-1.423-.23l-3.114-1.04a4.501 4.501 0 0 0-1.423-.23H5.904m10.598-9.75H14.25M5.904 18.5c.083.205.173.405.27.602.197.4-.078.898-.523.898h-.908c-.889 0-1.713-.518-1.972-1.368a12 12 0 0 1-.521-3.507c0-1.553.295-3.036.831-4.398C3.387 9.953 4.167 9.5 5 9.5h1.053c.472 0 .745.556.5.96a8.958 8.958 0 0 0-1.302 4.665c0 1.194.232 2.333.654 3.375Z" }))), !this.message.hideThumbsUpandDown && index.h("button", { key: '6698fb5391a1fa1636461d622cbeba9b1f240a3c', id: `thumbsDown_${this.message.thumbsId}`, onClick: () => {
|
|
242
242
|
var _a;
|
|
243
243
|
return thumbsDown(this.message.thumbsId, this.message.insightId, this.el, {
|
|
244
244
|
dataKey: this.dataKey,
|
|
@@ -247,7 +247,7 @@ const InteractionButtons = class {
|
|
|
247
247
|
projectId: this.projectId,
|
|
248
248
|
questionText: ((_a = this.chatArray[this.currentIndex - 1]) === null || _a === void 0 ? void 0 : _a.text) || "",
|
|
249
249
|
});
|
|
250
|
-
}, class: "chat-thumbs-up", "aria-label": "Thumbs Down" }, index.h("svg", { key: '
|
|
250
|
+
}, class: "chat-thumbs-up", "aria-label": "Thumbs Down" }, index.h("svg", { key: 'c9a9095c0d387c67c649d0ff66e0554d27ac25fd', 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", { key: 'e7c3f597faf0cb79d2c439ac5b3cd835a681d71e', "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", { key: '04a0db0b288f173529d8cb19ccc09c50847ec8aa', class: "copy-btn", onClick: () => this.copyToClipboard(this.message.text), "aria-label": "Copy Text" }, !this.copied && (index.h("svg", { key: '3f69ba67f017ed628c01b765d0fde102a0219edb', class: "w-6 h-6", viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, index.h("path", { key: 'b721b1aff45c6f7452e77ea9eb4a86280b41273b', "fill-rule": "evenodd", "clip-rule": "evenodd", d: "M7 5C7 3.34315 8.34315 2 10 2H19C20.6569 2 22 3.34315 22 5V14C22 15.6569 20.6569 17 19 17H17V19C17 20.6569 15.6569 22 14 22H5C3.34315 22 2 20.6569 2 19V10C2 8.34315 3.34315 7 5 7H7V5ZM9 7H14C15.6569 7 17 8.34315 17 10V15H19C19.5523 15 20 14.5523 20 14V5C20 4.44772 19.5523 4 19 4H10C9.44772 4 9 4.44772 9 5V7ZM5 9C4.44772 9 4 9.44772 4 10V19C4 19.5523 4.44772 20 5 20H14C14.5523 20 15 19.5523 15 19V10C15 9.44772 14.5523 9 14 9H5Z", fill: "currentColor" }))), this.copied && (index.h("svg", { key: '11c6d49c31049913fe6533549abe5255cc87c27b', viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg", class: "w-6 h-6" }, index.h("path", { key: '35a4885c4110d49320643a908f83e4e7138cdf0f', "fill-rule": "evenodd", "clip-rule": "evenodd", d: "M19.8198 6.19526C20.0601 6.45561 20.0601 6.87772 19.8198 7.13807L9.9736 17.8047C9.73328 18.0651 9.34364 18.0651 9.10332 17.8047L4.18024 12.4714C3.93992 12.2111 3.93992 11.7889 4.18024 11.5286C4.42056 11.2682 4.8102 11.2682 5.05053 11.5286L9.53846 16.3905L18.9495 6.19526C19.1898 5.93491 19.5794 5.93491 19.8198 6.19526Z", fill: "currentColor" })))), index.h("button", { key: 'ed8932a55da4f4bd3aaa281390217400ae9be59b', class: "copy-btn", "aria-label": "Send Email" }, index.h("a", { key: '267d94e1d9850464820978266a97b52a07aabb7f', href: `mailto:${email}?subject=${encodeURIComponent((_a = this.chatArray[this.currentIndex - 1]) === null || _a === void 0 ? void 0 : _a.text)}&body=${encodeURIComponent(utils.removeHtmlTags(this.message.text))}`, target: "_blank" }, index.h("svg", { key: '2bb1ac9deaf577086dbbfbbf981600ff9031c46c', 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", { key: '062336e4dac5379b18271bc3411d4ff2c0665895', "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" }), " ")))));
|
|
251
251
|
}
|
|
252
252
|
get el() { return index.getElement(this); }
|
|
253
253
|
};
|
|
@@ -351,7 +351,7 @@ const LiveAgentChat = class {
|
|
|
351
351
|
* to project content if needed, but is not required.
|
|
352
352
|
*/
|
|
353
353
|
render() {
|
|
354
|
-
return index.h("slot", { key: '
|
|
354
|
+
return index.h("slot", { key: 'a0d32db2683a293d3b4b232fc65cd63461670af1' });
|
|
355
355
|
}
|
|
356
356
|
};
|
|
357
357
|
|
|
@@ -392,7 +392,7 @@ const TypingIndicator = class {
|
|
|
392
392
|
backgroundColor: this.color,
|
|
393
393
|
marginRight: `${this.spacing}px`,
|
|
394
394
|
};
|
|
395
|
-
return (index.h("div", { key: '
|
|
395
|
+
return (index.h("div", { key: 'bd85182ca31ecc6d35c911a567daed098164ea59', class: "typing-indicator", role: "status", "aria-live": "polite", "aria-label": "Typing indicator" }, index.h("span", { key: '63c24fa73702c58e120f8be7f41829b9776c0fb4', class: "dot", style: Object.assign(Object.assign({}, dotStyle), { animationDelay: "0s" }) }), index.h("span", { key: '9dc45671673597a3e62d837a6bba1e91cf6597ef', class: "dot", style: Object.assign(Object.assign({}, dotStyle), { animationDelay: "0.2s" }) }), index.h("span", { key: '9c820b6f1255c932301c46c3d1abc51ff6d1dd87', class: "dot", style: Object.assign(Object.assign({}, dotStyle), { marginRight: "0", animationDelay: "0.4s" }) })));
|
|
396
396
|
}
|
|
397
397
|
};
|
|
398
398
|
TypingIndicator.style = typingIndicatorCss();
|
|
@@ -170,7 +170,7 @@ const ChatbotHistory = class {
|
|
|
170
170
|
}
|
|
171
171
|
render() {
|
|
172
172
|
const sortedItems = this.sortByDateDesc();
|
|
173
|
-
return (index.h("div", { key: '
|
|
173
|
+
return (index.h("div", { key: '6595986513b8c8ac3daf7c8b92306cc27e3f7585', role: "list", "aria-label": "Chat history" }, index.h("ul", { key: '701836339305fb6af977a02c9eb95a201cb47977', class: "history-list" }, sortedItems.length === 0 && index.h("p", { key: '68756ec13d02e46b490a85fa1e176a6cd98c777e', class: "no-history" }, "No chat history available"), sortedItems.map((chat, idx) => {
|
|
174
174
|
var _a;
|
|
175
175
|
return (index.h("li", { class: `conversation-list-item ${chat.conversationId === this.activeId ? 'active' : ''}`, onClick: () => this.handleClick(chat.messages), role: "listitem", "aria-label": `Chat from ${new Date(chat.date).toLocaleString()}`, "aria-selected": chat.conversationId === this.activeId, tabindex: idx === this.focusedIndex ? 0 : -1, onKeyDown: (e) => this.handleMessageKeyNav(e, idx), ref: el => (this.chatHistoryRefs[idx] = el) }, index.h("div", { class: `conversation-list-item-body` }, index.h("div", null, index.h("img", { class: "avatar", src: this.chatlogo, alt: "Avatar" })), index.h("div", { class: "conversation-list-item-body-content" }, index.h("h2", null, new Date(chat.date).toLocaleString()), index.h("span", { class: "conversation-list-item-time" }, index.h("button", { onClick: (event) => this.downloadChat(chat, event), "aria-label": "Download chat", style: { background: "none", border: "none", padding: "0", cursor: "pointer", marginRight: "10px" } }, index.h("svg", { viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg", height: "20px", width: "20px",
|
|
176
176
|
// onClick={() => this.downloadChat(chat)}
|