Version Description
Preview bugs fixed
Download this release
Release Info
Developer | galdub |
Plugin | Floating Chat Widget: Contact Chat Icons, Telegram Chat, Line, WeChat, Email, SMS, Call Button – Chaty |
Version | 2.7.8 |
Comparing to | |
See all releases |
Code changes from version 2.7.7 to 2.7.8
- admin/assets/js/cht-scripts.js +21 -5
- admin/assets/js/cht-scripts.min.js +1 -1
- admin/class-admin-base.php +16 -1
- cht-icons.php +2 -2
- css/chaty-front.css +3 -3
- css/chaty-front.min.css +1 -1
- includes/class-frontend.php +1 -1
- js/cht-front-script.js +9 -7
- js/cht-front-script.min.js +1 -1
- readme.txt +4 -1
- views/admin/admin.php +0 -5
admin/assets/js/cht-scripts.js
CHANGED
@@ -252,6 +252,8 @@ jQuery( function($) {
|
|
252 |
},300);
|
253 |
});
|
254 |
|
|
|
|
|
255 |
$(document).on("change", "#cht-form input", function(){
|
256 |
whatsappStatus = false;
|
257 |
phoneStatus = false;
|
@@ -904,11 +906,13 @@ function check_for_number_chaty(phoneNumber, validationFor) {
|
|
904 |
showAlpha: true,
|
905 |
move: function (color) {
|
906 |
jQuery(this).val(color.toRgbString());
|
907 |
-
|
|
|
908 |
},
|
909 |
change: function (color) {
|
910 |
jQuery(this).val(color.toRgbString());
|
911 |
chaty_set_bg_color();
|
|
|
912 |
}
|
913 |
});
|
914 |
check_for_chaty_close_button();
|
@@ -1372,7 +1376,7 @@ function check_for_number_chaty(phoneNumber, validationFor) {
|
|
1372 |
}
|
1373 |
|
1374 |
function getPreviewDesktop() {
|
1375 |
-
return jQuery('#previewDesktop').
|
1376 |
}
|
1377 |
|
1378 |
function changeWidgetIcon() {
|
@@ -1399,7 +1403,7 @@ function check_for_number_chaty(phoneNumber, validationFor) {
|
|
1399 |
};
|
1400 |
});
|
1401 |
|
1402 |
-
jQuery(window).on("load", function(){
|
1403 |
if(jQuery("#setting-error-settings_updated").length) {
|
1404 |
jQuery(".toast-message").show();
|
1405 |
jQuery(".toast-message").addClass("active");
|
@@ -1408,10 +1412,19 @@ function check_for_number_chaty(phoneNumber, validationFor) {
|
|
1408 |
jQuery(".toast-message").removeClass("active");
|
1409 |
}, 5000);
|
1410 |
}
|
1411 |
-
})
|
1412 |
|
1413 |
jQuery(document).ready(function () {
|
1414 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1415 |
jQuery(document).on("click", ".toast-close-btn a", function(e){
|
1416 |
e.preventDefault();
|
1417 |
jQuery(".toast-message").removeClass("active");
|
@@ -1648,6 +1661,8 @@ jQuery(document).ready(function () {
|
|
1648 |
jQuery("#cta-box span").css("color", jQuery("#cht_cta_text_color").val());
|
1649 |
jQuery("#cta-box span").css("background", jQuery("#cht_cta_bg_color").val());
|
1650 |
jQuery("#custom-css").html("<style>.preview .page .chaty-widget .icon:before {border-color: transparent "+jQuery('#cht_cta_bg_color').val()+" transparent transparent } .preview .page .chaty-widget[style*='left: auto;'] .icon:before {border-color: transparent transparent transparent "+jQuery('#cht_cta_bg_color').val()+"}</style>");
|
|
|
|
|
1651 |
},
|
1652 |
change: function (color) {
|
1653 |
jQuery(this).val(color.toRgbString());
|
@@ -1655,6 +1670,7 @@ jQuery(document).ready(function () {
|
|
1655 |
jQuery("#cta-box span").css("color", jQuery("#cht_cta_text_color").val());
|
1656 |
jQuery("#cta-box span").css("background", jQuery("#cht_cta_bg_color").val());
|
1657 |
jQuery("#custom-css").html("<style>.preview .page .chaty-widget .icon:before {border-color: transparent "+jQuery('#cht_cta_bg_color').val()+" transparent transparent } .preview .page .chaty-widget[style*='left: auto;'] .icon:before {border-color: transparent transparent transparent "+jQuery('#cht_cta_bg_color').val()+"}</style>");
|
|
|
1658 |
}
|
1659 |
});
|
1660 |
jQuery(".chaty-color-field").on("change", function () {
|
@@ -1995,7 +2011,7 @@ function change_custom_preview() {
|
|
1995 |
}
|
1996 |
|
1997 |
function getChtPreviewDesktop() {
|
1998 |
-
return jQuery('#previewDesktop').
|
1999 |
}
|
2000 |
|
2001 |
function setChtIcon(icon, colorSelf) {
|
252 |
},300);
|
253 |
});
|
254 |
|
255 |
+
jQuery("input[name='switchPreview']:checked").trigger("change");
|
256 |
+
|
257 |
$(document).on("change", "#cht-form input", function(){
|
258 |
whatsappStatus = false;
|
259 |
phoneStatus = false;
|
906 |
showAlpha: true,
|
907 |
move: function (color) {
|
908 |
jQuery(this).val(color.toRgbString());
|
909 |
+
chaty_set_bg_color();
|
910 |
+
jQuery("input[name='switchPreview']:checked").trigger("change");
|
911 |
},
|
912 |
change: function (color) {
|
913 |
jQuery(this).val(color.toRgbString());
|
914 |
chaty_set_bg_color();
|
915 |
+
jQuery("input[name='switchPreview']:checked").trigger("change");
|
916 |
}
|
917 |
});
|
918 |
check_for_chaty_close_button();
|
1376 |
}
|
1377 |
|
1378 |
function getPreviewDesktop() {
|
1379 |
+
return jQuery('#previewDesktop').is(':checked') ? true : false;
|
1380 |
}
|
1381 |
|
1382 |
function changeWidgetIcon() {
|
1403 |
};
|
1404 |
});
|
1405 |
|
1406 |
+
/*jQuery(window).on("load", function(){
|
1407 |
if(jQuery("#setting-error-settings_updated").length) {
|
1408 |
jQuery(".toast-message").show();
|
1409 |
jQuery(".toast-message").addClass("active");
|
1412 |
jQuery(".toast-message").removeClass("active");
|
1413 |
}, 5000);
|
1414 |
}
|
1415 |
+
});*/
|
1416 |
|
1417 |
jQuery(document).ready(function () {
|
1418 |
|
1419 |
+
if(jQuery(".toast-message").length) {
|
1420 |
+
jQuery(".toast-message").show();
|
1421 |
+
jQuery(".toast-message").addClass("active");
|
1422 |
+
|
1423 |
+
setTimeout(function(){
|
1424 |
+
jQuery(".toast-message").removeClass("active");
|
1425 |
+
}, 5000);
|
1426 |
+
}
|
1427 |
+
|
1428 |
jQuery(document).on("click", ".toast-close-btn a", function(e){
|
1429 |
e.preventDefault();
|
1430 |
jQuery(".toast-message").removeClass("active");
|
1661 |
jQuery("#cta-box span").css("color", jQuery("#cht_cta_text_color").val());
|
1662 |
jQuery("#cta-box span").css("background", jQuery("#cht_cta_bg_color").val());
|
1663 |
jQuery("#custom-css").html("<style>.preview .page .chaty-widget .icon:before {border-color: transparent "+jQuery('#cht_cta_bg_color').val()+" transparent transparent } .preview .page .chaty-widget[style*='left: auto;'] .icon:before {border-color: transparent transparent transparent "+jQuery('#cht_cta_bg_color').val()+"}</style>");
|
1664 |
+
chaty_set_bg_color();
|
1665 |
+
jQuery("input[name='switchPreview']:checked").trigger("change");
|
1666 |
},
|
1667 |
change: function (color) {
|
1668 |
jQuery(this).val(color.toRgbString());
|
1670 |
jQuery("#cta-box span").css("color", jQuery("#cht_cta_text_color").val());
|
1671 |
jQuery("#cta-box span").css("background", jQuery("#cht_cta_bg_color").val());
|
1672 |
jQuery("#custom-css").html("<style>.preview .page .chaty-widget .icon:before {border-color: transparent "+jQuery('#cht_cta_bg_color').val()+" transparent transparent } .preview .page .chaty-widget[style*='left: auto;'] .icon:before {border-color: transparent transparent transparent "+jQuery('#cht_cta_bg_color').val()+"}</style>");
|
1673 |
+
jQuery("input[name='switchPreview']:checked").trigger("change");
|
1674 |
}
|
1675 |
});
|
1676 |
jQuery(".chaty-color-field").on("change", function () {
|
2011 |
}
|
2012 |
|
2013 |
function getChtPreviewDesktop() {
|
2014 |
+
return jQuery('#previewDesktop').is(':checked') ? true : false;
|
2015 |
}
|
2016 |
|
2017 |
function setChtIcon(icon, colorSelf) {
|
admin/assets/js/cht-scripts.min.js
CHANGED
@@ -1 +1 @@
|
|
1 |
-
function check_for_number_chaty(e,t){return!(""==e||("+"==e[0]&&(e=e.substr(1,e.length)),"Phone"==t&&"*"==e[0]&&(e=e.substr(1,e.length)),!isNaN(e)))}function check_for_preview_pos(){if(jQuery(".chaty-setting-form").length)if(jQuery(window).width()>1179){var e=parseInt(jQuery(".chaty-setting-form").offset().top);jQuery(".btn-save-sticky, .chaty-sticky-buttons").css("top",e+58),jQuery(".preview").css("top",e+18),jQuery(".btn-help").css("top",e+58+145),jQuery("a.remove-chaty-widget-sticky").css("top",e+58+145+119)}else jQuery(".btn-save-sticky, .chaty-sticky-buttons").attr("style",""),jQuery(".preview").attr("style",""),jQuery(".btn-help").attr("style",""),jQuery("a.remove-chaty-widget-sticky").attr("style","");if(jQuery("#scroll-to-item").length&&jQuery("#admin-preview").length&&((e=jQuery("body").hasClass("has-premio-box")?jQuery("#scroll-to-item").offset().top-jQuery(window).scrollTop()-625:jQuery("#scroll-to-item").offset().top-jQuery(window).scrollTop()-485)<0?(e=Math.abs(e),jQuery("#admin-preview").css("margin-top",-1*e+"px")):jQuery("#admin-preview").css("margin-top","0")),jQuery(window).height()<=1180){var t=285;jQuery(window).width()<=600&&(t=310),jQuery(".chaty-sticky-buttons").css("top",jQuery(window).height()/2-t/2+"px")}jQuery(".html-tooltip:not(.no-position)").length&&jQuery(".html-tooltip:not(.no-position)").each(function(){jQuery(this).offset().top-jQuery(window).scrollTop()>540?(jQuery(this).addClass("top").removeClass("side").removeClass("bottom"),jQuery(this).find(".tooltip-text").attr("style",""),jQuery(this).find(".tooltip-text").removeClass("hide-arrow")):jQuery(window).height()-(jQuery(this).offset().top-jQuery(window).scrollTop())>460?(jQuery(this).addClass("bottom").removeClass("top").removeClass("side"),jQuery(this).find(".tooltip-text").attr("style",""),jQuery(this).find(".tooltip-text").removeClass("hide-arrow")):(jQuery(this).addClass("side").removeClass("top").removeClass("bottom"),jQuery(this).find(".tooltip-text").length&&(jQuery(this).find(".tooltip-text").attr("style",""),jQuery(this).find(".tooltip-text").removeClass("hide-arrow"),jQuery(this).find(".tooltip-text").offset().top-jQuery(window).scrollTop()-50<0?(jQuery(this).find(".tooltip-text").css("margin-top",Math.abs(jQuery(this).find(".tooltip-text").offset().top-jQuery(window).scrollTop()-50)+"px"),jQuery(this).find(".tooltip-text").addClass("hide-arrow")):(jQuery(this).find(".tooltip-text").attr("style",""),jQuery(this).find(".tooltip-text").offset().top+parseInt(jQuery(this).find(".tooltip-text").outerHeight())-jQuery(window).scrollTop()-jQuery(window).height()>0&&(jQuery(this).find(".tooltip-text").css("margin-top",-1*Math.abs(jQuery(this).find(".tooltip-text").offset().top+parseInt(jQuery(this).find(".tooltip-text").outerHeight())-jQuery(window).scrollTop()-jQuery(window).height())-10+"px"),jQuery(this).find(".tooltip-text").addClass("hide-arrow")))))})}jQuery(function(e){"use strict";var t=!1,a=!1,o=!1,c=!1,n=!1,i=!1,s=!1;function r(){if(e(".chaty-popup").hide(),0==e("#cht-form .js-chanel-desktop").length||0==e("#cht-form .js-chanel-mobile").length)return e("#no-device-popup").show(),!1;if(0==e("#cht-form .js-chanel-desktop:checked").length&&0==e("#cht-form .js-chanel-mobile:checked").length)return e("#device-popup").show(),!1;var t=0;return e("#channels-selected-list > li:not(#chaty-social-close)").find(".channels__input").each(function(){""==jQuery.trim(e(this).val())&&t++}),t!=e("#channels-selected-list > li:not(#chaty-social-close)").find(".channels__input").length||e("#chaty-social-Contact_Us").length?l():(e("#no-device-value").show(),!1)}function l(){return e(".chaty-popup").hide(),e("#trigger_on_time").is(":checked")||e("#chaty_trigger_on_exit").is(":checked")||e("#chaty_trigger_on_scroll").is(":checked")?u():(e("#trigger-popup").show(),!1)}function u(){return e(".chaty-popup").hide(),e(".cht_active").is(":checked")?(t=!0,e("#cht-form").trigger("submit"),!0):(e("#status-popup").show(),!1)}function h(){if(a){if(o){if(c){if(n){if(i)s||(s=!0,e("#channels-selected-list .phone-number").length&&e("#channels-selected-list .phone-number").each(function(){if(""!=jQuery.trim(e(this).val())&&jQuery.trim(e(this).val()).length>13)return e("#custom-message-popup .chaty-popup-header").text(e(this).data("label")+" number is not valid"),e("#custom-message-popup .chaty-popup-body").text("Seems like the "+e(this).data("label")+" number you're trying to enter isn't valid. Would you like to publish it anyway?"),e("#custom-message-popup").show(),!1}));else if(i=!0,e("#cht-form #Viber").length&&""!=e("#cht-form #Viber").val()){t=jQuery.trim(e("#cht-form #Viber").val());if(check_for_number_chaty(t,"Viber"))return e("#custom-message-popup .chaty-popup-header").text("Viber number is not valid"),e("#custom-message-popup .chaty-popup-body").text("Seems like the Viber number you're trying to enter isn't in the right syntax. Would you like to publish it anyway?"),e("#custom-message-popup").show(),!1}}else if(n=!0,e("#cht-form #SMS").length&&""!=e("#cht-form #SMS").val()){t=jQuery.trim(e("#cht-form #SMS").val());if(check_for_number_chaty(t,"SMS"))return e("#custom-message-popup .chaty-popup-header").text("SMS number is not valid"),e("#custom-message-popup .chaty-popup-body").text("Seems like the SMS number you're trying to enter isn't in the right syntax. Would you like to publish it anyway?"),e("#custom-message-popup").show(),!1}}else if(c=!0,e("#cht-form #Facebook_Messenger").length&&""!=e("#cht-form #Facebook_Messenger").val()){var t=jQuery.trim(e("#Facebook_Messenger").val());if(e("#cht-form #Facebook_Messenger").val(t),!/(?:http:\/\/)?facebook\.com\/(?:(?:\w)*#!\/)?(?:pages\/)?(?:[\w\-]*\/)*([\w\-]*)/.test(t)&&!/(?:http:\/\/)?m\.me\/(?:(?:\w)*#!\/)?(?:pages\/)?(?:[\w\-]*\/)*([\w\-]*)/.test(t))return e("#custom-message-popup .chaty-popup-header").text("Facebook page's URL is not valid"),e("#custom-message-popup .chaty-popup-body").text("Please make sure your Facebook page's URL looks like, <br/>https://m.me/YOURPAGE"),e("#custom-message-popup").show(),!1}}else if(o=!0,e("#cht-form #Phone").length&&""!=e("#cht-form #Phone").val()){var t=jQuery.trim(e("#cht-form #Phone").val());if(check_for_number_chaty(t,"Phone"))return e("#custom-message-popup .chaty-popup-header").text("Phone number is not valid"),e("#custom-message-popup .chaty-popup-body").text("Seems like the phone number you're trying to enter isn't in the right syntax. Would you like to publish it anyway?"),e("#custom-message-popup").show(),!1}}else{a=!0;if(e("#cht-form #Whatsapp").length&&""!=e("#cht-form #Whatsapp").val()){var t=jQuery.trim(e("#cht-form #Whatsapp").val());if(check_for_number_chaty(t,"Whatsapp"))return e("#custom-message-popup .chaty-popup-header").text("Whatsapp number is not valid"),e("#custom-message-popup .chaty-popup-body").text("Seems like the WhatsApp number you're trying to enter isn't in the right syntax. Would you like to publish it anyway?"),e("#custom-message-popup").show(),!1}}return r()}e(document).ready(function(){jQuery(document).on("click","#update-chaty-traffic-source-rule",function(e){jQuery(".traffic-options-box").addClass("active"),jQuery("#chaty_traffic_source").val("yes")}),jQuery(document).on("click","#remove-traffic-rules",function(e){jQuery(".traffic-options-box").removeClass("active"),jQuery("#chaty_traffic_source").val("no")}),jQuery(document).on("click",".remove-traffic-option",function(e){jQuery(this).closest(".custom-traffic-rule").remove()}),e(document).on("click",".chaty-switch-toggle",function(){setTimeout(function(){e(".chaty-field-setting").each(function(){e(this).is(":checked")?e(this).closest(".field-setting-col").find(".field-settings").addClass("active"):e(this).closest(".field-setting-col").find(".field-settings").removeClass("active")})},100)}),e(document).on("change",".chaty-close_form_after-setting",function(){setTimeout(function(){e(".chaty-close_form_after-setting").each(function(){e(this).is(":checked")?e(this).closest(".form-field-setting-col").find(".close_form_after-settings").addClass("active"):e(this).closest(".form-field-setting-col").find(".close_form_after-settings").removeClass("active")})},100)}),e("#channel_input_Whatsapp").length&&(cht_settings.channel_settings.Whatsapp=document.querySelector("#channel_input_Whatsapp"),window.intlTelInput(cht_settings.channel_settings.Whatsapp,{dropdownContainer:document.body,formatOnDisplay:!0,hiddenInput:"full_number",initialCountry:"auto",nationalMode:!1,utilsScript:cht_settings.plugin_url+"admin/assets/js/utils.js"})),e(".custom-channel-Whatsapp:not(#channel_input_Whatsapp)").length&&e(".custom-channel-Whatsapp:not(#channel_input_Whatsapp)").each(function(){var t=e(this).closest("li.chaty-channel").data("id");null!=t&&e("#channel_input_"+t).length&&(cht_settings.channel_settings[t]=document.querySelector("#channel_input_"+t),window.intlTelInput(cht_settings.channel_settings[t],{dropdownContainer:document.body,formatOnDisplay:!0,hiddenInput:"full_number",initialCountry:"auto",nationalMode:!1,utilsScript:cht_settings.plugin_url+"admin/assets/js/utils.js"}))}),e(document).on("change",".chaty-redirect-setting",function(){setTimeout(function(){e(".chaty-redirect-setting").each(function(){e(this).is(":checked")?e(this).closest(".form-field-setting-col").find(".redirect_action-settings").addClass("active"):e(this).closest(".form-field-setting-col").find(".redirect_action-settings").removeClass("active")})},100)}),e(document).on("click",".email-setting",function(){setTimeout(function(){e(".email-setting-field").each(function(){e(this).is(":checked")?e(this).closest(".form-field-setting-col").find(".email-settings").addClass("active"):e(this).closest(".form-field-setting-col").find(".email-settings").removeClass("active")})},100)}),e(document).on("click",".chaty-embedded-window",function(){setTimeout(function(){e(".embedded_window-checkbox").each(function(){e(this).is(":checked")?e(this).closest("li.chaty-channel").find(".whatsapp-welcome-message").addClass("active"):e(this).closest("li.chaty-channel").find(".whatsapp-welcome-message").removeClass("active")})},300)}),e(document).on("change","#cht-form input",function(){a=!1,o=!1,c=!1,n=!1,i=!1,s=!1}),e("#cht-form").on("submit",function(){if(t)return!0;set_social_channel_order();var a=0;return e("#chaty-page-options .cht-required").length&&e("#chaty-page-options .cht-required").each(function(){""==jQuery.trim(e(this).val())&&(e(this).addClass("cht-input-error"),a++)}),e(".chaty-data-and-time-rules .cht-required").length&&e(".chaty-data-and-time-rules .cht-required").each(function(){""==jQuery.trim(e(this).val())&&(e(this).addClass("cht-input-error"),a++)}),0==a?h():(e(".cht-input-error:first").focus(),!1)}),e(".close-chaty-popup-btn").on("click",function(t){t.stopPropagation(),e(".chaty-popup").hide(),e(this).hasClass("channel-setting-btn")?e("body, html").animate({scrollTop:e("#channel-list").offset().top-125},250):e(this).hasClass("select-trigger-btn")?e("body, html").animate({scrollTop:e("#trigger-setting").offset().top-50},250):e(this).hasClass("change-status-btn")&&e("body, html").animate({scrollTop:e("#launch-section").offset().top-100},250)}),e(".chaty-popup-inner").on("click",function(e){e.stopPropagation()}),e(".chaty-popup-outer").on("click",function(t){e(".chaty-popup").hide()}),e(".check-for-numbers").on("click",function(){h()}),e(".check-for-device").on("click",function(){r()}),e(".check-for-triggers").on("click",function(){l()}),e(".check-for-status").on("click",function(){u()}),e(".change-status-and-save").on("click",function(){e(".cht_active").prop("checked",!0),t=!0,e(".chaty-popup").hide(),e("#cht-form").trigger("submit")}),e(".status-and-save").on("click",function(){e(".cht_active").prop("checked",!1),t=!0,e(".chaty-popup").hide(),e("#cht-form").trigger("submit")}),e(document).on("click",".preview-section-chaty",function(e){e.stopPropagation()}),e(document).on("click",".preview-section-overlay",function(){e(".preview-help-btn").removeClass("active"),e(".preview-section-chaty").removeClass("active"),e(".preview-section-overlay").removeClass("active")}),e(document).on("click",".preview-help-btn",function(t){return t.preventDefault(),e(this).hasClass("active")?(e(this).removeClass("active"),e(".preview-section-chaty").removeClass("active"),e(".preview-section-overlay").removeClass("active")):(e(this).addClass("active"),e(".preview-section-chaty").addClass("active"),e(".preview-section-overlay").addClass("active")),!1}),jQuery(document).on("click","#create-date-rule",function(e){jQuery("#date-schedule").addClass("active"),jQuery("#cht_date_rules").val("yes")}),jQuery(document).on("click","#remove-date-rule",function(e){jQuery("#date-schedule").removeClass("active"),jQuery("#cht_date_rules").val("no")})})}),function(e){jQuery(window).on("popstate",function(e){window.onbeforeunload=null,window.history&&window.history.pushState&&window.history.back()}),jQuery(document).ready(function(){jQuery(".chaty-table").length||jQuery("body input, body .icon, body textarea, body .btn-cancel:not(.close-btn-set) ").on("click",function(e){window.onbeforeunload=function(e){(e=e||window.event).preventDefault=!0,e.cancelBubble=!0,e.returnValue="Your beautiful goodbye message"}}),jQuery(document).on("submit","form",function(e){window.onbeforeunload=null}),jQuery(document).on("change",".channel-select-input",function(t){var a=e(this).closest("li").attr("data-id");jQuery.ajax({type:"POST",url:ajaxurl,dataType:"json",data:{social:jQuery(this).val(),channel:a,action:"get_chaty_settings"},success:function(t){1==t.status&&("Whatsapp"==t.data.slug?e("#channel_input_"+t.channel).length&&(cht_settings.channel_settings[t.channel]=document.querySelector("#channel_input_"+t.channel),window.intlTelInput(cht_settings.channel_settings[t.channel],{dropdownContainer:document.body,formatOnDisplay:!0,hiddenInput:"full_number",initialCountry:"auto",nationalMode:!1,utilsScript:cht_settings.plugin_url+"admin/assets/js/utils.js"})):e("#chaty-social-"+t.channel+" .channels__input-box").html("<input type='text' class='channels__input' name='cht_social_"+t.channel+"[value]' id='channel_input_"+t.channel+"' />"),jQuery(".custom-icon-"+t.channel+" svg").html(t.data.svg),jQuery("#chaty-social-"+t.channel).attr("data-channel",t.data.slug),jQuery("#chaty-social-"+t.channel).find(".sp-preview-inner").css("background-color",t.data.color),jQuery("#chaty-social-"+t.channel).find(".chaty-color-field").val(t.data.color),jQuery("#chaty-social-"+t.channel).find(".channels__input").attr("placeholder",t.data.placeholder),jQuery("#chaty-social-"+t.channel).find(".channel-example").text(t.data.example),jQuery("#chaty-social-"+t.channel).find(".chaty-title").val(t.data.title),jQuery("#chaty-social-"+t.channel).find(".icon").attr("data-title",t.data.title),jQuery("#chaty-social-"+t.channel).find(".chaty-color-field").trigger("change"),jQuery(".help-section").html(""),""!=t.data.help_link?jQuery(".help-section").html('<div class="viber-help"><a target="_blank" href="'+t.data.help_link+'">'+t.data.help_title+"</a></div>"):""!=t.data.help_text&&jQuery(".help-section").html('<div class="viber-help"><span class="help-text">'+t.data.help_text+'</span><span class="help-title">'+t.data.help_title+"</span></div>"))}})}),jQuery(document).on("click","#chaty_icons_view",function(e){jQuery(".page-body .chaty-widget").removeClass("vertical").removeClass("horizontal"),jQuery(".page-body .chaty-widget").addClass(jQuery(this).val())}),jQuery(".upg").on("click",function(e){jQuery(".valid_domain_input").val(jQuery(".valid_domain_input").val().replace(" ","")),/^(http(s)?:\/\/)?(www\.)?[a-z0-9]+([\-\.]{1}[a-z0-9]+)*\.[a-z]{2,5}(:[0-9]{1,5})?(\/.*)?$/.test(jQuery(".valid_domain_input").val())||(e.preventDefault(),jQuery(".valid_domain").fadeIn().css({display:"block"}))}),jQuery(".del_token").on("click",function(t){e.ajax({type:"POST",url:ajaxurl,data:{action:"del_token",nonce_code:cht_nonce_ajax.cht_nonce},success:function(e){location.reload()},error:function(e,t,a){}})}),jQuery(document).on("blur","#channels-selected-list > li:not(#chaty-social-close) .channels__input",function(){jQuery(this).hasClass("border-red")&&""!=jQuery(this).val()&&jQuery(this).removeClass("border-red")});var t=1000000003;jQuery(".show_up").on("click",function(){t+=10,jQuery("#upgrade-modal").css({"z-index":t,display:"block","margin-left":"-258px"})}),jQuery(".color-picker-btn, .color-picker-btn-close, .color-picker-custom button").on("click",function(e){e.preventDefault(),jQuery(".color-picker-box").toggle(),jQuery(".color-picker-btn").toggle()}),jQuery(".color-picker-radio input").on("change",function(){var e=jQuery(this);if(jQuery('.color-picker-custom input[name="cht_custom_color"]').val(""),jQuery(".color-picker-custom .circle").html("?").css({"background-color":"#fff"}),e.prop("checked")){jQuery(".color-picker-radio input").prop("checked",!1),e.prop("checked",!0);var t=e.val(),a=e.prop("title")}else t=jQuery(".color-picker-custom input").val(),a="Custom";""!=t&&-1==t.indexOf("#")&&(t="#"+t),jQuery(".color-picker-btn .circle").css({backgroundColor:t}),jQuery(".color-picker-btn .text").text(a),jQuery("#chaty-social-close ellipse").attr("fill",t)}),jQuery(".color-picker-custom input").on("change",function(){jQuery(".color-picker-radio input").prop("checked",!1);var e=jQuery(this).val();""!=e&&-1==e.indexOf("#")&&(e="#"+e),jQuery(".color-picker-btn .circle").css({backgroundColor:e}),jQuery(".color-picker-btn .text").text("Custom"),jQuery("#chaty-social-close ellipse").attr("fill",e)}),jQuery('[name="cht_position"]').on("change",function(){jQuery("#positionCustom").prop("checked")?jQuery("#positionPro").show():jQuery("#positionPro").hide()}),jQuery(".update_token").on("click",function(t){t.preventDefault();var a=jQuery('input[name="cht_token"]').val();e.ajax({type:"POST",url:ajaxurl,data:{action:"add_token",nonce_code:cht_nonce_ajax.cht_nonce,token:a},beforeSend:function(e){},success:function(e){e?(alert("Your pro plan is activated"),location.reload()):alert("You`ve entered a wrong token")},error:function(e,t,a){}})}),jQuery("textarea[name=cht_cta]").on("keyup",function(e){if(jQuery(".tooltiptext span").html(jQuery(this).val()),0==jQuery(this).val().length)jQuery(".cta").hide(200),jQuery(".tooltiptext span").hide(200);else{jQuery(".cta").show(300),jQuery(".tooltiptext span").show(200);var t=jQuery(".tooltiptext span").html();count=(t.match(/\n/g)||[]).length,count>0?jQuery(".tooltiptext").addClass("has-multiline").removeClass("line-1").removeClass("line-2").removeClass("line-3").addClass("line-"+count):jQuery(".tooltiptext").removeClass("has-multiline")}}),jQuery("textarea[name=cht_cta]").trigger("keyup")})}(jQuery),function(e){jQuery(document).ready(function(){!function(){function e(){var e=jQuery("#positionBottom"),t=jQuery("#positionSide"),a=jQuery(".preview .page .chaty-widget"),o=jQuery('[name="cht_position"]:checked').val();if("right"===o)a.css({right:"7px",left:"auto",bottom:"7px"});else if("left"===o)a.css({left:"7px",right:"auto",bottom:"7px"});else if("custom"===o){if(e.val())var c=e.val()+"px";else c="7px";if(t.val())var n=t.val()+"px";else n="7px";e.on("change",function(){c=jQuery("#positionBottom").val()+"px",a.css({bottom:c})}),t.on("change",function(){var e=jQuery('[name="positionSide"]:checked').val();n=jQuery(this).val()+"px","right"===e?(jQuery(".page-body .chaty-widget ").removeClass("chaty-widget-icons-left"),jQuery(".page-body .chaty-widget ").addClass("chaty-widget-icons-right"),a.css({right:n,left:"auto"})):"left"===e&&(jQuery(".page-body .chaty-widget ").removeClass("chaty-widget-icons-right"),jQuery(".page-body .chaty-widget ").addClass("chaty-widget-icons-left"),a.css({left:n,right:"auto"}))}),jQuery('[name="positionSide"]').on("change",function(){var e=jQuery('[name="positionSide"]:checked').val();"right"===e?(jQuery(".page-body .chaty-widget ").removeClass("chaty-widget-icons-left"),jQuery(".page-body .chaty-widget ").addClass("chaty-widget-icons-right"),a.css({right:n,left:"auto"})):"left"===e&&(jQuery(".page-body .chaty-widget ").removeClass("chaty-widget-icons-right"),jQuery(".page-body .chaty-widget ").addClass("chaty-widget-icons-left"),a.css({left:n,right:"auto"}))})}}jQuery(".color-picker-radio input").on("change",function(){var e=jQuery(this);e.prop("checked")?e.val():jQuery(".color-picker-custom input").val(),u()}),jQuery(".color-picker-custom input").on("change",function(){jQuery(this).val(),u()}),jQuery(document).on("change","#chaty_default_state",function(){u()}),jQuery("#cht_close_button, #trigger_on_time, #chaty_trigger_on_scroll").on("click",function(){u()}),function(){var e=jQuery("#widgetTooltip"),t=jQuery(".preview .page .icon");function a(){jQuery("[name=cht_cta]").length&&(jQuery("[name=cht_cta]").val().length>=1?t.removeClass("no-tooltip"):t.addClass("no-tooltip"))}a(),e.on("change",function(){a()})}(),e(),jQuery('input[name="cht_position"]').on("change",function(){var t=jQuery('[name="cht_position"]:checked').val();"right"===t?(jQuery(".page-body .chaty-widget ").removeClass("chaty-widget-icons-left"),jQuery(".page-body .chaty-widget ").addClass("chaty-widget-icons-right")):"left"===t&&(jQuery(".page-body .chaty-widget ").removeClass("chaty-widget-icons-right"),jQuery(".page-body .chaty-widget ").addClass("chaty-widget-icons-left")),e()})}(),jQuery(".popover").hide(),o();var t=jQuery(".channels-icons > .icon-sm"),a=jQuery(".social-inputs");function o(){jQuery("section").is("#pro")||(jQuery(".channels-selected__item").length<=1?(jQuery(".channels-selected__item").hide(),jQuery(".popover").hide()):jQuery(".channels-selected__item").length>=2&&jQuery(".channels-selected__item").show())}jQuery("input[name=cht_custom_color]").on("keyup",function(e){var t=jQuery(this).val();(jQuery(".circle").html(""),""!=t)&&(-1==t.indexOf("#")&&(t="#"+t),jQuery(".color-picker-custom .circle").css({"background-color":t}));jQuery(this).val().length<1&&jQuery(".color-picker-custom .circle").html("?")}),t.on("click",function(){0,o();var c=jQuery(this),n=c.data("social");a.find(".social-form-group");if(c.hasClass("active")){var i=","+jQuery(this).attr("data-social");return s=(s=jQuery(".add_slug").val()).replace(i,""),jQuery(".add_slug").val(s),s=s.replace(i,""),jQuery(".add_slug").val(s),s=s.replace(i,""),jQuery(".add_slug").val(s),s=s.replace(i,""),jQuery(".add_slug").val(s),void c.toggleClass("active")}if(t.addClass("disabled"),icon=jQuery(this).data("social"),"1"==jQuery(".add_slug").val().indexOf(icon)&&""!=jQuery(".add_slug").val()){var s;i=","+icon;s=(s=jQuery(".add_slug").val()).replace(i,""),jQuery(".add_slug").val(s),s=s.replace(i,""),jQuery(".add_slug").val(s),s=s.replace(i,""),jQuery(".add_slug").val(s)}else jQuery(".add_slug").val(jQuery(".add_slug").val()+","+jQuery(this).attr("data-social"));if(!jQuery("section").is("#pro")&&jQuery(".channels-icons > .icon.active").length>=2)return t.removeClass("disabled"),jQuery(".popover").show(),jQuery(".popover .upgrade-link").addClass("active"),void setTimeout(function(){jQuery(".popover .upgrade-link").removeClass("active")},1e3);if(c.toggleClass("active"),jQuery("section").is("#pro"))var r="pro";else r="free";e.ajax({type:"POST",dataType:"json",url:ajaxurl,data:{action:"choose_social",social:n,nonce_code:cht_nonce_ajax.cht_nonce,version:r,widget_index:jQuery("#widget_index").val()},beforeSend:function(e){},success:function(a){var c=jQuery(a),i=c.find(".icon").data("title");c.data("channel");jQuery('.channels-selected div[data-social="'+i+'"]').length||(jQuery("#chaty-social-close").before(c),jQuery("#chaty-social-"+n+" .chaty-whatsapp-setting-textarea").length&&(editorId=jQuery("#chaty-social-"+n+" .chaty-whatsapp-setting-textarea").attr("id"),tinymce.execCommand("mceAddEditor",!0,editorId))),t.removeClass("disabled"),e("#iconWidget").show(),u(),o(),set_social_channel_order(),check_for_chaty_close_button(),jQuery(".chaty-color-field").spectrum({chooseText:"Submit",preferredFormat:"hex",showInput:!0,cancelText:"Cancel",showAlpha:!0,move:function(e){jQuery(this).val(e.toRgbString())},change:function(e){jQuery(this).val(e.toRgbString()),chaty_set_bg_color()}}),check_for_chaty_close_button(),"Whatsapp"==n&&e("#channel_input_Whatsapp").length&&(cht_settings.channel_settings.Whatsapp=document.querySelector("#channel_input_Whatsapp"),window.intlTelInput(cht_settings.channel_settings.Whatsapp,{dropdownContainer:document.body,formatOnDisplay:!0,hiddenInput:"full_number",initialCountry:"auto",nationalMode:!1,utilsScript:cht_settings.plugin_url+"admin/assets/js/utils.js"})),jQuery(".custom-channel-Whatsapp").length&&jQuery(".custom-channel-Whatsapp").each(function(){if(!jQuery(this).closest(".iti__flag-container").length){var e=jQuery(this).closest("li.chaty-channel").data("id");jQuery("#channel_input_"+e).length&&(cht_settings.channel_settings[e]=document.querySelector("#channel_input_"+e),window.intlTelInput(cht_settings.channel_settings[e],{dropdownContainer:document.body,formatOnDisplay:!0,hiddenInput:"full_number",initialCountry:"auto",nationalMode:!1,utilsScript:cht_settings.plugin_url+"admin/assets/js/utils.js"}))}})},error:function(e,t,a){}}),o()}),jQuery("body").on("click",".icon, .btn-cancel:not(.close-btn-set)",function(e){if(!jQuery(this).hasClass("close-btn-set")&&(e.preventDefault(),!jQuery(this).hasClass("icon")||!jQuery(this).hasClass("active"))){if(icon=jQuery(this).data("social"),jQuery(this).hasClass("btn-cancel")){jQuery('.icon.active[data-social^="'+icon+'"]').removeClass("active");var t=","+icon,a=jQuery(".add_slug").val();a=a.replace(t,""),jQuery(".add_slug").val(a)}jQuery("#chaty-social-"+icon).remove();jQuery(this).parent(".channels-selected__item"),jQuery(this).data("social");u(),o(),set_social_channel_order(),check_for_chaty_close_button()}}),jQuery(".btn-help").on("click",function(e){window.open("https://premio.io/help/chaty/","_blank")}),jQuery(".free-custom-radio, .free-custom-checkbox").on("click",function(e){e.preventDefault()});var c=jQuery("[name=cht_cta]"),n=jQuery(".preview .tooltip-show");c.on("keyup",function(){var e=jQuery(".preview .page .icon");c.val().length>=1?e.removeClass("no-tooltip"):e.addClass("no-tooltip"),n.attr("data-title",c.val())});var i,s,r='<svg version="1.1" id="ch" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" viewBox="-496 507.7 54 54" style="enable-background:new -496 507.7 54 54;" xml:space="preserve">\n <style type="text/css">.st0 {fill: #A886CD;} .st1 {fill: #FFFFFF;}\n </style><g><circle class="st0" cx="-469" cy="534.7" r="27"/></g><path class="st1" d="M-459.9,523.7h-20.3c-1.9,0-3.4,1.5-3.4,3.4v15.3c0,1.9,1.5,3.4,3.4,3.4h11.4l5.9,4.9c0.2,0.2,0.3,0.2,0.5,0.2 h0.3c0.3-0.2,0.5-0.5,0.5-0.8v-4.2h1.7c1.9,0,3.4-1.5,3.4-3.4v-15.3C-456.5,525.2-458,523.7-459.9,523.7z"/>\n <path class="st0" d="M-477.7,530.5h11.9c0.5,0,0.8,0.4,0.8,0.8l0,0c0,0.5-0.4,0.8-0.8,0.8h-11.9c-0.5,0-0.8-0.4-0.8-0.8l0,0\n C-478.6,530.8-478.2,530.5-477.7,530.5z"/>\n <path class="st0" d="M-477.7,533.5h7.9c0.5,0,0.8,0.4,0.8,0.8l0,0c0,0.5-0.4,0.8-0.8,0.8h-7.9c-0.5,0-0.8-0.4-0.8-0.8l0,0\n C-478.6,533.9-478.2,533.5-477.7,533.5z"/>\n </svg>',l=document.getElementById("iconWidget");jQuery(".color-picker-radio input:checked").val();function u(){var t,a,o=!1;if(jQuery(".single-channel-setting").addClass("active"),jQuery("#iconWidget").removeClass("img-p-active"),d()?(0===jQuery(".js-chanel-desktop:checked").length?(t=!1,jQuery(".page-body .chaty-widget").hide()):jQuery(".page-body .chaty-widget").show(),1===jQuery(".js-chanel-desktop:checked").length&&(t=jQuery(".js-chanel-desktop:checked").closest("li").find(".icon.icon-md").html(),jQuery(".js-chanel-desktop:checked").closest(".channels-selected__item").hasClass("img-active")&&jQuery("#iconWidget").addClass("img-p-active")),jQuery(".js-chanel-desktop:checked").length>1&&(t=r,o=!0)):(0===jQuery(".js-chanel-mobile:checked").length?(a=!1,jQuery(".page-body .chaty-widget").hide()):jQuery(".page-body .chaty-widget").show(),1===jQuery(".js-chanel-mobile:checked").length&&(a=jQuery(".js-chanel-mobile:checked").closest("li").find(".icon.icon-md").html(),jQuery(".js-chanel-mobile:checked").closest(".channels-selected__item").hasClass("img-active")&&jQuery("#iconWidget").addClass("img-p-active")),jQuery(".js-chanel-mobile:checked").length>1&&(a=r,o=!0)),i=t,s=a,d()?h(i,o):h(s,o),e("#iconWidget .pop-number").remove(),jQuery("#cht_pending_messages").is(":checked")){var c=jQuery("#cht_number_of_messages").val();""!=c&&c>0&&(e("#iconWidget").append("<span class='pop-number'>"+c+"</span>"),e("#iconWidget .pop-number").css("color",jQuery("#cht_number_color").val()),e("#iconWidget .pop-number").css("background",jQuery("#cht_number_bg_color").val()))}var n=".js-chanel-mobile";if(d())n=".js-chanel-desktop";"open"==jQuery("#chaty_default_state").val()&&jQuery(n+":checked").length>1&&e("#iconWidget .pop-number").remove(),e("#cta-box span").css("color",e("#cht_cta_text_color").val()),e("#cta-box span").css("background",e("#cht_cta_bg_color").val()),e("#custom-css").html("<style>.preview .page .chaty-widget .icon:before {border-color: transparent "+e("#cht_cta_bg_color").val()+" transparent transparent } .preview .page .chaty-widget[style*='left: auto;'] .icon:before {border-color: transparent transparent transparent "+e("#cht_cta_bg_color").val()+"}</style>"),jQuery(".single-channel-setting").addClass("active"),1===jQuery("#channel-list .icon.active").length&&(jQuery(".single-channel-setting").removeClass("active"),"open"==jQuery("#chaty_default_state").val()&&jQuery(".hide-show-button").removeClass("active"))}function h(e,t){if(jQuery("#iconWidget").length){if(l.innerHTML=e||"",t){var a=jQuery(".color-picker-custom input").val()?jQuery(".color-picker-custom input").val():jQuery(".color-picker-radio input:checked").val();if(""!=a)-1==a.indexOf("#")&&(a="#"+a);jQuery(".preview .page svg circle").css({fill:a}),jQuery("#chaty-social-close ellipse").attr("fill",a)}thisVal=jQuery("#chaty_default_state").val(),"open"==thisVal?jQuery(".hide-show-button").addClass("active"):jQuery(".hide-show-button").removeClass("active"),jQuery(".chaty-widget").removeClass("active").removeClass("hover").removeClass("click").removeClass("hide_arrow"),"open"==thisVal?(jQuery(".chaty-widget").addClass("active").addClass("click"),"open"==thisVal&&jQuery(o+":checked").length>1&&jQuery(".chaty-widget").addClass("hide_arrow")):"hover"==thisVal?jQuery(".chaty-widget").addClass("hover"):jQuery(".chaty-widget").addClass("click"),jQuery(".chaty-channels").html("");var o=".js-chanel-mobile";if(d())o=".js-chanel-desktop";"open"==thisVal&&jQuery(o+":checked").length>1?(jQuery("#chaty_attention_effect").val(""),jQuery("#chaty_attention_effect, .test_textarea").attr("disabled",!0),jQuery("#chaty_attention_effect option:first-child").text("Doesn't apply for the open state"),"Doesn't apply for the open state"!=jQuery(".test_textarea").val()&&jQuery(".test_textarea").attr("data-value",jQuery(".test_textarea").val()),jQuery(".test_textarea").val("Doesn't apply for the open state"),jQuery("#cht_number_of_messages").attr("disabled",!0),jQuery("#cht_pending_messages").attr("disabled",!0),jQuery(".disable-message").addClass("label-tooltip").addClass("icon"),jQuery("#cht_pending_messages").attr("checked",!1),jQuery(".pending-message-items").removeClass("active"),jQuery(".cta-action-radio input").attr("disabled",!0)):(jQuery("#chaty_attention_effect, .test_textarea").attr("disabled",!1),jQuery("#chaty_attention_effect option:first-child").text("None"),jQuery(".test_textarea").attr("placeholder",""),"Doesn't apply for the open state"==jQuery(".test_textarea").val()&&jQuery(".test_textarea").val(jQuery(".test_textarea").attr("data-value")),jQuery("#cht_number_of_messages").attr("disabled",!1),jQuery("#cht_pending_messages").attr("disabled",!1),jQuery(".disable-message").removeClass("label-tooltip").removeClass("icon"),jQuery(".cta-action-radio input").attr("disabled",!1)),jQuery(".page-body .chaty-widget").removeClass("vertical").removeClass("horizontal"),jQuery(o+":checked").length>1?(jQuery(o+":checked").each(function(){var e=jQuery(this).closest("li").find(".icon").html(),t=(e=jQuery(this).closest("li").find(".icon").html(),jQuery(this).closest("li").find(".chaty-title").val()),a=jQuery(this).closest(".channels-selected__item").hasClass("img-active")?"img-active":"";""!=t&&(t="<span class='social-tooltip'>"+t+"</span>"),jQuery(".chaty-channels").append("<div class='social-item-box "+a+"'><span class='tooltip-icon'>"+e+"</span>"+t+"</div>")}),"open"==jQuery("#chaty_default_state").val()&&jQuery("#cht_close_button").is(":checked")?(jQuery("#iconWidget").css("display","block"),jQuery(".chaty-widget .tooltiptext").css("display","block"),jQuery(".chaty-widget").removeClass("hide-arrow")):"open"!=jQuery("#chaty_default_state").val()?(jQuery("#iconWidget").css("display","block"),jQuery(".chaty-widget .tooltiptext").css("display","block"),jQuery(".chaty-widget").removeClass("hide-arrow")):"open"==jQuery("#chaty_default_state").val()&&(jQuery("#iconWidget").hide(),jQuery(".chaty-widget .tooltiptext").hide(),jQuery(".chaty-widget").addClass("hide-arrow")),jQuery(".chaty-widget").removeClass("has-single"),jQuery(".page-body .chaty-widget").addClass(jQuery("#chaty_icons_view").val())):1==jQuery(o+":checked").length?("open"!=jQuery("#chaty_default_state").val()||jQuery("#cht_close_button").is(":checked")?"open"!=jQuery("#chaty_default_state").val()&&(jQuery("#iconWidget").css("display","block"),jQuery(".chaty-widget .tooltiptext").css("display","block"),jQuery(".chaty-widget").removeClass("hide-arrow")):(jQuery("#iconWidget").css("display","block"),jQuery(".chaty-widget .tooltiptext").css("display","block"),jQuery(".chaty-widget").removeClass("hide-arrow")),jQuery(".chaty-widget").addClass("has-single"),jQuery(".chaty-widget").removeClass("hide-arrow")):0==jQuery(o+":checked").length&&(jQuery("#iconWidget").hide(),jQuery(".chaty-widget .tooltiptext").hide(),jQuery(".chaty-widget").addClass("hide-arrow"),jQuery(".chaty-widget").removeClass("has-single")),jQuery(".chaty-channels .remove-icon-img").remove(),jQuery("#trigger_on_time").is(":checked")?jQuery("#chaty_trigger_time").attr("readonly",!1):jQuery("#chaty_trigger_time").attr("readonly",!0),jQuery("#chaty_trigger_on_scroll").is(":checked")?jQuery("#chaty_trigger_on_page_scroll").attr("readonly",!1):jQuery("#chaty_trigger_on_page_scroll").attr("readonly",!0),""==jQuery(".chaty-widget .tooltiptext").text()?jQuery(".chaty-widget .tooltiptext").hide():"open"==jQuery("#chaty_default_state").val()&&jQuery(o+":checked").length>1?jQuery(".chaty-widget .tooltiptext").hide():jQuery(".chaty-widget .tooltiptext").css("display","block")}}function d(){return"checked"===jQuery("#previewDesktop").attr("checked")}jQuery("#testUpload").on("change",function(){this.value.length>0?document.querySelector(".js-upload").disabled=!1:(document.querySelector(".js-upload").disabled=!0,document.getElementById("uploadInput").checked=!1)}),jQuery(document).on("keyup","textarea.test_textarea",function(){u()}),jQuery(".js-switch-preview").on("change",function(){d()?jQuery(this).closest(".preview").removeClass("mobiel-view"):jQuery(this).closest(".preview").addClass("mobiel-view"),u()}),jQuery(document).on("change","input[name='cht_pending_messages']",function(){jQuery("#cht_pending_messages").is(":checked")?jQuery(".pending-message-items").addClass("active"):jQuery(".pending-message-items").removeClass("active"),u()}),jQuery(document).on("change","#cht_number_of_messages",function(){u()}),jQuery(document).on("keyup","#cht_number_of_messages",function(){u()}),jQuery(document).on("blur","#cht_number_of_messages",function(){u()}),jQuery(document).on("change",".js-chanel-icon",function(){u()}),jQuery(document).on("change",".js-widget-i",function(e){r=e.target.classList.contains("js-upload")?jQuery(".file-preview-image").last().parent().html():jQuery("i[data-type="+jQuery(".js-widget-i:checked").val()+"]").html(),u()}),"chat-image"!==jQuery(".js-widget-i:checked").attr("data-type")&&(r=jQuery("i[data-type="+jQuery(".js-widget-i:checked").attr("data-type")+"]").html(),u())}),jQuery(window).on("load",function(){jQuery("#setting-error-settings_updated").length&&(jQuery(".toast-message").show(),jQuery(".toast-message").addClass("active"),setTimeout(function(){jQuery(".toast-message").removeClass("active")},5e3))}),jQuery(document).ready(function(){jQuery(document).on("click",".toast-close-btn a",function(e){e.preventDefault(),jQuery(".toast-message").removeClass("active")}),jQuery(document).on("click",".chaty-popup-box button, #chaty-intro-popup",function(t){t.stopPropagation();var a=jQuery("#chaty_update_popup_status").val();e("#chaty-intro-popup").remove(),e.ajax({type:"POST",url:ajaxurl,data:{action:"update_popup_status",nonce:a},beforeSend:function(e){},success:function(e){},error:function(e,t,a){}})}),jQuery(document).on("click",".chaty-popup-box",function(e){e.stopPropagation()}),jQuery(document).on("click",".remove-chaty-options",function(t){t.preventDefault(),t.stopPropagation(),confirm("Are you sure you want to delete this widget?")&&e.ajax({type:"POST",url:ajaxurl,data:{action:"remove_chaty_widget",nonce_code:cht_nonce_ajax.cht_nonce,widget_index:jQuery("#widget_index").val()},beforeSend:function(e){},success:function(e){window.location=e},error:function(e,t,a){}})});window.location.href;window.location.href.indexOf("page=chaty-app&widget=")>-1&&jQuery("#toplevel_page_chaty-app .wp-submenu.wp-submenu-wrap li").each(function(){var e=jQuery(this).find("a").attr("href");void 0!==e&&(jQuery(this).removeClass("current"),window.location.href.indexOf(e)>-1&&e.indexOf("&widget=")>-1&&jQuery(this).addClass("current"))})})}(jQuery),jQuery(window).on("resize",function(){check_for_preview_pos()}),jQuery(window).on("scroll",function(){check_for_preview_pos()}),jQuery(document).ready(function(){check_for_preview_pos()});var totalPageOptions=0,pageOptionContent="",totalDateAndTimeOptions=0,dateAndTimeOptionContent="";jQuery(document).ready(function(){function e(){jQuery(".chaty-whatsapp-setting-textarea").length&&jQuery(".chaty-whatsapp-setting-textarea").each(function(){jQuery("#cht_social_embedded_message_"+jQuery(this).data("id")+"_ifr").length&&tinymce.get(jQuery(this).attr("id")).remove(),tinymce.execCommand("mceAddEditor",!0,jQuery(this).attr("id"))})}totalPageOptions=parseInt(jQuery(".chaty-page-option").length),pageOptionContent=jQuery(".chaty-page-options-html").html(),jQuery(".chaty-page-options-html").remove(),totalDateAndTimeOptions=parseInt(jQuery(".chaty-date-time-option").length),dateAndTimeOptionContent=jQuery(".chaty-date-and-time-options-html").html(),jQuery(".chaty-date-and-time-options-html").remove(),jQuery("#create-rule").on("click",function(){jQuery(".page-options").toggle()}),jQuery("#create-data-and-time-rule").on("click",function(){jQuery(".chaty-data-and-time-rules").toggle()}),jQuery(document).on("change","#chaty_attention_effect",function(){var e=jQuery(this).attr("data-effect");""!=e&&jQuery("#iconWidget").removeClass("chaty-animation-"+e),jQuery("#iconWidget").removeClass("start-now"),jQuery("#iconWidget").addClass("chaty-animation-"+jQuery(this).val()).addClass("start-now"),jQuery(this).attr("data-effect",jQuery(this).val())}),setInterval(function(){var e=jQuery("#chaty_attention_effect").attr("data-effect");""!=e?(jQuery("#iconWidget").removeClass("chaty-animation-"+e),jQuery("#iconWidget").removeClass("start-now"),setTimeout(function(){jQuery("#iconWidget").addClass("chaty-animation-"+jQuery("#chaty_attention_effect").val()).addClass("start-now")},1e3)):jQuery("#chaty_attention_effect").attr("data-effect",jQuery("#chaty_attention_effect").val())},5e3),jQuery(document).on("click",".remove-chaty",function(){jQuery(".page-options").toggle()}),jQuery(document).on("click",".remove-page-option",function(){jQuery(".chaty-data-and-time-rules ").toggle()}),jQuery("#image-upload-content .custom-control-label").on("click",function(e){return e.stopPropagation(),jQuery(this).closest(".custom-control").find("input[type=radio]").attr("checked",!0),jQuery(".js-widget-i").trigger("change"),!1}),jQuery(".chaty-color-field").spectrum({chooseText:"Submit",preferredFormat:"hex",cancelText:"Cancel",showInput:!0,showAlpha:!0,move:function(e){jQuery(this).val(e.toHexString()),jQuery("#cta-box span").css("color",jQuery("#cht_cta_text_color").val()),jQuery("#cta-box span").css("background",jQuery("#cht_cta_bg_color").val()),jQuery("#custom-css").html("<style>.preview .page .chaty-widget .icon:before {border-color: transparent "+jQuery("#cht_cta_bg_color").val()+" transparent transparent } .preview .page .chaty-widget[style*='left: auto;'] .icon:before {border-color: transparent transparent transparent "+jQuery("#cht_cta_bg_color").val()+"}</style>")},change:function(e){jQuery(this).val(e.toRgbString()),chaty_set_bg_color(),jQuery("#cta-box span").css("color",jQuery("#cht_cta_text_color").val()),jQuery("#cta-box span").css("background",jQuery("#cht_cta_bg_color").val()),jQuery("#custom-css").html("<style>.preview .page .chaty-widget .icon:before {border-color: transparent "+jQuery("#cht_cta_bg_color").val()+" transparent transparent } .preview .page .chaty-widget[style*='left: auto;'] .icon:before {border-color: transparent transparent transparent "+jQuery("#cht_cta_bg_color").val()+"}</style>")}}),jQuery(".chaty-color-field").on("change",function(){chaty_set_bg_color(),change_custom_preview()}),jQuery(".remove-chaty-img").on("click",function(e){e.stopPropagation()}),jQuery("#channels-selected-list").sortable({placeholder:"ui-chaty-state-hl",items:"li:not(#chaty-social-close)",stop:function(){e()},update:function(t,a){set_social_channel_order(),change_custom_preview(),e()}}),jQuery(document).ready(function(){e()}),jQuery(".close-button-img img, .close-button-img .image-upload").on("click",function(){var e=wp.media({title:"Upload Image",multiple:!1,library:{type:"image"}}).open().on("select",function(t){var a=e.state().get("selection").first();imageData=a.toJSON(),jQuery(".close-button-img").addClass("active"),jQuery(".close-button-img input").val(imageData.id),jQuery(".close-button-img img").attr("src",imageData.url),change_custom_preview()})}),jQuery(".remove-close-img").on("click",function(){default_image=jQuery("#default_image").val(),jQuery(".close-button-img").removeClass("active"),jQuery(".close-button-img input").val(""),jQuery(".close-button-img img").attr("src",default_image),change_custom_preview()}),jQuery(document).on("click",".chaty-widget.click",function(e){e.preventDefault(),jQuery(".chaty-widget").toggleClass("active")}),jQuery(document).on("change",".url-options.cht-required",function(e){thisVal=jQuery(this).val(),siteURL=jQuery("#chaty_site_url").val(),newURL=siteURL,"page_has_url"==thisVal?newURL=siteURL:"page_contains"==thisVal?newURL=siteURL+"%s%":"page_start_with"==thisVal?newURL=siteURL+"s%":"page_end_with"==thisVal&&(newURL=siteURL+"%s"),jQuery(this).closest(".url-content").find(".chaty-url").text(newURL)}),check_for_chaty_close_button(),chaty_set_bg_color(),change_custom_preview(),jQuery(".chaty-settings.cls-btn a, .close-btn-set").on("click",function(e){e.preventDefault(),jQuery(".cls-btn-settings, .close-btn-set").toggleClass("active")}),0==jQuery("input[name='cht_position']:checked").length&&(jQuery("#right-position").attr("checked",!0),jQuery("input[name='cht_position']:checked").trigger("change")),0==jQuery("input[name='widget_icon']:checked").length&&(jQuery("input[name='widget_icon']:first").attr("checked",!0),jQuery("input[name='widget_icon']:checked").trigger("change")),jQuery(".form-fonts").on("change",function(){var e=jQuery(this).val();jQuery(".chaty-google-font").remove(),""!=e?(jQuery(".form-fonts option:selected").data("group"),jQuery(".preview-section-chaty #admin-preview .page-body").css("font-family",e)):jQuery(".preview-section-chaty #admin-preview .page-body").attr("style","")})}),jQuery(window).on("load",function(){check_for_chaty_close_button(),chaty_set_bg_color(),jQuery(".chaty-page-options .chaty-page-option").removeClass("last"),jQuery(".chaty-page-options .chaty-page-option:last").addClass("last"),jQuery(".url-options.cht-required").each(function(){jQuery(this).trigger("change")});var e=jQuery(".form-fonts").val();jQuery(".chaty-google-font").remove(),""!=e&&(jQuery(".form-fonts option:selected").data("group"),jQuery(".preview-section-chaty #admin-preview .page-body").css("font-family",e))});var selectedsocialSlug="";function upload_chaty_image(e){selectedsocialSlug=e;var t=wp.media({title:"Upload Image",multiple:!1,library:{type:"image"}}).open().on("select",function(e){var a=t.state().get("selection").first();imageData=a.toJSON(),jQuery("#cht_social_image_"+selectedsocialSlug).val(imageData.id),jQuery(".custom-image-"+selectedsocialSlug+" img").attr("src",imageData.url),jQuery("#chaty-social-"+selectedsocialSlug+" .channels-selected__item").addClass("img-active"),change_custom_preview()})}function toggle_chaty_setting(e){if(jQuery("#chaty-social-"+e).find(".chaty-advance-settings").toggle(),jQuery("#chaty-social-"+e).find(".chaty-advance-settings").toggleClass("active"),"Contact_Us"==e&&jQuery("#Contact_Us-close-btn").length){var t=jQuery("#Contact_Us-close-btn").data("nonce");jQuery("#Contact_Us-close-btn").hasClass("active")||(jQuery("#Contact_Us-close-btn").addClass("active"),jQuery.ajax({type:"POST",url:ajaxurl,data:{nonce:t,action:"update_channel_setting"},success:function(e){}}))}jQuery("#chaty-social-"+e+" .chaty-advance-settings.active").length&&jQuery("body,html").animate({scrollTop:jQuery("#chaty-social-"+e+" .chaty-advance-settings.active").offset().top-50},500),change_custom_preview()}function chaty_set_bg_color(){jQuery(".chaty-color-field:not(.button-color)").each(function(){""!=jQuery(this).val()&&"#ffffff"!=jQuery(this).val()&&("Linkedin"!=jQuery(this).closest("li").data("id")||"Linkedin"==jQuery(this).closest("li").data("id")&&"#ffffff"!=jQuery(this).val())&&(defaultColor=jQuery(this).val(),jQuery(this).closest(".channels-selected__item").find(".color-element").css("fill",defaultColor),jQuery(this).closest(".channels-selected__item").find(".custom-chaty-image").css("background",defaultColor),jQuery(this).closest(".channels-selected__item").find(".facustom-icon").css("background",defaultColor))}),change_custom_preview()}function upload_qr_code(){var e=wp.media({title:"Upload QR Image",multiple:!1,library:{type:"image"}}).open().on("select",function(t){var a=e.state().get("selection").first();imageData=a.toJSON(),jQuery("#upload_qr_code_val").val(imageData.id),jQuery("#upload_qr_code img").attr("src",imageData.url),jQuery(".remove-qr-code").addClass("active"),change_custom_preview()})}function remove_qr_code(){jQuery(".remove-qr-code").removeClass("active"),jQuery("#upload_qr_code_val").val(""),default_image=jQuery("#default_image").val(),jQuery("#upload_qr_code img").attr("src",default_image),change_custom_preview()}function remove_chaty_image(e){default_image=jQuery("#default_image").val(),jQuery("#chaty-social-"+e+" .channels-selected__item").removeClass("img-active"),jQuery("#cht_social_image_"+e).val(""),jQuery("#cht_social_image_src_"+e).attr("src",default_image),change_custom_preview()}var baseIcon='<svg version="1.1" id="ch" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" viewBox="-496 507.7 54 54" style="enable-background:new -496 507.7 54 54;" xml:space="preserve">\n <style type="text/css">.st0 {fill: #A886CD;} .st1 {fill: #FFFFFF;}\n </style><g><circle class="st0" cx="-469" cy="534.7" r="27"/></g><path class="st1" d="M-459.9,523.7h-20.3c-1.9,0-3.4,1.5-3.4,3.4v15.3c0,1.9,1.5,3.4,3.4,3.4h11.4l5.9,4.9c0.2,0.2,0.3,0.2,0.5,0.2 h0.3c0.3-0.2,0.5-0.5,0.5-0.8v-4.2h1.7c1.9,0,3.4-1.5,3.4-3.4v-15.3C-456.5,525.2-458,523.7-459.9,523.7z"/>\n <path class="st0" d="M-477.7,530.5h11.9c0.5,0,0.8,0.4,0.8,0.8l0,0c0,0.5-0.4,0.8-0.8,0.8h-11.9c-0.5,0-0.8-0.4-0.8-0.8l0,0\n C-478.6,530.8-478.2,530.5-477.7,530.5z"/>\n <path class="st0" d="M-477.7,533.5h7.9c0.5,0,0.8,0.4,0.8,0.8l0,0c0,0.5-0.4,0.8-0.8,0.8h-7.9c-0.5,0-0.8-0.4-0.8-0.8l0,0\n C-478.6,533.9-478.2,533.5-477.7,533.5z"/>\n </svg>',defaultIcon='<svg version="1.1" id="ch" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" viewBox="-496 507.7 54 54" style="enable-background:new -496 507.7 54 54;" xml:space="preserve">\n <style type="text/css">.st0 {fill: #A886CD;} .st1 {fill: #FFFFFF;}\n </style><g><circle class="st0" cx="-469" cy="534.7" r="27"/></g><path class="st1" d="M-459.9,523.7h-20.3c-1.9,0-3.4,1.5-3.4,3.4v15.3c0,1.9,1.5,3.4,3.4,3.4h11.4l5.9,4.9c0.2,0.2,0.3,0.2,0.5,0.2 h0.3c0.3-0.2,0.5-0.5,0.5-0.8v-4.2h1.7c1.9,0,3.4-1.5,3.4-3.4v-15.3C-456.5,525.2-458,523.7-459.9,523.7z"/>\n <path class="st0" d="M-477.7,530.5h11.9c0.5,0,0.8,0.4,0.8,0.8l0,0c0,0.5-0.4,0.8-0.8,0.8h-11.9c-0.5,0-0.8-0.4-0.8-0.8l0,0\n C-478.6,530.8-478.2,530.5-477.7,530.5z"/>\n <path class="st0" d="M-477.7,533.5h7.9c0.5,0,0.8,0.4,0.8,0.8l0,0c0,0.5-0.4,0.8-0.8,0.8h-7.9c-0.5,0-0.8-0.4-0.8-0.8l0,0\n C-478.6,533.9-478.2,533.5-477.7,533.5z"/>\n </svg>',iconBlock=document.getElementById("iconWidget");function set_social_channel_order(){socialString=[],jQuery("#channels-selected-list li").each(function(){socialString.push(jQuery(this).attr("data-id"))}),socialString=socialString.join(","),jQuery("#cht_numb_slug").val(socialString),check_for_chaty_close_button()}function check_for_chaty_close_button(){jQuery("#channels-selected-list > li:not(.chaty-cls-setting)").length>=2?jQuery("#chaty-social-close").show():jQuery("#chaty-social-close").hide(),change_custom_preview();var e="";jQuery("#channels-selected-list > li").each(function(){"undefined"!=jQuery(this).attr("data-id")&&""!=jQuery(this).attr("data-id")&&(e+=jQuery(this).attr("data-id")+","),e=e.trimRight(",")}),jQuery(".add_slug").val(e)}function change_custom_preview(){var e,t,a=!1;jQuery("#iconWidget").removeClass("img-p-active"),getChtPreviewDesktop()?(0===jQuery(".js-chanel-desktop:checked").length&&(e=!1),1===jQuery(".js-chanel-desktop:checked").length&&(e=jQuery(".js-chanel-desktop:checked").closest("li").find(".icon.icon-md").html(),jQuery(".js-chanel-desktop:checked").closest(".channels-selected__item").hasClass("img-active")&&jQuery("#iconWidget").addClass("img-p-active")),jQuery(".js-chanel-desktop:checked").length>1&&(e=defaultIcon,a=!0)):(0===jQuery(".js-chanel-mobile:checked").length&&(t=!1),1===jQuery(".js-chanel-mobile:checked").length&&(t=jQuery(".js-chanel-mobile:checked").closest("li").find(".icon.icon-md").html(),jQuery(".js-chanel-mobile:checked").closest(".channels-selected__item").hasClass("img-active")&&jQuery("#iconWidget").addClass("img-p-active")),jQuery(".js-chanel-mobile:checked").length>1&&(t=defaultIcon,a=!0)),desktopIcon=e,mobileIcon=t,getChtPreviewDesktop()?setChtIcon(desktopIcon,a):setChtIcon(mobileIcon,a),jQuery("#channels-selected-list > li.chaty-channel").length<=1?jQuery(".o-channel, .font-section").removeClass("active"):jQuery(".o-channel, .font-section").addClass("active")}function getChtPreviewDesktop(){return"checked"===jQuery("#previewDesktop").attr("checked")}function setChtIcon(e,t){if(jQuery("iconWidget").length){if((iconBlock=document.getElementById("iconWidget")).innerHTML=e||"",t){var a=jQuery(".color-picker-custom input").val()?jQuery(".color-picker-custom input").val():jQuery(".color-picker-radio input:checked").val();jQuery(".preview .page svg circle").css({fill:a}),jQuery("#chaty-social-close ellipse").attr("fill",a)}jQuery(".js-widget-i:checked").trigger("change")}}
|
1 |
+
function check_for_number_chaty(e,t){return!(""==e||("+"==e[0]&&(e=e.substr(1,e.length)),"Phone"==t&&"*"==e[0]&&(e=e.substr(1,e.length)),!isNaN(e)))}function check_for_preview_pos(){if(jQuery(".chaty-setting-form").length)if(jQuery(window).width()>1179){var e=parseInt(jQuery(".chaty-setting-form").offset().top);jQuery(".btn-save-sticky, .chaty-sticky-buttons").css("top",e+58),jQuery(".preview").css("top",e+18),jQuery(".btn-help").css("top",e+58+145),jQuery("a.remove-chaty-widget-sticky").css("top",e+58+145+119)}else jQuery(".btn-save-sticky, .chaty-sticky-buttons").attr("style",""),jQuery(".preview").attr("style",""),jQuery(".btn-help").attr("style",""),jQuery("a.remove-chaty-widget-sticky").attr("style","");if(jQuery("#scroll-to-item").length&&jQuery("#admin-preview").length&&((e=jQuery("body").hasClass("has-premio-box")?jQuery("#scroll-to-item").offset().top-jQuery(window).scrollTop()-625:jQuery("#scroll-to-item").offset().top-jQuery(window).scrollTop()-485)<0?(e=Math.abs(e),jQuery("#admin-preview").css("margin-top",-1*e+"px")):jQuery("#admin-preview").css("margin-top","0")),jQuery(window).height()<=1180){var t=285;jQuery(window).width()<=600&&(t=310),jQuery(".chaty-sticky-buttons").css("top",jQuery(window).height()/2-t/2+"px")}jQuery(".html-tooltip:not(.no-position)").length&&jQuery(".html-tooltip:not(.no-position)").each(function(){jQuery(this).offset().top-jQuery(window).scrollTop()>540?(jQuery(this).addClass("top").removeClass("side").removeClass("bottom"),jQuery(this).find(".tooltip-text").attr("style",""),jQuery(this).find(".tooltip-text").removeClass("hide-arrow")):jQuery(window).height()-(jQuery(this).offset().top-jQuery(window).scrollTop())>460?(jQuery(this).addClass("bottom").removeClass("top").removeClass("side"),jQuery(this).find(".tooltip-text").attr("style",""),jQuery(this).find(".tooltip-text").removeClass("hide-arrow")):(jQuery(this).addClass("side").removeClass("top").removeClass("bottom"),jQuery(this).find(".tooltip-text").length&&(jQuery(this).find(".tooltip-text").attr("style",""),jQuery(this).find(".tooltip-text").removeClass("hide-arrow"),jQuery(this).find(".tooltip-text").offset().top-jQuery(window).scrollTop()-50<0?(jQuery(this).find(".tooltip-text").css("margin-top",Math.abs(jQuery(this).find(".tooltip-text").offset().top-jQuery(window).scrollTop()-50)+"px"),jQuery(this).find(".tooltip-text").addClass("hide-arrow")):(jQuery(this).find(".tooltip-text").attr("style",""),jQuery(this).find(".tooltip-text").offset().top+parseInt(jQuery(this).find(".tooltip-text").outerHeight())-jQuery(window).scrollTop()-jQuery(window).height()>0&&(jQuery(this).find(".tooltip-text").css("margin-top",-1*Math.abs(jQuery(this).find(".tooltip-text").offset().top+parseInt(jQuery(this).find(".tooltip-text").outerHeight())-jQuery(window).scrollTop()-jQuery(window).height())-10+"px"),jQuery(this).find(".tooltip-text").addClass("hide-arrow")))))})}jQuery(function(e){"use strict";var t=!1,a=!1,o=!1,c=!1,i=!1,n=!1,s=!1;function r(){if(e(".chaty-popup").hide(),0==e("#cht-form .js-chanel-desktop").length||0==e("#cht-form .js-chanel-mobile").length)return e("#no-device-popup").show(),!1;if(0==e("#cht-form .js-chanel-desktop:checked").length&&0==e("#cht-form .js-chanel-mobile:checked").length)return e("#device-popup").show(),!1;var t=0;return e("#channels-selected-list > li:not(#chaty-social-close)").find(".channels__input").each(function(){""==jQuery.trim(e(this).val())&&t++}),t!=e("#channels-selected-list > li:not(#chaty-social-close)").find(".channels__input").length||e("#chaty-social-Contact_Us").length?l():(e("#no-device-value").show(),!1)}function l(){return e(".chaty-popup").hide(),e("#trigger_on_time").is(":checked")||e("#chaty_trigger_on_exit").is(":checked")||e("#chaty_trigger_on_scroll").is(":checked")?u():(e("#trigger-popup").show(),!1)}function u(){return e(".chaty-popup").hide(),e(".cht_active").is(":checked")?(t=!0,e("#cht-form").trigger("submit"),!0):(e("#status-popup").show(),!1)}function h(){if(a){if(o){if(c){if(i){if(n)s||(s=!0,e("#channels-selected-list .phone-number").length&&e("#channels-selected-list .phone-number").each(function(){if(""!=jQuery.trim(e(this).val())&&jQuery.trim(e(this).val()).length>13)return e("#custom-message-popup .chaty-popup-header").text(e(this).data("label")+" number is not valid"),e("#custom-message-popup .chaty-popup-body").text("Seems like the "+e(this).data("label")+" number you're trying to enter isn't valid. Would you like to publish it anyway?"),e("#custom-message-popup").show(),!1}));else if(n=!0,e("#cht-form #Viber").length&&""!=e("#cht-form #Viber").val()){t=jQuery.trim(e("#cht-form #Viber").val());if(check_for_number_chaty(t,"Viber"))return e("#custom-message-popup .chaty-popup-header").text("Viber number is not valid"),e("#custom-message-popup .chaty-popup-body").text("Seems like the Viber number you're trying to enter isn't in the right syntax. Would you like to publish it anyway?"),e("#custom-message-popup").show(),!1}}else if(i=!0,e("#cht-form #SMS").length&&""!=e("#cht-form #SMS").val()){t=jQuery.trim(e("#cht-form #SMS").val());if(check_for_number_chaty(t,"SMS"))return e("#custom-message-popup .chaty-popup-header").text("SMS number is not valid"),e("#custom-message-popup .chaty-popup-body").text("Seems like the SMS number you're trying to enter isn't in the right syntax. Would you like to publish it anyway?"),e("#custom-message-popup").show(),!1}}else if(c=!0,e("#cht-form #Facebook_Messenger").length&&""!=e("#cht-form #Facebook_Messenger").val()){var t=jQuery.trim(e("#Facebook_Messenger").val());if(e("#cht-form #Facebook_Messenger").val(t),!/(?:http:\/\/)?facebook\.com\/(?:(?:\w)*#!\/)?(?:pages\/)?(?:[\w\-]*\/)*([\w\-]*)/.test(t)&&!/(?:http:\/\/)?m\.me\/(?:(?:\w)*#!\/)?(?:pages\/)?(?:[\w\-]*\/)*([\w\-]*)/.test(t))return e("#custom-message-popup .chaty-popup-header").text("Facebook page's URL is not valid"),e("#custom-message-popup .chaty-popup-body").text("Please make sure your Facebook page's URL looks like, <br/>https://m.me/YOURPAGE"),e("#custom-message-popup").show(),!1}}else if(o=!0,e("#cht-form #Phone").length&&""!=e("#cht-form #Phone").val()){var t=jQuery.trim(e("#cht-form #Phone").val());if(check_for_number_chaty(t,"Phone"))return e("#custom-message-popup .chaty-popup-header").text("Phone number is not valid"),e("#custom-message-popup .chaty-popup-body").text("Seems like the phone number you're trying to enter isn't in the right syntax. Would you like to publish it anyway?"),e("#custom-message-popup").show(),!1}}else{a=!0;if(e("#cht-form #Whatsapp").length&&""!=e("#cht-form #Whatsapp").val()){var t=jQuery.trim(e("#cht-form #Whatsapp").val());if(check_for_number_chaty(t,"Whatsapp"))return e("#custom-message-popup .chaty-popup-header").text("Whatsapp number is not valid"),e("#custom-message-popup .chaty-popup-body").text("Seems like the WhatsApp number you're trying to enter isn't in the right syntax. Would you like to publish it anyway?"),e("#custom-message-popup").show(),!1}}return r()}e(document).ready(function(){jQuery(document).on("click","#update-chaty-traffic-source-rule",function(e){jQuery(".traffic-options-box").addClass("active"),jQuery("#chaty_traffic_source").val("yes")}),jQuery(document).on("click","#remove-traffic-rules",function(e){jQuery(".traffic-options-box").removeClass("active"),jQuery("#chaty_traffic_source").val("no")}),jQuery(document).on("click",".remove-traffic-option",function(e){jQuery(this).closest(".custom-traffic-rule").remove()}),e(document).on("click",".chaty-switch-toggle",function(){setTimeout(function(){e(".chaty-field-setting").each(function(){e(this).is(":checked")?e(this).closest(".field-setting-col").find(".field-settings").addClass("active"):e(this).closest(".field-setting-col").find(".field-settings").removeClass("active")})},100)}),e(document).on("change",".chaty-close_form_after-setting",function(){setTimeout(function(){e(".chaty-close_form_after-setting").each(function(){e(this).is(":checked")?e(this).closest(".form-field-setting-col").find(".close_form_after-settings").addClass("active"):e(this).closest(".form-field-setting-col").find(".close_form_after-settings").removeClass("active")})},100)}),e("#channel_input_Whatsapp").length&&(cht_settings.channel_settings.Whatsapp=document.querySelector("#channel_input_Whatsapp"),window.intlTelInput(cht_settings.channel_settings.Whatsapp,{dropdownContainer:document.body,formatOnDisplay:!0,hiddenInput:"full_number",initialCountry:"auto",nationalMode:!1,utilsScript:cht_settings.plugin_url+"admin/assets/js/utils.js"})),e(".custom-channel-Whatsapp:not(#channel_input_Whatsapp)").length&&e(".custom-channel-Whatsapp:not(#channel_input_Whatsapp)").each(function(){var t=e(this).closest("li.chaty-channel").data("id");null!=t&&e("#channel_input_"+t).length&&(cht_settings.channel_settings[t]=document.querySelector("#channel_input_"+t),window.intlTelInput(cht_settings.channel_settings[t],{dropdownContainer:document.body,formatOnDisplay:!0,hiddenInput:"full_number",initialCountry:"auto",nationalMode:!1,utilsScript:cht_settings.plugin_url+"admin/assets/js/utils.js"}))}),e(document).on("change",".chaty-redirect-setting",function(){setTimeout(function(){e(".chaty-redirect-setting").each(function(){e(this).is(":checked")?e(this).closest(".form-field-setting-col").find(".redirect_action-settings").addClass("active"):e(this).closest(".form-field-setting-col").find(".redirect_action-settings").removeClass("active")})},100)}),e(document).on("click",".email-setting",function(){setTimeout(function(){e(".email-setting-field").each(function(){e(this).is(":checked")?e(this).closest(".form-field-setting-col").find(".email-settings").addClass("active"):e(this).closest(".form-field-setting-col").find(".email-settings").removeClass("active")})},100)}),e(document).on("click",".chaty-embedded-window",function(){setTimeout(function(){e(".embedded_window-checkbox").each(function(){e(this).is(":checked")?e(this).closest("li.chaty-channel").find(".whatsapp-welcome-message").addClass("active"):e(this).closest("li.chaty-channel").find(".whatsapp-welcome-message").removeClass("active")})},300)}),jQuery("input[name='switchPreview']:checked").trigger("change"),e(document).on("change","#cht-form input",function(){a=!1,o=!1,c=!1,i=!1,n=!1,s=!1}),e("#cht-form").on("submit",function(){if(t)return!0;set_social_channel_order();var a=0;return e("#chaty-page-options .cht-required").length&&e("#chaty-page-options .cht-required").each(function(){""==jQuery.trim(e(this).val())&&(e(this).addClass("cht-input-error"),a++)}),e(".chaty-data-and-time-rules .cht-required").length&&e(".chaty-data-and-time-rules .cht-required").each(function(){""==jQuery.trim(e(this).val())&&(e(this).addClass("cht-input-error"),a++)}),0==a?h():(e(".cht-input-error:first").focus(),!1)}),e(".close-chaty-popup-btn").on("click",function(t){t.stopPropagation(),e(".chaty-popup").hide(),e(this).hasClass("channel-setting-btn")?e("body, html").animate({scrollTop:e("#channel-list").offset().top-125},250):e(this).hasClass("select-trigger-btn")?e("body, html").animate({scrollTop:e("#trigger-setting").offset().top-50},250):e(this).hasClass("change-status-btn")&&e("body, html").animate({scrollTop:e("#launch-section").offset().top-100},250)}),e(".chaty-popup-inner").on("click",function(e){e.stopPropagation()}),e(".chaty-popup-outer").on("click",function(t){e(".chaty-popup").hide()}),e(".check-for-numbers").on("click",function(){h()}),e(".check-for-device").on("click",function(){r()}),e(".check-for-triggers").on("click",function(){l()}),e(".check-for-status").on("click",function(){u()}),e(".change-status-and-save").on("click",function(){e(".cht_active").prop("checked",!0),t=!0,e(".chaty-popup").hide(),e("#cht-form").trigger("submit")}),e(".status-and-save").on("click",function(){e(".cht_active").prop("checked",!1),t=!0,e(".chaty-popup").hide(),e("#cht-form").trigger("submit")}),e(document).on("click",".preview-section-chaty",function(e){e.stopPropagation()}),e(document).on("click",".preview-section-overlay",function(){e(".preview-help-btn").removeClass("active"),e(".preview-section-chaty").removeClass("active"),e(".preview-section-overlay").removeClass("active")}),e(document).on("click",".preview-help-btn",function(t){return t.preventDefault(),e(this).hasClass("active")?(e(this).removeClass("active"),e(".preview-section-chaty").removeClass("active"),e(".preview-section-overlay").removeClass("active")):(e(this).addClass("active"),e(".preview-section-chaty").addClass("active"),e(".preview-section-overlay").addClass("active")),!1}),jQuery(document).on("click","#create-date-rule",function(e){jQuery("#date-schedule").addClass("active"),jQuery("#cht_date_rules").val("yes")}),jQuery(document).on("click","#remove-date-rule",function(e){jQuery("#date-schedule").removeClass("active"),jQuery("#cht_date_rules").val("no")})})}),function(e){jQuery(window).on("popstate",function(e){window.onbeforeunload=null,window.history&&window.history.pushState&&window.history.back()}),jQuery(document).ready(function(){jQuery(".chaty-table").length||jQuery("body input, body .icon, body textarea, body .btn-cancel:not(.close-btn-set) ").on("click",function(e){window.onbeforeunload=function(e){(e=e||window.event).preventDefault=!0,e.cancelBubble=!0,e.returnValue="Your beautiful goodbye message"}}),jQuery(document).on("submit","form",function(e){window.onbeforeunload=null}),jQuery(document).on("change",".channel-select-input",function(t){var a=e(this).closest("li").attr("data-id");jQuery.ajax({type:"POST",url:ajaxurl,dataType:"json",data:{social:jQuery(this).val(),channel:a,action:"get_chaty_settings"},success:function(t){1==t.status&&("Whatsapp"==t.data.slug?e("#channel_input_"+t.channel).length&&(cht_settings.channel_settings[t.channel]=document.querySelector("#channel_input_"+t.channel),window.intlTelInput(cht_settings.channel_settings[t.channel],{dropdownContainer:document.body,formatOnDisplay:!0,hiddenInput:"full_number",initialCountry:"auto",nationalMode:!1,utilsScript:cht_settings.plugin_url+"admin/assets/js/utils.js"})):e("#chaty-social-"+t.channel+" .channels__input-box").html("<input type='text' class='channels__input' name='cht_social_"+t.channel+"[value]' id='channel_input_"+t.channel+"' />"),jQuery(".custom-icon-"+t.channel+" svg").html(t.data.svg),jQuery("#chaty-social-"+t.channel).attr("data-channel",t.data.slug),jQuery("#chaty-social-"+t.channel).find(".sp-preview-inner").css("background-color",t.data.color),jQuery("#chaty-social-"+t.channel).find(".chaty-color-field").val(t.data.color),jQuery("#chaty-social-"+t.channel).find(".channels__input").attr("placeholder",t.data.placeholder),jQuery("#chaty-social-"+t.channel).find(".channel-example").text(t.data.example),jQuery("#chaty-social-"+t.channel).find(".chaty-title").val(t.data.title),jQuery("#chaty-social-"+t.channel).find(".icon").attr("data-title",t.data.title),jQuery("#chaty-social-"+t.channel).find(".chaty-color-field").trigger("change"),jQuery(".help-section").html(""),""!=t.data.help_link?jQuery(".help-section").html('<div class="viber-help"><a target="_blank" href="'+t.data.help_link+'">'+t.data.help_title+"</a></div>"):""!=t.data.help_text&&jQuery(".help-section").html('<div class="viber-help"><span class="help-text">'+t.data.help_text+'</span><span class="help-title">'+t.data.help_title+"</span></div>"))}})}),jQuery(document).on("click","#chaty_icons_view",function(e){jQuery(".page-body .chaty-widget").removeClass("vertical").removeClass("horizontal"),jQuery(".page-body .chaty-widget").addClass(jQuery(this).val())}),jQuery(".upg").on("click",function(e){jQuery(".valid_domain_input").val(jQuery(".valid_domain_input").val().replace(" ","")),/^(http(s)?:\/\/)?(www\.)?[a-z0-9]+([\-\.]{1}[a-z0-9]+)*\.[a-z]{2,5}(:[0-9]{1,5})?(\/.*)?$/.test(jQuery(".valid_domain_input").val())||(e.preventDefault(),jQuery(".valid_domain").fadeIn().css({display:"block"}))}),jQuery(".del_token").on("click",function(t){e.ajax({type:"POST",url:ajaxurl,data:{action:"del_token",nonce_code:cht_nonce_ajax.cht_nonce},success:function(e){location.reload()},error:function(e,t,a){}})}),jQuery(document).on("blur","#channels-selected-list > li:not(#chaty-social-close) .channels__input",function(){jQuery(this).hasClass("border-red")&&""!=jQuery(this).val()&&jQuery(this).removeClass("border-red")});var t=1000000003;jQuery(".show_up").on("click",function(){t+=10,jQuery("#upgrade-modal").css({"z-index":t,display:"block","margin-left":"-258px"})}),jQuery(".color-picker-btn, .color-picker-btn-close, .color-picker-custom button").on("click",function(e){e.preventDefault(),jQuery(".color-picker-box").toggle(),jQuery(".color-picker-btn").toggle()}),jQuery(".color-picker-radio input").on("change",function(){var e=jQuery(this);if(jQuery('.color-picker-custom input[name="cht_custom_color"]').val(""),jQuery(".color-picker-custom .circle").html("?").css({"background-color":"#fff"}),e.prop("checked")){jQuery(".color-picker-radio input").prop("checked",!1),e.prop("checked",!0);var t=e.val(),a=e.prop("title")}else t=jQuery(".color-picker-custom input").val(),a="Custom";""!=t&&-1==t.indexOf("#")&&(t="#"+t),jQuery(".color-picker-btn .circle").css({backgroundColor:t}),jQuery(".color-picker-btn .text").text(a),jQuery("#chaty-social-close ellipse").attr("fill",t)}),jQuery(".color-picker-custom input").on("change",function(){jQuery(".color-picker-radio input").prop("checked",!1);var e=jQuery(this).val();""!=e&&-1==e.indexOf("#")&&(e="#"+e),jQuery(".color-picker-btn .circle").css({backgroundColor:e}),jQuery(".color-picker-btn .text").text("Custom"),jQuery("#chaty-social-close ellipse").attr("fill",e)}),jQuery('[name="cht_position"]').on("change",function(){jQuery("#positionCustom").prop("checked")?jQuery("#positionPro").show():jQuery("#positionPro").hide()}),jQuery(".update_token").on("click",function(t){t.preventDefault();var a=jQuery('input[name="cht_token"]').val();e.ajax({type:"POST",url:ajaxurl,data:{action:"add_token",nonce_code:cht_nonce_ajax.cht_nonce,token:a},beforeSend:function(e){},success:function(e){e?(alert("Your pro plan is activated"),location.reload()):alert("You`ve entered a wrong token")},error:function(e,t,a){}})}),jQuery("textarea[name=cht_cta]").on("keyup",function(e){if(jQuery(".tooltiptext span").html(jQuery(this).val()),0==jQuery(this).val().length)jQuery(".cta").hide(200),jQuery(".tooltiptext span").hide(200);else{jQuery(".cta").show(300),jQuery(".tooltiptext span").show(200);var t=jQuery(".tooltiptext span").html();count=(t.match(/\n/g)||[]).length,count>0?jQuery(".tooltiptext").addClass("has-multiline").removeClass("line-1").removeClass("line-2").removeClass("line-3").addClass("line-"+count):jQuery(".tooltiptext").removeClass("has-multiline")}}),jQuery("textarea[name=cht_cta]").trigger("keyup")})}(jQuery),function(e){jQuery(document).ready(function(){!function(){function e(){var e=jQuery("#positionBottom"),t=jQuery("#positionSide"),a=jQuery(".preview .page .chaty-widget"),o=jQuery('[name="cht_position"]:checked').val();if("right"===o)a.css({right:"7px",left:"auto",bottom:"7px"});else if("left"===o)a.css({left:"7px",right:"auto",bottom:"7px"});else if("custom"===o){if(e.val())var c=e.val()+"px";else c="7px";if(t.val())var i=t.val()+"px";else i="7px";e.on("change",function(){c=jQuery("#positionBottom").val()+"px",a.css({bottom:c})}),t.on("change",function(){var e=jQuery('[name="positionSide"]:checked').val();i=jQuery(this).val()+"px","right"===e?(jQuery(".page-body .chaty-widget ").removeClass("chaty-widget-icons-left"),jQuery(".page-body .chaty-widget ").addClass("chaty-widget-icons-right"),a.css({right:i,left:"auto"})):"left"===e&&(jQuery(".page-body .chaty-widget ").removeClass("chaty-widget-icons-right"),jQuery(".page-body .chaty-widget ").addClass("chaty-widget-icons-left"),a.css({left:i,right:"auto"}))}),jQuery('[name="positionSide"]').on("change",function(){var e=jQuery('[name="positionSide"]:checked').val();"right"===e?(jQuery(".page-body .chaty-widget ").removeClass("chaty-widget-icons-left"),jQuery(".page-body .chaty-widget ").addClass("chaty-widget-icons-right"),a.css({right:i,left:"auto"})):"left"===e&&(jQuery(".page-body .chaty-widget ").removeClass("chaty-widget-icons-right"),jQuery(".page-body .chaty-widget ").addClass("chaty-widget-icons-left"),a.css({left:i,right:"auto"}))})}}jQuery(".color-picker-radio input").on("change",function(){var e=jQuery(this);e.prop("checked")?e.val():jQuery(".color-picker-custom input").val(),u()}),jQuery(".color-picker-custom input").on("change",function(){jQuery(this).val(),u()}),jQuery(document).on("change","#chaty_default_state",function(){u()}),jQuery("#cht_close_button, #trigger_on_time, #chaty_trigger_on_scroll").on("click",function(){u()}),function(){var e=jQuery("#widgetTooltip"),t=jQuery(".preview .page .icon");function a(){jQuery("[name=cht_cta]").length&&(jQuery("[name=cht_cta]").val().length>=1?t.removeClass("no-tooltip"):t.addClass("no-tooltip"))}a(),e.on("change",function(){a()})}(),e(),jQuery('input[name="cht_position"]').on("change",function(){var t=jQuery('[name="cht_position"]:checked').val();"right"===t?(jQuery(".page-body .chaty-widget ").removeClass("chaty-widget-icons-left"),jQuery(".page-body .chaty-widget ").addClass("chaty-widget-icons-right")):"left"===t&&(jQuery(".page-body .chaty-widget ").removeClass("chaty-widget-icons-right"),jQuery(".page-body .chaty-widget ").addClass("chaty-widget-icons-left")),e()})}(),jQuery(".popover").hide(),o();var t=jQuery(".channels-icons > .icon-sm"),a=jQuery(".social-inputs");function o(){jQuery("section").is("#pro")||(jQuery(".channels-selected__item").length<=1?(jQuery(".channels-selected__item").hide(),jQuery(".popover").hide()):jQuery(".channels-selected__item").length>=2&&jQuery(".channels-selected__item").show())}jQuery("input[name=cht_custom_color]").on("keyup",function(e){var t=jQuery(this).val();(jQuery(".circle").html(""),""!=t)&&(-1==t.indexOf("#")&&(t="#"+t),jQuery(".color-picker-custom .circle").css({"background-color":t}));jQuery(this).val().length<1&&jQuery(".color-picker-custom .circle").html("?")}),t.on("click",function(){0,o();var c=jQuery(this),i=c.data("social");a.find(".social-form-group");if(c.hasClass("active")){var n=","+jQuery(this).attr("data-social");return s=(s=jQuery(".add_slug").val()).replace(n,""),jQuery(".add_slug").val(s),s=s.replace(n,""),jQuery(".add_slug").val(s),s=s.replace(n,""),jQuery(".add_slug").val(s),s=s.replace(n,""),jQuery(".add_slug").val(s),void c.toggleClass("active")}if(t.addClass("disabled"),icon=jQuery(this).data("social"),"1"==jQuery(".add_slug").val().indexOf(icon)&&""!=jQuery(".add_slug").val()){var s;n=","+icon;s=(s=jQuery(".add_slug").val()).replace(n,""),jQuery(".add_slug").val(s),s=s.replace(n,""),jQuery(".add_slug").val(s),s=s.replace(n,""),jQuery(".add_slug").val(s)}else jQuery(".add_slug").val(jQuery(".add_slug").val()+","+jQuery(this).attr("data-social"));if(!jQuery("section").is("#pro")&&jQuery(".channels-icons > .icon.active").length>=2)return t.removeClass("disabled"),jQuery(".popover").show(),jQuery(".popover .upgrade-link").addClass("active"),void setTimeout(function(){jQuery(".popover .upgrade-link").removeClass("active")},1e3);if(c.toggleClass("active"),jQuery("section").is("#pro"))var r="pro";else r="free";e.ajax({type:"POST",dataType:"json",url:ajaxurl,data:{action:"choose_social",social:i,nonce_code:cht_nonce_ajax.cht_nonce,version:r,widget_index:jQuery("#widget_index").val()},beforeSend:function(e){},success:function(a){var c=jQuery(a),n=c.find(".icon").data("title");c.data("channel");jQuery('.channels-selected div[data-social="'+n+'"]').length||(jQuery("#chaty-social-close").before(c),jQuery("#chaty-social-"+i+" .chaty-whatsapp-setting-textarea").length&&(editorId=jQuery("#chaty-social-"+i+" .chaty-whatsapp-setting-textarea").attr("id"),tinymce.execCommand("mceAddEditor",!0,editorId))),t.removeClass("disabled"),e("#iconWidget").show(),u(),o(),set_social_channel_order(),check_for_chaty_close_button(),jQuery(".chaty-color-field").spectrum({chooseText:"Submit",preferredFormat:"hex",showInput:!0,cancelText:"Cancel",showAlpha:!0,move:function(e){jQuery(this).val(e.toRgbString()),chaty_set_bg_color(),jQuery("input[name='switchPreview']:checked").trigger("change")},change:function(e){jQuery(this).val(e.toRgbString()),chaty_set_bg_color(),jQuery("input[name='switchPreview']:checked").trigger("change")}}),check_for_chaty_close_button(),"Whatsapp"==i&&e("#channel_input_Whatsapp").length&&(cht_settings.channel_settings.Whatsapp=document.querySelector("#channel_input_Whatsapp"),window.intlTelInput(cht_settings.channel_settings.Whatsapp,{dropdownContainer:document.body,formatOnDisplay:!0,hiddenInput:"full_number",initialCountry:"auto",nationalMode:!1,utilsScript:cht_settings.plugin_url+"admin/assets/js/utils.js"})),jQuery(".custom-channel-Whatsapp").length&&jQuery(".custom-channel-Whatsapp").each(function(){if(!jQuery(this).closest(".iti__flag-container").length){var e=jQuery(this).closest("li.chaty-channel").data("id");jQuery("#channel_input_"+e).length&&(cht_settings.channel_settings[e]=document.querySelector("#channel_input_"+e),window.intlTelInput(cht_settings.channel_settings[e],{dropdownContainer:document.body,formatOnDisplay:!0,hiddenInput:"full_number",initialCountry:"auto",nationalMode:!1,utilsScript:cht_settings.plugin_url+"admin/assets/js/utils.js"}))}})},error:function(e,t,a){}}),o()}),jQuery("body").on("click",".icon, .btn-cancel:not(.close-btn-set)",function(e){if(!jQuery(this).hasClass("close-btn-set")&&(e.preventDefault(),!jQuery(this).hasClass("icon")||!jQuery(this).hasClass("active"))){if(icon=jQuery(this).data("social"),jQuery(this).hasClass("btn-cancel")){jQuery('.icon.active[data-social^="'+icon+'"]').removeClass("active");var t=","+icon,a=jQuery(".add_slug").val();a=a.replace(t,""),jQuery(".add_slug").val(a)}jQuery("#chaty-social-"+icon).remove();jQuery(this).parent(".channels-selected__item"),jQuery(this).data("social");u(),o(),set_social_channel_order(),check_for_chaty_close_button()}}),jQuery(".btn-help").on("click",function(e){window.open("https://premio.io/help/chaty/","_blank")}),jQuery(".free-custom-radio, .free-custom-checkbox").on("click",function(e){e.preventDefault()});var c=jQuery("[name=cht_cta]"),i=jQuery(".preview .tooltip-show");c.on("keyup",function(){var e=jQuery(".preview .page .icon");c.val().length>=1?e.removeClass("no-tooltip"):e.addClass("no-tooltip"),i.attr("data-title",c.val())});var n,s,r='<svg version="1.1" id="ch" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" viewBox="-496 507.7 54 54" style="enable-background:new -496 507.7 54 54;" xml:space="preserve">\n <style type="text/css">.st0 {fill: #A886CD;} .st1 {fill: #FFFFFF;}\n </style><g><circle class="st0" cx="-469" cy="534.7" r="27"/></g><path class="st1" d="M-459.9,523.7h-20.3c-1.9,0-3.4,1.5-3.4,3.4v15.3c0,1.9,1.5,3.4,3.4,3.4h11.4l5.9,4.9c0.2,0.2,0.3,0.2,0.5,0.2 h0.3c0.3-0.2,0.5-0.5,0.5-0.8v-4.2h1.7c1.9,0,3.4-1.5,3.4-3.4v-15.3C-456.5,525.2-458,523.7-459.9,523.7z"/>\n <path class="st0" d="M-477.7,530.5h11.9c0.5,0,0.8,0.4,0.8,0.8l0,0c0,0.5-0.4,0.8-0.8,0.8h-11.9c-0.5,0-0.8-0.4-0.8-0.8l0,0\n C-478.6,530.8-478.2,530.5-477.7,530.5z"/>\n <path class="st0" d="M-477.7,533.5h7.9c0.5,0,0.8,0.4,0.8,0.8l0,0c0,0.5-0.4,0.8-0.8,0.8h-7.9c-0.5,0-0.8-0.4-0.8-0.8l0,0\n C-478.6,533.9-478.2,533.5-477.7,533.5z"/>\n </svg>',l=document.getElementById("iconWidget");jQuery(".color-picker-radio input:checked").val();function u(){var t,a,o=!1;if(jQuery(".single-channel-setting").addClass("active"),jQuery("#iconWidget").removeClass("img-p-active"),d()?(0===jQuery(".js-chanel-desktop:checked").length?(t=!1,jQuery(".page-body .chaty-widget").hide()):jQuery(".page-body .chaty-widget").show(),1===jQuery(".js-chanel-desktop:checked").length&&(t=jQuery(".js-chanel-desktop:checked").closest("li").find(".icon.icon-md").html(),jQuery(".js-chanel-desktop:checked").closest(".channels-selected__item").hasClass("img-active")&&jQuery("#iconWidget").addClass("img-p-active")),jQuery(".js-chanel-desktop:checked").length>1&&(t=r,o=!0)):(0===jQuery(".js-chanel-mobile:checked").length?(a=!1,jQuery(".page-body .chaty-widget").hide()):jQuery(".page-body .chaty-widget").show(),1===jQuery(".js-chanel-mobile:checked").length&&(a=jQuery(".js-chanel-mobile:checked").closest("li").find(".icon.icon-md").html(),jQuery(".js-chanel-mobile:checked").closest(".channels-selected__item").hasClass("img-active")&&jQuery("#iconWidget").addClass("img-p-active")),jQuery(".js-chanel-mobile:checked").length>1&&(a=r,o=!0)),n=t,s=a,d()?h(n,o):h(s,o),e("#iconWidget .pop-number").remove(),jQuery("#cht_pending_messages").is(":checked")){var c=jQuery("#cht_number_of_messages").val();""!=c&&c>0&&(e("#iconWidget").append("<span class='pop-number'>"+c+"</span>"),e("#iconWidget .pop-number").css("color",jQuery("#cht_number_color").val()),e("#iconWidget .pop-number").css("background",jQuery("#cht_number_bg_color").val()))}var i=".js-chanel-mobile";if(d())i=".js-chanel-desktop";"open"==jQuery("#chaty_default_state").val()&&jQuery(i+":checked").length>1&&e("#iconWidget .pop-number").remove(),e("#cta-box span").css("color",e("#cht_cta_text_color").val()),e("#cta-box span").css("background",e("#cht_cta_bg_color").val()),e("#custom-css").html("<style>.preview .page .chaty-widget .icon:before {border-color: transparent "+e("#cht_cta_bg_color").val()+" transparent transparent } .preview .page .chaty-widget[style*='left: auto;'] .icon:before {border-color: transparent transparent transparent "+e("#cht_cta_bg_color").val()+"}</style>"),jQuery(".single-channel-setting").addClass("active"),1===jQuery("#channel-list .icon.active").length&&(jQuery(".single-channel-setting").removeClass("active"),"open"==jQuery("#chaty_default_state").val()&&jQuery(".hide-show-button").removeClass("active"))}function h(e,t){if(jQuery("#iconWidget").length){if(l.innerHTML=e||"",t){var a=jQuery(".color-picker-custom input").val()?jQuery(".color-picker-custom input").val():jQuery(".color-picker-radio input:checked").val();if(""!=a)-1==a.indexOf("#")&&(a="#"+a);jQuery(".preview .page svg circle").css({fill:a}),jQuery("#chaty-social-close ellipse").attr("fill",a)}thisVal=jQuery("#chaty_default_state").val(),"open"==thisVal?jQuery(".hide-show-button").addClass("active"):jQuery(".hide-show-button").removeClass("active"),jQuery(".chaty-widget").removeClass("active").removeClass("hover").removeClass("click").removeClass("hide_arrow"),"open"==thisVal?(jQuery(".chaty-widget").addClass("active").addClass("click"),"open"==thisVal&&jQuery(o+":checked").length>1&&jQuery(".chaty-widget").addClass("hide_arrow")):"hover"==thisVal?jQuery(".chaty-widget").addClass("hover"):jQuery(".chaty-widget").addClass("click"),jQuery(".chaty-channels").html("");var o=".js-chanel-mobile";if(d())o=".js-chanel-desktop";"open"==thisVal&&jQuery(o+":checked").length>1?(jQuery("#chaty_attention_effect").val(""),jQuery("#chaty_attention_effect, .test_textarea").attr("disabled",!0),jQuery("#chaty_attention_effect option:first-child").text("Doesn't apply for the open state"),"Doesn't apply for the open state"!=jQuery(".test_textarea").val()&&jQuery(".test_textarea").attr("data-value",jQuery(".test_textarea").val()),jQuery(".test_textarea").val("Doesn't apply for the open state"),jQuery("#cht_number_of_messages").attr("disabled",!0),jQuery("#cht_pending_messages").attr("disabled",!0),jQuery(".disable-message").addClass("label-tooltip").addClass("icon"),jQuery("#cht_pending_messages").attr("checked",!1),jQuery(".pending-message-items").removeClass("active"),jQuery(".cta-action-radio input").attr("disabled",!0)):(jQuery("#chaty_attention_effect, .test_textarea").attr("disabled",!1),jQuery("#chaty_attention_effect option:first-child").text("None"),jQuery(".test_textarea").attr("placeholder",""),"Doesn't apply for the open state"==jQuery(".test_textarea").val()&&jQuery(".test_textarea").val(jQuery(".test_textarea").attr("data-value")),jQuery("#cht_number_of_messages").attr("disabled",!1),jQuery("#cht_pending_messages").attr("disabled",!1),jQuery(".disable-message").removeClass("label-tooltip").removeClass("icon"),jQuery(".cta-action-radio input").attr("disabled",!1)),jQuery(".page-body .chaty-widget").removeClass("vertical").removeClass("horizontal"),jQuery(o+":checked").length>1?(jQuery(o+":checked").each(function(){var e=jQuery(this).closest("li").find(".icon").html(),t=(e=jQuery(this).closest("li").find(".icon").html(),jQuery(this).closest("li").find(".chaty-title").val()),a=jQuery(this).closest(".channels-selected__item").hasClass("img-active")?"img-active":"";""!=t&&(t="<span class='social-tooltip'>"+t+"</span>"),jQuery(".chaty-channels").append("<div class='social-item-box "+a+"'><span class='tooltip-icon'>"+e+"</span>"+t+"</div>")}),"open"==jQuery("#chaty_default_state").val()&&jQuery("#cht_close_button").is(":checked")?(jQuery("#iconWidget").css("display","block"),jQuery(".chaty-widget .tooltiptext").css("display","block"),jQuery(".chaty-widget").removeClass("hide-arrow")):"open"!=jQuery("#chaty_default_state").val()?(jQuery("#iconWidget").css("display","block"),jQuery(".chaty-widget .tooltiptext").css("display","block"),jQuery(".chaty-widget").removeClass("hide-arrow")):"open"==jQuery("#chaty_default_state").val()&&(jQuery("#iconWidget").hide(),jQuery(".chaty-widget .tooltiptext").hide(),jQuery(".chaty-widget").addClass("hide-arrow")),jQuery(".chaty-widget").removeClass("has-single"),jQuery(".page-body .chaty-widget").addClass(jQuery("#chaty_icons_view").val())):1==jQuery(o+":checked").length?("open"!=jQuery("#chaty_default_state").val()||jQuery("#cht_close_button").is(":checked")?"open"!=jQuery("#chaty_default_state").val()&&(jQuery("#iconWidget").css("display","block"),jQuery(".chaty-widget .tooltiptext").css("display","block"),jQuery(".chaty-widget").removeClass("hide-arrow")):(jQuery("#iconWidget").css("display","block"),jQuery(".chaty-widget .tooltiptext").css("display","block"),jQuery(".chaty-widget").removeClass("hide-arrow")),jQuery(".chaty-widget").addClass("has-single"),jQuery(".chaty-widget").removeClass("hide-arrow")):0==jQuery(o+":checked").length&&(jQuery("#iconWidget").hide(),jQuery(".chaty-widget .tooltiptext").hide(),jQuery(".chaty-widget").addClass("hide-arrow"),jQuery(".chaty-widget").removeClass("has-single")),jQuery(".chaty-channels .remove-icon-img").remove(),jQuery("#trigger_on_time").is(":checked")?jQuery("#chaty_trigger_time").attr("readonly",!1):jQuery("#chaty_trigger_time").attr("readonly",!0),jQuery("#chaty_trigger_on_scroll").is(":checked")?jQuery("#chaty_trigger_on_page_scroll").attr("readonly",!1):jQuery("#chaty_trigger_on_page_scroll").attr("readonly",!0),""==jQuery(".chaty-widget .tooltiptext").text()?jQuery(".chaty-widget .tooltiptext").hide():"open"==jQuery("#chaty_default_state").val()&&jQuery(o+":checked").length>1?jQuery(".chaty-widget .tooltiptext").hide():jQuery(".chaty-widget .tooltiptext").css("display","block")}}function d(){return!!jQuery("#previewDesktop").is(":checked")}jQuery("#testUpload").on("change",function(){this.value.length>0?document.querySelector(".js-upload").disabled=!1:(document.querySelector(".js-upload").disabled=!0,document.getElementById("uploadInput").checked=!1)}),jQuery(document).on("keyup","textarea.test_textarea",function(){u()}),jQuery(".js-switch-preview").on("change",function(){d()?jQuery(this).closest(".preview").removeClass("mobiel-view"):jQuery(this).closest(".preview").addClass("mobiel-view"),u()}),jQuery(document).on("change","input[name='cht_pending_messages']",function(){jQuery("#cht_pending_messages").is(":checked")?jQuery(".pending-message-items").addClass("active"):jQuery(".pending-message-items").removeClass("active"),u()}),jQuery(document).on("change","#cht_number_of_messages",function(){u()}),jQuery(document).on("keyup","#cht_number_of_messages",function(){u()}),jQuery(document).on("blur","#cht_number_of_messages",function(){u()}),jQuery(document).on("change",".js-chanel-icon",function(){u()}),jQuery(document).on("change",".js-widget-i",function(e){r=e.target.classList.contains("js-upload")?jQuery(".file-preview-image").last().parent().html():jQuery("i[data-type="+jQuery(".js-widget-i:checked").val()+"]").html(),u()}),"chat-image"!==jQuery(".js-widget-i:checked").attr("data-type")&&(r=jQuery("i[data-type="+jQuery(".js-widget-i:checked").attr("data-type")+"]").html(),u())}),jQuery(document).ready(function(){jQuery(".toast-message").length&&(jQuery(".toast-message").show(),jQuery(".toast-message").addClass("active"),setTimeout(function(){jQuery(".toast-message").removeClass("active")},5e3)),jQuery(document).on("click",".toast-close-btn a",function(e){e.preventDefault(),jQuery(".toast-message").removeClass("active")}),jQuery(document).on("click",".chaty-popup-box button, #chaty-intro-popup",function(t){t.stopPropagation();var a=jQuery("#chaty_update_popup_status").val();e("#chaty-intro-popup").remove(),e.ajax({type:"POST",url:ajaxurl,data:{action:"update_popup_status",nonce:a},beforeSend:function(e){},success:function(e){},error:function(e,t,a){}})}),jQuery(document).on("click",".chaty-popup-box",function(e){e.stopPropagation()}),jQuery(document).on("click",".remove-chaty-options",function(t){t.preventDefault(),t.stopPropagation(),confirm("Are you sure you want to delete this widget?")&&e.ajax({type:"POST",url:ajaxurl,data:{action:"remove_chaty_widget",nonce_code:cht_nonce_ajax.cht_nonce,widget_index:jQuery("#widget_index").val()},beforeSend:function(e){},success:function(e){window.location=e},error:function(e,t,a){}})});window.location.href;window.location.href.indexOf("page=chaty-app&widget=")>-1&&jQuery("#toplevel_page_chaty-app .wp-submenu.wp-submenu-wrap li").each(function(){var e=jQuery(this).find("a").attr("href");void 0!==e&&(jQuery(this).removeClass("current"),window.location.href.indexOf(e)>-1&&e.indexOf("&widget=")>-1&&jQuery(this).addClass("current"))})})}(jQuery),jQuery(window).on("resize",function(){check_for_preview_pos()}),jQuery(window).on("scroll",function(){check_for_preview_pos()}),jQuery(document).ready(function(){check_for_preview_pos()});var totalPageOptions=0,pageOptionContent="",totalDateAndTimeOptions=0,dateAndTimeOptionContent="";jQuery(document).ready(function(){function e(){jQuery(".chaty-whatsapp-setting-textarea").length&&jQuery(".chaty-whatsapp-setting-textarea").each(function(){jQuery("#cht_social_embedded_message_"+jQuery(this).data("id")+"_ifr").length&&tinymce.get(jQuery(this).attr("id")).remove(),tinymce.execCommand("mceAddEditor",!0,jQuery(this).attr("id"))})}totalPageOptions=parseInt(jQuery(".chaty-page-option").length),pageOptionContent=jQuery(".chaty-page-options-html").html(),jQuery(".chaty-page-options-html").remove(),totalDateAndTimeOptions=parseInt(jQuery(".chaty-date-time-option").length),dateAndTimeOptionContent=jQuery(".chaty-date-and-time-options-html").html(),jQuery(".chaty-date-and-time-options-html").remove(),jQuery("#create-rule").on("click",function(){jQuery(".page-options").toggle()}),jQuery("#create-data-and-time-rule").on("click",function(){jQuery(".chaty-data-and-time-rules").toggle()}),jQuery(document).on("change","#chaty_attention_effect",function(){var e=jQuery(this).attr("data-effect");""!=e&&jQuery("#iconWidget").removeClass("chaty-animation-"+e),jQuery("#iconWidget").removeClass("start-now"),jQuery("#iconWidget").addClass("chaty-animation-"+jQuery(this).val()).addClass("start-now"),jQuery(this).attr("data-effect",jQuery(this).val())}),setInterval(function(){var e=jQuery("#chaty_attention_effect").attr("data-effect");""!=e?(jQuery("#iconWidget").removeClass("chaty-animation-"+e),jQuery("#iconWidget").removeClass("start-now"),setTimeout(function(){jQuery("#iconWidget").addClass("chaty-animation-"+jQuery("#chaty_attention_effect").val()).addClass("start-now")},1e3)):jQuery("#chaty_attention_effect").attr("data-effect",jQuery("#chaty_attention_effect").val())},5e3),jQuery(document).on("click",".remove-chaty",function(){jQuery(".page-options").toggle()}),jQuery(document).on("click",".remove-page-option",function(){jQuery(".chaty-data-and-time-rules ").toggle()}),jQuery("#image-upload-content .custom-control-label").on("click",function(e){return e.stopPropagation(),jQuery(this).closest(".custom-control").find("input[type=radio]").attr("checked",!0),jQuery(".js-widget-i").trigger("change"),!1}),jQuery(".chaty-color-field").spectrum({chooseText:"Submit",preferredFormat:"hex",cancelText:"Cancel",showInput:!0,showAlpha:!0,move:function(e){jQuery(this).val(e.toHexString()),jQuery("#cta-box span").css("color",jQuery("#cht_cta_text_color").val()),jQuery("#cta-box span").css("background",jQuery("#cht_cta_bg_color").val()),jQuery("#custom-css").html("<style>.preview .page .chaty-widget .icon:before {border-color: transparent "+jQuery("#cht_cta_bg_color").val()+" transparent transparent } .preview .page .chaty-widget[style*='left: auto;'] .icon:before {border-color: transparent transparent transparent "+jQuery("#cht_cta_bg_color").val()+"}</style>"),chaty_set_bg_color(),jQuery("input[name='switchPreview']:checked").trigger("change")},change:function(e){jQuery(this).val(e.toRgbString()),chaty_set_bg_color(),jQuery("#cta-box span").css("color",jQuery("#cht_cta_text_color").val()),jQuery("#cta-box span").css("background",jQuery("#cht_cta_bg_color").val()),jQuery("#custom-css").html("<style>.preview .page .chaty-widget .icon:before {border-color: transparent "+jQuery("#cht_cta_bg_color").val()+" transparent transparent } .preview .page .chaty-widget[style*='left: auto;'] .icon:before {border-color: transparent transparent transparent "+jQuery("#cht_cta_bg_color").val()+"}</style>"),jQuery("input[name='switchPreview']:checked").trigger("change")}}),jQuery(".chaty-color-field").on("change",function(){chaty_set_bg_color(),change_custom_preview()}),jQuery(".remove-chaty-img").on("click",function(e){e.stopPropagation()}),jQuery("#channels-selected-list").sortable({placeholder:"ui-chaty-state-hl",items:"li:not(#chaty-social-close)",stop:function(){e()},update:function(t,a){set_social_channel_order(),change_custom_preview(),e()}}),jQuery(document).ready(function(){e()}),jQuery(".close-button-img img, .close-button-img .image-upload").on("click",function(){var e=wp.media({title:"Upload Image",multiple:!1,library:{type:"image"}}).open().on("select",function(t){var a=e.state().get("selection").first();imageData=a.toJSON(),jQuery(".close-button-img").addClass("active"),jQuery(".close-button-img input").val(imageData.id),jQuery(".close-button-img img").attr("src",imageData.url),change_custom_preview()})}),jQuery(".remove-close-img").on("click",function(){default_image=jQuery("#default_image").val(),jQuery(".close-button-img").removeClass("active"),jQuery(".close-button-img input").val(""),jQuery(".close-button-img img").attr("src",default_image),change_custom_preview()}),jQuery(document).on("click",".chaty-widget.click",function(e){e.preventDefault(),jQuery(".chaty-widget").toggleClass("active")}),jQuery(document).on("change",".url-options.cht-required",function(e){thisVal=jQuery(this).val(),siteURL=jQuery("#chaty_site_url").val(),newURL=siteURL,"page_has_url"==thisVal?newURL=siteURL:"page_contains"==thisVal?newURL=siteURL+"%s%":"page_start_with"==thisVal?newURL=siteURL+"s%":"page_end_with"==thisVal&&(newURL=siteURL+"%s"),jQuery(this).closest(".url-content").find(".chaty-url").text(newURL)}),check_for_chaty_close_button(),chaty_set_bg_color(),change_custom_preview(),jQuery(".chaty-settings.cls-btn a, .close-btn-set").on("click",function(e){e.preventDefault(),jQuery(".cls-btn-settings, .close-btn-set").toggleClass("active")}),0==jQuery("input[name='cht_position']:checked").length&&(jQuery("#right-position").attr("checked",!0),jQuery("input[name='cht_position']:checked").trigger("change")),0==jQuery("input[name='widget_icon']:checked").length&&(jQuery("input[name='widget_icon']:first").attr("checked",!0),jQuery("input[name='widget_icon']:checked").trigger("change")),jQuery(".form-fonts").on("change",function(){var e=jQuery(this).val();jQuery(".chaty-google-font").remove(),""!=e?(jQuery(".form-fonts option:selected").data("group"),jQuery(".preview-section-chaty #admin-preview .page-body").css("font-family",e)):jQuery(".preview-section-chaty #admin-preview .page-body").attr("style","")})}),jQuery(window).on("load",function(){check_for_chaty_close_button(),chaty_set_bg_color(),jQuery(".chaty-page-options .chaty-page-option").removeClass("last"),jQuery(".chaty-page-options .chaty-page-option:last").addClass("last"),jQuery(".url-options.cht-required").each(function(){jQuery(this).trigger("change")});var e=jQuery(".form-fonts").val();jQuery(".chaty-google-font").remove(),""!=e&&(jQuery(".form-fonts option:selected").data("group"),jQuery(".preview-section-chaty #admin-preview .page-body").css("font-family",e))});var selectedsocialSlug="";function upload_chaty_image(e){selectedsocialSlug=e;var t=wp.media({title:"Upload Image",multiple:!1,library:{type:"image"}}).open().on("select",function(e){var a=t.state().get("selection").first();imageData=a.toJSON(),jQuery("#cht_social_image_"+selectedsocialSlug).val(imageData.id),jQuery(".custom-image-"+selectedsocialSlug+" img").attr("src",imageData.url),jQuery("#chaty-social-"+selectedsocialSlug+" .channels-selected__item").addClass("img-active"),change_custom_preview()})}function toggle_chaty_setting(e){if(jQuery("#chaty-social-"+e).find(".chaty-advance-settings").toggle(),jQuery("#chaty-social-"+e).find(".chaty-advance-settings").toggleClass("active"),"Contact_Us"==e&&jQuery("#Contact_Us-close-btn").length){var t=jQuery("#Contact_Us-close-btn").data("nonce");jQuery("#Contact_Us-close-btn").hasClass("active")||(jQuery("#Contact_Us-close-btn").addClass("active"),jQuery.ajax({type:"POST",url:ajaxurl,data:{nonce:t,action:"update_channel_setting"},success:function(e){}}))}jQuery("#chaty-social-"+e+" .chaty-advance-settings.active").length&&jQuery("body,html").animate({scrollTop:jQuery("#chaty-social-"+e+" .chaty-advance-settings.active").offset().top-50},500),change_custom_preview()}function chaty_set_bg_color(){jQuery(".chaty-color-field:not(.button-color)").each(function(){""!=jQuery(this).val()&&"#ffffff"!=jQuery(this).val()&&("Linkedin"!=jQuery(this).closest("li").data("id")||"Linkedin"==jQuery(this).closest("li").data("id")&&"#ffffff"!=jQuery(this).val())&&(defaultColor=jQuery(this).val(),jQuery(this).closest(".channels-selected__item").find(".color-element").css("fill",defaultColor),jQuery(this).closest(".channels-selected__item").find(".custom-chaty-image").css("background",defaultColor),jQuery(this).closest(".channels-selected__item").find(".facustom-icon").css("background",defaultColor))}),change_custom_preview()}function upload_qr_code(){var e=wp.media({title:"Upload QR Image",multiple:!1,library:{type:"image"}}).open().on("select",function(t){var a=e.state().get("selection").first();imageData=a.toJSON(),jQuery("#upload_qr_code_val").val(imageData.id),jQuery("#upload_qr_code img").attr("src",imageData.url),jQuery(".remove-qr-code").addClass("active"),change_custom_preview()})}function remove_qr_code(){jQuery(".remove-qr-code").removeClass("active"),jQuery("#upload_qr_code_val").val(""),default_image=jQuery("#default_image").val(),jQuery("#upload_qr_code img").attr("src",default_image),change_custom_preview()}function remove_chaty_image(e){default_image=jQuery("#default_image").val(),jQuery("#chaty-social-"+e+" .channels-selected__item").removeClass("img-active"),jQuery("#cht_social_image_"+e).val(""),jQuery("#cht_social_image_src_"+e).attr("src",default_image),change_custom_preview()}var baseIcon='<svg version="1.1" id="ch" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" viewBox="-496 507.7 54 54" style="enable-background:new -496 507.7 54 54;" xml:space="preserve">\n <style type="text/css">.st0 {fill: #A886CD;} .st1 {fill: #FFFFFF;}\n </style><g><circle class="st0" cx="-469" cy="534.7" r="27"/></g><path class="st1" d="M-459.9,523.7h-20.3c-1.9,0-3.4,1.5-3.4,3.4v15.3c0,1.9,1.5,3.4,3.4,3.4h11.4l5.9,4.9c0.2,0.2,0.3,0.2,0.5,0.2 h0.3c0.3-0.2,0.5-0.5,0.5-0.8v-4.2h1.7c1.9,0,3.4-1.5,3.4-3.4v-15.3C-456.5,525.2-458,523.7-459.9,523.7z"/>\n <path class="st0" d="M-477.7,530.5h11.9c0.5,0,0.8,0.4,0.8,0.8l0,0c0,0.5-0.4,0.8-0.8,0.8h-11.9c-0.5,0-0.8-0.4-0.8-0.8l0,0\n C-478.6,530.8-478.2,530.5-477.7,530.5z"/>\n <path class="st0" d="M-477.7,533.5h7.9c0.5,0,0.8,0.4,0.8,0.8l0,0c0,0.5-0.4,0.8-0.8,0.8h-7.9c-0.5,0-0.8-0.4-0.8-0.8l0,0\n C-478.6,533.9-478.2,533.5-477.7,533.5z"/>\n </svg>',defaultIcon='<svg version="1.1" id="ch" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" viewBox="-496 507.7 54 54" style="enable-background:new -496 507.7 54 54;" xml:space="preserve">\n <style type="text/css">.st0 {fill: #A886CD;} .st1 {fill: #FFFFFF;}\n </style><g><circle class="st0" cx="-469" cy="534.7" r="27"/></g><path class="st1" d="M-459.9,523.7h-20.3c-1.9,0-3.4,1.5-3.4,3.4v15.3c0,1.9,1.5,3.4,3.4,3.4h11.4l5.9,4.9c0.2,0.2,0.3,0.2,0.5,0.2 h0.3c0.3-0.2,0.5-0.5,0.5-0.8v-4.2h1.7c1.9,0,3.4-1.5,3.4-3.4v-15.3C-456.5,525.2-458,523.7-459.9,523.7z"/>\n <path class="st0" d="M-477.7,530.5h11.9c0.5,0,0.8,0.4,0.8,0.8l0,0c0,0.5-0.4,0.8-0.8,0.8h-11.9c-0.5,0-0.8-0.4-0.8-0.8l0,0\n C-478.6,530.8-478.2,530.5-477.7,530.5z"/>\n <path class="st0" d="M-477.7,533.5h7.9c0.5,0,0.8,0.4,0.8,0.8l0,0c0,0.5-0.4,0.8-0.8,0.8h-7.9c-0.5,0-0.8-0.4-0.8-0.8l0,0\n C-478.6,533.9-478.2,533.5-477.7,533.5z"/>\n </svg>',iconBlock=document.getElementById("iconWidget");function set_social_channel_order(){socialString=[],jQuery("#channels-selected-list li").each(function(){socialString.push(jQuery(this).attr("data-id"))}),socialString=socialString.join(","),jQuery("#cht_numb_slug").val(socialString),check_for_chaty_close_button()}function check_for_chaty_close_button(){jQuery("#channels-selected-list > li:not(.chaty-cls-setting)").length>=2?jQuery("#chaty-social-close").show():jQuery("#chaty-social-close").hide(),change_custom_preview();var e="";jQuery("#channels-selected-list > li").each(function(){"undefined"!=jQuery(this).attr("data-id")&&""!=jQuery(this).attr("data-id")&&(e+=jQuery(this).attr("data-id")+","),e=e.trimRight(",")}),jQuery(".add_slug").val(e)}function change_custom_preview(){var e,t,a=!1;jQuery("#iconWidget").removeClass("img-p-active"),getChtPreviewDesktop()?(0===jQuery(".js-chanel-desktop:checked").length&&(e=!1),1===jQuery(".js-chanel-desktop:checked").length&&(e=jQuery(".js-chanel-desktop:checked").closest("li").find(".icon.icon-md").html(),jQuery(".js-chanel-desktop:checked").closest(".channels-selected__item").hasClass("img-active")&&jQuery("#iconWidget").addClass("img-p-active")),jQuery(".js-chanel-desktop:checked").length>1&&(e=defaultIcon,a=!0)):(0===jQuery(".js-chanel-mobile:checked").length&&(t=!1),1===jQuery(".js-chanel-mobile:checked").length&&(t=jQuery(".js-chanel-mobile:checked").closest("li").find(".icon.icon-md").html(),jQuery(".js-chanel-mobile:checked").closest(".channels-selected__item").hasClass("img-active")&&jQuery("#iconWidget").addClass("img-p-active")),jQuery(".js-chanel-mobile:checked").length>1&&(t=defaultIcon,a=!0)),desktopIcon=e,mobileIcon=t,getChtPreviewDesktop()?setChtIcon(desktopIcon,a):setChtIcon(mobileIcon,a),jQuery("#channels-selected-list > li.chaty-channel").length<=1?jQuery(".o-channel, .font-section").removeClass("active"):jQuery(".o-channel, .font-section").addClass("active")}function getChtPreviewDesktop(){return!!jQuery("#previewDesktop").is(":checked")}function setChtIcon(e,t){if(jQuery("iconWidget").length){if((iconBlock=document.getElementById("iconWidget")).innerHTML=e||"",t){var a=jQuery(".color-picker-custom input").val()?jQuery(".color-picker-custom input").val():jQuery(".color-picker-radio input:checked").val();jQuery(".preview .page svg circle").css({fill:a}),jQuery("#chaty-social-close ellipse").attr("fill",a)}jQuery(".js-widget-i:checked").trigger("change")}}
|
admin/class-admin-base.php
CHANGED
@@ -231,7 +231,7 @@ class CHT_Admin_Base
|
|
231 |
wp_enqueue_style( 'jquery-ui-css', plugins_url( '../admin/assets/css/datepicker.min.css', __FILE__ ), array(), CHT_VERSION );
|
232 |
}
|
233 |
|
234 |
-
wp_enqueue_style( $this->plugin_slug, plugins_url( '../admin/assets/css/cht-style.css', __FILE__ ), array(), CHT_VERSION );
|
235 |
}
|
236 |
}
|
237 |
|
@@ -414,6 +414,14 @@ class CHT_Admin_Base
|
|
414 |
include_once CHT_DIR . '/views/admin/chaty-popup.php';
|
415 |
}
|
416 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
417 |
}
|
418 |
|
419 |
public function display_cht_admin_upgrade_page()
|
@@ -1855,3 +1863,10 @@ class CHT_Admin_Base
|
|
1855 |
}
|
1856 |
}
|
1857 |
new CHT_Admin_Base();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
231 |
wp_enqueue_style( 'jquery-ui-css', plugins_url( '../admin/assets/css/datepicker.min.css', __FILE__ ), array(), CHT_VERSION );
|
232 |
}
|
233 |
|
234 |
+
wp_enqueue_style( $this->plugin_slug, plugins_url( '../admin/assets/css/cht-style.min.css', __FILE__ ), array(), CHT_VERSION );
|
235 |
}
|
236 |
}
|
237 |
|
414 |
include_once CHT_DIR . '/views/admin/chaty-popup.php';
|
415 |
}
|
416 |
}
|
417 |
+
|
418 |
+
if(isset($_REQUEST['show_message']) && $_REQUEST['show_message'] == 1) { ?>
|
419 |
+
<div class="toast-message">
|
420 |
+
<div class="toast-close-btn"><a href="javascript:;"></a></div>
|
421 |
+
<div class="toast-message-title">Settings Updated</div>
|
422 |
+
<div class="toast-message-body">Your settings has been saved</div>
|
423 |
+
</div>
|
424 |
+
<?php }
|
425 |
}
|
426 |
|
427 |
public function display_cht_admin_upgrade_page()
|
1863 |
}
|
1864 |
}
|
1865 |
new CHT_Admin_Base();
|
1866 |
+
|
1867 |
+
add_action('update_option_chaty_updated_on', function( $old_value, $value ) {
|
1868 |
+
if($old_value != $value) {
|
1869 |
+
wp_redirect( "admin.php?page=chaty-app&show_message=1" );
|
1870 |
+
exit;
|
1871 |
+
}
|
1872 |
+
}, 10, 2);
|
cht-icons.php
CHANGED
@@ -7,7 +7,7 @@
|
|
7 |
Author URI: https://premio.io/downloads/chaty/
|
8 |
Text Domain: chaty
|
9 |
Domain Path: /languages
|
10 |
-
Version: 2.7.
|
11 |
License: GPL2
|
12 |
*/
|
13 |
|
@@ -27,7 +27,7 @@ define('CHT_INC', CHT_DIR . '/includes');
|
|
27 |
define('CHT_PRO_URL', admin_url("admin.php?page=chaty-app-upgrade"));
|
28 |
define('CHT_PLUGIN_URL', plugin_dir_url(__FILE__));
|
29 |
define('CHT_PLUGIN_BASE', plugin_basename(CHT_FILE));
|
30 |
-
define('CHT_VERSION', "2.7.
|
31 |
|
32 |
if (!function_exists('wp_doing_ajax')) {
|
33 |
function wp_doing_ajax()
|
7 |
Author URI: https://premio.io/downloads/chaty/
|
8 |
Text Domain: chaty
|
9 |
Domain Path: /languages
|
10 |
+
Version: 2.7.8
|
11 |
License: GPL2
|
12 |
*/
|
13 |
|
27 |
define('CHT_PRO_URL', admin_url("admin.php?page=chaty-app-upgrade"));
|
28 |
define('CHT_PLUGIN_URL', plugin_dir_url(__FILE__));
|
29 |
define('CHT_PLUGIN_BASE', plugin_basename(CHT_FILE));
|
30 |
+
define('CHT_VERSION', "2.7.8");
|
31 |
|
32 |
if (!function_exists('wp_doing_ajax')) {
|
33 |
function wp_doing_ajax()
|
css/chaty-front.css
CHANGED
@@ -1207,7 +1207,7 @@ body.left-cht-position .chaty-inline-popup {
|
|
1207 |
position: relative;
|
1208 |
display: block;
|
1209 |
}
|
1210 |
-
.i-trigger.one-widget a:after {
|
1211 |
content: "";
|
1212 |
position: absolute;
|
1213 |
height: 100%;
|
@@ -1222,7 +1222,7 @@ body.left-cht-position .chaty-inline-popup {
|
|
1222 |
transition: all 0.1s linear;
|
1223 |
-webkit-transition: all 0.1s linear;
|
1224 |
}
|
1225 |
-
.i-trigger.one-widget a:hover:after {
|
1226 |
opacity: 0.12;
|
1227 |
}
|
1228 |
@-webkit-keyframes chaty-animation-shockwave {
|
@@ -1332,7 +1332,7 @@ body.chaty-in-mobile .chaty-widget-i.chaty-close-settings.i-trigger-close:before
|
|
1332 |
display: none;
|
1333 |
}
|
1334 |
body .chaty-widget.one_widget *.i-trigger.one-widget.show-channel .chaty-widget-i-title, body .chaty-widget.one_widget *.i-trigger.one-widget.show-channel .chaty-widget-i:before {
|
1335 |
-
opacity:
|
1336 |
}
|
1337 |
body .chaty-widget.one_widget *.i-trigger.one-widget.show-channel:hover .chaty-widget-i-title, body .chaty-widget.one_widget *.i-trigger.one-widget.show-channel:hover .chaty-widget-i:before {
|
1338 |
opacity: 1 !important;
|
1207 |
position: relative;
|
1208 |
display: block;
|
1209 |
}
|
1210 |
+
.i-trigger.one-widget a .svg:after {
|
1211 |
content: "";
|
1212 |
position: absolute;
|
1213 |
height: 100%;
|
1222 |
transition: all 0.1s linear;
|
1223 |
-webkit-transition: all 0.1s linear;
|
1224 |
}
|
1225 |
+
.i-trigger.one-widget a:hover .svg:after {
|
1226 |
opacity: 0.12;
|
1227 |
}
|
1228 |
@-webkit-keyframes chaty-animation-shockwave {
|
1332 |
display: none;
|
1333 |
}
|
1334 |
body .chaty-widget.one_widget *.i-trigger.one-widget.show-channel .chaty-widget-i-title, body .chaty-widget.one_widget *.i-trigger.one-widget.show-channel .chaty-widget-i:before {
|
1335 |
+
opacity: 0 !important;
|
1336 |
}
|
1337 |
body .chaty-widget.one_widget *.i-trigger.one-widget.show-channel:hover .chaty-widget-i-title, body .chaty-widget.one_widget *.i-trigger.one-widget.show-channel:hover .chaty-widget-i:before {
|
1338 |
opacity: 1 !important;
|
css/chaty-front.min.css
CHANGED
@@ -1 +1 @@
|
|
1 |
-
.chaty-widget.hide-cht-widget .chaty-widget.one_widget .chaty-widget-i:not(.no-tooltip):before{display:none}.facebook .chaty-widget-i-title{padding:0!important}.widget-img img{max-height:100%;max-width:100%;height:auto;margin:0 auto}.widget-img{text-align:center;background:0 0!important}.widget-img img{object-fit:cover;border-radius:50%}.chaty-widget .chaty-widget-i.facebook.active.before .chaty-widget-i-title.fb-title{display:none!important}.wechat-box img{object-fit:cover;max-width:230px;height:auto;width:100%;display:block}.wechat-box-head svg{cursor:pointer;width:30px;height:30px}.wechat-box-head SVG{cursor:pointer;width:30PX;height:30px;fill:#fff;font-weight:700}.wechat-box-head{width:100%;display:inline-block;vertical-align:bottom;color:#fff;padding:0 0 0 10px;line-height:34px;background:#34a700;height:34px}.wechat-box{display:inline-block;vertical-align:bottom;position:relative;padding:10px;width:100%}.wechat-qr-code{display:inline-block;vertical-align:bottom;background:#fff;-webkit-border-radius:6px;-moz-border-radius:6px;border-radius:6px;position:fixed;bottom:30px;left:100px;padding:0;z-index:100001;width:280px;transition:all .5s linear;-webkit-transition:all .5s linear;-moz-transition:all .5s linear;box-shadow:rgba(0,0,0,.16) 0 5px 40px;-webkit-box-shadow:rgba(0,0,0,.16) 0 5px 40px;-moz-box-shadow:rgba(0,0,0,.16) 0 5px 40px}.chaty-social-img{display:block;-webkit-border-radius:50%;-moz-border-radius:50%;border-radius:50%}.chaty-social-img img{object-fit:cover;-webkit-border-radius:50%;-moz-border-radius:50%;border-radius:50%;box-shadow:0 3px 6px rgba(0,0,0,.25);line-height:0;margin:0;padding:0}.widget-img{display:flex;align-items:center;height:100%;overflow:inherit;border-radius:100%}.set-url-target{line-height:0}.get{opacity:1}.chaty-widget-show .get{opacity:1}.none-widget-show .get{opacity:0}.get a{color:#222!important;text-decoration:none!important}body .one_widget .bofore_del:before{opacity:0!important;display:none}.one_widget.chaty-widget:not(.chaty-widget-is-right) .chaty-widget-i:not(.no-tooltip) .chaty-widget-i-title{font-size:17px;left:-3px;top:50%;white-space:nowrap;padding:5px 15px;line-height:21px;color:#333;background-color:#fff;box-shadow:0 1.93465px 7.73859px rgba(0,0,0,.15);border-radius:10px}.chaty-widget.one_widget .chaty-widget-i:not(.no-tooltip) .chaty-widget-i-title,.chaty-widget.one_widget .chaty-widget-i:not(.no-tooltip):before{opacity:1!important}.snap-wee-title{z-index:20;opacity:0;padding:10px 10px 9px 12px!important;font-size:17px;transform:translate(calc(-100% - 14px),-50%);left:-3px;top:50%;white-space:nowrap;line-height:21px;color:#333;background-color:#fff;box-shadow:0 1.93465px 7.73859px rgba(0,0,0,.15);border-radius:10px;position:absolute}@media (min-width:1024px){.chaty-widget-i:hover .snap-wee-title{opacity:1}}.chaty-widget-i.hover .snap-wee-title{opacity:1}.chaty-whatsapp-message p{margin:0;padding:0;color:#303030}.snap-wee-title:before{content:"";right:-9px;position:absolute;top:50%;transform:translateY(-50%);height:0;width:0;z-index:11;border-width:5px 0 5px 10px;border-style:solid;border-color:transparent transparent transparent #fff}.snap-wee-title p{color:#222;text-decoration:none;margin:0;padding:0}.chaty-widget-i .chaty-widget-i-title p{color:#222!important;text-decoration:none!important;margin:0!important;padding:0!important}.chaty-widget-i .i-trigger a{color:#222!important;text-decoration:none!important}*{-webkit-tap-highlight-color:transparent!important}.i-trigger-close svg,.i-trigger-open svg{transition:all .5s}.chaty-widget-show .i-trigger-close svg,.chaty-widget-show .i-trigger-open svg{transform:rotate(180deg)}.none-widget-show .i-trigger-ope{-webkit-animation:fadein 1.5s;-moz-animation:fadein 1.5s;-ms-animation:fadein 1.5s;-o-animation:fadein 1.5s}.chaty-widget-show .i-trigger-cloe{-webkit-animation:fadein 1.5s;-moz-animation:fadein 1.5s;-ms-animation:fadein 1.5s;-o-animation:fadein 1.5s}.chaty-widget .i-trigger-open.chaty-widget-i:not(.no-tooltip) .chaty-widget-i-title{transform:translate(calc(-100% - 12px),-50%)}.chaty-widget-is-right.chaty-widget .i-trigger-open.chaty-widget-i:not(.no-tooltip) .chaty-widget-i-title{right:0;left:auto;transform:translate(calc(100% + 12px),-50%)}.chaty-widget-is-right.chaty-widget .chaty-widget-i:not(.no-tooltip) .chaty-widget-i-title{right:0;left:auto;transform:translate(calc(100% + 13px),-50%)}.chaty-widget-is-right.chaty-widget.one_widget .chaty-widget-i:not(.no-tooltip):before{left:auto;right:-18px}.chaty-widget.one_widget .chaty-widget-i:not(.no-tooltip):before{left:-18px}.one_widget .i-trigger-open .chaty-widget-i-title{padding:10px 10px 9px 12px!important}.one_widget .i-trigger-open.hidetooltip .chaty-widget-i-title{display:none}.one_widget .i-trigger-open.hidetooltip .chaty-widget-i:before{display:none}.chaty-widget .chaty-widget-i.before.facebook:not(.no-tooltip):hover:before,.chaty-widget .chaty-widget-i.facebook.before:not(.no-tooltip):hover .chaty-widget-i-title{opacity:1;pointer-events:auto}.chaty-widget .chaty-widget-i:not(.no-tooltip) .chaty-widget-i-title,.chaty-widget .chaty-widget-i:not(.no-tooltip).before:before{opacity:1}.one_widget .chaty-widget-i svg{position:relative}body .chaty-widget-i-title.true{opacity:1!important}.chaty-widget .i-trigger-open:not(.no-tooltip):before{opacity:1!important}.chaty-widget .chaty-widget-i.facebook.active:not(.no-tooltip) .chaty-widget-i-title,.chaty-widget .chaty-widget-i.facebook:not(.no-tooltip):hover:before{pointer-events:initial}.chaty-widget .facebook_header{background-color:#1e88e5;height:34px;border-top-left-radius:5px;border-top-right-radius:5px;padding-left:9px;display:flex;align-items:center;justify-content:space-between}body .chaty-widget-i .facebook_header p{font-family:Lato,Helvetica,Arial,sans-serif;font-size:13px;color:#fff!important;position:relative}.facebook_header p,.facebook_header svg{display:inline-block;vertical-align:bottom;margin:0}.chaty-widget .chaty-widget-i .facebook_header svg{height:30px!important;width:30px!important}.chaty-widget{display:none!important}@media screen and (max-width:800px){.i-trigger-close .chaty-widget-i-title{display:none}.i-trigger-close:before{display:none}}@media screen and (max-width:480px){.mobile_none{display:none}.chaty-widget.mobile_active{display:block!important}}@media screen and (min-width:480px){.chaty-widget.desktop_active{display:block!important}}.chaty-widget{position:fixed;z-index:9999}.chaty-widget .chaty-widget-is{display:flex;z-index:1111;flex-wrap:wrap;overflow:hidden;height:0;position:absolute;pointer-events:none;left:0;right:auto;bottom:65px;opacity:0}#transition_disabled{-webkit-animation:none!important;-moz-animation:none!important;-ms-animation:none!important;-o-animation:none!important;-webkit-animation:none!important}@keyframes fadeout{from{opacity:1}to{opacity:0}}@-moz-keyframes fadeout{from{opacity:1}to{opacity:0}}@-webkit-keyframes fadeout{from{opacity:1}to{opacity:0}}@-o-keyframes fadeout{from{opacity:1}to{opacity:0}}.chaty-widget .i-trigger{cursor:pointer;position:relative}.chaty-widget .i-trigger .i-trigger-close,.chaty-widget .i-trigger .i-trigger-open{transition:all .2s}.chaty-widget .i-trigger .i-trigger-close{position:absolute;bottom:-4px;left:0;right:0;z-index:2}.chaty-widget .i-trigger .i-trigger-open{opacity:1;pointer-events:auto}.chaty-widget .i-trigger .i-trigger-close{opacity:0;pointer-events:none}.chaty-widget.chaty-widget-show .i-trigger .i-trigger-open{opacity:0;pointer-events:none}.chaty-widget.chaty-widget-show .i-trigger .i-trigger-close{box-shadow:none;opacity:1;pointer-events:auto}.chaty-widget.chaty-widget-show .chaty-widget-is{pointer-events:auto;overflow:visible;opacity:1;visibility:visible}@keyframes fadein{from{opacity:0}to{opacity:1}}@-moz-keyframes fadein{from{opacity:0}to{opacity:1}}@-webkit-keyframes fadein{from{opacity:0}to{opacity:1}}@-ms-keyframes fadein{from{opacity:0}to{opacity:1}}@-o-keyframes fadein{from{opacity:0}to{opacity:1}}.chaty-widget.chaty-widget-show .chaty-widget-is .chaty-widget-i{opacity:1;overflow:visible}.chaty-widget .chaty-widget-i .chaty-widget-i{margin:0}.chaty-widget .chaty-widget-i{border-radius:50%;vertical-align:top;width:54px;height:54px;position:relative;margin:4px}.chaty-widget .chaty-widget-i .wrap-svg,.chaty-widget .chaty-widget-i svg{cursor:pointer;width:100%;height:100%;display:block;position:relative;box-shadow:0 3px 6px rgba(0,0,0,.25);border-radius:50%;-wekit-border-radius:50%;-moz-border-radius:50%}.chaty-widget .chaty-animation-sheen .wrap-svg,.chaty-widget .chaty-animation-sheen svg{box-shadow:none}.chaty-widget .chaty-animation-sheen{box-shadow:0 3px 6px rgba(0,0,0,.25);border-radius:50%;-wekit-border-radius:50%;-moz-border-radius:50%}body .i-trigger-open .chaty-widget-i-title{padding:5px 16px 5px 17px!important}.chaty-widget:not(.chaty-widget-is-right) .i-trigger-open:before{left:-18px!important}.one_widget.chaty-widget.chaty-widget-is-right .i-trigger-open:before{right:-18px!important}body .one_widget .i-trigger-open .chaty-widget-i-title.face_title{padding:0!important}.one_widget.chaty-widget .chaty-widget-i:not(.no-tooltip) .chaty-widget-i-title{transform:translate(calc(-100% - 14px),-50%)}.chaty-widget .chaty-widget-i:not(.no-tooltip) .chaty-widget-i-title,.chaty-widget .chaty-widget-i:not(.no-tooltip):before{content:none;position:absolute;opacity:0;pointer-events:none;z-index:10}.chaty-widget .chaty-widget-i:not(.no-tooltip):before{content:"";left:-14px;top:50%;transform:translateY(-50%);height:0;width:0;z-index:11;border-width:5px 0 5px 10px;border-style:solid;border-color:transparent transparent transparent #fff}.chaty-widget .chaty-widget-i:not(.no-tooltip) .chaty-widget-i-title{text-align:center;font-size:17px;left:0;top:50%;transform:translate(calc(-100% - 13px),-50%);white-space:nowrap;padding:5px 15px;line-height:21px;color:#333;background-color:#fff;box-shadow:0 1.93465px 7.73859px rgba(0,0,0,.15);border-radius:10px}.chaty-widget .chaty-widget-i:not(.no-tooltip):hover .chaty-widget-i-title,.chaty-widget .chaty-widget-i:not(.no-tooltip):hover:before{opacity:1;pointer-events:auto}.chaty-widget .chaty-widget-i.facebook:not(.no-tooltip):hover .chaty-widget-i-title,.chaty-widget .chaty-widget-i.facebook:not(.no-tooltip):hover:before{opacity:0;pointer-events:auto}.chaty-widget .chaty-widget-i .color-element{transition:all .2s}.chaty-widget:not(.chaty-widget-is-right) .chaty-widget-is{position:absolute;right:0;left:auto;bottom:65px;justify-content:flex-end}.chaty-widget.chaty-widget-is-right .i-trigger-open.chaty-widget-i:before{right:-13px;left:auto;border-width:5px 10px 5px 0;border-color:transparent #fff transparent transparent}.chaty-widget.chaty-widget-is-right .chaty-widget-i:before{right:-14px;left:auto;border-width:5px 10px 5px 0;border-color:transparent #fff transparent transparent}.chaty-widget.chaty-widget-is-right .chaty-widget-i.facebook.active .chaty-widget-i-title.face_title{position:fixed;transform:initial!important;right:auto;top:calc(100% - 484px)}.chaty-widget .chaty-widget-i.facebook.active .chaty-widget-i-title{min-width:250px;padding:0;position:fixed;transform:initial;right:29px;left:auto;top:calc(100% - 484px)}.one_widget.chaty-widget.chaty-widget-is-right .chaty-widget-i .chaty-widget-i-title{right:0;left:auto;transform:translate(calc(100% + 17px),-50%)!important}.chaty-animation-pulse{animation:chaty-animation-pulse 5s infinite}.chaty-animation-jump{animation:chaty-animation-jump 5s infinite cubic-bezier(.84,-.54,.31,1.19)}.chaty-animation-waggle{animation:chaty-animation-waggle 5s infinite}.chaty-animation-sheen{position:relative;overflow:hidden}.chaty-animation-sheen:after{animation:chaty-animation-sheen 5s infinite;content:'';position:absolute;top:0;right:0;bottom:0;left:0;background:linear-gradient(to bottom,transparent,rgba(255,255,255,.5) 50%,transparent);transform:rotateZ(60deg) translate(0,5em)}.chaty-animation-spin{animation:chaty-animation-spin 5s infinite cubic-bezier(.56,-.35,.22,1.5)}.chaty-animation-fade{animation:chaty-animation-fade 5s infinite}@keyframes chaty-animation-pulse{0%{background-color:orange}5%{background-color:red}10%{background-color:orange}15%{background-color:red}100%,20%{background-color:transparent}}@keyframes chaty-animation-jump{0%{transform:none}10%{transform:translateY(-1em)}100%,20%{transform:none}}@keyframes chaty-animation-waggle{0%{transform:none}10%{transform:rotateZ(-20deg) scale(1.2)}13%{transform:rotateZ(25deg) scale(1.2)}15%{transform:rotateZ(-15deg) scale(1.2)}17%{transform:rotateZ(15deg) scale(1.2)}20%{transform:rotateZ(-12deg) scale(1.2)}22%{transform:rotateZ(0) scale(1.2)}100%,24%{transform:rotateZ(0) scale(1)}}@keyframes chaty-animation-sheen{100%,20%{transform:rotateZ(60deg) translate(0,-80px)}}@keyframes chaty-animation-spin{10%{transform:rotateZ(-20deg);animation-timing-function:ease}100%,20%{transform:rotateZ(360deg)}}@keyframes chaty-animation-fade{5%{opacity:.25}10%{opacity:1}15%{opacity:.25}100%,20%{opacity:1}}.start-now,.start-now:after{animation-delay:0}.chaty-widget .i-trigger{z-index:1000}.chaty-widget:not(.chaty-widget-is-right) .chaty-widget-is{z-index:1000}.chaty-nav:before{display:block;position:fixed;top:0;left:0;content:'';width:100vw;height:100vh;background:rgba(0,0,0,.8);visibility:hidden;z-index:100;transition:all .5s ease-in-out;-webkit-transition:all .5s ease-in-out;-moz-transition:all .5s ease-in-out}.chaty-animation-widget.left-position .chaty-nav:before{clip-path:circle(15px at 60px calc(100% - 60px))}.chaty-animation-widget.right-position .chaty-nav:before{clip-path:circle(15px at calc(100% - 60px) calc(100% - 60px))}.chaty-animation-widget.active .chaty-nav:before{visibility:visible;clip-path:circle(100%)}.chaty-widget-is.has-no-close-btn{position:absolute!important;bottom:0!important;top:auto!important}.chaty-widget.hide-tooltip-arrow .chaty-widget-i:before{display:none!important}body .no-tooltip .chaty-widget-i-title.true{display:none}.chaty-widget-i.hide-chaty-arrow:before{display:none}.chaty-widget-show .i-trigger-open.single-button svg{transform:rotate(0)!important;-webkit-transform:rotate(0)!important}.facustom-icon{display:block;border-radius:50%;-moz-border-radius:50%;-webkit-border-radius:50%;text-align:center;color:#fff}body.horizontal-cht-menu .chaty-widget-is{display:inline-block;top:0;right:100%!important;left:auto!important}body.horizontal-cht-menu.chaty-in-desktop .chaty-main-widget.is-in-desktop{display:inline-block}body.horizontal-cht-menu.chaty-in-mobile .chaty-main-widget.is-in-mobile{display:inline-block}body.horizontal-cht-menu.chaty-widget-is-right .chaty-widget-is{left:100%!important;right:auto!important}body.horizontal-cht-menu .chaty-widget.chaty-widget-is-right .chaty-widget-is{right:auto!important;left:100%!important}body.horizontal-cht-menu .chaty-widget.one_widget .chaty-widget-is{right:0!important;left:0!important}body.chaty-in-desktop.horizontal-cht-menu .chaty-main-widget.is-in-desktop,body.chaty-in-mobile.horizontal-cht-menu .chaty-main-widget.is-in-mobile{display:inline-block!important}.wechat-qr-code.right{right:25px;left:auto}.wechat-qr-code.left{right:auto;left:25px}body.horizontal-cht-menu .chaty-widget-is .chaty-widget-i:not(.no-tooltip) .chaty-widget-i-title{right:auto;left:auto;transform:translate(calc(-50% + 26px),-140%);top:0}body.horizontal-cht-menu .chaty-widget-is .chaty-widget-i:not(.no-tooltip):before{top:-30%;left:0;right:0;margin:0 auto;transform:rotate(-90deg)}body.horizontal-cht-menu.right-cht-position .chaty-widget-is .chaty-widget-i:not(.no-tooltip):before{transform:rotate(90deg)}.i-trigger.one-widget.no-tooltip .chaty-widget-i-title{display:none}.i-trigger.one-widget.no-tooltip .chaty-widget-i:before{display:none}body .chaty-widget.one_widget .i-trigger.one-widget.show-channel .chaty-widget-i-title,body .chaty-widget.one_widget .i-trigger.one-widget.show-channel .chaty-widget-i:before{opacity:0!important}body .chaty-widget.one_widget .i-trigger.one-widget.show-channel:hover .chaty-widget-i-title,body .chaty-widget.one_widget .i-trigger.one-widget.show-channel:hover .chaty-widget-i:before{opacity:1!important}.chaty-widget.has-not-close-button .chaty-widget-is{top:auto!important;bottom:0!important}body.horizontal-cht-menu .chaty-widget-show .chaty-widget-i.chaty-close-settings .chaty-widget-i-title{right:auto;left:auto;transform:translate(calc(-50% + 26px),-140%);top:0}body.horizontal-cht-menu .chaty-widget-i.chaty-close-settings.i-trigger-close:before{top:-30%;left:0;right:0;margin:0 auto;transform:rotate(-90deg)}body.horizontal-cht-menu.right-cht-position .chaty-widget-i.chaty-close-settings.i-trigger-close:before{transform:rotate(90deg)}span.cht-pending-message{position:absolute;top:-4px;right:-4px;font-size:11px;font-size:11.5px;border-radius:50%;background:#d00;color:#fff;min-width:20px;min-height:20px;text-align:center;line-height:20px}.chaty-widget .sr-only{border:0!important;clip:rect(0,0,0,0);height:1px!important;margin:-1px!important;overflow:hidden;padding:0!important;position:absolute;width:1px!important}.chaty-whatsapp-header{padding:5px 0 1px 10px;text-align:left;background:#4fce5d}.chaty-contact-header{padding:5px 5px 5px 10px;text-align:left;background:#fff;font-size:18px;border-bottom:solid 1px #acacac}.chaty-contact-header svg,.chaty-whatsapp-header svg{width:24px;height:24px;color:#000;margin:0!important;padding:0;text-align:center;line-height:24px;font-weight:700;cursor:pointer}.close-chaty-box{float:right}.chaty-contact-header svg{fill:#000!important}.chaty-whatsapp-body{background:#e6ddd4;padding:20px 20px 20px 10px;position:relative;z-index:2;height:260px}.chaty-whatsapp-body:before{display:block;position:absolute;content:"";left:0;top:0;height:100%;width:100%;z-index:0;opacity:.08;background-image:url(../images/whatsapp.png)}.chaty-whatsapp-message{padding:7px 14px 6px;background-color:#fff;border-radius:0 8px 8px;position:relative;transform-origin:center top;z-index:2;box-shadow:rgba(0,0,0,.13) 0 1px .5px;margin-top:4px;margin-left:15px;max-width:calc(100% - 40px);font-size:14px;font-family:Segoe UI,Helvetica Neue,Helvetica,Lucida Grande,Arial,Ubuntu,Cantarell,Fira Sans,sans-serif}.chaty-whatsapp-message:before{position:absolute;background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAmCAMAAADp2asXAAAABGdBTUEAALGPC/xhBQAAAAFzUkdCAK7OHOkAAACQUExURUxpccPDw9ra2m9vbwAAAAAAADExMf///wAAABoaGk9PT7q6uqurqwsLCycnJz4+PtDQ0JycnIyMjPf3915eXvz8/E9PT/39/RMTE4CAgAAAAJqamv////////r6+u/v7yUlJeXl5f///5ycnOXl5XNzc/Hx8f///xUVFf///+zs7P///+bm5gAAAM7Ozv///2fVensAAAAvdFJOUwCow1cBCCnqAhNAnY0WIDW2f2/hSeo99g1lBYT87vDXG8/6d8oL4sgM5szrkgl660OiZwAAAHRJREFUKM/ty7cSggAABNFVUQFzwizmjPz/39k4YuFWtm55bw7eHR6ny63+alnswT3/rIDzUSC7CrAziPYCJCsB+gbVkgDtVIDh+DsE9OTBpCtAbSBAZSEQNgWIygJ0RgJMDWYNAdYbAeKtAHODlkHIv997AkLqIVOXVU84AAAAAElFTkSuQmCC);background-position:50% 50%;background-repeat:no-repeat;background-size:contain;content:"";top:0;left:-12px;width:12px;height:19px}.chaty-whatsapp-footer{position:relative;padding:12px 15px;background:#f0f0f0}.chaty-whatsapp-footer input.chaty-whatsapp-msg{height:48px!important;line-height:32px;padding:0 10px 0 15px;font-size:14px;resize:none;width:100%;border:none;border-radius:24px;outline:0;font-family:Segoe UI,Helvetica Neue,Helvetica,Lucida Grande,Arial,Ubuntu,Cantarell,Fira Sans,sans-serif}.chaty-whatsapp-footer input.chaty-whatsapp-msg:focus{outline:0;box-shadow:none}.chaty-whatsapp-footer .chaty-whatsapp-field{width:calc(100% - 60px);float:left}.chaty-whatsapp-footer button.chaty-whatsapp-submit-btn{line-height:48px;text-align:center;float:right;height:48px;width:48px;padding:8px 10px 8px 15px;background:#25d366;border-radius:24px;outline:0;box-shadow:none;border:none}.chaty-whatsapp-footer button.chaty-whatsapp-submit-btn:focus,.chaty-whatsapp-footer button.chaty-whatsapp-submit-btn:hover{background:#22bf5b}.chaty-whatsapp-footer button.chaty-whatsapp-submit-btn svg{width:100%;height:100%;display:block}.chaty-contact-body{padding:10px 10px 0}.chaty-inline-popup{vertical-align:bottom;background:#fff;-webkit-box-shadow:0 0 5px 0 #ccc;-moz-box-shadow:0 0 5px 0 #ccc;box-shadow:0 0 5px 0 #ccc;-webkit-border-radius:6px;-moz-border-radius:6px;border-radius:6px;max-width:250px;height:auto;overflow:hidden;position:fixed;bottom:30px;left:100px;padding:0;z-index:100001;max-width:inherit;width:280px;transition:all .5s linear;-webkit-transition:all .5s linear;-moz-transition:all .5s linear}.chaty-inline-popup{box-shadow:rgba(0,0,0,.16) 0 5px 40px;-webkit-box-shadow:rgba(0,0,0,.16) 0 5px 40px;-moz-box-shadow:rgba(0,0,0,.16) 0 5px 40px}.chaty-inline-popup:not(.active){bottom:-100%!important}.chaty-input-area{width:100%;margin-bottom:10px;line-height:36px}.chaty-input-area input[type=email],.chaty-input-area input[type=text],.chaty-input-area textarea{width:100%;height:30px;line-height:36px;font-size:14px;padding:0 0 0 10px;border:solid 1px #ccc;border-radius:4px}.chaty-whatsapp-popup,.chaty-whatsapp-popup input{position:relative}.chaty-input-area input[type=email].has-chaty-error,.chaty-input-area input[type=text].has-chaty-error,.chaty-input-area textarea.has-chaty-error{border:solid 1px #d20000}.chaty-input-area textarea{height:100px;line-height:1.25;padding:5px 10px}.chaty-contact-body form .chaty-input-area:last-child{padding:0;margin:0}.chaty-contact-footer{padding:0 10px 10px}.chaty-contact-footer button.chaty-contact-submit-btn{width:100%;padding:5px;font-weight:400;border-radius:5px;border:none;cursor:pointer;outline:0;text-decoration:none}.close-chaty-popup{position:absolute;right:5px;top:5px;background:#30534b;width:22px;height:22px;border-radius:15px;padding:3px;cursor:pointer;transition:all .4s;-webkit-transition:all .4s;-moz-transition:all .4s}.close-chaty-popup:hover{transform:rotate(180deg);-webkit-transform:rotate(180deg);-moz-transform:rotate(180deg)}.chaty-close-button{position:relative;width:16px;height:16px;transition:all .4s;cursor:pointer}.chaty-close-button:after,.chaty-close-button:before{content:"";position:absolute;width:12px;height:2px;background-color:#fff;display:block;border-radius:2px;transform:rotate(45deg);top:7px;left:2px}.close-chaty-box .chaty-close-button:after,.close-chaty-box .chaty-close-button:before{background-color:#333}.chaty-close-button:after{transform:rotate(-45deg)}.close-chaty-box .chaty-close-button:hover{transform:rotate(180deg)}.chaty-ajax-success-message{color:#00a700;padding:5px 0;text-align:center;font-size:16px}.chaty-ajax-error-message{color:#da0000;padding:5px 0;text-align:center;font-size:16px}span.chaty-error-msg{color:#da0000;font-size:14px;line-height:1;display:block}.chaty-widget.chaty-popup-open .chaty-widget-i:not(.no-tooltip):before{opacity:0!important;display:none!important}.chaty-widget.chaty-popup-open .chaty-widget-i .chaty-widget-i-title{opacity:0!important;display:none!important}.chaty-widget.hide-block{transition:all .25s linear}.chaty-widget.hide-block.active{transform:scale(0);-webkit-transform:scale(0);-moz-transform:scale(0)}body.right-cht-position .chaty-inline-popup{left:auto;right:25px;bottom:25px;position:fixed}body.left-cht-position .chaty-inline-popup{left:25px;right:auto;bottom:25px;position:fixed}.chaty-widget.hide-block{transition:all .25s linear}.chaty-widget.hide-block.active{transform:scale(0);-webkit-transform:scale(0);-moz-transform:scale(0)}.chaty-animation-shockwave:after{content:"";position:absolute;top:0;left:0;bottom:0;right:0;border-radius:50%;-webkit-animation:chaty-animation-shockwave 2s 1.3s ease-out infinite;animation:chaty-animation-shockwave 2s 1.3s ease-out infinite}.chaty-animation-shockwave:before{content:"";position:absolute;top:0;left:0;bottom:0;right:0;border-radius:50%;-webkit-animation:chaty-animation-shockwave 2s .8s ease-out infinite;animation:chaty-animation-shockwave 2s .8s ease-out infinite}.one_widget.chaty-widget .chaty-widget-i.no-tooltip .chaty-widget-i-title{display:none}.chaty-widget.one_widget .chaty-widget-i.no-tooltip:before{display:none}.i-trigger.one-widget a{position:relative;display:block}.i-trigger.one-widget a:after{content:"";position:absolute;height:100%;width:100%;top:0;left:0;background:#000;z-index:111;display:block;border-radius:50%;opacity:0;transition:all .1s linear;-webkit-transition:all .1s linear}.i-trigger.one-widget a:hover:after{opacity:.12}@-webkit-keyframes chaty-animation-shockwave{0%{transform:scale(1);box-shadow:0 0 2px rgba(0,0,0,.3),inset 0 0 1px rgba(0,0,0,.3)}95%{box-shadow:0 0 50px transparent,inset 0 0 30px transparent}100%{transform:scale(2.25)}}@keyframes chaty-animation-shockwave{0%{transform:scale(1);box-shadow:0 0 2px rgba(0,0,0,.3),inset 0 0 1px rgba(0,0,0,.3)}95%{box-shadow:0 0 50px transparent,inset 0 0 30px transparent}100%{transform:scale(2.25)}}.chaty-animation-blink{-webkit-animation:chaty-animation-blink 1.33s ease-out infinite;animation:chaty-animation-blink 1.33s ease-out infinite}@-webkit-keyframes chaty-animation-blink{0%{opacity:1}20%{opacity:.5}100%{opacity:1}}@keyframes chaty-animation-blink{0%{opacity:1}20%{opacity:.5}100%{opacity:1}}.chaty-animation-pulse-icon{-webkit-animation:chaty-animation-pulse-icon .4s ease infinite alternate;animation:chaty-animation-pulse-icon .4s ease infinite alternate}@-webkit-keyframes chaty-animation-pulse-icon{0%{transform:scale(1);box-shadow:0 2px 2px rgba(0,0,0,.2);border-radius:50%}100%{transform:scale(1.1);box-shadow:0 2px 2px rgba(0,0,0,.2);border-radius:45%}}@keyframes chaty-animation-pulse-icon{0%{transform:scale(1);border-radius:50%}100%{transform:scale(1.1);border-radius:45%}}@keyframes chaty-animation-pulse{0%{background-color:orange}25%{background-color:red}50%{background-color:orange}75%{background-color:red}}body.chaty-in-mobile .chaty-widget-i.chaty-close-settings.i-trigger-close:before{display:none}.i-trigger.one-widget.no-tooltip:not(.show-channel) .chaty-widget-i-title{display:none}.i-trigger.one-widget.no-tooltip:not(.show-channel) .chaty-widget-i:before{display:none}body .chaty-widget.one_widget .i-trigger.one-widget.show-channel .chaty-widget-i-title,body .chaty-widget.one_widget .i-trigger.one-widget.show-channel .chaty-widget-i:before{opacity:1!important}body .chaty-widget.one_widget .i-trigger.one-widget.show-channel:hover .chaty-widget-i-title,body .chaty-widget.one_widget .i-trigger.one-widget.show-channel:hover .chaty-widget-i:before{opacity:1!important}
|
1 |
+
.chaty-widget.hide-cht-widget .chaty-widget.one_widget .chaty-widget-i:not(.no-tooltip):before{display:none}.facebook .chaty-widget-i-title{padding:0!important}.widget-img img{max-height:100%;max-width:100%;height:auto;margin:0 auto}.widget-img{text-align:center;background:0 0!important}.widget-img img{object-fit:cover;border-radius:50%}.chaty-widget .chaty-widget-i.facebook.active.before .chaty-widget-i-title.fb-title{display:none!important}.wechat-box img{object-fit:cover;max-width:230px;height:auto;width:100%;display:block}.wechat-box-head svg{cursor:pointer;width:30px;height:30px}.wechat-box-head SVG{cursor:pointer;width:30PX;height:30px;fill:#fff;font-weight:700}.wechat-box-head{width:100%;display:inline-block;vertical-align:bottom;color:#fff;padding:0 0 0 10px;line-height:34px;background:#34a700;height:34px}.wechat-box{display:inline-block;vertical-align:bottom;position:relative;padding:10px;width:100%}.wechat-qr-code{display:inline-block;vertical-align:bottom;background:#fff;-webkit-border-radius:6px;-moz-border-radius:6px;border-radius:6px;position:fixed;bottom:30px;left:100px;padding:0;z-index:100001;width:280px;transition:all .5s linear;-webkit-transition:all .5s linear;-moz-transition:all .5s linear;box-shadow:rgba(0,0,0,.16) 0 5px 40px;-webkit-box-shadow:rgba(0,0,0,.16) 0 5px 40px;-moz-box-shadow:rgba(0,0,0,.16) 0 5px 40px}.chaty-social-img{display:block;-webkit-border-radius:50%;-moz-border-radius:50%;border-radius:50%}.chaty-social-img img{object-fit:cover;-webkit-border-radius:50%;-moz-border-radius:50%;border-radius:50%;box-shadow:0 3px 6px rgba(0,0,0,.25);line-height:0;margin:0;padding:0}.widget-img{display:flex;align-items:center;height:100%;overflow:inherit;border-radius:100%}.set-url-target{line-height:0}.get{opacity:1}.chaty-widget-show .get{opacity:1}.none-widget-show .get{opacity:0}.get a{color:#222!important;text-decoration:none!important}body .one_widget .bofore_del:before{opacity:0!important;display:none}.one_widget.chaty-widget:not(.chaty-widget-is-right) .chaty-widget-i:not(.no-tooltip) .chaty-widget-i-title{font-size:17px;left:-3px;top:50%;white-space:nowrap;padding:5px 15px;line-height:21px;color:#333;background-color:#fff;box-shadow:0 1.93465px 7.73859px rgba(0,0,0,.15);border-radius:10px}.chaty-widget.one_widget .chaty-widget-i:not(.no-tooltip) .chaty-widget-i-title,.chaty-widget.one_widget .chaty-widget-i:not(.no-tooltip):before{opacity:1!important}.snap-wee-title{z-index:20;opacity:0;padding:10px 10px 9px 12px!important;font-size:17px;transform:translate(calc(-100% - 14px),-50%);left:-3px;top:50%;white-space:nowrap;line-height:21px;color:#333;background-color:#fff;box-shadow:0 1.93465px 7.73859px rgba(0,0,0,.15);border-radius:10px;position:absolute}@media (min-width:1024px){.chaty-widget-i:hover .snap-wee-title{opacity:1}}.chaty-widget-i.hover .snap-wee-title{opacity:1}.chaty-whatsapp-message p{margin:0;padding:0;color:#303030}.snap-wee-title:before{content:"";right:-9px;position:absolute;top:50%;transform:translateY(-50%);height:0;width:0;z-index:11;border-width:5px 0 5px 10px;border-style:solid;border-color:transparent transparent transparent #fff}.snap-wee-title p{color:#222;text-decoration:none;margin:0;padding:0}.chaty-widget-i .chaty-widget-i-title p{color:#222!important;text-decoration:none!important;margin:0!important;padding:0!important}.chaty-widget-i .i-trigger a{color:#222!important;text-decoration:none!important}*{-webkit-tap-highlight-color:transparent!important}.i-trigger-close svg,.i-trigger-open svg{transition:all .5s}.chaty-widget-show .i-trigger-close svg,.chaty-widget-show .i-trigger-open svg{transform:rotate(180deg)}.none-widget-show .i-trigger-ope{-webkit-animation:fadein 1.5s;-moz-animation:fadein 1.5s;-ms-animation:fadein 1.5s;-o-animation:fadein 1.5s}.chaty-widget-show .i-trigger-cloe{-webkit-animation:fadein 1.5s;-moz-animation:fadein 1.5s;-ms-animation:fadein 1.5s;-o-animation:fadein 1.5s}.chaty-widget .i-trigger-open.chaty-widget-i:not(.no-tooltip) .chaty-widget-i-title{transform:translate(calc(-100% - 12px),-50%)}.chaty-widget-is-right.chaty-widget .i-trigger-open.chaty-widget-i:not(.no-tooltip) .chaty-widget-i-title{right:0;left:auto;transform:translate(calc(100% + 12px),-50%)}.chaty-widget-is-right.chaty-widget .chaty-widget-i:not(.no-tooltip) .chaty-widget-i-title{right:0;left:auto;transform:translate(calc(100% + 13px),-50%)}.chaty-widget-is-right.chaty-widget.one_widget .chaty-widget-i:not(.no-tooltip):before{left:auto;right:-18px}.chaty-widget.one_widget .chaty-widget-i:not(.no-tooltip):before{left:-18px}.one_widget .i-trigger-open .chaty-widget-i-title{padding:10px 10px 9px 12px!important}.one_widget .i-trigger-open.hidetooltip .chaty-widget-i-title{display:none}.one_widget .i-trigger-open.hidetooltip .chaty-widget-i:before{display:none}.chaty-widget .chaty-widget-i.before.facebook:not(.no-tooltip):hover:before,.chaty-widget .chaty-widget-i.facebook.before:not(.no-tooltip):hover .chaty-widget-i-title{opacity:1;pointer-events:auto}.chaty-widget .chaty-widget-i:not(.no-tooltip) .chaty-widget-i-title,.chaty-widget .chaty-widget-i:not(.no-tooltip).before:before{opacity:1}.one_widget .chaty-widget-i svg{position:relative}body .chaty-widget-i-title.true{opacity:1!important}.chaty-widget .i-trigger-open:not(.no-tooltip):before{opacity:1!important}.chaty-widget .chaty-widget-i.facebook.active:not(.no-tooltip) .chaty-widget-i-title,.chaty-widget .chaty-widget-i.facebook:not(.no-tooltip):hover:before{pointer-events:initial}.chaty-widget .facebook_header{background-color:#1e88e5;height:34px;border-top-left-radius:5px;border-top-right-radius:5px;padding-left:9px;display:flex;align-items:center;justify-content:space-between}body .chaty-widget-i .facebook_header p{font-family:Lato,Helvetica,Arial,sans-serif;font-size:13px;color:#fff!important;position:relative}.facebook_header p,.facebook_header svg{display:inline-block;vertical-align:bottom;margin:0}.chaty-widget .chaty-widget-i .facebook_header svg{height:30px!important;width:30px!important}.chaty-widget{display:none!important}@media screen and (max-width:800px){.i-trigger-close .chaty-widget-i-title{display:none}.i-trigger-close:before{display:none}}@media screen and (max-width:480px){.mobile_none{display:none}.chaty-widget.mobile_active{display:block!important}}@media screen and (min-width:480px){.chaty-widget.desktop_active{display:block!important}}.chaty-widget{position:fixed;z-index:9999}.chaty-widget .chaty-widget-is{display:flex;z-index:1111;flex-wrap:wrap;overflow:hidden;height:0;position:absolute;pointer-events:none;left:0;right:auto;bottom:65px;opacity:0}#transition_disabled{-webkit-animation:none!important;-moz-animation:none!important;-ms-animation:none!important;-o-animation:none!important;-webkit-animation:none!important}@keyframes fadeout{from{opacity:1}to{opacity:0}}@-moz-keyframes fadeout{from{opacity:1}to{opacity:0}}@-webkit-keyframes fadeout{from{opacity:1}to{opacity:0}}@-o-keyframes fadeout{from{opacity:1}to{opacity:0}}.chaty-widget .i-trigger{cursor:pointer;position:relative}.chaty-widget .i-trigger .i-trigger-close,.chaty-widget .i-trigger .i-trigger-open{transition:all .2s}.chaty-widget .i-trigger .i-trigger-close{position:absolute;bottom:-4px;left:0;right:0;z-index:2}.chaty-widget .i-trigger .i-trigger-open{opacity:1;pointer-events:auto}.chaty-widget .i-trigger .i-trigger-close{opacity:0;pointer-events:none}.chaty-widget.chaty-widget-show .i-trigger .i-trigger-open{opacity:0;pointer-events:none}.chaty-widget.chaty-widget-show .i-trigger .i-trigger-close{box-shadow:none;opacity:1;pointer-events:auto}.chaty-widget.chaty-widget-show .chaty-widget-is{pointer-events:auto;overflow:visible;opacity:1;visibility:visible}@keyframes fadein{from{opacity:0}to{opacity:1}}@-moz-keyframes fadein{from{opacity:0}to{opacity:1}}@-webkit-keyframes fadein{from{opacity:0}to{opacity:1}}@-ms-keyframes fadein{from{opacity:0}to{opacity:1}}@-o-keyframes fadein{from{opacity:0}to{opacity:1}}.chaty-widget.chaty-widget-show .chaty-widget-is .chaty-widget-i{opacity:1;overflow:visible}.chaty-widget .chaty-widget-i .chaty-widget-i{margin:0}.chaty-widget .chaty-widget-i{border-radius:50%;vertical-align:top;width:54px;height:54px;position:relative;margin:4px}.chaty-widget .chaty-widget-i .wrap-svg,.chaty-widget .chaty-widget-i svg{cursor:pointer;width:100%;height:100%;display:block;position:relative;box-shadow:0 3px 6px rgba(0,0,0,.25);border-radius:50%;-wekit-border-radius:50%;-moz-border-radius:50%}.chaty-widget .chaty-animation-sheen .wrap-svg,.chaty-widget .chaty-animation-sheen svg{box-shadow:none}.chaty-widget .chaty-animation-sheen{box-shadow:0 3px 6px rgba(0,0,0,.25);border-radius:50%;-wekit-border-radius:50%;-moz-border-radius:50%}body .i-trigger-open .chaty-widget-i-title{padding:5px 16px 5px 17px!important}.chaty-widget:not(.chaty-widget-is-right) .i-trigger-open:before{left:-18px!important}.one_widget.chaty-widget.chaty-widget-is-right .i-trigger-open:before{right:-18px!important}body .one_widget .i-trigger-open .chaty-widget-i-title.face_title{padding:0!important}.one_widget.chaty-widget .chaty-widget-i:not(.no-tooltip) .chaty-widget-i-title{transform:translate(calc(-100% - 14px),-50%)}.chaty-widget .chaty-widget-i:not(.no-tooltip) .chaty-widget-i-title,.chaty-widget .chaty-widget-i:not(.no-tooltip):before{content:none;position:absolute;opacity:0;pointer-events:none;z-index:10}.chaty-widget .chaty-widget-i:not(.no-tooltip):before{content:"";left:-14px;top:50%;transform:translateY(-50%);height:0;width:0;z-index:11;border-width:5px 0 5px 10px;border-style:solid;border-color:transparent transparent transparent #fff}.chaty-widget .chaty-widget-i:not(.no-tooltip) .chaty-widget-i-title{text-align:center;font-size:17px;left:0;top:50%;transform:translate(calc(-100% - 13px),-50%);white-space:nowrap;padding:5px 15px;line-height:21px;color:#333;background-color:#fff;box-shadow:0 1.93465px 7.73859px rgba(0,0,0,.15);border-radius:10px}.chaty-widget .chaty-widget-i:not(.no-tooltip):hover .chaty-widget-i-title,.chaty-widget .chaty-widget-i:not(.no-tooltip):hover:before{opacity:1;pointer-events:auto}.chaty-widget .chaty-widget-i.facebook:not(.no-tooltip):hover .chaty-widget-i-title,.chaty-widget .chaty-widget-i.facebook:not(.no-tooltip):hover:before{opacity:0;pointer-events:auto}.chaty-widget .chaty-widget-i .color-element{transition:all .2s}.chaty-widget:not(.chaty-widget-is-right) .chaty-widget-is{position:absolute;right:0;left:auto;bottom:65px;justify-content:flex-end}.chaty-widget.chaty-widget-is-right .i-trigger-open.chaty-widget-i:before{right:-13px;left:auto;border-width:5px 10px 5px 0;border-color:transparent #fff transparent transparent}.chaty-widget.chaty-widget-is-right .chaty-widget-i:before{right:-14px;left:auto;border-width:5px 10px 5px 0;border-color:transparent #fff transparent transparent}.chaty-widget.chaty-widget-is-right .chaty-widget-i.facebook.active .chaty-widget-i-title.face_title{position:fixed;transform:initial!important;right:auto;top:calc(100% - 484px)}.chaty-widget .chaty-widget-i.facebook.active .chaty-widget-i-title{min-width:250px;padding:0;position:fixed;transform:initial;right:29px;left:auto;top:calc(100% - 484px)}.one_widget.chaty-widget.chaty-widget-is-right .chaty-widget-i .chaty-widget-i-title{right:0;left:auto;transform:translate(calc(100% + 17px),-50%)!important}.chaty-animation-pulse{animation:chaty-animation-pulse 5s infinite}.chaty-animation-jump{animation:chaty-animation-jump 5s infinite cubic-bezier(.84,-.54,.31,1.19)}.chaty-animation-waggle{animation:chaty-animation-waggle 5s infinite}.chaty-animation-sheen{position:relative;overflow:hidden}.chaty-animation-sheen:after{animation:chaty-animation-sheen 5s infinite;content:'';position:absolute;top:0;right:0;bottom:0;left:0;background:linear-gradient(to bottom,transparent,rgba(255,255,255,.5) 50%,transparent);transform:rotateZ(60deg) translate(0,5em)}.chaty-animation-spin{animation:chaty-animation-spin 5s infinite cubic-bezier(.56,-.35,.22,1.5)}.chaty-animation-fade{animation:chaty-animation-fade 5s infinite}@keyframes chaty-animation-pulse{0%{background-color:orange}5%{background-color:red}10%{background-color:orange}15%{background-color:red}100%,20%{background-color:transparent}}@keyframes chaty-animation-jump{0%{transform:none}10%{transform:translateY(-1em)}100%,20%{transform:none}}@keyframes chaty-animation-waggle{0%{transform:none}10%{transform:rotateZ(-20deg) scale(1.2)}13%{transform:rotateZ(25deg) scale(1.2)}15%{transform:rotateZ(-15deg) scale(1.2)}17%{transform:rotateZ(15deg) scale(1.2)}20%{transform:rotateZ(-12deg) scale(1.2)}22%{transform:rotateZ(0) scale(1.2)}100%,24%{transform:rotateZ(0) scale(1)}}@keyframes chaty-animation-sheen{100%,20%{transform:rotateZ(60deg) translate(0,-80px)}}@keyframes chaty-animation-spin{10%{transform:rotateZ(-20deg);animation-timing-function:ease}100%,20%{transform:rotateZ(360deg)}}@keyframes chaty-animation-fade{5%{opacity:.25}10%{opacity:1}15%{opacity:.25}100%,20%{opacity:1}}.start-now,.start-now:after{animation-delay:0}.chaty-widget .i-trigger{z-index:1000}.chaty-widget:not(.chaty-widget-is-right) .chaty-widget-is{z-index:1000}.chaty-nav:before{display:block;position:fixed;top:0;left:0;content:'';width:100vw;height:100vh;background:rgba(0,0,0,.8);visibility:hidden;z-index:100;transition:all .5s ease-in-out;-webkit-transition:all .5s ease-in-out;-moz-transition:all .5s ease-in-out}.chaty-animation-widget.left-position .chaty-nav:before{clip-path:circle(15px at 60px calc(100% - 60px))}.chaty-animation-widget.right-position .chaty-nav:before{clip-path:circle(15px at calc(100% - 60px) calc(100% - 60px))}.chaty-animation-widget.active .chaty-nav:before{visibility:visible;clip-path:circle(100%)}.chaty-widget-is.has-no-close-btn{position:absolute!important;bottom:0!important;top:auto!important}.chaty-widget.hide-tooltip-arrow .chaty-widget-i:before{display:none!important}body .no-tooltip .chaty-widget-i-title.true{display:none}.chaty-widget-i.hide-chaty-arrow:before{display:none}.chaty-widget-show .i-trigger-open.single-button svg{transform:rotate(0)!important;-webkit-transform:rotate(0)!important}.facustom-icon{display:block;border-radius:50%;-moz-border-radius:50%;-webkit-border-radius:50%;text-align:center;color:#fff}body.horizontal-cht-menu .chaty-widget-is{display:inline-block;top:0;right:100%!important;left:auto!important}body.horizontal-cht-menu.chaty-in-desktop .chaty-main-widget.is-in-desktop{display:inline-block}body.horizontal-cht-menu.chaty-in-mobile .chaty-main-widget.is-in-mobile{display:inline-block}body.horizontal-cht-menu.chaty-widget-is-right .chaty-widget-is{left:100%!important;right:auto!important}body.horizontal-cht-menu .chaty-widget.chaty-widget-is-right .chaty-widget-is{right:auto!important;left:100%!important}body.horizontal-cht-menu .chaty-widget.one_widget .chaty-widget-is{right:0!important;left:0!important}body.chaty-in-desktop.horizontal-cht-menu .chaty-main-widget.is-in-desktop,body.chaty-in-mobile.horizontal-cht-menu .chaty-main-widget.is-in-mobile{display:inline-block!important}.wechat-qr-code.right{right:25px;left:auto}.wechat-qr-code.left{right:auto;left:25px}body.horizontal-cht-menu .chaty-widget-is .chaty-widget-i:not(.no-tooltip) .chaty-widget-i-title{right:auto;left:auto;transform:translate(calc(-50% + 26px),-140%);top:0}body.horizontal-cht-menu .chaty-widget-is .chaty-widget-i:not(.no-tooltip):before{top:-30%;left:0;right:0;margin:0 auto;transform:rotate(-90deg)}body.horizontal-cht-menu.right-cht-position .chaty-widget-is .chaty-widget-i:not(.no-tooltip):before{transform:rotate(90deg)}.i-trigger.one-widget.no-tooltip .chaty-widget-i-title{display:none}.i-trigger.one-widget.no-tooltip .chaty-widget-i:before{display:none}body .chaty-widget.one_widget .i-trigger.one-widget.show-channel .chaty-widget-i-title,body .chaty-widget.one_widget .i-trigger.one-widget.show-channel .chaty-widget-i:before{opacity:0!important}body .chaty-widget.one_widget .i-trigger.one-widget.show-channel:hover .chaty-widget-i-title,body .chaty-widget.one_widget .i-trigger.one-widget.show-channel:hover .chaty-widget-i:before{opacity:1!important}.chaty-widget.has-not-close-button .chaty-widget-is{top:auto!important;bottom:0!important}body.horizontal-cht-menu .chaty-widget-show .chaty-widget-i.chaty-close-settings .chaty-widget-i-title{right:auto;left:auto;transform:translate(calc(-50% + 26px),-140%);top:0}body.horizontal-cht-menu .chaty-widget-i.chaty-close-settings.i-trigger-close:before{top:-30%;left:0;right:0;margin:0 auto;transform:rotate(-90deg)}body.horizontal-cht-menu.right-cht-position .chaty-widget-i.chaty-close-settings.i-trigger-close:before{transform:rotate(90deg)}span.cht-pending-message{position:absolute;top:-4px;right:-4px;font-size:11px;font-size:11.5px;border-radius:50%;background:#d00;color:#fff;min-width:20px;min-height:20px;text-align:center;line-height:20px}.chaty-widget .sr-only{border:0!important;clip:rect(0,0,0,0);height:1px!important;margin:-1px!important;overflow:hidden;padding:0!important;position:absolute;width:1px!important}.chaty-whatsapp-header{padding:5px 0 1px 10px;text-align:left;background:#4fce5d}.chaty-contact-header{padding:5px 5px 5px 10px;text-align:left;background:#fff;font-size:18px;border-bottom:solid 1px #acacac}.chaty-contact-header svg,.chaty-whatsapp-header svg{width:24px;height:24px;color:#000;margin:0!important;padding:0;text-align:center;line-height:24px;font-weight:700;cursor:pointer}.close-chaty-box{float:right}.chaty-contact-header svg{fill:#000!important}.chaty-whatsapp-body{background:#e6ddd4;padding:20px 20px 20px 10px;position:relative;z-index:2;height:260px}.chaty-whatsapp-body:before{display:block;position:absolute;content:"";left:0;top:0;height:100%;width:100%;z-index:0;opacity:.08;background-image:url(../images/whatsapp.png)}.chaty-whatsapp-message{padding:7px 14px 6px;background-color:#fff;border-radius:0 8px 8px;position:relative;transform-origin:center top;z-index:2;box-shadow:rgba(0,0,0,.13) 0 1px .5px;margin-top:4px;margin-left:15px;max-width:calc(100% - 40px);font-size:14px;font-family:Segoe UI,Helvetica Neue,Helvetica,Lucida Grande,Arial,Ubuntu,Cantarell,Fira Sans,sans-serif}.chaty-whatsapp-message:before{position:absolute;background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAmCAMAAADp2asXAAAABGdBTUEAALGPC/xhBQAAAAFzUkdCAK7OHOkAAACQUExURUxpccPDw9ra2m9vbwAAAAAAADExMf///wAAABoaGk9PT7q6uqurqwsLCycnJz4+PtDQ0JycnIyMjPf3915eXvz8/E9PT/39/RMTE4CAgAAAAJqamv////////r6+u/v7yUlJeXl5f///5ycnOXl5XNzc/Hx8f///xUVFf///+zs7P///+bm5gAAAM7Ozv///2fVensAAAAvdFJOUwCow1cBCCnqAhNAnY0WIDW2f2/hSeo99g1lBYT87vDXG8/6d8oL4sgM5szrkgl660OiZwAAAHRJREFUKM/ty7cSggAABNFVUQFzwizmjPz/39k4YuFWtm55bw7eHR6ny63+alnswT3/rIDzUSC7CrAziPYCJCsB+gbVkgDtVIDh+DsE9OTBpCtAbSBAZSEQNgWIygJ0RgJMDWYNAdYbAeKtAHODlkHIv997AkLqIVOXVU84AAAAAElFTkSuQmCC);background-position:50% 50%;background-repeat:no-repeat;background-size:contain;content:"";top:0;left:-12px;width:12px;height:19px}.chaty-whatsapp-footer{position:relative;padding:12px 15px;background:#f0f0f0}.chaty-whatsapp-footer input.chaty-whatsapp-msg{height:48px!important;line-height:32px;padding:0 10px 0 15px;font-size:14px;resize:none;width:100%;border:none;border-radius:24px;outline:0;font-family:Segoe UI,Helvetica Neue,Helvetica,Lucida Grande,Arial,Ubuntu,Cantarell,Fira Sans,sans-serif}.chaty-whatsapp-footer input.chaty-whatsapp-msg:focus{outline:0;box-shadow:none}.chaty-whatsapp-footer .chaty-whatsapp-field{width:calc(100% - 60px);float:left}.chaty-whatsapp-footer button.chaty-whatsapp-submit-btn{line-height:48px;text-align:center;float:right;height:48px;width:48px;padding:8px 10px 8px 15px;background:#25d366;border-radius:24px;outline:0;box-shadow:none;border:none}.chaty-whatsapp-footer button.chaty-whatsapp-submit-btn:focus,.chaty-whatsapp-footer button.chaty-whatsapp-submit-btn:hover{background:#22bf5b}.chaty-whatsapp-footer button.chaty-whatsapp-submit-btn svg{width:100%;height:100%;display:block}.chaty-contact-body{padding:10px 10px 0}.chaty-inline-popup{vertical-align:bottom;background:#fff;-webkit-box-shadow:0 0 5px 0 #ccc;-moz-box-shadow:0 0 5px 0 #ccc;box-shadow:0 0 5px 0 #ccc;-webkit-border-radius:6px;-moz-border-radius:6px;border-radius:6px;max-width:250px;height:auto;overflow:hidden;position:fixed;bottom:30px;left:100px;padding:0;z-index:100001;max-width:inherit;width:280px;transition:all .5s linear;-webkit-transition:all .5s linear;-moz-transition:all .5s linear}.chaty-inline-popup{box-shadow:rgba(0,0,0,.16) 0 5px 40px;-webkit-box-shadow:rgba(0,0,0,.16) 0 5px 40px;-moz-box-shadow:rgba(0,0,0,.16) 0 5px 40px}.chaty-inline-popup:not(.active){bottom:-100%!important}.chaty-input-area{width:100%;margin-bottom:10px;line-height:36px}.chaty-input-area input[type=email],.chaty-input-area input[type=text],.chaty-input-area textarea{width:100%;height:30px;line-height:36px;font-size:14px;padding:0 0 0 10px;border:solid 1px #ccc;border-radius:4px}.chaty-whatsapp-popup,.chaty-whatsapp-popup input{position:relative}.chaty-input-area input[type=email].has-chaty-error,.chaty-input-area input[type=text].has-chaty-error,.chaty-input-area textarea.has-chaty-error{border:solid 1px #d20000}.chaty-input-area textarea{height:100px;line-height:1.25;padding:5px 10px}.chaty-contact-body form .chaty-input-area:last-child{padding:0;margin:0}.chaty-contact-footer{padding:0 10px 10px}.chaty-contact-footer button.chaty-contact-submit-btn{width:100%;padding:5px;font-weight:400;border-radius:5px;border:none;cursor:pointer;outline:0;text-decoration:none}.close-chaty-popup{position:absolute;right:5px;top:5px;background:#30534b;width:22px;height:22px;border-radius:15px;padding:3px;cursor:pointer;transition:all .4s;-webkit-transition:all .4s;-moz-transition:all .4s}.close-chaty-popup:hover{transform:rotate(180deg);-webkit-transform:rotate(180deg);-moz-transform:rotate(180deg)}.chaty-close-button{position:relative;width:16px;height:16px;transition:all .4s;cursor:pointer}.chaty-close-button:after,.chaty-close-button:before{content:"";position:absolute;width:12px;height:2px;background-color:#fff;display:block;border-radius:2px;transform:rotate(45deg);top:7px;left:2px}.close-chaty-box .chaty-close-button:after,.close-chaty-box .chaty-close-button:before{background-color:#333}.chaty-close-button:after{transform:rotate(-45deg)}.close-chaty-box .chaty-close-button:hover{transform:rotate(180deg)}.chaty-ajax-success-message{color:#00a700;padding:5px 0;text-align:center;font-size:16px}.chaty-ajax-error-message{color:#da0000;padding:5px 0;text-align:center;font-size:16px}span.chaty-error-msg{color:#da0000;font-size:14px;line-height:1;display:block}.chaty-widget.chaty-popup-open .chaty-widget-i:not(.no-tooltip):before{opacity:0!important;display:none!important}.chaty-widget.chaty-popup-open .chaty-widget-i .chaty-widget-i-title{opacity:0!important;display:none!important}.chaty-widget.hide-block{transition:all .25s linear}.chaty-widget.hide-block.active{transform:scale(0);-webkit-transform:scale(0);-moz-transform:scale(0)}body.right-cht-position .chaty-inline-popup{left:auto;right:25px;bottom:25px;position:fixed}body.left-cht-position .chaty-inline-popup{left:25px;right:auto;bottom:25px;position:fixed}.chaty-widget.hide-block{transition:all .25s linear}.chaty-widget.hide-block.active{transform:scale(0);-webkit-transform:scale(0);-moz-transform:scale(0)}.chaty-animation-shockwave:after{content:"";position:absolute;top:0;left:0;bottom:0;right:0;border-radius:50%;-webkit-animation:chaty-animation-shockwave 2s 1.3s ease-out infinite;animation:chaty-animation-shockwave 2s 1.3s ease-out infinite}.chaty-animation-shockwave:before{content:"";position:absolute;top:0;left:0;bottom:0;right:0;border-radius:50%;-webkit-animation:chaty-animation-shockwave 2s .8s ease-out infinite;animation:chaty-animation-shockwave 2s .8s ease-out infinite}.one_widget.chaty-widget .chaty-widget-i.no-tooltip .chaty-widget-i-title{display:none}.chaty-widget.one_widget .chaty-widget-i.no-tooltip:before{display:none}.i-trigger.one-widget a{position:relative;display:block}.i-trigger.one-widget a .svg:after{content:"";position:absolute;height:100%;width:100%;top:0;left:0;background:#000;z-index:111;display:block;border-radius:50%;opacity:0;transition:all .1s linear;-webkit-transition:all .1s linear}.i-trigger.one-widget a:hover .svg:after{opacity:.12}@-webkit-keyframes chaty-animation-shockwave{0%{transform:scale(1);box-shadow:0 0 2px rgba(0,0,0,.3),inset 0 0 1px rgba(0,0,0,.3)}95%{box-shadow:0 0 50px transparent,inset 0 0 30px transparent}100%{transform:scale(2.25)}}@keyframes chaty-animation-shockwave{0%{transform:scale(1);box-shadow:0 0 2px rgba(0,0,0,.3),inset 0 0 1px rgba(0,0,0,.3)}95%{box-shadow:0 0 50px transparent,inset 0 0 30px transparent}100%{transform:scale(2.25)}}.chaty-animation-blink{-webkit-animation:chaty-animation-blink 1.33s ease-out infinite;animation:chaty-animation-blink 1.33s ease-out infinite}@-webkit-keyframes chaty-animation-blink{0%{opacity:1}20%{opacity:.5}100%{opacity:1}}@keyframes chaty-animation-blink{0%{opacity:1}20%{opacity:.5}100%{opacity:1}}.chaty-animation-pulse-icon{-webkit-animation:chaty-animation-pulse-icon .4s ease infinite alternate;animation:chaty-animation-pulse-icon .4s ease infinite alternate}@-webkit-keyframes chaty-animation-pulse-icon{0%{transform:scale(1);box-shadow:0 2px 2px rgba(0,0,0,.2);border-radius:50%}100%{transform:scale(1.1);box-shadow:0 2px 2px rgba(0,0,0,.2);border-radius:45%}}@keyframes chaty-animation-pulse-icon{0%{transform:scale(1);border-radius:50%}100%{transform:scale(1.1);border-radius:45%}}@keyframes chaty-animation-pulse{0%{background-color:orange}25%{background-color:red}50%{background-color:orange}75%{background-color:red}}body.chaty-in-mobile .chaty-widget-i.chaty-close-settings.i-trigger-close:before{display:none}.i-trigger.one-widget.no-tooltip:not(.show-channel) .chaty-widget-i-title{display:none}.i-trigger.one-widget.no-tooltip:not(.show-channel) .chaty-widget-i:before{display:none}body .chaty-widget.one_widget .i-trigger.one-widget.show-channel .chaty-widget-i-title,body .chaty-widget.one_widget .i-trigger.one-widget.show-channel .chaty-widget-i:before{opacity:0!important}body .chaty-widget.one_widget .i-trigger.one-widget.show-channel:hover .chaty-widget-i-title,body .chaty-widget.one_widget .i-trigger.one-widget.show-channel:hover .chaty-widget-i:before{opacity:1!important}
|
includes/class-frontend.php
CHANGED
@@ -476,7 +476,7 @@ class CHT_Frontend extends CHT_Admin_Base
|
|
476 |
/* WP change this */
|
477 |
wp_enqueue_style( 'chaty-front-css', CHT_PLUGIN_URL."css/chaty-front.min.css", array(), $chaty_updated_on);
|
478 |
wp_add_inline_style('chaty-front-css', $chaty_css);
|
479 |
-
wp_enqueue_script( "chaty-front-end", CHT_PLUGIN_URL."js/cht-front-script.js", array( 'jquery' ), $chaty_updated_on, false);
|
480 |
wp_localize_script('chaty-front-end', 'chaty_settings', $data);
|
481 |
}
|
482 |
endif;
|
476 |
/* WP change this */
|
477 |
wp_enqueue_style( 'chaty-front-css', CHT_PLUGIN_URL."css/chaty-front.min.css", array(), $chaty_updated_on);
|
478 |
wp_add_inline_style('chaty-front-css', $chaty_css);
|
479 |
+
wp_enqueue_script( "chaty-front-end", CHT_PLUGIN_URL."js/cht-front-script.min.js", array( 'jquery' ), $chaty_updated_on, false);
|
480 |
wp_localize_script('chaty-front-end', 'chaty_settings', $data);
|
481 |
}
|
482 |
endif;
|
js/cht-front-script.js
CHANGED
@@ -255,7 +255,7 @@
|
|
255 |
if (chaty_settings.object_settings.display_state == "hover") {
|
256 |
n.find(".i-trigger-open").mouseenter(function (e) {
|
257 |
e.stopPropagation();
|
258 |
-
removeAnimation();
|
259 |
//t(this).removeClass("active_clos");
|
260 |
o(), t(".chaty-widget-is").removeAttr("id"), t(this).hasClass("active_clos") || t(".chaty-widget-i.facebook").hasClass("active") || n.hasClass("one_widget") || (r(), t(n).hasClass("chaty-widget-show") || (n.addClass("chaty-widget-show"), n.removeClass("none-widget-show")));
|
261 |
if(jQuery(".chaty-widget").hasClass("one_widget")) {
|
@@ -341,14 +341,15 @@
|
|
341 |
jQuery(".i-trigger").html(htmlToAdd);
|
342 |
}
|
343 |
if(!get_cta_status()) {
|
344 |
-
if(chaty_settings.object_settings['click_setting']
|
345 |
jQuery(".i-trigger").attr("data-title", jQuery(".chaty-widget-is .chaty-widget-i-title p").html());
|
346 |
jQuery(".i-trigger .chaty-widget-i-title p").html(chaty_settings.object_settings.cta);
|
347 |
}
|
348 |
} else {
|
349 |
-
|
350 |
-
|
351 |
jQuery(".i-trigger").attr("data-title", jQuery(".chaty-widget-is .chaty-widget-i-title p").html());
|
|
|
352 |
jQuery(".i-trigger .chaty-widget-i-title p").html(chaty_settings.object_settings.cta);
|
353 |
}
|
354 |
}
|
@@ -366,7 +367,7 @@
|
|
366 |
if(!jQuery(".i-trigger").hasClass("one-widget")) {
|
367 |
set_cta_status();
|
368 |
}
|
369 |
-
removeAnimation();
|
370 |
});
|
371 |
jQuery(".chaty-widget").removeClass("chaty-widget-show");
|
372 |
jQuery(".i-trigger").addClass("one-widget");
|
@@ -657,7 +658,9 @@
|
|
657 |
}
|
658 |
|
659 |
if(!jQuery(".chaty-widget-i.true.chaty-widget-i-title").length) {
|
660 |
-
jQuery(".chaty-widget-i").
|
|
|
|
|
661 |
}
|
662 |
});
|
663 |
jQuery(".chaty-widget-i-title").each(function () {
|
@@ -837,7 +840,6 @@
|
|
837 |
});
|
838 |
|
839 |
function setCSSKeyFrames(colorCode) {
|
840 |
-
console.log("fn called"+ colorCode);
|
841 |
var colorString = '@-webkit-keyframes chaty-animation-shockwave ' +
|
842 |
'{ ' +
|
843 |
'0% { transform: scale(1); box-shadow: 0 0 2px rgba('+colorCode+', 0.30), inset 0 0 1px rgba('+colorCode+', 0.30); } ' +
|
255 |
if (chaty_settings.object_settings.display_state == "hover") {
|
256 |
n.find(".i-trigger-open").mouseenter(function (e) {
|
257 |
e.stopPropagation();
|
258 |
+
//removeAnimation();
|
259 |
//t(this).removeClass("active_clos");
|
260 |
o(), t(".chaty-widget-is").removeAttr("id"), t(this).hasClass("active_clos") || t(".chaty-widget-i.facebook").hasClass("active") || n.hasClass("one_widget") || (r(), t(n).hasClass("chaty-widget-show") || (n.addClass("chaty-widget-show"), n.removeClass("none-widget-show")));
|
261 |
if(jQuery(".chaty-widget").hasClass("one_widget")) {
|
341 |
jQuery(".i-trigger").html(htmlToAdd);
|
342 |
}
|
343 |
if(!get_cta_status()) {
|
344 |
+
if(chaty_settings.object_settings['click_setting'] != "all_time") {
|
345 |
jQuery(".i-trigger").attr("data-title", jQuery(".chaty-widget-is .chaty-widget-i-title p").html());
|
346 |
jQuery(".i-trigger .chaty-widget-i-title p").html(chaty_settings.object_settings.cta);
|
347 |
}
|
348 |
} else {
|
349 |
+
if(chaty_settings.object_settings['click_setting'] != "all_time") {
|
350 |
+
jQuery(".i-trigger").addClass("show-channel");
|
351 |
jQuery(".i-trigger").attr("data-title", jQuery(".chaty-widget-is .chaty-widget-i-title p").html());
|
352 |
+
} else {
|
353 |
jQuery(".i-trigger .chaty-widget-i-title p").html(chaty_settings.object_settings.cta);
|
354 |
}
|
355 |
}
|
367 |
if(!jQuery(".i-trigger").hasClass("one-widget")) {
|
368 |
set_cta_status();
|
369 |
}
|
370 |
+
//removeAnimation();
|
371 |
});
|
372 |
jQuery(".chaty-widget").removeClass("chaty-widget-show");
|
373 |
jQuery(".i-trigger").addClass("one-widget");
|
658 |
}
|
659 |
|
660 |
if(!jQuery(".chaty-widget-i.true.chaty-widget-i-title").length) {
|
661 |
+
if(jQuery(".chaty-widget-i-title").text() == "") {
|
662 |
+
jQuery(".chaty-widget-i").addClass("hide-chaty-arrow");
|
663 |
+
}
|
664 |
}
|
665 |
});
|
666 |
jQuery(".chaty-widget-i-title").each(function () {
|
840 |
});
|
841 |
|
842 |
function setCSSKeyFrames(colorCode) {
|
|
|
843 |
var colorString = '@-webkit-keyframes chaty-animation-shockwave ' +
|
844 |
'{ ' +
|
845 |
'0% { transform: scale(1); box-shadow: 0 0 2px rgba('+colorCode+', 0.30), inset 0 0 1px rgba('+colorCode+', 0.30); } ' +
|
js/cht-front-script.min.js
CHANGED
@@ -1 +1 @@
|
|
1 |
-
function launch_chaty(){jQuery(".chaty-widget").hasClass("one_widget")||jQuery(".trigger-chaty-button").trigger("click")}function close_chaty(){jQuery("#chaty-inline-popup").hasClass("active")&&jQuery("#chaty-inline-popup .close-chaty-popup").trigger("click"),jQuery(".chaty-widget.chaty-widget-show").length&&jQuery(".chaty-widget.chaty-widget-show").each(function(){jQuery(this).find(".chaty-close-settings").length&&jQuery(this).find(".chaty-close-settings").trigger("click")})}!function(t){var e={};function i(s){if(e[s])return e[s].exports;var a=e[s]={i:s,l:!1,exports:{}};return t[s].call(a.exports,a,a.exports,i),a.l=!0,a.exports}i.m=t,i.c=e,i.d=function(t,e,s){i.o(t,e)||Object.defineProperty(t,e,{configurable:!1,enumerable:!0,get:s})},i.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return i.d(e,"a",e),e},i.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},i.p="/",i(i.s=10)}({10:function(t,e,i){i(11),t.exports=i(12)},11:function(t,e){!function(t){var e,i=0,s=".i-trigger .chaty-widget-i .svg, .i-trigger .chaty-widget-i .widget-img, .i-trigger .chaty-widget-i .facustom-icon",a=!1;function c(t){return r()&&"click"==chaty_settings.object_settings.click_setting?"none":""}(/(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)))&&(a=!0);new Date;function n(){jQuery(".chaty-widget").hasClass("one_widget")&&jQuery(".chaty-widget").removeClass("chaty-widget-show")}function o(t){console.log("fn called"+t);var e="@-webkit-keyframes chaty-animation-shockwave { 0% { transform: scale(1); box-shadow: 0 0 2px rgba("+t+", 0.30), inset 0 0 1px rgba("+t+", 0.30); } 95% { box-shadow: 0 0 50px rgba("+t+", 0), inset 0 0 30px rgba("+t+", 0); } 100% { transform: scale(2.25); } } @keyframes chaty-animation-shockwave { 0% { transform: scale(1); box-shadow: 0 0 2px rgba("+t+", 0.30), inset 0 0 1px rgba("+t+", 0.30); } 95% { box-shadow: 0 0 50px rgba("+t+", 0), inset 0 0 30px rgba("+t+", 0); } 100% { transform: scale(2.25); } }";jQuery("#chaty-advance-css").length||jQuery("body").append("<div id='chaty-advance-css'></div>"),jQuery("#chaty-advance-css").append("<style>"+e+"</style>")}function r(){var t=g("cta");if(null!=t&&""!=t){t=new Date(t);var e=Math.abs(new Date-t);return Math.floor(e/6e4)<=10}return!1}function g(t){var e=u("chaty_settings"),i=[];if(null!=e&&""!=e&&(i=JSON.parse(e)),i.length>0)for(var s=0;s<i.length;s++)if(i[s].k==t)return i[s].v;return null}function l(t){var e=u("chaty_settings"),i=[];null!=e&&""!=e&&(i=JSON.parse(e));var s=!1;if(i.length>0)for(var a=0;a<i.length;a++)i[a].k==t&&(s=!0,i[a].v=new Date);s||i.push({k:t,v:new Date}),y("chaty_settings",e=JSON.stringify(i),"7")}function h(t){var e=g(t);if(null!=e&&""!=e){e=new Date(e);var i=Math.abs(new Date-e);return Math.floor(i/864e5)>=1}return!0}function d(){var t=u("chaty_settings"),e=[];null!=t&&""!=t&&(e=JSON.parse(t));var i=!1;if(e.length>0)for(var s=0;s<e.length;s++)"cta"==e[s].k&&(i=!0,e[s].v=new Date);i||e.push({k:"cta",v:new Date}),y("chaty_settings",t=JSON.stringify(e),"7")}function y(t,e,i){var s="";if(i){var a=new Date;a.setTime(a.getTime()+24*i*60*60*1e3),s="; expires="+a.toUTCString()}document.cookie=t+"="+(e||"")+s+"; path=/"}function u(t){for(var e=t+"=",i=document.cookie.split(";"),s=0;s<i.length;s++){for(var a=i[s];" "==a.charAt(0);)a=a.substring(1,a.length);if(0==a.indexOf(e))return a.substring(e.length,a.length)}return null}function w(){l("cta_widget_status"),i=1;var t=0;t=jQuery("body").hasClass("chaty-in-desktop")?jQuery(".chaty-widget-is .chaty-widget-i.is-in-desktop").length:jQuery(".chaty-widget-is .chaty-widget-i.is-in-mobile").length,h("chaty-animation")||(chaty_settings.object_settings.animation_class=""),""!=chaty_settings.object_settings.animation_class&&("sheen"!=chaty_settings.object_settings.animation_class?t>1?jQuery(s).addClass("chaty-animation-"+chaty_settings.object_settings.animation_class).addClass("start-now"):1==t&&(s=".chaty-main-widget .svg, .chaty-main-widget img, .chaty-main-widget .facustom-icon",jQuery(s).removeClass("chaty-animation-"+chaty_settings.object_settings.animation_class).removeClass("start-now"),jQuery(s).addClass("chaty-animation-"+chaty_settings.object_settings.animation_class).addClass("start-now")):(s=".i-trigger .chaty-widget-i .wrap-svg",jQuery(".i-trigger .chaty-widget-i .wrap-svg").length,jQuery(s).removeClass("chaty-animation-sheen").removeClass("start-now"),jQuery(s).addClass("chaty-animation-sheen").addClass("start-now"))),"open"==chaty_settings.object_settings.display_state&&("no"==chaty_settings.object_settings.has_close_button?t>1&&(p(),jQuery(".chaty-widget").find(".i-trigger-open").removeClass("active_clos"),jQuery(".chaty-widget").find(".i-trigger-open").trigger("click"),jQuery(".chaty-widget-is").addClass("has-no-close-btn"),jQuery(".i-trigger").remove()):t>1&&(p(),jQuery(".chaty-widget").find(".i-trigger-open").removeClass("active_clos"),jQuery(".chaty-widget").find(".i-trigger-open").trigger("click"))),jQuery(".chaty-widget").hasClass("one_widget")&&jQuery(".chaty-widget").removeClass("chaty-widget-show")}function p(){l("chaty-animation"),jQuery(".chaty-animation-"+chaty_settings.object_settings.animation_class).removeClass("chaty-animation-"+chaty_settings.object_settings.animation_class).removeClass("start-now"),jQuery(".start-now").removeClass("start-now"),chaty_settings.object_settings.animation_class=""}jQuery(document).ready(function(){a?jQuery("body").addClass("chaty-in-mobile"):jQuery("body").addClass("chaty-in-desktop"),c(),token="",jQuery(document).ready(function(){"true"==(e=chaty_settings).object_settings.active&&function(e,i){var s=e.object_settings.device,a="";if("right"==e.object_settings.position)a="left: auto;bottom: 25px; right: 25px;";else if("left"==e.object_settings.position)a="right: auto; bottom: 25px; left: 25px;";else if("custom"==e.object_settings.position){var n=e.object_settings.pos_side,o=e.object_settings.bot,r=e.object_settings.side;a="right"===n?"left: auto; bottom: "+o+"px; right: "+r+"px":"left: "+r+"px; bottom: "+o+"px; right: auto"}var g=e.object_settings.cta,l="",d=e.object_settings.social;if(Object.keys(d).length>=1&&(l='<div class="chaty-widget hide-widget '+i+" "+s+' " style="display:block; '+a+'" dir="ltr">',l+='<div class="chaty-widget-is" id="transition_disabled">'),l+=function(e){var i="",s=0;return t.each(e.object_settings.social,function(t,a){if(e.object_settings.isPRO&&jQuery("body").addClass("has-pro-version"),!e.object_settings.isPRO&&"3"==++s)return!1;extra_class="","1"!=e.object_settings.analytics&&1!=e.object_settings.analytics||(extra_class+=" update-analytics ");var c=1==e.object_settings.social[t].is_desktop?"is-in-desktop":"",n=1==e.object_settings.social[t].is_mobile?"is-in-mobile":"",o=1==e.object_settings.is_mobile?e.object_settings.social[t].mobile_target:e.object_settings.social[t].desktop_target;if(jQuery("body").hasClass("chaty-in-mobile")&&(e.object_settings.social[t].href_url=e.object_settings.social[t].mobile_url),"viber"==e.object_settings.social[t].social_channel){if(jQuery("body").hasClass("chaty-in-mobile")){var r=e.object_settings.social[t].href_url;isNaN(r)||(r=r.replace("+",""),navigator.userAgent.match(/(iPod|iPhone|iPad)/)&&(r="+"+r)),e.object_settings.social[t].href_url=r}e.object_settings.social[t].href_url="viber://chat?number="+e.object_settings.social[t].href_url}1==parseInt(e.object_settings.social[t].has_custom_popup)&&("whatsapp"==e.object_settings.social[t].channel_type?(e.object_settings.social[t].is_default_open&&h("cht_whatsapp_window")&&(extra_class+=" open-it-by-default"),o="",e.object_settings.social[t].mobile_target="",e.object_settings.social[t].desktop_target="",extra_class+=" has-custom-chaty-popup whatsapp-button"):"contact_us"==e.object_settings.social[t].channel_type&&(extra_class+=" has-custom-chaty-popup whatsapp-button"));var g="";""!=e.object_settings.social[t].on_click&&(g=' onclick="'+e.object_settings.social[t].on_click+'"'),socialString='<div data-popup="'+e.object_settings.social[t].popup_html+'" data-rgb="'+e.object_settings.social[t].rbg_color+'" class="chaty-widget-i chaty-main-widget '+c+" "+n+" "+extra_class+" channel-"+e.object_settings.social[t].social_channel+'" data-title="'+e.object_settings.social[t].val+'" id="chaty-channel-'+e.object_settings.social[t].social_channel+'" data-channel="'+e.object_settings.social[t].social_channel+'" data-code="'+e.object_settings.social[t].qr_code_image+'">',bgColor="",""!=e.object_settings.social[t].bg_color&&(socialString+="<style>#chaty-channel-"+e.object_settings.social[t].social_channel+" .color-element {fill: "+e.object_settings.social[t].bg_color+"; background: "+e.object_settings.social[t].bg_color+"}</style>",bgColor="style='background-color: "+e.object_settings.social[t].bg_color+";'"),socialString+="<a class='set-url-target' "+g+" rel='noopener' data-mobile-target='"+e.object_settings.social[t].mobile_target+"' data-desktop-target='"+e.object_settings.social[t].desktop_target+"' target='"+o+"' href='"+e.object_settings.social[t].href_url+"' >",socialString+="<span class='sr-only'>"+e.object_settings.social[t].title+"</span>",""!=e.object_settings.social[t].img_url?socialString+="<span "+bgColor+" class='chaty-social-img'><img src='"+e.object_settings.social[t].img_url+"' alt='"+e.object_settings.social[t].title+"' /></span>":socialString+=e.object_settings.social[t].default_icon,socialString+="</a>",socialString+="<div class='chaty-widget-i-title'><p>"+e.object_settings.social[t].title+"</p></div>",socialString+="</div>",i+=socialString}),i}(e),d=e.object_settings.social,Object.keys(d).length>=1){l+="</div>",l+='<div class="i-trigger">';var y=c(),u=current_url=window.location.origin;if(u=(u=u.replace("https://","")).replace("http://",""),""!=g&&"none"!=y);else"no-tooltip";"click"!=chaty_settings.object_settings.click_setting&&!0,l+='<div class="chaty-widget-i chaty-close-settings i-trigger-open '+!0+' ">',l+=function(t){switch(t.object_settings.widget_type){case"chat-image":if(t.object_settings.widget_img.length>1)return'<div class="widget-img" style="background-color:'+t.object_settings.color+'"><img src="'+t.object_settings.widget_img+'"/></div>';case"chat-smile":return'<svg version="1.1" id="smile" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" viewBox="-496.8 507.1 54 54" style="enable-background:new -496.8 507.1 54 54;" xml:space="preserve"><style type="text/css">.st1{fill:#FFFFFF;} .st2{fill:none;stroke:#808080;stroke-width:1.5;stroke-linecap:round;stroke-linejoin:round;}</style><g><circle cx="-469.8" cy="534.1" r="27" fill="'+t.object_settings.color+'"/></g><path class="st1" d="M-459.5,523.5H-482c-2.1,0-3.7,1.7-3.7,3.7v13.1c0,2.1,1.7,3.7,3.7,3.7h19.3l5.4,5.4c0.2,0.2,0.4,0.2,0.7,0.2c0.2,0,0.2,0,0.4,0c0.4-0.2,0.6-0.6,0.6-0.9v-21.5C-455.8,525.2-457.5,523.5-459.5,523.5z"/><path class="st2" d="M-476.5,537.3c2.5,1.1,8.5,2.1,13-2.7"/><path class="st2" d="M-460.8,534.5c-0.1-1.2-0.8-3.4-3.3-2.8"/></svg>';case"chat-bubble":return'<svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" viewBox="-496.9 507.1 54 54" style="enable-background:new -496.9 507.1 54 54;" xml:space="preserve"><style type="text/css">.st1{fill:#FFFFFF;}</style><g><circle cx="-469.9" cy="534.1" r="27" fill="'+t.object_settings.color+'"/></g><path class="st1" d="M-472.6,522.1h5.3c3,0,6,1.2,8.1,3.4c2.1,2.1,3.4,5.1,3.4,8.1c0,6-4.6,11-10.6,11.5v4.4c0,0.4-0.2,0.7-0.5,0.9 c-0.2,0-0.2,0-0.4,0c-0.2,0-0.5-0.2-0.7-0.4l-4.6-5c-3,0-6-1.2-8.1-3.4s-3.4-5.1-3.4-8.1C-484.1,527.2-478.9,522.1-472.6,522.1z M-462.9,535.3c1.1,0,1.8-0.7,1.8-1.8c0-1.1-0.7-1.8-1.8-1.8c-1.1,0-1.8,0.7-1.8,1.8C-464.6,534.6-463.9,535.3-462.9,535.3z M-469.9,535.3c1.1,0,1.8-0.7,1.8-1.8c0-1.1-0.7-1.8-1.8-1.8c-1.1,0-1.8,0.7-1.8,1.8C-471.7,534.6-471,535.3-469.9,535.3z M-477,535.3c1.1,0,1.8-0.7,1.8-1.8c0-1.1-0.7-1.8-1.8-1.8c-1.1,0-1.8,0.7-1.8,1.8C-478.8,534.6-478.1,535.3-477,535.3z"/></svg>';case"chat-db":return'<svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" viewBox="-496 507.1 54 54" style="enable-background:new -496 507.1 54 54;" xml:space="preserve"><style type="text/css">.st1{fill:#FFFFFF;}</style><g><circle cx="-469" cy="534.1" r="27" fill="'+t.object_settings.color+'"/></g><path class="st1" d="M-464.6,527.7h-15.6c-1.9,0-3.5,1.6-3.5,3.5v10.4c0,1.9,1.6,3.5,3.5,3.5h12.6l5,5c0.2,0.2,0.3,0.2,0.7,0.2c0.2,0,0.2,0,0.3,0c0.3-0.2,0.5-0.5,0.5-0.9v-18.2C-461.1,529.3-462.7,527.7-464.6,527.7z"/><path class="st1" d="M-459.4,522.5H-475c-1.9,0-3.5,1.6-3.5,3.5h13.9c2.9,0,5.2,2.3,5.2,5.2v11.6l1.9,1.9c0.2,0.2,0.3,0.2,0.7,0.2c0.2,0,0.2,0,0.3,0c0.3-0.2,0.5-0.5,0.5-0.9v-18C-455.9,524.1-457.5,522.5-459.4,522.5z"/></svg>';default:return'<svg version="1.1" id="ch" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" viewBox="-496 507.7 54 54" style="enable-background:new -496 507.7 54 54;" xml:space="preserve"><style type="text/css">.st1 {fill: #FFFFFF;}.st0{fill: #808080;}</style><g><circle cx="-469" cy="534.7" r="27" fill="'+t.object_settings.color+'"/></g><path class="st1" d="M-459.9,523.7h-20.3c-1.9,0-3.4,1.5-3.4,3.4v15.3c0,1.9,1.5,3.4,3.4,3.4h11.4l5.9,4.9c0.2,0.2,0.3,0.2,0.5,0.2 h0.3c0.3-0.2,0.5-0.5,0.5-0.8v-4.2h1.7c1.9,0,3.4-1.5,3.4-3.4v-15.3C-456.5,525.2-458,523.7-459.9,523.7z"/><path class="st0" d="M-477.7,530.5h11.9c0.5,0,0.8,0.4,0.8,0.8l0,0c0,0.5-0.4,0.8-0.8,0.8h-11.9c-0.5,0-0.8-0.4-0.8-0.8l0,0C-478.6,530.8-478.2,530.5-477.7,530.5z"/><path class="st0" d="M-477.7,533.5h7.9c0.5,0,0.8,0.4,0.8,0.8l0,0c0,0.5-0.4,0.8-0.8,0.8h-7.9c-0.5,0-0.8-0.4-0.8-0.8l0,0C-478.6,533.9-478.2,533.5-477.7,533.5z"/></svg>'}}(e),y=c(),""!=g&&"none"!=y&&(l+=' <div class="chaty-widget-i-title true"> ',l+=g,l+="</div>"),l+="</div>",l+='<div class="chaty-widget-i chaty-close-settings i-trigger-close" data-title="'+e.object_settings.close_text+'" style="background-color:'+e.object_settings.color+'">',""==e.object_settings.close_img?(l+='<svg viewBox="0 0 54 54" fill="none" xmlns="http://www.w3.org/2000/svg">',l+='<ellipse cx="26" cy="26" rx="26" ry="26" fill="'+e.object_settings.color+'"/>',l+='<rect width="27.1433" height="3.89857" rx="1.94928" transform="translate(18.35 15.6599) scale(0.998038 1.00196) rotate(45)" fill="white"/>',l+='<rect width="27.1433" height="3.89857" rx="1.94928" transform="translate(37.5056 18.422) scale(0.998038 1.00196) rotate(135)" fill="white"/>',l+="</svg>"):l+="<span class='chaty-social-img'><img alt='"+e.object_settings.close_text+"' src='"+e.object_settings.close_img+"' /></span>",l+='<div class="chaty-widget-i-title">',l+=e.object_settings.close_text,l+="</div>",l+="</div>",l+=" </div>",0===i.length&&!e.object_settings.isPRO&&(l+=""),l+="</div>"}t("body").append(l)}(e,token),function(){var i=t(".chaty-widget"),s=e.object_settings.widget_size?e.object_settings.widget_size:54,a=+e.object_settings.widget_size+8;function o(){i.position().top;var t=i.find(".chaty-widget-is .chaty-widget-i").length;if((t=jQuery("body").hasClass("chaty-in-desktop")?i.find(".chaty-widget-is .chaty-widget-i.is-in-desktop").length:i.find(".chaty-widget-is .chaty-widget-i.is-in-mobile").length)*a>jQuery(window).height()-(chaty_settings.object_settings.widget_size+8)){var e=Math.round(Math.sqrt(t)),s=Math.ceil(Math.sqrt(t));i.find(".chaty-widget-is").css({height:s*a,width:e*a}),g(s),i.find("span:not(.cht-pending-message)").css({height:s*a,width:e*a}),g(s),i.find("img").css({height:s*a,width:e*a}),g(s)}else g()}function r(){"left"===e.object_settings.position&&i.addClass("chaty-widget-is-right"),"custom"===e.object_settings.position&&"left"===e.object_settings.pos_side&&i.addClass("chaty-widget-is-right")}function g(t){var e;e=jQuery("body").hasClass("chaty-in-desktop")?i.find(".chaty-widget-is .chaty-widget-i.is-in-desktop").length:i.find(".chaty-widget-is .chaty-widget-i.is-in-mobile").length,i.find(".chaty-widget-i").css({height:s+"px",width:s+"px"}),i.find("img").css({height:s+"px",width:s+"px"}),i.find("span:not(.cht-pending-message)").css({height:s+"px",width:s+"px"}),i.find(".chaty-widget-is").css({top:"-"+100*e+"%"}),i.find(".chaty-widget-is").height(e*(parseInt(s)+8)),i.find(".chaty-widget-is").width(parseInt(s)+8),"horizontal"==chaty_settings.object_settings.mode?(i.find(".chaty-widget-is").css({top:"0"}),i.find(".chaty-widget-is").width(e*(parseInt(s)+8)),i.find(".chaty-widget-is").height(parseInt(s)+8)):(i.find(".chaty-widget-is").height(e*(parseInt(s)+8)),i.find(".chaty-widget-is").width(parseInt(s)+8))}jQuery(".open-it-by-default").length&&jQuery(".open-it-by-default").trigger("click"),r(),o(),jQuery(window).resize(function(){o(),1==Object.keys(e.object_settings.social).length&&(jQuery(".chaty-widget").addClass("chaty-widget-show"),jQuery(".chaty-widget-is").css("top","auto")),jQuery(".chaty-widget").hasClass("one_widget")&&jQuery(".chaty-widget").removeClass("chaty-widget-show")}),t(".chaty-widget-i.facebook").mouseenter(function(){t(".facebook_two_mess").css({opacity:"1","z-index":"1"}),t(this).addClass("before")}),t(".chaty-widget-i.facebook").mouseleave(function(){t(".facebook_two_mess").css({opacity:"0","z-index":"1"}),t(this).removeClass("before")}),t(".chaty-widget-i.facebook").on("click",function(){t(this).addClass("active"),t(".facebook_two_mess").hide(),jQuery(".chaty-widget .get a").hide(),t(this).children(".face_title").css({opacity:"1","z-index":"2"}).show(),t(".chaty-widget").hasClass("one_widget")?t(".chaty-widget").hasClass("chaty-widget-is-right")?t(".face_title").css({top:"calc(100% - 447px)",left:"20px"}):t(".face_title").css({top:"calc(100% - 447px)",left:"auto",right:"20px"}):(t(".facebook_two_mess").css({opacity:"0","z-index":"10001"}),t(".ico_d").hide(),t(".chaty-widget .chaty-widget-i").css({"box-shadow":"0px 3px 6px rgba(0,0,0,0)"}),t(".chaty-widget").hasClass("one_widget")||t(".i-trigger").hide())}),t(".i-trigger-close").on("click",function(e){e.preventDefault(),t(".chaty-widget-i.facebook").hasClass("active")||(i.removeClass("chaty-widget-show"),i.addClass("none-widget-show"))}),t("body").on("click",".close_facebook",function(){t(".facebook_two_mess").show(),jQuery(".chaty-widget .get a").show(),t(".chaty-widget-i.facebook").removeClass("active"),t(this).parent().parent().css({opacity:"1"}).hide(),t(".i-trigger").show(),t(".chaty-widget-is .chaty-widget-i svg").show()}),t(".i-trigger-close").on("click",function(e){t(".i-trigger-open").addClass("active_clos"),e.preventDefault(),t(".chaty-widget-i.facebook").hasClass("active")||(i.removeClass("chaty-widget-show"),i.addClass("none-widget-show"))}),t("body").on("click",".update-analytics",function(t){if(channelName=jQuery(this).attr("data-channel"),null!=channelName&&""!=channelName)if(window.hasOwnProperty("gtag"))gtag("event","chaty_"+channelName,{eventCategory:"chaty_"+channelName,event_action:"chaty_"+channelName});else if(window.hasOwnProperty("ga")){var e=window.ga.getAll()[0];e&&e.send("event","click",{eventCategory:"chaty_"+channelName,eventAction:"chaty_"+channelName})}}),t("body").on("click",".wechat",function(){var t=jQuery(".chaty-widget .chaty-widget-i.wechat").attr("data-code");null!=t&&""!=t&&(jQuery("#wechat-qr-code").length||(htmlString="<div id='wechat-qr-code' class='wechat-qr-code'>",htmlString+='<div class="wechat-box-head">WeChat<svg xmlns="http://www.w3.org/2000/svg" class="close_facebook" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" id="Capa_1" x="0px" y="0px" width="612px" height="612px" viewBox="0 0 612 612" style="fill: #fff; float: right; margin-top: 4px;" xml:space="preserve"><path xmlns="http://www.w3.org/2000/svg" d="M268.064,256.75l138.593-138.593c3.124-3.124,3.124-8.189,0-11.313c-3.125-3.124-8.189-3.124-11.314,0L256.75,245.436 L118.157,106.843c-3.124-3.124-8.189-3.124-11.313,0c-3.125,3.124-3.125,8.189,0,11.313L245.436,256.75L106.843,395.343 c-3.125,3.125-3.125,8.189,0,11.314c1.562,1.562,3.609,2.343,5.657,2.343s4.095-0.781,5.657-2.343L256.75,268.064l138.593,138.593 c1.563,1.562,3.609,2.343,5.657,2.343s4.095-0.781,5.657-2.343c3.124-3.125,3.124-8.189,0-11.314L268.064,256.75z"></path></svg></div>',htmlString+="<div class='wechat-box'><img src='"+t+"' alt='QR Code' /><a href='javascript:;'>",htmlString+="</a></div></div>",jQuery("body").append(htmlString)),jQuery("#wechat-qr-code").show())});var l=c();"hover"==chaty_settings.object_settings.display_state?i.find(".i-trigger-open").mouseenter(function(e){e.stopPropagation(),p(),n(),t(".chaty-widget-is").removeAttr("id"),t(this).hasClass("active_clos")||t(".chaty-widget-i.facebook").hasClass("active")||i.hasClass("one_widget")||(r(),t(i).hasClass("chaty-widget-show")||(i.addClass("chaty-widget-show"),i.removeClass("none-widget-show"))),jQuery(".chaty-widget").hasClass("one_widget")&&jQuery(".chaty-widget").removeClass("chaty-widget-show"),"click"==chaty_settings.object_settings.click_setting&&(jQuery(".i-trigger").hasClass("one-widget")||(jQuery(this).closest(".chaty-widget-i").addClass("hide-chaty-arrow"),jQuery("body .chaty-widget-i-title.true").remove()))}):i.find(".i-trigger-open").click(function(e){e.stopPropagation(),p(),n(),t(".chaty-widget-is").removeAttr("id"),t(this).hasClass("active_clos")||t(".chaty-widget-i.facebook").hasClass("active")||i.hasClass("one_widget")||(r(),t(i).hasClass("chaty-widget-show")||(i.addClass("chaty-widget-show"),i.removeClass("none-widget-show"))),n(),"click"==chaty_settings.object_settings.click_setting&&(jQuery(".i-trigger").hasClass("one-widget")||(jQuery(this).closest(".chaty-widget-i").addClass("hide-chaty-arrow"),jQuery("body .chaty-widget-i-title.true").remove())),jQuery(".cht-pending-message").remove()}),t(".one_widget").on("click",function(){p(),jQuery(".cht-pending-message").remove()}),i.find(".i-trigger-open").on("click",function(){jQuery(".cht-pending-message").remove(),"none"!=l&&(t(".chaty-widget").hasClass(".one_widget")||t(".i-trigger-open .chaty-widget-i-title1").detach()),"click"==chaty_settings.object_settings.click_setting&&t(".i-trigger-open").addClass("no-tooltip"),t(this).hasClass("active_clos")||t(".chaty-widget-i.facebook").hasClass("active")||i.hasClass("one_widget")||(r(),t(i).hasClass("chaty-widget-show")||(i.addClass("chaty-widget-show"),i.removeClass("none-widget-show"))),p()}),i.find(".i-trigger-open").mouseenter(function(){"click"==chaty_settings.object_settings.click_setting&&t(this).addClass("no-tooltip"),t(".i-trigger-open").removeClass("active_clos"),o()}),i.find(".chaty-widget-is").mouseleave(function(){t(".i-trigger-open").removeClass("active_clos"),t(".chaty-widget-i.facebook").hasClass("active")}),1===Object.keys(e.object_settings.social).length&&i.find(".i-trigger-open").on("touchstart",function(e){"use strict";t(this).find(".chaty-widget-i").toggleClass("hover")}),1==Object.keys(e.object_settings.social).length&&(jQuery(".chaty-widget").addClass("chaty-widget-show"),jQuery(".chaty-widget-is").css("top","auto"),jQuery(".chaty-widget-is").css("z-index","10001"),jQuery(".chaty-widget-i.i-trigger-close, .i-trigger.chaty-widget-i").remove(),jQuery(".chaty-widget .get a").css("top","-10px"),jQuery(".chaty-widget").addClass("one_widget"),jQuery(document).on("click",".chaty-widget-i",function(){jQuery(".i-trigger").hasClass("one-widget")||(jQuery(".chaty-widget-i:first .chaty-widget-i-title:last").hide(),jQuery("body").addClass("hide-cht-widget"))}),jQuery("body").append("<style>.chaty-widget-is{top:0!important;}</style>"))}(),t(document).ready(function(){1!==Object.keys(e.object_settings.social).length||!e.object_settings.social.snapchat&&!e.object_settings.social.wechat||e.object_settings.cta||(t(".chaty-widget-i-1title").detach(),t(".chaty-widget-i").addClass("bofore_del")),t(".chaty-widget-i-title").hasClass("one_go")&&(t(".chaty-widget-i-title p").html(t(".chaty-widget-i-title.one_go").html()),"none"==c()&&(t(".chaty-widget-i-title").hasClass("face_title")?(t(".facebook_two_mess").detach(),t(".chaty-widget-i").addClass("bofore_del")):(t(".chaty-widget-i-title11").detach(),t(".chaty-widget-i").addClass("bofore_del")))),window.matchMedia("only screen and (max-width: 760px)").matches&&t(".i-trigger-open").addClass("active_clos"),jQuery(".chaty-widget-i-title").each(function(){""==jQuery(this).text()&&jQuery(this).remove()})}),t(document).ready(function(){var s=0;0==(s=jQuery("body").hasClass("chaty-in-desktop")?jQuery(".chaty-widget-is .chaty-widget-i.is-in-desktop").length:jQuery(".chaty-widget-is .chaty-widget-i.is-in-mobile").length)?jQuery(".chaty-widget").addClass("hide-widget").removeClass("desktop_active").removeClass("mobile_active"):(jQuery("body").hasClass("chaty-in-desktop")?jQuery(".chaty-widget").removeClass("hide-widget").addClass("desktop_active"):jQuery(".chaty-widget").removeClass("hide-widget").addClass("mobile_active"),1==s?(jQuery(".chaty-close-settings").hide(),jQuery("body").hasClass("chaty-in-desktop")?(htmlToAdd=jQuery(".chaty-widget-is .chaty-widget-i.is-in-desktop:first").clone(),jQuery(".i-trigger").html(htmlToAdd)):(htmlToAdd=jQuery(".chaty-widget-is .chaty-widget-i.is-in-mobile:first").clone(),jQuery(".i-trigger").html(htmlToAdd)),r()?(jQuery(".i-trigger").addClass("show-channel"),"all_time"==chaty_settings.object_settings.click_setting&&(jQuery(".i-trigger").attr("data-title",jQuery(".chaty-widget-is .chaty-widget-i-title p").html()),jQuery(".i-trigger .chaty-widget-i-title p").html(chaty_settings.object_settings.cta))):"all_time"==chaty_settings.object_settings.click_setting&&(jQuery(".i-trigger").attr("data-title",jQuery(".chaty-widget-is .chaty-widget-i-title p").html()),jQuery(".i-trigger .chaty-widget-i-title p").html(chaty_settings.object_settings.cta)),jQuery(".chaty-widget").addClass("one_widget"),jQuery(".chaty-widget.one_widget, .i-trigger, .chaty-widget-i").mouseenter(function(){n(),"click"==chaty_settings.object_settings.click_setting&&(jQuery(".i-trigger").hasClass("one-widget")||(jQuery(".chaty-widget-i-title").remove(),jQuery(".chaty-widget").addClass("hide-tooltip-arrow")),jQuery(".chaty-widget").removeClass("chaty-widget-show")),jQuery(".i-trigger").hasClass("one-widget")||d(),p()}),jQuery(".chaty-widget").removeClass("chaty-widget-show"),jQuery(".i-trigger").addClass("one-widget"),r(),o(jQuery(".i-trigger .chaty-widget-i:first").data("rgb"))):(jQuery(".chaty-widget").removeClass("one_widget"),"click"==chaty_settings.object_settings.click_setting&&jQuery(".i-trigger .chaty-main-widget").remove(),jQuery(".chaty-close-settings").show(),jQuery(".chaty-widget-i-title").removeClass("hide-it"),jQuery(".chaty-widget.one_widget, .i-trigger, .chaty-widget-i").mouseenter(function(){n(),jQuery(".i-trigger").hasClass("one-widget")||(d(),jQuery(".i-trigger").hasClass("one-widget")||jQuery(".i-trigger .chaty-widget-i-title").addClass("hide-it")),p()}),"open"==chaty_settings.object_settings.display_state&&t(".i-trigger-open").addClass("no-tooltip"),o(chaty_settings.object_settings.rgb_color))),jQuery(document).on("click",".i-trigger.one-widget",function(){d()});var a,g,l,_=0;if(1==parseInt(chaty_settings.object_settings.display_conditions)){var j=chaty_settings.object_settings.display_rules;if(j.length>0){var m=new Date;m.setHours(m.getHours()+chaty_settings.object_settings.gmt);for(var b=m.getUTCHours(),f=m.getUTCMinutes(),v=m.getUTCDay(),Q=0;Q<j.length;Q++){var C=0,k=0;-1==j[Q].days?k=1:j[Q].days>=0&&j[Q].days<=6?j[Q].days==v&&(k=1):7==j[Q].days?v>=0&&v<=4&&(k=1):8==j[Q].days?v>=1&&v<=5&&(k=1):9==j[Q].days&&(5!=v&&6!=v||(k=1)),1==k&&(b>j[Q].start_hours&&b<j[Q].end_hours?C=1:b==j[Q].start_hours&&b<j[Q].end_hours?f>=j[Q].start_min&&(C=1):b>j[Q].start_hours&&b==j[Q].end_hours?f<=j[Q].end_min&&(C=1):b==j[Q].start_hours&&b==j[Q].end_hours&&f>=j[Q].start_min&&f<=j[Q].end_min&&(C=1),1==C&&f>=j[Q].start_min&&f<=j[Q].end_min&&1),1==C&&1==k&&(_=1),1==_&&(Q=j.length+1)}}else _=1}else _=1;if(1==s&&(""!=c()&&("click"==chaty_settings.object_settings.click_setting&&(jQuery(".i-trigger").hasClass("one-widget")||(jQuery(".chaty-widget-i-title").remove(),jQuery(".chaty-widget").addClass("hide-tooltip-arrow"))),setInterval(function(){},1e4)),jQuery(".chaty-main-widget").addClass("i-trigger-open").addClass("single-button"),jQuery(".chaty-widget-show .i-trigger-open svg").css("transform","rotate(0deg)"),jQuery(".chaty-widget").removeClass("chaty-widget-show")),""!=chaty_settings.object_settings.animation_class&&("sheen"!=chaty_settings.object_settings.animation_class?jQuery(".i-trigger .chaty-widget-i svg").wrap(function(){return"<div class='svg'></div>"}):jQuery(".i-trigger .chaty-widget-i .wrap-svg").length||jQuery(".i-trigger .chaty-widget-i svg").wrap(function(){return"<div class='wrap-svg'></div>"})),r()||("on"==chaty_settings.object_settings.pending_messages&&("sheen"!=chaty_settings.object_settings.animation_class?jQuery(".i-trigger .i-trigger-open .svg, .i-trigger .i-trigger-open.single-button .svg").length?jQuery(".i-trigger .i-trigger-open .svg, .i-trigger .i-trigger-open.single-button .svg").append("<span class='cht-pending-message'>"+chaty_settings.object_settings.number_of_messages+"</span>"):jQuery(".i-trigger .i-trigger-open.single-button svg").length?jQuery(".i-trigger .i-trigger-open.single-button svg").after("<span class='cht-pending-message'>"+chaty_settings.object_settings.number_of_messages+"</span>"):jQuery(".i-trigger .i-trigger-open, .i-trigger .i-trigger-open.single-button svg").after("<span class='cht-pending-message'>"+chaty_settings.object_settings.number_of_messages+"</span>"):jQuery(".i-trigger .i-trigger-open, .i-trigger .i-trigger-open.single-button").after("<span class='cht-pending-message'>"+chaty_settings.object_settings.number_of_messages+"</span>"),jQuery(".cht-pending-message").css("color",chaty_settings.object_settings.number_color),jQuery(".cht-pending-message").css("background",chaty_settings.object_settings.number_bg_color)),jQuery(document).on("click",".i-trigger .i-trigger-open, .i-trigger.one-widget",function(){if(jQuery(".cht-pending-message").remove(),"all_time"!=chaty_settings.object_settings.click_setting&&jQuery(this).hasClass("one-widget")){jQuery(this).addClass("show-channel");var t=jQuery(this).data("title");jQuery(this).find(".chaty-widget-i-title").find("p").html(t)}})),jQuery(document).on("click",".i-trigger.one-widget",function(){if("all_time"!=chaty_settings.object_settings.click_setting&&jQuery(this).hasClass("one-widget")){jQuery(this).addClass("show-channel");var t=jQuery(this).data("title");jQuery(this).find(".chaty-widget-i-title").find("p").html(t)}}),jQuery("chaty-main-widget").mouseenter(function(){jQuery(".i-trigger").hasClass("one-widget")||d()}),1==_)if(h("cta_widget_status"))if("no"==chaty_settings.object_settings.time_trigger&&"no"==chaty_settings.object_settings.exit_intent&&"no"==chaty_settings.object_settings.on_page_scroll)jQuery(".chaty-widget").removeClass("hide-widget"),"open"==chaty_settings.object_settings.display_state&&"no"==chaty_settings.object_settings.has_close_button?chaty_settings.object_settings.has_close_button="no":(chaty_settings.object_settings.display_state="hover",chaty_settings.object_settings.has_close_button="yes"),w();else{if(jQuery(".chaty-widget").addClass("hide-widget"),"yes"==chaty_settings.object_settings.time_trigger&&setTimeout(function(){i||(jQuery(".chaty-widget").removeClass("hide-widget"),w())},1e3*parseInt(chaty_settings.object_settings.trigger_time)),"yes"==chaty_settings.object_settings.exit_intent){a=document,g="mouseout",l=function(t){null==t.toElement&&null==t.relatedTarget&&null==u("cta_exit_intent_shown")&&(y("cta_exit_intent_shown","yes",1),i=!0,jQuery(".chaty-widget").removeClass("hide-widget"),jQuery(".chaty-widget").addClass("chaty-animation-widget"),jQuery(".chaty-animation-widget").append("<div class='chaty-nav'></div>"),"open"==chaty_settings.object_settings.display_state&&"no"==chaty_settings.object_settings.has_close_button?chaty_settings.object_settings.has_close_button="no":(chaty_settings.object_settings.display_state="open",chaty_settings.object_settings.has_close_button="yes"),w(),"left"==chaty_settings.object_settings.position?jQuery(".chaty-widget").addClass("left-position"):"right"==chaty_settings.object_settings.position?jQuery(".chaty-widget").addClass("right-position"):"custom"==chaty_settings.object_settings.position&&("left"==e.object_settings.pos_side?jQuery(".chaty-widget").addClass("left-position"):jQuery(".chaty-widget").addClass("right-position")),p(),setTimeout(function(){jQuery(".chaty-animation-widget").addClass("active")},100),setTimeout(function(){jQuery(".chaty-nav").remove()},2500))},a.addEventListener?a.addEventListener(g,l,!1):a.attachEvent&&a.attachEvent("on"+g,l)}"yes"==chaty_settings.object_settings.on_page_scroll&&parseInt(chaty_settings.object_settings.page_scroll)>0&&jQuery(window).scroll(function(){if(!i){var t=jQuery(document).height()-jQuery(window).height(),e=jQuery(window).scrollTop();0!=e&&e/t*100>=parseInt(chaty_settings.object_settings.page_scroll)&&(jQuery(".chaty-widget").removeClass("hide-widget"),w())}})}else jQuery(".chaty-widget").removeClass("hide-widget"),w();else jQuery(".chaty-widget").addClass("hide-widget");jQuery(".chaty-widget-i-title").length&&jQuery(".chaty-widget-i-title").each(function(){""==jQuery.trim(jQuery(this).text())&&(jQuery(this).closest(".chaty-widget-i").addClass("hide-chaty-arrow"),jQuery(this).remove())}),jQuery(".chaty-widget-i.true.chaty-widget-i-title").length||jQuery(".chaty-widget-i").addClass("hide-chaty-arrow")}),jQuery(".chaty-widget-i-title").each(function(){""==jQuery(this).text()&&(jQuery(this).closest(".chaty-widget-i").addClass("hide-chaty-arrow"),jQuery(this).remove())}),jQuery(".chaty-widget").hasClass("one_widget")||jQuery("body").append("<div class='trigger-chaty-button'></div>"),jQuery("body").addClass(chaty_settings.object_settings.mode+"-cht-menu"),jQuery("body").addClass(chaty_settings.object_settings.position+"-cht-position")})}),jQuery(document).on("click",".trigger-chaty-button",function(){jQuery(".chaty-widget").removeClass("hide-widget"),w(),!jQuery(".chaty-widget").hasClass("none-widget-show")&&jQuery(".chaty-widget").hasClass("chaty-widget-show")||jQuery(".i-trigger-open").trigger("click")}),jQuery(document).on("click",".has-custom-chaty-popup.whatsapp-button",function(t){if(jQuery("#chaty-inline-popup").length){var e=jQuery(this).data("data-index");jQuery("#chaty-widget-"+e).removeClass("chaty-popup-open"),jQuery(".chaty-popup-open").removeClass("chaty-popup-open"),jQuery(".chaty-widget.hide-block").removeClass("active")}if(jQuery(this).hasClass("open-it-by-default")&&t.preventDefault(),jQuery("#chaty-inline-popup").remove(),null!=jQuery(this).attr("data-popup")&&""!=jQuery(this).attr("data-popup")){e="";jQuery(".chaty-widget").addClass("hide-block"),jQuery(".chaty-widget").addClass("chaty-popup-open");var i="<div data-index='"+e+"' id='chaty-inline-popup' class='chaty-inline-popup chaty-popup-form "+jQuery(this).data("channel")+"-channel'>";i+=jQuery(this).attr("data-popup"),jQuery("body").append(i),jQuery(".chaty-inline-popup .default-value").length&&(thisHref=jQuery(".chaty-inline-popup .default-value").text(),thisHref=decodeURI(thisHref),thisHref=thisHref.replace(/{title}/g,jQuery("title").text()),thisHref=thisHref.replace(/{url}/g,window.location.href),jQuery(".chaty-whatsapp-msg").val(jQuery(".chaty-inline-popup .default-value").text()),jQuery(".chaty-whatsapp-phone").val(jQuery(".chaty-inline-popup .default-msg-phone").text()),chatyHtml=jQuery(".chaty-inline-popup .default-msg-value").html(),chatyHtml=chatyHtml.replace(/{title}/g,jQuery("title").text()),chatyHtml=chatyHtml.replace(/{url}/g,window.location.href),jQuery(".chaty-whatsapp-message").html(chatyHtml)),jQuery(".chaty-widget").addClass("active"),setTimeout(function(){jQuery("#chaty-inline-popup").addClass("active")},150),jQuery("body").hasClass("chaty-in-mobile")||jQuery(".chaty-whatsapp-msg").focus()}a&&jQuery(".whatsapp-chaty-form").prop("target","")}),jQuery(document).on("click",".close-chaty-popup, .close-chaty-box",function(){jQuery(this).hasClass("is-whatsapp-btn")&&l("cht_whatsapp_window"),jQuery("#chaty-inline-popup").removeClass("active"),jQuery(".chaty-widget").removeClass("chaty-popup-open"),setTimeout(function(){jQuery(".chaty-widget.hide-block").removeClass("active")},250)}),jQuery(document).on("submit",".whatsapp-chaty-form",function(t){if(l("cht_whatsapp_window"),jQuery("#chaty-inline-popup").removeClass("active"),jQuery(".chaty-widget").removeClass("chaty-popup-open"),setTimeout(function(){jQuery(".chaty-widget.hide-block").removeClass("active")},250),jQuery("body").hasClass("chaty-in-mobile"))return t.preventDefault(),window.location="https://wa.me/"+jQuery(this).find(".chaty-whatsapp-phone").val()+"?text="+jQuery(this).find(".chaty-whatsapp-msg").val(),!1}),jQuery(document).on("submit",".chaty-contact-form-data",function(t){var e=0;if(jQuery(".has-chaty-error").removeClass("has-chaty-error"),jQuery(".chaty-error-msg").remove(),jQuery(".chaty-ajax-error-message").remove(),jQuery(".chaty-ajax-success-message").remove(),jQuery(this).find(".is-required").each(function(){""==jQuery.trim(jQuery(this).val())&&(e++,jQuery(this).addClass("has-chaty-error"))}),0==e){var i=jQuery(this);jQuery(".chaty-contact-submit-btn").attr("disabled",!0),jQuery.ajax({url:chaty_settings.ajax_url,data:{action:"chaty_front_form_save_data",name:i.find(".chaty-field-name").length?i.find(".chaty-field-name").val():"",email:i.find(".chaty-field-email").length?i.find(".chaty-field-email").val():"",phone:i.find(".chaty-field-phone").length?i.find(".chaty-field-phone").val():"",message:i.find(".chaty-field-message").length?i.find(".chaty-field-message").val():"",nonce:i.find(".chaty-field-nonce").length?i.find(".chaty-field-nonce").val():"",channel:i.find(".chaty-field-channel").length?i.find(".chaty-field-channel").val():"",widget:i.find(".chaty-field-widget").length?i.find(".chaty-field-widget").val():"",ref_url:window.location.href},type:"post",async:!0,defer:!0,success:function(t){if(t=jQuery.parseJSON(t),jQuery(".chaty-ajax-error-message").remove(),jQuery(".chaty-ajax-success-message").remove(),jQuery(".chaty-contact-submit-btn").attr("disabled",!1),1==t.status)jQuery(".chaty-contact-footer").append("<div class='chaty-ajax-success-message'>"+t.message+"</div>"),jQuery(".chaty-field-name, .chaty-field-email, .chaty-field-message").val(""),"yes"==t.redirect_action&&("yes"==t.link_in_new_tab?window.open(t.redirect_link,"_blank"):window.location=t.redirect_link),"yes"==t.close_form_after&&setTimeout(function(){jQuery("#chaty-inline-popup").removeClass("active"),jQuery(".chaty-widget").removeClass("chaty-popup-open"),setTimeout(function(){jQuery(".chaty-widget.hide-block").removeClass("active")},250)},1e3*parseInt(t.close_form_after_seconds));else if(1==t.error){if(t.errors.length)for(var e=0;e<t.errors.length;e++)jQuery("."+t.errors[e].field).addClass("has-chaty-error"),jQuery("."+t.errors[e].field).after("<span class='chaty-error-msg'>"+t.errors[e].message+"</span>")}else jQuery(".chaty-contact-footer").append("<div class='chaty-ajax-error-message'>"+t.message+"</div>")}})}else jQuery(".has-chaty-error:first").focus();return!1})}(jQuery)},12:function(t,e){}});
|
1 |
+
function launch_chaty(){jQuery(".chaty-widget").hasClass("one_widget")||jQuery(".trigger-chaty-button").trigger("click")}function close_chaty(){jQuery("#chaty-inline-popup").hasClass("active")&&jQuery("#chaty-inline-popup .close-chaty-popup").trigger("click"),jQuery(".chaty-widget.chaty-widget-show").length&&jQuery(".chaty-widget.chaty-widget-show").each(function(){jQuery(this).find(".chaty-close-settings").length&&jQuery(this).find(".chaty-close-settings").trigger("click")})}!function(t){var e={};function i(s){if(e[s])return e[s].exports;var a=e[s]={i:s,l:!1,exports:{}};return t[s].call(a.exports,a,a.exports,i),a.l=!0,a.exports}i.m=t,i.c=e,i.d=function(t,e,s){i.o(t,e)||Object.defineProperty(t,e,{configurable:!1,enumerable:!0,get:s})},i.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return i.d(e,"a",e),e},i.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},i.p="/",i(i.s=10)}({10:function(t,e,i){i(11),t.exports=i(12)},11:function(t,e){!function(t){var e,i=0,s=".i-trigger .chaty-widget-i .svg, .i-trigger .chaty-widget-i .widget-img, .i-trigger .chaty-widget-i .facustom-icon",a=!1;function c(t){return r()&&"click"==chaty_settings.object_settings.click_setting?"none":""}(/(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)))&&(a=!0);new Date;function n(){jQuery(".chaty-widget").hasClass("one_widget")&&jQuery(".chaty-widget").removeClass("chaty-widget-show")}function o(t){var e="@-webkit-keyframes chaty-animation-shockwave { 0% { transform: scale(1); box-shadow: 0 0 2px rgba("+t+", 0.30), inset 0 0 1px rgba("+t+", 0.30); } 95% { box-shadow: 0 0 50px rgba("+t+", 0), inset 0 0 30px rgba("+t+", 0); } 100% { transform: scale(2.25); } } @keyframes chaty-animation-shockwave { 0% { transform: scale(1); box-shadow: 0 0 2px rgba("+t+", 0.30), inset 0 0 1px rgba("+t+", 0.30); } 95% { box-shadow: 0 0 50px rgba("+t+", 0), inset 0 0 30px rgba("+t+", 0); } 100% { transform: scale(2.25); } }";jQuery("#chaty-advance-css").length||jQuery("body").append("<div id='chaty-advance-css'></div>"),jQuery("#chaty-advance-css").append("<style>"+e+"</style>")}function r(){var t=g("cta");if(null!=t&&""!=t){t=new Date(t);var e=Math.abs(new Date-t);return Math.floor(e/6e4)<=10}return!1}function g(t){var e=u("chaty_settings"),i=[];if(null!=e&&""!=e&&(i=JSON.parse(e)),i.length>0)for(var s=0;s<i.length;s++)if(i[s].k==t)return i[s].v;return null}function l(t){var e=u("chaty_settings"),i=[];null!=e&&""!=e&&(i=JSON.parse(e));var s=!1;if(i.length>0)for(var a=0;a<i.length;a++)i[a].k==t&&(s=!0,i[a].v=new Date);s||i.push({k:t,v:new Date}),y("chaty_settings",e=JSON.stringify(i),"7")}function h(t){var e=g(t);if(null!=e&&""!=e){e=new Date(e);var i=Math.abs(new Date-e);return Math.floor(i/864e5)>=1}return!0}function d(){var t=u("chaty_settings"),e=[];null!=t&&""!=t&&(e=JSON.parse(t));var i=!1;if(e.length>0)for(var s=0;s<e.length;s++)"cta"==e[s].k&&(i=!0,e[s].v=new Date);i||e.push({k:"cta",v:new Date}),y("chaty_settings",t=JSON.stringify(e),"7")}function y(t,e,i){var s="";if(i){var a=new Date;a.setTime(a.getTime()+24*i*60*60*1e3),s="; expires="+a.toUTCString()}document.cookie=t+"="+(e||"")+s+"; path=/"}function u(t){for(var e=t+"=",i=document.cookie.split(";"),s=0;s<i.length;s++){for(var a=i[s];" "==a.charAt(0);)a=a.substring(1,a.length);if(0==a.indexOf(e))return a.substring(e.length,a.length)}return null}function w(){l("cta_widget_status"),i=1;var t=0;t=jQuery("body").hasClass("chaty-in-desktop")?jQuery(".chaty-widget-is .chaty-widget-i.is-in-desktop").length:jQuery(".chaty-widget-is .chaty-widget-i.is-in-mobile").length,h("chaty-animation")||(chaty_settings.object_settings.animation_class=""),""!=chaty_settings.object_settings.animation_class&&("sheen"!=chaty_settings.object_settings.animation_class?t>1?jQuery(s).addClass("chaty-animation-"+chaty_settings.object_settings.animation_class).addClass("start-now"):1==t&&(s=".chaty-main-widget .svg, .chaty-main-widget img, .chaty-main-widget .facustom-icon",jQuery(s).removeClass("chaty-animation-"+chaty_settings.object_settings.animation_class).removeClass("start-now"),jQuery(s).addClass("chaty-animation-"+chaty_settings.object_settings.animation_class).addClass("start-now")):(s=".i-trigger .chaty-widget-i .wrap-svg",jQuery(".i-trigger .chaty-widget-i .wrap-svg").length,jQuery(s).removeClass("chaty-animation-sheen").removeClass("start-now"),jQuery(s).addClass("chaty-animation-sheen").addClass("start-now"))),"open"==chaty_settings.object_settings.display_state&&("no"==chaty_settings.object_settings.has_close_button?t>1&&(p(),jQuery(".chaty-widget").find(".i-trigger-open").removeClass("active_clos"),jQuery(".chaty-widget").find(".i-trigger-open").trigger("click"),jQuery(".chaty-widget-is").addClass("has-no-close-btn"),jQuery(".i-trigger").remove()):t>1&&(p(),jQuery(".chaty-widget").find(".i-trigger-open").removeClass("active_clos"),jQuery(".chaty-widget").find(".i-trigger-open").trigger("click"))),jQuery(".chaty-widget").hasClass("one_widget")&&jQuery(".chaty-widget").removeClass("chaty-widget-show")}function p(){l("chaty-animation"),jQuery(".chaty-animation-"+chaty_settings.object_settings.animation_class).removeClass("chaty-animation-"+chaty_settings.object_settings.animation_class).removeClass("start-now"),jQuery(".start-now").removeClass("start-now"),chaty_settings.object_settings.animation_class=""}jQuery(document).ready(function(){a?jQuery("body").addClass("chaty-in-mobile"):jQuery("body").addClass("chaty-in-desktop"),c(),token="",jQuery(document).ready(function(){"true"==(e=chaty_settings).object_settings.active&&function(e,i){var s=e.object_settings.device,a="";if("right"==e.object_settings.position)a="left: auto;bottom: 25px; right: 25px;";else if("left"==e.object_settings.position)a="right: auto; bottom: 25px; left: 25px;";else if("custom"==e.object_settings.position){var n=e.object_settings.pos_side,o=e.object_settings.bot,r=e.object_settings.side;a="right"===n?"left: auto; bottom: "+o+"px; right: "+r+"px":"left: "+r+"px; bottom: "+o+"px; right: auto"}var g=e.object_settings.cta,l="",d=e.object_settings.social;if(Object.keys(d).length>=1&&(l='<div class="chaty-widget hide-widget '+i+" "+s+' " style="display:block; '+a+'" dir="ltr">',l+='<div class="chaty-widget-is" id="transition_disabled">'),l+=function(e){var i="",s=0;return t.each(e.object_settings.social,function(t,a){if(e.object_settings.isPRO&&jQuery("body").addClass("has-pro-version"),!e.object_settings.isPRO&&"3"==++s)return!1;extra_class="","1"!=e.object_settings.analytics&&1!=e.object_settings.analytics||(extra_class+=" update-analytics ");var c=1==e.object_settings.social[t].is_desktop?"is-in-desktop":"",n=1==e.object_settings.social[t].is_mobile?"is-in-mobile":"",o=1==e.object_settings.is_mobile?e.object_settings.social[t].mobile_target:e.object_settings.social[t].desktop_target;if(jQuery("body").hasClass("chaty-in-mobile")&&(e.object_settings.social[t].href_url=e.object_settings.social[t].mobile_url),"viber"==e.object_settings.social[t].social_channel){if(jQuery("body").hasClass("chaty-in-mobile")){var r=e.object_settings.social[t].href_url;isNaN(r)||(r=r.replace("+",""),navigator.userAgent.match(/(iPod|iPhone|iPad)/)&&(r="+"+r)),e.object_settings.social[t].href_url=r}e.object_settings.social[t].href_url="viber://chat?number="+e.object_settings.social[t].href_url}1==parseInt(e.object_settings.social[t].has_custom_popup)&&("whatsapp"==e.object_settings.social[t].channel_type?(e.object_settings.social[t].is_default_open&&h("cht_whatsapp_window")&&(extra_class+=" open-it-by-default"),o="",e.object_settings.social[t].mobile_target="",e.object_settings.social[t].desktop_target="",extra_class+=" has-custom-chaty-popup whatsapp-button"):"contact_us"==e.object_settings.social[t].channel_type&&(extra_class+=" has-custom-chaty-popup whatsapp-button"));var g="";""!=e.object_settings.social[t].on_click&&(g=' onclick="'+e.object_settings.social[t].on_click+'"'),socialString='<div data-popup="'+e.object_settings.social[t].popup_html+'" data-rgb="'+e.object_settings.social[t].rbg_color+'" class="chaty-widget-i chaty-main-widget '+c+" "+n+" "+extra_class+" channel-"+e.object_settings.social[t].social_channel+'" data-title="'+e.object_settings.social[t].val+'" id="chaty-channel-'+e.object_settings.social[t].social_channel+'" data-channel="'+e.object_settings.social[t].social_channel+'" data-code="'+e.object_settings.social[t].qr_code_image+'">',bgColor="",""!=e.object_settings.social[t].bg_color&&(socialString+="<style>#chaty-channel-"+e.object_settings.social[t].social_channel+" .color-element {fill: "+e.object_settings.social[t].bg_color+"; background: "+e.object_settings.social[t].bg_color+"}</style>",bgColor="style='background-color: "+e.object_settings.social[t].bg_color+";'"),socialString+="<a class='set-url-target' "+g+" rel='noopener' data-mobile-target='"+e.object_settings.social[t].mobile_target+"' data-desktop-target='"+e.object_settings.social[t].desktop_target+"' target='"+o+"' href='"+e.object_settings.social[t].href_url+"' >",socialString+="<span class='sr-only'>"+e.object_settings.social[t].title+"</span>",""!=e.object_settings.social[t].img_url?socialString+="<span "+bgColor+" class='chaty-social-img'><img src='"+e.object_settings.social[t].img_url+"' alt='"+e.object_settings.social[t].title+"' /></span>":socialString+=e.object_settings.social[t].default_icon,socialString+="</a>",socialString+="<div class='chaty-widget-i-title'><p>"+e.object_settings.social[t].title+"</p></div>",socialString+="</div>",i+=socialString}),i}(e),d=e.object_settings.social,Object.keys(d).length>=1){l+="</div>",l+='<div class="i-trigger">';var y=c(),u=current_url=window.location.origin;if(u=(u=u.replace("https://","")).replace("http://",""),""!=g&&"none"!=y);else"no-tooltip";"click"!=chaty_settings.object_settings.click_setting&&!0,l+='<div class="chaty-widget-i chaty-close-settings i-trigger-open '+!0+' ">',l+=function(t){switch(t.object_settings.widget_type){case"chat-image":if(t.object_settings.widget_img.length>1)return'<div class="widget-img" style="background-color:'+t.object_settings.color+'"><img src="'+t.object_settings.widget_img+'"/></div>';case"chat-smile":return'<svg version="1.1" id="smile" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" viewBox="-496.8 507.1 54 54" style="enable-background:new -496.8 507.1 54 54;" xml:space="preserve"><style type="text/css">.st1{fill:#FFFFFF;} .st2{fill:none;stroke:#808080;stroke-width:1.5;stroke-linecap:round;stroke-linejoin:round;}</style><g><circle cx="-469.8" cy="534.1" r="27" fill="'+t.object_settings.color+'"/></g><path class="st1" d="M-459.5,523.5H-482c-2.1,0-3.7,1.7-3.7,3.7v13.1c0,2.1,1.7,3.7,3.7,3.7h19.3l5.4,5.4c0.2,0.2,0.4,0.2,0.7,0.2c0.2,0,0.2,0,0.4,0c0.4-0.2,0.6-0.6,0.6-0.9v-21.5C-455.8,525.2-457.5,523.5-459.5,523.5z"/><path class="st2" d="M-476.5,537.3c2.5,1.1,8.5,2.1,13-2.7"/><path class="st2" d="M-460.8,534.5c-0.1-1.2-0.8-3.4-3.3-2.8"/></svg>';case"chat-bubble":return'<svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" viewBox="-496.9 507.1 54 54" style="enable-background:new -496.9 507.1 54 54;" xml:space="preserve"><style type="text/css">.st1{fill:#FFFFFF;}</style><g><circle cx="-469.9" cy="534.1" r="27" fill="'+t.object_settings.color+'"/></g><path class="st1" d="M-472.6,522.1h5.3c3,0,6,1.2,8.1,3.4c2.1,2.1,3.4,5.1,3.4,8.1c0,6-4.6,11-10.6,11.5v4.4c0,0.4-0.2,0.7-0.5,0.9 c-0.2,0-0.2,0-0.4,0c-0.2,0-0.5-0.2-0.7-0.4l-4.6-5c-3,0-6-1.2-8.1-3.4s-3.4-5.1-3.4-8.1C-484.1,527.2-478.9,522.1-472.6,522.1z M-462.9,535.3c1.1,0,1.8-0.7,1.8-1.8c0-1.1-0.7-1.8-1.8-1.8c-1.1,0-1.8,0.7-1.8,1.8C-464.6,534.6-463.9,535.3-462.9,535.3z M-469.9,535.3c1.1,0,1.8-0.7,1.8-1.8c0-1.1-0.7-1.8-1.8-1.8c-1.1,0-1.8,0.7-1.8,1.8C-471.7,534.6-471,535.3-469.9,535.3z M-477,535.3c1.1,0,1.8-0.7,1.8-1.8c0-1.1-0.7-1.8-1.8-1.8c-1.1,0-1.8,0.7-1.8,1.8C-478.8,534.6-478.1,535.3-477,535.3z"/></svg>';case"chat-db":return'<svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" viewBox="-496 507.1 54 54" style="enable-background:new -496 507.1 54 54;" xml:space="preserve"><style type="text/css">.st1{fill:#FFFFFF;}</style><g><circle cx="-469" cy="534.1" r="27" fill="'+t.object_settings.color+'"/></g><path class="st1" d="M-464.6,527.7h-15.6c-1.9,0-3.5,1.6-3.5,3.5v10.4c0,1.9,1.6,3.5,3.5,3.5h12.6l5,5c0.2,0.2,0.3,0.2,0.7,0.2c0.2,0,0.2,0,0.3,0c0.3-0.2,0.5-0.5,0.5-0.9v-18.2C-461.1,529.3-462.7,527.7-464.6,527.7z"/><path class="st1" d="M-459.4,522.5H-475c-1.9,0-3.5,1.6-3.5,3.5h13.9c2.9,0,5.2,2.3,5.2,5.2v11.6l1.9,1.9c0.2,0.2,0.3,0.2,0.7,0.2c0.2,0,0.2,0,0.3,0c0.3-0.2,0.5-0.5,0.5-0.9v-18C-455.9,524.1-457.5,522.5-459.4,522.5z"/></svg>';default:return'<svg version="1.1" id="ch" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" viewBox="-496 507.7 54 54" style="enable-background:new -496 507.7 54 54;" xml:space="preserve"><style type="text/css">.st1 {fill: #FFFFFF;}.st0{fill: #808080;}</style><g><circle cx="-469" cy="534.7" r="27" fill="'+t.object_settings.color+'"/></g><path class="st1" d="M-459.9,523.7h-20.3c-1.9,0-3.4,1.5-3.4,3.4v15.3c0,1.9,1.5,3.4,3.4,3.4h11.4l5.9,4.9c0.2,0.2,0.3,0.2,0.5,0.2 h0.3c0.3-0.2,0.5-0.5,0.5-0.8v-4.2h1.7c1.9,0,3.4-1.5,3.4-3.4v-15.3C-456.5,525.2-458,523.7-459.9,523.7z"/><path class="st0" d="M-477.7,530.5h11.9c0.5,0,0.8,0.4,0.8,0.8l0,0c0,0.5-0.4,0.8-0.8,0.8h-11.9c-0.5,0-0.8-0.4-0.8-0.8l0,0C-478.6,530.8-478.2,530.5-477.7,530.5z"/><path class="st0" d="M-477.7,533.5h7.9c0.5,0,0.8,0.4,0.8,0.8l0,0c0,0.5-0.4,0.8-0.8,0.8h-7.9c-0.5,0-0.8-0.4-0.8-0.8l0,0C-478.6,533.9-478.2,533.5-477.7,533.5z"/></svg>'}}(e),y=c(),""!=g&&"none"!=y&&(l+=' <div class="chaty-widget-i-title true"> ',l+=g,l+="</div>"),l+="</div>",l+='<div class="chaty-widget-i chaty-close-settings i-trigger-close" data-title="'+e.object_settings.close_text+'" style="background-color:'+e.object_settings.color+'">',""==e.object_settings.close_img?(l+='<svg viewBox="0 0 54 54" fill="none" xmlns="http://www.w3.org/2000/svg">',l+='<ellipse cx="26" cy="26" rx="26" ry="26" fill="'+e.object_settings.color+'"/>',l+='<rect width="27.1433" height="3.89857" rx="1.94928" transform="translate(18.35 15.6599) scale(0.998038 1.00196) rotate(45)" fill="white"/>',l+='<rect width="27.1433" height="3.89857" rx="1.94928" transform="translate(37.5056 18.422) scale(0.998038 1.00196) rotate(135)" fill="white"/>',l+="</svg>"):l+="<span class='chaty-social-img'><img alt='"+e.object_settings.close_text+"' src='"+e.object_settings.close_img+"' /></span>",l+='<div class="chaty-widget-i-title">',l+=e.object_settings.close_text,l+="</div>",l+="</div>",l+=" </div>",0===i.length&&!e.object_settings.isPRO&&(l+=""),l+="</div>"}t("body").append(l)}(e,token),function(){var i=t(".chaty-widget"),s=e.object_settings.widget_size?e.object_settings.widget_size:54,a=+e.object_settings.widget_size+8;function o(){i.position().top;var t=i.find(".chaty-widget-is .chaty-widget-i").length;if((t=jQuery("body").hasClass("chaty-in-desktop")?i.find(".chaty-widget-is .chaty-widget-i.is-in-desktop").length:i.find(".chaty-widget-is .chaty-widget-i.is-in-mobile").length)*a>jQuery(window).height()-(chaty_settings.object_settings.widget_size+8)){var e=Math.round(Math.sqrt(t)),s=Math.ceil(Math.sqrt(t));i.find(".chaty-widget-is").css({height:s*a,width:e*a}),g(s),i.find("span:not(.cht-pending-message)").css({height:s*a,width:e*a}),g(s),i.find("img").css({height:s*a,width:e*a}),g(s)}else g()}function r(){"left"===e.object_settings.position&&i.addClass("chaty-widget-is-right"),"custom"===e.object_settings.position&&"left"===e.object_settings.pos_side&&i.addClass("chaty-widget-is-right")}function g(t){var e;e=jQuery("body").hasClass("chaty-in-desktop")?i.find(".chaty-widget-is .chaty-widget-i.is-in-desktop").length:i.find(".chaty-widget-is .chaty-widget-i.is-in-mobile").length,i.find(".chaty-widget-i").css({height:s+"px",width:s+"px"}),i.find("img").css({height:s+"px",width:s+"px"}),i.find("span:not(.cht-pending-message)").css({height:s+"px",width:s+"px"}),i.find(".chaty-widget-is").css({top:"-"+100*e+"%"}),i.find(".chaty-widget-is").height(e*(parseInt(s)+8)),i.find(".chaty-widget-is").width(parseInt(s)+8),"horizontal"==chaty_settings.object_settings.mode?(i.find(".chaty-widget-is").css({top:"0"}),i.find(".chaty-widget-is").width(e*(parseInt(s)+8)),i.find(".chaty-widget-is").height(parseInt(s)+8)):(i.find(".chaty-widget-is").height(e*(parseInt(s)+8)),i.find(".chaty-widget-is").width(parseInt(s)+8))}jQuery(".open-it-by-default").length&&jQuery(".open-it-by-default").trigger("click"),r(),o(),jQuery(window).resize(function(){o(),1==Object.keys(e.object_settings.social).length&&(jQuery(".chaty-widget").addClass("chaty-widget-show"),jQuery(".chaty-widget-is").css("top","auto")),jQuery(".chaty-widget").hasClass("one_widget")&&jQuery(".chaty-widget").removeClass("chaty-widget-show")}),t(".chaty-widget-i.facebook").mouseenter(function(){t(".facebook_two_mess").css({opacity:"1","z-index":"1"}),t(this).addClass("before")}),t(".chaty-widget-i.facebook").mouseleave(function(){t(".facebook_two_mess").css({opacity:"0","z-index":"1"}),t(this).removeClass("before")}),t(".chaty-widget-i.facebook").on("click",function(){t(this).addClass("active"),t(".facebook_two_mess").hide(),jQuery(".chaty-widget .get a").hide(),t(this).children(".face_title").css({opacity:"1","z-index":"2"}).show(),t(".chaty-widget").hasClass("one_widget")?t(".chaty-widget").hasClass("chaty-widget-is-right")?t(".face_title").css({top:"calc(100% - 447px)",left:"20px"}):t(".face_title").css({top:"calc(100% - 447px)",left:"auto",right:"20px"}):(t(".facebook_two_mess").css({opacity:"0","z-index":"10001"}),t(".ico_d").hide(),t(".chaty-widget .chaty-widget-i").css({"box-shadow":"0px 3px 6px rgba(0,0,0,0)"}),t(".chaty-widget").hasClass("one_widget")||t(".i-trigger").hide())}),t(".i-trigger-close").on("click",function(e){e.preventDefault(),t(".chaty-widget-i.facebook").hasClass("active")||(i.removeClass("chaty-widget-show"),i.addClass("none-widget-show"))}),t("body").on("click",".close_facebook",function(){t(".facebook_two_mess").show(),jQuery(".chaty-widget .get a").show(),t(".chaty-widget-i.facebook").removeClass("active"),t(this).parent().parent().css({opacity:"1"}).hide(),t(".i-trigger").show(),t(".chaty-widget-is .chaty-widget-i svg").show()}),t(".i-trigger-close").on("click",function(e){t(".i-trigger-open").addClass("active_clos"),e.preventDefault(),t(".chaty-widget-i.facebook").hasClass("active")||(i.removeClass("chaty-widget-show"),i.addClass("none-widget-show"))}),t("body").on("click",".update-analytics",function(t){if(channelName=jQuery(this).attr("data-channel"),null!=channelName&&""!=channelName)if(window.hasOwnProperty("gtag"))gtag("event","chaty_"+channelName,{eventCategory:"chaty_"+channelName,event_action:"chaty_"+channelName});else if(window.hasOwnProperty("ga")){var e=window.ga.getAll()[0];e&&e.send("event","click",{eventCategory:"chaty_"+channelName,eventAction:"chaty_"+channelName})}}),t("body").on("click",".wechat",function(){var t=jQuery(".chaty-widget .chaty-widget-i.wechat").attr("data-code");null!=t&&""!=t&&(jQuery("#wechat-qr-code").length||(htmlString="<div id='wechat-qr-code' class='wechat-qr-code'>",htmlString+='<div class="wechat-box-head">WeChat<svg xmlns="http://www.w3.org/2000/svg" class="close_facebook" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" id="Capa_1" x="0px" y="0px" width="612px" height="612px" viewBox="0 0 612 612" style="fill: #fff; float: right; margin-top: 4px;" xml:space="preserve"><path xmlns="http://www.w3.org/2000/svg" d="M268.064,256.75l138.593-138.593c3.124-3.124,3.124-8.189,0-11.313c-3.125-3.124-8.189-3.124-11.314,0L256.75,245.436 L118.157,106.843c-3.124-3.124-8.189-3.124-11.313,0c-3.125,3.124-3.125,8.189,0,11.313L245.436,256.75L106.843,395.343 c-3.125,3.125-3.125,8.189,0,11.314c1.562,1.562,3.609,2.343,5.657,2.343s4.095-0.781,5.657-2.343L256.75,268.064l138.593,138.593 c1.563,1.562,3.609,2.343,5.657,2.343s4.095-0.781,5.657-2.343c3.124-3.125,3.124-8.189,0-11.314L268.064,256.75z"></path></svg></div>',htmlString+="<div class='wechat-box'><img src='"+t+"' alt='QR Code' /><a href='javascript:;'>",htmlString+="</a></div></div>",jQuery("body").append(htmlString)),jQuery("#wechat-qr-code").show())});var l=c();"hover"==chaty_settings.object_settings.display_state?i.find(".i-trigger-open").mouseenter(function(e){e.stopPropagation(),n(),t(".chaty-widget-is").removeAttr("id"),t(this).hasClass("active_clos")||t(".chaty-widget-i.facebook").hasClass("active")||i.hasClass("one_widget")||(r(),t(i).hasClass("chaty-widget-show")||(i.addClass("chaty-widget-show"),i.removeClass("none-widget-show"))),jQuery(".chaty-widget").hasClass("one_widget")&&jQuery(".chaty-widget").removeClass("chaty-widget-show"),"click"==chaty_settings.object_settings.click_setting&&(jQuery(".i-trigger").hasClass("one-widget")||(jQuery(this).closest(".chaty-widget-i").addClass("hide-chaty-arrow"),jQuery("body .chaty-widget-i-title.true").remove()))}):i.find(".i-trigger-open").click(function(e){e.stopPropagation(),p(),n(),t(".chaty-widget-is").removeAttr("id"),t(this).hasClass("active_clos")||t(".chaty-widget-i.facebook").hasClass("active")||i.hasClass("one_widget")||(r(),t(i).hasClass("chaty-widget-show")||(i.addClass("chaty-widget-show"),i.removeClass("none-widget-show"))),n(),"click"==chaty_settings.object_settings.click_setting&&(jQuery(".i-trigger").hasClass("one-widget")||(jQuery(this).closest(".chaty-widget-i").addClass("hide-chaty-arrow"),jQuery("body .chaty-widget-i-title.true").remove())),jQuery(".cht-pending-message").remove()}),t(".one_widget").on("click",function(){p(),jQuery(".cht-pending-message").remove()}),i.find(".i-trigger-open").on("click",function(){jQuery(".cht-pending-message").remove(),"none"!=l&&(t(".chaty-widget").hasClass(".one_widget")||t(".i-trigger-open .chaty-widget-i-title1").detach()),"click"==chaty_settings.object_settings.click_setting&&t(".i-trigger-open").addClass("no-tooltip"),t(this).hasClass("active_clos")||t(".chaty-widget-i.facebook").hasClass("active")||i.hasClass("one_widget")||(r(),t(i).hasClass("chaty-widget-show")||(i.addClass("chaty-widget-show"),i.removeClass("none-widget-show"))),p()}),i.find(".i-trigger-open").mouseenter(function(){"click"==chaty_settings.object_settings.click_setting&&t(this).addClass("no-tooltip"),t(".i-trigger-open").removeClass("active_clos"),o()}),i.find(".chaty-widget-is").mouseleave(function(){t(".i-trigger-open").removeClass("active_clos"),t(".chaty-widget-i.facebook").hasClass("active")}),1===Object.keys(e.object_settings.social).length&&i.find(".i-trigger-open").on("touchstart",function(e){"use strict";t(this).find(".chaty-widget-i").toggleClass("hover")}),1==Object.keys(e.object_settings.social).length&&(jQuery(".chaty-widget").addClass("chaty-widget-show"),jQuery(".chaty-widget-is").css("top","auto"),jQuery(".chaty-widget-is").css("z-index","10001"),jQuery(".chaty-widget-i.i-trigger-close, .i-trigger.chaty-widget-i").remove(),jQuery(".chaty-widget .get a").css("top","-10px"),jQuery(".chaty-widget").addClass("one_widget"),jQuery(document).on("click",".chaty-widget-i",function(){jQuery(".i-trigger").hasClass("one-widget")||(jQuery(".chaty-widget-i:first .chaty-widget-i-title:last").hide(),jQuery("body").addClass("hide-cht-widget"))}),jQuery("body").append("<style>.chaty-widget-is{top:0!important;}</style>"))}(),t(document).ready(function(){1!==Object.keys(e.object_settings.social).length||!e.object_settings.social.snapchat&&!e.object_settings.social.wechat||e.object_settings.cta||(t(".chaty-widget-i-1title").detach(),t(".chaty-widget-i").addClass("bofore_del")),t(".chaty-widget-i-title").hasClass("one_go")&&(t(".chaty-widget-i-title p").html(t(".chaty-widget-i-title.one_go").html()),"none"==c()&&(t(".chaty-widget-i-title").hasClass("face_title")?(t(".facebook_two_mess").detach(),t(".chaty-widget-i").addClass("bofore_del")):(t(".chaty-widget-i-title11").detach(),t(".chaty-widget-i").addClass("bofore_del")))),window.matchMedia("only screen and (max-width: 760px)").matches&&t(".i-trigger-open").addClass("active_clos"),jQuery(".chaty-widget-i-title").each(function(){""==jQuery(this).text()&&jQuery(this).remove()})}),t(document).ready(function(){var s=0;0==(s=jQuery("body").hasClass("chaty-in-desktop")?jQuery(".chaty-widget-is .chaty-widget-i.is-in-desktop").length:jQuery(".chaty-widget-is .chaty-widget-i.is-in-mobile").length)?jQuery(".chaty-widget").addClass("hide-widget").removeClass("desktop_active").removeClass("mobile_active"):(jQuery("body").hasClass("chaty-in-desktop")?jQuery(".chaty-widget").removeClass("hide-widget").addClass("desktop_active"):jQuery(".chaty-widget").removeClass("hide-widget").addClass("mobile_active"),1==s?(jQuery(".chaty-close-settings").hide(),jQuery("body").hasClass("chaty-in-desktop")?(htmlToAdd=jQuery(".chaty-widget-is .chaty-widget-i.is-in-desktop:first").clone(),jQuery(".i-trigger").html(htmlToAdd)):(htmlToAdd=jQuery(".chaty-widget-is .chaty-widget-i.is-in-mobile:first").clone(),jQuery(".i-trigger").html(htmlToAdd)),r()?"all_time"!=chaty_settings.object_settings.click_setting?(jQuery(".i-trigger").addClass("show-channel"),jQuery(".i-trigger").attr("data-title",jQuery(".chaty-widget-is .chaty-widget-i-title p").html())):jQuery(".i-trigger .chaty-widget-i-title p").html(chaty_settings.object_settings.cta):"all_time"!=chaty_settings.object_settings.click_setting&&(jQuery(".i-trigger").attr("data-title",jQuery(".chaty-widget-is .chaty-widget-i-title p").html()),jQuery(".i-trigger .chaty-widget-i-title p").html(chaty_settings.object_settings.cta)),jQuery(".chaty-widget").addClass("one_widget"),jQuery(".chaty-widget.one_widget, .i-trigger, .chaty-widget-i").mouseenter(function(){n(),"click"==chaty_settings.object_settings.click_setting&&(jQuery(".i-trigger").hasClass("one-widget")||(jQuery(".chaty-widget-i-title").remove(),jQuery(".chaty-widget").addClass("hide-tooltip-arrow")),jQuery(".chaty-widget").removeClass("chaty-widget-show")),jQuery(".i-trigger").hasClass("one-widget")||d()}),jQuery(".chaty-widget").removeClass("chaty-widget-show"),jQuery(".i-trigger").addClass("one-widget"),r(),o(jQuery(".i-trigger .chaty-widget-i:first").data("rgb"))):(jQuery(".chaty-widget").removeClass("one_widget"),"click"==chaty_settings.object_settings.click_setting&&jQuery(".i-trigger .chaty-main-widget").remove(),jQuery(".chaty-close-settings").show(),jQuery(".chaty-widget-i-title").removeClass("hide-it"),jQuery(".chaty-widget.one_widget, .i-trigger, .chaty-widget-i").mouseenter(function(){n(),jQuery(".i-trigger").hasClass("one-widget")||(d(),jQuery(".i-trigger").hasClass("one-widget")||jQuery(".i-trigger .chaty-widget-i-title").addClass("hide-it")),p()}),"open"==chaty_settings.object_settings.display_state&&t(".i-trigger-open").addClass("no-tooltip"),o(chaty_settings.object_settings.rgb_color))),jQuery(document).on("click",".i-trigger.one-widget",function(){d()});var a,g,l,_=0;if(1==parseInt(chaty_settings.object_settings.display_conditions)){var j=chaty_settings.object_settings.display_rules;if(j.length>0){var m=new Date;m.setHours(m.getHours()+chaty_settings.object_settings.gmt);for(var b=m.getUTCHours(),f=m.getUTCMinutes(),v=m.getUTCDay(),Q=0;Q<j.length;Q++){var C=0,k=0;-1==j[Q].days?k=1:j[Q].days>=0&&j[Q].days<=6?j[Q].days==v&&(k=1):7==j[Q].days?v>=0&&v<=4&&(k=1):8==j[Q].days?v>=1&&v<=5&&(k=1):9==j[Q].days&&(5!=v&&6!=v||(k=1)),1==k&&(b>j[Q].start_hours&&b<j[Q].end_hours?C=1:b==j[Q].start_hours&&b<j[Q].end_hours?f>=j[Q].start_min&&(C=1):b>j[Q].start_hours&&b==j[Q].end_hours?f<=j[Q].end_min&&(C=1):b==j[Q].start_hours&&b==j[Q].end_hours&&f>=j[Q].start_min&&f<=j[Q].end_min&&(C=1),1==C&&f>=j[Q].start_min&&f<=j[Q].end_min&&1),1==C&&1==k&&(_=1),1==_&&(Q=j.length+1)}}else _=1}else _=1;if(1==s&&(""!=c()&&("click"==chaty_settings.object_settings.click_setting&&(jQuery(".i-trigger").hasClass("one-widget")||(jQuery(".chaty-widget-i-title").remove(),jQuery(".chaty-widget").addClass("hide-tooltip-arrow"))),setInterval(function(){},1e4)),jQuery(".chaty-main-widget").addClass("i-trigger-open").addClass("single-button"),jQuery(".chaty-widget-show .i-trigger-open svg").css("transform","rotate(0deg)"),jQuery(".chaty-widget").removeClass("chaty-widget-show")),""!=chaty_settings.object_settings.animation_class&&("sheen"!=chaty_settings.object_settings.animation_class?jQuery(".i-trigger .chaty-widget-i svg").wrap(function(){return"<div class='svg'></div>"}):jQuery(".i-trigger .chaty-widget-i .wrap-svg").length||jQuery(".i-trigger .chaty-widget-i svg").wrap(function(){return"<div class='wrap-svg'></div>"})),r()||("on"==chaty_settings.object_settings.pending_messages&&("sheen"!=chaty_settings.object_settings.animation_class?jQuery(".i-trigger .i-trigger-open .svg, .i-trigger .i-trigger-open.single-button .svg").length?jQuery(".i-trigger .i-trigger-open .svg, .i-trigger .i-trigger-open.single-button .svg").append("<span class='cht-pending-message'>"+chaty_settings.object_settings.number_of_messages+"</span>"):jQuery(".i-trigger .i-trigger-open.single-button svg").length?jQuery(".i-trigger .i-trigger-open.single-button svg").after("<span class='cht-pending-message'>"+chaty_settings.object_settings.number_of_messages+"</span>"):jQuery(".i-trigger .i-trigger-open, .i-trigger .i-trigger-open.single-button svg").after("<span class='cht-pending-message'>"+chaty_settings.object_settings.number_of_messages+"</span>"):jQuery(".i-trigger .i-trigger-open, .i-trigger .i-trigger-open.single-button").after("<span class='cht-pending-message'>"+chaty_settings.object_settings.number_of_messages+"</span>"),jQuery(".cht-pending-message").css("color",chaty_settings.object_settings.number_color),jQuery(".cht-pending-message").css("background",chaty_settings.object_settings.number_bg_color)),jQuery(document).on("click",".i-trigger .i-trigger-open, .i-trigger.one-widget",function(){if(jQuery(".cht-pending-message").remove(),"all_time"!=chaty_settings.object_settings.click_setting&&jQuery(this).hasClass("one-widget")){jQuery(this).addClass("show-channel");var t=jQuery(this).data("title");jQuery(this).find(".chaty-widget-i-title").find("p").html(t)}})),jQuery(document).on("click",".i-trigger.one-widget",function(){if("all_time"!=chaty_settings.object_settings.click_setting&&jQuery(this).hasClass("one-widget")){jQuery(this).addClass("show-channel");var t=jQuery(this).data("title");jQuery(this).find(".chaty-widget-i-title").find("p").html(t)}}),jQuery("chaty-main-widget").mouseenter(function(){jQuery(".i-trigger").hasClass("one-widget")||d()}),1==_)if(h("cta_widget_status"))if("no"==chaty_settings.object_settings.time_trigger&&"no"==chaty_settings.object_settings.exit_intent&&"no"==chaty_settings.object_settings.on_page_scroll)jQuery(".chaty-widget").removeClass("hide-widget"),"open"==chaty_settings.object_settings.display_state&&"no"==chaty_settings.object_settings.has_close_button?chaty_settings.object_settings.has_close_button="no":(chaty_settings.object_settings.display_state="hover",chaty_settings.object_settings.has_close_button="yes"),w();else{if(jQuery(".chaty-widget").addClass("hide-widget"),"yes"==chaty_settings.object_settings.time_trigger&&setTimeout(function(){i||(jQuery(".chaty-widget").removeClass("hide-widget"),w())},1e3*parseInt(chaty_settings.object_settings.trigger_time)),"yes"==chaty_settings.object_settings.exit_intent){a=document,g="mouseout",l=function(t){null==t.toElement&&null==t.relatedTarget&&null==u("cta_exit_intent_shown")&&(y("cta_exit_intent_shown","yes",1),i=!0,jQuery(".chaty-widget").removeClass("hide-widget"),jQuery(".chaty-widget").addClass("chaty-animation-widget"),jQuery(".chaty-animation-widget").append("<div class='chaty-nav'></div>"),"open"==chaty_settings.object_settings.display_state&&"no"==chaty_settings.object_settings.has_close_button?chaty_settings.object_settings.has_close_button="no":(chaty_settings.object_settings.display_state="open",chaty_settings.object_settings.has_close_button="yes"),w(),"left"==chaty_settings.object_settings.position?jQuery(".chaty-widget").addClass("left-position"):"right"==chaty_settings.object_settings.position?jQuery(".chaty-widget").addClass("right-position"):"custom"==chaty_settings.object_settings.position&&("left"==e.object_settings.pos_side?jQuery(".chaty-widget").addClass("left-position"):jQuery(".chaty-widget").addClass("right-position")),p(),setTimeout(function(){jQuery(".chaty-animation-widget").addClass("active")},100),setTimeout(function(){jQuery(".chaty-nav").remove()},2500))},a.addEventListener?a.addEventListener(g,l,!1):a.attachEvent&&a.attachEvent("on"+g,l)}"yes"==chaty_settings.object_settings.on_page_scroll&&parseInt(chaty_settings.object_settings.page_scroll)>0&&jQuery(window).scroll(function(){if(!i){var t=jQuery(document).height()-jQuery(window).height(),e=jQuery(window).scrollTop();0!=e&&e/t*100>=parseInt(chaty_settings.object_settings.page_scroll)&&(jQuery(".chaty-widget").removeClass("hide-widget"),w())}})}else jQuery(".chaty-widget").removeClass("hide-widget"),w();else jQuery(".chaty-widget").addClass("hide-widget");jQuery(".chaty-widget-i-title").length&&jQuery(".chaty-widget-i-title").each(function(){""==jQuery.trim(jQuery(this).text())&&(jQuery(this).closest(".chaty-widget-i").addClass("hide-chaty-arrow"),jQuery(this).remove())}),jQuery(".chaty-widget-i.true.chaty-widget-i-title").length||""==jQuery(".chaty-widget-i-title").text()&&jQuery(".chaty-widget-i").addClass("hide-chaty-arrow")}),jQuery(".chaty-widget-i-title").each(function(){""==jQuery(this).text()&&(jQuery(this).closest(".chaty-widget-i").addClass("hide-chaty-arrow"),jQuery(this).remove())}),jQuery(".chaty-widget").hasClass("one_widget")||jQuery("body").append("<div class='trigger-chaty-button'></div>"),jQuery("body").addClass(chaty_settings.object_settings.mode+"-cht-menu"),jQuery("body").addClass(chaty_settings.object_settings.position+"-cht-position")})}),jQuery(document).on("click",".trigger-chaty-button",function(){jQuery(".chaty-widget").removeClass("hide-widget"),w(),!jQuery(".chaty-widget").hasClass("none-widget-show")&&jQuery(".chaty-widget").hasClass("chaty-widget-show")||jQuery(".i-trigger-open").trigger("click")}),jQuery(document).on("click",".has-custom-chaty-popup.whatsapp-button",function(t){if(jQuery("#chaty-inline-popup").length){var e=jQuery(this).data("data-index");jQuery("#chaty-widget-"+e).removeClass("chaty-popup-open"),jQuery(".chaty-popup-open").removeClass("chaty-popup-open"),jQuery(".chaty-widget.hide-block").removeClass("active")}if(jQuery(this).hasClass("open-it-by-default")&&t.preventDefault(),jQuery("#chaty-inline-popup").remove(),null!=jQuery(this).attr("data-popup")&&""!=jQuery(this).attr("data-popup")){e="";jQuery(".chaty-widget").addClass("hide-block"),jQuery(".chaty-widget").addClass("chaty-popup-open");var i="<div data-index='"+e+"' id='chaty-inline-popup' class='chaty-inline-popup chaty-popup-form "+jQuery(this).data("channel")+"-channel'>";i+=jQuery(this).attr("data-popup"),jQuery("body").append(i),jQuery(".chaty-inline-popup .default-value").length&&(thisHref=jQuery(".chaty-inline-popup .default-value").text(),thisHref=decodeURI(thisHref),thisHref=thisHref.replace(/{title}/g,jQuery("title").text()),thisHref=thisHref.replace(/{url}/g,window.location.href),jQuery(".chaty-whatsapp-msg").val(jQuery(".chaty-inline-popup .default-value").text()),jQuery(".chaty-whatsapp-phone").val(jQuery(".chaty-inline-popup .default-msg-phone").text()),chatyHtml=jQuery(".chaty-inline-popup .default-msg-value").html(),chatyHtml=chatyHtml.replace(/{title}/g,jQuery("title").text()),chatyHtml=chatyHtml.replace(/{url}/g,window.location.href),jQuery(".chaty-whatsapp-message").html(chatyHtml)),jQuery(".chaty-widget").addClass("active"),setTimeout(function(){jQuery("#chaty-inline-popup").addClass("active")},150),jQuery("body").hasClass("chaty-in-mobile")||jQuery(".chaty-whatsapp-msg").focus()}a&&jQuery(".whatsapp-chaty-form").prop("target","")}),jQuery(document).on("click",".close-chaty-popup, .close-chaty-box",function(){jQuery(this).hasClass("is-whatsapp-btn")&&l("cht_whatsapp_window"),jQuery("#chaty-inline-popup").removeClass("active"),jQuery(".chaty-widget").removeClass("chaty-popup-open"),setTimeout(function(){jQuery(".chaty-widget.hide-block").removeClass("active")},250)}),jQuery(document).on("submit",".whatsapp-chaty-form",function(t){if(l("cht_whatsapp_window"),jQuery("#chaty-inline-popup").removeClass("active"),jQuery(".chaty-widget").removeClass("chaty-popup-open"),setTimeout(function(){jQuery(".chaty-widget.hide-block").removeClass("active")},250),jQuery("body").hasClass("chaty-in-mobile"))return t.preventDefault(),window.location="https://wa.me/"+jQuery(this).find(".chaty-whatsapp-phone").val()+"?text="+jQuery(this).find(".chaty-whatsapp-msg").val(),!1}),jQuery(document).on("submit",".chaty-contact-form-data",function(t){var e=0;if(jQuery(".has-chaty-error").removeClass("has-chaty-error"),jQuery(".chaty-error-msg").remove(),jQuery(".chaty-ajax-error-message").remove(),jQuery(".chaty-ajax-success-message").remove(),jQuery(this).find(".is-required").each(function(){""==jQuery.trim(jQuery(this).val())&&(e++,jQuery(this).addClass("has-chaty-error"))}),0==e){var i=jQuery(this);jQuery(".chaty-contact-submit-btn").attr("disabled",!0),jQuery.ajax({url:chaty_settings.ajax_url,data:{action:"chaty_front_form_save_data",name:i.find(".chaty-field-name").length?i.find(".chaty-field-name").val():"",email:i.find(".chaty-field-email").length?i.find(".chaty-field-email").val():"",phone:i.find(".chaty-field-phone").length?i.find(".chaty-field-phone").val():"",message:i.find(".chaty-field-message").length?i.find(".chaty-field-message").val():"",nonce:i.find(".chaty-field-nonce").length?i.find(".chaty-field-nonce").val():"",channel:i.find(".chaty-field-channel").length?i.find(".chaty-field-channel").val():"",widget:i.find(".chaty-field-widget").length?i.find(".chaty-field-widget").val():"",ref_url:window.location.href},type:"post",async:!0,defer:!0,success:function(t){if(t=jQuery.parseJSON(t),jQuery(".chaty-ajax-error-message").remove(),jQuery(".chaty-ajax-success-message").remove(),jQuery(".chaty-contact-submit-btn").attr("disabled",!1),1==t.status)jQuery(".chaty-contact-footer").append("<div class='chaty-ajax-success-message'>"+t.message+"</div>"),jQuery(".chaty-field-name, .chaty-field-email, .chaty-field-message").val(""),"yes"==t.redirect_action&&("yes"==t.link_in_new_tab?window.open(t.redirect_link,"_blank"):window.location=t.redirect_link),"yes"==t.close_form_after&&setTimeout(function(){jQuery("#chaty-inline-popup").removeClass("active"),jQuery(".chaty-widget").removeClass("chaty-popup-open"),setTimeout(function(){jQuery(".chaty-widget.hide-block").removeClass("active")},250)},1e3*parseInt(t.close_form_after_seconds));else if(1==t.error){if(t.errors.length)for(var e=0;e<t.errors.length;e++)jQuery("."+t.errors[e].field).addClass("has-chaty-error"),jQuery("."+t.errors[e].field).after("<span class='chaty-error-msg'>"+t.errors[e].message+"</span>")}else jQuery(".chaty-contact-footer").append("<div class='chaty-ajax-error-message'>"+t.message+"</div>")}})}else jQuery(".has-chaty-error:first").focus();return!1})}(jQuery)},12:function(t,e){}});
|
readme.txt
CHANGED
@@ -3,7 +3,7 @@ Contributors: galdub, tomeraharon, premio
|
|
3 |
Tags: whatsapp, whatsapp chat, facebook messenger, click to chat, chat, chat button, call now button, messenger, whatsapp button, chat icon, contact button, click to call
|
4 |
Requires at least: 3.1
|
5 |
Tested up to: 5.7
|
6 |
-
Stable tag: 2.7.
|
7 |
Plugin URI: https://premio.io/downloads/chaty/
|
8 |
|
9 |
Whatsapp, Facebook Messenger, Telegram, TikTok Viber, Email, Phone call, SMS and more with customizable chat & call buttons. Chat with your visitors on WhatsApp, Facebook Messenger, and other chat channels!
|
@@ -258,6 +258,9 @@ Yes! You can even decide what chat buttons will show up on each device (desktop/
|
|
258 |
|
259 |
== Changelog ==
|
260 |
|
|
|
|
|
|
|
261 |
= 2.7.7 =
|
262 |
Added TikTok to the buttons list, added some slight improvements to the product flow, and fixed some bugs
|
263 |
|
3 |
Tags: whatsapp, whatsapp chat, facebook messenger, click to chat, chat, chat button, call now button, messenger, whatsapp button, chat icon, contact button, click to call
|
4 |
Requires at least: 3.1
|
5 |
Tested up to: 5.7
|
6 |
+
Stable tag: 2.7.8
|
7 |
Plugin URI: https://premio.io/downloads/chaty/
|
8 |
|
9 |
Whatsapp, Facebook Messenger, Telegram, TikTok Viber, Email, Phone call, SMS and more with customizable chat & call buttons. Chat with your visitors on WhatsApp, Facebook Messenger, and other chat channels!
|
258 |
|
259 |
== Changelog ==
|
260 |
|
261 |
+
= 2.7.8 =
|
262 |
+
Preview bugs fixed
|
263 |
+
|
264 |
= 2.7.7 =
|
265 |
Added TikTok to the buttons list, added some slight improvements to the product flow, and fixed some bugs
|
266 |
|
views/admin/admin.php
CHANGED
@@ -64,8 +64,3 @@ $pro_class = (!$is_pro && $cht_license_key !== "")?"none_pro":"";
|
|
64 |
<?php require_once 'help.php'; ?>
|
65 |
</div>
|
66 |
<?php require_once 'popup.php'; ?>
|
67 |
-
<div class="toast-message" style="display: none">
|
68 |
-
<div class="toast-close-btn"><a href="javascript:;"></a></div>
|
69 |
-
<div class="toast-message-title">Settings Updated</div>
|
70 |
-
<div class="toast-message-body">Your settings has been saved</div>
|
71 |
-
</div>
|
64 |
<?php require_once 'help.php'; ?>
|
65 |
</div>
|
66 |
<?php require_once 'popup.php'; ?>
|
|
|
|
|
|
|
|
|
|