var $ZSIQChatWindow=$ZSIQChatWindow||function(){var S,l,a,h=0,s=document.documentElement.scrollTop||document.body.scrollTop,u={1:"siq_rht",2:"siq_rht",3:"siq_lft",4:"siq_lft",5:"siq_lft",6:"siq_lft",7:"siq_lft",8:"siq_rht",9:"siq_rht",10:"siq_rht",11:"siq_rht",12:"siq_rht"},r=function(){var e=$ZSIQUtil.getIframe().$Support;$zv.question&&(window._IS_REVAMP?IframeHandler.sendPostMessage("question"):e&&e.handleVisitorQuestionJsApi())},p=function(e){if(S.className=S.className.replace(/(?:^|\s)siqhide(?!\S)/,"").replace(/(?:^|\s)siqanim(?!\S)/,""),e){if(!$ZSIQUtil.getIframe())return w(),void $ZSIQChatWindow.populateIframe(function(){p(e)});$ZSIQChat.isOnboarding()?2!=$ZSIQWidgetUI.getWidgetState()&&$ZSIQWidget.handleCallBacks({"chat.open":""}):$ZSIQWidget.handleCallBacks({"chat.open":""}),S.className+=" siqanim",$ZSIQChatWindow.setLoadContentClass(),r()}!function(e){if(window._IS_REVAMP&&$ZSIQWidgetUI.isHandHeldDevice()&&document.getElementById("siqiframe").contentDocument.documentElement.setAttribute("device","mobile-device"),$ZSIQWidgetUI.isHandHeldDevice()&&$ZSIQWidgetUI.isAppleDevice()){var t=document.body,i=document.documentElement;if(t.className=(t.className||"").replace(/(?:^|\s)zsiq_fixedlayout(?!\S)/,""),!e)return i.scrollTop=s,t.scrollTop=s;s=i.scrollTop||t.scrollTop,t.className+=" zsiq_fixedlayout"}}(e)},f=function(){S.style.top="-10000px",S.style.display="block"},n=function(e,t,i){void 0===a&&(a=0),clearTimeout(a),$ZSIQUtil.storeCookieVal(e,t,i),a=setTimeout(function(){n(e,t,i)},12e4)},w=function(){$ZSIQWidgetUI.addClass($ZSIQChatWindow.getChatWindowDiv(),"siq_showload"),$ZSIQWidgetUI.addClass($ZSIQWidgetUI.getWidgetDiv(),"zsiqfanim")};return{getChatWindowDiv:function(){return S},isTrackingOnly:function(){var e=$ZSIQChat.getWidgetData().widgetobj;return 1==e.istracking&&(0==e.islivechat||1==e.hideembed)},showIframeLoading:w,constructIframe:function(e,t){if($ZSIQCookie.get("isiframeenabled")&&!$ZSIQChatWindow.getChatWindowDiv()||!$ZSIQChatWindow.isTrackingOnly()||$ZSIQChat.isPreview()){var i,a=$ZSIQWidget.getEmbedObject(),s=$ZSIQWidget.getWidgetObject(),n=!1,o=$ZSIQChat.isPreview(),r=window._IS_REVAMP,l=$ZSIQUtil.getIframe().$Support,d=$zohosq.nonce,c=null!=s.isSeasonalThemeEnabled?s.isSeasonalThemeEnabled:$ZSIQChat.isSeasonalTheme();if(c=c&&r&&!$ZSIQChatWindow.isBotChatPreview(),S&&!_WINDOW_REPOPULATE&&(o?n=!0:(S.remove(),_WINDOW_REPOPULATE=!1)),n||(S&&S.remove(),(S=document.createElement("DIV")).innerHTML='
',S.style.visibility="hidden"),S.className=function(){$ZSIQWidget.getWidgetObject();var e="";$ZSIQWidget.getWidgetObject().isshowcallbubble&&(e="theme5"===$ZSIQWidget.getWidgetObject().calltheme?" siq-calthemesign":"siq-caltheme");var t=$ZSIQChatWindow.isBotChatPreview(),i=$ZSIQWidgetUI.isCSSTransformSupported()?"zls-sptwndw "+e+" siqembed siqtrans siqhide ":"zls-sptwndw "+e+" siqembed ";i+=$ZSIQChat.isPreview()?"":"zsiq-mobhgt ",i+=$ZSIQChatWindow.isNewHeader()?"zsiq-newtheme ":"",i+=!$ZSIQChatWindow.isOnlyCall()||t||window._IS_REVAMP?"":"zsiqdircall ",i+=$ZSIQWidgetUI.isHandHeldDevice()?"mobile-device ":"",i+=window._IS_REVAMP&&t?" bot-preview ":"";var a=" zsiq_size"+$ZSIQWidget.getEmbedSize();return $ZSIQChat.isSignatureChat()?i+a:i+u[$ZSIQWidgetUI.getWidgetPosition()]+a}(),S.setAttribute("embedtheme",a.theme),S.setAttribute("data-id","zsiqembed"),c?S.setAttribute("seasonal-type",$ZSIQChat.getSeasonalThemeObj().type):S.removeAttribute("seasonal-type"),d&&S.setAttribute("nonce",d),n)!r&&l.init($ZSIQWidget.getEmbedObject());else if(function(){var e=$ZSIQChat.getWidgetData().embedobj.einfo.embedid,t=($ZSIQLSDB.get("ZLD"+e)||{}).ongoingchats||{},i=0!==Object.keys(t).length;window._IS_REVAMP&&(i=0<((JSON.parse(localStorage.getItem("siq_embed"))||{})[$ZSIQUtil.getLiveLSID()]||{}).ongoingchats);return $ZSIQLSDB.get("ZLDTRIGGER"+e)||$ZSIQLSDB.get("ZLD"+e+"WAITING")||i||$ZSIQChat.isPreview()}()||t||0==$zohosq.fileloadtime&&$ZSIQWidgetUI.F_WINDOW==$ZSIQWidgetUI.getWidgetState())$ZSIQChatWindow.populateIframe(t);else{var I=a.widget_performance_optimised?25e3:$zohosq.postloadtime||1e4,g=$zohosq.values||{},m=g.floatwindowvisible||g.chatwindowvisible;m&&"show"==m&&(I=0,r&&$ZSIQChatWindow.populateIframe(t)),r||(h=setTimeout(function(){$ZSIQChatWindow.populateIframe(t)},I))}!function(e){$ZSIQChat.getWidgetData().widgettype;var t=$zohosq.values,i=t.floatwindowvisible||t.chatwindowvisible;i?$ZSIQChatWindow.handleChatWindowVisible(i,e):$ZSIQWidgetUI.getWidgetState()!=$ZSIQWidgetUI.F_WINDOW?f():(w(),$ZSIQChatWindow.populateIframe(),p(!0))}(e),l&&l.Util&&l.Util.handleResize&&l.Util.handleResize(),(i=$ZSIQUtil.getCookieValue("dragpos"))&&(i=JSON.parse(i),S.setAttribute("style","left:"+i.left+";top:"+i.top)),this.handleESCEvent()}},populateIframe:function(t,i){if(document.getElementById("siqiframe"))S.className=S.className.replace(/(?:^|\s)siq_showload(?!\S)/,"");else{!window._IS_DEV&&function(){var e=$ZSIQChat.getWidgetData();if(iscdnenabled&&!$ZSIQChat.isPreview()){var t=$zohosq.nonce,i={};i[SIQ_FLOAT]="/salesiq/styles/floatbuttonpostload_MN7wANV5tcysihBsxd0-BjeLlB4WaliNceLI67ZpSu0ERgT-FryM4mNq5kVyVyl5_.css",i[SIQ_BUTTON]="/salesiq/styles/buttonthemepostload_GvFemB8yPWLIiBGAvgN1NkgbcbvcNnArXoauGGdhVRkufaNgMVI-N-msgAz2SVxy_.css",i[SIQ_PERSONALIZE]="/salesiq/styles/personalizethemepostload_7xirQW0QmmoRX7n8OMI3GTNtWfEsT-jrVnczPHh--dvxcC0DXsVfL69he2xAeWG1_.css";var a=e.widgetobj,s=JSON.parse(a.sticker)[1].default,n=i[e.widgettype],o=a.cssstaticserver,r=a.csscdnstaticserver,l=o+n,d=n.split("WIDGTHEME"),c=d.join(s);l=void 0!==cssjslist[c]?r+(n="/salesiq"+d[0]+s+"_"+cssjslist[c]+"_"+d[1]):r+n;var I=document.createElement("link");I.rel="stylesheet",I.href=l;var g=document.getElementsByTagName("head");$ZSIQChat.notifyOnCDNFailure(I,g,(o+i[e.widgettype]).replace(/WIDGTHEME/g,s),"css"),t&&I.setAttribute("nonce",t),g[0].appendChild(I)}}(),clearTimeout(h),document.body.appendChild(S),(0==$zohosq.fileloadtime||i)&&w();var e=document.getElementById("siqiframe"),a=(e.contentWindow||e.contentDocument.document||e.contentDocument).document,s=$ZSIQChatWindow.getFiles(),n=function(){$ZSIQWidgetUI.checkWidgetVisibility($ZSIQUtil.isChatExist());var e=$ZSIQUtil.getIframe().$Support;e&&!_IS_REVAMP&&(e.handleStatusCallback(),e.handleAudioCallback()),function(){if($ZSIQChat.getWidgetData().widgettype==SIQ_PERSONALIZE){var e=$ZSIQLSDB.get("ZLDPERSONALIZE");e&&$zoho.salesiq.chat.department($ZSIQWidgetUI.getUserDeptMapping()[e])}}(),t&&t(),S.className=S.className.replace(/(?:^|\s)siq_showload(?!\S)/,""),i&&i(),$ZSIQUtil.idetifyVisitorData(),IframeHandler.loadExternalFiles(),r()};if(window._IS_REVAMP){this.handleRevampLoad=n;var o=function(){var t=e.contentDocument;t.open(),t.close(),s.forEach(function(e){$zohosq.nonce&&e.setAttribute("nonce",$zohosq.nonce),t.head.appendChild(e)})};"complete"===a.readyState?o():e.onload=o}else e.onload=n,a.open(),a.write(s),a.close()}},handleIframeLoading:function(e){!$ZSIQChatWindow.getChatWindowDiv()&&$ZSIQChatWindow.isTrackingOnly()?($ZSIQCookie.set("isiframeenabled",!0,864e5,!0),$ZSIQChatWindow.constructIframe(!1,e)):e&&e()},handleESCEvent:function(e){var t=e?e.parent:window;(e=e||window).document.addEventListener("keydown",function(e){27==e.keyCode&&(document.querySelector(".notify-cookie")?$ZSIQNotifyCookie.closeBanner(e):t.$ZSIQChatWindow.closeImagePreview(e,!0))})},RemoveLoadingForTrigger:function(){$ZSIQChatWindow.getChatWindowDiv()&&$ZSIQChatWindow.getChatWindowDiv().classList.remove("siq_showload"),delete $ZSIQUTSAction.widget_interaction,clearTimeout($ZSIQChatWindow.triggerloader)},isBotChatPreview:function(){return!!$ZSIQChat.isPreview()&&window.parent.IS_BOT_PREVIEW},openChatWindow:function(e,t,i){if(!e&&!i)try{$UTSHandler.updateAction({type:"1"})}catch(e){}S.hasAttribute("drag")||(S.style.top=""),$ZSIQWidgetUI.isCSSTransformSupported()?(p(!0),$ZSIQUTSAction.widget_interaction&&(w(),$ZSIQChatWindow.triggerloader=setTimeout(function(){$ZSIQChatWindow.RemoveLoadingForTrigger()},2e3))):S.style.display="block";var a=$ZSIQWidgetUI.getWidgetDiv();try{var s=$ZSIQWidgetUI.getMinWidgetDiv();$ZSIQWidgetUI.addClass(s,"zsiqfanim")}catch(e){$ZSIQWidgetUI.addClass(a,"zsiqfanim")}if($ZSIQWidgetUI.setWidgetState($ZSIQWidgetUI.F_WINDOW),IframeHandler.sendPostMessage("iframestate",!0),$ZSIQUtil.getIframe().$Support){"true"==a.getAttribute("data-autochat")&&$ZSIQUtil.getIframe().$Support.handleAPIFunctionalities("chatstart");var n=$ZSIQUtil.getIframe().$Support;n.getUnreadCount()&&!n.isConversationUIFocussed()&&(n.sendReadCall(),n.removeUnreadCookie(),$ZSIQWidgetUI.removeUnreadCount()),$ZSIQUtil.getIframe().$UI&&!$ZSIQChat.isPreview()&&setTimeout(function(){$ZSIQUtil.getIframe().$UI.handleComponentFocus(),$ZSIQUtil.startChatwindowOnload()},500)}},forceOpenChatWindow:function(){$ZSIQUtil.getIframe().$Support.getParent().$ZSIQWidgetUI.removeCallClass(),$ZSIQUtil.getIframe().$Support.contentdiv=null,$ZSIQUtil.getIframe().$Support.EmbedObj.lchid=-1,$ZSIQUtil.getIframe().$Support.checkAndShowUI(-1),$ZSIQUtil.getIframe().CallImpl.isCallWithChat=!1,$ZSIQUtil.getIframe().$EmbedManger.setQuitStatus(!1)},expandChatWindow:function(){var e=$ZSIQChat.getWidgetData().widgettype;e!=SIQ_FLOAT&&e!=SIQ_PERSONALIZE||($ZSIQWidgetUI.getWidgetDiv().style.display="none");"-10000px"==S.style.top&&(S.style.top=""),$ZSIQWidgetUI.isCSSTransformSupported()?p(!0):S.style.display="block",$ZSIQWidgetUI.setWidgetState($ZSIQWidgetUI.F_WINDOW)},closeChatWindow:function(e){$ZSIQUtil.stopBlinking(),e?$ZSIQChat.isOnboarding()&&$ZSIQWidget.handleCallBacks({"floatwindow.minimize":""}):$ZSIQWidget.handleCallBacks({"chat.close":""}),p(),S.className=S.className.replace(/(?:^|\s)remtrans(?!\S)/,""),IframeHandler.sendPostMessage("iframestate",!1);try{var t=$ZSIQUtil.getAPIValues(),i=$ZSIQUtil.getIframe().$Support,a=i.isChatExist()?i.getRecentLiveChatid():-1;if("hide"==t.floatvisible&&(t.customhtml||-1==a))return void $ZSIQWidgetUI.setWidgetState(-1!=a&&null!=a?$ZSIQWidgetUI.F_BUTTON:$ZSIQWidgetUI.F_STICKER)}catch(e){}var s=$ZSIQWidgetUI.getWidgetDiv();s.className=s.className.replace(/(?:^|\s)zsiqfanim(?!\S)/,"");var n=!1;try{if(a&&-1!=a){var o=$ZSIQWidgetUI.getMinWidgetDiv();o.className=o.className.replace(/(?:^|\s)zsiqfanim(?!\S)/,"")}n=$ZSIQWidgetUI.isStickerMinimized()}catch(e){}$ZSIQWidgetUI.setWidgetState(-1!=a&&null!=a||n?$ZSIQWidgetUI.F_BUTTON:$ZSIQWidgetUI.F_STICKER);var r=$ZSIQWidget.getWidgetObject();if($ZSIQChat.getWidgetData().widgettype==SIQ_FLOAT&&"8"==r.sticker[1].default){try{var l=$ZSIQUtil.getIframe().$Support.EmbedObj,d=$ZSIQUtil.getIframe().$Support.getCookieValue("ZLD"+l.livelsid)["attname_"+l.visitorID]}catch(e){}d&&(document.getElementById("zsiq_maintitle").innerText=d);var c=document.getElementById("zsiq_chatbtn");c&&(c.style.display=1==$ZSIQUtil.getCookieValue("state")?"none":"block")}$ZSIQWidgetUI.checkWidgetVisibility(a)},minimizeChatWindow:function(){if(!$ZSIQChat.isPreview()){if(!$ZSIQUtil.getIframe().$Support.isChatExist()){var e=document.getElementById("zsiq_maintitle");if(e){var t=$ZSIQWidget.getWidgetObject(),i=t.title[1].online?t.title[1].online:t.i18nkeys["float.online.maintitle"];t.status||(i=t.title[1].offline?t.title[1].offline:t.i18nkeys["float.offline.maintitle"]);var a=$ZSIQUtil.getAPIValues().buttontexts;a&&(t.status&&a[0]?i=a[0][0]||i:!t.status&&a[1]&&(i=a[1][0]||i)),e.innerHTML=$ZSIQUtil.getEncodedText(i)}}$ZSIQChat.getWidgetData().widgettype==SIQ_PERSONALIZE&&$ZSIQLSDB.remove("ZLDPERSONALIZE"),$ZSIQChatWindow.closeChatWindow(!0);var s=$ZSIQUtil.getIframe().$Support,n=IframeHandler.getTriggerCookie();if(s.isChatExist()||n)$ZSIQWidgetUI.minimizeSticker();else{var o=$ZSIQWidget.getWidgetObject();if("1"==o.sticker[1].default){var r=document.getElementById("titlediv");$ZSIQUtil.containsClass(r,"zsiq_min")&&(r.className=r.className.replace(/(?:^|\s)zsiq_min(?!\S)/,""))}else if("2"==o.sticker[1].default){var l=document.getElementById("zsiq_float");$ZSIQUtil.containsClass(l,"zsiq_min")&&(l.className=l.className.replace(/(?:^|\s)zsiq_min(?!\S)/,""))}}$ZSIQWidget.handleCallBacks({"floatwindow.minimize":""}),$ZSIQUtil.isCHatwindowMinimized=!0,$ZSIQUtil.getIframe().avUIhandler&&$ZSIQUtil.getIframe().avUIhandler.handleMinimizeState()}},handleChatWindowVisible:function(e,t,i,a,s){if($ZSIQChatWindow.isBotChatPreview())$ZSIQChatWindow.openChatWindow(!0);else if(!t)if(!0!==$ZSIQWidget.getWidgetObject().hideembed){var n=$ZSIQUtil.getAPIValues().floatwindowvisible;s=s||n,(e=e||n)&&("hide"!=e||$ZSIQWidgetUI.getWidgetState()!=$ZSIQWidgetUI.F_WINDOW&&!$ZSIQChat.isPreview()?"show"==e?($ZSIQChatWindow.openChatWindow(!1,a,s),i&&!$ZSIQUtil.getIframe().$Support.isChatExist()&&$ZSIQUtil.getIframe().$Support.openClassicUI()):!isNaN(e)&&0