TanchoToplineCargo/public/sunsari/revolution/js/extensions/revolution.extension.actions.min.js

8 lines
8.1 KiB
JavaScript
Raw Normal View History

2024-05-05 04:47:49 +00:00
/********************************************
* REVOLUTION 5.4.6.4 EXTENSION - ACTIONS
* @version: 2.1.0 (22.11.2017)
* @requires jquery.themepunch.revolution.js
* @author ThemePunch
*********************************************/
!function($){"use strict";function getScrollRoot(){var e,t=document.documentElement,o=document.body,a=(void 0!==window.pageYOffset?window.pageYOffset:null)||o.scrollTop||t.scrollTop;return t.scrollTop=o.scrollTop=a+(a>0)?-1:1,e=t.scrollTop!==a?t:o,e.scrollTop=a,e}var _R=jQuery.fn.revolution,_ISM=_R.is_mobile(),extension={alias:"Actions Min JS",name:"revolution.extensions.actions.min.js",min_core:"5.4.5",version:"2.1.0"};jQuery.extend(!0,_R,{checkActions:function(e,t,o){if("stop"===_R.compare_version(extension).check)return!1;checkActions_intern(e,t,o)}});var checkActions_intern=function(e,t,o){o&&jQuery.each(o,function(o,a){a.delay=parseInt(a.delay,0)/1e3,e.addClass("tp-withaction"),t.fullscreen_esclistener||"exitfullscreen"!=a.action&&"togglefullscreen"!=a.action||(jQuery(document).keyup(function(t){27==t.keyCode&&jQuery("#rs-go-fullscreen").length>0&&e.trigger(a.event)}),t.fullscreen_esclistener=!0);var r="backgroundvideo"==a.layer?jQuery(".rs-background-video-layer"):"firstvideo"==a.layer?jQuery(".tp-revslider-slidesli").find(".tp-videolayer"):jQuery("#"+a.layer);switch(-1!=jQuery.inArray(a.action,["toggleslider","toggle_mute_video","toggle_global_mute_video","togglefullscreen"])&&e.data("togglelisteners",!0),a.action){case"togglevideo":jQuery.each(r,function(t,o){var a=(o=jQuery(o)).data("videotoggledby");void 0==a&&(a=new Array),a.push(e),o.data("videotoggledby",a)});break;case"togglelayer":jQuery.each(r,function(t,o){var r=(o=jQuery(o)).data("layertoggledby");void 0==r&&(r=new Array),r.push(e),o.data("layertoggledby",r),o.data("triggered_startstatus",a.layerstatus)});break;case"toggle_mute_video":case"toggle_global_mute_video":jQuery.each(r,function(t,o){var a=(o=jQuery(o)).data("videomutetoggledby");void 0==a&&(a=new Array),a.push(e),o.data("videomutetoggledby",a)});break;case"toggleslider":void 0==t.slidertoggledby&&(t.slidertoggledby=new Array),t.slidertoggledby.push(e);break;case"togglefullscreen":void 0==t.fullscreentoggledby&&(t.fullscreentoggledby=new Array),t.fullscreentoggledby.push(e)}switch(e.on(a.event,function(){if("click"===a.event&&e.hasClass("tp-temporarydisabled"))return!1;var o="backgroundvideo"==a.layer?jQuery(".active-revslide .slotholder .rs-background-video-layer"):"firstvideo"==a.layer?jQuery(".active-revslide .tp-videolayer").first():jQuery("#"+a.layer);if("stoplayer"==a.action||"togglelayer"==a.action||"startlayer"==a.action){if(o.length>0){var r=o.data();void 0!==r.clicked_time_stamp&&(new Date).getTime()-r.clicked_time_stamp>150&&(clearTimeout(r.triggerdelayIn),clearTimeout(r.triggerdelayOut)),r.clicked_time_stamp=(new Date).getTime(),"startlayer"==a.action||"togglelayer"==a.action&&"in"!=o.data("animdirection")?(r.animdirection="in",r.triggerstate="on",_R.toggleState(r.layertoggledby),_R.playAnimationFrame&&(clearTimeout(r.triggerdelayIn),r.triggerdelayIn=setTimeout(function(){_R.playAnimationFrame({caption:o,opt:t,frame:"frame_0",triggerdirection:"in",triggerframein:"frame_0",triggerframeout:"frame_999"})},1e3*a.delay))):("stoplayer"==a.action||"togglelayer"==a.action&&"out"!=o.data("animdirection"))&&(r.animdirection="out",r.triggered=!0,r.triggerstate="off",_R.stopVideo&&_R.stopVideo(o,t),_R.unToggleState(r.layertoggledby),_R.endMoveCaption&&(clearTimeout(r.triggerdelayOut),r.triggerdelayOut=setTimeout(function(){_R.playAnimationFrame({caption:o,opt:t,frame:"frame_999",triggerdirection:"out",triggerframein:"frame_0",triggerframeout:"frame_999"})},1e3*a.delay)))}}else!_ISM||"playvideo"!=a.action&&"stopvideo"!=a.action&&"togglevideo"!=a.action&&"mutevideo"!=a.action&&"unmutevideo"!=a.action&&"toggle_mute_video"!=a.action&&"toggle_global_mute_video"!=a.action?(a.delay="NaN"===a.delay||NaN===a.delay?0:a.delay,_R.isSafari11()?actionSwitches(o,t,a,e):punchgs.TweenLite.delayedCall(a.delay,function(){actionSwitches(o,t,a,e)},[o,t,a,e])):actionSwitches(o,t,a,e)}),a.action){case"togglelayer":case"startlayer":case"playlayer":case"stoplayer":var l=(r=jQuery("#"+a.layer)).data();r.length>0&&void 0!==l&&(void 0!==l.frames&&"bytrigger"!=l.frames[0].delay||void 0===l.frames&&"bytrigger"!==l.start)&&