function launch_chaty(t){(void 0==t||"widget_index"==t)&&(t=0),jQuery("#chaty-widget-"+t).length&&jQuery("#chaty-widget-"+t+" .chaty-cta-button .open-chaty").trigger("click"),jQuery("#chaty-widget-_"+t).length&&jQuery("#chaty-widget-_"+t+" .chaty-cta-button .open-chaty").trigger("click")}!function(t){"use strict";"function"==typeof define&&define.amd?define(["jquery"],t):"undefined"!=typeof module&&module.exports?module.exports=t(require("jquery")):t(jQuery)}(function(t,a){var e,c,i=[],n="",s=/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|ipad|iris|kindle|Android|Silk|lge |maemo|midp|mmp|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows (ce|phone)|xda|xiino/i.test(navigator.userAgent)||/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp( i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i230|iac( |\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc\-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|\-[a-w])|libw|lynx|m1\-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\-2|po(ck|rt|se)|prox|psio|pt\-g|qa\-a|qc(07|12|21|32|60|\-[2-7]|i\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\-|oo|p\-)|sdk\/|se(c(\-|0|1)|47|mc|nd|ri)|sgh\-|shar|sie(\-|m)|sk\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\-|v\-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\-|tdg\-|tel(i|m)|tim\-|t\-mo|to(pl|sh)|ts(70|m\-|m3|m5)|tx\-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\-|your|zeto|zte\-/i.test(navigator.userAgent.substr(0,4))?1:0,o=["System Stack","Arial","Tahoma","Verdana","Helvetica","Times New Roman","Trebuchet MS","Georgia","-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen-Sans,Ubuntu,Cantarell,Helvetica Neue,sans-serif"],h=!1,l=!1,r=0,d=!1,y=!1,g=[],p=0,_=0,f="",u=0,v="";function m(){t(".chaty-text-block:not(.editor-loaded)").length&&t(".chaty-text-block:not(.editor-loaded)").each(function(){text_id=t(this).attr("id"),wp.editor.initialize(text_id,{tinymce:{wpautop:!1,toolbar1:"bold italic underline"},quicktags:!1})})}function $(e){if(a!=t("#chaty-widget-"+e).data("animation")&&"none"!=t("#chaty-widget-"+e).data("animation")){var c="chaty-animation-"+t("#chaty-widget-"+e).data("animation");t("#chaty-widget-"+e+" ."+c).removeClass(c)}t("#chaty-widget-"+e+" .ch-pending-msg").remove()}function w(){var a=!1;i.length&&t.each(i,function(t,e){X(e.triggers.has_countries)&&!A(e.triggers.countries)&&e.triggers.countries.length&&(a=!0)}),a?""!=(n=Z())?b():t.get("https://www.cloudflare.com/cdn-cgi/trace",function(t){var a,e=t.match("loc=(.*)");e.length>1&&(e=e[1])&&(""==(e=e.toUpperCase())&&(e="-"),a=e,"undefined"!=typeof Storage?null==window.sessionStorage.getItem("chaty_user_country_code")&&window.sessionStorage.setItem("chaty_user_country_code",a):Q("chaty_user_country_code")||R("chaty_user_country_code",a,365),b())}):b()}function b(){i.length&&(t("body").append(' '),t.each(i,function(a,e){var c,h="",g="",p=0,_=[],u={},v=(c=e,!X(c.triggers.has_countries)||!!A(c.triggers.countries)||!c.triggers.countries.length||"-"==(n=Z())||-1!=t.inArray(n,c.triggers.countries));v=(v=v&&function t(a){if(a.triggers.has_date_scheduling_rules){var e=a.triggers.date_scheduling_rules.start_date_time,c=a.triggers.date_scheduling_rules.end_date_time,i=new Date,n=(i=Y(i,a.triggers.time_diff)).getFullYear()+"-"+O(i.getMonth()+1)+"-"+O(i.getDate())+" "+O(i.getHours())+":"+O(i.getMinutes())+":"+O(i.getSeconds());return""==c&&!!(e<=n)||""==e&&!!(c>=n)||""!=e&&""!=c&&!!(e<=n)&&!!(c>=n)}return!0}(e))&&function t(a){var e=!0;if(X(a.triggers.has_day_hours_scheduling_rules)&&a.triggers.day_hours_scheduling_rules.length>0){var c=a.triggers.day_hours_scheduling_rules;if(c.length>0){e=!1;for(var i=new Date,n=(i=Y(i,a.triggers.day_time_diff)).getHours(),s=i.getMinutes(),o=i.getDay(),h=0;h=0&&c[h].days<=6?c[h].days==o&&(d=1):7==c[h].days?o>=0&&o<=4&&(d=1):8==c[h].days?o>=1&&o<=5&&(d=1):9==c[h].days&&(6==o||0==o)&&(d=1),1==d&&(n>c[h].start_hours&&n=c[h].start_min&&(l=1):n>c[h].start_hours&&n==c[h].end_hours?s<=c[h].end_min&&(l=1):n==c[h].start_hours&&n==c[h].end_hours&&s>=c[h].start_min&&s<=c[h].end_min&&(l=1),1==l&&s>=c[h].start_min&&s<=c[h].end_min&&(r=1)),1==l&&1==d&&(e=1),1==e&&(h=c.length+1)}}}return e}(e);let m=null,$=0,w=null,b=!1;t.each(e.channels,function(t,a){k(a)&&("Chatway"===a.channel?($=!0,w=a.chatway_position,m=a,("inside-chaty"===w||"chat-view"===e.settings.cta_type)&&(b=!0,p++,_.push(a))):(u=a,_.push(a),p++))}),"open"==e.settings.default_state&&1==p&&"chat-view"!=e.settings.cta_type&&(e.settings.default_state="click",i[a].settings.default_state="click");let M="";$&&(M="has-chatway-channel");if((1!=p||!b)&&v&&p>0&&!t("#chaty-widget-"+e.id).length){var T,B,L=P(e.settings);L="right"==L?"right":"left";var z=q(e);if("chat-view"==e.settings.cta_type){var I,E,H,V,G,F,R,J="";t("body").append(J),E=(I=e).id,null==(H=W(E))&&(H=-1),V=I.settings.cta_body,G=I.settings.cta_head,F=t("title").text(),A(F)?(V=V.replace(/{title}/g,""),G=G.replace(/{title}/g,"")):(V=V.replace(/{title}/g,F),G=G.replace(/{title}/g,F)),V=V.replace(/{url}/g,""+window.location.href+""),G=G.replace(/{url}/g,""+window.location.href+""),R="",R+="",t("#chaty-widget-"+E).append(R)}else{var J="";t("body").append(J)}X(e.triggers.auto_hide_widget)&&parseInt(e.triggers.hide_after)>0&&(t("#chaty-widget-"+e.id).addClass("auto-hide-chaty"),t("#chaty-widget-"+e.id).attr("data-time",e.triggers.hide_after));var Q=N(e.id,"c-widget");if(t("#chaty-widget-"+e.id).addClass(e.settings.show_cta),1==p&&"chat-view"!=e.settings.cta_type){"vertical"!=e.settings.icon_view&&(z="right"!=L?"right":"left");var K=S(u,e.id,z);t("#chaty-widget-"+e.id+" .chaty-i-trigger").append(K),t("#chaty-widget-"+e.id+" .chaty-i-trigger").addClass("single-channel"),t("#chaty-widget-"+e.id+" .chaty-i-trigger .chaty-channel").addClass("single"),t("#chaty-widget-"+e.id+" .chaty-widget").addClass("has-single");var tt=e.settings.cta_text;A(tt)||(tt=x(tt)),"first_click"==e.settings.show_cta&&(Q?(t("#chaty-widget-"+e.id+" .chaty-tooltip").removeClass("chaty-tooltip"),t("#chaty-widget-"+e.id+" .chaty-i-trigger .chaty-channel").addClass("active").addClass("chaty-tooltip").addClass("pos-"+z),t("#chaty-widget-"+e.id+" .chaty-i-trigger .chaty-channel").append(""+tt+"").addClass("active").addClass("has-on-hover"),t("#chaty-widget-"+e.id+" .chaty-i-trigger .chaty-channel a").append(""+tt+"").addClass("has-on-hover"),t("#chaty-widget-"+e.id+" .chaty-i-trigger .chaty-channel a").attr("data-text",tt)):t("#chaty-widget-"+e.id+" .chaty-i-trigger .chaty-channel a").append(""+tt+"").removeClass("active").addClass("has-on-hover")),"all_time"==e.settings.show_cta&&(t("#chaty-widget-"+e.id+" .chaty-i-trigger .chaty-tooltip").append(""+tt+"").addClass("active").addClass("has-on-hover"),t("#chaty-widget-"+e.id+" .chaty-i-trigger.single-channel .chaty-channel a").attr("data-text",tt));var ta=u;("Instagram"!=ta.channel_type||"#ffffff"!=ta.icon_color&&"#fff"!=ta.icon_color)&&(h+="#chaty-widget-"+e.id+" ."+ta.channel_type+"-channel .color-element{ fill: "+ta.icon_color+"; color: "+ta.icon_color+";}",h+="#chaty-widget-"+e.id+" .channel-icon-"+ta.channel_type+" .color-element{ fill: "+ta.icon_color+"; color: "+ta.icon_color+";}"),h+="#chaty-widget-"+e.id+" ."+ta.channel_type+"-channel .chaty-custom-icon { background-color: "+ta.icon_color+"; }",h+="#chaty-widget-"+e.id+" ."+ta.channel_type+"-channel .chaty-svg { background-color: "+ta.icon_color+";}",h+="#chaty-widget-"+e.id+" .channel-icon-"+ta.channel_type+" .chaty-svg { background-color: "+ta.icon_color+";}","Contact_Us"==ta.channel_type&&(h+=".chaty-contact-form-box #chaty-submit-button-"+e.id+" {background-color: "+ta.contact_form_settings.button_bg_color+"; color: "+ta.contact_form_settings.button_text_color+";} ",h+="#chaty-form-"+e.id+"-Contact_Us .chaty-contact-form-title {background-color: "+ta.contact_form_settings.title_bg_color+"; } ");var te='
';t("#chaty-widget-"+e.id+" .chaty-i-trigger").append(te)}else{t.each(e.channels,function(a,c){if(k(c)&&("Chatway"!==c.channel||"inside-chaty"===w||"chat-view"===e.settings.cta_type)){if(U(c.channel_type)&&(c.channel_type=c.channel),"chat-view"==e.settings.cta_type){var i=S(c,e.id,"top");t(".chaty-chat-view-"+e.id+" .chaty-view-channels").append(i)}else{var i=S(c,e.id,z);t("#chaty-widget-"+e.id+" .chaty-channel-list").append(i)}("Instagram"!=c.channel_type||"#ffffff"!=c.icon_color&&"#fff"!=c.icon_color)&&(h+="#chaty-widget-"+e.id+" ."+c.channel_type+"-channel .color-element{ fill: "+c.icon_color+"; color: "+c.icon_color+";}",h+="#chaty-widget-"+e.id+" .channel-icon-"+c.channel_type+" .color-element{ fill: "+c.icon_color+"; color: "+c.icon_color+";}"),h+="#chaty-widget-"+e.id+" ."+c.channel_type+"-channel .chaty-custom-icon { background-color: "+c.icon_color+"; }",h+="#chaty-widget-"+e.id+" ."+c.channel_type+"-channel .chaty-svg { background-color: "+c.icon_color+";}",h+="#chaty-widget-"+e.id+" .channel-icon-"+c.channel_type+" .chaty-svg { background-color: "+c.icon_color+";}",h+=".chaty-chat-view-"+e.id+" ."+c.channel_type+"-channel .chaty-custom-icon { background-color: "+c.icon_color+"; }",h+=".chaty-chat-view-"+e.id+" ."+c.channel_type+"-channel .chaty-svg { background-color: "+c.icon_color+";}",h+=".chaty-chat-view-"+e.id+" .channel-icon-"+c.channel_type+" .chaty-svg { background-color: "+c.icon_color+";}","Contact_Us"==c.channel_type&&(h+=".chaty-contact-form-box #chaty-submit-button-"+e.id+" {background-color: "+c.contact_form_settings.button_bg_color+"; color: "+c.contact_form_settings.button_text_color+";} ",h+="#chaty-form-"+e.id+"-Contact_Us .chaty-contact-form-title {background-color: "+c.contact_form_settings.title_bg_color+"; } ")}});var tc,ti,tn=(tc=e.settings,ti=e.id,(""==tc.widget_icon?tc.widget_icon="chat-base":"chat-image"==tc.widget_icon&&A(tc.widget_icon_url)?tc.widget_icon="chat-base":"chat-fa-icon"==tc.widget_icon&&A(tc.widget_fa_icon)&&(tc.widget_icon="chat-base"),"chat-image"==tc.widget_icon)?"Chaty Widget":"chat-fa-icon"==tc.widget_icon?"":''+function t(a,e,c,i){switch(a){case"chat-smile":return'';case"chat-bubble":return'';case"chat-db":return'';default:return''}}(tc.widget_icon,tc.widget_color,tc.widget_icon_color,ti)+""),tt=e.settings.cta_text;"first_click"!=e.settings.show_cta||Q||(tt="");var ts=z;"horizontal"==e.settings.icon_view&&(ts="left"==L?"right":"left"),A(tt)||(tt=x(tt));var to='
'+tt+'
';t("#chaty-widget-"+e.id+" .chaty-i-trigger").html(to);var te='
';t("#chaty-widget-"+e.id+" .chaty-i-trigger").append(te)}t.each(e.channels,function(t,a){"Contact_Us"==a.channel_type&&"yes"==a.hide_recaptcha_badge&&(h+=".grecaptcha-badge {visibility: hidden;}")}),"chat-view"==e.settings.cta_type&&e.settings.show_close_button;var th,tl,tr,td,Q=N(e.id,"c-widget");Q&&("open"!=e.settings.default_state||1==p)&&(th=e.settings,N(tl=e.id,"c-widget")&&X(th.is_pending_mesg_enabled)&&parseInt(th.pending_mesg_count)>0&&(t("#chaty-widget-"+tl+" .chaty-widget").hasClass("has-single")?"sheen"==th.attention_effect||"spin"==th.attention_effect||"pulse"==th.attention_effect?t("#chaty-widget-"+tl+" .chaty-i-trigger .chaty-channel").append(""+th.pending_mesg_count+""):t("#chaty-widget-"+tl+" .chaty-i-trigger .chaty-channel .chaty-svg").append(""+th.pending_mesg_count+""):"jump"==th.attention_effect||"waggle"==th.attention_effect||"blink"==th.attention_effect||"pulse-icon"==th.attention_effect||"floating"==th.attention_effect?t("#chaty-widget-"+tl+" .chaty-i-trigger .chaty-cta-main .chaty-cta-button").append(""+th.pending_mesg_count+""):t("#chaty-widget-"+tl+" .chaty-i-trigger .chaty-cta-main").append(""+th.pending_mesg_count+"")),tr=e.settings,N(td=e.id,"c-widget")&&"none"!=tr.attention_effect&&""!=tr.attention_effect&&(t("#chaty-widget-"+td).attr("data-animation",tr.attention_effect),t("#chaty-widget-"+td+" .chaty-widget").hasClass("has-single")?t("#chaty-widget-"+td+" .chaty-i-trigger .chaty-channel .chaty-svg").addClass("chaty-animation-"+tr.attention_effect):t("#chaty-widget-"+td+" .chaty-i-trigger .chaty-cta-main .chaty-cta-button").addClass("chaty-animation-"+tr.attention_effect)));var ty=0;if("open"!=e.settings.default_state||X(e.settings.show_close_button)||(t("#chaty-widget-"+e.id+" .chaty-widget").addClass("chaty-no-close-button").addClass("chaty-open"),ty=1),$&&(t("#chaty-widget-"+e.id+" .chaty-widget").addClass(w),"above-chaty"===w)){t("#chaty-widget-"+e.id+" .chaty-widget").addClass("has-chatway");let tg=q(e),tp=S(m,e.id,tg,a,e.settings);t("#chaty-widget-"+e.id).length&&(t("#chaty-widget-"+e.id+" .chaty-channel-list").prepend(tp),f+="#chaty-widget-"+e.id+" ."+m.channel_type+"-channel .color-element{ fill: "+m.icon_color+"; color: "+m.icon_color+";}",f+="#chaty-widget-"+e.id+" ."+m.channel_type+"-channel .csaas-svg { background-color: "+m.icon_color+";}",f+=".channel-"+e.id+"-"+m.channel_type+" .csaas-svg { background-color: "+m.icon_color+";}",h+="#chaty-widget-"+e.id+" ."+m.channel_type+"-channel .chaty-custom-icon { background-color: "+m.icon_color+"; }",h+="#chaty-widget-"+e.id+" ."+m.channel_type+"-channel .chaty-svg { background-color: "+m.icon_color+";}",h+="#chaty-widget-"+e.id+" .channel-icon-"+m.channel_type+" .chaty-svg { background-color: "+m.icon_color+";}")}X(e.settings.is_google_analytics_enabled)&&(t("#chaty-widget-"+e.id+" .chaty-channel-list .chaty-channel > a").addClass("has-gae"),t("#chaty-form-"+e.id+"-chaty-chat-view .chaty-channel > a").addClass("has-gae"),t("#chaty-widget-"+e.id+" .chaty-i-trigger.single-channel .chaty-channel > a").addClass("has-gae"),t(".chaty-outer-forms.chaty-whatsapp-btn-form.chaty-form-"+e.id+" form.add-analytics").addClass("form-google-analytics"),t(".whatsapp-chaty-form-"+e.id).addClass("has-form-gae")),X(e.settings.has_custom_css)&&!A(e.settings.custom_css)&&(g+=e.settings.custom_css),"hover"==e.settings.default_state?t("#chaty-widget-"+e.id).addClass("open-on-hover"):"open"!=e.settings.default_state||(t("#chaty-widget-"+e.id+" .chaty-widget").addClass("default-open"),(Q||!X(e.settings.show_close_button))&&t("#chaty-widget-"+e.id+" .chaty-widget:not(.has-single)").addClass("chaty-open"),Q||t("#chaty-widget-"+e.id+" .chaty-widget").removeClass("default-open")),t("#chaty-widget-"+e.id+" .chaty-widget:not(.has-single):not(.chaty-no-close-button)").hasClass("default-open")?X(e.settings.bg_blur_effect)&&t("body").addClass("add-bg-blur-effect"):t("body").removeClass("add-bg-blur-effect"),X(e.settings.bg_blur_effect)&&t("#chaty-widget-"+e.id+" .chaty-widget:not(.chaty-no-close-button)").addClass("has-bg-blur-effect");var t_=(T=e.settings.widget_size,B=e.settings.custom_widget_size,T);if(t_=parseInt(t_),h+="#chaty-widget-"+e.id+" .chaty-channel-list .chaty-channel {width: "+t_+"px; height: "+t_+"px; }",h+="#chaty-widget-"+e.id+" .chaty-channel-list .chaty-channel > a {width: "+t_+"px; height: "+t_+"px; }",h+="#chaty-widget-"+e.id+" .chaty-channel-list .chaty-channel > a .chaty-custom-icon {display:block; width: "+t_+"px; height: "+t_+"px; line-height: "+t_+"px; font-size: "+parseInt(t_/2)+"px; }",h+="#chaty-widget-"+e.id+" .chaty-channel-list .chaty-channel button {width: "+t_+"px; height: "+t_+"px; margin: 0; padding:0; outline: none; border-radius: 50%;}",h+="#chaty-widget-"+e.id+" .chaty-channel-list .chaty-channel .chaty-svg {width: "+t_+"px; height: "+t_+"px; }",h+="#chaty-widget-"+e.id+" .chaty-channel-list .chaty-channel .chaty-svg img {width: "+t_+"px; height: "+t_+"px; }",h+="#chaty-widget-"+e.id+" .chaty-channel-list .chaty-channel span.chaty-icon {width: "+t_+"px; height: "+t_+"px; }",h+="#chaty-widget-"+e.id+" .chaty-channel-list .chaty-channel a {width: "+t_+"px; height: "+t_+"px; }",h+="#chaty-widget-"+e.id+" .chaty-channel-list .chaty-channel .chaty-svg .chaty-custom-channel-icon {width: "+t_+"px; height: "+t_+"px; line-height: "+t_+"px; display: block; font-size:"+parseInt(t_/2)+"px; }",h+="#chaty-widget-"+e.id+" .chaty-i-trigger .chaty-cta-button {background-color: "+e.settings.widget_color+"; }",h+="#chaty-widget-"+e.id+" .chaty-i-trigger .chaty-cta-button button {background-color: "+e.settings.widget_color+"; }",h+="#chaty-widget-"+e.id+" .chaty-i-trigger .chaty-channel {width: "+t_+"px; height: "+t_+"px; }",h+="#chaty-widget-"+e.id+" .chaty-i-trigger .chaty-channel > a {width: "+t_+"px; height: "+t_+"px; }",h+="#chaty-widget-"+e.id+" .chaty-i-trigger .chaty-channel > a .chaty-custom-icon {display:block; width: "+t_+"px; height: "+t_+"px; line-height: "+t_+"px; font-size: "+parseInt(t_/2)+"px; }",h+="#chaty-widget-"+e.id+" .chaty-i-trigger .chaty-channel button {width: "+t_+"px; height: "+t_+"px; margin: 0; padding:0; outline: none; border-radius: 50%;}",h+="#chaty-widget-"+e.id+" .chaty-i-trigger .chaty-channel .chaty-svg {width: "+t_+"px; height: "+t_+"px; }",h+="#chaty-widget-"+e.id+" .chaty-i-trigger .chaty-channel .chaty-svg img {width: "+t_+"px; height: "+t_+"px; }",h+="#chaty-widget-"+e.id+" .chaty-i-trigger .chaty-channel span.chaty-icon {width: "+t_+"px; height: "+t_+"px; }",h+="#chaty-widget-"+e.id+" .chaty-i-trigger .chaty-channel a {width: "+t_+"px; height: "+t_+"px; }",h+="#chaty-widget-"+e.id+" .chaty-i-trigger .chaty-channel .chaty-svg .chaty-custom-channel-icon {width: "+t_+"px; height: "+t_+"px; line-height: "+t_+"px; display: block; font-size:"+parseInt(t_/2)+"px; }",h+="#chaty-widget-"+e.id+" .chaty-i-trigger .ch-pending-msg {background-color: "+e.settings.pending_mesg_count_bgcolor+"; color: "+e.settings.pending_mesg_count_color+"; }",h+="#chaty-widget-"+e.id+" .chaty-i-trigger .chaty-channel .chaty-svg .widget-fa-icon {line-height: "+t_+"px; font-size:"+parseInt(t_/2)+"px; }","vertical"==e.settings.icon_view){h+="#chaty-widget-"+e.id+" .chaty-channel-list {height: "+p*(t_+8)+"px; }",h+="#chaty-widget-"+e.id+" .chaty-channel-list {width: "+(t_+8)+"px; }";for(var tf=0;tf<=p;tf++)h+="#chaty-widget-"+e.id+" .chaty-open .chaty-channel-list .chaty-channel:nth-child("+(tf+1)+") {-webkit-transform: translateY(-"+(t_+8)*(p-tf-ty)+"px); transform: translateY(-"+(t_+8)*(p-tf-ty)+"px);}",h+="#chaty-widget-"+e.id+" .chaty-open.above-chaty.has-chatway .chaty-channel-list .chaty-channel:nth-child("+(tf+1)+") {-webkit-transform: translateY(-"+(t_+8)*(p-tf-ty+1)+"px); transform: translateY(-"+(t_+8)*(p-tf-ty+1)+"px);}";if($&&"inside-chaty"==w){let tu=0,tv=1;for(let tm=0;tm<_.length;tm++)ta=_[tm],h+="body.chatway--active #chaty-widget-"+e.id+" .chaty-open .chaty-channel-list .chaty-channel."+ta.channel+"-link {-webkit-transform: translateY(-"+(t_+8)*(p-tu-ty)+"px); transform: translateY(-"+(t_+8)*(p-tu-ty)+"px);}","Chatway"!=ta.channel?h+="body:not(.chatway--active) #chaty-widget-"+e.id+" .chaty-open .chaty-channel-list .chaty-channel."+ta.channel+"-channel-link {-webkit-transform: translateY(-"+(t_+8)*(p-tu-tv-ty)+"px); transform: translateY(-"+(t_+8)*(p-tu-tv-ty)+"px);}":tv=0,tu++}else{let t$=0;for(t$=0;t$<=p;t$++)h+="#chaty-widget-"+e.id+" .chaty-open .chaty-channel-list .chaty-channel:nth-child("+(t$+1)+") {-webkit-transform: translateY(-"+(t_+8)*(p-t$-ty)+"px); transform: translateY(-"+(t_+8)*(p-t$-ty)+"px);}";"above-chaty"==w&&(h+="#chaty-widget-"+e.id+" .chaty-channel-list .Chatway-channel-link {-webkit-transform: translateY(-"+(t_+8)*ty+"px); transform: translateY(-"+(t_+8)*(1-ty)+"px);}")}}else{t("#chaty-widget-"+e.id+" .chaty-widget").addClass("hor-mode"),h+="#chaty-widget-"+e.id+" .chaty-channel-list {width: "+p*(t_+8)+"px; }",h+="#chaty-widget-"+e.id+" .chaty-channel-list {height: "+t_+"px; }";let tw=0;if($&&"inside-chaty"==w){let t0=0,t8=1;for(let t3=0;t3<_.length;t3++)ta=_[t3],h+="body.chatway--active .chaty-widget-"+e.id+" .chaty-widget.left-position.hor-mode.chaty-open .chaty-channel-list .chaty-channel:nth-child("+(t0+1)+") {-webkit-transform: translateX("+(t_+8)*(p-t0-ty)+"px); transform: translateX("+(t_+8)*(p-t0-ty)+"px);}",h+="body.chatway--active .chaty-widget-"+e.id+" .chaty-widget.right-position.hor-mode.chaty-open .chaty-channel-list .chaty-channel:nth-child("+(t0+1)+") {-webkit-transform: translateX(-"+(t_+8)*(p-t0-ty)+"px); transform: translateX(-"+(t_+8)*(p-t0-ty)+"px);}","Chatway"!=ta.channel?(h+="body:not(.chatway--active) #chaty-widget-"+e.id+" .chaty-widget.left-position.hor-mode.chaty-open .chaty-channel-list .chaty-channel:nth-child("+(t0+1)+") {-webkit-transform: translateX("+(t_+8)*(p-t0-t8-ty)+"px); transform: translateX("+(t_+8)*(p-t0-t8-ty)+"px);}",h+="body:not(.chatway--active) #chaty-widget-"+e.id+" .chaty-widget.right-position.hor-mode.chaty-open .chaty-channel-list .chaty-channel:nth-child("+(t0+1)+") {-webkit-transform: translateX(-"+(t_+8)*(p-t0-t8-ty)+"px); transform: translateX(-"+(t_+8)*(p-t0-t8-ty)+"px);}"):t8=0,t0++}else{for(tw=0;tw<=p;tw++)h+="#chaty-widget-"+e.id+" .chaty-widget.left-position.hor-mode.chaty-open .chaty-channel-list .chaty-channel:nth-child("+(tw+1)+") {-webkit-transform: translateX("+(t_+8)*(p-tw-ty)+"px); transform: translateX("+(t_+8)*(p-tw-ty)+"px);}",h+="#chaty-widget-"+e.id+" .chaty-widget.right-position.hor-mode.chaty-open .chaty-channel-list .chaty-channel:nth-child("+(tw+1)+") {-webkit-transform: translateX(-"+(t_+8)*(p-tw-ty)+"px); transform: translateX(-"+(t_+8)*(p-tw-ty)+"px);}";"above-chaty"==w&&(h+="#chaty-widget-"+e.id+" .chaty-widget.left-position.hor-mode .chaty-channel-list .Chatway-channel-link {-webkit-transform: translateX("+(t_+8)*(1-ty)+"px); transform: translateX("+(t_+8)*(1-ty)+"px);}",h+="#chaty-widget-"+e.id+" .chaty-widget.right-position.hor-mode .chaty-channel-list .Chatway-channel-link {-webkit-transform: translateX(-"+(t_+8)*(1-ty)+"px); transform: translateX(-"+(t_+8)*(1-ty)+"px);}")}}var t1=e.settings.bottom_spacing,t6=e.settings.side_spacing;h+="#chaty-widget-"+e.id+" .chaty-widget {bottom: "+t1+"px}","left"==L?(h+="#chaty-widget-"+e.id+" .chaty-widget {left: "+t6+"px; right: auto;}",h+=".chaty-outer-forms.pos-left.chaty-form-"+e.id+" {left: "+t6+"px}",t(".chaty-form-"+e.id).addClass("pos-left")):(h+="#chaty-widget-"+e.id+" .chaty-widget {right: "+t6+"px; left:auto;}",t(".chaty-form-"+e.id).addClass("pos-right"),h+=".chaty-outer-forms.pos-right.chaty-form-"+e.id+" {right: "+t6+"px; left:auto;}"),t(".chaty-form-"+e.id).show();var tb=t_+15+parseInt(t1);h+=".chaty-outer-forms.active.chaty-form-"+e.id+" {-webkit-transform: translateY(-"+tb+"px); transform: translateY(-"+tb+"px)} ",h+="#chaty-widget-"+e.id+".chaty:not(.form-open) .chaty-widget.chaty-open + .chaty-chat-view {-webkit-transform: translateY(-"+tb+"px); transform: translateY(-"+tb+"px)} ",h+="#chaty-widget-"+e.id+" .chaty-tooltip:after {background-color: "+e.settings.cta_bg_color+"; color: "+e.settings.cta_text_color+"}",h+="#chaty-widget-"+e.id+" .chaty-tooltip.pos-top:before {border-top-color: "+e.settings.cta_bg_color+"; }",h+="#chaty-widget-"+e.id+" .chaty-tooltip.pos-left:before {border-left-color: "+e.settings.cta_bg_color+"; }",h+="#chaty-widget-"+e.id+" .chaty-tooltip.pos-right:before {border-right-color: "+e.settings.cta_bg_color+";}",h+="#chaty-widget-"+e.id+" .on-hover-text {background-color: "+e.settings.cta_bg_color+"; color: "+e.settings.cta_text_color+"}",h+="#chaty-widget-"+e.id+" .chaty-tooltip.pos-top .on-hover-text:before {border-top-color: "+e.settings.cta_bg_color+"; }",h+="#chaty-widget-"+e.id+" .chaty-tooltip.pos-left .on-hover-text:before {border-left-color: "+e.settings.cta_bg_color+"; }",h+="#chaty-widget-"+e.id+" .chaty-tooltip.pos-right .on-hover-text:before {border-right-color: "+e.settings.cta_bg_color+";}";var t7=tb+72+t_;t7>0&&(h+=".chaty-outer-forms.chaty-form-"+e.id+" .chaty-agent-body {max-height: calc(100vh - "+t7+"px); overflow-y: auto; } "),h+="#chaty-form-"+e.id+"-chaty-chat-view .chaty-view-header {background-color: "+e.settings.cta_head_bg_color+";}",h+="#chaty-form-"+e.id+"-chaty-chat-view .chaty-view-header {color: "+e.settings.cta_head_text_color+";}",h+="#chaty-form-"+e.id+"-chaty-chat-view .chaty-view-header svg {fill : "+e.settings.cta_head_text_color+";}";var t2=tb+82+t_;t2>0&&(h+=".chaty-outer-forms.chaty-contact-form-box.chaty-form-"+e.id+" .chaty-contact-inputs {max-height: calc(100vh - "+t2+"px); overflow-y: auto; } "),(25!=t1||25!=t6)&&(t(".chaty-outer-forms.chaty-form-"+e.id).addClass("custom-cht-pos"),t("#chaty-widget-"+e.id).addClass("has-custom-pos"));var t5=parseInt(t("#chaty-form-"+e.id+"-Whatsapp .chaty-whatsapp-header").outerHeight())+parseInt(t("#chaty-form-"+e.id+"-Whatsapp .chaty-whatsapp-footer").outerHeight())+parseInt(t_)+parseInt(t1)+20;if(h+="#chaty-form-"+e.id+"-Whatsapp .chaty-whatsapp-body { max-height: calc(100vh - "+t5+"px); overflow-y: auto; }",N(e.id,"v-widget")&&(X(e.triggers.exit_intent)||X(e.triggers.has_time_delay)||X(e.triggers.has_display_after_page_scroll)>0)?(X(e.triggers.has_time_delay)&&0==parseInt(e.triggers.time_delay)?(j(e.id),t("#chaty-widget-"+e.id).addClass("active")):X(e.triggers.has_time_delay)&&parseInt(e.triggers.time_delay)>0&&(l=!0,parseInt(e.triggers.time_delay)>r&&(r=e.triggers.time_delay),t("#chaty-widget-"+e.id).addClass("on-chaty-delay"),t("#chaty-widget-"+e.id).addClass("delay-time-"+parseInt(e.triggers.time_delay)),t("#chaty-widget-"+e.id).attr("data-time",parseInt(e.triggers.time_delay))),X(e.triggers.has_display_after_page_scroll)&&0==parseInt(e.triggers.display_after_page_scroll)?(j(e.id),t("#chaty-widget-"+e.id).addClass("active")):X(e.triggers.has_display_after_page_scroll)&&parseInt(e.triggers.display_after_page_scroll)>0&&(d=!0,t("#chaty-widget-"+e.id).addClass("on-chaty-scroll"),t("#chaty-widget-"+e.id).addClass("page-scroll-"+parseInt(e.triggers.display_after_page_scroll)),t("#chaty-widget-"+e.id).attr("data-scroll",parseInt(e.triggers.display_after_page_scroll))),X(e.triggers.exit_intent)&&(y=!0,t("#chaty-widget-"+e.id).addClass("on-chaty-exit-intent"))):(j(e.id),t("#chaty-widget-"+e.id).addClass("active")),!A(e.settings.font_family)&&"none"!=e.settings.font_family){var t4=e.settings.font_family;-1!=t.inArray(t4,o)?"System Stack"==t4&&(t4="-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen-Sans,Ubuntu,Cantarell,Helvetica Neue,sans-serif"):(t("head").append(''),t("head").append('')),h+="#chaty-widget-"+e.id+", #chaty-widget-"+e.id+" .chaty-tooltip:after {font-family: "+t4+"}"}}y&&(s?function a(){if(window.history&&window.history.pushState&&y){function e(){y&&""!==location.hash.split("#!/")[1]&&""===window.location.hash&&D()}var c=100;window.history.state&&window.history.state.page&&(c=window.history.state.page),window.history.pushState({page:c+1},""),window.history.pushState({page:c+2},""),window.onpopstate=function(){e()},window.history.onpopstate=function(){e()},window.addEventListener("popstate",function(){e()}),document.addEventListener("backbutton",function(){e()}),window.addEventListener("backbutton",function(){e()}),t(window).on("popstate",function(){e()})}}():t(document).mouseleave(function(t){var a,e,c="mouseout";a=document,e=function(t){null==t.toElement&&null==t.relatedTarget&&D()},a.addEventListener?(a.addEventListener(c,e,!1),D()):a.attachEvent&&a.attachEvent("on"+c,e)})),""!=h&&(t("#custom-chaty-css").length||t("head").append(""),t("#custom-chaty-css").append(h)),""!=g&&(t("#custom-advance-chaty-css").length||t("head").append(""),t("#custom-advance-chaty-css").append(g)),i.length,t(".chaty-sms-channel").length&&t(".chaty-sms-channel").each(function(){var a=t(this).attr("href");a=(a=a.replace(/{title}/g,C())).replace(/{url}/g,window.location.href),t(this).attr("href",a)}),t(document).on("click","#chaty-widget-"+e.id+" .chaty-i-trigger .chaty-channel",function(){t(this).closest(".chaty-widget").hasClass("has-single")?t(this).closest(".chaty").hasClass("form-open")&&(X(e.settings.bg_blur_effect)?t("body").addClass("add-bg-blur-effect"):t("body").removeClass("add-bg-blur-effect")):t(this).closest(".chaty-widget").hasClass("chaty-open")?t("body").removeClass("add-bg-blur-effect"):!t(this).closest(".chaty-widget").hasClass("chaty-no-close-button")&&X(e.settings.bg_blur_effect)&&t("body").addClass("add-bg-blur-effect")})}),t("#custom-advance-chaty-css").length||t("head").append(""),t("#custom-advance-chaty-css").append(f),(t(".v3_site_key").length&&!A(t(".v3_site_key").val())||t(".v2_site_key").length&&!A(t(".v2_site_key").val()))&&function t(){if(jQuery(".v2_site_key").length&&""!=jQuery(".v2_site_key").val()){var a=document.createElement("script");a.type="text/javascript",a.async=!0,a.src="https://www.google.com/recaptcha/api.js?onload=onloadChatyCallback&render=explicit&hl=en",(document.getElementsByTagName("head")[0]||document.getElementsByTagName("body")[0]).appendChild(a)}jQuery(".v3_site_key").length&&""!=jQuery(".v3_site_key").val()&&jQuery(".v3_site_key").length&&""!=jQuery(".v3_site_key").val()&&jQuery(".front-google-captcha").length&&jQuery(".front-google-captcha:not(.loaded)").each(function(){jQuery(this).addClass("loaded");var t=jQuery(".v3_site_key").val(),a=document.createElement("script");a.type="text/javascript",a.async=!0,a.src="https://www.google.com/recaptcha/api.js?onload=onloadCallbackChatyV3&render="+t,(document.getElementsByTagName("head")[0]||document.getElementsByTagName("body")[0]).appendChild(a),a.loadEventEnd=function(){}})}()),t(".chaty-tooltip").each(function(){""==t(this).data("hover")&&t(this).removeClass("left").removeClass("right").removeClass("top").removeClass("chaty-tooltip")}),t(".chaty.auto-hide-chaty").length&&(c=setInterval(function(){var a=++u;if(t(".chaty.auto-hide-chaty.hide-after-"+u).length){var e=t(".chaty.auto-hide-chaty.hide-after-"+a).data("id");t(".chaty-form-"+e).removeClass("active"),t(".chaty.auto-hide-chaty.hide-after-"+a).removeClass("active"),t("#chaty-widget-"+e).removeClass("auto-hide-chaty"),t("body").removeClass("add-bg-blur-effect")}0==t(".chaty.auto-hide-chaty").length&&clearInterval(c)},1e3)),l&&(e=setInterval(function(){if(t(".chaty.delay-time-"+ ++p).length){var a=t(".chaty.delay-time-"+p).data("id");V(a)}},1e3)),d&&(t(window).on("scroll",function(){if(d){var a=t(document).height()-t(window).height(),e=t(window).scrollTop();if(0!=a){var c=parseInt(e/a*100);if(_<=c){var i=_;_=c;for(var n=i;n<=c;n++)-1==t.inArray(n,g)&&t(".chaty.on-chaty-scroll.page-scroll-"+n).length&&t(".chaty.on-chaty-scroll.page-scroll-"+n).each(function(){var a=t(this).data("id");t(this).removeClass("on-chaty-scroll"),V(a)});_=c}}}}),window.innerWidth,document.documentElement.clientWidth)}function C(){return t("title").length?t("title").text():""}function x(t){return new DOMParser().parseFromString(t,"text/html").documentElement.textContent}function k(t){if(X(t.is_agent)){if(t.agent_data.length&&(!s&&X(t.is_agent_desktop)||s&&X(t.is_agent_mobile)))return!0}else if((!s&&X(t.is_desktop)||s&&X(t.is_mobile))&&(""!=t.value||"Contact_Us"==t.channel||"Chatway"==t.channel))return!0;return!1}function j(a){if(t("#chaty-widget-"+a+" .chaty-channel.chaty-default-open").length){var e=t("#chaty-widget-"+a+" .chaty-channel.chaty-default-open a.chaty-whatsapp-btn-form").data("form");if(!A(e)){var c=N(a,"c-"+t("#chaty-widget-"+a+" .chaty-channel.chaty-default-open").data("channel"));if(c&&(t("#"+e).addClass("is-active"),t("#"+e).length)){var n=t("#chaty-widget-"+a+" .chaty-channel.chaty-default-open a.chaty-whatsapp-btn-form").html()+""+chaty_settings.lang.hide_whatsapp_form+"";if($(a),t("#chaty-widget-"+a).find(".ch-pending-msg").remove(),t("#chaty-widget-"+a+" .chaty-widget").removeClass("chaty-open"),t("#chaty-widget-"+a).addClass("form-open"),t("#"+e).addClass("active"),t("#chaty-widget-"+a+" .chaty-widget:not(.chaty-no-close-button)").hasClass("has-bg-blur-effect")&&t("body").addClass("add-bg-blur-effect"),setTimeout(function(){t(".chaty-whatsapp-btn-form.active .chaty-whatsapp-input").focus()},100),t("#chaty-widget-"+a+" .open-chaty-channel").html(n),t("#chaty-widget-"+a).addClass("active"),t("#chaty-widget-"+a).addClass("active"),t("#chaty-widget-"+a).hasClass("auto-hide-chaty")){var o=parseInt(t("#chaty-widget-"+a).data("time"));o>0&&(o+=u,t("#chaty-widget-"+a).addClass("hide-after-"+o))}if("on"==chaty_settings.data_analytics_settings){var l=[],r=t("#chaty-widget-"+a+" .chaty-channel.chaty-default-open").data("channel"),d=N(a,"v-"+r);if(d&&void 0!==r&&(G(a,"v-"+r),l.push(r)),!h&&l.length){var y=t("#chaty-widget-"+a).data("nonce");t.ajax({url:chaty_settings.ajax_url,data:{widgetId:a,channels:l,userId:a,isMobile:s,widgetNonce:y,action:"update_chaty_channel_views"},type:"post",dataType:"json",success:function(t){},error:function(t,a,e){monitorErrorLog(t,a,e)}})}}return}}}if(t("#chaty-widget-"+a).addClass("active"),t("#chaty-widget-"+a).hasClass("auto-hide-chaty")){var o=parseInt(t("#chaty-widget-"+a).data("time"));o>0&&(o+=u,t("#chaty-widget-"+a).addClass("hide-after-"+o))}J("hide-bg-blur-effect")&&t("body").removeClass("add-bg-blur-effect");var g=N(a,"v-widget");if(g){G(a,"v-widget"),t("#chaty-widget-"+a).data("user");var r,l=[],p=0,_=0;i[t("#chaty-widget-"+a).data("key")];var f=J("activechatyWidgets");if(null!=f?(f=f.split(","),-1==t.inArray(a,f)&&(f.push(a),R("activechatyWidgets",f=f.join(","),1))):(f=a,R("activechatyWidgets",f,1)),t("#chaty-widget-"+a+" .chaty-widget").hasClass("has-single")){p=1,r=t("#chaty-widget-"+a+" .chaty-channel").data("channel");var d=N(a,"v-"+r);d&&void 0!==r&&(G(a,"v-"+r),l.push(r))}else t("#chaty-widget-"+a+" .chaty-widget").hasClass("chaty-open")&&(_=1,t("#chaty-widget-"+a).hasClass("chaty-has-chat-view")?t(".chaty-chat-view.chaty-chat-view-"+a+" .chaty-view-channels").find(".chaty-channel").each(function(){chatyChannel=t(this).data("channel"),(c=N(a,"v-"+chatyChannel))&&"undefined"!=typeof chatyChannel&&(G(a,"v-"+chatyChannel),l.push(chatyChannel))}):t("#chaty-widget-"+a+" .chaty-channel-list .chaty-channel").each(function(){r=t(this).data("channel"),N(a,"v-"+r)&&void 0!==r&&(G(a,"v-"+r),l.push(r))}));if(g&&!h){var y=t("#chaty-widget-"+a).data("nonce");h||t.ajax({url:chaty_settings.ajax_url,data:{widgetId:a,channels:l,userId:a,isMobile:s,isOpen:_,isSingle:p,widgetNonce:y,action:"update_chaty_widget_views"},type:"post",dataType:"json",success:function(t){},error:function(t,a,e){monitorErrorLog(t,a,e)}})}}}function M(a){var e=t("#chaty-widget-"+a).data("user");chatySaasCheckCookie("triggeredFor"+e)||R("triggeredFor"+e,a,2)}function T(t,a){return t}function S(a,e,c){var i="";if(X(a.is_agent)){if(a.agent_data.length){var n=0,o=[];if(t.each(a.agent_data,function(t,a){""!=a.value&&(n++,o=a)}),n>0){var h,l,r,d,y,g,p=W(e);return null==p&&(p=-1),r=a,d=e,y="",null==(g=W(d))&&(g=-1),y+="",f+=".chaty-agent-header.agent-info-"+d+"-"+r.channel+" { background-color: "+r.header_bg_color+"; color: "+r.header_text_color+" } ",f+=".agent-info-"+d+"-"+r.channel+" .chaty-close-agent-list svg { fill: "+r.header_text_color+" } ",t("body").append(y),h=E(a,e),l=I(a,h,c,e),("Instagram"!=a.channel||"#ffffff"!=a.icon_color&&"#fff"!=a.icon_color)&&(f+=".chaty-agent-"+e+"-"+a.channel+" .color-element {fill: "+a.icon_color+"; color: "+a.icon_color+";}"),f+=".chaty-agent-"+e+"-"+a.channel+" .chaty-custom-icon { background-color: "+a.icon_color+";}",f+=".chaty-agent-"+e+"-"+a.channel+" .chaty-svg-img { background-color: "+a.icon_color+";}","
"+l+"
"}}}else{U(a.channel_type)&&(a.channel_type=a.channel);var h=E(a,e),l=I(a,h,c,e);return"Contact_Us"==a.channel_type?i+=" has-chaty-box chaty-contact-form":"Whatsapp"==a.channel_type&&X(a.is_default_open)&&N(e,"c-"+a.channel_type)&&(i+=" chaty-default-open"),"
"+l+"
"}}function B(a,e,c,i,n){var o=e.value,h="_blank";if("Whatsapp"==a.channel_type){var l=L(e.value);s?(h="",o="https://wa.me/"+l):(h="_blank",o="https://web.whatsapp.com/send?phone="+l)}else"WeChat"==a.channel_type?(h="",o="javascript:;"):"Email"==a.channel_type?(h="",o="mailto:"+e.value):"Facebook_Messenger"==a.channel_type?h=s?"":"_blank":"SMS"==a.channel_type?(h="",o="sms:"+e.value):"Telegram"==a.channel_type?(o="https://telegram.me/"+(o=z(e.value,"@")),h="_blank"):"Twitter"==a.channel_type?o="https://twitter.com/"+t.trim(e.value):"Phone"==a.channel_type?(h="",o="tel:"+t.trim(e.value)):"Skype"==a.channel_type?(h="",o="skype:"+t.trim(e.value)+"?chat"):"Snapchat"==a.channel_type?o="https://www.snapchat.com/add/"+t.trim(e.value):"Vkontakte"==a.channel_type?o="https://vk.me/"+t.trim(e.value):"Linkedin"==a.channel_type?o="personal"==e.link_type?"https://www.linkedin.com/in/"+t.trim(e.value):"https://www.linkedin.com/company/"+t.trim(e.value):"Viber"==a.channel_type?(""!=e.viber_url?o="viber://pa?chatURI="+e.value:isNaN(o=z(e.value,"+"))||(o=o.replace("+",""),navigator.userAgent.match(/(iPod|iPhone|iPad)/)&&(o="+"+o),o="viber://chat?number="+o),h=""):"TikTok"==a.channel_type&&(o="https://www.tiktok.com/@"+(o=z(t.trim(e.value),"@")),h="");return""+i+""}function L(t){return t=(t=(t=(t=z(t,"+")).replace(/ /g,"")).replace(/-/g,"")).replace(/_/g,"")}function z(a,e){for(a=t.trim(a);a.charAt(0)==e;)a=a.substring(1);for(;a.charAt(a.length-1)==e;)a=a.substring(0,a.length-1);return a}function I(a,e,c,i){var n,o,h,l,r,d,y,g,p,_,f="";if(X(a.is_agent))a.url="javascript:;",a.target="";else if("Whatsapp"==a.channel_type){if(X(a.has_welcome_message))a.url="javascript:;",a.target="",f+=" has-chaty-box chaty-whatsapp-btn-form",function a(e,c){let i=new Date;var n=10>i.getMinutes()?"0"+i.getMinutes():i.getMinutes(),o=10>i.getHours()?"0"+i.getHours():i.getHours(),h="",l=W(c);null==l&&(l=-1);var r="https://web.whatsapp.com/send",d="";s?r="https://wa.me/"+e.value:(r=X(e.is_use_web_version)?"https://web.whatsapp.com/send":"https://wa.me/"+e.value,d="_blank"),h+="