HEX
Server: LiteSpeed
System: Linux server902.web-hosting.com 4.18.0-553.54.1.lve.el8.x86_64 #1 SMP Wed Jun 4 13:01:13 UTC 2025 x86_64
User: deshuvsd (2181)
PHP: 8.1.33
Disabled: NONE
Upload Files
File: /home/deshuvsd/www/wp-content/plugins/ultimate-elementor/assets/min-js/uael-modal-popup.min.js
!function(e){function a(){var e=document.createElement("iframe"),a=(this.dataset.src,"");a=this.dataset.sourcelink,e.setAttribute("src",a),e.setAttribute("frameborder","0"),e.setAttribute("allowfullscreen","1"),this.parentNode.replaceChild(e,this)}UAELModalPopup={_center:function(){setTimeout(function(){e(".uael-modal-parent-wrapper").each(function(){var a=e(this).attr("id").replace("-overlay","");UAELModalPopup._centerModal(a)})},300)},_centerModal:function(a){var o=e(".uamodal-"+a),t=e("#modal-"+a),l=0,n=t.find(".uael-modal-close"),r=(e(window).height()-t.outerHeight())/2;if(t.hasClass("uael-center-modal")&&t.removeClass("uael-center-modal"),(n.hasClass("uael-close-custom-popup-top-right")||n.hasClass("uael-close-custom-popup-top-left"))&&(l=parseInt(n.outerHeight())),o.find(".uael-content").outerHeight()>e(window).height()){if(r=20+l,t.hasClass("uael-show")){e("html").addClass("uael-html-modal"),t.addClass("uael-modal-scroll");var i=e("#wpadminbar");i.length>0&&(r+=parseInt(i.outerHeight()));var s=t.find(".uael-content");s.css("margin-top",+r+"px"),s.css("margin-bottom","20px")}}else r=parseInt(r)+20;t.css("top",+r+"px"),t.css("margin-bottom","20px")},_show:function(a){e(window).trigger("uael_before_modal_popup_open",[a]),UAELModalPopup._autoPlay(a);var o=e("#modal-"+a);o.hasClass("uael-modal-vimeo")||o.hasClass("uael-modal-youtube")?setTimeout(function(){o.addClass("uael-show")},300):o.addClass("uael-show"),setTimeout(function(){o.removeClass("uael-effect-13")},1e3),UAELModalPopup._centerModal(a),UAELModalPopup._afterOpen(a)},_close:function(a){var o=e("#modal-"+a);o.removeClass("uael-show"),e("html").removeClass("uael-html-modal"),o.removeClass("uael-modal-scroll"),UAELModalPopup._stopVideo(a),"closed"===e(".uamodal-"+a).data("cookies-type")&&UAELModalPopup._setPopupCookie(a)},_canShow:function(a){var o=e(".uamodal-"+a).data("cookies"),t=Cookies.get("uael-modal-popup-"+a),l=!0,n=[];void 0!==o&&"yes"===o&&void 0!==t&&"true"==t?(l=!1,n.push("Cookie already set")):Cookies.remove("uael-modal-popup-"+a);var r=e(".uamodal-"+a),i=r.data("page-views-enabled"),s=parseInt(r.data("page-views-count")||"3");r.data("page-views-scope");"yes"===i&&(UAELModalPopup._checkPageViewCondition(a,s)||(l=!1,n.push("Page views threshold not met")));var d=r.data("sessions-enabled"),u=parseInt(r.data("sessions-count")||"2");return"yes"===d&&(UAELModalPopup._checkSessionCondition(a,u)||(l=!1,n.push("Sessions threshold not met"))),e(".uael-show").length>0&&(l=!1,n.push("Another modal is already open")),e("#modal-"+a).hasClass("uael-modal-editor")&&(l=!1,n.push("Editor preview mode")),l},_autoPlay:function(a){var o=e(".uamodal-"+a),t=o.data("autoplay"),l=o.data("content"),n=e("#modal-"+a);if("yes"==t&&("youtube"==l||"vimeo"==l)){var r=n.find(".uael-video-player").data("id");if(0==n.find(".uael-video-player iframe").length)n.find(".uael-video-player div[data-id="+r+"]").trigger("click");else{var i=o.find("iframe"),s=i.attr("src")+"&autoplay=1";i.attr("src",s)}}if("iframe"==l&&0==o.find(".uael-modal-content-data iframe").length){var d=o.find(".uael-modal-content-type-iframe").data("src"),u=document.createElement("iframe");u.setAttribute("src",d),u.setAttribute("style","display:none;"),u.setAttribute("frameborder","0"),u.setAttribute("allowfullscreen","1"),u.setAttribute("width","100%"),u.setAttribute("height","100%"),u.setAttribute("class","uael-content-iframe");var c=o.find(".uael-modal-content-data");c.html(u),c.append('<div class="uael-loader"><div class="uael-loader-1"></div><div class="uael-loader-2"></div><div class="uael-loader-3"></div></div>'),u.onload=function(){window.parent.jQuery(document).find("#modal-"+a+" .uael-loader").fadeOut(),this.style.display="block"}}},_stopVideo:function(a){var o=e(".uamodal-"+a);if("photo"!=o.data("content")){var t=o.find("iframe"),l=o.find("video");if(t.length){var n=t.attr("src").replace("&autoplay=1","");t.attr("src",""),t.attr("src",n)}else l.length&&(l[0].pause(),l[0].currentTime=0)}},_afterOpen:function(a){"default"==e(".uamodal-"+a).data("cookies-type")&&UAELModalPopup._setPopupCookie(a),e(window).trigger("uael_after_modal_popup_open",[a])},_setPopupCookie:function(a){var o=Cookies.get("uael-modal-popup-"+a),t=parseInt(e(".uamodal-"+a).data("cookies-days")),l="https:"===window.location.protocol||"";void 0===o&&void 0!==t&&Cookies.set("uael-modal-popup-"+a,!0,{expires:t,secure:l})},_incrementPageViews:function(e){if("global"===(e=e||"global")){var a=parseInt(localStorage.getItem("uael_page_views")||"0");return a++,localStorage.setItem("uael_page_views",a.toString()),a}if("current"===e){var o=window.location.href,t="uael_page_views_"+btoa(o).replace(/[^a-zA-Z0-9]/g,"").substring(0,50),l=parseInt(localStorage.getItem(t)||"0");return l++,localStorage.setItem(t,l.toString()),l}},_checkPageViewCondition:function(a,o){try{var t=e(".uamodal-"+a).data("page-views-scope")||"global",l=!1;if("global"===t)l=parseInt(localStorage.getItem("uael_page_views")||"0")>=o;else if("current"===t){var n=window.location.href,r="uael_page_views_"+btoa(n).replace(/[^a-zA-Z0-9]/g,"").substring(0,50),i="uael_popup_"+a+"_url_key",s=localStorage.getItem(i);s&&(r=s),l=parseInt(localStorage.getItem(r)||"0")>=o}return l}catch(e){return!0}},_initializeSessionTracking:function(e){try{var a="uael_popup_"+e+"_sessions_baseline",o=UAELModalPopup._getCurrentSessionCount();null===localStorage.getItem(a)&&localStorage.setItem(a,o.toString())}catch(e){}},_getCurrentSessionCount:function(){try{return parseInt(localStorage.getItem("uael_sessions")||"0")}catch(e){return 0}},_checkSessionCondition:function(e,a){try{var o=UAELModalPopup._getCurrentSessionCount(),t="uael_popup_"+e+"_sessions_baseline";return o-parseInt(localStorage.getItem(t)||"0")>=a}catch(e){return!0}}},e(document).on("keyup",function(a){27==a.keyCode&&e(".uael-modal-parent-wrapper").each(function(){var a=e(this),o=a.attr("id").replace("-overlay","");"yes"==a.data("close-on-esc")&&UAELModalPopup._close(o)})}),e(document).on("click touchstart",".uael-overlay, .uael-modal-scroll",function(a){if(!(e(a.target).hasClass("uael-content")||e(a.target).closest(".uael-content").length>0)){var o=e(this).closest(".uael-modal-parent-wrapper"),t=o.attr("id").replace("-overlay","");"yes"==o.data("close-on-overlay")&&UAELModalPopup._close(t)}}),e(document).on("click",".uael-modal-close, .uael-close-modal",function(){var a=e(this).closest(".uael-modal-parent-wrapper").attr("id").replace("-overlay","");UAELModalPopup._close(a)}),e(document).on("click",".uael-trigger",function(){var a=e(this).closest(".elementor-element").data("id"),o=e(".uamodal-"+a).data("trigger-on");"text"!=o&&"icon"!=o&&"photo"!=o&&"button"!=o||UAELModalPopup._canShow(a)&&UAELModalPopup._show(a)}),e(document).on("uael_modal_popup_init",function(o,t){e("#modal-"+t).hasClass("uael-show-preview")&&setTimeout(function(){UAELModalPopup._show(t)},400);var l=e("#"+t+"-overlay"),n=l.data("content"),r=l.data("device");"on_scroll_element"===l.data("trigger-on")&&e("#modal-"+t).hasClass("uael-modal-editor")&&setTimeout(function(){e("#modal-"+t).hasClass("uael-show-preview")&&UAELModalPopup._show(t)},400),"youtube"!=n&&"vimeo"!=n||0==e(".uael-video-player iframe").length&&e(".uael-video-player").each(function(o,t){var l=e("<div/>"),n=e(this);l.attr("data-id",n.data("id")),l.attr("data-src",n.data("src")),l.attr("data-sourcelink",n.data("sourcelink")),l.html('<img src="'+n.data("thumb")+'"><div class="play '+n.data("play-icon")+'"></div>'),l.on("click",a),n.html(l),1==r&&e(l[0]).trigger("click")}),UAELModalPopup._centerModal(t)}),e(window).on("resize",function(){UAELModalPopup._center()}),e(document).on("mouseleave",function(a){a.clientY>20||e(".uael-modal-parent-wrapper").each(function(){var a=e(this),o=a.attr("id").replace("-overlay",""),t=a.data("trigger-on"),l=a.data("exit-intent");"automatic"==t&&"yes"==l&&UAELModalPopup._canShow(o)&&UAELModalPopup._show(o)})}),e(document).ready(function(a){window.location.href.indexOf("&action=elementor")<=0&&e(".uael-modal-parent-wrapper").each(function(){e(this).appendTo(document.body)}),UAELModalPopup._center(),e(".uael-modal-content-data").resize(function(){UAELModalPopup._center()}),e(".uael-modal-parent-wrapper").each(function(){var a,o=e(this),t=o.attr("id").replace("-overlay",""),l=o.data("trigger-on"),n=o.data("after-sec"),r=o.data("after-sec-val"),i=o.data("custom"),s=o.data("custom-id"),d=o.data("scroll-direction"),u=o.data("scroll-percentage");if("yes"===o.data("sessions-enabled")&&UAELModalPopup._initializeSessionTracking(t),"automatic"==l&&"yes"==n&&void 0!==r){var c=t;setTimeout(function(){UAELModalPopup._canShow(c)&&UAELModalPopup._show(c)},1e3*parseInt(r))}if("on_scroll"==l){var p=0,m=!1;e(window).on("scroll",function(){var a=e(this).scrollTop(),o=100*a/(e(document).height()-e(window).height()),l=a>p;if(l&&a>20&&(m=!0),p>0||l){var n=!1;"down"===d?l&&o>=u&&(n=!0):"up"===d&&m&&!l&&p-a>20&&(n=!0),n&&UAELModalPopup._canShow(t)&&(UAELModalPopup._show(t),e(window).off("scroll"))}p=a})}if("on_scroll_element"==l){var h=o.data("scroll-element");if(o.closest(".elementor-element").hasClass("elementor-element-edit-mode"))return;if(h){var f=h.split(",").map(function(e){return e.trim()});(f=f.filter(function(e){return e&&e.length>0&&-1===e.indexOf("<script")})).forEach(function(e){try{var a=document.querySelectorAll(e);if(a.length>0){var o=new IntersectionObserver(function(e){e.forEach(function(e){e.isIntersecting&&UAELModalPopup._canShow(t)&&(UAELModalPopup._show(t),o.disconnect())})},{threshold:.1});a.forEach(function(e){o.observe(e)})}}catch(a){console.error("Invalid selector in Modal Popup: "+e)}})}}if("custom"==l&&(void 0!==i&&""!=i&&(a=i.split(",")).length>0))for(var v=0;v<a.length;v++)void 0!==a[v]&&""!=a[v]&&(e("."+a[v]).css("cursor","pointer"),e(document).on("click","."+a[v],function(){UAELModalPopup._show(t)}));if("custom_id"==l&&(void 0!==s&&""!=s&&(a=s.split(",")).length>0))for(v=0;v<a.length;v++)void 0!==a[v]&&""!=a[v]&&(e("#"+a[v]).css("cursor","pointer"),e(document).on("click","#"+a[v],function(){UAELModalPopup._show(t)}));if("via_url"==l){var g=window.location.href,_=new URL(g).searchParams.get("uael-modal-action");_===t&&UAELModalPopup._show(_)}})});var o=function(e,a){if(void 0!==e){var o=e.data("id"),t=a(".uamodal-"+o);e.hasClass("elementor-hidden-desktop")&&t.addClass("uael-modal-hide-desktop"),e.hasClass("elementor-hidden-tablet")&&t.addClass("uael-modal-hide-tablet"),e.hasClass("elementor-hidden-phone")&&t.addClass("uael-modal-hide-phone"),a(document).trigger("uael_modal_popup_init",o)}};e(window).on("elementor/frontend/init",function(){elementorFrontend.hooks.addAction("frontend/element_ready/uael-modal-popup.default",o)})}(jQuery);