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_template.ejs","webpack://apexchatwidgets/./widgets/templates/question_types/RDPlusTheme/prechat_rounded_theme/multiple_choice_display_as_list_question_template.ejs","webpack://apexchatwidgets/./widgets/questiontypes/QTMessageRenderer.js","webpack://apexchatwidgets/./widgets/templates/question_types/RDPlusTheme/mc_ata_display_as_list_question_template.ejs","webpack://apexchatwidgets/./widgets/questiontypes/ImportFactories/ImportMCListTemplateFactory.js","webpack://apexchatwidgets/./widgets/core/enums/ParticipantIds.js","webpack://apexchatwidgets/./widgets/templates/question_types/prechat_rounded_theme/multiple_choice_display_as_list_question_template.ejs","webpack://apexchatwidgets/./widgets/core/hooks/isLastMessage.js"],"sourcesContent":["module.exports = function(obj) {\nobj || (obj = {});\nvar __t, __p = '', __j = Array.prototype.join;\nfunction print() { __p += __j.call(arguments, '') }\nwith (obj) {\n__p += '\\r\\n
0 || userId == -3){ ;\n__p += ' apexchat_agent';\n};\n__p += ' apexchat_script_message_' +\n((__t = (id)) == null ? '' : __t) +\n'\">\\r\\n
\\r\\n
\\r\\n
\\r\\n
\\r\\n
\\r\\n \\r\\n
\\r\\n ' +\n((__t = (text )) == null ? '' : __t) +\n'\\r\\n
\\r\\n
\\r\\n\\r\\n
\\r\\n \\r\\n
\\r\\n\\r\\n
\\r\\n \\r\\n Send\\r\\n \"Send\"\\r\\n


\\r\\n
\\r\\n
\\r\\n Update\\r\\n
\\r\\n
\\r\\n
\\r\\n
\\r\\n
\\r\\n
\\r\\n \\r\\n ' +\n((__t = (text )) == null ? '' : __t) +\n'\\r\\n \\r\\n
\\r\\n
\\r\\n
\\r\\n
\\r\\n
\\r\\n Select an option\\r\\n
\\r\\n \\r\\n \\r\\n \\r\\n
\\r\\n
\\r\\n
\\r\\n
\\r\\n
\\r\\n Skip this question\\r\\n
\\r\\n
\\r\\n
\\r\\n\\r\\n \\r\\n ' +\n((__t = (ApexChat.getCurrentFormatedDateTime(createdOn, 'hh:mmtt' ) )) == null ? '' : __t) +\n'\\r\\n';\n\n}\nreturn __p\n}","module.exports = function(obj) {\nobj || (obj = {});\nvar __t, __p = '', __j = Array.prototype.join;\nfunction print() { __p += __j.call(arguments, '') }\nwith (obj) {\n__p += '\\r\\n
0 || userId == -3){ ;\n__p += ' apexchat_agent';\n};\n__p += ' apexchat_script_message_' +\n((__t = (id)) == null ? '' : __t) +\n'\">\\r\\n
\\r\\n
\\r\\n\\r\\n
\\r\\n
\\r\\n
\\r\\n
\\r\\n \\r\\n
\\r\\n
\\r\\n
\\r\\n ' +\n((__t = (text )) == null ? '' : __t) +\n'\\r\\n
\\r\\n
\\r\\n
\\r\\n
\\r\\n
\\r\\n
\\r\\n \\r\\n Select an option\\r\\n \\r\\n
\\r\\n \\r\\n \\r\\n \\r\\n
\\r\\n
\\r\\n
\\r\\n
\\r\\n \\r\\n Send\\r\\n \"Send\"\\r\\n
\\r\\n \\r\\n
\\r\\n
\\r\\n
';\n\n}\nreturn __p\n}","// me.QTRendererExt = null;//this single instance will get initialized on very 1st message of a Chat\r\nimport ManageFocusOnKeyEvents from '../core/hooks/ManageFocusOnKeyEvents';\r\nimport isLastMessage from '../core/hooks/isLastMessage';\r\nimport BaseClass from '../core/BaseClass';\r\nimport { ScriptsQuestionType } from '../core/enums/Enum';\r\nimport WidgetTypes from '../core/enums/WidgetTypes';\r\nimport RunAsSoonAs from '../core/hooks/RunAsSoonAs';\r\nimport observe from '../core/hooks/observe';\r\nimport isAcceptKey from '../core/hooks/isAcceptKey';\r\nimport hideElement from '../core/hooks/hideElement';\r\n\r\nexport default class QTMessageRenderer extends BaseClass {\r\n constructor(options) {\r\n super(options);\r\n const me = this;\r\n me.options = options;\r\n me.$ = options.$;\r\n me.context = options.context;\r\n me.updateCallback = options.updateCallback;\r\n // this is default renderer; we should set default props here which should/may work for all quick reply types\r\n me.model = options.msg;\r\n me.container = options.container;\r\n // me.container = me.$(options.container, me.context)[0];//container for all messages\r\n me.wrapper = options.wrapper; // container for this QR message\r\n me.type = me.model.questionType;\r\n // me.template = null;//parsed template\r\n me.selectOptions = [];\r\n me.updateButtonId = `apexchat-btn-update-${me.model.id}`;\r\n me.isFromPreChat = options.isFromPreChat;\r\n }\r\n\r\n // 1st render OR page reload: just parse & append template\r\n render() {\r\n // TODO: move templating stuff of renderMessage() here later\r\n const me = this;\r\n }\r\n\r\n // set selection AFTER 1st render OR page reload\r\n afterRender() {\r\n const me = this;\r\n me.wrapper.innerHTML = me.selectOptions\r\n ? me.template.replace('apexchat_options_div', me.selectOptions.innerHTML)\r\n : me.template;\r\n me.container.appendChild(me.wrapper);\r\n }\r\n\r\n displaySkipOption() {\r\n const me = this;\r\n const isSkippable =\r\n me.model.isSkippable ||\r\n (me.model.agentScript ? me.model.agentScript.isSkippable : false);\r\n // show skip button when isSkippable true\r\n if (isSkippable) { // show skip button when isSkippable true \r\n const skipButton = me.context.getElementById(`apexchat_skip_question_${me.model.id}`);\r\n if (isLastMessage(me.model)) {\r\n // this condition handle refresh case\r\n RunAsSoonAs(\r\n () => {\r\n ManageFocusOnKeyEvents(skipButton);\r\n // scroll down when skip question visible\r\n if (\r\n me.options.msg &&\r\n me.options.msg.questionType ==\r\n ScriptsQuestionType.AppointmentScheduler\r\n ) {\r\n me.config.onAutoScroll();\r\n }\r\n },\r\n () => {\r\n skipButton?.style.display = 'block';\r\n return skipButton?.style.display !== 'none';\r\n }\r\n );\r\n } else {\r\n hideElement(skipButton); // hide skip button\r\n }\r\n\r\n }\r\n }\r\n\r\n // UI changes after selection\r\n onSelection() { }\r\n\r\n bindUpdateClick() {\r\n const me = this;\r\n const updateButton = me.context.getElementById(me.updateButtonId);\r\n if (updateButton) {\r\n observe(updateButton, 'click', (e) => {\r\n me.onUpdateEvent.bind2(me, e, me.model, me.updateClickHandler)();\r\n });\r\n // apply ADA\r\n observe(updateButton, 'keyup', (e) => {\r\n if (isAcceptKey(e)) {\r\n me.onUpdateEvent.bind2(me, e, me.model, me.updateClickHandler)();\r\n } else {\r\n // ApexChat.manageFocus(e, this);\r\n }\r\n });\r\n }\r\n }\r\n\r\n onUpdateEvent() { }\r\n\r\n manageQtFocus(e, options) {\r\n const me = this;\r\n const doOnAcceptKey =\r\n options && options.onAccept\r\n ? options.onAccept\r\n : function () {\r\n /* do nothing */\r\n };\r\n if (isAcceptKey(e)) {\r\n if (!options.context.$(this, options.context.context).isDisabled()) {\r\n // if element is disabled it should not work using keyboard\r\n options.isNotSend\r\n ? doOnAcceptKey.bind2(me, e, options)()\r\n : options.context[options.eventType](e, options.msg, options.text);\r\n options.context.$(this, options.context.context).blur();\r\n // we prevent vox to read element.\r\n options.context.muteAllElements(options);\r\n setTimeout(() => {\r\n // we enabled vox to read element.\r\n options.context.unmuteAllElements(options);\r\n }, 500);\r\n }\r\n }\r\n // else {\r\n // ApexChat.manageFocus(e, this);\r\n // }\r\n }\r\n\r\n muteAllElements(options) {\r\n for (let i = 0; i < options.muteElements.length; i++) {\r\n options.context\r\n .$(options.muteElements[i], options.context.context)\r\n .attr('aria-hidden', true);\r\n }\r\n }\r\n\r\n /*\r\n Using this function we enabled vox to read element. \r\n */\r\n unmuteAllElements(options) {\r\n for (let i = 0; i < options.muteElements.length; i++) {\r\n options.context\r\n .$(options.muteElements[i], options.context.context)\r\n .attr('aria-hidden', false);\r\n }\r\n }\r\n\r\n setDisabled() { }\r\n\r\n isPreChatOrVideoGreet() {\r\n const me = this;\r\n const widgetType =\r\n me.options.widgetType == WidgetTypes.PreChat ||\r\n me.options.widgetType == WidgetTypes.VideoGreetInvitation;\r\n if (widgetType) {\r\n return true;\r\n }\r\n return false;\r\n }\r\n}\r\n","module.exports = function(obj) {\nobj || (obj = {});\nvar __t, __p = '', __j = Array.prototype.join;\nfunction print() { __p += __j.call(arguments, '') }\nwith (obj) {\n__p += '\\r\\n
0 || userId == -3){ ;\n__p += ' apexchat_agent';\n};\n__p += ' apexchat_script_message_' +\n((__t = (id)) == null ? '' : __t) +\n'\">\\r\\n
\\r\\n
\\r\\n
\\r\\n
\\r\\n
\\r\\n \\r\\n
\\r\\n
\\r\\n
\\r\\n ' +\n((__t = (text )) == null ? '' : __t) +\n'\\r\\n
\\r\\n
\\r\\n\\r\\n
\\r\\n \\r\\n
\\r\\n\\r\\n
\\r\\n \\r\\n Send\\r\\n \"Send\"\\r\\n


\\r\\n
\\r\\n
\\r\\n Update\\r\\n
\\r\\n
\\r\\n
\\r\\n
\\r\\n
\\r\\n ';\n if (userId !==0 && handlerImageUrl) { ;\n__p += '\\r\\n
\\r\\n \"Live\\r\\n
\\r\\n ';\n } ;\n__p += '\\r\\n
\\r\\n
\\r\\n \\r\\n ' +\n((__t = (text )) == null ? '' : __t) +\n'\\r\\n \\r\\n
\\r\\n
\\r\\n
\\r\\n
\\r\\n \\r\\n Select an option\\r\\n \\r\\n
\\r\\n \\r\\n \\r\\n \\r\\n
\\r\\n
\\r\\n
\\r\\n
\\r\\n
\\r\\n Skip this question\\r\\n
\\r\\n
\\r\\n
\\r\\n
\\r\\n
\\r\\n\\r\\n \\r\\n ' +\n((__t = (ApexChat.getCurrentFormatedDateTime(createdOn, 'hh:mmtt' ) )) == null ? '' : __t) +\n'\\r\\n';\n\n}\nreturn __p\n}","import questionTypeMultipleChoiceAsListTemplatePrechat from '../../templates/question_types/prechat_rounded_theme/multiple_choice_display_as_list_question_template.ejs';\r\nimport questionTypeMultipleChoiceAsListRDPlusThemeTemplatePrechat from '../../templates/question_types/RDPlusTheme/prechat_rounded_theme/multiple_choice_display_as_list_question_template.ejs';\r\nimport questionTypeMultipleChoiceAsListTemplate from '../../templates/question_types/multiple_choice_display_as_list_question_template.ejs';\r\nimport questionTypeMultipleChoiceAsListRDPlusThemeTemplate from '../../templates/question_types/RDPlusTheme/mc_ata_display_as_list_question_template.ejs';\r\nimport WidgetTypes from '../../core/enums/WidgetTypes';\r\n\r\nconst ImportMCListTemplateFactory = (options) => {\r\n const isFromPreChat = options.widgetType === WidgetTypes.PreChat;\r\n const isFromVideoGreet = options.widgetType === WidgetTypes.VideoGreetInvitation;\r\n\r\n const defaultTemplates = {\r\n questionTypeMultipleChoiceAsListTemplate\r\n }\r\n const preChatTemplates = {\r\n questionTypeMultipleChoiceAsListTemplate: questionTypeMultipleChoiceAsListTemplatePrechat\r\n }\r\n const rdPlusTemplates = {\r\n questionTypeMultipleChoiceAsListTemplate: questionTypeMultipleChoiceAsListRDPlusThemeTemplate\r\n }\r\n const preChatRdPlusTemplates = {\r\n questionTypeMultipleChoiceAsListTemplate: questionTypeMultipleChoiceAsListRDPlusThemeTemplatePrechat\r\n }\r\n\r\n if (isFromPreChat || isFromVideoGreet) {\r\n if (ApexChat.IsRoundedDynamicPlusTheme) {\r\n return preChatRdPlusTemplates;\r\n }\r\n return preChatTemplates;\r\n }\r\n if (ApexChat.IsRoundedDynamicPlusTheme) {\r\n return rdPlusTemplates;\r\n }\r\n\r\n return defaultTemplates;\r\n};\r\nexport default ImportMCListTemplateFactory;\r\n","const ParticipantIds = {\r\n visitor: 0,\r\n system: -1,\r\n bot: -2,\r\n prechat: -3,\r\n predefined: -4,\r\n nonVisitorSystem: -6, // system message to be shown on only dashboard end, and not on visitor end\r\n pokeMessage: -7,\r\n AIBot: -8\r\n};\r\nexport default ParticipantIds;\r\n","module.exports = function(obj) {\nobj || (obj = {});\nvar __t, __p = '', __j = Array.prototype.join;\nfunction print() { __p += __j.call(arguments, '') }\nwith (obj) {\n__p += '\\r\\n
0 || userId == -3){ ;\n__p += ' apexchat_agent';\n};\n__p += ' apexchat_script_message_' +\n((__t = (id)) == null ? '' : __t) +\n'\">\\r\\n
\\r\\n
\\r\\n
\\r\\n
\\r\\n
\\r\\n \\r\\n
\\r\\n ' +\n((__t = (text )) == null ? '' : __t) +\n'\\r\\n
\\r\\n
\\r\\n
\\r\\n
\\r\\n
Select an option
\\r\\n
\\r\\n \\r\\n \\r\\n \\r\\n \\r\\n
\\r\\n
\\r\\n
\\r\\n \\r\\n Send\\r\\n \"Send\"\\r\\n


\\r\\n
\\r\\n
\\r\\n Update\\r\\n
\\r\\n
\\r\\n
';\n\n}\nreturn __p\n}","import ParticipantIds from '../enums/ParticipantIds';\r\nimport { SystemMessageType } from '../enums/Enum';\r\n\r\n/**\r\n * Checks the last message from history in only refresh scenario\r\n * @param {any} msgObj message object\r\n */\r\nconst isLastMessage = function (msgObj) {\r\n if (!ApexChat.allHistoryMessages ||\r\n (ApexChat.allHistoryMessages && ApexChat.allHistoryMessages.length == 0)) {\r\n // if no messages in history that means message is from Predefined or message before chat start so set its always true\r\n return true;\r\n }\r\n const allChatMsgs = ApexChat.allHistoryMessages.filter(\r\n (message) => message.userId != ParticipantIds.pokeMessage &&\r\n message.userId != ParticipantIds.nonVisitorSystem\r\n );\r\n const lastMsg = allChatMsgs[allChatMsgs.length - 1];\r\n if (lastMsg) {\r\n const isSmsOptin = lastMsg.systemMessageType\r\n ? lastMsg.systemMessageType == SystemMessageType.SMSOptIn\r\n : false;\r\n if (isSmsOptin) {\r\n return true;\r\n }\r\n }\r\n\r\n const lastMsgId = allChatMsgs.length > 0 && allChatMsgs[allChatMsgs.length - 1].id;\r\n return lastMsgId == msgObj.id;\r\n};\r\nexport default isLastMessage;\r\n"],"names":["module","exports","obj","__t","__p","__j","Array","prototype","join","print","call","arguments","userId","ApexChat","getCurrentFormatedDateTime","createdOn","QTMessageRenderer","BaseClass","constructor","options","super","me","this","$","context","updateCallback","model","msg","container","wrapper","type","questionType","selectOptions","updateButtonId","id","isFromPreChat","render","afterRender","innerHTML","template","replace","appendChild","displaySkipOption","isSkippable","agentScript","skipButton","getElementById","isLastMessage","RunAsSoonAs","ManageFocusOnKeyEvents","ScriptsQuestionType","AppointmentScheduler","config","onAutoScroll","style","display","hideElement","onSelection","bindUpdateClick","updateButton","observe","e","onUpdateEvent","bind2","updateClickHandler","isAcceptKey","manageQtFocus","doOnAcceptKey","onAccept","isDisabled","isNotSend","eventType","text","blur","muteAllElements","setTimeout","unmuteAllElements","i","muteElements","length","attr","setDisabled","isPreChatOrVideoGreet","widgetType","WidgetTypes","PreChat","VideoGreetInvitation","handlerImageUrl","isFromVideoGreet","defaultTemplates","questionTypeMultipleChoiceAsListTemplate","preChatTemplates","questionTypeMultipleChoiceAsListTemplatePrechat","rdPlusTemplates","questionTypeMultipleChoiceAsListRDPlusThemeTemplate","preChatRdPlusTemplates","questionTypeMultipleChoiceAsListRDPlusThemeTemplatePrechat","IsRoundedDynamicPlusTheme","visitor","system","bot","prechat","predefined","nonVisitorSystem","pokeMessage","AIBot","msgObj","allHistoryMessages","allChatMsgs","filter","message","ParticipantIds","lastMsg","systemMessageType","SystemMessageType","SMSOptIn"],"sourceRoot":""}