!function(t,e){function n(t){this.message=t}function o(t,e){return Object.keys(e).forEach(function(n){t[n]=e[n]}),t}Object.keys||(Object.keys=function(){"use strict";var t=Object.prototype.hasOwnProperty,e=!{toString:null}.propertyIsEnumerable("toString"),n=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],o=n.length;return function(i){if("object"!=typeof i&&("function"!=typeof i||null===i))throw new TypeError("Object.keys called on non-object");var r,s,a=[];for(r in i)t.call(i,r)&&a.push(r);if(e)for(s=0;s<o;s++)t.call(i,n[s])&&a.push(n[s]);return a}}());var i="undefined"!=typeof exports?exports:self,r="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";n.prototype=new Error,n.prototype.name="InvalidCharacterError",i.btoa||(i.btoa=function(t){for(var e,o,i=String(t),s=0,a=r,l="";i.charAt(0|s)||(a="=",s%1);l+=a.charAt(63&e>>8-s%1*8)){if(o=i.charCodeAt(s+=.75),o>255)throw new n("'btoa' failed: The string to be encoded contains characters outside of the Latin1 range.");e=e<<8|o}return l}),i.atob||(i.atob=function(t){var e=String(t).replace(/=+$/,"");if(e.length%4==1)throw new n("'atob' failed: The string to be decoded is not correctly encoded.");for(var o,i,s=0,a=0,l="";i=e.charAt(a++);~i&&(o=s%4?64*o+i:i,s++%4)?l+=String.fromCharCode(255&o>>(-2*s&6)):0)i=r.indexOf(i);return l}),Array.isArray||(Array.isArray=function(t){return"[object Array]"===Object.prototype.toString.call(t)}),!("getComputedStyle"in this)&&(this.getComputedStyle=function(){function t(e,n,o,i){var r,s=n[o],a=parseFloat(s),l=s.split(/\d/)[0];return i=null!=i?i:/%|em/.test(l)&&e.parentElement?t(e.parentElement,e.parentElement.currentStyle,"fontSize",null):16,r="fontSize"==o?i:/width/i.test(o)?e.clientWidth:e.clientHeight,"em"==l?a*i:"in"==l?96*a:"pt"==l?96*a/72:"%"==l?a/100*r:a}function e(t,e){var n="border"==e?"Width":"",o=e+"Top"+n,i=e+"Right"+n,r=e+"Bottom"+n,s=e+"Left"+n;t[e]=(t[o]==t[i]==t[r]==t[s]?[t[o]]:t[o]==t[r]&&t[s]==t[i]?[t[o],t[i]]:t[s]==t[i]?[t[o],t[i],t[r]]:[t[o],t[i],t[r],t[s]]).join(" ")}function n(n){var o=n.currentStyle,i=this,r=t(n,o,"fontSize",null);for(property in o)/width|height|margin.|padding.|border.+W/.test(property)&&"auto"!==i[property]?i[property]=t(n,o,property,r)+"px":"styleFloat"===property?i["float"]=o[property]:i[property]=o[property];return e(i,"margin"),e(i,"padding"),e(i,"border"),i.fontSize=r+"px",i}function o(t){return new n(t)}return n.prototype={constructor:n,getPropertyPriority:function(){},getPropertyValue:function(t){return this[t]||""},item:function(){},removeProperty:function(){},setProperty:function(){},getPropertyCSSValue:function(){}},o}(this)),"document"in self&&("classList"in document.createElement("_")?!function(){"use strict";var t=document.createElement("_");if(t.classList.add("c1","c2"),!t.classList.contains("c2")){var e=function(t){var e=DOMTokenList.prototype[t];DOMTokenList.prototype[t]=function(t){var n,o=arguments.length;for(n=0;n<o;n++)t=arguments[n],e.call(this,t)}};e("add"),e("remove")}if(t.classList.toggle("c3",!1),t.classList.contains("c3")){var n=DOMTokenList.prototype.toggle;DOMTokenList.prototype.toggle=function(t,e){return 1 in arguments&&!this.contains(t)==!e?e:n.call(this,t)}}t=null}():!function(t){"use strict";if("Element"in t){var e="classList",n="prototype",o=t.Element[n],i=Object,r=String[n].trim||function(){return this.replace(/^\s+|\s+$/g,"")},s=Array[n].indexOf||function(t){for(var e=0,n=this.length;e<n;e++)if(e in this&&this[e]===t)return e;return-1},a=function(t,e){this.name=t,this.code=DOMException[t],this.message=e},l=function(t,e){if(""===e)throw new a("SYNTAX_ERR","An invalid or illegal string was specified");if(/\s/.test(e))throw new a("INVALID_CHARACTER_ERR","String contains an invalid character");return s.call(t,e)},c=function(t){for(var e=r.call(t.getAttribute("class")||""),n=e?e.split(/\s+/):[],o=0,i=n.length;o<i;o++)this.push(n[o]);this._updateClassName=function(){t.setAttribute("class",this.toString())}},u=c[n]=[],p=function(){return new c(this)};if(a[n]=Error[n],u.item=function(t){return this[t]||null},u.contains=function(t){return t+="",l(this,t)!==-1},u.add=function(){var t,e=arguments,n=0,o=e.length,i=!1;do t=e[n]+"",l(this,t)===-1&&(this.push(t),i=!0);while(++n<o);i&&this._updateClassName()},u.remove=function(){var t,e,n=arguments,o=0,i=n.length,r=!1;do for(t=n[o]+"",e=l(this,t);e!==-1;)this.splice(e,1),r=!0,e=l(this,t);while(++o<i);r&&this._updateClassName()},u.toggle=function(t,e){t+="";var n=this.contains(t),o=n?e!==!0&&"remove":e!==!1&&"add";return o&&this[o](t),e===!0||e===!1?e:!n},u.toString=function(){return this.join(" ")},i.defineProperty){var d={get:p,enumerable:!0,configurable:!0};try{i.defineProperty(o,e,d)}catch(f){f.number===-2146823252&&(d.enumerable=!1,i.defineProperty(o,e,d))}}else i[n].__defineGetter__&&o.__defineGetter__(e,p)}}(self)),Array.prototype.indexOf||(Array.prototype.indexOf=function(t,e){var n;if(null==this)throw new TypeError('"this" is null or not defined');var o=Object(this),i=o.length>>>0;if(0===i)return-1;var r=+e||0;if(Math.abs(r)===1/0&&(r=0),r>=i)return-1;for(n=Math.max(r>=0?r:i-Math.abs(r),0);n<i;){if(n in o&&o[n]===t)return n;n++}return-1}),console.log2=function(t){t instanceof Object&&(t=JSON.stringify(t,null,2)),!!document.getElementById("error-log")&&(document.getElementById("error-log").innerHTML+=t+" \n")};var s=!1,a=!1,l=function(){function n(t,e,n){var i=btoa(JSON.stringify(t));o.ajax(o.getCliplisterDomain()+"lc/"+e+"/?"+i,function(t){try{for(var e=JSON.parse(t.responseText),o=0;o<e.length;o++){var i=e[o].request;"function"==typeof n[o]&&n[o](i)}}catch(r){"function"==typeof n[0]&&n[0](t.responseText)}})}var o=this,i={},r={},l={},c={};this.addViewer=function(t){i[t.prototype.version]=t},this.addStage=function(t){r[t.prototype.type]||(r[t.prototype.type]={}),r[t.prototype.type][t.prototype.version]||(r[t.prototype.type][t.prototype.version]=t)},this.addPlugin=function(t){l[t.prototype.name]||(l[t.prototype.name]={}),l[t.prototype.name][t.prototype.version]=t},this.ajax=function(){var e,n,o;if(2==arguments.length)e=arguments[0],n=arguments[1];else if(3==arguments.length)e=arguments[0],n=arguments[1],o=arguments[2];else if("undefined"!=typeof this._ajax)return this._ajax.apply(this,arguments);var i=null;!t.XDomainRequest&&t.XMLHttpRequest?(i=new XMLHttpRequest,i.open("GET",e,!0),i.timeout=5e3,i.onreadystatechange=function(){if(4==i.readyState){if(200==i.status&&""!=i.responseText)return"undefined"!=typeof n&&n(i),i;"undefined"!=typeof o?o(i):"undefined"!=typeof n&&n(""),i.abort()}}):(i=new XDomainRequest,i.timeout=5e3,i.onload=function(){n(i)},i.onprogress=function(){},i.ontimeout=function(){},i.onerror=function(){"undefined"!=typeof o&&o(i)},i.open("GET",e)),t.setTimeout(function(){i.send()},1)},this.getCliplisterDomain=function(){return a?(a.startsWith("http")||(a=t.location.protocol+"//"+a),a.endsWith("/")||(a+="/"),a):s?t.location.protocol+"//dev.mycliplister.com/":t.location.protocol+"//mycliplister.com/"},this.isDevelopment=function(){return s},this.Viewer=function(e){"undefined"!=typeof e.overrideURL&&(a=e.overrideURL),"undefined"!=typeof e.dev&&"iknowwhatimdoing"==e.dev&&(s=!0);var n=document.createElement("video"),o=!!n.canPlayType;if(o){if(!(i.length>1))return i[Object.keys(i)[0]](e);if(e.version)return i[e.version](e);this.log("If multiple viewers are loaded, a version is required.",1)}else if(e.backgroundvideo){var r=document.createElement("div");r.className="cliplister-viewer-background-fallback",r.style.position="absolute",r.style.top="0px",r.style.left="0px",r.style.backgroundColor="#FFFFFF",r.style.backgroundPosition="center center",r.style.backgroundSize="cover",r.style.width="100%",r.style.height="100%";var l=document.createElement("img");l.src="undefined"!=typeof e.fallback?e.fallback.bgimage:("https:"==t.location.protocol?"https:":"http:")+"//mycliplister.com/static/viewer/assets/fallback/outdated.png",l.style.backgroundColor="#FFFFFF",l.style.padding="0px",l.style.textAlign="center",l.style.width="100%",l.style.height="100%",l.style.margin="auto",r.appendChild(l),document.getElementById(e.parentId).appendChild(r)}else{var r=document.createElement("div");r.className="cliplister-viewer-notice",r.style.position="absolute",r.style.top="0px",r.style.left="0px";var l=document.createElement("img");l.src="undefined"!=typeof e.fallback?e.fallback.image:("https:"==t.location.protocol?"https:":"http:")+"//mycliplister.com/static/viewer/assets/fallback/outdated.png",l.style.backgroundColor="#FFFFFF",l.style.padding="10px",l.style.textAlign="center",l.style.height="100%",l.style.margin="auto",r.appendChild(l);var c=document.createElement("div");c.innerHTML='<a href="'+("undefined"!=typeof e.fallback?e.fallback.link:"https://www.google.com")+'">'+("undefined"!=typeof e.fallback?e.fallback.linktext:"https://www.google.com")+"</a>",c.style.backgroundColor="#FFFFFF",c.style.padding="10px",c.style.textAlign="center",r.style.backgroundColor="#FFFFFF",r.style.backgroundPosition="center center",r.style.backgroundSize="cover",r.style.width="100%",r.style.height="100%",document.getElementById(e.parentId).appendChild(r)}},this.callStage=function(){return r.video["1.0"]()},this.getStage=function(t,n){return r[t]?1==Object.keys(r[t]).length?n!==e?r[t][n]?r[t][n]:void this.log("The "+t+" stage in version "+n+" is not loaded.",1):r[t][Object.keys(r[t])[0]]:n!==e?r[t][n]?r[t][n]:void this.log("The "+t+" stage in version "+n+" is not loaded.",1):void this.log("If multiple stages of the same type are loaded, a version is required.",1):void this.log("No stage of type "+t+" is loaded.",1)},this.getPlugin=function(t,n){return l[t]?1==Object.keys(l[t]).length?n!==e?l[t][n]?l[t][n]:void this.log("The plugin "+t+" in version "+n+" is not loaded.",1):l[t][Object.keys(l[t])[0]]:n!==e?l[t][n]?l[t][n]:void this.log("The plugin "+t+" in version "+n+" is not loaded.",1):void this.log("If multiple plugins with the same name are loaded, a version is required.",1):void this.log("No plugin "+t+" is loaded.",1)},this.log=function(t,e){console.debug(t)},this.requestLiveConnectCall=function(t,e,o){c[e]||(c[e]={timer:null,requests:[],callbacks:[]}),clearTimeout(c[e].timer),c[e].requests.push(t),c[e].callbacks.push(o),c[e].timer=setTimeout(function(){!function(t,e){n(t.requests,e,t.callbacks)}(c[e],e),c[e].requests=[],c[e].callbacks=[]},100)}};"undefined"==typeof t.Cliplister?t.Cliplister={}:"undefined"!=typeof t.Cliplister.ajax&&(t.Cliplister._ajax=t.Cliplister.ajax);var c=new l;t.Cliplister=o(t.Cliplister,c);var u=decodeURIComponent((new RegExp("[?|&]viewer_token=([^&;]+?)(&|#|;|$)").exec(location.search)||[,""])[1].replace(/\+/g,"%20"))||null;u&&t.Cliplister.ajax("token/decrypt.php?t="+u,function(t){})}(window,void 0);!function(window,undefined){var VERSION="1.5",CLViewer=function(_params){function addEvent(e,t,n){e.addEventListener?e.addEventListener(t,n,!1):e.attachEvent&&e.attachEvent("on"+t,n)}function removeEvent(e,t,n){e.removeEventListener?e.removeEventListener(t,n,!1):e.detachEvent&&e.detachEvent("on"+t,n)}function addMovementListener(e,t){movementListeners[e]||(movementListeners[e]={listeners:[]}),movementListeners[e].listeners.push(t),movementListeners[e].element&&triggerMovementListeners(movementListeners[e].element)}function animateElementPositionWithinInnerPlugin(e,t,n,i,s,a){var r=getPluginIdByElement(e);if(r){var o=getPluginById(r);if(o){o.animation!==undefined&&null!==o.animation&&clearInterval(o.animation);var l;"top"==t&&(l=parseInt(e.style.top)),"left"==t&&(l=parseInt(e.style.left)),"bottom"==t&&(l=parseInt(getComputedStyle(elements.innerPluginsContainer).height)-(parseInt(e.style.top)+parseInt(getComputedStyle(e).height))),"right"==t&&(l=parseInt(getComputedStyle(elements.innerPluginsContainer).width)-(parseInt(e.style.left)+parseInt(getComputedStyle(e).width)));var u=distanceToPx(n,"top"==t||"bottom"==t?parseInt(getComputedStyle(elements.innerPluginsContainer).height):parseInt(getComputedStyle(elements.innerPluginsContainer).width));e.setAttribute("data-cl-animating",!0),enableCSSTransition(e,i,function(){e.removeAttribute("data-cl-animating"),s!==undefined&&s&&s()},!0),reSetElementPosition(e,t,u,!1,!1),repositionInnerPluginElement(e),triggerMovementListeners(e,!0,i)}}}function buildPlugins(){config.measures={availableWidth:config.dimensions.width,availableHeight:config.dimensions.height,offsets:{top:0,right:0,bottom:0,left:0}},buildOuterPlugins(),buildInnerPlugins(),triggerListeners("pluginsBuilt")}function buildInnerPlugins(){elements.innerPluginsContainer=document.createElement("div"),elements.innerPluginsContainer.style.position="absolute",elements.innerPluginsContainer.style.top=config.measures.offsets.top+"px",elements.innerPluginsContainer.style.left=config.measures.offsets.left+"px",elements.innerPluginsContainer.style.zIndex=1,elements.innerPluginsContainer.height=config.dimensions.height-config.measures.offsets.top-config.measures.offsets.bottom,elements.innerPluginsContainer.width=config.dimensions.width-config.measures.offsets.left-config.measures.offsets.right,elements.innerPluginsContainer.style.width=elements.innerPluginsContainer.width+"px";var e=platform.os.mobile;e=!(exists(params.plugins)&&exists(params.plugins)&&exists(params.plugins.InnerControls)&&exists(params.plugins.InnerControls.mobileDefaultControls)&&!params.plugins.InnerControls.mobileDefaultControls)&&e;"iOS"==platform.os.name&&platform.os.version>="10"&&e;elements.innerPluginsContainer.style.top=config.measures.offsets.top+"px",elements.innerPluginsContainer.style.height=elements.innerPluginsContainer.height+"px",exists(params.assetType)&&"data"==params.assetType&&(elements.innerPluginsContainer.style.display="none"),exists(params.allowOverflow)&&params.allowOverflow||(elements.innerPluginsContainer.style.overflow="hidden"),elements.inner.appendChild(elements.innerPluginsContainer),onMouseenter(elements.innerPluginsContainer,function(){triggerListeners("mouseover"),triggerListeners("mouseenter")}),onMouseleave(elements.innerPluginsContainer,function(){triggerListeners("mouseout"),triggerListeners("mouseleave")});for(var t=0;t<config.plugins.visual.inner.length;t++){var n=config.plugins.visual.inner[t];n.getWrapper().style.position="absolute",n.getWrapper().style.zIndex=n.getLayer(),n.getWrapper().classList.add("cl-inner-plugin-container"),n.getWrapper().style.left="-1px",n.getWrapper().style.top="-1px",n.getWrapper().id=n.getId(),elements.innerPluginsContainer.appendChild(n.getWrapper())}getPluginApi().on("play",function(){var e=platform.os.mobile;e=!(exists(params.plugins)&&exists(params.plugins)&&exists(params.plugins.InnerControls)&&exists(params.plugins.InnerControls.mobileDefaultControls)&&!params.plugins.InnerControls.mobileDefaultControls)&&e;var t="iOS"==platform.os.name&&platform.os.version>="10"&&e;elements.innerPluginsContainer.style.top=config.measures.offsets.top+"px",elements.innerPluginsContainer.style.height=e?elements.innerPluginsContainer.height-50+"px":elements.innerPluginsContainer.height+"px",elements.innerPluginsContainer.style.height=t?parseInt(elements.innerPluginsContainer.style.height-43)+"px":parseInt(elements.innerPluginsContainer.style.height)+"px",elements.innerPluginsContainer.style.top=t?parseInt(elements.innerPluginsContainer.style.top)+43+"px":parseInt(elements.innerPluginsContainer.style.top)+"px",repositionInnerPluginElements()}),getPluginApi().on("stop",function(){elements.innerPluginsContainer.style.top=config.measures.offsets.top+"px",elements.innerPluginsContainer.style.height=elements.innerPluginsContainer.height+"px",repositionInnerPluginElements()})}function buildOuterPlugins(){!function(){config.plugins.visual.outer.sort(function(e,t){return e.priority==t.priority?0:e.priority>t.priority?1:-1})}(),function(){for(var e=0;e<config.plugins.visual.outer.length;e++)config.plugins.visual.outer[e].priority=e}(),function(e){if(config.stage||(config.stage={}),params.stage){var t=capitalizeFirstLetter(e);if(params.stage[e]){var n=distanceToPx(params.stage[e],config[e]);params.stage["min"+t]&&params.stage["min"+t]>n?config.stage[e]=params.stage["min"+t]:params.stage["max"+t]&&params.stage["max"+t]<n?config.stage[e]=params.stage["max"+t]:config.stage[e]=n,config.measures["available"+t]-=config.stage[e]}else params.stage["min"+t]&&(config.stage["min"+t]=params.stage["min"+t],config.measures["available"+t]-=config.stage["min"+t]),params.stage["max"+t]&&(config.stage["max"+t]=params.stage["max"+t])}return arguments.callee}("width")("height"),function(){if(params.stage&&params.stage.aspectRatio){var e=params.stage.aspectRatio.split(":");if(params.stage.width&&!params.stage.height){var t=config.stage.width/e[0]*e[1];config.stage.minHeight&&t<config.stage.minHeight?config.stage.height=config.stage.minHeight:params.stage.maxHeight&&t>config.stage.maxHeight?config.stage.height=config.stage.maxHeight:config.stage.height=t,exists(config.stage.minHeight)&&(config.measures.availableHeight+=config.stage.minHeight),config.measures.availableHeight-=config.stage.height}else if(params.stage.height&&!params.stage.width){var n=config.stage.height/e[0]*e[1];config.stage.minWidth&&n<config.stage.minWidth?config.stage.width=config.stage.minWidth:params.stage.maxWidth&&n>config.stage.maxWidth?config.stage.width=config.stage.maxWidth:config.stage.width=n,exists(config.stage.minWidth)&&(config.measures.availableWidth+=config.stage.minWidth),config.measures.availableWidth-=config.stage.width}}}(),function(){for(var e=0;e<config.plugins.visual.outer.length;e++){var t,n,i=config.plugins.visual.outer[e];if("top"==i.position||"bottom"==i.position?(i.align="horizontal",t="height",n="Height"):(i.align="vertical",t="width",n="Width"),i.getParams()[t]){i.dynamic=!1;var s=distanceToPx(i.getParams()[t],config[t]);i.getParams()["min"+n]&&i.getParams()["min"+n]>s?i[t]=i.getParams()["min"+n]:i.getParams()["max"+n]&&i.getParams()["max"+n]<s?i[t]=i.getParams()["max"+n]:i[t]=s,i[t]<=config.measures["available"+n]?config.measures["available"+n]-=i[t]:i.hidden=!0}else i.dynamic=!0,i.getParams()["min"+n]&&(i["min"+n]=i.getParams()["min"+n],i.getParams()["min"+n]<=config.measures["available"+n]?config.measures["available"+n]-=i.getParams()["min"+n]:i.hidden=!0),i.getParams()["max"+n]&&(i["max"+n]=i.getParams()["max"+n])}}(),function(){var e=new Array,t=new Array,n=0,i=new Array,s=new Array,a=0;!function(){for(var r=0;r<config.plugins.visual.outer.length;r++){var o=config.plugins.visual.outer[r];!o.hidden&&o.dynamic&&("vertical"==o.align?(e.push(o),n++,o.minWidth&&(t.push(o),config.measures.availableWidth+=o.minWidth)):"horizontal"==o.align&&(i.push(o),a++,o.minHeight&&(s.push(o),config.measures.availableHeight+=o.minHeight)))}}(),!config.stage.height&&config.stage.minHeight&&(config.measures.availableHeight+=config.stage.minHeight),!config.stage.width&&config.stage.minWidth&&(config.measures.availableWidth+=config.stage.minWidth);var r,o=config.stage.width?0:1,l=config.measures.availableWidth/(n+o);do{r=!1;for(var u=0;u<t.length;u++){var g=t[u];if(!g.width&&g.minWidth>l){g.width=g.minWidth,n--,config.measures.availableWidth-=g.width,l=config.measures.availableWidth/(n+o),r=!0;break}}}while(r);!config.stage.width&&config.stage.minWidth&&config.stage.minWidth>l&&(config.stage.width=config.stage.minWidth,o=0,config.measures.availableWidth-=config.stage.width,l=config.measures.availableWidth/(n+o));do{r=!1;for(var u=0;u<e.length;u++){var g=e[u];if(!g.width&&l>g.maxWidth){g.width=g.maxWidth,n--,config.measures.availableWidth-=g.width,l=config.measures.availableWidth/(n+o),r=!0;break}}}while(r);for(var u=0;u<e.length;u++){var g=e[u];g.width||(g.width=l)}var p=config.stage.height?0:1,c=config.measures.availableHeight/(a+p);do{r=!1;for(var u=0;u<s.length;u++){var g=s[u];if(!g.height&&g.minHeight>c){g.height=g.minHeight,a--,config.measures.availableHeight-=g.height,c=config.measures.availableHeight/(a+p),r=!0;break}}}while(r);!config.stage.height&&config.stage.minHeight&&config.stage.minHeight>c&&(config.stage.height=config.stage.minHeight,p=0,config.measures.availableHeight-=config.stage.height,c=config.measures.availableHeight/(a+p));do{r=!1;for(var u=0;u<i.length;u++){var g=i[u];if(!g.height&&c>g.maxHeight){g.height=g.maxHeight,a--,config.measures.availableHeight-=g.height,c=config.measures.availableHeight/(a+p),r=!0;break}}}while(r);for(var u=0;u<i.length;u++){var g=i[u];g.height||(g.height=c)}}(),function(){for(var e=0;e<config.plugins.visual.outer.length;e++){var t=config.plugins.visual.outer[e];if(!t.hidden){t.getWrapper().style.position="absolute",t.getWrapper().classList.add("cl-outer-plugin-container"),t.getWrapper().style.display=t.hidden?"none":"block";var n,i,s=["top","right","bottom","left"];"horizontal"==t.align?(i="height",n="top"==t.position?0:2):(i="width",n="right"==t.position?1:3),t.getWrapper().style[s[n]]=config.measures.offsets[s[n]]+"px",t.getWrapper().style[s[(n-1+4)%4]]=config.measures.offsets[s[(n-1+4)%4]]+"px",t.getWrapper().style[s[(n+1+4)%4]]=config.measures.offsets[s[(n+1+4)%4]]+"px",t.getWrapper().style[i]=t[i]+"px",t.getWrapper().id=t.getId(),config.measures.offsets[s[n]]+=t[i],elements.inner.appendChild(t.getWrapper())}}}()}function callIntervalFunctions(){for(var e=0;e<interval.timeouts.length;e++){var t=interval.timeouts[e];if(interval.counter%t==0)for(var n=0;n<interval.fns[t].length;n++)interval.fns[t][n]()}interval.counter=interval.counter==interval.maxTimeout-interval.globalTimeout?0:1*interval.counter+1*interval.globalTimeout}function callStage(e,t){return!(!exists(stage)||!exists(stage[e]))&&(t=Array.isArray(t)?t:[t],stage[e].apply(stage,t))}function camelCaseToDashed(e){return e.replace(/([A-Z])/g,function(e){return"-"+e.toLowerCase()})}function capitalizeFirstLetter(e){return e.charAt(0).toUpperCase()+e.slice(1)}function clearInterval(e){if(window.clearInterval(interval.instance),e&&e.timeout&&interval.fns[e.timeout]){var t=interval.fns[e.timeout].indexOf(e);if(t>-1){interval.fns[e.timeout].splice(t,1);var n=interval.timeouts.indexOf(e.timeout);n>-1&&interval.timeouts.splice(n,1)}adjustViewerInterval()}}function collectAssetsInformation(){}function dashedToCamelCase(e){return e.toLowerCase().replace(/-(.)/g,function(e,t){return t.toUpperCase()})}function dataset(e,t,n){function i(t,n){o?e.dataset[t]=n:e.setAttribute("data-"+camelCaseToDashed(t),n)}function s(t){return o?e.dataset[t]:e.getAttribute("data-"+camelCaseToDashed(t))}function a(t){o?delete e.dataset[t]:e.removeAttribute("data-"+camelCaseToDashed(t))}function r(){if(o){for(var t=e.dataset,n=Object.keys(t),i={},s=0;s<n.length;s++)i[n[s]]=t[n[s]];return i}for(var a=e.attributes,n=Object.keys(a),i={},s=0;s<n.length;s++)/^data\-(.+)$/.test(a[s].nodeName)&&(i[a[s].nodeName]=a[s].nodeValue);return i}if("undefined"!=typeof document&&document.head){var o=!!document.head.dataset,l={set:i,get:s,del:a,toObject:r};return 3===arguments.length?i(t,n):2==arguments.length?s(t):l}}function debug(){return{}}function destroy(){config&&config.parent&&elements.inner&&config.parent.removeChild(elements.inner)}function detectPlatform(){platform.os={name:"os",version:0,mobile:!1},platform.browser={name:"",version:0,html5:{basic:!1,h264:"",ogg:"",webm:""}};var e=navigator.userAgent,t=document.createElement("video");if(platform.browser.html5.basic=!!t.canPlayType,platform.browser.html5.basic&&(platform.browser.html5.h264=t.canPlayType('video/mp4; codecs="avc1.42E01E, mp4a.40.2"'),platform.browser.html5.ogg=t.canPlayType('video/ogg; codecs="theora, vorbis"'),platform.browser.html5.webm=t.canPlayType('video/webm; codecs="vp8, vorbis"')),platform.os.mobile=!!e.match(/(iPad)|(iPhone)|(iPod)|(android)|(windows phone)/i),platform.os.mobile?(/Android[\/\s](\d+\.\d+)/.test(e)&&(platform.os.name="Android",platform.os.version=new Number(RegExp.$1)),/Windows[\/\s](\d+\.\d+)/.test(e)&&(platform.os.name="Windows Phone",platform.os.version=new Number(RegExp.$1)),/(iPhone|iPad|iPod).*( \d+_\d+)/.test(e)&&(platform.os.name="iOS",platform.os.version=parseInt(RegExp.$1)?parseInt(RegExp.$1):parseInt(RegExp.$2))):(/Windows NT[\/\s](\d+\.\d+)/.test(e)&&(platform.os.name="Windows NT",platform.os.version=new Number(RegExp.$1)),/OS X[\/\s](\d+_\d+)/.test(e)&&(platform.os.name="OS X",platform.os.version=new Number(RegExp.$1))),platform.os.mobile)/Firefox[\/\s](\d+\.\d+)/.test(e)?(platform.browser.name="FirefoxMobile",platform.browser.version=new Number(RegExp.$1)):/IEMobile[\/\s](\d+\.\d+)/.test(e)?(platform.browser.name="IEMobile",platform.browser.version=new Number(RegExp.$1)):/Edge[\/\s](\d+\.\d+)/.test(e)?(platform.browser.name="EdgeMobile",platform.browser.version=new Number(RegExp.$1)):/Opera[\/\s](\d+\.\d+)/.test(e)?(platform.browser.name="OperaMobile",platform.browser.version=new Number(RegExp.$1)):/(Chrome|CriOS)[\/\s](\d+\.\d+)/.test(e)?(platform.browser.name="ChromeMobile",platform.browser.version=new Number(RegExp.$2)):/Safari[\/\s](\d+\.\d+)/.test(e)&&(platform.browser.name="SafariMobile",platform.browser.version=new Number(RegExp.$1));else if(/Firefox[\/\s](\d+\.\d+)/.test(e))platform.browser.name="Firefox",platform.browser.version=new Number(RegExp.$1);else if(e.indexOf("MSIE")!=-1||e.indexOf("Trident")!=-1){if(e.indexOf("MSIE")!=-1)var n=/MSIE (\d+\.\d+)/;else var n=/Trident.*rv[ :]*(\d+\.\d+)/;n.test(e)&&(platform.browser.name="IE",platform.browser.version=new Number(RegExp.$1))}else/Edge[\/\s](\d+\.\d+)/.test(e)?(platform.browser.name="Edge",platform.browser.version=new Number(RegExp.$1)):/OPR\/(\d+\.\d+)/i.test(e)?(platform.browser.name="Opera",platform.browser.version=new Number(RegExp.$1)):/Opera[\/\s](\d+\.\d+)/.test(e)?(platform.browser.name="Opera",platform.browser.version=new Number(RegExp.$1)):/Chrome[\/\s](\d+\.\d+)/.test(e)?(platform.browser.name="Chrome",platform.browser.version=new Number(RegExp.$1)):/Safari[\/\s](\d+\.\d+)/.test(e)&&(platform.browser.name="Safari",platform.browser.version=new Number(RegExp.$1));return platform}function detectFeatures(){var e=document.createElement("div");e.requestFullScreen?features.fullscreen={exitFullscreen:function(){document.exitFullscreen()},fullscreenchange:function(e){addEvent(document,"fullscreenchange",function(){e()})},fullscreenElement:function(){return document.fullscreenElement},fullscreenEnabled:function(){return document.fullscreenEnabled},isFullscreen:function(){return!!this.fullscreenElement()},requestFullscreen:function(e){e.requestFullscreen(),e.stylebackup=JSON.parse(JSON.stringify(e.style)),e.style.width="100%",e.style.height="100%"}}:e.mozRequestFullScreen?features.fullscreen={exitFullscreen:function(){document.mozCancelFullScreen(),callStage("leaveFullscreen")},fullscreenchange:function(e){addEvent(document,"mozfullscreenchange",function(){e()})},fullscreenElement:function(){return document.mozFullScreenElement},fullscreenEnabled:function(){return document.mozFullScreenEnabled},isFullscreen:function(){return!!this.fullscreenElement()},requestFullscreen:function(e){e.mozRequestFullScreen(),e.style.width="100%",e.style.height="100%"}}:e.webkitRequestFullScreen?features.fullscreen={exitFullscreen:function(){document.webkitExitFullscreen()},fullscreenchange:function(e){addEvent(document,"webkitfullscreenchange",function(){e()})},fullscreenElement:function(){return document.webkitFullscreenElement},fullscreenEnabled:function(){return document.webkitFullscreenEnabled},isFullscreen:function(){return!!this.fullscreenElement()},requestFullscreen:function(e){elements.innerPluginsContainer.style.width="100%",elements.innerPluginsContainer.style.height="100%",e.webkitRequestFullscreen(),e.stylebackup=JSON.parse(JSON.stringify(e.style)),e.style.width="100%",e.style.height="100%"}}:e.msRequestFullscreen?features.fullscreen={exitFullscreen:function(){document.msExitFullscreen(),callStage("leaveFullscreen"),elements.inner.style=elements.inner.stylebackup},fullscreenchange:function(e){addEvent(document,"MSFullscreenChange",function(){e()})},fullscreenElement:function(){return document.msFullscreenElement},fullscreenEnabled:function(){return document.msFullscreenEnabled},isFullscreen:function(){return!!this.fullscreenElement()},requestFullscreen:function(e){e.msRequestFullscreen(),e.stylebackup=JSON.parse(JSON.stringify(e.style)),e.style.width="100%",e.style.height="100%"}}:features.fullscreen={exitFullscreen:function(){callStage("leaveFullscreen")},fullscreenchange:function(e){on("stageSet",function(){callStage("onFullscreenChange",[e])},{subsequent:!0})},fullscreenEnabled:function(){return callStage("isFullscreen")},isFullscreen:function(){return callStage("isNativeFullscreen")},requestFullscreen:function(){callStage("enterFullscreen")}}}function disableCSSTransition(e){e&&(e.style["-webkit-transition"]="none",e.style["-o-transition"]="none",e.style["-moz-transition"]="none",e.style["-ms-transition"]="none",e.style.transition="none")}function distanceToPx(e,t){var n=parseInt(e),i=/%$/.test(e);return i?parseInt(t)*(n/100):n}function enableCSSTransition(e,t,n,i){function s(){var t,n={transition:"transitionend","-o-transition":"oTransitionEnd","-moz-transition":"mozTransitionEnd","-webkit-transition":"webkitTransitionEnd"};for(t in n)if(e.style[t]!==undefined)return{css:t,endEvent:n[t]}}function a(){disableCSSTransition(e),removeEvent(e,r.endEvent,a),n!==undefined&&n()}var r=s();e.style[r.css]="all "+t+"ms",i!==undefined&&i&&addEvent(e,r.endEvent,a)}function enableMovementListening(e,t){movementListeners[e]?(movementListeners[e].element=t,triggerMovementListeners(t)):movementListeners[e]={element:t,listeners:[]}}function enableSpaceListener(){addEvent(document,"keypress",function(e){32==e.keyCode&&(isPlaying()?pause():play())})}function enterFullscreen(){features.fullscreen.requestFullscreen(elements.inner)}function exists(e){return"undefined"!=typeof e}function extend(){var e={},t=!1,n=0,i=arguments.length;"[object Boolean]"===Object.prototype.toString.call(arguments[0])&&(t=arguments[0],n++);for(var s=function(n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t&&"[object Object]"===Object.prototype.toString.call(n[i])?e[i]=extend(!0,e[i],n[i]):e[i]=n[i])};n<i;n++){var a=arguments[n];s(a)}return e}function getAsset(){return loadedAsset}function getAssetPosition(){return currentAssetIndex}function getNextAsset(){return getAssetPosition()+1===products[0].assets.length?getAssetPosition():currentAssetIndex+1}function getPrevAsset(){return 0===getAssetPosition()?0:currentAssetIndex-1}function isFirstAsset(){return 0===getAssetPosition()}function isLastAsset(){return getAssetPosition()+1===products[0].assets.length}function getCostumer(){return params.customer}function getBackgroundColor(){return config.backgroundColor}function getCurrentBitrate(){return callStage("getCurrentBitrate")}function getCurrentQuality(){return callStage("getCurrentQuality")}function getDuration(){return"undefined"==typeof stage||isNaN(callStage("getDuration"))?loadedAsset.duration:callStage("getDuration")}function getVideoDownloadLinks(){return!(!exists(loadedAsset)||!exists(loadedAsset.downloadLinks)||null==loadedAsset.downloadLinks)&&(Array.isArray(loadedAsset.downloadLinks)?loadedAsset.downloadLinks:[loadedAsset.downloadLinks])}function getVideoStreamingLinks(){return!(!exists(loadedAsset)||!exists(loadedAsset.streamingLinks)||null==loadedAsset.streamingLinks)&&(Array.isArray(loadedAsset.streamingLinks)?loadedAsset.streamingLinks:[loadedAsset.streamingLinks])}function getPublicApi(){return{clearInterval:clearInterval,destroy:function(){destroy()},enterFullscreen:function(){return enterFullscreen(),getPublicApi()},getCurrentBitrate:function(){return getCurrentBitrate()},getDuration:function(){return getDuration()},getProgressPlayed:function(){return getProgressPlayed()},getTimePlayed:function(){return getTimePlayed()},getTimePlayedMs:function(){return 1e3*getTimePlayed()},getTimeBuffered:function(){return getTimeBuffered()},getPercentBuffered:function(){return getPercentBuffered()},getNextAsset:function(){return getNextAsset()},getPrevAsset:function(){return getPrevAsset()},getVideoDownloadLinks:function(){return getVideoDownloadLinks()},getVideoStreamingLinks:function(){return getVideoStreamingLinks()},playNextAsset:function(){params.playNext=!0,getPluginApi().on("play",function(){params.playNext=!1}),playAsset(getNextAsset())},playPrevAsset:function(){return playAsset(getPrevAsset()),getPublicApi()},hidePlugin:function(e){return hidePlugin(e),getPublicApi()},isDone:function(){return isDone()},isPlaying:function(){return isPlaying()},loadAsset:loadAsset,mute:function(){return mute(),getPublicApi()},onReady:function(e){return on("mediaReady",e),getPublicApi()},onInit:function(e){return on("initDone",e),getPublicApi()},onEnded:function(e){return on("finish",e),getPublicApi()},onFinish:function(e){return on("finish",e),getPublicApi()},onMute:function(e){return on("mute",e),getPublicApi()},onPause:function(e){return on("pause",e),getPublicApi()},onPlay:function(e){return on("play",e),getPublicApi()},onProgress:function(e){return on("progress",e),getPublicApi()},onQualityChange:function(e){return on("qualityChange",e),getPublicApi()},onStop:function(e){return on("stop",e),getPublicApi()},onTrack:function(e){return on("track",e),getPublicApi()},onUnmute:function(e){return on("unmute",e),getPublicApi()},pause:function(){return pause(),getPublicApi()},play:function(){return play(),getPublicApi()},playAsset:playAsset,setVolume:function(e){return setVolume(e),getPublicApi()},showPlugin:function(e){return showPlugin(e),getPublicApi()},stop:function(){return stop(),getPublicApi()},unmute:function(){return unmute(),getPublicApi()},faster:function(){return faster(),getPublicApi()},slower:function(){return slower(),getPublicApi()},getHls:function(){return hls()},adjustSize:function(){return Resizer.check(!0),getPublicApi()}}}function getPluginApi(){return{Counter:Counter,Detector:Detector,addEvent:addEvent,removeEvent:removeEvent,addMovementListener:addMovementListener,ajax:cl.ajax,animateElementPosition:animateElementPositionWithinInnerPlugin,clearInterval:clearInterval,dashSeparatedToCamelCase:dashedToCamelCase,dataset:dataset,disableCSSTransition:disableCSSTransition,distanceToPx:distanceToPx,enableCSSTransition:enableCSSTransition,enableMovementListening:enableMovementListening,enterFullscreen:enterFullscreen,exists:exists,extend:extend,features:function(){return features},platform:function(){return platform},isIOS10:function(){return"iOS"==platform.os.name&&platform.os.version>="10"},getAsset:getAsset,loadAsset:loadAsset,getNextAsset:getNextAsset,getPrevAsset:getPrevAsset,isFirstAsset:isFirstAsset,isLastAsset:isLastAsset,playNextAsset:function(){params.playNext=!0,getPluginApi().on("play",function(){params.playNext=!1}),playAsset(getNextAsset())},playPrevAsset:function(){playAsset(getPrevAsset())},getAssetPosition:getAssetPosition,getCostumer:getCostumer,getProducts:function(){return products},getBackgroundColor:getBackgroundColor,getCurrentBitrate:getCurrentBitrate,getCurrentQuality:getCurrentQuality,getVidSrc:getVidSrc,getDuration:getDuration,getPluginById:getPluginById,getPluginIdByElement:getPluginIdByElement,getProgressPlayed:getProgressPlayed,getStageDimension:getStageDimension,getTimePlayed:getTimePlayed,getTimeBuffered:getTimeBuffered,getPercentBuffered:getPercentBuffered,getVolume:getVolume,getVideoDownloadLinks:getVideoDownloadLinks,getVideoStreamingLinks:getVideoStreamingLinks,hideCursor:hideCursor,hidePlugin:hidePlugin,isLooping:isLooping,isPlayNext:isPlayNext,isDone:isDone,isFullscreen:isFullscreen,isMuted:isMuted,isPlaying:isPlaying,isQualityOverride:isQualityOverride,isStopped:isStopped,leaveFullscreen:leaveFullscreen,log:cl.log,mute:mute,off:off,on:on,onMouseenter:onMouseenter,onMouseleave:onMouseleave,onPlay:function(e){on("play",e)},onProgress:function(e){on("progress",e)},onTimeupdate:function(e){on("timeupdate",e)},onPluginsBuilt:function(e){on("pluginsBuilt",e)},onStageReady:function(e){on("stageReady",e)},onResize:function(e){on("resize",e)},pad:pad,pause:pause,play:play,setElementPosition:setElementPositionWithinInnerPlugin,setElementSize:setElementSizeWithinInnerPlugin,setProgressPlayed:setProgressPlayed,setQuality:setQuality,setVolume:setVolume,showCursor:showCursor,showPlugin:showPlugin,stop:stop,transparentBackground:transparentBackground,triggerListeners:triggerListeners,unmute:unmute,onSpeedChange:onSpeedChange,getCurrentSpeed:getCurrentSpeed,faster:faster,slower:slower,showDefaultControls:showDefaultControls,hideDefaultControls:hideDefaultControls,hls:hls,resetSpeed:resetSpeed,changeQuality:changeQuality,getAvailableQualities:getAvailableQualities,setAvailableQualities:setAvailableQualities,setQualityOverride:setQualityOverride,zoomImage:zoomImage,zoomPage:zoomPage,prevImage:prevImage,nextImage:nextImage,firstImage:firstImage,lastImage:lastImage,prevPage:prevPage,nextPage:nextPage,firstPage:firstPage,lastPage:lastPage,prevLvl:prevLvl,nextLvl:nextLvl,checkResize:checkResize,resetViewerSize:resetViewerSize,getCurrentPage:getCurrentPage,getPageCount:getPageCount,getPDFTitle:getPDFTitle}}function getPluginById(e){function t(n){var i=null;if(n instanceof Array)for(var s=0;s<n.length&&(i=t(n[s]),i===undefined);s++);else{if(n.getId)return n.getId()==e?n:void 0;for(var a in n)if((n[a]instanceof Object||n[a]instanceof Array)&&(i=t(n[a])))break}return i}return t(config.plugins)}function getPluginIdByElement(e){if(e){if(e.className&&"cliplister-viewer"==e.className)return;return e.id?e.id:getPluginIdByElement(e.parentNode)}}function getProgressPlayed(){return callStage("getProgressPlayed")}function getCurrentSpeed(){return callStage("getCurrentSpeed")}function getPDFDetails(){cl.ajax(params.pdf.xml,function(e){var t=parseXml(e.responseText);return params.pdf.id=t.getElementsByTagName("asset_id")[0].textContent.trim()||!1,params.pdf.title=t.getElementsByTagName("asset_title")[0].textContent.trim()||"",console.log2("Zweiter Call um weitere Details, wie asset ID und Titel, auf Basis des ersten Calls abzurufen."),console.log2("URL: "+params.pdf.xml),console.log2(JSON.stringify(params.pdf,null,2)),console.log2("______________________________________________________________________________________________"),params.pdf.id===!1?(console.log("id could not be retrieved. Aborting..."),triggerListeners("fatalAbort"),!1):void cl.ajax(params.pdf.baseUrl+"c2/-/"+params.pdf.id+"?clmeta",function(e){var t=JSON.parse(e.responseText);Object.assign(params.pdf,t);for(var n=params.pdf.pages[0].resolution.split("x"),i=0;i<n.length;i++)n[i]=parseInt(n[i]);return params.stage.aspectRatio=(n[0]>n[1]?n[0]:2*n[0])+":"+n[1],Resizer.check(!0),params.pdf.pages.length?(console.log2("Dritter Call um alle noetigen Details auf Basis der ersten 2 Calls abzurufen."),console.log2("URL: "+params.pdf.baseUrl+"c2/-/"+params.pdf.id+"?clmeta"),console.log2(JSON.stringify(params.pdf,null,2)),console.log2("______________________________________________________________________________________________"),void triggerListeners("pdfDataLoaded")):(console.log("pages could not be retrieved. Aborting..."),triggerListeners("fatalAbort"),!1)},function(e){console.log("Error while collecting data. Aborting..."),triggerListeners("fatalAbort")})})}function getProducts(e){var t=("function"==typeof MediaSource,cl.getCliplisterDomain()+"jplist/"+params.customer+"/"+e);params.plist&&(t=params.plist),cl.ajax(t,function(e){if(e){var t=JSON.parse(e.responseText);processProducts(t)}else triggerListeners("fatalAbort")})}function getSlotContent(e,t){cl.ajax(cl.getCliplisterDomain()+("pdf"==params.assetType?"view/":"lcplay/")+params.customer+"/"+e,function(n){var i=n.responseText;if("pdf"==!params.assetType)overwriteParams(i);else{var s=i.slice(i.indexOf("{"),i.indexOf("};")+1),a=s.replace(/:\s*"([^"]*)"/g,function(e,t){return': "'+t.replace(/:/g,"@colon@")+'"'}).replace(/:\s*'([^']*)'/g,function(e,t){return': "'+t.replace(/:/g,"@colon@")+'"'}).replace(/(['"])?([a-z0-9A-Z_]+)(['"])?\s*:/g,'"$2": ').replace(/@colon@/g,":");params.pdf=JSON.parse(a),console.log2("Erster Call. Alter Slot Abruf. Wohl groesstes Problem, aber einziger weg an einige der dort hard eingetragenen URLs zu kommen:"),console.log2("URL: "+cl.getCliplisterDomain()+("pdf"==params.assetType?"view/":"lcplay/")+params.customer+"/"+e),console.log2(JSON.stringify(params.pdf,null,2)),console.log2("______________________________________________________________________________________________")}exists(t)&&t()})}function getStageDimension(){return{width:parseInt(getComputedStyle(elements.innerPluginsContainer).width),height:parseInt(getComputedStyle(elements.innerPluginsContainer).height)}}function getTimePlayed(){return callStage("getTimePlayed")}function getTimeBuffered(){return callStage("getTimeBuffered")}function getPercentBuffered(){return callStage("getPercentBuffered")}function getVolume(){return callStage("getVolume")}function hideCursor(){elements.inner.style.cursor="none"}function hidePlugin(e,t){var n;n=getPluginById(e instanceof Object?getPluginIdByElement(e):e),"visual"==n.getType()&&"inner"==n.getMode()&&(t!==undefined||(n.getWrapper().hidden=!0,n.getWrapper().style.display="none"))}function init(e){function t(){function e(){function e(){"iOS"==platform.os.name?(callStage("enableIOSmobileautoplay",!0),callStage("play"),play(),stage.play()):"Safari"==platform.browser.name&&platform.browser.version>=11||callStage("play")}var t=exists(params.initialAsset)?params.initialAsset:0;loadAsset(t),(params.autoplay||params.backgroundvideo&&!platform.os.mobile&&(!exists(params.autoplay)||params.autoplay))&&(on("mediaReady",e()),hls()&&on("hlsCG",e()),"always"!=params.autoplay&&("iOS"==platform.os.name&&callStage("enableIOSmobileautoplay",!1),off("mediaReady",e()),hls()&&off("hlsCG",e()))),triggerListeners("initDone")}initPlugins();var t=document.createElement("video"),n=!!t.canPlayType;params.backgroundvideo&&platform.os.mobile&&(!params.backgroundvideo||n)||initStage(),initListeners(),isDone("productsLoaded")?e():on("productsLoaded",e),on("fatalAbort",function(){destroy()})}params=e,exists(params.assetType)&&"data"==params.assetType&&(params.output=exists(params.output)?params.output:"viewer",params.assetkind=exists(params.assetkind)?params.assetkind:"pages"),processParameters()&&(this.platform=detectPlatform(),detectFeatures(),config.originalDimensions=getComputedStyle(config.parent),initViewer(),orderRequestToken(function(){if(!exists(params.slot)||exists(params.assetType)&&"data"==params.assetType?t():getSlotContent(requestToken,function(){t(),exists(params.assetType)&&"pdf"==params.assetType&&(getPDFDetails(params.pdfdetails),on("pdfDataLoaded",function(){var e={product:{title:params.pdf.title,description:"",link:null},assets:[]};e.assets.push(params.pdf),products.push(e);var t=exists(params.initialAsset)?params.initialAsset:0;
loadAsset(t)}))}),exists(params.forceAssetType)&&"image360"==params.forceAssetType){var e=exists(params.initialAsset)?params.initialAsset:0;loadAsset(e)}else if(1==params.keytype){for(var n={product:{title:"",description:"",link:null},assets:[]},i=0;i<params.assetkeys.length;i++){var s={download:!1,duration:null,id:params.assetkeys[i],language:null,previews:{},social:{},subtitles:"",thumbnail:null,title:"",type:"youtube",uri:null,hls:!1,versions:null,aspectratio:null};n.assets.push(s)}products.push(n);var e=exists(params.initialAsset)?params.initialAsset:0;loadAsset(e)}else exists(params.assetType)&&"pdf"==params.assetType||getProducts(requestToken)}))}function initListeners(){!function(){config.fullscreen=!1,features.fullscreen&&features.fullscreen.fullscreenchange(function(){config.fullscreen=!!features.fullscreen.isFullscreen(),triggerListeners("fullscreenChange"),platform.os.mobile&&resetViewerSize()})}(),Resizer.watch(),function(){function e(e){var t=e.which||e.keyCode;32==t&&(isPlaying()?pause():play())}config.focus=!1,addEvent(document,"click",function(t){for(var n=0,i=t.target;i;i=i.parentNode){if(i===elements.inner)return void addEvent(document,"keypress",e);n++}removeEvent(document,"keypress",e)})}()}function initPlugins(){function e(e,n){var i=cl.getPlugin(e,n.version);if(i){if(n.viewer=self,n.pluginApi=getPluginApi(),"visual"==i.prototype.type){var s=document.createElement("div");n.parent=s;var a=i(n);a.setWrapper(s),"outer"==i.prototype.mode?(a.setPriority(n.priority),a.setPosition(n.position),config.plugins.visual.outer.push(a)):"inner"==i.prototype.mode&&(a.mode="inner",a.setLayer(n.layer),config.plugins.visual.inner.push(a))}else if("functional"==i.prototype.type){var a=i();config.plugins.functional.push(a)}a.setParams(n),a.positionListeners=[],n.id?a.setId(n.id):a.setId(t++),a.init()}}config.plugins||(config.plugins={visual:{inner:new Array,outer:new Array},functional:new Array});var t=0;if(params.plugins)for(var n in params.plugins)if(params.plugins.hasOwnProperty(n))if(Array.isArray(params.plugins[n]))for(var i=0;i<params.plugins[n].length;i++){var s=params.plugins[n][i];e(n,s)}else{var s=params.plugins[n];e(n,s)}getPluginById(1),buildPlugins()}function initStage(){exists(elements.stageWrapper)||(elements.stageWrapper=document.createElement("div"),elements.stageWrapper.style.overflow="hidden",elements.stageWrapper.style.position="absolute",elements.stageWrapper.style.top=config.measures.offsets.top+"px",elements.stageWrapper.style.left=config.measures.offsets.left+"px",elements.stageWrapper.style.right=config.measures.offsets.right+"px",elements.stageWrapper.style.bottom=config.measures.offsets.bottom+"px",elements.stageWrapper.style.bottom=config.measures.offsets.bottom+"px",elements.inner.appendChild(elements.stageWrapper))}function initViewer(){config.parent.api=getPublicApi(),elements.inner=document.createElement("div"),elements.inner.className="cliplister-viewer",elements.inner.style.position="relative",elements.inner.style.top="0px",elements.inner.style.left="0px",params.backgroundColor?config.backgroundColor=params.backgroundColor:params.backgroundColor="#000000",config.parent.api=getPublicApi(),config.parent.appendChild(elements.inner);var e=getComputedStyle(config.parent);config.dimensions={},config.dimensions.width=parseInt(e.width),config.dimensions.height=parseInt(e.height),elements.inner.style.width=config.dimensions.width+(/%$/.test(e.width)?"%":"px"),elements.inner.style.height=config.dimensions.height+(/%$/.test(e.height)?"%":"px")}function isAChildOf(e,t){if(e===t)return!1;for(;t&&t!==e;)t=t.parentNode;return t===e}function isDone(e){return occurredEvents.indexOf(e)>=0}function isLooping(){return params.loop||params.backgroundvideo||!1}function isPlayNext(){return params.playNext||!1}function isMovementListening(e){return!(!movementListeners[e]||!movementListeners[e].element)}function isPlaying(){return callStage("isPlaying")}function isFullscreen(){return config.fullscreen}function isMuted(){return callStage("isMuted")}function isQualityOverride(){return callStage("isQualityOverride")}function isStopped(){return callStage("isStopped")}function leaveFullscreen(){features.fullscreen.exitFullscreen()}function loadAsset(e,t){function n(){triggerListeners("assetReady"),exists(params.assetType)&&"data"===params.assetType&&exists(params.output)&&"data"===params.output||exists(params.assetType)&&"pdf"===params.assetType?(setStage(params.assetType),isDone("pluginsBuilt")?callStage("showMedia",[loadedAsset]):on("pluginsBuilt",function(){callStage("showMedia",[loadedAsset])})):params.backgroundvideo&&platform.os.mobile||(setStage(exists(params.forceAssetType)?params.forceAssetType:loadedAsset.hls?"videoHLS":loadedAsset.type),(params.mute||params.backgroundvideo)&&mute(),exists(params.forceAssetType)&&"image360"==params.forceAssetType?callStage("showMedia",[params.assetkeys]):1==params.keytype?callStage("showMedia",[loadedAsset]):callStage("showMedia",[loadedAsset]),exists(params.fixedQuality)?on("mediaReady",function(){callStage("setQuality",[params.fixedQuality])}):exists(params.defaultQuality)&&on("mediaReady",function(){callStage("setQuality",[params.defaultQuality])}))}if(e=parseInt(e),exists(params.assetType)&&"data"===params.assetType&&exists(params.output)&&"data"===params.output&&(t=!0),stop(),"undefined"==typeof t)for(var i=0,s=!1,a=0;a<products.length;a++){for(var r=0;r<products[a].assets.length;r++){if(e<1e3&&e==i||e>=1e3&&e==products[a].assets[r].id){s=!0,loadedAsset=products[a].assets[r],currentAssetIndex=e,currentProductIndex=a,n();break}i++}if(s)break}else loadedAsset=products,n()}function playAsset(e,t){loadAsset(e,t),play()}function loadProduct(){}function mute(){callStage("mute")}function off(e,t){if(listeners[e])if(1==listeners[e].length)delete listeners[e];else for(var n=0;n<listeners[e].length;n++)if(listeners[e][n]==t){listeners[e].splice(n,1);break}}function on(e,t,n){function i(e,t){listeners[e]||(listeners[e]=new Array),listeners[e].push(t)}if(n&&n.subsequent&&isDone(e)&&t(),e instanceof Array)for(var s=0;s<e.length;s++)i(e[s],t);else i(e,t)}function onMouseenter(e,t){addEvent(e,"mouseover",function(e){var n=e.relatedTarget;this===n||isAChildOf(this,n)||t()})}function onMouseleave(e,t){addEvent(e,"mouseout",function(e){var n=e.relatedTarget;this===n||isAChildOf(this,n)||t()})}function orderRequestToken(e){var t={};t.SEO=!1,exists(params.fsk)&&(t.fsk=params.fsk),exists(params.keytype)&&(t.keytype=params.keytype),exists(params.assetkeys)&&(t.requestkey=params.assetkeys.join("|")),exists(params.lang)&&(t.lang=params.lang),exists(params.languages)&&(t.lang=params.languages.join(",")),exists(params.slot)&&(t.slot=params.slot),exists(params.assetkind)&&(t.assetkind=params.assetkind),exists(params.assettype)&&(t.assettype=params.assettype),exists(params.output)&&(t.output=params.output),exists(params.bcuid)&&(t.bcuid=params.bcuid),cl.requestLiveConnectCall(t,params.customer,function(t){requestToken=t,exists(e)&&e()})}function overwriteParams(slotContent){try{var slotParams=eval("("+slotContent+")");params=extend(!0,slotParams,params)}catch(e){cl.log(slotContent),cl.log("The slot content is not valid",1)}}function pad(e,t){for(var n=e+"";n.length<t;)n="0"+n;return n}function parseXml(e){if("undefined"!=typeof window.DOMParser)return(new window.DOMParser).parseFromString(e,"text/xml");if("undefined"!=typeof window.ActiveXObject&&new window.ActiveXObject("Microsoft.XMLDOM")){var t=new window.ActiveXObject("Microsoft.XMLDOM");return t.async="false",t.loadXML(xmlStr),t}throw new Error("No XML parser found")}function onSpeedChange(e){}function changeQuality(e){stage.changeQuality(e)}function getAvailableQualities(){return stage.getAvailableQualities()}function setAvailableQualities(e){return stage.setAvailableQualities(e)}function setQuality(e){stage.setQuality(e)}function setQualityOverride(e){stage.setQualityOverride(e)}function zoomImage(){return stage.zoomImage()}function zoomPage(e){return stage.zoomPage(e)}function nextImage(){stage.nextImage()}function prevImage(){stage.prevImage()}function firstImage(){stage.firstImage()}function lastImage(){stage.lastImage()}function nextPage(){stage.nextPage()}function prevPage(){stage.prevPage()}function firstPage(){stage.firstPage()}function lastPage(){stage.lastPage()}function getCurrentPage(){return exists(stage)&&isDone("mediaReady")?stage.getCurrentPage():0}function getPageCount(){return exists(stage)&&isDone("mediaReady")?stage.getPageCount():0}function getPDFTitle(){return exists(stage)&&isDone("mediaReady")?stage.getTitle():""}function nextLvl(){stage.nextLvl()}function prevLvl(){stage.prevLvl()}function pause(){exists(stage)&&isDone("mediaReady")&&stage.pause()}function play(){exists(stage)&&isDone("mediaReady")&&callStage("play")}function getVidSrc(){var e="";return exists(stage)&&isDone("mediaReady")&&(e=stage.getSrc()),e}function processPDF(e){}function processProducts(e){function t(e){var t={};return t.download=e.download||!1,t.duration=e.duration||null,t.id=e.vid,t.language=e.language,t.previews=e.previews||{},t.social={},t.subtitles="",t.thumbnail=e.clipthumbnail||null,t.title=e.cliptitle||"",t.type=e.type||"video",t.uri=e.clipurl,t.hls="undefined"!=typeof e.stream&&"true"==e.stream,t.versions=e.versions||null,t.aspectratio=e.aspectratio||null,t.downloadLinks=e.videoDownloadLinks||null,t.streamingLinks=e.videoStreamingLinks||null,t}function n(e,n){var i={product:{},assets:[]};i.product.title=e.producttext||"",i.product.description=e.productshortdesc||"",i.product.link=e.productlink||null,delete e.producttext,delete e.productshortdesc;var s=e.relatedclips;e.related=!1,delete e.relatedclips;var a=t(e);if(i.assets.push(a),exists(s)&&""!=s)if(s.clip instanceof Array){n=n?n-1:s.clip.length,n=Math.min(n,s.clip.length);for(var r=0;r<n;r++)s.clip[r].related=!0,i.assets.push(t(s.clip[r]))}else(!n||n>1)&&(s.clip.related=!0,i.assets.push(t(s.clip)));return i}function i(e){var t=e[1];return t.type="image360",t}function s(e){var t={product:{},assets:[]};t.product.title=e.producttext||"",t.product.description=e.productshortdesc||"",t.product.link=e.productlink||null,delete e.producttext,delete e.productshortdesc;var n=e.relatedclips;e.related=!1,delete e.relatedclips;var s=i(e);if(t.assets.push(s),exists(n)&&""!=n)if(n.clip instanceof Array)for(var a=0;a<n.clip.length;a++)n.clip[a].related=!0,t.assets.push(i(n.clip[a]));else n.clip.related=!0,t.assets.push(i(n.clip));return t}if("1"!==e.cliplist.version||"undefined"==typeof e.cliplist.clip&&"undefined"==typeof e.cliplist.pages&&"undefined"==typeof e.cliplist["360view"])triggerListeners("fatalAbort");else{var a=!!exists(params.assetLimit)&&params.assetLimit;if(e.cliplist.clip instanceof Array)for(var r=0;r<e.cliplist.clip.length;r++){var o=e.cliplist.clip[r];products.push(n(o,a))}else products.push(n(e.cliplist.clip,a));if(e.cliplist.pages instanceof Array&&products.push(e.cliplist.pages),"undefined"!=typeof e.cliplist["360view"])if(products.push(s(e.cliplist["360view"])),e.cliplist["360view"]instanceof Array&&exists(e.cliplist["360view"][0])&&e.cliplist["360view"][0]instanceof Array)for(var r=0;r<e.cliplist["360view"].length;r++){var l=e.cliplist["360view"][r];products.push(s(l,a))}else products.push(s(e.cliplist["360view"],a));triggerListeners("productsLoaded")}}function processProducts360(e){function t(e){var t=e[1];return t.type="image360",t}function n(e){var n={product:{},assets:[]};n.product.title=e.producttext||"",n.product.description=e.productshortdesc||"",n.product.link=e.productlink||null,delete e.producttext,delete e.productshortdesc;var i=e.relatedclips;e.related=!1,delete e.relatedclips;var s=t(e);if(n.assets.push(s),exists(i)&&""!=i)if(i.clip instanceof Array)for(var a=0;a<i.clip.length;a++)i.clip[a].related=!0,n.assets.push(t(i.clip[a]));else i.clip.related=!0,n.assets.push(t(i.clip));return n}"1"===e.cliplist.version&&"undefined"!=typeof e.cliplist["360view"]?(products.push(n(e.cliplist["360view"])),triggerListeners("productsLoaded")):triggerListeners("fatalAbort")}function processParameters(){for(var e,t,n=Object.keys(params),i=n.length;i--;)t=n[i],params.hasOwnProperty(t)&&(params[t.toLowerCase()]=params[t],"keytype"==t.toLowerCase()&&("string"==typeof params[t.toLowerCase()]||params[t.toLowerCase()]instanceof String)&&("ean"==params[t.toLowerCase()].toLowerCase()?params[t.toLowerCase()]=0:"article"==params[t.toLowerCase()].toLowerCase()||"articlenumber"==params[t.toLowerCase()].toLowerCase()?params[t.toLowerCase()]=1e4:"videoid"==params[t.toLowerCase()].toLowerCase()?params[t.toLowerCase()]=500:"youtube"==params[t.toLowerCase()].toLowerCase()&&(params[t.toLowerCase()]=1)));return exists(params.assets)&&(params.assetkeys=params.assets),exists(params.language)&&(params.languages=params.language),params.parentid&&null!=(e=document.getElementById(params.parentid))?(config.parent=e,!0):(cl.log("The CLViewer requires an existing parent element.",1),1)}function readFile(e){var t=new XMLHttpRequest;t.open("GET",e,!1),t.onreadystatechange=function(){if(4===t.readyState&&(200===t.status||0==t.status)){var e=t.responseText;alert(e)}},t.send(null)}function reSetElementPosition(e,t,n,i,s){e===undefined||"top"!=t&&"right"!=t&&"bottom"!=t&&"left"!=t||n===undefined||("auto"==n?delete e[t]:e[t]=n,i!==undefined&&i?e.middlepointX=!0:delete e.middlepointX,s!==undefined&&s?e.middlepointY=!0:delete e.middlepointY)}function repositionInnerPluginElement(e){if(e){e.style.position="absolute";for(var t={container:{width:Math.ceil(parseInt(getComputedStyle(elements.innerPluginsContainer).width))+2,height:Math.ceil(parseFloat(getComputedStyle(elements.innerPluginsContainer).height))+2}},n=["left","width","right","top","height","bottom"],i=0;i<n.length;i++){var s=n[i];"undefined"!=typeof e[s]&&(t[s]=distanceToPx(e[s],"left"==s||"right"==s||"width"==s?t.container.width:t.container.height),"right"==s?e.width&&e.left||(e.left?e.style.width=t.container.width-t.left-t.right+"px":e.width&&(e.style.left=t.container.width-distanceToPx(e.width,t.container.width)-t.right+"px")):"bottom"==s?(e.height&&e.top||(e.top?e.style.height=t.container.height-t.top-t.bottom+"px":e.height&&(e.style.top=t.container.height-distanceToPx(e.height,t.container.height)-t.bottom+"px")),e.style.height=t.container.height-t.top-t.bottom+"px"):e.style[s]=t[s]+"px")}e.style.left||e.style.right||(e.style.left="0px"),e.style.top||e.style.bottom||(e.style.top="0px");var a=e.minWidth?distanceToPx(e.minWidth,t.container.width):0,r=e.maxWidth?distanceToPx(e.maxWidth,t.container.width):t.container.width,o=e.minHeight?distanceToPx(e.minHeight,t.container.height):0,l=e.maxHeight?distanceToPx(e.maxHeight,t.container.height):t.container.height;e.minWidth&&t.width<a&&(e.style.width=a+"px",!e.right||e.width&&e.left||(e.style.left=1*parseInt(e.style.left)-1*(t.width-a)+"px")),e.maxWidth&&t.width>r&&(e.style.width=r+"px",!e.right||e.width&&e.left||(e.style.left=1*parseInt(e.style.left)+1*(t.width-r)+"px")),e.minHeight&&t.height<o&&(e.style.height=o+"px",!e.bottom||e.height&&e.top||(e.style.top=1*parseInt(e.style.top)-1*(t.height-o)+"px")),e.maxHeight&&t.height>l&&(e.style.height=l+"px",!e.bottom||e.height&&e.top||(e.style.top=1*parseInt(e.style.top)+1*(t.height-l)+"px")),exists(e.middlepointY)&&(e.top&&!e.bottom?e.style.top=parseInt(e.style.top)-parseInt(e.style.height)/2+"px":!e.top&&e.bottom&&(e.style.top=parseInt(e.style.top)+parseInt(e.style.height)/2+"px")),exists(e.middlepointX)&&(e.left&&!e.right?e.style.left=parseInt(e.style.left)-parseInt(e.style.width)/2+"px":!e.left&&e.right&&(e.style.left=parseInt(e.style.left)+parseInt(e.style.width)/2+"px"))}}function repositionInnerPluginElements(){if(config.plugins&&config.plugins.visual&&config.plugins.visual.inner)for(var e=0;e<config.plugins.visual.inner.length;e++){var t=config.plugins.visual.inner[e].getWrapper().childNodes[0];"undefined"==typeof t||t.getAttribute("data-cl-animating")||disableCSSTransition(config.plugins.visual.inner[e].getWrapper().childNodes[0]),repositionInnerPluginElement(config.plugins.visual.inner[e].getWrapper().childNodes[0])}}function resizeListener(){}function setBitrate(e){stage.setBitrate(e)}function setElementPositionWithinInnerPlugin(e,t,n,i){var s,a,r,o,l,u,g;1==arguments.length?(e.element!==undefined&&(s=e.element),e.position!==undefined&&(a=e.position),e.value!==undefined&&(r=e.value),e.animate!==undefined&&(g=e.animate),e.fromMiddlePoint!==undefined&&(e.fromMiddlePoint.x!==undefined&&(o=e.fromMiddlePoint.x),e.fromMiddlePoint.y!==undefined&&(l=e.fromMiddlePoint.y)),e.reposition!==undefined&&(u=e.reposition)):(s=e,a=t,r=n,g=i),"undefined"==typeof g&&(g=!1),"undefined"==typeof u&&(u=!0),"undefined"==typeof o&&(o=!1),"undefined"==typeof l&&(l=!1),g||disableCSSTransition(s),reSetElementPosition(s,a,r,o,l),u!==undefined&&u&&repositionInnerPluginElement(s)}function setElementSizeWithinInnerPlugin(e,t,n,i){var s,a,r,o,l,u;1==arguments.length?(e.element!==undefined&&(s=e.element),e.dimension!==undefined&&(a=e.dimension),e.value!==undefined&&(r=e.value),e.min!==undefined&&(u=e.min),e.min!==undefined&&(u=e.min),e.min!==undefined&&(u=e.min),e.min!==undefined&&(u=e.min),e.max!==undefined&&(l=e.max)):(s=e,a=t,r=n,o=i),"undefined"==typeof o&&(o=!0),s===undefined||"width"!=a&&"height"!=a||r===undefined||("auto"==r?delete s[a]:s[a]=r,u!==undefined&&(s["min"+capitalizeFirstLetter(a)]=u),l!==undefined&&(s["max"+capitalizeFirstLetter(a)]=l),o&&repositionInnerPluginElement(s))}function setProgressPlayed(e){stage.setProgressPlayed(e)}function setStage(e){function t(e){if(exists(elements.stageWrapper)||initStage(),!stage||stage.getType!==e){var t=config.stage;t.parent=elements.stageWrapper,t.viewer=self,t.pluginApi=getPluginApi(),stage=cl.getStage(e)(t),"iOS"==platform.os.name&&callStage("enableIOSmobileautoplay",!0),triggerListeners("stageSet")}}isDone("pluginsBuilt")?t(e):on("pluginsBuilt",function(){t(e)})}function setVolume(e){stage.setVolume(e)}function showCursor(){elements.inner.style.cursor="default"}function showPlugin(e){var t;t=getPluginById(e instanceof Object?getPluginIdByElement(e):e),"visual"==t.getType()&&"inner"==t.getMode()&&(delete t.getWrapper().hidden,t.getWrapper().style.display="block")}function stop(e){exists(stage)&&isDone("mediaReady")&&stage.stop(),e&&(params.loop||params.backgroundvideo)&&setTimeout(function(){play()},5)}function transparentBackground(e){e.style.backgroundImage="url(data:image/gif;base64,R0lGODlhAQABAIAAAP///wAAACH5BAEAAAAALAAAAAABAAEAAAICRAEAOw==)"}function faster(){stage.faster()}function slower(){stage.slower()}function showDefaultControls(){stage.showDefaultControls()}function hideDefaultControls(){stage.hideDefaultControls()}function hls(){return!!stage.hls&&stage.hls()}function checkResize(){Resizer.check()}function resetViewerSize(){var e=config.originalDimensions;config.dimensions={},config.dimensions.width=parseInt(e.width),config.dimensions.height=parseInt(e.height),elements.inner.style.width=config.dimensions.width+(/%$/.test(e.width)?"%":"px"),elements.inner.style.height=config.dimensions.height+(/%$/.test(e.height)?"%":"px"),elements.innerPluginsContainer.height=parseInt(e.height)-config.measures.offsets.top-config.measures.offsets.bottom,elements.innerPluginsContainer.width=parseInt(e.width)-config.measures.offsets.left-config.measures.offsets.right,elements.innerPluginsContainer.style.width=elements.innerPluginsContainer.width+"px";var t=platform.os.mobile;t=!(exists(params.plugins)&&exists(params.plugins)&&exists(params.plugins.InnerControls)&&exists(params.plugins.InnerControls.mobileDefaultControls)&&!params.plugins.InnerControls.mobileDefaultControls)&&t;var n="iOS"==platform.os.name&&platform.os.version>="10"&&t;elements.innerPluginsContainer.style.top=config.measures.offsets.top+"px",isStopped()?(elements.innerPluginsContainer.style.top=config.measures.offsets.top+"px",elements.innerPluginsContainer.style.height=elements.innerPluginsContainer.height+"px"):(elements.innerPluginsContainer.style.height=t?elements.innerPluginsContainer.height-50+"px":elements.innerPluginsContainer.height+"px",elements.innerPluginsContainer.style.height=n?parseInt(elements.innerPluginsContainer.style.height-43)+"px":parseInt(elements.innerPluginsContainer.style.height)+"px",elements.innerPluginsContainer.style.top=n?parseInt(elements.innerPluginsContainer.style.top)+43+"px":parseInt(elements.innerPluginsContainer.style.top)+"px")}function resetSpeed(){stage.resetSpeed()}function triggerListeners(e,t){occurredEvents.indexOf(e)==-1&&occurredEvents.push(e);for(var n=0;e in listeners&&n<listeners[e].length;n++)listeners[e][n](t)}function triggerMovementListeners(e,t,n){var i=getPluginIdByElement(e),s=movementListeners[i];if(s&&s.element===e){var a={};exists(e.width)&&(a.width=e.width),exists(e.height)&&(a.height=e.height),exists(e.top)&&(a.top=e.top),exists(e.right)&&(a.right=e.right),exists(e.bottom)&&(a.bottom=e.bottom),exists(e.left)&&(a.left=e.left),exists(e.hidden)&&(a.hidden=e.hidden),t&&(a.animate=!0,a.duration=n);for(var r=0;r<s.listeners.length;r++)s.listeners[r](a)}}function unmute(){stage.unmute()}function verifyDependencies(){}if(!(this instanceof CLViewer))return new CLViewer(_params);var self=this,cl=window.Cliplister,elements={},features={},platform={},params={},config={},listeners={},occurredEvents=[],movementListeners={},products=[],stage,loadedAsset,currentAssetIndex,currentProductIndex,requestToken,interval={instance:{},globalTimeout:0,counter:0,fns:[],timeouts:[],maxTimeout:0},Counter={count:0,getUniqueNumber:function(){return exists(cl[Counter])?cl.Counter.getUniqueNumber():++this.count}},Detector={mobile:!1,init:function(){return function(e){(/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino|android|ipad|playbook|silk/i.test(e)||/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp( i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i230|iac( |\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc\-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|\-[a-w])|libw|lynx|m1\-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\-2|po(ck|rt|se)|prox|psio|pt\-g|qa\-a|qc(07|12|21|32|60|\-[2-7]|i\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\-|oo|p\-)|sdk\/|se(c(\-|0|1)|47|mc|nd|ri)|sgh\-|shar|sie(\-|m)|sk\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\-|v\-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\-|tdg\-|tel(i|m)|tim\-|t\-mo|to(pl|sh)|ts(70|m\-|m3|m5)|tx\-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\-|your|zeto|zte\-/i.test(e.substr(0,4)))&&(this.mobile=!0)}(navigator.userAgent||navigator.vendor||window.opera),this},isMobile:function(){return this.mobile}}.init(),Resizer={knownWidth:0,knownHeight:0,currentWidth:0,currentHeight:0,watch:function(){this.checkInterval=setInterval(this.check,50)},check:function(e){var e="undefined"!=typeof e&&e;if(config.fullscreen){var t={width:window.innerWidth,height:window.innerHeight};this.currentWidth=window.innerWidth,this.currentHeight=window.innerHeight}else{var t=getComputedStyle(config.parent);this.currentWidth=parseInt(t.width),this.currentHeight=parseInt(t.height)}if(parseInt(this.knownHeight)!=parseInt(this.currentHeight)&&(!config.fullscreen||"undefined"==typeof params.stage.aspectRatio||"undefined"==typeof params.stage.width)||parseInt(this.knownWidth)!=parseInt(this.currentWidth)&&(!config.fullscreen||"undefined"==typeof params.stage.aspectRatio||"undefined"==typeof params.stage.height)||e){var n=!1;if(params.stage&&params.stage.aspectRatio){n={};var i="undefined"==typeof getAsset()||"undefined"==typeof getAsset().aspectratio||null===getAsset().aspectratio?[16,9]:getAsset().aspectratio.split(":"),s=("asset"==params.stage.aspectRatio?i:params.stage.aspectRatio.split(":"))||[16,9];if(params.stage.width&&!params.stage.height){n.width=distanceToPx(params.stage.width,t.width);var a=n.width/s[0]*s[1];n.minHeight&&a<n.minHeight?n.height=n.minHeight:params.stage.maxHeight&&a>params.stage.maxHeight?n.height=n.maxHeight:n.height=a,exists(n.minHeight)&&(n.availableHeight+=n.minHeight),n.availableHeight-=n.height}else if(params.stage.height&&!params.stage.width){n.height=distanceToPx(params.stage.height,t.height);var r=n.height/s[1]*s[0];params.stage.minWidth&&r<params.stage.minWidth?n.width=n.minWidth:params.stage.maxWidth&&r>params.stage.maxWidth?n.width=n.maxWidth:n.width=r,exists(n.minWidth)&&(n.availableWidth+=n.minWidth),n.availableWidth-=n.width}}this.knownWidth=n?n.width:parseInt(t.width),this.knownHeight=n?n.height:parseInt(t.height);var o=n?n:t;config.dimensions.width=this.knownWidth,config.dimensions.height=this.knownHeight,elements.inner.style.width=this.knownWidth+(/%$/.test(o.width)?"%":"px"),elements.inner.style.height=this.knownHeight+(/%$/.test(o.height)?"%":"px"),elements.innerPluginsContainer.height=this.knownHeight-config.measures.offsets.top-config.measures.offsets.bottom,elements.innerPluginsContainer.width=this.knownWidth-config.measures.offsets.left-config.measures.offsets.right,elements.innerPluginsContainer.style.width=elements.innerPluginsContainer.width+(/%$/.test(o.width)?"%":"px"),elements.innerPluginsContainer.style.height=elements.innerPluginsContainer.height+(/%$/.test(o.height)?"%":"px");var l=platform.os.mobile;l=!(exists(params.plugins)&&exists(params.plugins)&&exists(params.plugins.InnerControls)&&exists(params.plugins.InnerControls.mobileDefaultControls)&&!params.plugins.InnerControls.mobileDefaultControls)&&l;var u="iOS"==platform.os.name&&platform.os.version>="10"&&l;getProgressPlayed()?(elements.innerPluginsContainer.style.height=l?elements.innerPluginsContainer.height-50+"px":elements.innerPluginsContainer.height+"px",elements.innerPluginsContainer.style.height=u?parseInt(elements.innerPluginsContainer.style.height-43)+"px":parseInt(elements.innerPluginsContainer.style.height)+"px",elements.innerPluginsContainer.style.top=u?parseInt(elements.innerPluginsContainer.style.top)+43+"px":parseInt(elements.innerPluginsContainer.style.top)+"px"):(elements.innerPluginsContainer.style.top=config.measures.offsets.top+"px",elements.innerPluginsContainer.style.height=elements.innerPluginsContainer.height+"px");var g="undefined"!=typeof elements.stageWrapper?getComputedStyle(elements.stageWrapper).height:getComputedStyle(elements.inner).height;isFullscreen()&&parseInt(g)>parseInt(elements.innerPluginsContainer.style.height)+1?elements.innerPluginsContainer.style.top=(parseInt(g)-parseInt(elements.innerPluginsContainer.style.height))/2+1+"px":elements.innerPluginsContainer.style.top=0,params.stage&&params.stage.forceDimensions&&(config.parent.style.width=this.knownWidth+(/%$/.test(o.width)?"%":"px"),config.parent.style.height=this.knownHeight+(/%$/.test(o.height)?"%":"px")),repositionInnerPluginElements(),triggerListeners("resize")}}};return init(_params),getPublicApi()};CLViewer.prototype.version=VERSION,window.Cliplister.addViewer(CLViewer)}(window,void 0);!function(e,t){var i="video",n="1.2",r=function s(i){function n(t){var n=("https:"==location.protocol?"https:":"http:")+"//mycliplister.com/static/viewer/assets/chk/meta2.png?n="+Math.random(),r=[],s=[],u=[],l=[],a=0,o=new XMLHttpRequest;o.addEventListener("loadstart",function(e){"undefined"==typeof r[t]&&(r[t]=(new Date).getTime())}),o.addEventListener("loadend",function(n){s[t]=(new Date).getTime();var o="undefined"==typeof l[t]?r[t]:l[t],p="undefined"==typeof u[t]?s[t]:u[t],g=(p-o)/1e3,c=8*a;e.downloadSpeed=Math.round(c/g),i.pluginApi.triggerListeners("bandwidthChecked")}),o.addEventListener("progress",function(e){a=e.loaded}),o.onreadystatechange=function(){2==o.readyState&&(l[t]=(new Date).getTime())};try{o.open("GET",n),o.timeout=2e3,o.send()}catch(p){e.downloadSpeed=1e5,i.pluginApi.triggerListeners("bandwidthChecked")}}function r(){if(J.playPosition=H.getTimePlayed(),!isNaN(H.getProgressPlayed())&&Math.round(J.playProgress)!==Math.round(H.getProgressPlayed())&&Math.round(H.getProgressPlayed())%10===0)switch(Math.round(H.getProgressPlayed())){case 0:i.pluginApi.triggerListeners("progress0");break;case 10:i.pluginApi.triggerListeners("progress10");break;case 20:i.pluginApi.triggerListeners("progress20");break;case 30:i.pluginApi.triggerListeners("progress30");break;case 40:i.pluginApi.triggerListeners("progress40");break;case 50:i.pluginApi.triggerListeners("progress50");break;case 60:i.pluginApi.triggerListeners("progress60");break;case 70:i.pluginApi.triggerListeners("progress70");break;case 80:i.pluginApi.triggerListeners("progress80");break;case 90:i.pluginApi.triggerListeners("progress90");break;case 100:i.pluginApi.triggerListeners("progress100");break;case 5:i.pluginApi.triggerListeners("progress5");break;case 15:i.pluginApi.triggerListeners("progress15");break;case 25:i.pluginApi.triggerListeners("progress25");break;case 35:i.pluginApi.triggerListeners("progress35");break;case 45:i.pluginApi.triggerListeners("progress45");break;case 55:i.pluginApi.triggerListeners("progress55");break;case 65:i.pluginApi.triggerListeners("progress65");break;case 75:i.pluginApi.triggerListeners("progress75");break;case 85:i.pluginApi.triggerListeners("progress85");break;case 95:i.pluginApi.triggerListeners("progress95");break;default:console.log("Played a percentage not in between 0 and 100... wait wat.")}if(Math.round(J.playProgress)!==Math.round(H.getProgressPlayed())&&"Safari"===i.pluginApi.platform().browser.name){var e=O.videoWidth,t=O.videoHeight;V.width=e,V.height=t,z.drawImage(O,0,0,e,t)}J.playProgress=H.getProgressPlayed(),J.bufferPercent=H.getPercentBuffered(),J.playPosition==J.oldPlayPosition?(G||i.pluginApi.triggerListeners("buffering"),G=!0):(G=!1,i.pluginApi.triggerListeners("bufferingDone")),J.oldPlayPosition=J.playPosition,J.oldPlayProgress=J.playProgress,J.oldBufferPercent=J.bufferPercent,O.quality!=J.currentQuality&&i.pluginApi.isDone("bandwidthChecked")&&(O.quality=J.currentQuality,I())}function u(){return X}function l(){o(),a()}function a(){H.switchBitrate=function(e){return H},H.enterFullscreen=function(){return L(),H},H.getAvailableQualities=function(){return u()},H.getCurrentBitrate=function(){return X[J.currentQuality].bitrate},H.getCurrentQuality=function(){return X[J.currentQuality]},H.getDuration=function(){return i.pluginApi.exists(O)?Math.round(O.duration):0},H.getProgressPlayed=function(){return i.pluginApi.exists(O)?O.currentTime/(O.duration/100):0},H.getTimePlayed=function(){return i.pluginApi.exists(O)?O.currentTime:0},H.getTimeBuffered=function(){return i.pluginApi.exists(O)?O.buffered.end(O.buffered.length-1):0},H.getPercentBuffered=function(){return i.pluginApi.exists(O)&&O.buffered.length?O.buffered.end(O.buffered.length-1)/O.duration*100:0},H.getPlaybackSpeed=function(){},H.getVolume=function(){return i.pluginApi.exists(O)?parseInt(100*O.volume):0},H.getSrc=function(){return!!i.pluginApi.exists(O)&&q(J.currentQuality)},H.isMuted=function(){return!!i.pluginApi.exists(O)&&O.muted},H.getVideoElement=function(){return!!i.pluginApi.exists(O)&&O},H.isNativeFullscreen=function(){return N},H.isPlaying=function(){return W},H.isQualityOverride=function(){return $},H.isStopped=function(){return j},H.leaveFullscreen=function(){return w(),H},H.exitFullscreen=function(){return k(),H},H.mute=function(){return!!i.pluginApi.exists(O)&&(J.volumeBeforeMute=i.pluginApi.getVolume(),i.pluginApi.setVolume(0),O.muted=!0,i.pluginApi.triggerListeners("mute"),void i.pluginApi.triggerListeners("volumeChange"))},H.onFullscreenChange=function(e){R(e)},H.pause=function(){return P(),H},H.play=function(){return x(),J.playPromise},H.setTimePlayed=function(e){return S(e),H},H.setProgressPlayed=function(e){return C(e),H},H.setQuality=function(e){return M(e),H},H.setQualityOverride=function(e){return E(e),H},H.setVolume=function(e){return A(e),H},H.showMedia=function(e){F(e)},H.stop=function(){return D(),i.pluginApi.platform().os.mobile&&i.pluginApi.triggerListeners("stop"),H},H.unmute=function(){O.muted=!1,i.pluginApi.setVolume(100),i.pluginApi.triggerListeners("unmute"),i.pluginApi.triggerListeners("volumeChange")},H.slower=function(){return O.playbackRate>=ne+se&&(O.playbackRate-=se,i.pluginApi.triggerListeners("playbackSpeedChange")),H},H.faster=function(){return O.playbackRate<=re-se&&(O.playbackRate+=se,i.pluginApi.triggerListeners("playbackSpeedChange")),H},H.setSpeed=function(e){return e>=ne&&e<=re&&(O.playbackRate=e,i.pluginApi.triggerListeners("playbackSpeedChange")),H},H.resetSpeed=function(){return O.playbackRate=O.defaultPlaybackRate,i.pluginApi.triggerListeners("playbackSpeedChange"),H},H.getCurrentSpeed=function(){return O.playbackRate},H.changeQuality=function(e){return Q(e),H},H.showDefaultControls=function(){return v(),H},H.hideDefaultControls=function(){return y(),H},H.enableIOSmobileautoplay=function(e){return h(e),H},H.enableIOSinlineplay=function(e){return b(e),H}}function o(){if(i.pluginApi.exists(i.parent)){i.parent.innerHTML="",B=document.createElement("div"),B.style.position="absolute",B.style.top="-1px",B.style.right="-1px",B.style.bottom="-1px",B.style.left="-1px",B.style.backgroundColor=i.pluginApi.getBackgroundColor(),B.style.color="#FFFFFF",i.parent.appendChild(B);var e=document.createElement("style");if(e.type="text/css",e.innerHTML=".activityIndicator {height:40px;width:40px;-webkit-background-size:40px 40px;margin:0px auto;-webkit-animation-duration:1s;-webkit-animation-iteration-count:infinite;-webkit-animation-timing-function:linear;-webkit-animation-name:spinnerAnim;}@-webkit-keyframes spinnerAnim {0% { -webkit-transform:rotate(0deg);}100% { -webkit-transform:rotate(360deg);}}",document.head.appendChild(e),O=document.createElement("video"),O.style.width="100%",O.style.height="100%",O.style.backgroundColor=i.pluginApi.getBackgroundColor(),O.preload="auto",O.controlsList="",i.pluginApi.platform().os.mobile&&(O.addEventListener("seeked",g),O.addEventListener("play",d),O.addEventListener("pause",f),O.requestFullscreen?O.addEventListener("fullscreenchange",i.pluginApi.fullscreenListener):O.mozRequestFullScreen?O.addEventListener("mozfullscreenchange",i.pluginApi.fullscreenListener):O.webkitRequestFullScreen||O.webkitEnterFullScreen?O.addEventListener("webkitfullscreenchange",function(){"iOS"==i.pluginApi.platform().os.name&&(document.fullscreenElement=document.fullscreenElement?null:O,document.webkitFullscreenElement=document.webkitFullscreenElement?null:O),i.pluginApi.fullscreenListener()}):O.msRequestFullscreen&&O.addEventListener("MSFullscreenChange",i.pluginApi.fullscreenListener)),"iOS"==i.pluginApi.platform().os.name&&"9"==i.pluginApi.platform().os.version&&(O.removeEventListener("ended",c),O.addEventListener("ended",c)),"iOS"==i.pluginApi.platform().os.name&&"12"==i.pluginApi.platform().os.version,O.addEventListener("volumechange",p),O.addEventListener("abort",m),O.onabort=m(),O.onerror=m(),B.appendChild(O),"Safari"===i.pluginApi.platform().browser.name){V=document.createElement("canvas");var t=O.videoWidth,n=O.videoHeight;V.width=t,V.height=n,V.style.position="absolute",V.style.width="0%",V.style.transform="translateY(-50%)",V.style.top="90000px",V.style.left="90000px",z=V.getContext("2d"),B.appendChild(V),V.style.width="100%"}var r=50;i.pluginApi.exists(i.defaultVolume)&&(r=i.defaultVolume),O.volume=r/100,"iOS"==i.pluginApi.platform().os.name&&"9"==i.pluginApi.platform().os.version||i.pluginApi.addEvent(O,"ended",function(){U=!1,i.pluginApi.triggerListeners("finish"),i.pluginApi.stop(!0)})}}function p(e){"Android"===i.pluginApi.platform().os.name&&(O.muted||J.volumeBeforeMute===parseInt(100*O.volume)||A(J.volumeBeforeMute))}function g(e){i.pluginApi.triggerListeners("seek")}function c(e){"iOS"==i.pluginApi.platform().os.name&&"9"==i.pluginApi.platform().os.version&&(U=!1,O.removeEventListener("ended",c),i.pluginApi.triggerListeners("finish"),i.pluginApi.stop(!0))}function d(e){U||(i.pluginApi.triggerListeners("initialPlay"),U=!0),"iOS"==i.pluginApi.platform().os.name&&"9"==i.pluginApi.platform().os.version&&(O.removeEventListener("ended",c),O.addEventListener("ended",c)),i.pluginApi.triggerListeners("play"),(!W||"iOS"==i.pluginApi.platform().os.name&&"9"==i.pluginApi.platform().os.version)&&i.pluginApi.triggerListeners("playMedia"),W=!0,j=!1,Y=!0,K.start();O.shadowRoot}function f(e){i.pluginApi.triggerListeners("pause"),"Android"===i.pluginApi.platform().os.name&&2===e.path.length||O.ended||i.pluginApi.triggerListeners("pauseMedia"),W=!1,Y=!1,i.pluginApi.triggerListeners("bufferingDone"),K.stop()}function m(e){return!0}function A(e){return!!i.pluginApi.exists(O)&&(O.muted&&0!=e&&(O.muted=!1,i.pluginApi.triggerListeners("unmute")),e&&(J.volumeBeforeMute=e),O.volume=e/100,void i.pluginApi.triggerListeners("volumeChange"))}function v(){return!!i.pluginApi.exists(O)&&(O.controls="true",void(O.controlsList="nodownload"))}function y(){return!!i.pluginApi.exists(O)&&(O.controls="false",void(O.controlsList=""))}function h(e){return!!i.pluginApi.exists(O)&&(e=!!i.pluginApi.exists(e)&&!!e,J.volumeBeforeMute=i.pluginApi.getVolume(),e?(i.pluginApi.mute(),O.muted=!0,O.autoplay=!0,O.controls=!0,O.playsinline=!0,O.setAttribute("muted",!0),O.setAttribute("autoplay",!0),O.setAttribute("controls",!0),void O.setAttribute("playsinline",!0)):(O.removeAttribute("muted"),O.removeAttribute("autoplay"),O.removeAttribute("controls"),O.removeAttribute("playsinline"),!1))}function b(e){return!!i.pluginApi.exists(O)&&(e=!!i.pluginApi.exists(e)&&!!e,J.volumeBeforeMute=i.pluginApi.getVolume(),e?(i.pluginApi.mute(),O.controls=!0,O.playsinline=!0,O.setAttribute("controls",!0),void O.setAttribute("playsinline",!0)):(O.removeAttribute("controls"),O.removeAttribute("playsinline"),!1))}function L(){try{O.requestFullscreen?O.requestFullscreen():O.msRequestFullscreen?O.msRequestFullscreen():O.mozRequestFullScreen?O.mozRequestFullScreen():O.webkitRequestFullscreen?O.webkitRequestFullscreen():O.webkitEnterFullscreen&&O.webkitEnterFullscreen()}catch(e){}}function k(){try{Document.exitFullscreen?Document.exitFullscreen():O.exitFullscreen?O.exitFullscreen():O.msExitFullscreen?O.msExitFullscreen():O.mozExitFullScreen?O.mozExitFullScreen():O.webkitExitFullscreen&&O.webkitExitFullscreen()}catch(e){}w()}function w(){i.pluginApi.platform().os.mobile&&"iOS"==i.pluginApi.platform().os.name&&i.pluginApi.resetViewerSize()}function P(){W&&(J.playPromise?J.playPromise.then(function(){O.pause()})["catch"](function(){O.pause()}):O.pause(),W=!1,Y=!1,i.pluginApi.platform().os.mobile&&"iOS"==i.pluginApi.platform().os.name&&i.pluginApi.resetViewerSize(),i.pluginApi.triggerListeners("pause")),G=!1,i.pluginApi.triggerListeners("bufferingDone"),K.stop()}function x(){if(!W)if(te=!0,setTimeout(function(){te=!1},2e3),Y=!0,""!=O.src){var e=O.play();if(e!==t){var n=setTimeout(function(){},2e3);J.playPromise=e.then(function(){if(clearTimeout(n),U||(i.pluginApi.triggerListeners("initialPlay"),U=!0),"Safari"===i.pluginApi.platform().browser.name){var e=O.videoWidth,t=O.videoHeight;V.width=e,V.height=t,z.drawImage(O,0,0,e,t)}i.pluginApi.triggerListeners("bufferingDone"),K.start(),i.pluginApi.triggerListeners("play"),W=!0,j=!1})["catch"](function(e){D(!0)})}else O.play(),U||(i.pluginApi.triggerListeners("initialPlay"),U=!0),i.pluginApi.triggerListeners("bufferingDone"),K.start(),i.pluginApi.triggerListeners("play"),W=!0,j=!1}else I()}function S(e){e=parseFloat(e),O.duration?(te=!0,setTimeout(function(){te=!1},2e3),e=e>=0?e<=O.duration?e:O.duration:0,O.currentTime=e,i.pluginApi.triggerListeners("seek")):(J.setTime=e,O.onloadeddata=function(e){te=!0,setTimeout(function(){te=!1},2e3),J.setTime=J.setTime>=0?J.setTime<=O.duration?J.setTime:O.duration:0,J.currentTime=J.setTime,i.pluginApi.triggerListeners("seek")})}function C(e){O.duration?(e=parseFloat(e),te=!0,setTimeout(function(){te=!1},2e3),O.currentTime=e>0?O.duration/100*e:0,i.pluginApi.triggerListeners("seek")):(J.setPerc=e,O.onloadeddata=function(e){te=!0,setTimeout(function(){te=!1},2e3),J.currentTime=J.setPerc>0?O.duration/100*J.setPerc:0,i.pluginApi.triggerListeners("seek")})}function E(e){$=e,i.pluginApi.triggerListeners("setQuality")}function F(t){if(i.pluginApi.exists(O)){var r=t.uri.split("/");O.protocol=r[0],O.baseUrl=r[2],O.crypt=r.pop(),O.costumer=r.pop(),i.pluginApi.getVolume()||(O.muted=!0),E(!0),"undefined"==typeof e.downloadSpeed?(n(Math.round(1e7*Math.random())),i.pluginApi.on("bandwidthChecked",function(){O.quality=T(e.downloadSpeed/1024),J.currentQuality=O.quality,i.pluginApi.triggerListeners("mediaReady")})):(i.pluginApi.isDone("bandwidthChecked")||i.pluginApi.triggerListeners("bandwidthChecked"),O.quality=T(e.downloadSpeed/1024),J.currentQuality=O.quality,i.pluginApi.triggerListeners("mediaReady"))}}function T(e){var t=0;return X.every(function(i,n,r){return!(.7*e<i.bitrate)&&(t=n,!0)}),t}function q(e,t){var n=i.pluginApi.getAvailableQualities();return O.protocol+"//"+O.baseUrl+"/"+n[e].string+"/"+O.costumer+"/"+O.crypt}function M(t){function n(e){E(!0),e>=0&&e<=J.maxQuality&&(J.currentQuality=e)}var r=u();if(t instanceof Object){if(i.pluginApi.exists(t.number))n(t.number);else if(i.pluginApi.exists(t.bitrate))if("auto"===t)E(!1),J.currentQuality=T(e.downloadSpeed/1024);else for(var s=0;s<r.length;s++)if(t.bitrate==parseInt(r[s].bitrate)){n(t.bitrate);break}}else{var l=parseInt(t);if(l){if(l<r.length)n(t);else for(var s=0;s<r.length;s++)if(t==parseInt(r[s].bitrate)){n(s);break}}else"auto"===t&&(E(!1),J.currentQuality=T(e.downloadSpeed/1024))}i.pluginApi.triggerListeners("setQuality")}function I(){function t(){if(O.currentTime=J.currentTime||0,n&&!N&&P(),Y){W=!1,x(),i.pluginApi.triggerListeners("bufferingDone");var e=setInterval(function(){O.currentTime>J.currentTime&&(clearInterval(e),K.start(),Z.removeCanvas(),i.pluginApi.triggerListeners("changeSrc"),i.pluginApi.triggerListeners("bufferingDone"),i.pluginApi.triggerListeners("initialImagesLoaded"))},10)}O.removeEventListener("canplay",t),ie=!1}Z.createCanvas();var n=N;return ee=!0,_=!0,J.currentTime=O.currentTime,i.pluginApi.triggerListeners("qualityChange"),i.pluginApi.triggerListeners("setQuality"),J.playPromise?J.playPromise.then(function(){O.pause()})["catch"](function(){O.pause()}):O.pause(),Z.refreshCanvas(),K.stop(),i.pluginApi.triggerListeners("buffering"),"undefined"==typeof e.downloadSpeed?i.pluginApi.on("bandwidthChecked",function(){O.quality=i.pluginApi.exists(O.quality)?O.quality:T(e.downloadSpeed/1024),O.src="",O.src=q(O.quality),O.load(),O.addEventListener("canplay",t)}):(O.quality=i.pluginApi.exists(O.quality)?O.quality:T(e.downloadSpeed/1024),O.src="",O.src=q(O.quality),O.load(),O.addEventListener("canplay",t)),O.src}function Q(e){M(parseInt(e))}function R(e){O.requestFullScreen?i.pluginApi.addEvent(O,"fullscreenchange",function(){e()}):O.mozRequestFullScreen?i.pluginApi.addEvent(O,"mozfullscreenchange",function(){e()}):O.webkitRequestFullScreen?i.pluginApi.addEvent(O,"webkitfullscreenchange",function(){e()}):O.msRequestFullscreen?i.pluginApi.addEvent(O,"MSFullscreenChange",function(){e()}):(i.pluginApi.addEvent(O,"webkitendfullscreen",function(){N=!1,P(),e()}),i.pluginApi.addEvent(O,"webkitbeginfullscreen",function(){N=!0,e()}))}function D(e){if(U=!1,!e&&(e=!1),!j||e){J.playPromise?J.playPromise.then(function(){O.pause()})["catch"](function(){O.pause()}):O.pause();try{O.currentTime=0}catch(t){}W=!1,Y=!1,j=!0,i.pluginApi.triggerListeners("stop"),K.stop()}G=!1,i.pluginApi.triggerListeners("bufferingDone")}if(!(this instanceof s))return new s(i);var B,O,V,z,H=this,N=!1,W=!1,U=!1,Y=!1,j=!0,G=!1,X=[{string:"v",display:"S",bitrate:"500"},{string:"vm",display:"M",bitrate:"1000"},{string:"vx",display:"L",bitrate:"3000"}],J={volumeBeforeMute:50,currentTime:0,setTime:0,setPerc:0,playPosition:0,oldPlayPosition:0,bufferPercent:null,oldBufferPercent:null,playProgress:null,oldPlayProgress:null,lastQualityChange:0,maxQuality:X.length-1,currentQuality:0,playPromise:null},K={checkInterval:null,notifyInterval:null,start:function(){this.stop(),this.checkInterval=setInterval(r,50),this.notifyInterval=setInterval(function(){i.pluginApi.triggerListeners("progress")},100)},stop:function(){clearInterval(this.checkInterval),clearInterval(this.notifyInterval)}},Z={canvas:null,createCanvas:function(){this.canvas&&(B.removeChild(this.canvas),this.canvas=null),this.canvas=document.createElement("canvas");var e=O.videoWidth,t=O.videoHeight;this.canvas.width=e,this.canvas.height=t,this.canvas.style.position="absolute",this.canvas.style.width="0%",this.canvas.style.transform="translateY(-50%)",this.canvas.style.top="50%",this.canvas.style.left="0px";var i=this.canvas.getContext("2d");i.drawImage(O,0,0,e,t),B.appendChild(this.canvas),this.canvas.style.width="100%"},refreshCanvas:function(){if(this.canvas){var e=O.videoWidth,t=O.videoHeight,i=this.canvas.getContext("2d");i.drawImage(O,0,0,e,t),this.canvas.style.top="50%",this.canvas.style.left="0px"}else this.createCanvas()},removeCanvas:function(){this.canvas&&(this.canvas.parentNode&&this.canvas.parentNode.removeChild(this.canvas),B.contains(this.canvas)&&B.removeChild(this.canvas),this.canvas=null)}},$=!1,_=!0,ee=!0,te=!1,ie=!1,ne=.5,re=2,se=.25;return l(),this};r.prototype.type=i,r.prototype.version=n,e.Cliplister.addStage(r)}(window,void 0);!function(e,t){var n="InnerControls",i="1.2.2",o="visual",a="inner",l=function(){function r(){(!Q&&!P.exists(R.animation)||!Q&&R.animation)&&(S(!0),P.animateElementPosition(A,"bottom",-1,300,function(){},!1,!0),P.showCursor())}function s(e){if(Q&&!P.exists(R.animation)||Q&&R.animation){clearTimeout(V);var n="undefined"!=typeof R.timeout?parseInt(R.timeout):2e3;n=e===t?n:1,V=setTimeout(function(){(!U||e&&!X)&&(S(!1),P.animateElementPosition(A,"bottom",-(_+1),300,function(){},!1,!0),P.isFullscreen()&&P.hideCursor())},n)}}function c(){return O}function d(){return B}function u(){return H}function p(){return I}function g(){return R}function v(){return D}function f(){return z}function h(){return N}function b(e,t){return P.dataset(e,"clBinding")==t?e:b(e.parentNode,t)}function m(e,t){if(P.dataset(e,"clBinding")==t)return e;for(var n=e.childNodes,i=0;i<n.length;i++)if(1==n[i].nodeType){var o=m(n[i],t);if(o)return o}}function y(){var e=P.platform().os.mobile;if(e=!(P.exists(R.mobileDefaultControls)&&!R.mobileDefaultControls)&&e,P.platform().os.mobile&&e)P.on("stageSet",function(){P.showDefaultControls()});else{if(A=document.createElement("div"),A.style.position="absolute",$=P.extend(!0,$,R.qualityLabels),P.exists(R.template)){if("external"==R.template.type){var t=R.template.source.replace(/[^\/]*$/,"");P.ajax(R.template.source,function(e){var n=document.createElement("div"),i=e.responseText;i=i.replace(/(url\(['"]?)([\da-z\.\-_\/]+)(['"]?\))/g,"$1"+t+"$2$3"),n.innerHTML=i;var o=document.createElement("style");o.type="text/css",o.appendChild(document.createTextNode(n.getElementsByTagName("style")[0].innerHTML)),document.getElementsByTagName("head")[0].appendChild(o),A.innerHTML=n.querySelector("#video-test-container").innerHTML,w()})}}else{var n=" #video-test-container{height: 300px;width: 800px;position: relative;}.cl-a{cursor: pointer;}.cl-b{ position: absolute;left: 0px;bottom: 0px;right: 0px;height: 52px;width: 100%;background-color: rgba(12,76,132,1);}.cl-b,.cl-b *{-webkit-touch-callout: none;-webkit-user-select: none;-khtml-user-select: none;-moz-user-select: none;-ms-user-select: none;user-select: none;}.cl-c{ position: relative;height: 52px;width: 52px;float: right;background-size: auto 52px;background-repeat: no-repeat;background-color: inherit;background-image: url(default/img/controls-map.svg);}.cl-d{font-size: 18px;font-family: Arial;color: white;}.cl-e{ background-position: 0px 0px;background-position-x: 0px;float: left;}.cl-f{ background-position: -52px 0px;background-position-x: -52px;float: left;display: none;}.cl-g{ float: left;height: 52px;width: 80px;text-align: center;line-height: 52px;color: white;}.cl-h{position: relative;height: 52px;overflow: hidden;}.cl-i{position: relative;height: 4px;margin-left: 8px;margin-right: 8px;overflow: visible;top: 24px;border-radius: 5px;background-color: rgb(72,120,162);}.cl-j{position: relative;height: 100%;width: 0%;left: 0px;border-radius: 5px;background-color: rgb(163,187,181);}.cl-k{position: relative;height: 100%;width: 0%;left: 0px;border-radius: 5px;background-color: rgb(255,255,255);margin-top: -4px;}.cl-l{ float: right;height: 52px;width: 80px;text-align: center;line-height: 52px;}.cl-m{ background-position: -624px 0px;background-position-x: -624px;}.cl-m:hover .cl-m-overlay{visibility: visible;opacity: 1;}.cl-m-overlay{position: absolute;height: 96px;width: 100px;left: 0;bottom: 52px;opacity: 0;background-color: inherit;visibility: hidden;-webkit-transition: all ease-out 0.2s;-moz-transition: all ease-out 0.2s;-o-transition: all ease-out 0.2s;transition: all ease-out 0.2s;}.cl-m-tab{float: left;}.cl-m-tab label{margin-left: -1px;position: relative;left: 1px;top: 0px;font-size: 10px;color: white;padding: 5px;border: 1px solid rgba(12,76,132,1);}.cl-m-tab [type=radio]{display: none;}.cl-m-tab .cl-p{position: absolute;top: 30px;left: 0;right: 0;padding-left: 20px;padding-right: 20px;opacity: 0;}.cl-m-tab .cl-p input{ width: 100%;}.cl-q{ width: 100%;padding: 5px;border: 1px solid transparent;color: rgb(255,255,255);}.cl-q:hover{ border: 1px solid rgb(255,255,255);background-color: rgb(163,187,181);}.cl-q a{ display: inline-block;width: 100%;color: rgb(255,255,255);}.cl-q:hover a{ text-decoration: none;}.cl-m-tab [type=radio]:checked ~ label{border: 1px solid white;z-index: 2;}.cl-m-tab [type=radio]:checked ~ label ~ .cl-p{z-index: 1;opacity: 1;}.cl-r{ background-position: -468px 0px;background-position-x: -468px;}.cl-r:hover .cl-r-overlay{visibility: visible;opacity: 1;}.cl-r-text{position: absolute;top: 50%;left: 50%;font-size: 10px;color: white;transform: translate(-50%,-50%);}.cl-r-overlay{position: absolute;//height: 100px;width: 52px;bottom: 52px;opacity: 0;background-color: inherit;visibility: hidden;-webkit-transition: all ease-out 0.2s;-moz-transition: all ease-out 0.2s;-o-transition: all ease-out 0.2s;transition: all ease-out 0.2s;}.cl-r-overlay-entry{height: 30px;line-height: 30px;color: white;text-align: center;font-size: 10px;}.cl-v{ background-position: 0px 0px;}.cl-v:hover .cl-v-overlay{visibility: visible;opacity: 1;}.cl-v-text{position: absolute;top: 55%;left: 55%;font-size: 10px;color: white;}.cl-v-overlay{position: absolute;//height: 100px;width: 52px;bottom: 52px;opacity: 0;background-color: inherit;visibility: hidden;-webkit-transition: all ease-out 0.2s;-moz-transition: all ease-out 0.2s;-o-transition: all ease-out 0.2s;transition: all ease-out 0.2s;}.cl-v-faster{background-position: -520px 0px;background-position-x: -520px;}.cl-v-slower{background-position: -572px 0px;background-position-x: -572px;}.cl-aa{ background-position: -104px 0px;background-position-x: -104px;}.cl-ab{ background-position: -156px 0px;background-position-x: -156px;display: none;}.cl-ac{ -webkit-transition: all ease-out 0.2s;-moz-transition: all ease-out 0.2s;-o-transition: all ease-out 0.2s;transition: all ease-out 0.2s;}.cl-ac:hover .cl-ac-slider-container{visibility: visible;opacity: 1;}.cl-ae{ position: relative;height: 16px;width: 16px;position: absolute;background-color: #fff;border-radius: 100%;cursor: pointer;}.cl-g-point{ top: -6px;right: -8px;}.cl-ag{ top: -8px;left: -6px;}.cl-ac-slider-container{ position: absolute;height: 100px;width: 52px;bottom: 52px;opacity: 0;background-color: inherit;visibility: hidden;-webkit-transition: all ease-out 0.2s;-moz-transition: all ease-out 0.2s;-o-transition: all ease-out 0.2s;transition: all ease-out 0.2s;}.cl-ac-4,.cl-ac-3,.cl-ac-2,.cl-ac-1,.cl-ac-0{display: none;position: absolute;height: 52px;width: 52px;left: 0px;top: 0px;}.cl-ac-4{background-position: -208px 0px;background-position-x: -208px;}.cl-ac-3{background-position: -260px 0px;background-position-x: -260px;}.cl-ac-2{background-position: -312px 0px;background-position-x: -312px;display: block;}.cl-ac-1{background-position: -364px 0px;background-position-x: -364px;}.cl-ac-0{background-position: -416px 0px;background-position-x: -416px;}.cl-ac-slider-rail{ position: relative;margin: 20px auto;height: 60px;width: 4px;border-radius: 5px;background-color: rgb(72,120,162);}.cl-ac-slider-current{ position: absolute;height: 50%;width: 100%;left: 0px;bottom: 0px;border-radius: 5px;background-color: rgb(255,255,255);}",i='<div id="video-test-container"><div class="cl-b" data-cl-binding="controls"><div class="cl-a cl-c cl-e" data-cl-binding="play"></div><div class="cl-a cl-c cl-f" data-cl-binding="pause"></div><div class="cl-g cl-d"><span data-cl-binding="time-minute">00</span><span>:</span><span data-cl-binding="time-second">00</span></div><div class="cl-a cl-c cl-aa" data-cl-binding="fullscreen-enter"></div><div class="cl-a cl-c cl-ab" data-cl-binding="fullscreen-leave"></div><div class="cl-c cl-ac" data-cl-binding="volume"><div class="cl-c cl-ac-4" data-cl-binding="volume-80"></div><div class="cl-c cl-ac-3" data-cl-binding="volume-60"></div><div class="cl-c cl-ac-2" data-cl-binding="volume-40"></div><div class="cl-c cl-ac-1" data-cl-binding="volume-20"></div><div class="cl-c cl-ac-0" data-cl-binding="volume-0"></div><div class="cl-ac-slider-container"><div data-cl-binding="volume-bar" data-cl-orientation="vertical" class="cl-ac-slider-rail"><div data-cl-binding="volume-bar-filled" class="cl-ac-slider-current"><div data-cl-binding="volume-bar-slider" class="cl-ae cl-ag"></div></div></div></div></div><div class="cl-c cl-m" data-cl-binding="share-button"><div class="cl-m-overlay" data-cl-binding="share-overlay"><div class="cl-p cl-q"><a href="#" data-cl-binding="share-link-facebook">Facebook</a></div><div class="cl-p cl-q"><a href="#" data-cl-binding="share-link-twitter">Twitter</a></div><div class="cl-p cl-q"><a href="#" data-cl-binding="share-link-googleplus">Google+</a></div></div></div><div class="cl-c cl-r" data-cl-binding="quality-button"><div class="cl-r-overlay" data-cl-binding="quality-overlay"><div class="cl-a cl-r-overlay-entry" data-cl-binding="quality-overlay-entry">360p</div></div><div class="cl-r-text" data-cl-binding="playback-quality">Auto</div></div><div class="cl-c cl-v" data-cl-binding="speed-button"><div class="cl-v-overlay"><div class="cl-a cl-c cl-v-faster" data-cl-binding="playback-speed-faster"></div><div class="cl-a cl-c cl-v-slower" data-cl-binding="playback-speed-slower"></div></div><div class="cl-v-text" data-cl-binding="playback-speed">x1.0</div></div><div class="cl-l cl-d"><span data-cl-binding="duration-minute">00</span><span>:</span><span data-cl-binding="duration-second">00</span></div><div class="cl-h"><div class="cl-h"><div class="cl-i" data-cl-binding="progress-bar"><div class="cl-j" data-cl-binding="progress-bar-buffered"></div><div class="cl-k" data-cl-binding="progress-bar-filled"><div data-cl-binding="progress-bar-slider" class="cl-ae cl-g-point"></div></div></div></div></div></div></div>',o=document.createElement("style");o.type="text/css",o.appendChild(document.createTextNode(n)),document.getElementsByTagName("head")[0].appendChild(o);var a=document.createElement("div");a.innerHTML=i,A.innerHTML=a.querySelector("#video-test-container").innerHTML,setTimeout(w,1)}P.onPluginsBuilt(function(){P.disableCSSTransition(A),P.setElementPosition(A,"bottom","-1",!1,!1),P.setElementSize(A,"width","100%",!1),P.setElementSize(A,"height",_),P.enableCSSTransition(A)}),P.onMouseenter(A,function(){X=!0}),P.onMouseleave(A,function(){X=!1}),P.on("mouseenter",function(){U=!0,P.addEvent(document,"mousemove",M),r()}),P.on("mouseleave",function(){U=!1,s(),clearTimeout(F),P.removeEvent(document,"mousemove",M)}),s()}}function x(e){if(("fullscreen-enter"==e||"fullscreen-leave"==e)&&"IE"==P.platform().browser.name&&10==P.platform().browser.version)return!1;var t=["play","pause","time-second","time-minute","time-seconds","duration-second","duration-minute","duration-seconds","fullscreen-enter","fullscreen-leave","volume","share","playback-speed","quality","speed-button","quality-button","download-button","download","share-button","progress-bar"],n=!0;return t.indexOf(e)>=0&&(R.whitelist&&R.whitelist.indexOf(e)==-1||R.blacklist&&R.blacklist.indexOf(e)>-1)&&(n=!1),n}function k(e,n,i){function o(e){n!==t&&n(e)}function a(t){1==t.which&&P.removeEvent(document,"mousemove",o),P.removeEvent(document,"mouseup",a),i&&i(e)}1==e.which&&(P.addEvent(document,"mousemove",o),P.addEvent(document,"mouseup",a))}function w(){R.parent.appendChild(A);for(var e=A.getElementsByTagName("*"),t=0;t<e.length;t++){var n=e[t];if(P.dataset(n,"clBinding")){var i=P.dataset(n,"clBinding"),o=P.dashSeparatedToCamelCase(i);W.add(n,o),x(i)||(n.style.display="none")}}}function C(t){var n=e.open(t,"_blank");n.focus()}function E(e){return!O&&(O=e,!0)}function L(e){return!B&&(B=e,!0)}function T(e){return!R&&(R=e,P=R.pluginApi,!0)}function q(e){return!N&&(N=e,!0)}function M(){r(),clearTimeout(F),F=setTimeout(function(){s(!0)},2e3)}function S(e){Q=e}if(!(this instanceof l))return new l;var O,B,H,I,R,D,z,N,P,A;H=a,I=n,D=o,z=i;var V,F,Q=!0,U=!1,X=!1,_=0,W={add:function(e,t){var n=null,i=t,o=/\s*(\d+)$/.exec(t);o&&(n=o[0],i=t.slice(0,o.index)),W[i]&&("function"==typeof W[i]&&W[i](e),W[i].add?W[i].add(e,i,n):(W[i].list||(W[i].list=[]),W[i].list.push(e)))},clear:function(e){var t=e;W[t]&&W[t].list&&(W[t].list=[])},controls:function(e){_=parseInt(getComputedStyle(e).height),P.setElementSize(A,"height",_),P.enableMovementListening(O,A)},durationMinute:function(e){e.innerHTML=P.pad(0,2),P.on(["mediaReady","assetReady"],function(){e.innerHTML=P.pad(Math.floor(P.getDuration()/60),2)},{subsequent:!0}),P.on("play",function(){e.innerHTML=P.pad(Math.floor(P.getDuration()/60),2)},{subsequent:!0})},durationSecond:function(e){e.innerHTML=P.pad(0,2),P.on(["mediaReady","assetReady"],function(){e.innerHTML=P.pad(P.getDuration()%60,2)},{subsequent:!0}),P.on("play",function(){e.innerHTML=P.pad(P.getDuration()%60,2)},{subsequent:!0})},durationSeconds:function(e){e.innerHTML.innerHTML=0,P.on(["mediaReady","assetReady"],function(){e.innerHTML=P.pad(P.getDuration(),2)},{subsequent:!0}),P.on("play",function(){e.innerHTML=P.pad(P.getDuration(),2)},{subsequent:!0})},fullscreenEnter:function(e){P.addEvent(e,"click",P.enterFullscreen),P.on("fullscreenChange",function(){S(!1),P.isFullscreen()?e.style.display="none":e.style.display="block",P.checkResize()})},fullscreenLeave:function(e){P.addEvent(e,"click",P.leaveFullscreen),P.on("fullscreenChange",function(){S(!1),P.isFullscreen()?e.style.display="block":e.style.display="none",P.checkResize()})},pause:function(e){P.addEvent(e,"click",P.pause),P.on("play",function(){e.style.display="block"}),P.on(["pause","stop"],function(){e.style.display="none"})},play:function(e){P.addEvent(e,"click",P.play),P.on("play",function(){e.style.display="none"}),P.on(["pause","stop"],function(){e.style.display="block"})},playbackSpeed:{},playbackSpeedText:function(e){P.on("playbackSpeedChange",function(){e.textContent="x"+P.getCurrentSpeed()})},playbackSpeedFaster:function(e){P.addEvent(e,"click",function(){P.faster()})},playbackSpeedSlower:function(e){P.addEvent(e,"click",function(){P.slower()})},progress:{},progressBar:function(e){function n(e,n){var i=0;return function(){var o=(new Date).getTime();if(!(o-i<e))return i=o,n.apply(t,arguments)}}P.addEvent(e,"click",function(t){var n=e.getBoundingClientRect(),i=n.left+document.body.scrollLeft,o=Math.round((t.pageX-i)/parseInt(getComputedStyle(e).width)*100);o<1?o=0:o>99&&(o=100),P.setProgressPlayed(o)}),P.addEvent(e,"mouseenter",function(t){var n=e.getBoundingClientRect(),i=n.left+document.body.scrollLeft,o=Math.round((t.pageX-i)/parseInt(getComputedStyle(e).width)*100);P.triggerListeners("progressBarHoverStart",[t,o])}),P.addEvent(e,"mouseleave",function(t){var n=e.getBoundingClientRect(),i=n.left+document.body.scrollLeft;Math.round((t.pageX-i)/parseInt(getComputedStyle(e).width)*100);P.triggerListeners("progressBarHoverEnd",t)});var i=function(t){var n=t.target.getBoundingClientRect(),i=n.left+document.body.scrollLeft,o=Math.round((t.pageX-i)/parseInt(getComputedStyle(e).width)*100);P.triggerListeners("progressBarHover",[t,o])},o=n(100,i);P.addEvent(e,"mousemove",o)},progressBarFilled:function(e){P.on(["progress","seek"],function(){e.style.width=P.getProgressPlayed()+"%"}),P.on("stop",function(){e.style.width="0%"})},progressBarBuffered:function(e){P.on(["progress","seek"],function(){e.style.width=Math.floor(P.getPercentBuffered())+"%"})},progressBarSlider:function(e){P.addEvent(e,"mousedown",function(t){var n=b(e,"progress-bar"),i=n.getBoundingClientRect(),o=i.left+document.body.scrollLeft;k(t,function(e){var t=Math.round((e.pageX-o)/parseInt(getComputedStyle(n).width)*100);t<1?t=0:t>99&&(t=100),P.setProgressPlayed(t)})})},qualityButton:{},qualityOverlay:function(e){var t,n=e.getElementsByTagName("*");if(n.length>0){for(var i={},o=0;o<n.length;o++)if(P.dataset(n[o],"clBinding")&&"quality-overlay-entry"==P.dataset(n[o],"clBinding")){t=n[o];break}for(;e.firstChild;)e.removeChild(e.firstChild);t.textContent=$.auto,P.dataset(t).del("clBinding"),i.auto=t,P.exists(R.qualityLabelsOrder)||(e.appendChild(t),W.add(t,"qualityOverlayEntry")),P.on("stageSet",function(){function n(){o=P.hls(),o.on(Hls.Events.MANIFEST_PARSED,function(n,a){for(var l=o.levels,r=0;r<l.length;r++){var s=t.cloneNode(!0);s.textContent=l[r].height+"p",function(e){P.addEvent(s,"click",function(t){o.currentLevel=e})}(r),i["hls_"+r]=s,e.appendChild(s),W.add(s,"qualityOverlayEntry")}})}var o;if(o=P.hls())P.addEvent(t,"click",function(){o.currentLevel=-1}),P.on("hlsReady",n);else{for(W.clear("qualityOverlayEntry");e.firstChild;)e.removeChild(e.firstChild);P.exists(R.qualityLabelsOrder)||(e.appendChild(t),W.add(t,"qualityOverlayEntry"));for(var a=P.getAvailableQualities(),l=0;l<a.length;l++)$[a[l].bitrate]=a[l].display;P.addEvent(t,"click",function(){P.setQuality("auto"),P.play()});for(var r=0;r<a.length;r++){var s=t.cloneNode(!0);s.textContent=$[a[r].bitrate],function(e){P.addEvent(s,"click",function(){P.setQuality(a[e].bitrate),P.play()})}(r),i[a[r].bitrate]=s,P.exists(R.qualityLabelsOrder)||(e.appendChild(s),W.add(s,"qualityOverlayEntry"))}if(R.qualityLabelsOrder)for(r=0;r<R.qualityLabelsOrder.length;r++)e.appendChild(i[R.qualityLabelsOrder[r]]),W.add(i[R.qualityLabelsOrder[r]],"qualityOverlayEntry")}},{subsequent:!0})}},qualityOverlayEntry:function(e){var t=function(){if(!(hls=P.hls())){var t=P.getCurrentQuality();if(P.exists(t)){var n=$[P.getCurrentQuality().bitrate];e.textContent==n&&P.isQualityOverride()?e.classList.add("selected"):P.isQualityOverride()||e.textContent!=$.auto?e.classList.remove("selected"):e.classList.add("selected")}}};P.on(["stageSet","stageReady"],t,{subsequent:!0}),P.on("qualityChange",t)},qualityText:function(e){var t=function(){if(!(hls=P.hls())){var t=P.getCurrentQuality();if(P.exists(t)){var n=$[P.getCurrentQuality().bitrate];e.textContent=P.isQualityOverride()?n:$.auto}}};P.on(["stageSet","stageReady"],t,{subsequent:!0}),P.on("qualityChange",t)},downloadButton:{},downloadOverlay:function(t){var n,i=t.getElementsByTagName("*");if(i.length>0){var o=function(){var o=!1,a=!1;P.exists(R.download)&&(R.download.indexOf("download-derivates")>-1&&(o=P.getVideoDownloadLinks()),R.download.indexOf("streaming-derivates")>-1&&(a=P.getVideoStreamingLinks()));for(var l=0;l<i.length;s++)if(P.dataset(i[l],"clBinding")&&"download-overlay-entry"===P.dataset(i[l],"clBinding")){n=i[l];break}for(;t.firstChild;)t.removeChild(t.firstChild);if(o){var r=n.cloneNode(!0);r.textContent="Download:",r.style.fontWeight="bold",r.style.fontSize="12px",r.style.paddingLeft="10px",t.appendChild(r),W.add(r,"downloadOverlayEntry"),t.parentElement.style.display="block",Array.isArray(o)||(o=[o]);for(var s=0;s<o.length;s++){var c=new Date(o[s].valid_to),d=new Date;if(!(c>d))break;var u=n.cloneNode(!0),p=o[s].name;"."===p.charAt(p.length-5)?p=p.substring(0,p.length-5):"."===p.charAt(p.length-4)&&(p=p.substring(0,p.length-4)),p.length>20&&(p=p.substring(0,19)+" ..."),u.textContent=p,function(t){P.addEvent(u,"click",function(){e.open(o[t].location)})}(s),t.appendChild(u),W.add(u,"downloadOverlayEntry")}}if(a){var r=n.cloneNode(!0);r.textContent="Streaming:",r.style.fontWeight="bold",r.style.fontSize="12px",r.style.paddingLeft="10px",t.appendChild(r),W.add(r,"downloadOverlayEntry"),t.parentElement.style.display="block",Array.isArray(a)||(a=[a]);for(var s=0;s<a.length;s++){var c=new Date(a[s].valid_to),d=new Date;if(!(c>d))break;var u=n.cloneNode(!0),p=a[s].formatName||a[s].name;"."===p.charAt(p.length-5)?p=p.substring(0,p.length-5):"."===p.charAt(p.length-4)&&(p=p.substring(0,p.length-4)),p.length>20&&(p=p.substring(0,19)+" ..."),u.textContent=p,function(t){P.addEvent(u,"click",function(){e.open(a[t].location)})}(s),t.appendChild(u),W.add(u,"downloadOverlayEntry")}}o||a||(t.parentElement.style.display="none")};P.on("mediaReady",o)}},downloadOverlayEntry:function(e){var t=function(){};P.on("mediaReady",t)},share:{},shareOverlay:{},shareLinkFacebook:function(t){var n=R.shareUrl||e.location;t.onclick=function(){C("http://www.facebook.com/sharer.php?u="+encodeURI(n))}},shareLinkTwitter:function(t){var n=R.shareUrl||e.location;t.onclick=function(){C("https://twitter.com/intent/tweet?url="+encodeURI(n))}},shareLinkGoogleplus:function(t){var n=R.shareUrl||e.location;t.onclick=function(){C("https://plus.google.com/share?url="+encodeURI(n))}},shareLinkWhatsapp:function(t){var n=R.shareUrl||e.location;t.onclick=function(){C("whatsapp://send?text="+n)}},timeMinute:function(e){e.innerHTML=P.pad(0,2),P.on(["progress","seek"],function(){e.innerHTML=P.pad(Math.floor(Math.floor(P.getTimePlayed())/60),2)}),P.on("stop",function(){e.innerHTML=P.pad(0,2)})},timeSecond:function(e){e.innerHTML=P.pad(0,2),P.on(["progress","seek"],function(){e.innerHTML=P.pad(Math.floor(P.getTimePlayed())%60,2)}),P.on("stop",function(){e.innerHTML=P.pad(0,2)})},timeSeconds:function(e){e.innerHTML.innerHTML=0,P.on(["progress","seek"],function(){e.innerHTML=Math.floor(P.getTimePlayed())}),P.on("stop",function(){e.innerHTML=0})},volume:{},volumeIncrease:function(e){P.addEvent(e,"click",function(e){var t=P.getVolume()+5;t<100&&(P.setVolume(t),P.triggerListeners("volumeChangeDone"))})},volumeDecrease:function(e){P.addEvent(e,"click",function(e){var t=P.getVolume()-5;t>=0&&(P.setVolume(t),P.triggerListeners("volumeChangeDone"))})},volumeBar:function(t){P.addEvent(t,"click",function(n){n.stopPropagation();var i=t.getBoundingClientRect();if(P.dataset(t,"clOrientation")&&"vertical"==P.dataset(t,"clOrientation")){var o=e.pageYOffset||document.documentElement.scrollTop||document.body.scrollTop||0,a=i.bottom+o,l=Math.round(a-n.pageY)/parseInt(getComputedStyle(t).height)*100;l<1?l=0:l>99&&(l=100),P.setVolume(l),P.triggerListeners("volumeChangeDone")}else{var r=e.pageXOffset||document.documentElement.scrollLeft||document.body.scrollLeft||0,s=i.left+r,l=Math.round((n.pageX-s)/parseInt(getComputedStyle(t).width)*100);l<1?l=0:l>99&&(l=100),P.setVolume(l),P.triggerListeners("volumeChangeDone")}}),P.on(["stageBuilt","stageReady","volumeChange"],function(){var e=P.getVolume(),n=m(t,"volume-bar-filled");n&&(P.dataset(t,"clOrientation")&&"vertical"==P.dataset(t,"clOrientation")?n.style.height=e+"%":n.style.width=e+"%")},{subsequent:!0})},volumeBarFilled:{},volumeBarSlider:function(t){P.addEvent(t,"click",function(e){e.stopPropagation()}),P.addEvent(t,"mousedown",function(n){var i=b(t,"volume-bar-filled"),o=b(t,"volume-bar"),a=i.getBoundingClientRect();if(P.dataset(o,"clOrientation")&&"vertical"==P.dataset(o,"clOrientation")){var l=e.pageYOffset||document.documentElement.scrollTop||document.body.scrollTop||0,r=a.bottom+l;k(n,function(e){var t=Math.round(r-e.pageY)/parseInt(getComputedStyle(o).height)*100;t<1?t=0:t>99&&(t=100),P.setVolume(t)},function(){P.triggerListeners("volumeChangeDone")})}else{var s=e.pageXOffset||document.documentElement.scrollLeft||document.body.scrollLeft||0,c=a.left+s;k(n,function(e){var t=Math.round((e.pageX-c)/parseInt(getComputedStyle(o).width)*100);t<1?t=0:t>99&&(t=100),P.setVolume(t)},function(){P.triggerListeners("volumeChangeDone")})}})},volumeStep:{volumeIcons:{},add:function(e,t,n){e.percent=n;var i=b(e,"controls");i.uniqueid||(i.uniqueid=P.Counter.getUniqueNumber()),this.volumeIcons[i.uniqueid]||(this.volumeIcons[i.uniqueid]={}),e.controlsUniqueid=i.uniqueid;var o=Object.keys(this.volumeIcons[e.controlsUniqueid]);e.min=parseInt(n),e.max=100;for(var a=0;a<o.length;a++)if(o[a]>e.percent){a>0&&(this.volumeIcons[i.uniqueid][o[a-1]].max=e.percent-1),e.max=this.volumeIcons[i.uniqueid][o[a]].percent-1;break}this.volumeIcons[i.uniqueid][n]=e,this.init(e)},init:function(e){P.addEvent(e,"click",function(){P.isMuted()?P.unmute():P.mute()}),P.on(["mediaReady","volumeChange"],function(){var t=P.getVolume();t>=e.min&&t<=e.max?e.style.display="block":e.style.display="none"})}}},$={auto:"Auto"};return{getId:c,getLayer:d,getMode:u,getName:p,getParams:g,getType:v,getVersion:f,getWrapper:h,init:y,setId:E,setLayer:L,setParams:T,setWrapper:q}};l.prototype.name=n,l.prototype.version=i,l.prototype.type=o,l.prototype.mode=a,e.Cliplister.addPlugin(l)}(window,void 0);!function(e,n){var t="ClickableVideo",i="1.1",r="visual",u="inner",o=function(e){function n(){return h}function p(){return P}function l(){return T}function a(){return w}function c(){return e}function s(){return E}function f(){return k}function g(){return C}function d(){b=document.createElement("div"),b.style.position="absolute",e.pluginApi.transparentBackground(b),b.onclick=function(){B++,1==B?(clearTimeout(z),z=setTimeout(function(){B=0,clearTimeout(z),e.pluginApi.isPlaying()?e.pluginApi.pause():e.pluginApi.play()},200)):2==B&&(B=0,clearTimeout(z),e.pluginApi.features().fullscreen.fullscreenElement()?e.pluginApi.leaveFullscreen():e.pluginApi.enterFullscreen())},e.parent.appendChild(b),e.pluginApi.onPluginsBuilt(function(){e.pluginApi.setElementSize(b,"width","100%",!1),e.pluginApi.setElementSize(b,"height","100%")})}function m(e){return!h&&(h=e,!0)}function y(e){return!P&&(P=e,!0)}function A(n){return!e&&(e=n,!0)}function v(e){return!C&&(C=e,!0)}if(!(this instanceof o))return new o(e);var h,P,T,w,e,E,k,C,b;T=u,w=t,E=r,k=i;var z,B=0;return{getId:n,getLayer:p,getMode:l,getName:a,getParams:c,getType:s,getVersion:f,getWrapper:g,init:d,setId:m,setLayer:y,setParams:A,setWrapper:v}};o.prototype.name=t,o.prototype.version=i,o.prototype.type=r,o.prototype.mode=u,e.Cliplister.addPlugin(o)}(window,void 0);!function(i,n){var e="PlayButton",t="1.1",u="visual",o="inner",p=function(i){function n(){return v}function r(){return w}function l(){return x}function g(){return E}function a(){return i}function s(){return N}function c(){return S}function d(){return T}function f(){return!!P()&&(b=document.createElement("div"),b.style.position="absolute",i.pluginApi.exists(i.image)&&(b.style.backgroundImage="url("+i.image+")"),b.style.backgroundSize="100% auto",b.style.cursor="pointer",i.pluginApi.addEvent(b,"click",function(){i.pluginApi.play()}),i.pluginApi.on(["play","autoNextShown"],function(){i.pluginApi.hidePlugin(v)}),i.pluginApi.on("stop",function(){i.pluginApi.isLooping()||i.pluginApi.exists(i.pluginApi.isPlayNext)&&i.pluginApi.isPlayNext()||i.pluginApi.showPlugin(v)}),i.pluginApi.onPluginsBuilt(function(){i.pluginApi.setElementPosition({element:b,position:"top",value:"50%",reposition:!1,fromMiddlePoint:{x:!0,y:!0}}),i.pluginApi.setElementPosition({element:b,position:"left",value:"50%",reposition:!1,fromMiddlePoint:{x:!0,y:!0}}),i.pluginApi.setElementSize(b,"width",i.width,!1),i.pluginApi.setElementSize(b,"height",i.height)}),void i.parent.appendChild(b))}function m(i){return!v&&(v=i,!0)}function h(i){return!w&&(w=i,!0)}function y(n){return!i&&(i=n,!0)}function A(i){return!T&&(T=i,!0)}function P(){return i.image?i.width?!!i.height||(i.pluginApi.log("The "+k.name+" plugin requires a height.",1),!1):(i.pluginApi.log("The "+k.name+" plugin requires a width.",1),!1):(i.pluginApi.log("The "+k.name+" plugin requires the image parameter.",1),!1)}if(!(this instanceof p))return new p(i);var v,w,x,E,i,N,S,T,b,k=this;return x=o,E=e,N=u,S=t,{getId:n,getLayer:r,getMode:l,getName:g,getParams:a,getType:s,getVersion:c,getWrapper:d,init:f,setId:m,setLayer:h,setParams:y,setWrapper:A}};p.prototype.name=e,p.prototype.version=t,p.prototype.type=u,p.prototype.mode=o,i.Cliplister.addPlugin(p)}(window,void 0);!function(e,n){var i="PreviewImage",t="1.2",r="visual",o="inner",u=function(e){function n(){return k}function p(){return v}function l(){return x}function s(){return h}function g(){return e}function a(){return w}function c(){return P}function d(){return S}function f(){z=document.createElement("div"),z.style.position="absolute",z.style.backgroundColor="#fff",z.style.backgroundPosition="center center",z.style.backgroundSize="cover",e.pluginApi.platform().os.mobile&&(z.style.backgroundSize="contain",z.style.backgroundRepeat="no-repeat"),e.backgroundSize&&(z.style.backgroundSize="contain"===e.backgroundSize?"contain":"cover"),e.pointer&&(z.style.cursor="pointer"),e.pluginApi.on("assetReady",function(){var n=e.pluginApi.getAsset();e.pluginApi.exists(e.image)?z.style.backgroundImage="url("+e.image+")":e.pluginApi.exists(n.previews)&&e.pluginApi.exists(n.previews.picture)?z.style.backgroundImage="url("+n.previews.picture+")":e.pluginApi.exists(n.thumbnail)?z.style.backgroundImage="url("+n.thumbnail+")":e.pluginApi.exists(n.prerolls)&&e.pluginApi.exists(n.prerolls.preroll)&&e.pluginApi.exists(n.prerolls.preroll.content)&&(z.style.backgroundImage="url("+n.prerolls.preroll.content+")")}),e.pluginApi.on(["play","autoNextShown"],function(){e.pluginApi.hidePlugin(k)}),e.pluginApi.on("stop",function(){e.pluginApi.isLooping()||e.pluginApi.exists(e.pluginApi.isPlayNext)&&e.pluginApi.isPlayNext()||e.pluginApi.showPlugin(k)}),z.onclick=function(){e.pluginApi.play()},e.parent.appendChild(z),e.pluginApi.onPluginsBuilt(function(){e.pluginApi.setElementSize(z,"width","100%",!1),e.pluginApi.setElementSize(z,"height","100%")})}function y(e){return!k&&(k=e,!0)}function A(e){return!v&&(v=e,!0)}function m(n){return!e&&(e=n,!0)}function b(e){return!S&&(S=e,!0)}if(!(this instanceof u))return new u(e);var k,v,x,h,e,w,P,S,z;x=o,h=i,w=r,P=t;return{getId:n,getLayer:p,getMode:l,getName:s,getParams:g,getType:a,getVersion:c,getWrapper:d,init:f,setId:y,setLayer:A,setParams:m,setWrapper:b}};u.prototype.name=i,u.prototype.version=t,u.prototype.type=r,u.prototype.mode=o,e.Cliplister.addPlugin(u)}(window,void 0);