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-sticky-header.min.js
!function(e){"use strict";var t=function(e){this.$element=e,this.settings=this.getSettings(),this.isSticky=!1,this.lastScrollTop=0,this.scrollDirection="up",this.ticking=!1,this.resizeTimer=null,"yes"===this.settings.enable&&this.init()};t.prototype={getSettings:function(){var e=this.$element.data("uae-sticky-settings");if(e){if("string"==typeof e)try{e=JSON.parse(e)}catch(t){e={}}return{enable:e.uae_sticky_header_enable||"",devices:e.uae_sticky_devices||["desktop","tablet","mobile"],scrollDistance:e.uae_sticky_scroll_distance||{size:100,unit:"px"},scrollDistanceTablet:e.uae_sticky_scroll_distance_tablet||null,scrollDistanceMobile:e.uae_sticky_scroll_distance_mobile||null,transparentEnable:e.uae_sticky_transparent_enable||"",transparencyLevel:e.uae_sticky_transparency_level||{size:100,unit:"%"},backgroundEnable:e.uae_sticky_background_enable||"",backgroundType:e.uae_sticky_background_type||"solid",backgroundColor:e.uae_sticky_background_color||"#ffffff",gradientColor1:e.uae_sticky_gradient_color_1||"#ffffff",gradientLocation1:e.uae_sticky_gradient_location_1||{size:0,unit:"%"},gradientColor2:e.uae_sticky_gradient_color_2||"#f0f0f0",gradientLocation2:e.uae_sticky_gradient_location_2||{size:100,unit:"%"},gradientType:e.uae_sticky_gradient_type||"linear",gradientAngle:e.uae_sticky_gradient_angle||{size:180,unit:"deg"},borderEnable:e.uae_sticky_border_enable||"",borderColor:e.uae_sticky_border_color||"#e0e0e0",borderThickness:e.uae_sticky_border_thickness||{size:1,unit:"px"},shadowEnable:e.uae_sticky_shadow_enable||"",shadowColor:e.uae_sticky_shadow_color||"rgba(0, 0, 0, 0.1)",shadowVertical:e.uae_sticky_shadow_vertical||{size:0,unit:"px"},shadowBlur:e.uae_sticky_shadow_blur||{size:10,unit:"px"},shadowSpread:e.uae_sticky_shadow_spread||{size:0,unit:"px"},hideOnScrollDown:e.uae_sticky_hide_on_scroll_down||"",hideThreshold:e.uae_sticky_hide_threshold||{size:10,unit:"%"},hideThresholdTablet:e.uae_sticky_hide_threshold_tablet||null,hideThresholdMobile:e.uae_sticky_hide_threshold_mobile||null}}var t=this.$element.data("settings")||{};return{enable:t.uae_sticky_header_enable||"",devices:t.uae_sticky_devices||["desktop","tablet","mobile"],scrollDistance:t.uae_sticky_scroll_distance||{size:100,unit:"px"},scrollDistanceTablet:t.uae_sticky_scroll_distance_tablet||null,scrollDistanceMobile:t.uae_sticky_scroll_distance_mobile||null,transparentEnable:t.uae_sticky_transparent_enable||"",transparencyLevel:t.uae_sticky_transparency_level||{size:100,unit:"%"},backgroundEnable:t.uae_sticky_background_enable||"",backgroundType:t.uae_sticky_background_type||"solid",backgroundColor:t.uae_sticky_background_color||"#ffffff",gradientColor1:t.uae_sticky_gradient_color_1||"#ffffff",gradientLocation1:t.uae_sticky_gradient_location_1||{size:0,unit:"%"},gradientColor2:t.uae_sticky_gradient_color_2||"#f0f0f0",gradientLocation2:t.uae_sticky_gradient_location_2||{size:100,unit:"%"},gradientType:t.uae_sticky_gradient_type||"linear",gradientAngle:t.uae_sticky_gradient_angle||{size:180,unit:"deg"},borderEnable:t.uae_sticky_border_enable||"",borderColor:t.uae_sticky_border_color||"#e0e0e0",borderThickness:t.uae_sticky_border_thickness||{size:1,unit:"px"},shadowEnable:t.uae_sticky_shadow_enable||"",shadowColor:t.uae_sticky_shadow_color||"rgba(0, 0, 0, 0.1)",shadowVertical:t.uae_sticky_shadow_vertical||{size:0,unit:"px"},shadowBlur:t.uae_sticky_shadow_blur||{size:10,unit:"px"},shadowSpread:t.uae_sticky_shadow_spread||{size:0,unit:"px"},hideOnScrollDown:t.uae_sticky_hide_on_scroll_down||"",hideThreshold:t.uae_sticky_hide_threshold||{size:10,unit:"%"},hideThresholdTablet:t.uae_sticky_hide_threshold_tablet||null,hideThresholdMobile:t.uae_sticky_hide_threshold_mobile||null}},init:function(){this.isDeviceEnabled()&&(this.setInitialStyles(),this.bindEvents(),this.checkScroll())},isDeviceEnabled:function(){var e=this.getCurrentDevice();return-1!==this.settings.devices.indexOf(e)},getCurrentDevice:function(){var e=window.innerWidth;return e>=1025?"desktop":e>=768&&e<1025?"tablet":"mobile"},getScrollDistance:function(){var e=this.getCurrentDevice(),t=this.settings.scrollDistance;return"tablet"===e&&this.settings.scrollDistanceTablet?t=this.settings.scrollDistanceTablet:"mobile"===e&&this.settings.scrollDistanceMobile&&(t=this.settings.scrollDistanceMobile),"%"===t.unit?window.innerHeight*t.size/100:t.size},getHideThreshold:function(){var e=this.getCurrentDevice(),t=this.settings.hideThreshold;return"tablet"===e&&this.settings.hideThresholdTablet?t=this.settings.hideThresholdTablet:"mobile"===e&&this.settings.hideThresholdMobile&&(t=this.settings.hideThresholdMobile),"%"===t.unit?window.innerHeight*t.size/100:t.size},setInitialStyles:function(){this.$element.addClass("uae-sticky-header-element");var e=this.$element.css("background-color");this.$element.data("original-background",e),this.$element.css({transition:"all 0.3s ease-in-out"})},applyTransparency:function(){var t=(100-this.settings.transparencyLevel.size)/100,i=this,s=this.$element.css("background-color"),n=this.$element.css("background-image"),r={"backdrop-filter":"blur(10px)","-webkit-backdrop-filter":"blur(10px)"};if(n&&"none"!==n){var a=n.replace(/#([0-9a-f]{3,6})\b/gi,function(e){return i.convertHexToRgba(e,t)});a=a.replace(/rgba?\(([^)]+)\)/gi,function(e,i){var s=i.split(",").map(function(e){return e.trim()});return 3===s.length?"rgba("+s[0]+", "+s[1]+", "+s[2]+", "+t+")":4===s.length?"rgba("+s[0]+", "+s[1]+", "+s[2]+", "+t+")":e}),this.$element.css(e.extend({"background-image":a},r))}else if(s&&"transparent"!==s&&"rgba(0, 0, 0, 0)"!==s){var o=this.convertToRgba(s,t);this.$element.css(e.extend({"background-color":o},r))}else this.$element.css(e.extend({"background-color":"rgba(255, 255, 255, "+t+")"},r))},convertHexToRgba:function(e,t){3===(e=e.replace("#","")).length&&(e=e.split("").map(e=>e+e).join(""));var i=parseInt(e,16);return`rgba(${i>>16&255}, ${i>>8&255}, ${255&i}, ${t})`},convertToRgba:function(e,t){if(0===e.indexOf("rgba"))return e.replace(/[\d\.]+\)$/g,t+")");if(0===e.indexOf("rgb"))return e.replace("rgb","rgba").replace(")",", "+t+")");if(0===e.indexOf("#")){var i=e.replace("#","");return"rgba("+parseInt(i.substring(0,2),16)+", "+parseInt(i.substring(2,4),16)+", "+parseInt(i.substring(4,6),16)+", "+t+")"}return"rgba(255, 255, 255, "+t+")"},bindEvents:function(){var t=this;e(window).on("scroll.uaeStickyHeader",function(){t.requestTick()}),e(window).on("resize.uaeStickyHeader",function(){clearTimeout(t.resizeTimer),t.resizeTimer=setTimeout(function(){t.handleResize()},250)}),window.elementorFrontend&&window.elementorFrontend.isEditMode()&&elementor.channels.editor.on("change",function(e){e.el===t.$element[0]&&(t.settings=t.getSettings(),t.checkScroll())})},requestTick:function(){var e=this;this.ticking||(requestAnimationFrame(function(){e.checkScroll(),e.ticking=!1}),this.ticking=!0)},checkScroll:function(){var t=e(window).scrollTop(),i=this.getScrollDistance();t>this.lastScrollTop?this.scrollDirection="down":this.scrollDirection="up",this.lastScrollTop=t,t>=i?(this.isSticky||this.makeSticky(),"yes"===this.settings.hideOnScrollDown&&this.handleHideOnScroll()):this.isSticky&&this.removeSticky()},makeSticky:function(){this.isSticky=!0,this.$element.addClass("uae-sticky--active"),this.applyVisualEffects(),this.$element.css({position:"fixed",top:"0",left:"0",right:"0","z-index":"9999",width:"100%"}),this.addPlaceholder()},removeSticky:function(){this.isSticky=!1,this.$element.removeClass("uae-sticky--active uae-sticky--hidden"),this.removeVisualEffects(),this.$element.css({position:"",top:"",left:"",right:"","z-index":"",width:""}),this.removePlaceholder()},applyVisualEffects:function(){if("yes"===this.settings.backgroundEnable)if(console.log("hello"),"solid"===this.settings.backgroundType)this.$element.css("background-color",this.settings.backgroundColor),this.$element[0].style.setProperty("background-color",this.settings.backgroundColor,"important");else{var e=this.buildGradient();this.$element.css("background-image",e),this.$element[0].style.setProperty("background-image",e,"important"),this.$element[0].style.setProperty("background-color","transparent","important")}else"yes"===this.settings.transparentEnable&&this.applyTransparency();if("yes"===this.settings.borderEnable){var t=this.settings.borderThickness.size+"px solid "+this.settings.borderColor;this.$element.css("border-bottom",t)}if("yes"===this.settings.shadowEnable){var i="0 "+this.settings.shadowVertical.size+"px "+this.settings.shadowBlur.size+"px "+this.settings.shadowSpread.size+"px "+this.settings.shadowColor;this.$element.css("box-shadow",i)}},removeVisualEffects:function(){var e=this.$element.data("original-background");this.$element.css({"background-color":e||"","background-image":"","border-bottom":"","box-shadow":"","backdrop-filter":"","-webkit-backdrop-filter":"",opacity:""})},buildGradient:function(){var e=this.settings.gradientType,t=this.settings.gradientColor1+" "+this.settings.gradientLocation1.size+"%",i=this.settings.gradientColor2+" "+this.settings.gradientLocation2.size+"%";return"linear"===e?"linear-gradient("+this.settings.gradientAngle.size+"deg, "+t+", "+i+")":"radial-gradient(circle, "+t+", "+i+")"},addPlaceholder:function(){if(!this.$placeholder){var t=this.$element.outerHeight();this.$placeholder=e('<div class="uae-sticky-placeholder"></div>').css({height:t+"px",visibility:"hidden"}),this.$element.after(this.$placeholder)}},removePlaceholder:function(){this.$placeholder&&(this.$placeholder.remove(),this.$placeholder=null)},handleHideOnScroll:function(){var e=this.getHideThreshold();"down"===this.scrollDirection&&this.lastScrollTop>e?(this.$element.addClass("uae-sticky--hidden"),this.$element.css("transform","translateY(-100%)")):"up"===this.scrollDirection&&(this.$element.removeClass("uae-sticky--hidden"),this.$element.css("transform","translateY(0)"))},handleResize:function(){this.isDeviceEnabled()?(this.isSticky&&this.$placeholder&&this.$placeholder.css("height",this.$element.outerHeight()+"px"),this.checkScroll()):this.removeSticky()},destroy:function(){e(window).off(".uaeStickyHeader"),this.removeSticky(),this.$element.removeClass("uae-sticky-header-element")}},e(window).on("elementor/frontend/init",function(){var e=function(e){e.closest(".hfe-site-header, .site-header, header").length>0&&new t(e)};elementorFrontend.hooks.addAction("frontend/element_ready/section",e),elementorFrontend.hooks.addAction("frontend/element_ready/container",e)})}(jQuery);