1jQuery(document).ready(function($){ 2 $.fn.extend({ 3 loadSlider: function() { 4 return $(this).addClass('owl-loaded'); 5 }, 6 sliderArrow: function() { // SVG's for navigation arrows for slider 7 return $(this).hasClass('rhp-slider-featureview') ? 8 ['<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 256 512" width="100%" height="100%"><path d="M9.4 278.6c-12.5-12.5-12.5-32.8 0-45.3l128-128c9.2-9.2 22.9-11.9 34.9-6.9s19.8 16.6 19.8 29.6l0 256c0 12.9-7.8 24.6-19.8 29.6s-25.7 2.2-34.9-6.9l-128-128z"/></svg>', '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 256 512" width="100%" height="100%"><path d="M246.6 278.6c12.5-12.5 12.5-32.8 0-45.3l-128-128c-9.2-9.2-22.9-11.9-34.9-6.9s-19.8 16.6-19.8 29.6l0 256c0 12.9 7.8 24.6 19.8 29.6s25.7 2.2 34.9-6.9l128-128z"/></svg>'] : 9 ['<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512" width="100%" height="100%"><path d="M512 256A256 256 0 1 0 0 256a256 256 0 1 0 512 0zM271 135c9.4-9.4 24.6-9.4 33.9 0s9.4 24.6 0 33.9l-87 87 87 87c9.4 9.4 9.4 24.6 0 33.9s-24.6 9.4-33.9 0L167 273c-9.4-9.4-9.4-24.6 0-33.9L271 135z"/></svg>', '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512" width="100%" height="100%"><path d="M0 256a256 256 0 1 0 512 0A256 256 0 1 0 0 256zM241 377c-9.4 9.4-24.6 9.4-33.9 0s-9.4-24.6 0-33.9l87-87-87-87c-9.4-9.4-9.4-24.6 0-33.9s24.6-9.4 33.9 0L345 239c9.4 9.4 9.4 24.6 0 33.9L241 377z"/></svg>']; 10 }, 11 insertIcon: function() { 12 if($(this).hasClass('slide-location')) 13 $(this).html('<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 384 512" width="100%" height="100%"><path d="M215.7 499.2C267 435 384 279.4 384 192C384 86 298 0 192 0S0 86 0 192c0 87.4 117 243 168.3 307.2c12.3 15.3 35.1 15.3 47.4 0zM192 128a64 64 0 1 1 0 128 64 64 0 1 1 0-128z"/></svg>'); 14 return $(this); 15 }, 16 getTransitionEffect: function(transition) { // return classes based on backend setting selected transition effect 17 let objTransition; 18 switch (transition) { 19 case 'bounce': 20 objTransition = {in: 'bounceIn', out: 'bounceOut', animation: 'Bounce'}; 21 break; 22 case 'zoom': 23 objTransition = {in: 'zoomIn', out: 'zoomOut', animation: 'Zoom'}; 24 break; 25 case 'slide': 26 objTransition = {in: 'slideInUp', out: 'slideOutDown', animation: 'Slide'}; 27 break; 28 case 'rotate': 29 objTransition = {in: 'rotateIn', out: 'rotateOut', animation: 'Rotate'}; 30 break; 31 case 'flip': 32 objTransition = {in: 'flipInX', out: 'flipOutX', animation: 'Flip'}; 33 break; 34 case 'roll': 35 objTransition = {in: 'rollIn', out: 'rollOut', animation: 'Roll'}; 36 break; 37 case 'lightSpeed': 38 objTransition = {in: 'lightSpeedIn', out: 'lightSpeedOut', animation: 'LightSpeed'}; 39 break; 40 case 'zoomUpDown': 41 objTransition = {in: 'zoomInDown', out: 'zoomOutUp', animation: 'Zoom Up-Down'}; 42 break; 43 case 'slideLeftRight': 44 objTransition = {in: 'slideInRight', out: 'slideOutLeft', animation: 'Slide Left-Right'}; 45 break; 46 case 'slideRightLeft': 47 objTransition = {in: 'slideInLeft', out: 'slideOutRight', animation: 'Slide Right-Left'}; 48 break; 49 case 'flipY': 50 objTransition = {in: 'flipInY', out: 'flipOutY', animation: 'Flip Y'}; 51 break; 52 case 'slideUpDown': 53 objTransition = {in: 'slideInDown', out: 'slideOutUp', animation: 'Slide Up-Down'}; 54 break; 55 case 'bounceUpDown': 56 objTransition = {in: 'bounceInDown', out: 'bounceOutUp', animation: 'Bounce Up-Down'}; 57 break; 58 case 'wobble': 59 objTransition = {in: 'wobbleIn', out: 'wobbleOut', animation: 'Wobble'}; 60 break; 61 case 'shake': 62 objTransition = {in: 'shakeIn', out: 'shakeOut', animation: 'Shake'}; 63 break; 64 case 'jello': 65 objTransition = {in: 'jelloIn', out: 'jelloOut', animation: 'Jello'}; 66 break; 67 case 'tada': 68 objTransition = {in: 'tadaIn', out: 'tadaOut', animation: 'Tada'}; 69 break; 70 case 'zoomLeftRight': 71 objTransition = {in: 'zoomInRight', out: 'zoomOutLeft', animation: 'Zoom Left-Right'}; 72 break; 73 case 'fadeUpDown': 74 objTransition = {in: 'fadeInDown', out: 'fadeOutUp', animation: 'Fade Up-Down'}; 75 break; 76 case 'swing': 77 objTransition = {in: 'swingIn', out: 'swingOut', animation: 'Swing'}; 78 break; 79 case 'zoomRightLeft': 80 objTransition = {in: 'zoomInLeft', out: 'zoomOutRight', animation: 'Zoom Right-Left'}; 81 break; 82 case 'fadeLeftRight': 83 objTransition = {in: 'fadeInRight', out: 'fadeOutLeft', animation: 'Fade Left-Right'}; 84 break; 85 case 'diagonalRotate': 86 objTransition = {in: 'rotateInUpLeft', out: 'rotateOutDownRight', animation: 'Diagonal Rotate'}; 87 break; 88 case 'speedy': 89 objTransition = {in: 'lightSpeedInLeft', out: 'lightSpeedOutRight', animation: 'Speedy Entrance/Exit'}; 90 break; 91 case 'surprisePop': 92 objTransition = {in: 'jackInTheBox', out: 'hinge', animation: 'Surprise Pop'}; 93 break; 94 case 'backSlideLeft': 95 objTransition = {in: 'backInLeft', out: 'backOutRight', animation: 'Back Slide Left'}; 96 break; 97 case 'shakeAndWobble': 98 objTransition = {in: 'wobble', out: 'rubberBand', animation: 'Shake & Wobble'}; 99 break; 100 case 'swingAndFlash': 101 objTransition = {in: 'swing', out: 'flash', animation: 'Swing & Flash'}; 102 break; 103 case 'blindX': 104 objTransition = {in: 'blindXIn', out: 'blindXOut', animation: 'BlindX'}; 105 break; 106 case 'blindY': 107 objTransition = {in: 'blindYIn', out: 'blindYOut', animation: 'BlindY'}; 108 break; 109 case 'blindZ': 110 objTransition = {in: 'blindZIn', out: 'blindZOut', animation: 'BlindZ'}; 111 break; 112 case 'fade': 113 default: 114 objTransition = {in: 'fadeIn', out: 'fadeOut', animation: 'Fade'}; 115 break; 116 } 117 return objTransition; 118 } 119 }); 120 var speed = parseInt(rhpslidessettings.rhpslideshowduration); 121 var aniSpeed = parseInt(rhpslidessettings.rhpslideshowspeed); 122 // return slide height based on slider width and backend image ratio 123 const getSliderHeight = (intSliderWidth) => { 124 return Math.round((parseInt(rhpslidessettings.rhpslideshowheight) / parseInt(rhpslidessettings.rhpslideshowwidth)) * intSliderWidth); 125 } 126 127 const loadNavigationSlider = (element, height) => { // call for thumbnail and both featured view's right navigation 128 element.parent().css('display', 'flex'); 129 let sliderNav = element.parent().find('.rhp-slider-nav-section'); 130 sliderNav.owlCarousel({ 131 items: 1, 132 loop: false, 133 mouseDrag: false, 134 touchDrag: true,
135 onRefreshed: sliderNav.hasClass('rhp-load') ? sliderNav.loadSlider() : true, 136 nav: false, 137 navText: ['', ''], 138 dots: false, 139 }).on('changed.owl.carousel', function(event) { 140 updateSliderPosition(element, event.item.index); 141 }).removeClass('rhp-load'); 142 sliderNav.find('.rhp-slider-nav > div').on('click', function() { 143 let current = $(this).index(); 144 sliderNav.find(".owl-item").removeClass("selected").eq(current).addClass("selected"); 145 updateSliderPosition(sliderNav, current); 146 updateSliderPosition(element, current); 147 }); 148 element.on('changed.owl.carousel', function(event) { 149 syncSliderPosition(event, sliderNav); 150 }); 151 let objEmailSection = sliderNav.find('.rhp-slider-nav-outer + div > .rhp-feature-mail'); 152 if(objEmailSection.html() != undefined){ // Check featured view with email section 153 objEmailSection = objEmailSection.parent(); 154 let emailSectionHeight = objEmailSection.height(), intEmailSectionHeight = intRightTitleSectionHeight = ''; 155 if(emailSectionHeight > (height * 0.3)) { 156 intRightTitleSectionHeight = height * 0.7; 157 intEmailSectionHeight = height * 0.3; 158 } else intRightTitleSectionHeight = height - emailSectionHeight; 159 160 if(intRightTitleSectionHeight != '' && sliderNav.find('.rhp-slider-nav-outer').height() < intRightTitleSectionHeight) 161 intRightTitleSectionHeight = ''; 162 163 if(intEmailSectionHeight != '') objEmailSection.height(intEmailSectionHeight); 164 if(intRightTitleSectionHeight != '') sliderNav.find('.rhp-slider-nav-outer').height(intRightTitleSectionHeight); 165 } else sliderNav.find('.rhp-slider-nav-outer').height(height); 166 } 167 // Trigger then sync slider change 168 const updateSliderPosition = (element, index) => { 169 element.data('owl.carousel').to(index, 100, true); 170 } 171 // Trigger right section slider based on main slider active slide 172 const syncSliderPosition = (element, nav) => { 173 let count = element.item.count - 1; 174 let current = Math.round(element.item.index - (element.item.count / 2) - .5); 175 176 if(current < 0) current = count; 177 if(current > count) current = 0; 178 179 nav.find(".owl-item").removeClass("selected").eq(current).addClass("selected"); 180 let onscreen = nav.find('.owl-item.active').length - 1; 181 let start = nav.find('.owl-item.active').first().index(); 182 let end = nav.find('.owl-item.active').last().index(); 183 184 if (current > end) updateSliderPosition(nav, current); 185 if (current < start) updateSliderPosition(nav, current - onscreen); 186 } 187 // Triger for backend regular slider layouts (on Slider CSS Settings (6 slider layout)) 188 const loadRegularOwlCarousel = (element) => { 189 let objTransition = element.getTransitionEffect(rhpslidessettings.rhpslideshowtransition); 190 element.owlCarousel({ 191 items: 1, 192 loop: true, 193 autoplay: true, 194 autoplayTimeout: speed, 195 autoplayHoverPause: true, 196 responsive: { 197 0: { 198 onRefreshed: updateRegularRHPSlider, 199 } 200 }, 201 animateOut: objTransition.out, 202 animateIn: objTransition.in, 203 nav: element.hasClass('rhp-nav'), 204 navText: element.sliderArrow(), 205 dots: element.hasClass('rhp-dots'), 206 smartSpeed: aniSpeed, 207 onChanged: onChangeRegularRHPSlider, 208 }); 209 } 210 // Trigger for event carousel slider layout 211 const loadOwlCarousel = (element) => { 212 let intCarouselCount = parseInt(rhpslidesrockhousesettings.rhpcarouselcount); 213 element.owlCarousel({ 214 loop: true, 215 margin: 5, 216 smartSpeed: 1000, 217 autoplay: true, 218 autoplayTimeout: 2500, 219 responsive: { 220 0: { 221 items: Math.min(1, intCarouselCount), 222 }, 223 640: { 224 items: Math.min(2, intCarouselCount), 225 }, 226 768: { 227 items: Math.min(3, intCarouselCount), 228 }, 229 1024: { 230 items: intCarouselCount, 231 } 232 }, 233 autoplayHoverPause: true, 234 onRefreshed: updateRHPSlider, 235 nav: false, 236 dots: false, 237 }); 238 } 239 loadRegularOwlCarousel($('.rhp-slideshow')); 240 loadOwlCarousel($('.rhp-carousel-slideshow')); 241 $('.rhp-slider-play-btn').on('click',function(){ 242 $(this).closest(".rhp-slideshow").trigger('play.owl.autoplay',[speed]) 243 }); 244 $('.rhp-slider-stop-btn').on('click',function(){ 245 $(this).closest(".rhp-slideshow").trigger('stop.owl.autoplay') 246 }); 247 $('.rhp-slider-next-btn').click(function() { 248 $(this).closest(".rhp-slideshow").trigger('next.owl.carousel', [aniSpeed]); 249 }); 250 $('.rhp-slider-prev-btn').click(function() { 251 $(this).closest(".rhp-slideshow").trigger('prev.owl.carousel', [aniSpeed]); 252 }); 253 254 // Trigger after event carousel slider load 255 function updateRHPSlider(event) { 256 $(event.currentTarget).find('.owl-stage-outer').height($(event.currentTarget).height()); 257 $(event.currentTarget).loadSlider(); 258 } 259 // Trigger after event any of six slider layout slides load 260 function updateRegularRHPSlider(event) { 261 let intSliderHeight = getSliderHeight($(event.currentTarget).width()); 262 $(event.currentTarget).find($(event.currentTarget).hasClass('rhp-slider-wrapper-below') ? '.owl-stage-outer .rhp-slider-image' : '.owl-stage-outer').height(intSliderHeight); 263 264 if($(event.currentTarget).hasClass('rhp-slider-thumbnails') || $(event.currentTarget).hasClass('rhp-slider-featureview')) 265 loadNavigationSlider($(event.currentTarget), intSliderHeight); 266 267 $(event.currentTarget).loadSlider(); 268 } 269 // Trigger after event any of six slider layout slides load 270 function onChangeRegularRHPSlider(event) { 271 $(event.currentTarget).find('.owl-stage').css('--slider-animation-speed', (aniSpeed/1000)+'s'); 272 } 273 $('.rhp-slides-icon').insertIcon(); 274});
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.