File manager - Edit - /home/monara/public_html/intern_web/wp-content/plugins/kadence-blocks/includes/assets/js/lottie-interactivity.min.js
Back
!function(a,b){"object"==typeof exports&&"undefined"!=typeof module?b(exports):"function"==typeof define&&define.amd?define(["exports"],b):b((a=a||self).LottieInteractivity={})}(this,function(j){"use strict";function q(a){return(q="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(a){return typeof a}:function(a){return a&&"function"==typeof Symbol&&a.constructor===Symbol&&a!==Symbol.prototype?"symbol":typeof a})(a)}function s(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function n(a,b){for(var c,d=0;d<b.length;d++)c=b[d],c.enumerable=c.enumerable||!1,c.configurable=!0,"value"in c&&(c.writable=!0),Object.defineProperty(a,c.key,c)}function z(b,c){if(null==b)return{};var d,e,f=function(b,c){if(null==b)return{};var d,e,f={},a=Object.keys(b);for(e=0;e<a.length;e++)d=a[e],0<=c.indexOf(d)||(f[d]=b[d]);return f}(b,c);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(b);for(e=0;e<a.length;e++)d=a[e],0<=c.indexOf(d)||Object.prototype.propertyIsEnumerable.call(b,d)&&(f[d]=b[d])}return f}function A(a,b){var c=b.get(a);if(!c)throw new TypeError("attempted to get private field on non-instance");return c.get?c.get.call(a):c.value}var a={player:"lottie-player"},i=function(){function t(){var G=this,e=0<arguments.length&&void 0!==arguments[0]?arguments[0]:a,i=e.actions,l=e.container,n=e.mode,C=e.player,I=z(e,["actions","container","mode","player"]);if(s(this,t),o.set(this,{writable:!0,value:function(){if(G.player){var a=function(){G.player.addEventListener("enterFrame",A(G,y)),G.container.addEventListener("mouseenter",A(G,g)),G.container.addEventListener("mouseleave",A(G,B)),G.container.addEventListener("touchstart",A(G,g),{passive:!0}),G.container.addEventListener("touchend",A(G,B),{passive:!0})};G.stateHandler.set("loop",function(){G.player.loop=!G.actions[G.interactionIdx].loop||parseInt(G.actions[G.interactionIdx].loop)-1,G.player.autoplay=!0}),G.stateHandler.set("autoplay",function(){G.player.loop=!1,G.player.autoplay=!0}),G.stateHandler.set("click",function(){G.player.loop=!1,G.player.autoplay=!1,G.container.addEventListener("click",A(G,c))}),G.stateHandler.set("hover",function(){G.player.loop=!1,G.player.autoplay=!1,G.container.addEventListener("mouseenter",A(G,c)),G.container.addEventListener("touchstart",A(G,c),{passive:!0})}),G.transitionHandler.set("click",function(){G.container.addEventListener("click",A(G,d))}),G.transitionHandler.set("hover",function(){G.container.addEventListener("mouseenter",A(G,d)),G.container.addEventListener("touchstart",A(G,d),{passive:!0})}),G.transitionHandler.set("hold",a),G.transitionHandler.set("pauseHold",a),G.transitionHandler.set("repeat",function(){G.player.loop=!0,G.player.autoplay=!0,G.player.addEventListener("loopComplete",function a(){A(G,m).call(G,{handler:a})})}),G.transitionHandler.set("onComplete",function(){"loop"===G.actions[G.interactionIdx].state?G.player.addEventListener("loopComplete",A(G,v)):G.player.addEventListener("complete",A(G,v))}),G.transitionHandler.set("seek",function(){G.player.stop(),G.player.addEventListener("enterFrame",A(G,f)),G.container.addEventListener("mousemove",A(G,h)),G.container.addEventListener("touchmove",A(G,r),{passive:!1}),G.container.addEventListener("mouseout",A(G,u))})}}}),c.set(this,{writable:!0,value:function(){var a=G.actions[G.interactionIdx].forceFlag;a||!0!==G.player.isPaused?a&&A(G,x).call(G,!0):A(G,x).call(G,!0)}}),p.set(this,{writable:!0,value:function(){0===G.clickCounter?(G.player.play(),G.clickCounter++):(G.clickCounter++,G.player.setDirection(-1*G.player.playDirection),G.player.play())}}),d.set(this,{writable:!0,value:function(){var b=G.actions[G.interactionIdx].forceFlag,c=G.actions[G.interactionIdx].state,e=G.actions[G.interactionIdx].transition;if("chain"===G.mode){if(G.actions[G.interactionIdx].count){var f=parseInt(G.actions[G.interactionIdx].count);if(G.clickCounter<f-1)return void(G.clickCounter+=1)}return G.clickCounter=0,"click"===e&&"click"===c||"hover"===e&&"hover"===c?G.transitionHandler.get("onComplete").call():A(G,D).call(G),G.container.removeEventListener("click",A(G,d)),void G.container.removeEventListener("mouseenter",A(G,d))}b||!0!==G.player.isPaused?b&&G.player.goToAndPlay(0,!0):G.player.goToAndPlay(0,!0)}}),h.set(this,{writable:!0,value:function(a){A(G,E).call(G,a.clientX,a.clientY)}}),r.set(this,{writable:!0,value:function(a){a.cancelable&&a.preventDefault(),A(G,E).call(G,a.touches[0].clientX,a.touches[0].clientY)}}),u.set(this,{writable:!0,value:function(){A(G,E).call(G,-1,-1)}}),v.set(this,{writable:!0,value:function(){"loop"===G.actions[G.interactionIdx].state?G.player.removeEventListener("loopComplete",A(G,v)):G.player.removeEventListener("complete",A(G,v)),A(G,D).call(G)}}),m.set(this,{writable:!0,value:function(a){var b=a.handler,c=1;G.actions[G.interactionIdx].repeat&&(c=G.actions[G.interactionIdx].repeat),G.playCounter>=c-1?(G.playCounter=0,G.player.removeEventListener("loopComplete",b),G.player.loop=!1,G.player.autoplay=!1,A(G,D).call(G)):G.playCounter+=1}}),f.set(this,{writable:!0,value:function(){var a=G.actions[G.interactionIdx].frames;a&&G.player.currentFrame>=parseInt(a[1])-1&&(G.player.removeEventListener("enterFrame",A(G,f)),G.container.removeEventListener("mousemove",A(G,h)),G.container.removeEventListener("mouseout",A(G,u)),setTimeout(A(G,D),0))}}),y.set(this,{writable:!0,value:function(){var a=G.actions[G.interactionIdx].frames;(a&&G.player.currentFrame>=a[1]||G.player.currentFrame>=G.player.totalFrames-1)&&(G.player.removeEventListener("enterFrame",A(G,y)),G.container.removeEventListener("mouseenter",A(G,g)),G.container.removeEventListener("mouseleave",A(G,B)),G.container.removeEventListener("touchstart",A(G,g),{passive:!0}),G.container.removeEventListener("touchend",A(G,B),{passive:!0}),G.player.pause(),G.holdStatus=!1,A(G,D).call(G))}}),g.set(this,{writable:!0,value:function(){-1!==G.player.playDirection&&null!==G.holdStatus&&G.holdStatus||(G.player.setDirection(1),G.player.play(),G.holdStatus=!0)}}),B.set(this,{writable:!0,value:function(){"hold"===G.actions[G.interactionIdx].transition||"hold"===G.actions[0].type?(G.player.setDirection(-1),G.player.play()):"pauseHold"!==G.actions[G.interactionIdx].transition&&"pauseHold"!==G.actions[0].type||G.player.pause(),G.holdStatus=!1}}),w.set(this,{writable:!0,value:function(){var a=G.actions[G.interactionIdx].state;"hover"!==a&&"click"!==a||(G.container.removeEventListener("click",A(G,c)),G.container.removeEventListener("mouseenter",A(G,c)))}}),D.set(this,{writable:!0,value:function(){G.oldInterctionIdx=G.interactionIdx,A(G,w).call(G);var a=G.actions[G.interactionIdx].jumpTo;a?0<=a&&a<G.actions.length?(G.interactionIdx=a,A(G,k).call(G,{ignorePath:!1})):(G.interactionIdx=0,G.player.goToAndStop(0,!0),A(G,k).call(G,{ignorePath:!1})):(G.interactionIdx++,G.interactionIdx>=G.actions.length?G.actions[G.actions.length-1].reset?(G.interactionIdx=0,G.player.resetSegments(!0),G.actions[G.interactionIdx].frames?G.player.goToAndStop(G.actions[G.interactionIdx].frames,!0):G.player.goToAndStop(0,!0),A(G,k).call(G,{ignorePath:!1})):(G.interactionIdx=G.actions.length-1,A(G,k).call(G,{ignorePath:!1})):A(G,k).call(G,{ignorePath:!1})),G.container.dispatchEvent(new CustomEvent("transition",{bubbles:!0,composed:!0,detail:{oldIndex:G.oldInterctionIdx,newIndex:G.interactionIdx}}))}}),x.set(this,{writable:!0,value:function(a){var b=G.actions[G.interactionIdx].frames;return b?void("string"==typeof b?G.player.goToAndPlay(b,a):G.player.playSegments(b,a)):(G.player.resetSegments(!0),void G.player.goToAndPlay(0,!0))}}),b.set(this,{writable:!0,value:function(){var b=G.actions[G.interactionIdx].path;if(!b)if(!("object"===q(G.enteredPlayer)&&"AnimationItem"===G.enteredPlayer.constructor.name)){var c=(b=G.loadedAnimation).substr(b.lastIndexOf("/")+1);if(c=c.substr(0,c.lastIndexOf(".json")),G.player.fileName===c)return void A(G,k).call(G,{ignorePath:!0})}else if(b=G.enteredPlayer,G.player===b)return void A(G,k).call(G,{ignorePath:!0});var d=G.container.getBoundingClientRect(),a="width: "+d.width+"px !important; height: "+d.height+"px !important; background: "+G.container.style.background;if(G.container.setAttribute("style",a),"object"!==q(G.enteredPlayer)||"AnimationItem"!==G.enteredPlayer.constructor.name){if("string"==typeof G.enteredPlayer){var f=document.querySelector(G.enteredPlayer);f&&"LOTTIE-PLAYER"===f.nodeName&&(G.attachedListeners||(f.addEventListener("ready",function(){G.container.style.width="",G.container.style.height=""}),f.addEventListener("load",function(){G.player=f.getLottie(),A(G,k).call(G,{ignorePath:!0})}),G.attachedListeners=!0),f.load(b))}else G.enteredPlayer instanceof HTMLElement&&"LOTTIE-PLAYER"===G.enteredPlayer.nodeName&&(G.attachedListeners||(G.enteredPlayer.addEventListener("ready",function(){G.container.style.width="",G.container.style.height=""}),G.enteredPlayer.addEventListener("load",function(){G.player=G.enteredPlayer.getLottie(),A(G,k).call(G,{ignorePath:!0})}),G.attachedListeners=!0),G.enteredPlayer.load(b));if(!G.player)throw new Error("".concat("[lottieInteractivity]:"," Specified player is invalid."),G.enteredPlayer)}else{if(!window.lottie)throw new Error("".concat("[lottieInteractivity]:"," A Lottie player is required."));G.stop(),G.player.destroy(),G.container.innerHTML="",G.player="object"===q(b)&&"AnimationItem"===b.constructor.name?window.lottie.loadAnimation({loop:!1,autoplay:!1,animationData:b.animationData,container:G.container}):window.lottie.loadAnimation({loop:!1,autoplay:!1,path:b,container:G.container}),G.player.addEventListener("DOMLoaded",function(){G.container.style.width="",G.container.style.height="",A(G,k).call(G,{ignorePath:!0})})}G.clickCounter=0,G.playCounter=0}}),k.set(this,{writable:!0,value:function(d){var e=d.ignorePath,f=G.actions[G.interactionIdx].state,g=G.actions[G.interactionIdx].transition,a=G.actions[G.interactionIdx].path,h=G.stateHandler.get(f),i=G.transitionHandler.get(g),j=G.actions[G.interactionIdx].speed?G.actions[G.interactionIdx].speed:1,c=G.actions[G.interactionIdx].delay?G.actions[G.interactionIdx].delay:0;e||!(a||G.actions[G.actions.length-1].reset&&0===G.interactionIdx)?setTimeout(function(){h?h.call():"none"===f&&(G.player.loop=!1,G.player.autoplay=!1),i&&i.call(),G.player.autoplay&&(G.player.resetSegments(!0),A(G,x).call(G,!0)),G.player.setSpeed(j)},c):A(G,b).call(G)}}),E.set(this,{writable:!0,value:function(b,c){if(-1!==b&&-1!==c){var d=G.getContainerCursorPosition(b,c);b=d.x,c=d.y}var f=G.actions.find(function(a){var d=a.position;if(d){if(Array.isArray(d.x)&&Array.isArray(d.y))return b>=d.x[0]&&b<=d.x[1]&&c>=d.y[0]&&c<=d.y[1];if(!Number.isNaN(d.x)&&!Number.isNaN(d.y))return b===d.x&&c===d.y}return!1});if(f)if("seek"===f.type||"seek"===f.transition){var a=(b-f.position.x[0])/(f.position.x[1]-f.position.x[0]),g=(c-f.position.y[0])/(f.position.y[1]-f.position.y[0]);G.player.playSegments(f.frames,!0),0>f.position.y[0]&&1<f.position.y[1]?G.player.goToAndStop(Math.floor(a*G.player.totalFrames),!0):G.player.goToAndStop(Math.ceil((a+g)/2*G.player.totalFrames),!0)}else"loop"===f.type?G.player.playSegments(f.frames,!0):"play"===f.type?(!0===G.player.isPaused&&G.player.resetSegments(),G.player.playSegments(f.frames)):"stop"===f.type&&(G.player.resetSegments(!0),G.player.goToAndStop(f.frames[0],!0))}}),F.set(this,{writable:!0,value:function(){var b=G.getContainerVisibility(),c=G.actions.find(function(a){var c=a.visibility;return b>=c[0]&&b<=c[1]});if(c)if("seek"===c.type){var d=c.frames[0],e=2==c.frames.length?c.frames[1]:G.player.totalFrames-1;null!==G.assignedSegment&&(G.player.resetSegments(!0),G.assignedSegment=null),G.player.goToAndStop(d+Math.round((b-c.visibility[0])/(c.visibility[1]-c.visibility[0])*(e-d)),!0)}else"loop"===c.type?(G.player.loop=!0,(null===G.assignedSegment||G.assignedSegment!==c.frames||!0===G.player.isPaused)&&(G.player.playSegments(c.frames,!0),G.assignedSegment=c.frames)):"play"===c.type?G.scrolledAndPlayed||(G.scrolledAndPlayed=!0,G.player.resetSegments(!0),c.frames?G.player.playSegments(c.frames,!0):G.player.play()):"stop"===c.type&&G.player.goToAndStop(c.frames[0],!0)}}),this.enteredPlayer=C,"object"!==q(C)||"AnimationItem"!==C.constructor.name){if("string"==typeof C){var J=document.querySelector(C);J&&"LOTTIE-PLAYER"===J.nodeName&&(C=J.getLottie())}else C instanceof HTMLElement&&"LOTTIE-PLAYER"===C.nodeName&&(C=C.getLottie());if(!C){var K="[lottieInteractivity]:Specified player:"+C+" is invalid.";throw new Error(K)}}"string"==typeof l&&(l=document.querySelector(l)),l||(l=C.wrapper),this.player=C,this.loadedAnimation=this.player.path+this.player.fileName+".json",this.attachedListeners=!1,this.container=l,this.mode=n,this.actions=i,this.options=I,this.assignedSegment=null,this.scrolledAndPlayed=!1,this.interactionIdx=0,this.oldInterctionIdx=0,this.clickCounter=0,this.playCounter=0,this.stateHandler=new Map,this.transitionHandler=new Map}var e,i,j;return e=t,(i=[{key:"getContainerVisibility",value:function(){var a=this.container.getBoundingClientRect(),b=a.top,c=a.height;return(window.innerHeight-b)/(window.innerHeight+c)}},{key:"getContainerCursorPosition",value:function(a,b){var c=this.container.getBoundingClientRect(),d=c.top;return{x:(a-c.left)/c.width,y:(b-d)/c.height}}},{key:"initScrollMode",value:function(){this.player.stop(),window.addEventListener("scroll",A(this,F),!0)}},{key:"initCursorMode",value:function(){this.actions&&1===this.actions.length?"click"===this.actions[0].type?(this.player.loop=!1,this.player.stop(),this.container.addEventListener("click",A(this,d))):"hover"===this.actions[0].type?(this.player.loop=!1,this.player.stop(),this.container.addEventListener("mouseenter",A(this,d)),this.container.addEventListener("touchstart",A(this,d),{passive:!0})):"toggle"===this.actions[0].type?(this.player.loop=!1,this.player.stop(),this.container.addEventListener("click",A(this,p))):"hold"===this.actions[0].type||"pauseHold"===this.actions[0].type?(this.container.addEventListener("mouseenter",A(this,g)),this.container.addEventListener("mouseleave",A(this,B)),this.container.addEventListener("touchstart",A(this,g),{passive:!0}),this.container.addEventListener("touchend",A(this,B),{passive:!0})):"seek"===this.actions[0].type&&(this.player.loop=!0,this.player.stop(),this.container.addEventListener("mousemove",A(this,h)),this.container.addEventListener("touchmove",A(this,r),{passive:!1}),this.container.addEventListener("mouseout",A(this,u))):(this.player.loop=!0,this.player.stop(),this.container.addEventListener("mousemove",A(this,h)),this.container.addEventListener("mouseleave",A(this,u)),A(this,E).call(this,-1,-1))}},{key:"initChainMode",value:function(){A(this,o).call(this),this.player.loop=!1,this.player.stop(),A(this,k).call(this,{ignorePath:!1})}},{key:"start",value:function(){var a=this;"scroll"===this.mode?this.player.isLoaded?this.initScrollMode():this.player.addEventListener("DOMLoaded",function(){a.initScrollMode()}):"cursor"===this.mode?this.player.isLoaded?this.initCursorMode():this.player.addEventListener("DOMLoaded",function(){a.initCursorMode()}):"chain"===this.mode&&(this.player.isLoaded?this.initChainMode():this.player.addEventListener("DOMLoaded",function(){a.initChainMode()}))}},{key:"redefineOptions",value:function(a){var b=a.actions,d=a.container,e=a.mode,f=a.player,g=z(a,["actions","container","mode","player"]);if(this.stop(),this.enteredPlayer=f,"object"!==q(f)||"AnimationItem"!==f.constructor.name){if("string"==typeof f){var h=document.querySelector(f);h&&"LOTTIE-PLAYER"===h.nodeName&&(f=h.getLottie())}else f instanceof HTMLElement&&"LOTTIE-PLAYER"===f.nodeName&&(f=f.getLottie());if(!f)throw new Error("[lottieInteractivity]:Specified player:"+f+" is invalid.",f)}"string"==typeof d&&(d=document.querySelector(d)),d||(d=f.wrapper),this.player=f,this.loadedAnimation=this.player.path+this.player.fileName+".json",this.attachedListeners=!1,this.container=d,this.mode=e,this.actions=b,this.options=g,this.assignedSegment=null,this.scrolledAndPlayed=!1,this.interactionIdx=0,this.clickCounter=0,this.playCounter=0,this.holdStatus=null,this.stateHandler=new Map,this.transitionHandler=new Map,this.start()}},{key:"stop",value:function(){if("scroll"===this.mode&&window.removeEventListener("scroll",A(this,F),!0),"cursor"===this.mode&&(this.container.removeEventListener("click",A(this,d)),this.container.removeEventListener("click",A(this,p)),this.container.removeEventListener("mouseenter",A(this,d)),this.container.removeEventListener("touchstart",A(this,d)),this.container.removeEventListener("touchmove",A(this,r)),this.container.removeEventListener("mousemove",A(this,h)),this.container.removeEventListener("mouseleave",A(this,u)),this.container.removeEventListener("touchstart",A(this,g)),this.container.removeEventListener("touchend",A(this,B))),"chain"===this.mode&&(this.container.removeEventListener("click",A(this,d)),this.container.removeEventListener("click",A(this,c)),this.container.removeEventListener("mouseenter",A(this,d)),this.container.removeEventListener("touchstart",A(this,d)),this.container.removeEventListener("touchmove",A(this,r)),this.container.removeEventListener("mouseenter",A(this,c)),this.container.removeEventListener("touchstart",A(this,c)),this.container.removeEventListener("mouseenter",A(this,g)),this.container.removeEventListener("touchstart",A(this,g)),this.container.removeEventListener("mouseleave",A(this,B)),this.container.removeEventListener("mousemove",A(this,h)),this.container.removeEventListener("mouseout",A(this,u)),this.container.removeEventListener("touchend",A(this,B)),this.player))try{this.player.removeEventListener("loopComplete",A(this,v)),this.player.removeEventListener("complete",A(this,v)),this.player.removeEventListener("enterFrame",A(this,f)),this.player.removeEventListener("enterFrame",A(this,y))}catch(a){}this.player=null}}])&&n(e.prototype,i),j&&n(e,j),t}(),o=new WeakMap,c=new WeakMap,p=new WeakMap,d=new WeakMap,h=new WeakMap,r=new WeakMap,u=new WeakMap,v=new WeakMap,m=new WeakMap,f=new WeakMap,y=new WeakMap,g=new WeakMap,B=new WeakMap,w=new WeakMap,D=new WeakMap,x=new WeakMap,b=new WeakMap,k=new WeakMap,E=new WeakMap,F=new WeakMap,e=function(a){var b=new i(a);return b.start(),b};j.LottieInteractivity=i,j.create=e,j.default=e,Object.defineProperty(j,"__esModule",{value:!0})});
| ver. 1.4 |
Github
|
.
| PHP 7.4.33 | Generation time: 0 |
proxy
|
phpinfo
|
Settings