(function(){function n(t,i,r){function u(f,o){var h,c,s;if(!i[f]){if(!t[f]){if(h="function"==typeof require&&require,!o&&h)return h(f,!0);if(e)return e(f,!0);c=new Error("Cannot find module '"+f+"'");throw c.code="MODULE_NOT_FOUND",c;}s=i[f]={exports:{}};t[f][0].call(s.exports,function(n){var i=t[f][1][n];return u(i||n)},s,s.exports,n,t,i,r)}return i[f].exports}for(var e="function"==typeof require&&require,f=0;f<r.length;f++)u(r[f]);return u}return n})()({1:[function(n,t){(function(n){(function(n){"use strict";function i(n,t){this._show=this.show.bind(this);this._hide=this.hide.bind(this);this._maintainFocus=this._maintainFocus.bind(this);this._bindKeypress=this._bindKeypress.bind(this);this.container=n;this.dialog=n.querySelector('dialog, [role="dialog"], [role="alertdialog"]');this.role=this.dialog.getAttribute("role")||"dialog";this.useDialog="show"in document.createElement("dialog")&&this.dialog.nodeName==="DIALOG";this._listeners={};this.create(t)}function f(n){return Array.prototype.slice.call(n)}function r(n,t){return f((t||document).querySelectorAll(n))}function l(n){return NodeList.prototype.isPrototypeOf(n)?f(n):Element.prototype.isPrototypeOf(n)?[n]:typeof n=="string"?r(n):void 0}function e(n){var i=o(n),t=n.querySelector("[autofocus]")||i[0];t&&t.focus()}function o(n){return r(s.join(","),n).filter(function(n){return!!(n.offsetWidth||n.offsetHeight||n.getClientRects().length)})}function a(n,t){var i=o(n),r=i.indexOf(document.activeElement);t.shiftKey&&r===0?(i[i.length-1].focus(),t.preventDefault()):t.shiftKey||r!==i.length-1||(i[0].focus(),t.preventDefault())}function v(n){var i=f(n.parentNode.childNodes),t=i.filter(function(n){return n.nodeType===1});return t.splice(t.indexOf(n),1),t}var s=['a[href]:not([tabindex^="-"]):not([inert])','area[href]:not([tabindex^="-"]):not([inert])',"input:not([disabled]):not([inert])","select:not([disabled]):not([inert])","textarea:not([disabled]):not([inert])","button:not([disabled]):not([inert])",'iframe:not([tabindex^="-"]):not([inert])','audio:not([tabindex^="-"]):not([inert])','video:not([tabindex^="-"]):not([inert])','[contenteditable]:not([tabindex^="-"]):not([inert])','[tabindex]:not([tabindex^="-"]):not([inert])'],h=9,c=27,u;i.prototype.create=function(n){return this._targets=this._targets||l(n)||v(this.container),this.shown=this.dialog.hasAttribute("open"),this.dialog.setAttribute("role",this.role),this.useDialog?this.container.setAttribute("data-a11y-dialog-native",""):this.shown?this.container.removeAttribute("aria-hidden"):this.container.setAttribute("aria-hidden",!0),this._openers=r('[data-a11y-dialog-show="'+this.container.id+'"]'),this._openers.forEach(function(n){n.addEventListener("click",this._show)}.bind(this)),this._closers=r("[data-a11y-dialog-hide]",this.container).concat(r('[data-a11y-dialog-hide="'+this.container.id+'"]')),this._closers.forEach(function(n){n.addEventListener("click",this._hide)}.bind(this)),this._fire("create"),this};i.prototype.show=function(n){return this.shown?this:(this.shown=!0,u=document.activeElement,this.useDialog?this.dialog.showModal(n instanceof Event?void 0:n):(this.dialog.setAttribute("open",""),this.container.removeAttribute("aria-hidden"),this._targets.forEach(function(n){n.setAttribute("aria-hidden","true")})),e(this.dialog),document.body.addEventListener("focus",this._maintainFocus,!0),document.addEventListener("keydown",this._bindKeypress),this._fire("show",n),this)};i.prototype.hide=function(n){return this.shown?(this.shown=!1,this.useDialog?this.dialog.close(n instanceof Event?void 0:n):(this.dialog.removeAttribute("open"),this.container.setAttribute("aria-hidden","true"),this._targets.forEach(function(n){n.removeAttribute("aria-hidden")})),u&&u.focus&&u.focus(),document.body.removeEventListener("focus",this._maintainFocus,!0),document.removeEventListener("keydown",this._bindKeypress),this._fire("hide",n),this):this};i.prototype.destroy=function(){return this.hide(),this._openers.forEach(function(n){n.removeEventListener("click",this._show)}.bind(this)),this._closers.forEach(function(n){n.removeEventListener("click",this._hide)}.bind(this)),this._fire("destroy"),this._listeners={},this};i.prototype.on=function(n,t){return typeof this._listeners[n]=="undefined"&&(this._listeners[n]=[]),this._listeners[n].push(t),this};i.prototype.off=function(n,t){var i=this._listeners[n].indexOf(t);return i>-1&&this._listeners[n].splice(i,1),this};i.prototype._fire=function(n,t){var i=this._listeners[n]||[];i.forEach(function(n){n(this.container,t)}.bind(this))};i.prototype._bindKeypress=function(n){this.shown&&n.which===c&&this.role!=="alertdialog"&&(n.preventDefault(),this.hide(n));this.shown&&n.which===h&&a(this.dialog,n)};i.prototype._maintainFocus=function(n){this.shown&&!this.container.contains(n.target)&&e(this.dialog)};typeof t!="undefined"&&typeof t.exports!="undefined"?t.exports=i:typeof define=="function"&&define.amd?define("A11yDialog",[],function(){return i}):typeof n=="object"&&(n.A11yDialog=i)})(typeof n!="undefined"?n:window)}).call(this,typeof global!="undefined"?global:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{}],2:[function(n,t){var i=function(n){"use strict";function e(n){for(var r=getComputedStyle(n).fontFamily,i=null,t={};(i=f.exec(r))!==null;)t[i[1]]=i[2];return t["object-position"]?h(t):t}function o(n){var i=-1,t;for(n?("length"in n)||(n=[n]):n=document.querySelectorAll("video");n[++i];)t=e(n[i]),(t["object-fit"]||t["object-position"])&&(t["object-fit"]=t["object-fit"]||"fill",s(n[i],t))}function s(n,t){function f(){var h=n.videoWidth,c=n.videoHeight,o=h/c,u=r.clientWidth,f=r.clientHeight,l=u/f,s=0,e=0;i.marginLeft=i.marginTop=0;(o<l?t["object-fit"]==="contain":t["object-fit"]==="cover")?(s=f*o,e=u/o,i.width=Math.round(s)+"px",i.height=f+"px",i.marginLeft=t["object-position-x"]==="left"?0:t["object-position-x"]==="right"?Math.round(u-s)+"px":Math.round((u-s)/2)+"px"):(e=u/o,i.width=u+"px",i.height=Math.round(e)+"px",i.marginTop=t["object-position-y"]==="top"?0:t["object-position-y"]==="bottom"?Math.round(f-e)+"px":Math.round((f-e)/2)+"px");n.autoplay&&n.play()}var u,e;if(t["object-fit"]!=="fill"){var i=n.style,o=window.getComputedStyle(n),r=document.createElement("object-fit");r.appendChild(n.parentNode.replaceChild(r,n));u={height:"100%",width:"100%",boxSizing:"content-box",display:"inline-block",overflow:"hidden"};"backgroundColor backgroundImage borderColor borderStyle borderWidth bottom fontSize lineHeight left opacity margin position right top visibility".replace(/\w+/g,function(n){u[n]=o[n]});for(e in u)r.style[e]=u[e];i.border=i.margin=i.padding=0;i.display="block";i.opacity=1;n.addEventListener("loadedmetadata",f);window.addEventListener("optimizedResize",f);n.readyState>=1&&(n.removeEventListener("loadedmetadata",f),f())}}function h(n){return n["object-position-x"]=~n["object-position"].indexOf("left")?"left":~n["object-position"].indexOf("right")?"right":"center",n["object-position-y"]=~n["object-position"].indexOf("top")?"top":~n["object-position"].indexOf("bottom")?"bottom":"center",n}function c(n,t,i){var u,r,f;i=i||window;u=!1;r=null;try{r=new CustomEvent(t)}catch(e){r=document.createEvent("Event");r.initEvent(t,!0,!0)}f=function(){u||(u=!0,requestAnimationFrame(function(){i.dispatchEvent(r);u=!1}))};i.addEventListener(n,f)}var t=navigator.userAgent.indexOf("Edge/")>=0,i=new Image,r="object-fit"in i.style&&!t,u="object-position"in i.style&&!t,f=/(object-fit|object-position)\s*:\s*([-\w\s%]+)/g;r&&u||(o(n),c("resize","optimizedResize"))};typeof t!="undefined"&&typeof t.exports!="undefined"&&(t.exports=i)},{}],3:[function(n,t,i){(function(n){"object"==typeof navigator&&function(n,r){"object"==typeof i&&"undefined"!=typeof t?t.exports=r():"function"==typeof define&&define.amd?define("Plyr",r):n.Plyr=r()}(this,function(){"use strict";function it(n,t){if(!(n instanceof t))throw new TypeError("Cannot call a class as a function");}function ai(n,t){for(var i,r=0;r<t.length;r++)i=t[r],i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(n,i.key,i)}function rt(n,t,i){return t&&ai(n.prototype,t),i&&ai(n,i),n}function vi(n,t,i){return t in n?Object.defineProperty(n,t,{value:i,enumerable:!0,configurable:!0,writable:!0}):n[t]=i,n}function y(n,t){return function(n){if(Array.isArray(n))return n}(n)||function(n,t){var r=[],u=!0,f=!1,e=void 0,o,i;try{for(i=n[Symbol.iterator]();!(u=(o=i.next()).done)&&(r.push(o.value),!t||r.length!==t);u=!0);}catch(n){f=!0;e=n}finally{try{u||null==i.return||i.return()}finally{if(f)throw e;}}return r}(n,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance");}()}function dr(n){return function(n){if(Array.isArray(n)){for(var t=0,i=new Array(n.length);t<n.length;t++)i[t]=n[t];return i}}(n)||function(n){if(Symbol.iterator in Object(n)||"[object Arguments]"===Object.prototype.toString.call(n))return Array.from(n)}(n)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance");}()}function nt(n,i,r){var f=this,e=arguments.length>3&&void 0!==arguments[3]&&arguments[3],h=!(arguments.length>4&&void 0!==arguments[4])||arguments[4],o=arguments.length>5&&void 0!==arguments[5]&&arguments[5],s,u;n&&"addEventListener"in n&&!t.empty(i)&&t.function(r)&&(s=i.split(" "),u=o,gr&&(u={passive:h,capture:o}),s.forEach(function(t){f&&f.eventListeners&&e&&f.eventListeners.push({element:n,type:t,callback:r,options:u});n[e?"addEventListener":"removeEventListener"](t,r,u)}))}function e(n){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",i=arguments.length>2?arguments[2]:void 0,r=!(arguments.length>3&&void 0!==arguments[3])||arguments[3],u=arguments.length>4&&void 0!==arguments[4]&&arguments[4];nt.call(this,n,t,i,!0,r,u)}function bt(n){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",i=arguments.length>2?arguments[2]:void 0,r=!(arguments.length>3&&void 0!==arguments[3])||arguments[3],u=arguments.length>4&&void 0!==arguments[4]&&arguments[4];nt.call(this,n,t,i,!1,r,u)}function ki(n){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",u=arguments.length>2?arguments[2]:void 0,i=!(arguments.length>3&&void 0!==arguments[3])||arguments[3],r=arguments.length>4&&void 0!==arguments[4]&&arguments[4];nt.call(this,n,t,function f(){bt(n,t,f,i,r);for(var o=arguments.length,s=new Array(o),e=0;e<o;e++)s[e]=arguments[e];u.apply(this,s)},!0,i,r)}function r(n){var i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",u=arguments.length>2&&void 0!==arguments[2]&&arguments[2],f=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},r;t.element(n)&&!t.empty(i)&&(r=new CustomEvent(i,{bubbles:u,detail:Object.assign({},f,{plyr:this})}),n.dispatchEvent(r))}function di(n,t){var i=n.length?n:[n];Array.from(i).reverse().forEach(function(n,i){var r=i>0?t.cloneNode(!0):t,u=n.parentNode,f=n.nextSibling;r.appendChild(n);f?u.insertBefore(r,f):u.appendChild(r)})}function kt(n,i){t.element(n)&&!t.empty(i)&&Object.entries(i).filter(function(n){var i=y(n,2)[1];return!t.nullOrUndefined(i)}).forEach(function(t){var i=y(t,2),r=i[0],u=i[1];return n.setAttribute(r,u)})}function u(n,i,r){var u=document.createElement(n);return t.object(i)&&kt(u,i),t.string(r)&&(u.innerText=r),u}function gi(n,i,r,f){t.element(i)&&i.appendChild(u(n,r,f))}function d(n){t.nodeList(n)||t.array(n)?Array.from(n).forEach(d):t.element(n)&&t.element(n.parentNode)&&n.parentNode.removeChild(n)}function at(n){if(t.element(n))for(var i=n.childNodes.length;i>0;)n.removeChild(n.lastChild),i-=1}function dt(n,i){return t.element(i)&&t.element(i.parentNode)&&t.element(n)?(i.parentNode.replaceChild(n,i),n):null}function b(n,i){if(!t.string(n)||t.empty(n))return{};var r={},u=i;return n.split(",").forEach(function(n){var i=n.trim(),e=i.replace(".",""),f=i.replace(/[[\]]/g,"").split("="),o=f[0],s=f.length>1?f[1].replace(/["']/g,""):"";switch(i.charAt(0)){case".":t.object(u)&&t.string(u.class)&&(u.class+=" ".concat(e));r.class=e;break;case"#":r.id=i.replace("#","");break;case"[":r[o]=s}}),r}function p(n,i){if(t.element(n)){var r=i;t.boolean(r)||(r=!n.hidden);r?n.setAttribute("hidden",""):n.removeAttribute("hidden")}}function f(n,i,r){if(t.nodeList(n))return Array.from(n).map(function(n){return f(n,i,r)});if(t.element(n)){var u="toggle";return void 0!==r&&(u=r?"add":"remove"),n.classList[u](i),n.classList.contains(i)}return!1}function vt(n,i){return t.element(n)&&n.classList.contains(i)}function ft(n,t){return function(){return Array.from(document.querySelectorAll(t)).includes(this)}.call(n,t)}function et(n){return this.elements.container.querySelectorAll(n)}function c(n){return this.elements.container.querySelector(n)}function gt(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,i=arguments.length>1&&void 0!==arguments[1]&&arguments[1];t.element(n)&&(n.focus({preventScroll:!0}),i&&f(n,this.config.classNames.tabFocus))}function ri(n){setTimeout(function(){try{p(n,!0);n.offsetHeight;p(n,!1)}catch(n){}},0)}function ir(n){return t.array(n)?n.filter(function(t,i){return n.indexOf(t)===i}):n}function rr(n,t){return t.split(".").reduce(function(n,t){return n&&n[t]},n)}function v(){for(var i,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},f=arguments.length,r=new Array(f>1?f-1:0),u=1;u<f;u++)r[u-1]=arguments[u];return r.length?(i=r.shift(),t.object(i)?(Object.keys(i).forEach(function(r){t.object(i[r])?(Object.keys(n).includes(r)||Object.assign(n,vi({},r,{})),v(n[r],i[r])):Object.assign(n,vi({},r,i[r]))}),v.apply(void 0,[n].concat(r))):n):n}function fi(n){for(var r=arguments.length,u=new Array(r>1?r-1:0),i=1;i<r;i++)u[i-1]=arguments[i];return t.empty(n)?n:n.toString().replace(/{(\d+)}/g,function(n,t){return u[t].toString()})}function ot(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";return n.replace(new RegExp(t.toString().replace(/([.*+?^=!:${}()|[\]\/\\])/g,"\\$1"),"g"),i.toString())}function ur(){return(arguments.length>0&&void 0!==arguments[0]?arguments[0]:"").toString().replace(/\w\S*/g,function(n){return n.charAt(0).toUpperCase()+n.substr(1).toLowerCase()})}function nu(){var n=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:"").toString();return(n=function(){var n=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:"").toString();return n=ot(n,"-"," "),n=ot(n,"_"," "),ot(n=ur(n)," ","")}(n)).charAt(0).toLowerCase()+n.slice(1)}function tu(n){var t=document.createElement("div");return t.appendChild(n),t.innerHTML}function yt(n){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"text";return new Promise(function(i,r){try{var u=new XMLHttpRequest;if(!("withCredentials"in u))return;u.addEventListener("load",function(){if("text"===t)try{i(JSON.parse(u.responseText))}catch(n){i(u.responseText)}else i(u.response)});u.addEventListener("error",function(){throw new Error(u.status);});u.open("GET",n,!0);u.responseType=t;u.send()}catch(n){r(n)}})}function or(n,i){var f,r,e,h;if(t.string(n)){var u=t.string(i),o=function(){return null!==document.getElementById(i)},s=function(n,t){n.innerHTML=t;u&&o()||document.body.insertAdjacentElement("afterbegin",n)};u&&o()||(f=er.supported,r=document.createElement("div"),(r.setAttribute("hidden",""),u&&r.setAttribute("id",i),f)&&(e=window.localStorage.getItem("".concat("cache","-").concat(i)),null!==e&&(h=JSON.parse(e),s(r,h.content))),yt(n).then(function(n){t.empty(n)||(f&&window.localStorage.setItem("".concat("cache","-").concat(i),JSON.stringify({content:n})),s(r,n))}).catch(function(){}))}}function ei(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,r=arguments.length>1&&void 0!==arguments[1]&&arguments[1],u=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if(!t.number(n))return ei(null,r,u);var f=function(n){return"0".concat(n).slice(-2)},i=sr(n),e=iu(n),o=ru(n);return i=r||i>0?"".concat(i,":"):"","".concat(u&&n>0?"-":"").concat(i).concat(f(e),":").concat(f(o))}function hr(n){var t=n,i;arguments.length>1&&void 0!==arguments[1]&&!arguments[1]||(i=document.createElement("a"),i.href=t,t=i.href);try{return new URL(t)}catch(n){return null}}function cr(n){var i=new URLSearchParams;return t.object(n)&&Object.entries(n).forEach(function(n){var t=y(n,2),r=t[0],u=t[1];i.set(r,u)}),i}function vr(){if(this.enabled){var n=this.player.elements.buttons.fullscreen;t.element(n)&&(n.pressed=this.active);r.call(this.player,this.target,this.active?"enterfullscreen":"exitfullscreen",!0);a.isIos||function(){var u=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,f=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(t.element(u)){var n=et.call(this,"button:not(:disabled), input:not(:disabled), [tabindex]"),i=n[0],r=n[n.length-1];nt.call(this,this.elements.container,"keydown",function(n){if("Tab"===n.key&&9===n.keyCode){var t=document.activeElement;t!==r||n.shiftKey?t===i&&n.shiftKey&&(r.focus(),n.preventDefault()):(i.focus(),n.preventDefault())}},f,!1)}}.call(this.player,this.target,this.active)}}function yr(){var e=this,i=arguments.length>0&&void 0!==arguments[0]&&arguments[0],n,r,u;(i?this.scrollPosition={x:window.scrollX||0,y:window.scrollY||0}:window.scrollTo(this.scrollPosition.x,this.scrollPosition.y),document.body.style.overflow=i?"hidden":"",f(this.target,this.player.config.classNames.fullscreen.fallback,i),a.isIos)&&(n=document.head.querySelector('meta[name="viewport"]'),r="viewport-fit=cover",n||(n=document.createElement("meta")).setAttribute("name","viewport"),u=t.string(n.content)&&n.content.includes(r),i?(this.cleanupViewport=!u,u||(n.content+=",".concat(r))):this.cleanupViewport&&(n.content=n.content.split(",").filter(function(n){return n.trim()!==r}).join(",")),setTimeout(function(){return ri(e.target)},100));vr.call(this)}function pt(n){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;return new Promise(function(i,r){var u=new Image,f=function(){delete u.onload;delete u.onerror;(u.naturalWidth>=t?i:r)(u)};Object.assign(u,{onload:f,onerror:f,src:n})})}function ci(n){return new Promise(function(t,i){pr(n,{success:t,error:i})})}function st(n){n&&!this.embed.hasPlayed&&(this.embed.hasPlayed=!0);this.media.paused===n&&(this.media.paused=!n,r.call(this,this.media,n?"play":"pause"))}function ht(n){n&&!this.embed.hasPlayed&&(this.embed.hasPlayed=!0);this.media.paused===n&&(this.media.paused=!n,r.call(this,this.media,n?"play":"pause"))}var ut=function(n){return null!=n?n.constructor:null},k=function(n,t){return Boolean(n&&t&&n instanceof t)},wt=function(n){return null==n},yi=function(n){return ut(n)===Object},lt=function(n){return ut(n)===String},pi=function(n){return Array.isArray(n)},wi=function(n){return k(n,NodeList)},bi=function(n){return wt(n)||(lt(n)||pi(n)||wi(n))&&!n.length||yi(n)&&!Object.keys(n).length},t={nullOrUndefined:wt,object:yi,number:function(n){return ut(n)===Number&&!Number.isNaN(n)},string:lt,boolean:function(n){return ut(n)===Boolean},"function":function(n){return ut(n)===Function},array:pi,weakMap:function(n){return k(n,WeakMap)},nodeList:wi,element:function(n){return k(n,Element)},textNode:function(n){return ut(n)===Text},event:function(n){return k(n,Event)},keyboardEvent:function(n){return k(n,KeyboardEvent)},cue:function(n){return k(n,window.TextTrackCue)||k(n,window.VTTCue)},track:function(n){return k(n,TextTrack)||!wt(n)&&lt(n.kind)},url:function(n){if(k(n,window.URL))return!0;if(!lt(n))return!1;var t=n;n.startsWith("http://")&&n.startsWith("https://")||(t="http://".concat(n));try{return!bi(new URL(t).hostname)}catch(n){return!1}},empty:bi},gr=function(){var t=!1,n;try{n=Object.defineProperty({},"passive",{get:function(){return t=!0,null}});window.addEventListener("test",null,n);window.removeEventListener("test",null,n)}catch(t){}return t}(),nr,ni,ti,ii=(nr=document.createElement("span"),ni={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd otransitionend",transition:"transitionend"},ti=Object.keys(ni).find(function(n){return void 0!==nr.style[n]}),!!t.string(ti)&&ni[ti]),ui,a={isIE:!!document.documentMode,isWebkit:"WebkitAppearance"in document.documentElement.style&&!/Edge/.test(navigator.userAgent),isIPhone:/(iPhone|iPod)/gi.test(navigator.platform),isIos:/(iPad|iPhone|iPod)/gi.test(navigator.platform)},tr={"audio/ogg":"vorbis","audio/wav":"1","video/webm":"vp8, vorbis","video/mp4":"avc1.42E01E, mp4a.40.2","video/ogg":"theora"},h={audio:"canPlayType"in document.createElement("audio"),video:"canPlayType"in document.createElement("video"),check:function(n,t,i){var u=a.isIPhone&&i&&h.playsinline,r=h[n]||"html5"!==t;return{api:r,ui:r&&h.rangeInput&&("video"!==n||!a.isIPhone||u)}},pip:!(a.isIPhone||!t.function(u("video").webkitSetPresentationMode)&&(!document.pictureInPictureEnabled||u("video").disablePictureInPicture)),airplay:t.function(window.WebKitPlaybackTargetAvailabilityEvent),playsinline:"playsInline"in document.createElement("video"),mime:function(n){var i=y(n.split("/"),1)[0],t=n;if(!this.isHTML5||i!==this.type)return!1;Object.keys(tr).includes(t)&&(t+='; codecs="'.concat(tr[n],'"'));try{return Boolean(t&&this.media.canPlayType(t).replace(/no/,""))}catch(n){return!1}},textTracks:"textTracks"in document.createElement("video"),rangeInput:(ui=document.createElement("input"),ui.type="range","range"===ui.type),touch:"ontouchstart"in document.documentElement,transitions:!1!==ii,reducedMotion:"matchMedia"in window&&window.matchMedia("(prefers-reduced-motion)").matches},tt={getSources:function(){var n=this;return this.isHTML5?Array.from(this.media.querySelectorAll("source")).filter(function(t){return h.mime.call(n,t.getAttribute("type"))}):[]},getQualityOptions:function(){return tt.getSources.call(this).map(function(n){return Number(n.getAttribute("size"))}).filter(Boolean)},extend:function(){if(this.isHTML5){var n=this;Object.defineProperty(n.media,"quality",{get:function(){var t=tt.getSources.call(n).find(function(t){return t.getAttribute("src")===n.source});return t&&Number(t.getAttribute("size"))},set:function(t){var u=tt.getSources.call(n).find(function(n){return Number(n.getAttribute("size"))===t});if(u){var i=n.media,f=i.currentTime,e=i.paused,o=i.preload,s=i.readyState;n.media.src=u.getAttribute("src");("none"!==o||s)&&(n.once("loadedmetadata",function(){n.currentTime=f;e||n.play()}),n.media.load());r.call(n,n.media,"qualitychange",!1,{quality:t})}}})}},cancelRequests:function(){this.isHTML5&&(d(tt.getSources.call(this)),this.media.setAttribute("src",this.config.blankVideo),this.media.load(),this.debug.log("Cancelled network requests"))}},fr={pip:"PIP",airplay:"AirPlay",html5:"HTML5",vimeo:"Vimeo",youtube:"YouTube"},l=function(){var i=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n,u;return t.empty(i)||t.empty(r)?"":(n=rr(r.i18n,i),t.empty(n))?Object.keys(fr).includes(i)?fr[i]:"":(u={"{seektime}":r.seekTime,"{title}":r.title},Object.entries(u).forEach(function(t){var i=y(t,2),r=i[0],u=i[1];n=ot(n,r,u)}),n)},er=function(){function n(t){it(this,n);this.enabled=t.config.storage.enabled;this.key=t.config.storage.key}return rt(n,[{key:"get",value:function(i){var r,u;return!n.supported||!this.enabled?null:(r=window.localStorage.getItem(this.key),t.empty(r))?null:(u=JSON.parse(r),t.string(i)&&i.length?u[i]:u)}},{key:"set",value:function(i){if(n.supported&&this.enabled&&t.object(i)){var r=this.get();t.empty(r)&&(r={});v(r,i);window.localStorage.setItem(this.key,JSON.stringify(r))}}}],[{key:"supported",get:function(){try{return("localStorage"in window)?(window.localStorage.setItem("___test","___test"),window.localStorage.removeItem("___test"),!0):!1}catch(n){return!1}}}]),n}(),sr=function(n){return parseInt(n/3600%60,10)},iu=function(n){return parseInt(n/60%60,10)},ru=function(n){return parseInt(n%60,10)},i={getIconUrl:function(){var n=new URL(this.config.iconUrl,window.location).host!==window.location.host||a.isIE&&!window.svg4everybody;return{url:this.config.iconUrl,cors:n}},findElements:function(){try{return this.elements.controls=c.call(this,this.config.selectors.controls.wrapper),this.elements.buttons={play:et.call(this,this.config.selectors.buttons.play),pause:c.call(this,this.config.selectors.buttons.pause),restart:c.call(this,this.config.selectors.buttons.restart),rewind:c.call(this,this.config.selectors.buttons.rewind),fastForward:c.call(this,this.config.selectors.buttons.fastForward),mute:c.call(this,this.config.selectors.buttons.mute),pip:c.call(this,this.config.selectors.buttons.pip),airplay:c.call(this,this.config.selectors.buttons.airplay),settings:c.call(this,this.config.selectors.buttons.settings),captions:c.call(this,this.config.selectors.buttons.captions),fullscreen:c.call(this,this.config.selectors.buttons.fullscreen)},this.elements.progress=c.call(this,this.config.selectors.progress),this.elements.inputs={seek:c.call(this,this.config.selectors.inputs.seek),volume:c.call(this,this.config.selectors.inputs.volume)},this.elements.display={buffer:c.call(this,this.config.selectors.display.buffer),currentTime:c.call(this,this.config.selectors.display.currentTime),duration:c.call(this,this.config.selectors.display.duration)},t.element(this.elements.progress)&&(this.elements.display.seekTooltip=this.elements.progress.querySelector(".".concat(this.config.classNames.tooltip))),!0}catch(n){return this.debug.warn("It looks like there is a problem with your custom controls HTML",n),this.toggleNativeControls(!0),!1}},createIcon:function(n,t){var e=i.getIconUrl.call(this),o="".concat(e.cors?"":e.url,"#").concat(this.config.iconPrefix),u=document.createElementNS("http://www.w3.org/2000/svg","svg"),r,f;return kt(u,v(t,{role:"presentation",focusable:"false"})),r=document.createElementNS("http://www.w3.org/2000/svg","use"),f="".concat(o,"-").concat(n),"href"in r&&r.setAttributeNS("http://www.w3.org/1999/xlink","href",f),r.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",f),u.appendChild(r),u},createLabel:function(n){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=l(n,this.config);return u("span",Object.assign({},t,{"class":[t.class,this.config.classNames.hidden].filter(Boolean).join(" ")}),i)},createBadge:function(n){if(t.empty(n))return null;var i=u("span",{"class":this.config.classNames.menu.value});return i.appendChild(u("span",{"class":this.config.classNames.menu.badge},n)),i},createButton:function(n,r){var e=Object.assign({},r),s=nu(n),f={element:"button",toggle:!1,label:null,icon:null,labelPressed:null,iconPressed:null},o;switch(["element","icon","label"].forEach(function(n){Object.keys(e).includes(n)&&(f[n]=e[n],delete e[n])}),"button"!==f.element||Object.keys(e).includes("type")||(e.type="button"),Object.keys(e).includes("class")?e.class.includes(this.config.classNames.control)||(e.class+=" ".concat(this.config.classNames.control)):e.class=this.config.classNames.control,n){case"play":f.toggle=!0;f.label="play";f.labelPressed="pause";f.icon="play";f.iconPressed="pause";break;case"mute":f.toggle=!0;f.label="mute";f.labelPressed="unmute";f.icon="volume";f.iconPressed="muted";break;case"captions":f.toggle=!0;f.label="enableCaptions";f.labelPressed="disableCaptions";f.icon="captions-off";f.iconPressed="captions-on";break;case"fullscreen":f.toggle=!0;f.label="enterFullscreen";f.labelPressed="exitFullscreen";f.icon="enter-fullscreen";f.iconPressed="exit-fullscreen";break;case"play-large":e.class+=" ".concat(this.config.classNames.control,"--overlaid");s="play";f.label="play";f.icon="play";break;default:t.empty(f.label)&&(f.label=s);t.empty(f.icon)&&(f.icon=n)}return o=u(f.element),f.toggle?(o.appendChild(i.createIcon.call(this,f.iconPressed,{"class":"icon--pressed"})),o.appendChild(i.createIcon.call(this,f.icon,{"class":"icon--not-pressed"})),o.appendChild(i.createLabel.call(this,f.labelPressed,{"class":"label--pressed"})),o.appendChild(i.createLabel.call(this,f.label,{"class":"label--not-pressed"}))):(o.appendChild(i.createIcon.call(this,f.icon)),o.appendChild(i.createLabel.call(this,f.label))),v(e,b(this.config.selectors.buttons[s],e)),kt(o,e),"play"===s?(t.array(this.elements.buttons[s])||(this.elements.buttons[s]=[]),this.elements.buttons[s].push(o)):this.elements.buttons[s]=o,o},createRange:function(n,t){var r=u("input",v(b(this.config.selectors.inputs[n]),{type:"range",min:0,max:100,step:.01,value:0,autocomplete:"off",role:"slider","aria-label":l(n,this.config),"aria-valuemin":0,"aria-valuemax":100,"aria-valuenow":0},t));return this.elements.inputs[n]=r,i.updateRangeFill.call(this,r),r},createProgress:function(n,t){var i=u("progress",v(b(this.config.selectors.display[n]),{min:0,max:100,value:0,role:"presentation","aria-hidden":!0},t)),r,f;return"volume"!==n&&(i.appendChild(u("span",null,"0")),r={played:"played",buffer:"buffered"}[n],f=r?l(r,this.config):"",i.innerText="% ".concat(f.toLowerCase())),this.elements.display[n]=i,i},createTime:function(n){var t=b(this.config.selectors.display[n]),i=u("div",v(t,{"class":"".concat(this.config.classNames.display.time," ").concat(t.class?t.class:"").trim(),"aria-label":l(n,this.config)}),"00:00");return this.elements.display[n]=i,i},bindMenuItemShortcuts:function(n,r){var u=this;e(n,"keydown keyup",function(f){if([32,38,39,40].includes(f.which)&&(f.preventDefault(),f.stopPropagation(),"keydown"!==f.type)){var e,o=ft(n,'[role="menuitemradio"]');!o&&[32,39].includes(f.which)?i.showMenuPanel.call(u,r,!0):32!==f.which&&(40===f.which||o&&39===f.which?(e=n.nextElementSibling,t.element(e)||(e=n.parentNode.firstElementChild)):(e=n.previousElementSibling,t.element(e)||(e=n.parentNode.lastElementChild)),gt.call(u,e,!0))}},!1);e(n,"keyup",function(n){13===n.which&&i.focusFirstMenuItem.call(u,null,!0)})},createMenuItem:function(n){var f=this,e=n.value,y=n.list,o=n.type,p=n.title,c=n.badge,l=void 0===c?null:c,a=n.checked,w=void 0!==a&&a,s=b(this.config.selectors.inputs[o]),r=u("button",v(s,{type:"button",role:"menuitemradio","class":"".concat(this.config.classNames.control," ").concat(s.class?s.class:"").trim(),"aria-checked":w,value:e})),h=u("span");h.innerHTML=p;t.element(l)&&h.appendChild(l);r.appendChild(h);Object.defineProperty(r,"checked",{enumerable:!0,get:function(){return"true"===r.getAttribute("aria-checked")},set:function(n){n&&Array.from(r.parentNode.children).filter(function(n){return ft(n,'[role="menuitemradio"]')}).forEach(function(n){return n.setAttribute("aria-checked","false")});r.setAttribute("aria-checked",n?"true":"false")}});this.listeners.bind(r,"click keyup",function(n){if(!t.keyboardEvent(n)||32===n.which){switch(n.preventDefault(),n.stopPropagation(),r.checked=!0,o){case"language":f.currentTrack=Number(e);break;case"quality":f.quality=e;break;case"speed":f.speed=parseFloat(e)}i.showMenuPanel.call(f,"home",t.keyboardEvent(n))}},o,!1);i.bindMenuItemShortcuts.call(this,r,o);y.appendChild(r)},formatTime:function(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,i=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return t.number(n)?ei(n,sr(this.duration)>0,i):n},updateTimeDisplay:function(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,u=arguments.length>2&&void 0!==arguments[2]&&arguments[2];t.element(n)&&t.number(r)&&(n.innerText=i.formatTime(r,u))},updateVolume:function(){this.supported.ui&&(t.element(this.elements.inputs.volume)&&i.setRange.call(this,this.elements.inputs.volume,this.muted?0:this.volume),t.element(this.elements.buttons.mute)&&(this.elements.buttons.mute.pressed=this.muted||0===this.volume))},setRange:function(n){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;t.element(n)&&(n.value=r,i.updateRangeFill.call(this,n))},updateProgress:function(n){var e=this,r,u,f;if(this.supported.ui&&t.event(n)&&(f=0,n))switch(n.type){case"timeupdate":case"seeking":case"seeked":r=this.currentTime;u=this.duration;f=0===r||0===u||Number.isNaN(r)||Number.isNaN(u)?0:(r/u*100).toFixed(2);"timeupdate"===n.type&&i.setRange.call(this,this.elements.inputs.seek,f);break;case"playing":case"progress":!function(n,i){var f=t.number(i)?i:0,r=t.element(n)?n:e.elements.display.buffer,u;t.element(r)&&(r.value=f,u=r.getElementsByTagName("span")[0],t.element(u)&&(u.childNodes[0].nodeValue=f))}(this.elements.display.buffer,100*this.buffered)}},updateRangeFill:function(n){var r=t.event(n)?n.target:n,u;if(t.element(r)&&"range"===r.getAttribute("type")){if(ft(r,this.config.selectors.inputs.seek)){r.setAttribute("aria-valuenow",this.currentTime);var f=i.formatTime(this.currentTime),e=i.formatTime(this.duration),o=l("seekLabel",this.config);r.setAttribute("aria-valuetext",o.replace("{currentTime}",f).replace("{duration}",e))}else ft(r,this.config.selectors.inputs.volume)?(u=100*r.value,r.setAttribute("aria-valuenow",u),r.setAttribute("aria-valuetext","".concat(u.toFixed(1),"%"))):r.setAttribute("aria-valuenow",r.value);a.isWebkit&&r.style.setProperty("--value","".concat(r.value/r.max*100,"%"))}},updateSeekTooltip:function(n){var s=this;if(this.config.tooltips.seek&&t.element(this.elements.inputs.seek)&&t.element(this.elements.display.seekTooltip)&&0!==this.duration){var r=0,u=this.elements.progress.getBoundingClientRect(),e="".concat(this.config.classNames.tooltip,"--visible"),o=function(n){f(s.elements.display.seekTooltip,e,n)};if(this.touch)o(!1);else{if(t.event(n))r=100/u.width*(n.pageX-u.left);else{if(!vt(this.elements.display.seekTooltip,e))return;r=parseFloat(this.elements.display.seekTooltip.style.left,10)}r<0?r=0:r>100&&(r=100);i.updateTimeDisplay.call(this,this.elements.display.seekTooltip,this.duration/100*r);this.elements.display.seekTooltip.style.left="".concat(r,"%");t.event(n)&&["mouseenter","mouseleave"].includes(n.type)&&o("mouseenter"===n.type)}}},timeUpdate:function(n){var r=!t.element(this.elements.display.duration)&&this.config.invertTime;i.updateTimeDisplay.call(this,this.elements.display.currentTime,r?this.duration-this.currentTime:this.currentTime,r);n&&"timeupdate"===n.type&&this.media.seeking||i.updateProgress.call(this,n)},durationUpdate:function(){if(this.supported.ui&&(this.config.invertTime||!this.currentTime)){if(this.duration>=Math.pow(2,32))return p(this.elements.display.currentTime,!0),void p(this.elements.progress,!0);t.element(this.elements.inputs.seek)&&this.elements.inputs.seek.setAttribute("aria-valuemax",this.duration);var n=t.element(this.elements.display.duration);!n&&this.config.displayDuration&&this.paused&&i.updateTimeDisplay.call(this,this.elements.display.currentTime,this.duration);n&&i.updateTimeDisplay.call(this,this.elements.display.duration,this.duration);i.updateSeekTooltip.call(this)}},toggleMenuButton:function(n,t){p(this.elements.settings.buttons[n],!t)},updateSetting:function(n,r,u){var s=this.elements.settings.panels[n],f=null,e=r,o;if("captions"===n)f=this.currentTrack;else{if(f=t.empty(u)?this[n]:u,t.empty(f)&&(f=this.config[n].default),!t.empty(this.options[n])&&!this.options[n].includes(f))return void this.debug.warn("Unsupported value of '".concat(f,"' for ").concat(n));if(!this.config[n].options.includes(f))return void this.debug.warn("Disabled value of '".concat(f,"' for ").concat(n))}(t.element(e)||(e=s&&s.querySelector('[role="menu"]')),t.element(e))&&(this.elements.settings.buttons[n].querySelector(".".concat(this.config.classNames.menu.value)).innerHTML=i.getLabel.call(this,n,f),o=e&&e.querySelector('[value="'.concat(f,'"]')),t.element(o)&&(o.checked=!0))},getLabel:function(n,i){switch(n){case"speed":return 1===i?l("normal",this.config):"".concat(i,"&times;");case"quality":if(t.number(i)){var r=l("qualityLabel.".concat(i),this.config);return r.length?r:"".concat(i,"p")}return ur(i);case"captions":return o.getLabel.call(this);default:return null}},setQualityMenu:function(n){var r=this,u,f,e;t.element(this.elements.settings.panels.quality)&&(u=this.elements.settings.panels.quality.querySelector('[role="menu"]'),t.array(n)&&(this.options.quality=ir(n).filter(function(n){return r.config.quality.options.includes(n)})),f=!t.empty(this.options.quality)&&this.options.quality.length>1,(i.toggleMenuButton.call(this,"quality",f),at(u),i.checkMenu.call(this),f)&&(e=function(n){var t=l("qualityBadge.".concat(n),r.config);return t.length?i.createBadge.call(r,t):null},this.options.quality.sort(function(n,t){var i=r.config.quality.options;return i.indexOf(n)>i.indexOf(t)?1:-1}).forEach(function(n){i.createMenuItem.call(r,{value:n,list:u,type:"quality",title:i.getLabel.call(r,"quality",n),badge:e(n)})}),i.updateSetting.call(this,"quality",u)))},setCaptionsMenu:function(){var n=this,u;if(t.element(this.elements.settings.panels.captions)){var r=this.elements.settings.panels.captions.querySelector('[role="menu"]'),f=o.getTracks.call(this),e=Boolean(f.length);(i.toggleMenuButton.call(this,"captions",e),at(r),i.checkMenu.call(this),e)&&(u=f.map(function(t,u){return{value:u,checked:n.captions.toggled&&n.currentTrack===u,title:o.getLabel.call(n,t),badge:t.language&&i.createBadge.call(n,t.language.toUpperCase()),list:r,type:"language"}}),u.unshift({value:-1,checked:!this.captions.toggled,title:l("disabled",this.config),list:r,type:"language"}),u.forEach(i.createMenuItem.bind(this)),i.updateSetting.call(this,"captions",r))}},setSpeedMenu:function(n){var u=this,r,f;t.element(this.elements.settings.panels.speed)&&(r=this.elements.settings.panels.speed.querySelector('[role="menu"]'),t.array(n)?this.options.speed=n:(this.isHTML5||this.isVimeo)&&(this.options.speed=[.5,.75,1,1.25,1.5,1.75,2]),this.options.speed=this.options.speed.filter(function(n){return u.config.speed.options.includes(n)}),f=!t.empty(this.options.speed)&&this.options.speed.length>1,i.toggleMenuButton.call(this,"speed",f),at(r),i.checkMenu.call(this),f&&(this.options.speed.forEach(function(n){i.createMenuItem.call(u,{value:n,list:r,type:"speed",title:i.getLabel.call(u,"speed",n)})}),i.updateSetting.call(this,"speed",r)))},checkMenu:function(){var n=this.elements.settings.buttons,i=!t.empty(n)&&Object.values(n).some(function(n){return!n.hidden});p(this.elements.settings.menu,!i)},focusFirstMenuItem:function(n){var u=arguments.length>1&&void 0!==arguments[1]&&arguments[1],i,r;this.elements.settings.popup.hidden||(i=n,t.element(i)||(i=Object.values(this.elements.settings.panels).find(function(n){return!n.hidden})),r=i.querySelector('[role^="menuitem"]'),gt.call(this,r,u))},toggleMenu:function(n){var u=this.elements.settings.popup,e=this.elements.buttons.settings,o,r,s;if(t.element(u)&&t.element(e)){if(o=u.hidden,r=o,t.boolean(n))r=n;else if(t.keyboardEvent(n)&&27===n.which)r=!1;else if(t.event(n)&&(s=u.contains(n.target),s||!s&&n.target!==e&&r))return;e.setAttribute("aria-expanded",r);p(u,!r);f(this.elements.container,this.config.classNames.menu.open,r);r&&t.keyboardEvent(n)?i.focusFirstMenuItem.call(this,null,!0):r||o||gt.call(this,e,t.keyboardEvent(n))}},getMenuSize:function(n){var t=n.cloneNode(!0),i,r;return t.style.position="absolute",t.style.opacity=0,t.removeAttribute("hidden"),n.parentNode.appendChild(t),i=t.scrollWidth,r=t.scrollHeight,d(t),{width:i,height:r}},showMenuPanel:function(){var s=this,o=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",c=arguments.length>1&&void 0!==arguments[1]&&arguments[1],r=document.getElementById("plyr-settings-".concat(this.id,"-").concat(o)),n,u,f;t.element(r)&&(n=r.parentNode,u=Array.from(n.children).find(function(n){return!n.hidden}),h.transitions&&!h.reducedMotion&&(n.style.width="".concat(u.scrollWidth,"px"),n.style.height="".concat(u.scrollHeight,"px"),f=i.getMenuSize.call(this,r),e.call(this,n,ii,function o(t){t.target===n&&["width","height"].includes(t.propertyName)&&(n.style.width="",n.style.height="",bt.call(s,n,ii,o))}),n.style.width="".concat(f.width,"px"),n.style.height="".concat(f.height,"px")),p(u,!0),p(r,!1),i.focusFirstMenuItem.call(this,r,c))},setDownloadLink:function(){var n=this.elements.buttons.download;t.element(n)&&n.setAttribute("href",this.download)},create:function(n){var r=this,f=u("div",b(this.config.selectors.controls.wrapper)),o,a,s,d,c,k,nt;if((this.config.controls.includes("restart")&&f.appendChild(i.createButton.call(this,"restart")),this.config.controls.includes("rewind")&&f.appendChild(i.createButton.call(this,"rewind")),this.config.controls.includes("play")&&f.appendChild(i.createButton.call(this,"play")),this.config.controls.includes("fast-forward")&&f.appendChild(i.createButton.call(this,"fast-forward")),this.config.controls.includes("progress"))&&(o=u("div",b(this.config.selectors.progress)),(o.appendChild(i.createRange.call(this,"seek",{id:"plyr-seek-".concat(n.id)})),o.appendChild(i.createProgress.call(this,"buffer")),this.config.tooltips.seek)&&(a=u("span",{"class":this.config.classNames.tooltip},"00:00"),o.appendChild(a),this.elements.display.seekTooltip=a),this.elements.progress=o,f.appendChild(this.elements.progress)),(this.config.controls.includes("current-time")&&f.appendChild(i.createTime.call(this,"currentTime")),this.config.controls.includes("duration")&&f.appendChild(i.createTime.call(this,"duration")),this.config.controls.includes("mute")||this.config.controls.includes("volume"))&&(s=u("div",{"class":"plyr__volume"}),(this.config.controls.includes("mute")&&s.appendChild(i.createButton.call(this,"mute")),this.config.controls.includes("volume"))&&(d={max:1,step:.05,value:this.config.volume},s.appendChild(i.createRange.call(this,"volume",v(d,{id:"plyr-volume-".concat(n.id)}))),this.elements.volume=s),f.appendChild(s)),this.config.controls.includes("captions")&&f.appendChild(i.createButton.call(this,"captions")),this.config.controls.includes("settings")&&!t.empty(this.config.settings)){c=u("div",{"class":"plyr__menu",hidden:""});c.appendChild(i.createButton.call(this,"settings",{"aria-haspopup":!0,"aria-controls":"plyr-settings-".concat(n.id),"aria-expanded":!1}));var y=u("div",{"class":"plyr__menu__container",id:"plyr-settings-".concat(n.id),hidden:""}),p=u("div"),w=u("div",{id:"plyr-settings-".concat(n.id,"-home")}),g=u("div",{role:"menu"});w.appendChild(g);p.appendChild(w);this.elements.settings.panels.home=w;this.config.settings.forEach(function(t){var o=u("button",v(b(r.config.selectors.buttons.settings),{type:"button","class":"".concat(r.config.classNames.control," ").concat(r.config.classNames.control,"--forward"),role:"menuitem","aria-haspopup":!0,hidden:""})),h,c,f,s;i.bindMenuItemShortcuts.call(r,o,t);e(o,"click",function(){i.showMenuPanel.call(r,t,!1)});h=u("span",null,l(t,r.config));c=u("span",{"class":r.config.classNames.menu.value});c.innerHTML=n[t];h.appendChild(c);o.appendChild(h);g.appendChild(o);f=u("div",{id:"plyr-settings-".concat(n.id,"-").concat(t),hidden:""});s=u("button",{type:"button","class":"".concat(r.config.classNames.control," ").concat(r.config.classNames.control,"--back")});s.appendChild(u("span",{"aria-hidden":!0},l(t,r.config)));s.appendChild(u("span",{"class":r.config.classNames.hidden},l("menuBack",r.config)));e(f,"keydown",function(n){37===n.which&&(n.preventDefault(),n.stopPropagation(),i.showMenuPanel.call(r,"home",!0))},!1);e(s,"click",function(){i.showMenuPanel.call(r,"home",!1)});f.appendChild(s);f.appendChild(u("div",{role:"menu"}));p.appendChild(f);r.elements.settings.buttons[t]=o;r.elements.settings.panels[t]=f});y.appendChild(p);c.appendChild(y);f.appendChild(c);this.elements.settings.popup=y;this.elements.settings.menu=c}return(this.config.controls.includes("pip")&&h.pip&&f.appendChild(i.createButton.call(this,"pip")),this.config.controls.includes("airplay")&&h.airplay&&f.appendChild(i.createButton.call(this,"airplay")),this.config.controls.includes("download"))&&(k={element:"a",href:this.download,target:"_blank"},nt=this.config.urls.download,!t.url(nt)&&this.isEmbed&&v(k,{icon:"logo-".concat(this.provider),label:this.provider}),f.appendChild(i.createButton.call(this,"download",k))),this.config.controls.includes("fullscreen")&&f.appendChild(i.createButton.call(this,"fullscreen")),this.config.controls.includes("play-large")&&this.elements.container.appendChild(i.createButton.call(this,"play-large")),this.elements.controls=f,this.isHTML5&&i.setQualityMenu.call(this,tt.getQualityOptions.call(this)),i.setSpeedMenu.call(this),f},inject:function(){var u=this,e,n,s,h,r,c,l;if(this.config.loadSprite&&(e=i.getIconUrl.call(this),e.cors&&or(e.url,"sprite-plyr")),this.id=Math.floor(1e4*Math.random()),n=null,this.elements.controls=null,s={id:this.id,seektime:this.config.seekTime,title:this.config.title},h=!0,t.function(this.config.controls)&&(this.config.controls=this.config.controls.call(this,s)),this.config.controls||(this.config.controls=[]),t.element(this.config.controls)||t.string(this.config.controls)?n=this.config.controls:(n=i.create.call(this,{id:this.id,seektime:this.config.seekTime,speed:this.speed,quality:this.quality,captions:o.getLabel.call(this)}),h=!1),c=function(n){var t=n;return Object.entries(s).forEach(function(n){var i=y(n,2),r=i[0],u=i[1];t=ot(t,"{".concat(r,"}"),u)}),t},(h&&(t.string(this.config.controls)?n=c(n):t.element(n)&&(n.innerHTML=c(n.innerHTML))),t.string(this.config.selectors.controls.container)&&(r=document.querySelector(this.config.selectors.controls.container)),t.element(r)||(r=this.elements.container),r[t.element(n)?"insertAdjacentElement":"insertAdjacentHTML"]("afterbegin",n),t.element(this.elements.controls)||i.findElements.call(this),t.empty(this.elements.buttons))||(l=function(n){var t=u.config.classNames.controlPressed;Object.defineProperty(n,"pressed",{enumerable:!0,get:function(){return vt(n,t)},set:function(){var i=arguments.length>0&&void 0!==arguments[0]&&arguments[0];f(n,t,i)}})},Object.values(this.elements.buttons).filter(Boolean).forEach(function(n){t.array(n)||t.nodeList(n)?Array.from(n).filter(Boolean).forEach(l):l(n)})),window.navigator.userAgent.includes("Edge")&&ri(r),this.config.tooltips.controls){var a=this.config,p=a.classNames,v=a.selectors,w="".concat(v.controls.wrapper," ").concat(v.labels," .").concat(p.hidden),b=et.call(this,w);Array.from(b).forEach(function(n){f(n,u.config.classNames.hidden,!1);f(n,u.config.classNames.tooltip,!0)})}}},o={setup:function(){var s,n,l,c,r,f,v;this.supported.ui&&(!this.isVideo||this.isYouTube||this.isHTML5&&!h.textTracks?t.array(this.config.controls)&&this.config.controls.includes("settings")&&this.config.settings.includes("captions")&&i.setCaptionsMenu.call(this):((t.element(this.elements.captions)||(this.elements.captions=u("div",b(this.config.selectors.captions)),s=this.elements.captions,n=this.elements.wrapper,t.element(s)&&t.element(n)&&n.parentNode.insertBefore(s,n.nextSibling)),a.isIE&&window.URL)&&(l=this.media.querySelectorAll("track"),Array.from(l).forEach(function(n){var i=n.getAttribute("src"),t=hr(i);null!==t&&t.hostname!==window.location.href.hostname&&["http:","https:"].includes(t.protocol)&&yt(i,"blob").then(function(t){n.setAttribute("src",window.URL.createObjectURL(t))}).catch(function(){d(n)})})),c=ir((navigator.languages||[navigator.language||navigator.userLanguage||"en"]).map(function(n){return n.split("-")[0]})),r=(this.storage.get("language")||this.config.captions.language||"auto").toLowerCase(),"auto"===r&&(r=y(c,1)[0]),f=this.storage.get("captions"),(t.boolean(f)||(f=this.config.captions.active),Object.assign(this.captions,{toggled:!1,active:f,language:r,languages:c}),this.isHTML5)&&(v=this.config.captions.update?"addtrack removetrack":"removetrack",e.call(this,this.media.textTracks,v,o.update.bind(this))),setTimeout(o.update.bind(this),0)))},update:function(){var u=this,n=o.getTracks.call(this,!0),r=this.captions,l=r.active,s=r.language,h=r.meta,a=r.currentTrackNode,c=Boolean(n.find(function(n){return n.language===s}));this.isHTML5&&this.isVideo&&n.filter(function(n){return!h.get(n)}).forEach(function(n){u.debug.log("Track added",n);h.set(n,{"default":"showing"===n.mode});n.mode="hidden";e.call(u,n,"cuechange",function(){return o.updateCues.call(u)})});(c&&this.language!==s||!n.includes(a))&&(o.setLanguage.call(this,s),o.toggle.call(this,l&&c));f(this.elements.container,this.config.classNames.captions.enabled,!t.empty(n));(this.config.controls||[]).includes("settings")&&this.config.settings.includes("captions")&&i.setCaptionsMenu.call(this)},toggle:function(n){var s=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],c,e;if(this.supported.ui){var h=this.captions.toggled,l=this.config.classNames.captions.active,u=t.nullOrUndefined(n)?!h:n;if(u!==h){if(s||(this.captions.active=u,this.storage.set({captions:u})),!this.language&&u&&!s)return c=o.getTracks.call(this),e=o.findTrack.call(this,[this.captions.language].concat(dr(this.captions.languages)),!0),this.captions.language=e.language,void o.set.call(this,c.indexOf(e));this.elements.buttons.captions&&(this.elements.buttons.captions.pressed=u);f(this.elements.container,l,u);this.captions.toggled=u;i.updateSetting.call(this,"captions");r.call(this,this.media,u?"captionsenabled":"captionsdisabled")}}},set:function(n){var f=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],s=o.getTracks.call(this),e,u;-1!==n?t.number(n)?n in s?(this.captions.currentTrack!==n&&(this.captions.currentTrack=n,e=s[n],u=(e||{}).language,this.captions.currentTrackNode=e,i.updateSetting.call(this,"captions"),f||(this.captions.language=u,this.storage.set({language:u})),this.isVimeo&&this.embed.enableTextTrack(u),r.call(this,this.media,"languagechange")),o.toggle.call(this,!0,f),this.isHTML5&&this.isVideo&&o.updateCues.call(this)):this.debug.warn("Track not found",n):this.debug.warn("Invalid caption argument",n):o.toggle.call(this,!1,f)},setLanguage:function(n){var f=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],i,r,u;t.string(n)?(i=n.toLowerCase(),this.captions.language=i,r=o.getTracks.call(this),u=o.findTrack.call(this,[i]),o.set.call(this,r.indexOf(u),f)):this.debug.warn("Invalid language argument",n)},getTracks:function(){var n=this,t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return Array.from((this.media||{}).textTracks||[]).filter(function(i){return!n.isHTML5||t||n.captions.meta.has(i)}).filter(function(n){return["captions","subtitles"].includes(n.kind)})},findTrack:function(n){var t,u=this,f=arguments.length>1&&void 0!==arguments[1]&&arguments[1],e=o.getTracks.call(this),i=function(n){return Number((u.captions.meta.get(n)||{}).default)},r=Array.from(e).sort(function(n,t){return i(t)-i(n)});return n.every(function(n){return!(t=r.find(function(t){return t.language===n}))}),t||(f?r[0]:void 0)},getCurrentTrack:function(){return o.getTracks.call(this)[this.currentTrack]},getLabel:function(n){var i=n;return!t.track(i)&&h.textTracks&&this.captions.toggled&&(i=o.getCurrentTrack.call(this)),t.track(i)?t.empty(i.label)?t.empty(i.language)?l("enabled",this.config):n.language.toUpperCase():i.label:l("disabled",this.config)},updateCues:function(n){var i,s,f,e;this.supported.ui&&(t.element(this.elements.captions)?t.nullOrUndefined(n)||Array.isArray(n)?(i=n,i||(s=o.getCurrentTrack.call(this),i=Array.from((s||{}).activeCues||[]).map(function(n){return n.getCueAsHTML()}).map(tu)),f=i.map(function(n){return n.trim()}).join("\n"),f!==this.elements.captions.innerHTML&&(at(this.elements.captions),e=u("span",b(this.config.selectors.caption)),e.innerHTML=f,this.elements.captions.appendChild(e),r.call(this,this.media,"cuechange"))):this.debug.warn("updateCues: Invalid input",n):this.debug.warn("No captions element to render to"))}},lr={enabled:!0,title:"",debug:!1,autoplay:!1,autopause:!0,playsinline:!0,seekTime:10,volume:1,muted:!1,duration:null,displayDuration:!0,invertTime:!0,toggleInvert:!0,ratio:"16:9",clickToPlay:!0,hideControls:!0,resetOnEnd:!1,disableContextMenu:!0,loadSprite:!0,iconPrefix:"plyr",iconUrl:"https://cdn.plyr.io/3.4.8/plyr.svg",blankVideo:"https://cdn.plyr.io/static/blank.mp4",quality:{"default":576,options:[4320,2880,2160,1440,1080,720,576,480,360,240]},loop:{active:!1},speed:{selected:1,options:[.5,.75,1,1.25,1.5,1.75,2]},keyboard:{focused:!0,global:!1},tooltips:{controls:!1,seek:!0},captions:{active:!1,language:"auto",update:!1},fullscreen:{enabled:!0,fallback:!0,iosNative:!1},storage:{enabled:!0,key:"plyr"},controls:["play-large","play","progress","current-time","mute","volume","captions","settings","pip","airplay","fullscreen"],settings:["captions","quality","speed"],i18n:{restart:"Restart",rewind:"Rewind {seektime}s",play:"Play",pause:"Pause",fastForward:"Forward {seektime}s",seek:"Seek",seekLabel:"{currentTime} of {duration}",played:"Played",buffered:"Buffered",currentTime:"Current time",duration:"Duration",volume:"Volume",mute:"Mute",unmute:"Unmute",enableCaptions:"Enable captions",disableCaptions:"Disable captions",download:"Download",enterFullscreen:"Enter fullscreen",exitFullscreen:"Exit fullscreen",frameTitle:"Player for {title}",captions:"Captions",settings:"Settings",menuBack:"Go back to previous menu",speed:"Speed",normal:"Normal",quality:"Quality",loop:"Loop",start:"Start",end:"End",all:"All",reset:"Reset",disabled:"Disabled",enabled:"Enabled",advertisement:"Ad",qualityBadge:{2160:"4K",1440:"HD",1080:"HD",720:"HD",576:"SD",480:"SD"}},urls:{download:null,vimeo:{sdk:"https://player.vimeo.com/api/player.js",iframe:"https://player.vimeo.com/video/{0}?{1}",api:"https://vimeo.com/api/v2/video/{0}.json"},youtube:{sdk:"https://www.youtube.com/iframe_api",api:"https://www.googleapis.com/youtube/v3/videos?id={0}&key={1}&fields=items(snippet(title))&part=snippet"},googleIMA:{sdk:"https://imasdk.googleapis.com/js/sdkloader/ima3.js"}},listeners:{seek:null,play:null,pause:null,restart:null,rewind:null,fastForward:null,mute:null,volume:null,captions:null,download:null,fullscreen:null,pip:null,airplay:null,speed:null,quality:null,loop:null,language:null},events:["ended","progress","stalled","playing","waiting","canplay","canplaythrough","loadstart","loadeddata","loadedmetadata","timeupdate","volumechange","play","pause","error","seeking","seeked","emptied","ratechange","cuechange","download","enterfullscreen","exitfullscreen","captionsenabled","captionsdisabled","languagechange","controlshidden","controlsshown","ready","statechange","qualitychange","adsloaded","adscontentpause","adscontentresume","adstarted","adsmidpoint","adscomplete","adsallcomplete","adsimpression","adsclick"],selectors:{editable:"input, textarea, select, [contenteditable]",container:".plyr",controls:{container:null,wrapper:".plyr__controls"},labels:"[data-plyr]",buttons:{play:'[data-plyr="play"]',pause:'[data-plyr="pause"]',restart:'[data-plyr="restart"]',rewind:'[data-plyr="rewind"]',fastForward:'[data-plyr="fast-forward"]',mute:'[data-plyr="mute"]',captions:'[data-plyr="captions"]',download:'[data-plyr="download"]',fullscreen:'[data-plyr="fullscreen"]',pip:'[data-plyr="pip"]',airplay:'[data-plyr="airplay"]',settings:'[data-plyr="settings"]',loop:'[data-plyr="loop"]'},inputs:{seek:'[data-plyr="seek"]',volume:'[data-plyr="volume"]',speed:'[data-plyr="speed"]',language:'[data-plyr="language"]',quality:'[data-plyr="quality"]'},display:{currentTime:".plyr__time--current",duration:".plyr__time--duration",buffer:".plyr__progress__buffer",loop:".plyr__progress__loop",volume:".plyr__volume--display"},progress:".plyr__progress",captions:".plyr__captions",caption:".plyr__caption",menu:{quality:".js-plyr__menu__list--quality"}},classNames:{type:"plyr--{0}",provider:"plyr--{0}",video:"plyr__video-wrapper",embed:"plyr__video-embed",embedContainer:"plyr__video-embed__container",poster:"plyr__poster",posterEnabled:"plyr__poster-enabled",ads:"plyr__ads",control:"plyr__control",controlPressed:"plyr__control--pressed",playing:"plyr--playing",paused:"plyr--paused",stopped:"plyr--stopped",loading:"plyr--loading",hover:"plyr--hover",tooltip:"plyr__tooltip",cues:"plyr__cues",hidden:"plyr__sr-only",hideControls:"plyr--hide-controls",isIos:"plyr--is-ios",isTouch:"plyr--is-touch",uiSupported:"plyr--full-ui",noTransition:"plyr--no-transition",display:{time:"plyr__time"},menu:{value:"plyr__menu__value",badge:"plyr__badge",open:"plyr--menu-open"},captions:{enabled:"plyr--captions-enabled",active:"plyr--captions-active"},fullscreen:{enabled:"plyr--fullscreen-enabled",fallback:"plyr--fullscreen-fallback"},pip:{supported:"plyr--pip-supported",active:"plyr--pip-active"},airplay:{supported:"plyr--airplay-supported",active:"plyr--airplay-active"},tabFocus:"plyr__tab-focus"},attributes:{embed:{provider:"data-plyr-provider",id:"data-plyr-embed-id"}},keys:{google:null},ads:{enabled:!1,publisherId:""}},ar="picture-in-picture",uu="inline",g={html5:"html5",youtube:"youtube",vimeo:"vimeo"},oi={audio:"audio",video:"video"},si=function(){},fu=function(){function n(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];it(this,n);this.enabled=window.console&&t;this.enabled&&this.log("Debugging enabled")}return rt(n,[{key:"log",get:function(){return this.enabled?Function.prototype.bind.call(console.log,console):si}},{key:"warn",get:function(){return this.enabled?Function.prototype.bind.call(console.warn,console):si}},{key:"error",get:function(){return this.enabled?Function.prototype.bind.call(console.error,console):si}}]),n}(),eu=function(){function n(i){var r=this;it(this,n);this.player=i;this.prefix=n.prefix;this.property=n.property;this.scrollPosition={x:0,y:0};e.call(this.player,document,"ms"===this.prefix?"MSFullscreenChange":"".concat(this.prefix,"fullscreenchange"),function(){vr.call(r)});e.call(this.player,this.player.elements.container,"dblclick",function(n){t.element(r.player.elements.controls)&&r.player.elements.controls.contains(n.target)||r.toggle()});this.update()}return rt(n,[{key:"update",value:function(){this.enabled?this.player.debug.log("".concat(n.native?"Native":"Fallback"," fullscreen enabled")):this.player.debug.log("Fullscreen not supported and fallback disabled");f(this.player.elements.container,this.player.config.classNames.fullscreen.enabled,this.enabled)}},{key:"enter",value:function(){this.enabled&&(a.isIos&&this.player.config.fullscreen.iosNative?this.target.webkitEnterFullscreen():n.native?this.prefix?t.empty(this.prefix)||this.target["".concat(this.prefix,"Request").concat(this.property)]():this.target.requestFullscreen():yr.call(this,!0))}},{key:"exit",value:function(){if(this.enabled)if(a.isIos&&this.player.config.fullscreen.iosNative)this.target.webkitExitFullscreen(),this.player.play();else if(n.native)if(this.prefix){if(!t.empty(this.prefix)){var i="moz"===this.prefix?"Cancel":"Exit";document["".concat(this.prefix).concat(i).concat(this.property)]()}}else(document.cancelFullScreen||document.exitFullscreen).call(document);else yr.call(this,!1)}},{key:"toggle",value:function(){this.active?this.exit():this.enter()}},{key:"enabled",get:function(){return(n.native||this.player.config.fullscreen.fallback)&&this.player.config.fullscreen.enabled&&this.player.supported.ui&&this.player.isVideo}},{key:"active",get:function(){return!!this.enabled&&(n.native?(this.prefix?document["".concat(this.prefix).concat(this.property,"Element")]:document.fullscreenElement)===this.target:vt(this.target,this.player.config.classNames.fullscreen.fallback))}},{key:"target",get:function(){return a.isIos&&this.player.config.fullscreen.iosNative?this.player.media:this.player.elements.container}}],[{key:"native",get:function(){return!!(document.fullscreenEnabled||document.webkitFullscreenEnabled||document.mozFullScreenEnabled||document.msFullscreenEnabled)}},{key:"prefix",get:function(){if(t.function(document.exitFullscreen))return"";var n="";return["webkit","moz","ms"].some(function(i){return!(!t.function(document["".concat(i,"ExitFullscreen")])&&!t.function(document["".concat(i,"CancelFullScreen")]))&&(n=i,!0)}),n}},{key:"property",get:function(){return"moz"===this.prefix?"FullScreen":"Fullscreen"}}]),n}(),s={addStyleHook:function(){f(this.elements.container,this.config.selectors.container.replace(".",""),!0);f(this.elements.container,this.config.classNames.uiSupported,this.supported.ui)},toggleNativeControls:function(){arguments.length>0&&void 0!==arguments[0]&&arguments[0]&&this.isHTML5?this.media.setAttribute("controls",""):this.media.removeAttribute("controls")},build:function(){var n=this;if(this.listeners.media(),!this.supported.ui)return this.debug.warn("Basic support only for ".concat(this.provider," ").concat(this.type)),void s.toggleNativeControls.call(this,!0);t.element(this.elements.controls)||(i.inject.call(this),this.listeners.controls());s.toggleNativeControls.call(this);this.isHTML5&&o.setup.call(this);this.volume=null;this.muted=null;this.speed=null;this.loop=null;this.quality=null;i.updateVolume.call(this);i.timeUpdate.call(this);s.checkPlaying.call(this);f(this.elements.container,this.config.classNames.pip.supported,h.pip&&this.isHTML5&&this.isVideo);f(this.elements.container,this.config.classNames.airplay.supported,h.airplay&&this.isHTML5);f(this.elements.container,this.config.classNames.isIos,a.isIos);f(this.elements.container,this.config.classNames.isTouch,this.touch);this.ready=!0;setTimeout(function(){r.call(n,n.media,"ready")},0);s.setTitle.call(this);this.poster&&s.setPoster.call(this,this.poster,!1).catch(function(){});this.config.duration&&i.durationUpdate.call(this)},setTitle:function(){var i=l("play",this.config),n,r,u;if(t.string(this.config.title)&&!t.empty(this.config.title)&&(i+=", ".concat(this.config.title)),Array.from(this.elements.buttons.play||[]).forEach(function(n){n.setAttribute("aria-label",i)}),this.isEmbed){if(n=c.call(this,"iframe"),!t.element(n))return;r=t.empty(this.config.title)?"video":this.config.title;u=l("frameTitle",this.config);n.setAttribute("title",u.replace("{title}",r))}},togglePoster:function(n){f(this.elements.container,this.config.classNames.posterEnabled,n)},setPoster:function(n){var t=this;return arguments.length>1&&void 0!==arguments[1]&&!arguments[1]||!this.poster?(this.media.setAttribute("poster",n),function(){var n=this;return new Promise(function(t){return n.ready?setTimeout(t,0):e.call(n,n.elements.container,"ready",t)}).then(function(){})}.call(this).then(function(){return pt(n)}).catch(function(i){throw n===t.poster&&s.togglePoster.call(t,!1),i;}).then(function(){if(n!==t.poster)throw new Error("setPoster cancelled by later call to setPoster");}).then(function(){return Object.assign(t.elements.poster.style,{backgroundImage:"url('".concat(n,"')"),backgroundSize:""}),s.togglePoster.call(t,!0),n})):Promise.reject(new Error("Poster already set"))},checkPlaying:function(n){var i=this;f(this.elements.container,this.config.classNames.playing,this.playing);f(this.elements.container,this.config.classNames.paused,this.paused);f(this.elements.container,this.config.classNames.stopped,this.stopped);Array.from(this.elements.buttons.play||[]).forEach(function(n){n.pressed=i.playing});t.event(n)&&"timeupdate"===n.type||s.toggleControls.call(this)},checkLoading:function(n){var t=this;this.loading=["stalled","waiting"].includes(n.type);clearTimeout(this.timers.loading);this.timers.loading=setTimeout(function(){f(t.elements.container,t.config.classNames.loading,t.loading);s.toggleControls.call(t)},this.loading?250:0)},toggleControls:function(n){var t=this.elements.controls,i;t&&this.config.hideControls&&(i=this.touch&&this.lastSeekTime+2e3>Date.now(),this.toggleControls(Boolean(n||this.loading||this.paused||t.pressed||t.hover||i)))}},ou=function(){function n(t){it(this,n);this.player=t;this.lastKey=null;this.focusTimer=null;this.lastKeyDown=null;this.handleKey=this.handleKey.bind(this);this.toggleMenu=this.toggleMenu.bind(this);this.setTabFocus=this.setTabFocus.bind(this);this.firstTouch=this.firstTouch.bind(this)}return rt(n,[{key:"handleKey",value:function(n){var i=this.player,s=i.elements,r=n.keyCode?n.keyCode:n.which,e="keydown"===n.type,f=e&&r===this.lastKey,u,o;if(!(n.altKey||n.ctrlKey||n.metaKey||n.shiftKey)&&t.number(r))if(e){if(u=document.activeElement,t.element(u)){if(o=i.config.selectors.editable,u!==s.inputs.seek&&ft(u,o))return;if(32===n.which&&ft(u,'button, [role^="menuitem"]'))return}switch([32,37,38,39,40,48,49,50,51,52,53,54,56,57,67,70,73,75,76,77,79].includes(r)&&(n.preventDefault(),n.stopPropagation()),r){case 48:case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:f||(i.currentTime=i.duration/10*(r-48));break;case 32:case 75:f||i.togglePlay();break;case 38:i.increaseVolume(.1);break;case 40:i.decreaseVolume(.1);break;case 77:f||(i.muted=!i.muted);break;case 39:i.forward();break;case 37:i.rewind();break;case 70:i.fullscreen.toggle();break;case 67:f||i.toggleCaptions();break;case 76:i.loop=!i.loop}!i.fullscreen.enabled&&i.fullscreen.active&&27===r&&i.fullscreen.toggle();this.lastKey=r}else this.lastKey=null}},{key:"toggleMenu",value:function(n){i.toggleMenu.call(this.player,n)}},{key:"firstTouch",value:function(){var n=this.player,t=n.elements;n.touch=!0;f(t.container,n.config.classNames.isTouch,!0)}},{key:"setTabFocus",value:function(n){var t=this.player,u=t.elements,i,r;(clearTimeout(this.focusTimer),"keydown"!==n.type||9===n.which)&&("keydown"===n.type&&(this.lastKeyDown=n.timeStamp),r=n.timeStamp-this.lastKeyDown<=20,("focus"!==n.type||r)&&(i=t.config.classNames.tabFocus,f(et.call(t,".".concat(i)),i,!1),this.focusTimer=setTimeout(function(){var n=document.activeElement;u.container.contains(n)&&f(document.activeElement,t.config.classNames.tabFocus,!0)},10)))}},{key:"global",value:function(){var t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],n=this.player;n.config.keyboard.global&&nt.call(n,window,"keydown keyup",this.handleKey,t,!1);nt.call(n,document.body,"click",this.toggleMenu,t);ki.call(n,document.body,"touchstart",this.firstTouch);nt.call(n,document.body,"keydown focus blur",this.setTabFocus,t,!1,!0)}},{key:"container",value:function(){var n=this.player,t=n.elements;!n.config.keyboard.global&&n.config.keyboard.focused&&e.call(n,t.container,"keydown keyup",this.handleKey,!1);e.call(n,t.container,"mousemove mouseleave touchstart touchmove enterfullscreen exitfullscreen",function(i){var r=t.controls,u;r&&"enterfullscreen"===i.type&&(r.pressed=!1,r.hover=!1);u=0;["touchstart","touchmove","mousemove"].includes(i.type)&&(s.toggleControls.call(n,!0),u=n.touch?3e3:2e3);clearTimeout(n.timers.controls);n.timers.controls=setTimeout(function(){return s.toggleControls.call(n,!1)},u)})}},{key:"media",value:function(){var n=this.player,u=n.elements,f,o;if(e.call(n,n.media,"timeupdate seeking seeked",function(t){return i.timeUpdate.call(n,t)}),e.call(n,n.media,"durationchange loadeddata loadedmetadata",function(t){return i.durationUpdate.call(n,t)}),e.call(n,n.media,"canplay loadeddata",function(){p(u.volume,!n.hasAudio);p(u.buttons.mute,!n.hasAudio)}),e.call(n,n.media,"ended",function(){n.isHTML5&&n.isVideo&&n.config.resetOnEnd&&n.restart()}),e.call(n,n.media,"progress playing seeking seeked",function(t){return i.updateProgress.call(n,t)}),e.call(n,n.media,"volumechange",function(t){return i.updateVolume.call(n,t)}),e.call(n,n.media,"playing play pause ended emptied timeupdate",function(t){return s.checkPlaying.call(n,t)}),e.call(n,n.media,"waiting canplay seeked playing",function(t){return s.checkLoading.call(n,t)}),e.call(n,n.media,"playing",function(){n.ads&&n.ads.enabled&&!n.ads.initialized&&n.ads.managerPromise.then(function(){return n.ads.play()}).catch(function(){return n.play()})}),n.supported.ui&&n.config.clickToPlay&&!n.isAudio){if(f=c.call(n,".".concat(n.config.classNames.video)),!t.element(f))return;e.call(n,u.container,"click",function(t){([u.container,f].includes(t.target)||f.contains(t.target))&&(n.touch&&n.config.hideControls||(n.ended?(n.restart(),n.play()):n.togglePlay()))})}n.supported.ui&&n.config.disableContextMenu&&e.call(n,u.wrapper,"contextmenu",function(n){n.preventDefault()},!1);e.call(n,n.media,"volumechange",function(){n.storage.set({volume:n.volume,muted:n.muted})});e.call(n,n.media,"ratechange",function(){i.updateSetting.call(n,"speed");n.storage.set({speed:n.speed})});e.call(n,n.media,"qualitychange",function(t){i.updateSetting.call(n,"quality",null,t.detail.quality)});e.call(n,n.media,"ready qualitychange",function(){i.setDownloadLink.call(n)});o=n.config.events.concat(["keyup","keydown"]).join(" ");e.call(n,n.media,o,function(t){var i=t.detail,f=void 0===i?{}:i;"error"===t.type&&(f=n.media.error);r.call(n,u.container,t.type,!0,f)})}},{key:"proxy",value:function(n,i,r){var u=this.player,f=u.config.listeners[r],e=!0;t.function(f)&&(e=f.call(u,n));e&&t.function(i)&&i.call(u,n)}},{key:"bind",value:function(n,i,r,u){var o=this,s=!(arguments.length>4&&void 0!==arguments[4])||arguments[4],f=this.player,h=f.config.listeners[u],c=t.function(h);e.call(f,n,i,function(n){return o.proxy(n,r,u)},s&&!c)}},{key:"controls",value:function(){var e=this,n=this.player,u=n.elements,o=a.isIE?"change":"input",h;(u.buttons.play&&Array.from(u.buttons.play).forEach(function(t){e.bind(t,"click",n.togglePlay,"play")}),this.bind(u.buttons.restart,"click",n.restart,"restart"),this.bind(u.buttons.rewind,"click",n.rewind,"rewind"),this.bind(u.buttons.fastForward,"click",n.forward,"fastForward"),this.bind(u.buttons.mute,"click",function(){n.muted=!n.muted},"mute"),this.bind(u.buttons.captions,"click",function(){return n.toggleCaptions()}),this.bind(u.buttons.download,"click",function(){r.call(n,n.media,"download")},"download"),this.bind(u.buttons.fullscreen,"click",function(){n.fullscreen.toggle()},"fullscreen"),this.bind(u.buttons.pip,"click",function(){n.pip="toggle"},"pip"),this.bind(u.buttons.airplay,"click",n.airplay,"airplay"),this.bind(u.buttons.settings,"click",function(t){t.stopPropagation();i.toggleMenu.call(n,t)}),this.bind(u.buttons.settings,"keyup",function(t){var r=t.which;[13,32].includes(r)&&(13!==r?(t.preventDefault(),t.stopPropagation(),i.toggleMenu.call(n,t)):i.focusFirstMenuItem.call(n,null,!0))},null,!1),this.bind(u.settings.menu,"keydown",function(t){27===t.which&&i.toggleMenu.call(n,t)}),this.bind(u.inputs.seek,"mousedown mousemove",function(n){var t=u.progress.getBoundingClientRect(),i=100/t.width*(n.pageX-t.left);n.currentTarget.setAttribute("seek-value",i)}),this.bind(u.inputs.seek,"mousedown mouseup keydown keyup touchstart touchend",function(i){var r=i.currentTarget,f=i.keyCode?i.keyCode:i.which,e,u;t.keyboardEvent(i)&&39!==f&&37!==f||(n.lastSeekTime=Date.now(),e=r.hasAttribute("play-on-seeked"),u=["mouseup","touchend","keyup"].includes(i.type),e&&u?(r.removeAttribute("play-on-seeked"),n.play()):!u&&n.playing&&(r.setAttribute("play-on-seeked",""),n.pause()))}),a.isIos)&&(h=et.call(n,'input[type="range"]'),Array.from(h).forEach(function(n){return e.bind(n,o,function(n){return ri(n.target)})}));this.bind(u.inputs.seek,o,function(i){var r=i.currentTarget,u=r.getAttribute("seek-value");t.empty(u)&&(u=r.value);r.removeAttribute("seek-value");n.currentTime=u/r.max*n.duration},"seek");this.bind(u.progress,"mouseenter mouseleave mousemove",function(t){return i.updateSeekTooltip.call(n,t)});a.isWebkit&&Array.from(et.call(n,'input[type="range"]')).forEach(function(t){e.bind(t,"input",function(t){return i.updateRangeFill.call(n,t.target)})});n.config.toggleInvert&&!t.element(u.display.duration)&&this.bind(u.display.currentTime,"click",function(){0!==n.currentTime&&(n.config.invertTime=!n.config.invertTime,i.timeUpdate.call(n))});this.bind(u.inputs.volume,o,function(t){n.volume=t.target.value},"volume");this.bind(u.controls,"mouseenter mouseleave",function(t){u.controls.hover=!n.touch&&"mouseenter"===t.type});this.bind(u.controls,"mousedown mouseup touchstart touchend touchcancel",function(n){u.controls.pressed=["mousedown","touchstart"].includes(n.type)});this.bind(u.controls,"focusin",function(){var t=n.config,i=n.elements,r=n.timers,u;f(i.controls,t.classNames.noTransition,!0);s.toggleControls.call(n,!0);setTimeout(function(){f(i.controls,t.classNames.noTransition,!1)},0);u=e.touch?3e3:4e3;clearTimeout(r.controls);r.controls=setTimeout(function(){return s.toggleControls.call(n,!1)},u)});this.bind(u.inputs.volume,"wheel",function(t){var o=t.webkitDirectionInvertedFromDevice,u=y([t.deltaX,-t.deltaY].map(function(n){return o?-n:n}),2),f=u[0],e=u[1],i=Math.sign(Math.abs(f)>Math.abs(e)?f:e),r;n.increaseVolume(i/50);r=n.media.volume;(1===i&&r<1||-1===i&&r>0)&&t.preventDefault()},"volume",!1)}}]),n}(),hi,pr,w;"undefined"!=typeof window?window:"undefined"!=typeof n?n:"undefined"!=typeof self&&self;pr=(function(n){n.exports=function(){function f(n,t){if(n){var r=i[n];if(u[n]=t,r)for(;r.length;)r[0](n,t),r.splice(0,1)}}function e(n,t){n.call&&(n={success:n});t.length?(n.error||r)(t):(n.success||r)(n)}function o(n,t,i,u){var s,f,e=document,h=i.async,l=(i.numRetries||0)+1,a=i.before||r,c=n.replace(/^(css|img)!/,"");u=u||0;/(^css!|\.css$)/.test(n)?(s=!0,(f=e.createElement("link")).rel="stylesheet",f.href=c):/(^img!|\.(png|gif|jpg|svg)$)/.test(n)?(f=e.createElement("img")).src=c:((f=e.createElement("script")).src=n,f.async=void 0===h||h);f.onload=f.onerror=f.onbeforeload=function(r){var e=r.type[0];if(s&&"hideFocus"in f)try{f.sheet.cssText.length||(e="e")}catch(r){18!=r.code&&(e="e")}if("e"==e&&(u+=1)<l)return o(n,t,i,u);t(n,e,r.defaultPrevented)};!1!==a(n,f)&&e.head.appendChild(f)}function n(n,i,r){var u,s;if(i&&i.trim&&(u=i),s=(u?r:i)||{},u){if(u in t)throw"LoadJS";t[u]=!0}!function(n,t,i){for(var e=(n=n.push?n:[n]).length,s=e,u=[],f=function(n,i,r){if("e"==i&&u.push(n),"b"==i){if(!r)return;u.push(n)}--e||t(u)},r=0;r<s;r++)o(n[r],f,i)}(n,function(n){e(s,n);f(u,n)},s)}var r=function(){},t={},u={},i={};return n.ready=function(t,r){return function(n,t){n=n.push?n:[n];for(var r,o,s=[],e=n.length,h=e,f=function(n,i){i.length&&s.push(n);--h||t(s)};e--;)r=n[e],(o=u[r])?f(r,o):(i[r]=i[r]||[]).push(f)}(t,function(n){e(r,n)}),n},n.done=function(n){f(n,[])},n.reset=function(){t={};u={};i={}},n.isDefined=function(n){return n in t},n}()}(hi={exports:{}},hi.exports),hi.exports);w={setup:function(){var n=this;f(this.elements.wrapper,this.config.classNames.embed,!0);w.setAspectRatio.call(this);t.object(window.Vimeo)?w.ready.call(this):ci(this.config.urls.vimeo.sdk).then(function(){w.ready.call(n)}).catch(function(t){n.debug.warn("Vimeo API failed to load",t)})},setAspectRatio:function(n){var r=y((t.string(n)?n:this.config.ratio).split(":").map(Number),2),i=100/r[0]*r[1],u;(w.padding=i,this.elements.wrapper.style.paddingBottom="".concat(i,"%"),this.supported.ui)&&(u=(240-i)/4.8,this.media.style.transform="translateY(-".concat(u,"%)"))},ready:function(){var h=this,n=this,nt=cr({loop:n.config.loop.active,autoplay:n.autoplay,byline:!1,portrait:!1,title:!1,speed:!0,transparent:0,gesture:"media",playsinline:!this.config.fullscreen.iosNative}),l=n.media.getAttribute("src"),a,c,v,p,b,g,k;t.empty(l)&&(l=n.media.getAttribute(n.config.attributes.embed.id));var f,d=(f=l,t.empty(f)?null:t.number(Number(f))?f:f.match(/^.*(vimeo.com\/|video\/)(\d+).*/)?RegExp.$2:f),e=u("iframe"),tt=fi(n.config.urls.vimeo.iframe,d,nt);e.setAttribute("src",tt);e.setAttribute("allowfullscreen","");e.setAttribute("allowtransparency","");e.setAttribute("allow","autoplay");a=u("div",{poster:n.poster,"class":n.config.classNames.embedContainer});a.appendChild(e);n.media=dt(a,n.media);yt(fi(n.config.urls.vimeo.api,d),"json").then(function(i){if(!t.empty(i)){var r=new URL(i[0].thumbnail_large);r.pathname="".concat(r.pathname.split("_")[0],".jpg");s.setPoster.call(n,r.href).catch(function(){})}});n.embed=new window.Vimeo.Player(e,{autopause:n.config.autopause,muted:n.muted});n.media.paused=!0;n.media.currentTime=0;n.supported.ui&&n.embed.disableTextTrack();n.media.play=function(){return st.call(n,!0),n.embed.play()};n.media.pause=function(){return st.call(n,!1),n.embed.pause()};n.media.stop=function(){n.pause();n.currentTime=0};c=n.media.currentTime;Object.defineProperty(n.media,"currentTime",{get:function(){return c},set:function(t){var i=n.embed,f=n.media,e=n.paused,o=n.volume,u=e&&!i.hasPlayed;f.seeking=!0;r.call(n,f,"seeking");Promise.resolve(u&&i.setVolume(0)).then(function(){return i.setCurrentTime(t)}).then(function(){return u&&i.pause()}).then(function(){return u&&i.setVolume(o)}).catch(function(){})}});v=n.config.speed.selected;Object.defineProperty(n.media,"playbackRate",{get:function(){return v},set:function(t){n.embed.setPlaybackRate(t).then(function(){v=t;r.call(n,n.media,"ratechange")}).catch(function(t){"Error"===t.name&&i.setSpeedMenu.call(n,[])})}});p=n.config.volume;Object.defineProperty(n.media,"volume",{get:function(){return p},set:function(t){n.embed.setVolume(t).then(function(){p=t;r.call(n,n.media,"volumechange")})}});b=n.config.muted;Object.defineProperty(n.media,"muted",{get:function(){return b},set:function(i){var u=!!t.boolean(i)&&i;n.embed.setVolume(u?0:n.config.volume).then(function(){b=u;r.call(n,n.media,"volumechange")})}});k=n.config.loop;Object.defineProperty(n.media,"loop",{get:function(){return k},set:function(i){var r=t.boolean(i)?i:n.config.loop.active;n.embed.setLoop(r).then(function(){k=r})}});n.embed.getVideoUrl().then(function(t){g=t;i.setDownloadLink.call(n)}).catch(function(n){h.debug.warn(n)});Object.defineProperty(n.media,"currentSrc",{get:function(){return g}});Object.defineProperty(n.media,"ended",{get:function(){return n.currentTime===n.duration}});Promise.all([n.embed.getVideoWidth(),n.embed.getVideoHeight()]).then(function(n){var t,i,r;w.ratio=(t=n[0],i=n[1],r=function h(n,t){return 0===t?n:h(t,n%t)}(t,i),"".concat(t/r,":").concat(i/r));w.setAspectRatio.call(h,w.ratio)});n.embed.setAutopause(n.config.autopause).then(function(t){n.config.autopause=t});n.embed.getVideoTitle().then(function(t){n.config.title=t;s.setTitle.call(h)});n.embed.getCurrentTime().then(function(t){c=t;r.call(n,n.media,"timeupdate")});n.embed.getDuration().then(function(t){n.media.duration=t;r.call(n,n.media,"durationchange")});n.embed.getTextTracks().then(function(t){n.media.textTracks=t;o.setup.call(n)});n.embed.on("cuechange",function(t){var i=t.cues,r=(void 0===i?[]:i).map(function(n){return r=n.text,t=document.createDocumentFragment(),i=document.createElement("div"),t.appendChild(i),i.innerHTML=r,t.firstChild.innerText;var r,t,i});o.updateCues.call(n,r)});n.embed.on("loaded",function(){(n.embed.getPaused().then(function(t){st.call(n,!t);t||r.call(n,n.media,"playing")}),t.element(n.embed.element)&&n.supported.ui)&&n.embed.element.setAttribute("tabindex",-1)});n.embed.on("play",function(){st.call(n,!0);r.call(n,n.media,"playing")});n.embed.on("pause",function(){st.call(n,!1)});n.embed.on("timeupdate",function(t){n.media.seeking=!1;c=t.seconds;r.call(n,n.media,"timeupdate")});n.embed.on("progress",function(t){n.media.buffered=t.percent;r.call(n,n.media,"progress");1===parseInt(t.percent,10)&&r.call(n,n.media,"canplaythrough");n.embed.getDuration().then(function(t){t!==n.media.duration&&(n.media.duration=t,r.call(n,n.media,"durationchange"))})});n.embed.on("seeked",function(){n.media.seeking=!1;r.call(n,n.media,"seeked")});n.embed.on("ended",function(){n.media.paused=!0;r.call(n,n.media,"ended")});n.embed.on("error",function(t){n.media.error=t;r.call(n,n.media,"error")});n.on("enterfullscreen exitfullscreen",function(t){var i=n.fullscreen.target;if(i===n.elements.container){var u="enterfullscreen"===t.type,r=y(w.ratio.split(":").map(Number),2),f=r[0]>r[1]?"width":"height";i.style[f]=u?"".concat(w.padding,"%"):null}});setTimeout(function(){return s.build.call(n)},0)}};var wr,ct={setup:function(){var n=this;f(this.elements.wrapper,this.config.classNames.embed,!0);ct.setAspectRatio.call(this);t.object(window.YT)&&t.function(window.YT.Player)?ct.ready.call(this):(ci(this.config.urls.youtube.sdk).catch(function(t){n.debug.warn("YouTube API failed to load",t)}),window.onYouTubeReadyCallbacks=window.onYouTubeReadyCallbacks||[],window.onYouTubeReadyCallbacks.push(function(){ct.ready.call(n)}),window.onYouTubeIframeAPIReady=function(){window.onYouTubeReadyCallbacks.forEach(function(n){n()})})},getTitle:function(n){var u=this,r,i;if(t.function(this.embed.getVideoData)&&(r=this.embed.getVideoData().title,t.empty(r)))return this.config.title=r,void s.setTitle.call(this);i=this.config.keys.google;t.string(i)&&!t.empty(i)&&yt(fi(this.config.urls.youtube.api,n,i)).then(function(n){t.object(n)&&(u.config.title=n.items[0].snippet.title,s.setTitle.call(u))}).catch(function(){})},setAspectRatio:function(){var n=this.config.ratio.split(":");this.elements.wrapper.style.paddingBottom="".concat(100/n[0]*n[1],"%")},ready:function(){var n=this,h=n.media.getAttribute("id"),i,e;if(t.empty(h)||!h.startsWith("youtube-")){i=n.media.getAttribute("src");t.empty(i)&&(i=n.media.getAttribute(this.config.attributes.embed.id));var f,c,o=(f=i,t.empty(f)?null:f.match(/^.*(youtu.be\/|v\/|u\/\w\/|embed\/|watch\?v=|&v=)([^#&?]*).*/)?RegExp.$2:f),l=(c=n.provider,"".concat(c,"-").concat(Math.floor(1e4*Math.random()))),a=u("div",{id:l,poster:n.poster});n.media=dt(a,n.media);e=function(n){return"https://img.youtube.com/vi/".concat(o,"/").concat(n,"default.jpg")};pt(e("maxres"),121).catch(function(){return pt(e("sd"),121)}).catch(function(){return pt(e("hq"))}).then(function(t){return s.setPoster.call(n,t.src)}).then(function(t){t.includes("maxres")||(n.elements.poster.style.backgroundSize="cover")}).catch(function(){});n.embed=new window.YT.Player(l,{videoId:o,playerVars:{autoplay:n.config.autoplay?1:0,hl:n.config.hl,controls:n.supported.ui?0:1,rel:0,showinfo:0,iv_load_policy:3,modestbranding:1,disablekb:1,playsinline:1,widget_referrer:window?window.location.href:null,cc_load_policy:n.captions.active?1:0,cc_lang_pref:n.config.captions.language},events:{onError:function(t){if(!n.media.error){var i=t.data,u={2:"The request contains an invalid parameter value. For example, this error occurs if you specify a video ID that does not have 11 characters, or if the video ID contains invalid characters, such as exclamation points or asterisks.",5:"The requested content cannot be played in an HTML5 player or another error related to the HTML5 player has occurred.",100:"The video requested was not found. This error occurs when a video has been removed (for any reason) or has been marked as private.",101:"The owner of the requested video does not allow it to be played in embedded players.",150:"The owner of the requested video does not allow it to be played in embedded players."}[i]||"An unknown error occured";n.media.error={code:i,message:u};r.call(n,n.media,"error")}},onPlaybackRateChange:function(t){var i=t.target;n.media.playbackRate=i.getPlaybackRate();r.call(n,n.media,"ratechange")},onReady:function(i){var u,f,e;t.function(n.media.play)||(u=i.target,ct.getTitle.call(n,o),n.media.play=function(){ht.call(n,!0);u.playVideo()},n.media.pause=function(){ht.call(n,!1);u.pauseVideo()},n.media.stop=function(){u.stopVideo()},n.media.duration=u.getDuration(),n.media.paused=!0,n.media.currentTime=0,Object.defineProperty(n.media,"currentTime",{get:function(){return Number(u.getCurrentTime())},set:function(t){n.paused&&!n.embed.hasPlayed&&n.embed.mute();n.media.seeking=!0;r.call(n,n.media,"seeking");u.seekTo(t)}}),Object.defineProperty(n.media,"playbackRate",{get:function(){return u.getPlaybackRate()},set:function(n){u.setPlaybackRate(n)}}),f=n.config.volume,Object.defineProperty(n.media,"volume",{get:function(){return f},set:function(t){f=t;u.setVolume(100*f);r.call(n,n.media,"volumechange")}}),e=n.config.muted,Object.defineProperty(n.media,"muted",{get:function(){return e},set:function(i){var f=t.boolean(i)?i:e;e=f;u[f?"mute":"unMute"]();r.call(n,n.media,"volumechange")}}),Object.defineProperty(n.media,"currentSrc",{get:function(){return u.getVideoUrl()}}),Object.defineProperty(n.media,"ended",{get:function(){return n.currentTime===n.duration}}),n.options.speed=u.getAvailablePlaybackRates(),n.supported.ui&&n.media.setAttribute("tabindex",-1),r.call(n,n.media,"timeupdate"),r.call(n,n.media,"durationchange"),clearInterval(n.timers.buffering),n.timers.buffering=setInterval(function(){n.media.buffered=u.getVideoLoadedFraction();(null===n.media.lastBuffered||n.media.lastBuffered<n.media.buffered)&&r.call(n,n.media,"progress");n.media.lastBuffered=n.media.buffered;1===n.media.buffered&&(clearInterval(n.timers.buffering),r.call(n,n.media,"canplaythrough"))},200),setTimeout(function(){return s.build.call(n)},50))},onStateChange:function(t){var i=t.target;switch(clearInterval(n.timers.playing),n.media.seeking&&[1,2].includes(t.data)&&(n.media.seeking=!1,r.call(n,n.media,"seeked")),t.data){case-1:r.call(n,n.media,"timeupdate");n.media.buffered=i.getVideoLoadedFraction();r.call(n,n.media,"progress");break;case 0:ht.call(n,!1);n.media.loop?(i.stopVideo(),i.playVideo()):r.call(n,n.media,"ended");break;case 1:n.media.paused&&!n.embed.hasPlayed?n.media.pause():(ht.call(n,!0),r.call(n,n.media,"playing"),n.timers.playing=setInterval(function(){r.call(n,n.media,"timeupdate")},50),n.media.duration!==i.getDuration()&&(n.media.duration=i.getDuration(),r.call(n,n.media,"durationchange")));break;case 2:n.muted||n.embed.unMute();ht.call(n,!1)}r.call(n,n.elements.container,"statechange",!1,{code:t.data})}}})}}},br={setup:function(){this.media?(f(this.elements.container,this.config.classNames.type.replace("{0}",this.type),!0),f(this.elements.container,this.config.classNames.provider.replace("{0}",this.provider),!0),this.isEmbed&&f(this.elements.container,this.config.classNames.type.replace("{0}","video"),!0),this.isVideo&&(this.elements.wrapper=u("div",{"class":this.config.classNames.video}),di(this.media,this.elements.wrapper),this.elements.poster=u("div",{"class":this.config.classNames.poster}),this.elements.wrapper.appendChild(this.elements.poster)),this.isHTML5?tt.extend.call(this):this.isYouTube?ct.setup.call(this):this.isVimeo&&w.setup.call(this)):this.debug.warn("No media element found!")}},su=function(){function n(t){var i=this;it(this,n);this.player=t;this.publisherId=t.config.ads.publisherId;this.playing=!1;this.initialized=!1;this.elements={container:null,displayContainer:null};this.manager=null;this.loader=null;this.cuePoints=null;this.events={};this.safetyTimer=null;this.countdownTimer=null;this.managerPromise=new Promise(function(n,t){i.on("loaded",n);i.on("error",t)});this.load()}return rt(n,[{key:"load",value:function(){var n=this;this.enabled&&(t.object(window.google)&&t.object(window.google.ima)?this.ready():ci(this.player.config.urls.googleIMA.sdk).then(function(){n.ready()}).catch(function(){n.trigger("error",new Error("Google IMA SDK failed to load"))}))}},{key:"ready",value:function(){var n=this;this.startSafetyTimer(12e3,"ready()");this.managerPromise.then(function(){n.clearSafetyTimer("onAdsManagerLoaded()")});this.listeners();this.setupIMA()}},{key:"setupIMA",value:function(){this.elements.container=u("div",{"class":this.player.config.classNames.ads});this.player.elements.container.appendChild(this.elements.container);google.ima.settings.setVpaidMode(google.ima.ImaSdkSettings.VpaidMode.ENABLED);google.ima.settings.setLocale(this.player.config.ads.language);this.elements.displayContainer=new google.ima.AdDisplayContainer(this.elements.container);this.requestAds()}},{key:"requestAds",value:function(){var i=this,t=this.player.elements.container,n;try{this.loader=new google.ima.AdsLoader(this.elements.displayContainer);this.loader.addEventListener(google.ima.AdsManagerLoadedEvent.Type.ADS_MANAGER_LOADED,function(n){return i.onAdsManagerLoaded(n)},!1);this.loader.addEventListener(google.ima.AdErrorEvent.Type.AD_ERROR,function(n){return i.onAdError(n)},!1);n=new google.ima.AdsRequest;n.adTagUrl=this.tagUrl;n.linearAdSlotWidth=t.offsetWidth;n.linearAdSlotHeight=t.offsetHeight;n.nonLinearAdSlotWidth=t.offsetWidth;n.nonLinearAdSlotHeight=t.offsetHeight;n.forceNonLinearFullSlot=!1;n.setAdWillPlayMuted(!this.player.muted);this.loader.requestAds(n)}catch(i){this.onAdError(i)}}},{key:"pollCountdown",value:function(){var n=this;if(!(arguments.length>0&&void 0!==arguments[0]&&arguments[0]))return clearInterval(this.countdownTimer),void this.elements.container.removeAttribute("data-badge-text");this.countdownTimer=setInterval(function(){var t=ei(Math.max(n.manager.getRemainingTime(),0)),i="".concat(l("advertisement",n.player.config)," - ").concat(t);n.elements.container.setAttribute("data-badge-text",i)},100)}},{key:"onAdsManagerLoaded",value:function(n){var i=this,r;this.enabled&&(r=new google.ima.AdsRenderingSettings,r.restoreCustomPlaybackStateOnAdBreakComplete=!0,r.enablePreloading=!0,this.manager=n.getAdsManager(this.player,r),this.cuePoints=this.manager.getCuePoints(),t.empty(this.cuePoints)||this.cuePoints.forEach(function(n){var r,e,f;0!==n&&-1!==n&&n<i.player.duration&&(r=i.player.elements.progress,t.element(r)&&(e=100/i.player.duration*n,f=u("span",{"class":i.player.config.classNames.cues}),f.style.left="".concat(e.toString(),"%"),r.appendChild(f)))}),this.manager.setVolume(this.player.volume),this.manager.addEventListener(google.ima.AdErrorEvent.Type.AD_ERROR,function(n){return i.onAdError(n)}),Object.keys(google.ima.AdEvent.Type).forEach(function(n){i.manager.addEventListener(google.ima.AdEvent.Type[n],function(n){return i.onAdEvent(n)})}),this.trigger("loaded"))}},{key:"onAdEvent",value:function(n){var u=this,f=this.player.elements.container,i=n.getAd(),t=function(n){var t="ads".concat(n.replace(/_/g,"").toLowerCase());r.call(u.player,u.player.media,t)};switch(n.type){case google.ima.AdEvent.Type.LOADED:this.trigger("loaded");t(n.type);this.pollCountdown(!0);i.isLinear()||(i.width=f.offsetWidth,i.height=f.offsetHeight);break;case google.ima.AdEvent.Type.ALL_ADS_COMPLETED:t(n.type);this.loadAds();break;case google.ima.AdEvent.Type.CONTENT_PAUSE_REQUESTED:t(n.type);this.pauseContent();break;case google.ima.AdEvent.Type.CONTENT_RESUME_REQUESTED:t(n.type);this.pollCountdown();this.resumeContent();break;case google.ima.AdEvent.Type.STARTED:case google.ima.AdEvent.Type.MIDPOINT:case google.ima.AdEvent.Type.COMPLETE:case google.ima.AdEvent.Type.IMPRESSION:case google.ima.AdEvent.Type.CLICK:t(n.type)}}},{key:"onAdError",value:function(n){this.cancel();this.player.debug.warn("Ads error",n)}},{key:"listeners",value:function(){var i,n=this,r=this.player.elements.container;this.player.on("ended",function(){n.loader.contentComplete()});this.player.on("seeking",function(){return i=n.player.currentTime});this.player.on("seeked",function(){var r=n.player.currentTime;t.empty(n.cuePoints)||n.cuePoints.forEach(function(t,u){i<t&&t<r&&(n.manager.discardAdBreak(),n.cuePoints.splice(u,1))})});window.addEventListener("resize",function(){n.manager&&n.manager.resize(r.offsetWidth,r.offsetHeight,google.ima.ViewMode.NORMAL)})}},{key:"play",value:function(){var n=this,t=this.player.elements.container;this.managerPromise||this.resumeContent();this.managerPromise.then(function(){n.elements.displayContainer.initialize();try{n.initialized||(n.manager.init(t.offsetWidth,t.offsetHeight,google.ima.ViewMode.NORMAL),n.manager.start());n.initialized=!0}catch(t){n.onAdError(t)}}).catch(function(){})}},{key:"resumeContent",value:function(){this.elements.container.style.zIndex="";this.playing=!1;this.player.currentTime<this.player.duration&&this.player.play()}},{key:"pauseContent",value:function(){this.elements.container.style.zIndex=3;this.playing=!0;this.player.pause()}},{key:"cancel",value:function(){this.initialized&&this.resumeContent();this.trigger("error");this.loadAds()}},{key:"loadAds",value:function(){var n=this;this.managerPromise.then(function(){n.manager&&n.manager.destroy();n.managerPromise=new Promise(function(t){n.on("loaded",t);n.player.debug.log(n.manager)});n.requestAds()}).catch(function(){})}},{key:"trigger",value:function(n){for(var u,e=this,r=arguments.length,f=new Array(r>1?r-1:0),i=1;i<r;i++)f[i-1]=arguments[i];u=this.events[n];t.array(u)&&u.forEach(function(n){t.function(n)&&n.apply(e,f)})}},{key:"on",value:function(n,i){return t.array(this.events[n])||(this.events[n]=[]),this.events[n].push(i),this}},{key:"startSafetyTimer",value:function(n,t){var i=this;this.player.debug.log("Safety timer invoked from: ".concat(t));this.safetyTimer=setTimeout(function(){i.cancel();i.clearSafetyTimer("startSafetyTimer()")},n)}},{key:"clearSafetyTimer",value:function(n){t.nullOrUndefined(this.safetyTimer)||(this.player.debug.log("Safety timer cleared from: ".concat(n)),clearTimeout(this.safetyTimer),this.safetyTimer=null)}},{key:"enabled",get:function(){return this.player.isHTML5&&this.player.isVideo&&this.player.config.ads.enabled&&!t.empty(this.publisherId)}},{key:"tagUrl",get:function(){var n={AV_PUBLISHERID:"58c25bb0073ef448b1087ad6",AV_CHANNELID:"5a0458dc28a06145e4519d21",AV_URL:window.location.hostname,cb:Date.now(),AV_WIDTH:640,AV_HEIGHT:480,AV_CDIM2:this.publisherId};return"".concat("https://go.aniview.com/api/adserver6/vast/","?").concat(cr(n))}}]),n}(),li={insertElements:function(n,i){var r=this;t.string(i)?gi(n,this.media,{src:i}):t.array(i)&&i.forEach(function(t){gi(n,r.media,t)})},change:function(n){var i=this;rr(n,"sources.length")?(tt.cancelRequests.call(this),this.destroy.call(this,function(){i.options.quality=[];d(i.media);i.media=null;t.element(i.elements.container)&&i.elements.container.removeAttribute("class");var e=n.sources,f=n.type,o=y(e,1)[0],c=o.provider,r=void 0===c?g.html5:c,l=o.src,a="html5"===r?f:"div",v="html5"===r?{}:{src:l};Object.assign(i,{provider:r,type:f,supported:h.check(f,r,i.config.playsinline),media:u(a,v)});i.elements.container.appendChild(i.media);t.boolean(n.autoplay)&&(i.config.autoplay=n.autoplay);i.isHTML5&&(i.config.crossorigin&&i.media.setAttribute("crossorigin",""),i.config.autoplay&&i.media.setAttribute("autoplay",""),t.empty(n.poster)||(i.poster=n.poster),i.config.loop.active&&i.media.setAttribute("loop",""),i.config.muted&&i.media.setAttribute("muted",""),i.config.playsinline&&i.media.setAttribute("playsinline",""));s.addStyleHook.call(i);i.isHTML5&&li.insertElements.call(i,"source",e);i.config.title=n.title;br.setup.call(i);i.isHTML5&&Object.keys(n).includes("tracks")&&li.insertElements.call(i,"track",n.tracks);(i.isHTML5||i.isEmbed&&!i.supported.ui)&&s.build.call(i);i.isHTML5&&i.media.load();i.fullscreen.update()},!0)):this.debug.warn("Invalid source format")}},kr=function(){function n(i,r){var a=this,l,c;if(it(this,n),this.timers={},this.ready=!1,this.loading=!1,this.failed=!1,this.touch=h.touch,this.media=i,t.string(this.media)&&(this.media=document.querySelectorAll(this.media)),(window.jQuery&&this.media instanceof jQuery||t.nodeList(this.media)||t.array(this.media))&&(this.media=this.media[0]),this.config=v({},lr,n.defaults,r||{},function(){try{return JSON.parse(a.media.getAttribute("data-plyr-config"))}catch(n){return{}}}()),this.elements={container:null,captions:null,buttons:{},display:{},progress:{},inputs:{},settings:{popup:null,menu:null,panels:{},buttons:{}}},this.captions={active:null,currentTrack:-1,meta:new WeakMap},this.fullscreen={active:!1},this.options={speed:[],quality:[]},this.debug=new fu(this.config.debug),this.debug.log("Config",this.config),this.debug.log("Support",h),!t.nullOrUndefined(this.media)&&t.element(this.media))if(this.media.plyr)this.debug.warn("Target already setup");else if(this.config.enabled)if(h.check().api){l=this.media.cloneNode(!0);l.autoplay=!1;this.elements.original=l;var y=this.media.tagName.toLowerCase(),o=null,f=null;switch(y){case"div":if((o=this.media.querySelector("iframe"),t.element(o))?(f=hr(o.getAttribute("src")),this.provider=function(n){return/^(https?:\/\/)?(www\.)?(youtube\.com|youtu\.?be)\/.+$/.test(n)?g.youtube:/^https?:\/\/player.vimeo.com\/video\/\d{0,9}(?=\b|\/)/.test(n)?g.vimeo:null}(f.toString()),this.elements.container=this.media,this.media=o,this.elements.container.className="",f.search.length)&&(c=["1","true"],c.includes(f.searchParams.get("autoplay"))&&(this.config.autoplay=!0),c.includes(f.searchParams.get("loop"))&&(this.config.loop.active=!0),this.isYouTube?(this.config.playsinline=c.includes(f.searchParams.get("playsinline")),this.config.hl=f.searchParams.get("hl")):this.config.playsinline=!0):(this.provider=this.media.getAttribute(this.config.attributes.embed.provider),this.media.removeAttribute(this.config.attributes.embed.provider)),t.empty(this.provider)||!Object.keys(g).includes(this.provider))return void this.debug.error("Setup failed: Invalid provider");this.type=oi.video;break;case"video":case"audio":this.type=y;this.provider=g.html5;this.media.hasAttribute("crossorigin")&&(this.config.crossorigin=!0);this.media.hasAttribute("autoplay")&&(this.config.autoplay=!0);(this.media.hasAttribute("playsinline")||this.media.hasAttribute("webkit-playsinline"))&&(this.config.playsinline=!0);this.media.hasAttribute("muted")&&(this.config.muted=!0);this.media.hasAttribute("loop")&&(this.config.loop.active=!0);break;default:return void this.debug.error("Setup failed: unsupported type")}this.supported=h.check(this.type,this.provider,this.config.playsinline);this.supported.api?(this.eventListeners=[],this.listeners=new ou(this),this.storage=new er(this),this.media.plyr=this,t.element(this.elements.container)||(this.elements.container=u("div"),di(this.media,this.elements.container)),s.addStyleHook.call(this),br.setup.call(this),this.config.debug&&e.call(this,this.elements.container,this.config.events.join(" "),function(n){a.debug.log("event: ".concat(n.type))}),(this.isHTML5||this.isEmbed&&!this.supported.ui)&&s.build.call(this),this.listeners.container(),this.listeners.global(),this.fullscreen=new eu(this),this.config.ads.enabled&&(this.ads=new su(this)),this.config.autoplay&&this.play(),this.lastSeekTime=0):this.debug.error("Setup failed: no support")}else this.debug.error("Setup failed: no support");else this.debug.error("Setup failed: disabled by config");else this.debug.error("Setup failed: no suitable element passed")}return rt(n,[{key:"play",value:function(){return t.function(this.media.play)?this.media.play():null}},{key:"pause",value:function(){this.playing&&t.function(this.media.pause)&&this.media.pause()}},{key:"togglePlay",value:function(n){(t.boolean(n)?n:!this.playing)?this.play():this.pause()}},{key:"stop",value:function(){this.isHTML5?(this.pause(),this.restart()):t.function(this.media.stop)&&this.media.stop()}},{key:"restart",value:function(){this.currentTime=0}},{key:"rewind",value:function(n){this.currentTime=this.currentTime-(t.number(n)?n:this.config.seekTime)}},{key:"forward",value:function(n){this.currentTime=this.currentTime+(t.number(n)?n:this.config.seekTime)}},{key:"increaseVolume",value:function(n){var i=this.media.muted?0:this.volume;this.volume=i+(t.number(n)?n:0)}},{key:"decreaseVolume",value:function(n){this.increaseVolume(-n)}},{key:"toggleCaptions",value:function(n){o.toggle.call(this,n,!1)}},{key:"airplay",value:function(){h.airplay&&this.media.webkitShowPlaybackTargetPicker()}},{key:"toggleControls",value:function(n){var e;if(this.supported.ui&&!this.isAudio){var o=vt(this.elements.container,this.config.classNames.hideControls),s=void 0===n?void 0:!n,u=f(this.elements.container,this.config.classNames.hideControls,s);return(u&&this.config.controls.includes("settings")&&!t.empty(this.config.settings)&&i.toggleMenu.call(this,!1),u!==o)&&(e=u?"controlshidden":"controlsshown",r.call(this,this.media,e)),!u}return!1}},{key:"on",value:function(n,t){e.call(this,this.elements.container,n,t)}},{key:"once",value:function(n,t){ki.call(this,this.elements.container,n,t)}},{key:"off",value:function(n,t){bt(this.elements.container,n,t)}},{key:"destroy",value:function(n){var i=this,f=arguments.length>1&&void 0!==arguments[1]&&arguments[1],u;this.ready&&(u=function(){document.body.style.overflow="";i.embed=null;f?(Object.keys(i.elements).length&&(d(i.elements.buttons.play),d(i.elements.captions),d(i.elements.controls),d(i.elements.wrapper),i.elements.buttons.play=null,i.elements.captions=null,i.elements.controls=null,i.elements.wrapper=null),t.function(n)&&n()):(function(){this&&this.eventListeners&&(this.eventListeners.forEach(function(n){var t=n.element,i=n.type,r=n.callback,u=n.options;t.removeEventListener(i,r,u)}),this.eventListeners=[])}.call(i),dt(i.elements.original,i.elements.container),r.call(i,i.elements.original,"destroyed",!0),t.function(n)&&n.call(i.elements.original),i.ready=!1,setTimeout(function(){i.elements=null;i.media=null},200))},this.stop(),this.isHTML5?(clearTimeout(this.timers.loading),s.toggleNativeControls.call(this,!0),u()):this.isYouTube?(clearInterval(this.timers.buffering),clearInterval(this.timers.playing),null!==this.embed&&t.function(this.embed.destroy)&&this.embed.destroy(),u()):this.isVimeo&&(null!==this.embed&&this.embed.unload().then(u),setTimeout(u,200)))}},{key:"supports",value:function(n){return h.mime.call(this,n)}},{key:"isHTML5",get:function(){return Boolean(this.provider===g.html5)}},{key:"isEmbed",get:function(){return Boolean(this.isYouTube||this.isVimeo)}},{key:"isYouTube",get:function(){return Boolean(this.provider===g.youtube)}},{key:"isVimeo",get:function(){return Boolean(this.provider===g.vimeo)}},{key:"isVideo",get:function(){return Boolean(this.type===oi.video)}},{key:"isAudio",get:function(){return Boolean(this.type===oi.audio)}},{key:"playing",get:function(){return Boolean(this.ready&&!this.paused&&!this.ended)}},{key:"paused",get:function(){return Boolean(this.media.paused)}},{key:"stopped",get:function(){return Boolean(this.paused&&0===this.currentTime)}},{key:"ended",get:function(){return Boolean(this.media.ended)}},{key:"currentTime",set:function(n){if(this.duration){var i=t.number(n)&&n>0;this.media.currentTime=i?Math.min(n,this.duration):0;this.debug.log("Seeking to ".concat(this.currentTime," seconds"))}},get:function(){return Number(this.media.currentTime)}},{key:"buffered",get:function(){var n=this.media.buffered;return t.number(n)?n:n&&n.length&&this.duration>0?n.end(0)/this.duration:0}},{key:"seeking",get:function(){return Boolean(this.media.seeking)}},{key:"duration",get:function(){var i=parseFloat(this.config.duration),n=(this.media||{}).duration,r=t.number(n)&&n!==1/0?n:0;return i||r}},{key:"volume",set:function(n){var i=n;t.string(i)&&(i=Number(i));t.number(i)||(i=this.storage.get("volume"));t.number(i)||(i=this.config.volume);i>1&&(i=1);i<0&&(i=0);this.config.volume=i;this.media.volume=i;!t.empty(n)&&this.muted&&i>0&&(this.muted=!1)},get:function(){return Number(this.media.volume)}},{key:"muted",set:function(n){var i=n;t.boolean(i)||(i=this.storage.get("muted"));t.boolean(i)||(i=this.config.muted);this.config.muted=i;this.media.muted=i},get:function(){return Boolean(this.media.muted)}},{key:"hasAudio",get:function(){return!this.isHTML5||!!this.isAudio||Boolean(this.media.mozHasAudio)||Boolean(this.media.webkitAudioDecodedByteCount)||Boolean(this.media.audioTracks&&this.media.audioTracks.length)}},{key:"speed",set:function(n){var i=null;t.number(n)&&(i=n);t.number(i)||(i=this.storage.get("speed"));t.number(i)||(i=this.config.speed.selected);i<.1&&(i=.1);i>2&&(i=2);this.config.speed.options.includes(i)?(this.config.speed.selected=i,this.media.playbackRate=i):this.debug.warn("Unsupported speed (".concat(i,")"))},get:function(){return Number(this.media.playbackRate)}},{key:"quality",set:function(n){var r=this.config.quality,u=this.options.quality,i,f,e;u.length&&(i=[!t.empty(n)&&Number(n),this.storage.get("quality"),r.selected,r.default].find(t.number),f=!0,u.includes(i)||(e=function(n,i){return t.array(n)&&n.length?n.reduce(function(n,t){return Math.abs(t-i)<Math.abs(n-i)?t:n}):null}(u,i),this.debug.warn("Unsupported quality option: ".concat(i,", using ").concat(e," instead")),i=e,f=!1),r.selected=i,this.media.quality=i,f&&this.storage.set({quality:i}))},get:function(){return this.media.quality}},{key:"loop",set:function(n){var i=t.boolean(n)?n:this.config.loop.active;this.config.loop.active=i;this.media.loop=i},get:function(){return Boolean(this.media.loop)}},{key:"source",set:function(n){li.change.call(this,n)},get:function(){return this.media.currentSrc}},{key:"download",get:function(){var n=this.config.urls.download;return t.url(n)?n:this.source}},{key:"poster",set:function(n){this.isVideo?s.setPoster.call(this,n,!1).catch(function(){}):this.debug.warn("Poster can only be set for video")},get:function(){return this.isVideo?this.media.getAttribute("poster"):null}},{key:"autoplay",set:function(n){var i=t.boolean(n)?n:this.config.autoplay;this.config.autoplay=i},get:function(){return Boolean(this.config.autoplay)}},{key:"currentTrack",set:function(n){o.set.call(this,n,!1)},get:function(){var n=this.captions,t=n.toggled,i=n.currentTrack;return t?i:-1}},{key:"language",set:function(n){o.setLanguage.call(this,n,!1)},get:function(){return(o.getCurrentTrack.call(this)||{}).language}},{key:"pip",set:function(n){if(h.pip){var i=t.boolean(n)?n:!this.pip;t.function(this.media.webkitSetPresentationMode)&&this.media.webkitSetPresentationMode(i?ar:uu);t.function(this.media.requestPictureInPicture)&&(!this.pip&&i?this.media.requestPictureInPicture():this.pip&&!i&&document.exitPictureInPicture())}},get:function(){return h.pip?t.empty(this.media.webkitPresentationMode)?this.media===document.pictureInPictureElement:this.media.webkitPresentationMode===ar:null}}],[{key:"supported",value:function(n,t,i){return h.check(n,t,i)}},{key:"loadSprite",value:function(n,t){return or(n,t)}},{key:"setup",value:function(i){var u=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=null;return t.string(i)?r=Array.from(document.querySelectorAll(i)):t.nodeList(i)?r=Array.from(i):t.array(i)&&(r=i.filter(t.element)),t.empty(r)?null:r.map(function(t){return new n(t,u)})}}]),n}();return kr.defaults=(wr=lr,JSON.parse(JSON.stringify(wr))),kr})}).call(this,typeof global!="undefined"?global:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{}],4:[function(n,t,i){!function(n,r){"object"==typeof i&&"object"==typeof t?t.exports=r():"function"==typeof define&&define.amd?define("scrollMonitor",[],r):"object"==typeof i?i.scrollMonitor=r():n.scrollMonitor=r()}(this,function(){return function(n){function t(r){if(i[r])return i[r].exports;var u=i[r]={exports:{},id:r,loaded:!1};return n[r].call(u.exports,u,u.exports,t),u.loaded=!0,u.exports}var i={};return t.m=n,t.c=i,t.p="",t(0)}([function(n,t,i){"use strict";var f=i(1),u=f.isInBrowser,e=i(2),r=new e(u?document.body:null);r.setStateFromDOM(null);r.listenToDOM();u&&(window.scrollMonitor=r);n.exports=r},function(n,t){"use strict";t.VISIBILITYCHANGE="visibilityChange";t.ENTERVIEWPORT="enterViewport";t.FULLYENTERVIEWPORT="fullyEnterViewport";t.EXITVIEWPORT="exitViewport";t.PARTIALLYEXITVIEWPORT="partiallyExitViewport";t.LOCATIONCHANGE="locationChange";t.STATECHANGE="stateChange";t.eventTypes=[t.VISIBILITYCHANGE,t.ENTERVIEWPORT,t.FULLYENTERVIEWPORT,t.EXITVIEWPORT,t.PARTIALLYEXITVIEWPORT,t.LOCATIONCHANGE,t.STATECHANGE];t.isOnServer="undefined"==typeof window;t.isInBrowser=!t.isOnServer;t.defaultOffsets={top:0,bottom:0}},function(n,t,i){"use strict";function v(n,t){if(!(n instanceof t))throw new TypeError("Cannot call a class as a function");}function o(n){return e?0:n===document.body?window.innerHeight||document.documentElement.clientHeight:n.clientHeight}function u(n){return e?0:n===document.body?Math.max(document.body.scrollHeight,document.documentElement.scrollHeight,document.body.offsetHeight,document.documentElement.offsetHeight,document.documentElement.clientHeight):n.scrollHeight}function s(n){return e?0:n===document.body?window.pageYOffset||document.documentElement&&document.documentElement.scrollTop||document.body.scrollTop:n.scrollTop}var f=i(1),e=f.isOnServer,h=f.isInBrowser,y=f.eventTypes,p=i(3),c=!1,l,r,a;if(h)try{l=Object.defineProperty({},"passive",{get:function(){c=!0}});window.addEventListener("test",null,l)}catch(n){}r=!!c&&{capture:!1,passive:!0};a=function(){function n(t,i){function c(){if(r.viewportTop=s(t),r.viewportBottom=r.viewportTop+r.viewportHeight,r.documentHeight=u(t),r.documentHeight!==h){for(e=r.watchers.length;e--;)r.watchers[e].recalculateLocation();h=r.documentHeight}}function l(){for(f=r.watchers.length;f--;)r.watchers[f].update();for(f=r.watchers.length;f--;)r.watchers[f].triggerCallbacks()}var r,h,e,f;v(this,n);r=this;this.item=t;this.watchers=[];this.viewportTop=null;this.viewportBottom=null;this.documentHeight=u(t);this.viewportHeight=o(t);this.DOMListener=function(){n.prototype.DOMListener.apply(r,arguments)};this.eventTypes=y;i&&(this.containerWatcher=i.create(t));this.update=function(){c();l()};this.recalculateLocations=function(){this.documentHeight=0;this.update()}}return n.prototype.listenToDOM=function(){h&&(window.addEventListener?(this.item===document.body?window.addEventListener("scroll",this.DOMListener,r):this.item.addEventListener("scroll",this.DOMListener,r),window.addEventListener("resize",this.DOMListener)):(this.item===document.body?window.attachEvent("onscroll",this.DOMListener):this.item.attachEvent("onscroll",this.DOMListener),window.attachEvent("onresize",this.DOMListener)),this.destroy=function(){window.addEventListener?(this.item===document.body?(window.removeEventListener("scroll",this.DOMListener,r),this.containerWatcher.destroy()):this.item.removeEventListener("scroll",this.DOMListener,r),window.removeEventListener("resize",this.DOMListener)):(this.item===document.body?(window.detachEvent("onscroll",this.DOMListener),this.containerWatcher.destroy()):this.item.detachEvent("onscroll",this.DOMListener),window.detachEvent("onresize",this.DOMListener))})},n.prototype.destroy=function(){},n.prototype.DOMListener=function(n){this.setStateFromDOM(n)},n.prototype.setStateFromDOM=function(n){var t=s(this.item),i=o(this.item),r=u(this.item);this.setState(t,i,r,n)},n.prototype.setState=function(n,t,i,r){var f=t!==this.viewportHeight||i!==this.contentHeight,u;if(this.latestEvent=r,this.viewportTop=n,this.viewportHeight=t,this.viewportBottom=n+t,this.contentHeight=i,f)for(u=this.watchers.length;u--;)this.watchers[u].recalculateLocation();this.updateAndTriggerWatchers(r)},n.prototype.updateAndTriggerWatchers=function(n){for(var t=this.watchers.length;t--;)this.watchers[t].update();for(t=this.watchers.length;t--;)this.watchers[t].triggerCallbacks(n)},n.prototype.createCustomContainer=function(){return new n},n.prototype.createContainer=function(t){"string"==typeof t?t=document.querySelector(t):t&&t.length>0&&(t=t[0]);var i=new n(t,this);return i.setStateFromDOM(),i.listenToDOM(),i},n.prototype.create=function(n,t){"string"==typeof n?n=document.querySelector(n):n&&n.length>0&&(n=n[0]);var i=new p(this,n,t);return this.watchers.push(i),i},n.prototype.beget=function(n,t){return this.create(n,t)},n}();n.exports=a},function(n,t,i){"use strict";function f(n,t,i){function r(n,t){if(0!==n.length)for(k=n.length;k--;)g=n[k],g.callback.call(d,t,d),g.isOne&&n.splice(k,1)}var d=this,v,nt,f,a,w,b,k,g;for(this.watchItem=t,this.container=n,this.offsets=i?i===+i?{top:i,bottom:i}:{top:i.top||l.top,bottom:i.bottom||l.bottom}:l,this.callbacks={},v=0,nt=u.length;v<nt;v++)d.callbacks[u[v]]=[];this.locked=!1;this.triggerCallbacks=function(n){switch(this.isInViewport&&!f&&r(this.callbacks[o],n),this.isFullyInViewport&&!a&&r(this.callbacks[s],n),this.isAboveViewport!==w&&this.isBelowViewport!==b&&(r(this.callbacks[e],n),a||this.isFullyInViewport||(r(this.callbacks[s],n),r(this.callbacks[c],n)),f||this.isInViewport||(r(this.callbacks[o],n),r(this.callbacks[h],n))),!this.isFullyInViewport&&a&&r(this.callbacks[c],n),!this.isInViewport&&f&&r(this.callbacks[h],n),this.isInViewport!==f&&r(this.callbacks[e],n),!0){case f!==this.isInViewport:case a!==this.isFullyInViewport:case w!==this.isAboveViewport:case b!==this.isBelowViewport:r(this.callbacks[p],n)}f=this.isInViewport;a=this.isFullyInViewport;w=this.isAboveViewport;b=this.isBelowViewport};this.recalculateLocation=function(){var u,f,t,i,n,e;if(!this.locked){if(u=this.top,f=this.bottom,this.watchItem.nodeName){for(t=this.watchItem.style.display,"none"===t&&(this.watchItem.style.display=""),i=0,n=this.container;n.containerWatcher;)i+=n.containerWatcher.top-n.containerWatcher.container.viewportTop,n=n.containerWatcher.container;e=this.watchItem.getBoundingClientRect();this.top=e.top+this.container.viewportTop-i;this.bottom=e.bottom+this.container.viewportTop-i;"none"===t&&(this.watchItem.style.display=t)}else this.watchItem===+this.watchItem?this.top=this.watchItem>0?this.bottom=this.watchItem:this.bottom=this.container.documentHeight-this.watchItem:(this.top=this.watchItem.top,this.bottom=this.watchItem.bottom);this.top-=this.offsets.top;this.bottom+=this.offsets.bottom;this.height=this.bottom-this.top;void 0===u&&void 0===f||this.top===u&&this.bottom===f||r(this.callbacks[y],null)}};this.recalculateLocation();this.update();f=this.isInViewport;a=this.isFullyInViewport;w=this.isAboveViewport;b=this.isBelowViewport}var r=i(1),e=r.VISIBILITYCHANGE,o=r.ENTERVIEWPORT,s=r.FULLYENTERVIEWPORT,h=r.EXITVIEWPORT,c=r.PARTIALLYEXITVIEWPORT,y=r.LOCATIONCHANGE,p=r.STATECHANGE,u=r.eventTypes,l=r.defaultOffsets,v;f.prototype={on:function(n,t,i){switch(!0){case n===e&&!this.isInViewport&&this.isAboveViewport:case n===o&&this.isInViewport:case n===s&&this.isFullyInViewport:case n===h&&this.isAboveViewport&&!this.isInViewport:case n===c&&this.isInViewport&&this.isAboveViewport:if(t.call(this,this.container.latestEvent,this),i)return}if(!this.callbacks[n])throw new Error("Tried to add a scroll monitor listener of type "+n+". Your options are: "+u.join(", "));this.callbacks[n].push({callback:t,isOne:i||!1})},off:function(n,t){if(!this.callbacks[n])throw new Error("Tried to remove a scroll monitor listener of type "+n+". Your options are: "+u.join(", "));for(var r,i=0;r=this.callbacks[n][i];i++)if(r.callback===t){this.callbacks[n].splice(i,1);break}},one:function(n,t){this.on(n,t,!0)},recalculateSize:function(){this.height=this.watchItem.offsetHeight+this.offsets.top+this.offsets.bottom;this.bottom=this.top+this.height},update:function(){this.isAboveViewport=this.top<this.container.viewportTop;this.isBelowViewport=this.bottom>this.container.viewportBottom;this.isInViewport=this.top<this.container.viewportBottom&&this.bottom>this.container.viewportTop;this.isFullyInViewport=this.top>=this.container.viewportTop&&this.bottom<=this.container.viewportBottom||this.isAboveViewport&&this.isBelowViewport},destroy:function(){var i=this.container.watchers.indexOf(this),r=this,n,t;for(this.container.watchers.splice(i,1),n=0,t=u.length;n<t;n++)r.callbacks[u[n]].length=0},lock:function(){this.locked=!0},unlock:function(){this.locked=!1}};for(var w=function(n){return function(t,i){this.on.call(this,n,t,i)}},a=0,b=u.length;a<b;a++)v=u[a],f.prototype[v]=w(v);n.exports=f}])})},{}],5:[function(n,t,i){"use strict";function r(n,t){if(!(n instanceof t))throw new TypeError("Cannot call a class as a function");}Object.defineProperty(i,"__esModule",{value:!0});var u=function(){function n(){r(this,n);this.init()}return n.prototype.init=function(){var n=$(".gallery");n.length&&setTimeout(function(){n.slick({slidesToShow:1,slidesToScroll:1,arrows:!1,infinite:!0,autoplay:!0,autoplaySpeed:3e3,draggable:!1,mobileFirst:!0,responsive:[{breakpoint:550,settings:{slidesToShow:2}},{breakpoint:1024,settings:{slidesToShow:4}},{breakpoint:1440,settings:{slidesToShow:5}}]})},200)},n}();i.default=u},{}],6:[function(n,t,i){"use strict";function r(n,t){if(!(n instanceof t))throw new TypeError("Cannot call a class as a function");}Object.defineProperty(i,"__esModule",{value:!0});var u=function(){function n(){r(this,n);this.carousel();setTimeout(function(){$(".hero .hero__content").addClass("hero__content--animate")},400)}return n.prototype.carousel=function(){var n=$(".hero__carousel");if(n.length>0){var t=$(".hero .hero__slide-msg"),i=n.data("slide-pause")||4e3,r=n.data("slide-speed")||2e3;n.slick({accessibility:!0,arrows:!0,autoplay:!0,autoplaySpeed:i,fade:!1,rtl:n.attr("dir")==="rtl",infinite:!0,slidesToShow:1,speed:r}).on("beforeChange",function(n,i,r,u){t.length>1&&t.eq(r).hide();t.eq(u).show()})}},n}();i.default=u},{}],7:[function(n,t,i){"use strict";function e(n){return n&&n.__esModule?n:{"default":n}}function o(n,t){if(!(n instanceof t))throw new TypeError("Cannot call a class as a function");}var r,u,f;Object.defineProperty(i,"__esModule",{value:!0});r=n("object-fit-videos");u=e(r);f=function(){function n(){o(this,n);this.carousel();this.objectFitVideo=new u.default}return n.prototype.carousel=function(){var n=$(".internal-hero__carousel");n.length>0&&setTimeout(function(){n.slick({accessibility:!0,arrows:!0,autoplay:!0,autoplaySpeed:2e3,fade:!0,infinite:!0,slidesToShow:1,speed:300})},200)},n}();i.default=f},{"object-fit-videos":2}],8:[function(n,t,i){"use strict";function r(n,t){if(!(n instanceof t))throw new TypeError("Cannot call a class as a function");}Object.defineProperty(i,"__esModule",{value:!0});var u=function(){function n(){r(this,n);this.carousel()}return n.prototype.carousel=function(){var n=$(".quote-card-carousel > div");n.each(function(){var n=$(this),t=n.parents(".quote-card-carousel").find(".quote-cards__dots"),i=n.parents(".quote-card-carousel").find(".quote-card__content");i.length>1&&n.slick({arrows:!0,fade:!0,dots:!0,speed:1e3,adaptiveHeight:!0,appendDots:t,slidesToShow:1,slidesToScroll:1})})},n}();i.default=u},{}],9:[function(n,t,i){"use strict";function o(n){return n&&n.__esModule?n:{"default":n}}function s(n,t){if(!(n instanceof t))throw new TypeError("Cannot call a class as a function");}var r;Object.defineProperty(i,"__esModule",{value:!0});var u=n("../waypoint/waypoint"),f=o(u),e=n("../../scripts/functions.js");r=function(){function n(){s(this,n);this.carousel()}return n.prototype.carousel=function(){var n=$(".service-cards");n.length&&n.each(function(){var n=$(this);setTimeout(function(){var t=n.find(".service-cards__list"),i=n.find(".service-cards__pagination"),r=new f.default(n[0]);t.length&&(t.slick({accessibility:!0,appendDots:i,arrows:!1,autoplay:!1,autoplaySpeed:2e3,dots:!0,fade:!1,infinite:!0,mobileFirst:!0,slidesToShow:1,slidesToScroll:1,speed:300,responsive:[{breakpoint:1024,settings:{slidesToShow:4,slidesToScroll:4}},{breakpoint:800,settings:{slidesToShow:3,slidesToScroll:3}},{breakpoint:600,settings:{slidesToShow:2,slidesToScroll:2}}]}),e.normaliseRowHeight(n,"h6"))},200)})},n}();i.default=r},{"../../scripts/functions.js":16,"../waypoint/waypoint":15}],10:[function(n,t,i){"use strict";function e(n){return n&&n.__esModule?n:{"default":n}}function o(n,t){if(!(n instanceof t))throw new TypeError("Cannot call a class as a function");}var r,u,f;Object.defineProperty(i,"__esModule",{value:!0});r=n("../waypoint/waypoint");u=e(r);f=function(){function n(){o(this,n);this.carousel()}return n.prototype.carousel=function(){var n=$(".stat-cards");n.length&&n.each(function(n,t){setTimeout(function(){var n=$(t);$(".stat-cards__list").on("init",{$statCard:n},function(n){var t=new u.default(n.data.$statCard)});$(".stat-cards__list").slick({accessibility:!0,appendDots:n.find(".service-cards__pagination"),arrows:!0,autoplay:!0,autoplaySpeed:2e3,dots:!1,fade:!1,infinite:!0,mobileFirst:!0,slidesToShow:1,slidesToScroll:1,speed:300,responsive:[{breakpoint:1024,settings:{slidesToShow:3}},{breakpoint:700,settings:{slidesToShow:2}}]})},100)})},n}();i.default=f},{"../waypoint/waypoint":15}],11:[function(n,t,i){"use strict";function e(n){return n&&n.__esModule?n:{"default":n}}function o(n,t){if(!(n instanceof t))throw new TypeError("Cannot call a class as a function");}var r,u,f;Object.defineProperty(i,"__esModule",{value:!0});r=n("../waypoint/waypoint");u=e(r);f=function(){function n(){o(this,n);this.$carousel=$(".stat-full-width__carousel");this.$parent=$(".stat-full-width");this.init();this.bindEvents()}return n.prototype.bindEvents=function(){var n=this;$(window).resize(function(){window.matchMedia("(max-width: 700px)").matches&&n.carousel()})},n.prototype.init=function(){var t=$(".stat-full-width__numberCircle"),n=this;t.each(function(t,i){var r=$(i),f=new u.default(r[0],n.waypointTriggered.bind(n))})},n.prototype.waypointTriggered=function(n){window.matchMedia("(min-width: 700px)").matches?(this.animateNumbers($(n)),console.log("element anim")):this.carousel()},n.prototype.animateNumbers=function(n){n.each(function(){var n=$(this).find(".stat-full-width__number"),r,t,i;if(!n.data("animated")){for(r=n.data("decimal-places")||0,t="0,0",i=0;i<r;i++)i==0&&(t+="."),t+="0";n.data("animated",!0);n.prop("Counter",0).animate({Counter:n.data("value")||n.text()},{duration:4e3,easing:"swing",step:function(n){$(this).text(numeral(n).format(t))}})}})},n.prototype.carousel=function(){if(!this.$carousel.hasClass("slick-initialized")){var n=this;setTimeout(function(){n.$carousel.slick({slidesToShow:1,slidesToScroll:1,mobileFirst:!0,arrows:!0,centerMode:!0,centerPadding:"0px",dots:!1})},200)}},n}();i.default=f},{"../waypoint/waypoint":15}],12:[function(n,t,i){"use strict";function e(n){return n&&n.__esModule?n:{"default":n}}function o(n,t){if(!(n instanceof t))throw new TypeError("Cannot call a class as a function");}var r,u,f;Object.defineProperty(i,"__esModule",{value:!0});r=n("../waypoint/waypoint");u=e(r);f=function(){function n(){o(this,n);this.$carousel=$(".stat__mobileNumbers");this.init();this.bindEvents()}return n.prototype.bindEvents=function(){var n=this;$(window).resize(function(){window.matchMedia("(max-width: 768px)").matches&&n.carousel()})},n.prototype.init=function(){var n=$(".stat__numberCircle"),i=n.find(".stat__number"),t=this;n.each(function(n,i){var r=$(i),f=new u.default(r[0],t.waypointTriggered.bind(t))})},n.prototype.waypointTriggered=function(n){window.matchMedia("(min-width: 768px)").matches?this.animateNumbers($(n)):this.carousel()},n.prototype.animateNumbers=function(n){n.each(function(){var n=$(this).find(".stat__number"),r,t,i;if(!n.data("animated")){for(r=n.data("decimal-places")||0,t="0,0",i=0;i<r;i++)i==0&&(t+="."),t+="0";n.data("animated",!0);n.prop("Counter",0).animate({Counter:n.data("value")||n.text()},{duration:4e3,easing:"swing",step:function(n){$(this).text(numeral(n).format(t))}})}})},n.prototype.carousel=function(){if(this.$carousel&&!this.$carousel.hasClass("slick-initialized")){var n=this;setTimeout(function(){n.$carousel.slick({slidesToShow:1,slidesToScroll:1,mobileFirst:!0,arrows:!0,centerMode:!0,centerPadding:"0px",dots:!1})},200)}},n}();i.default=f},{"../waypoint/waypoint":15}],13:[function(n,t,i){"use strict";function f(n,t){if(!(n instanceof t))throw new TypeError("Cannot call a class as a function");}var r,u;Object.defineProperty(i,"__esModule",{value:!0});r=n("../../scripts/functions.js");u=function(){function n(){f(this,n);this.init()}return n.prototype.init=function(){var n=this;this.initCarouselForTab($(".tabbedContent .tabbedContent__tabPane.active .tabbedContent__tabPaneInner"));r.normaliseRowHeight($(".tabbedContent .tabbedContent__tabPane.active"),".relatedServices__title");r.normaliseRowHeight($(".tabbedContent .tabbedContent__tabPane.active"),".relatedServices__description");$('.tabbedContent a[data-toggle="tab"]').on("shown.bs.tab",function(t){var f=$($(t.target).attr("href")),u=f.children(".tabbedContent__tabPaneInner"),i;u.hasClass("slick-initialized")&&u.slick("unslick");i=$($(t.target).attr("href"));n.initCarouselForTab(i.children(".tabbedContent__tabPaneInner"));r.normaliseRowHeight(i,".relatedServices__title");r.normaliseRowHeight(i,".relatedServices__description")});$(window).resize(function(){setTimeout(function(){r.normaliseRowHeight($(".tabbedContent .tabbedContent__tabPane.active"),".relatedServices__title");r.normaliseRowHeight($(".tabbedContent .tabbedContent__tabPane.active"),".relatedServices__description")},1e3)})},n.prototype.initCarouselForTab=function(n){var u=n.data("promo"),t=!1,i=!0,r;u&&(t=!0,i=!1);r=3;!n.hasClass("slick-initialized")&&n.children().length>r&&n.slick({slidesToShow:3,slidesToScroll:1,arrows:i,dots:t,fade:!1,autoplay:!1,responsive:[{breakpoint:700,settings:"unslick"}]})},n}();i.default=u},{"../../scripts/functions.js":16}],14:[function(n,t,i){"use strict";function r(n){return n&&n.__esModule?n:{"default":n}}function c(n,t){if(!(n instanceof t))throw new TypeError("Cannot call a class as a function");}var u;Object.defineProperty(i,"__esModule",{value:!0});var f=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},e=n("a11y-dialog"),o=r(e),s=n("plyr"),h=r(s);u=function(){function n(){c(this,n);this.$headersContainer=$(".video-carousel__headers .slider");this.$videosContainer=$(".video-carousel__videos");this.$videoLinks=$(".video-carousel__video-container");this.$videos=$(".video-carousel__video");this.videoPlyr=null;this.$activeVideo=null;this.$dialog=$(".video-carousel__dialog");this.$dialog.find("dialog").addClass("dialog-animate");this.$dialog.length>0&&this.init()}return n.prototype.setCurrentVideo=function(n){this.$video[0].src=n},n.prototype.playVideo=function(){_this.videoPlyr.play()},n.prototype.init=function(){var t=this,n=this,i;this.allyDialog=new o.default(this.$dialog[0]);this.$videosContainer.length&&this.$videosContainer.on("click",function(i){var r=$(i.currentTarget).find(".slick-current .video-carousel__video-container");t.$activeVideo=$(r.attr("href"));t.allyDialog.show();n.videoPlyr=new h.default(t.$activeVideo);n.videoPlyr.play();t.$activeVideo.addClass("video-carousel__video--active")});this.allyDialog.on("show",function(n){$(n).find("dialog").addClass("dialog-expand")});this.allyDialog.on("hide",function(t){$(t).find("dialog").removeClass("dialog-expand");n.videoPlyr&&f(n.videoPlyr!=="undefined")?(n.videoPlyr.pause(),n.videoPlyr.destroy(),n.$activeVideo.removeClass("video-carousel__video--active")):console.log("Video not found")});this.$videosContainer.length&&this.$videosContainer.slick({slidesToShow:1,slidesToScroll:1,arrows:!1,fade:!0,asNavFor:".video-carousel__headers .slider"});i=$(window).width();this.$headersContainer.length&&this.$headersContainer.slick({asNavFor:".video-carousel__videos",dots:!1,focusOnSelect:!0,variableWidth:i>1260?!0:!1,arrows:!1,draggable:!0,infinite:!0,centerMode:!0})},n}();i.default=u},{"a11y-dialog":1,plyr:3}],15:[function(n,t,i){"use strict";function e(n){return n&&n.__esModule?n:{"default":n}}function o(n,t){if(!(n instanceof t))throw new TypeError("Cannot call a class as a function");}var r,u,f;Object.defineProperty(i,"__esModule",{value:!0});r=n("scrollmonitor");u=e(r);f=function(){function n(t,i,r){o(this,n);this.onEnter=i;this.onExit=r;this.element=t;this.register()}return n.prototype.register=function(){this.watcher=u.default.create(this.element,-50);this.watcher.enterViewport(this.enter.bind(this));this.watcher.exitViewport(this.exit.bind(this))},n.prototype.enter=function(){var n=this,t=$(this.element).attr("data-waypoint-animation"),i=$(this.element).attr("data-waypoint-items");switch(t){case"simpleFade":setTimeout(function(){$(n.element).addClass("fade-in")},200);break;case"iterateFade":$(this.element).find(i).each(function(n,t){setTimeout(function(){$(t).addClass("fade-in")},n*200)});break;case"simpleFade":default:setTimeout(function(){$(n.element).addClass("fade-in")},200)}if(this.onEnter!=null)this.onEnter(this.element)},n.prototype.exit=function(){if(this.onExit!=null)this.onExit(this.element)},n}();i.default=f},{scrollmonitor:4}],16:[function(n,t,i){"use strict";function r(n,t){var i=0;n.find(t).each(function(n,t){$(t).height("auto");var r=$(t).height();r>i&&(i=r)}).each(function(n,t){$(t).height(i)})}function u(n,t,i){var r=new Date,u;r.setTime(r.getTime()+i*864e5);u="expires="+r.toUTCString();document.cookie=n+"="+t+";"+u+";path=/"}function f(n){for(var r=n+"=",f=decodeURIComponent(document.cookie),u=f.split(";"),t,i=0;i<u.length;i++){for(t=u[i];t.charAt(0)==" ";)t=t.substring(1);if(t.indexOf(r)==0)return t.substring(r.length,t.length)}return""}function e(n,t){var i=window.location.pathname;n.length&&(i=n.val());window.dataLayer=window.dataLayer||[];window.dataLayer.push({event:"formSubmissionSuccess",formName:i,formVisible:t})}Object.defineProperty(i,"__esModule",{value:!0});i.normaliseRowHeight=r;i.setCookie=u;i.getCookie=f;i.sendFormInfoToGtm=e},{}],17:[function(n){"use strict";function t(n){return n&&n.__esModule?n:{"default":n}}var i=n("../components/hero/hero.js"),r=t(i),u=n("../components/internal-hero/internal-hero.js"),f=t(u),e=n("../components/service-cards/service-cards.js"),o=t(e),s=n("../components/stat-cards/stat-cards.js"),h=t(s),c=n("../components/stat/stat.js"),l=t(c),a=n("../components/stat-full-width/stat-full-width.js"),v=t(a),y=n("../components/tabbed-content/tabbed-content.js"),p=t(y),w=n("../components/video-carousel/video-carousel.js"),b=t(w),k=n("../components/gallery/gallery.js"),d=t(k),g=n("../components/quote-card/quote-card.js"),nt=t(g);document.addEventListener("DOMContentLoaded",function(){var n=new r.default,t=new f.default,i=new p.default,u=new l.default,e=new v.default,s=new b.default,c=new d.default,a=new nt.default,y=new o.default,w=new h.default})},{"../components/gallery/gallery.js":5,"../components/hero/hero.js":6,"../components/internal-hero/internal-hero.js":7,"../components/quote-card/quote-card.js":8,"../components/service-cards/service-cards.js":9,"../components/stat-cards/stat-cards.js":10,"../components/stat-full-width/stat-full-width.js":11,"../components/stat/stat.js":12,"../components/tabbed-content/tabbed-content.js":13,"../components/video-carousel/video-carousel.js":14}]},{},[17])