/*! * CookieConsent v2.8.4 * https://www.github.com/orestbida/cookieconsent * Author Orest Bida * Released under the MIT License */ function _defineProperties(e,t){for(var i=0;i-1&&(N.revision=t.revision),B=!0),"boolean"==typeof t.autoclear_cookies&&(N.autoclear_cookies=t.autoclear_cookies),!0===t.use_rfc_cookie&&(N.use_rfc_cookie=!0),"boolean"==typeof t.hide_from_bots&&(N.hide_from_bots=t.hide_from_bots),N.hide_from_bots&&(X=navigator&&(navigator.userAgent&&/bot|crawl|spider|slurp|teoma/i.test(navigator.userAgent)||navigator.webdriver)),N.page_scripts=!0===t.page_scripts,"browser"===t.auto_language||!0===t.auto_language?N.auto_language="browser":"document"===t.auto_language&&(N.auto_language="document"),N.auto_language,N.current_lang=ue(t.languages,t.current_lang)},ne=function(e){for(var t="accept-",i=r("c-settings"),n=r(t+"all"),s=r(t+"necessary"),o=r(t+"custom"),a=0;a0?Object.prototype.hasOwnProperty.call(t,N.current_lang)?N.current_lang:ve(t)[0]:void 0},oe=function(e){if(!0===t.force_consent&&we(te,"force--consent"),!g){g=ce("div");var i=ce("div"),n=ce("div");g.id="cm",i.id="c-inr-i",n.id="cm-ov",g.setAttribute("role","dialog"),g.setAttribute("aria-modal","true"),g.setAttribute("aria-hidden","false"),g.setAttribute("aria-labelledby","c-ttl"),g.setAttribute("aria-describedby","c-txt"),f.appendChild(g),f.appendChild(n),g.style.visibility=n.style.visibility="hidden",n.style.opacity=0}var s=t.languages[e].consent_modal.title;s&&(y||((y=ce("div")).id="c-ttl",y.setAttribute("role","heading"),y.setAttribute("aria-level","2"),i.appendChild(y)),y.innerHTML=s);var o=t.languages[e].consent_modal.description;B&&(o=V?o.replace("{{revision_message}}",""):o.replace("{{revision_message}}",t.languages[e].consent_modal.revision_message||"")),b||((b=ce("div")).id="c-txt",i.appendChild(b)),b.innerHTML=o;var a,r=t.languages[e].consent_modal.primary_btn,l=t.languages[e].consent_modal.secondary_btn;r&&(v||((v=ce("button")).id="c-p-bn",v.className="c-bn","accept_all"===r.role&&(a="all"),be(v,"click",(function(){O.hide(),O.accept(a)}))),v.innerHTML=t.languages[e].consent_modal.primary_btn.text),l&&(w||((w=ce("button")).id="c-s-bn",w.className="c-bn c_link","accept_necessary"===l.role?be(w,"click",(function(){O.hide(),O.accept([])})):be(w,"click",(function(){O.showSettings(0)}))),w.innerHTML=t.languages[e].consent_modal.secondary_btn.text);var c=t.gui_options;T||((T=ce("div")).id="c-inr",T.appendChild(i)),k||((k=ce("div")).id="c-bns",c&&c.consent_modal&&!0===c.consent_modal.swap_buttons?(l&&k.appendChild(w),r&&k.appendChild(v),k.className="swap"):(r&&k.appendChild(v),l&&k.appendChild(w)),(r||l)&&T.appendChild(k),g.appendChild(T)),F=!0},ae=function(e){if(C)(x=ce("div")).id="s-bl";else{C=ce("div");var i=ce("div"),n=ce("div"),s=ce("div");_=ce("div"),S=ce("div");var o=ce("div");E=ce("button");var l=ce("div");A=ce("div");var c=ce("div");C.id="s-cnt",i.id="c-vln",s.id="c-s-in",n.id="cs",S.id="s-ttl",_.id="s-inr",o.id="s-hdr",A.id="s-bl",E.id="s-c-bn",c.id="cs-ov",l.id="s-c-bnc",E.className="c-bn",C.setAttribute("role","dialog"),C.setAttribute("aria-modal","true"),C.setAttribute("aria-hidden","true"),C.setAttribute("aria-labelledby","s-ttl"),S.setAttribute("role","heading"),C.style.visibility=c.style.visibility="hidden",c.style.opacity=0,l.appendChild(E),be(i,"keydown",(function(e){27===(e=e||window.event).keyCode&&O.hideSettings(0)}),!0),be(E,"click",(function(){O.hideSettings(0)}))}E.setAttribute("aria-label",t.languages[e].settings_modal.close_btn_label||"Close"),r=t.languages[e].settings_modal.blocks,a=t.languages[e].settings_modal.cookie_table_headers;var u=r.length;S.innerHTML=t.languages[e].settings_modal.title;for(var d=0;d-1?(q.checked=!0,!x&&Z.push(!0)):!x&&Z.push(!1),!x&&$.push(W),m.readonly?(q.disabled=!0,we(R,"c-ro"),!x&&ee.push(!0)):!x&&ee.push(!1),we(w,"b-acc"),we(T,"b-bn"),we(v,"b-ex"),w.id=N,w.setAttribute("aria-hidden","true"),F.appendChild(q),F.appendChild(R),F.appendChild(z),T.appendChild(F),b&&function(e,t,i){be(D,"click",(function(){Te(t,"act")?(ke(t,"act"),i.setAttribute("aria-expanded","false"),e.setAttribute("aria-hidden","true")):(we(t,"act"),i.setAttribute("aria-expanded","true"),e.setAttribute("aria-hidden","false"))}),!1)}(w,v,D)}else if(h){var U=ce("div");U.className="b-tl",U.setAttribute("role","heading"),U.setAttribute("aria-level","3"),U.insertAdjacentHTML("beforeend",h),T.appendChild(U)}if(h&&v.appendChild(T),p&&w.appendChild(k),!y&&void 0!==g){for(var K=document.createDocumentFragment(),Y=0;Y-1;if(!Z[++i]&&Object.prototype.hasOwnProperty.call(c,"cookie_table")&&(e||u)){var d=c.cookie_table,h=ve(a[0])[0],p=d.length;"on_disable"===c.toggle.reload&&u&&(U=!0);for(var m=0;m-1&&g.push(n[T])}g.length>0&&(ye(g,w,s),"on_clear"===c.toggle.reload&&(U=!0))}}}}},le=function(e,t){return e.indexOf(t)},ce=function(e){var t=document.createElement(e);return"button"===e&&t.setAttribute("type",e),t},ue=function(e,t){return"browser"===N.auto_language?se(de(),e):"document"===N.auto_language?se(document.documentElement.lang,e):"string"==typeof t?N.current_lang=se(t,e):(N.current_lang,N.current_lang)},de=function(){var e=navigator.language||navigator.browserLanguage;return e.length>2&&(e=e[0]+e[1]),e.toLowerCase()};O.allowedCategory=function(e){if(H&&"opt-in"!==N.mode)t=J;else var t=JSON.parse(ge(N.cookie_name,"one",!0)||"{}").categories||[];return le(t,e)>-1},O.run=function(t){if(!document.getElementById("cc_div")){if(ie(t),X)return;j=JSON.parse(ge(N.cookie_name,"one",!0)||"{}");var a=void 0!==(s=j.consent_uuid);if((i=j.consent_date)&&(i=new Date(i)),(n=j.last_consent_update)&&(n=new Date(n)),D=void 0!==j.data?j.data:null,B&&j.revision!==N.revision&&(V=!1),F=H=!(a&&V&&i&&n&&s),function(){(m=ce("div")).id="cc--main",m.style.position="fixed",m.style.zIndex="1000000",m.innerHTML='\x3c!--[if lt IE 9 ]>
\x3c!--\x3e
\x3c!---1&&(we(e,s),("bar"!==s||"middle"!==o[0])&&le(i,o[0])>-1))for(var r=0;r-1&&we(e,a)}}(t.gui_options),ne(),N.autorun&&F&&O.show(t.delay||0),setTimeout((function(){we(m,"c--anim")}),30),setTimeout((function(){var e,t;e=!1,t=!1,be(document,"keydown",(function(i){"Tab"===(i=i||window.event).key&&(o&&(i.shiftKey?document.activeElement===o[0]&&(o[1].focus(),i.preventDefault()):document.activeElement===o[1]&&(o[0].focus(),i.preventDefault()),t||z||(t=!0,!e&&i.preventDefault(),i.shiftKey?o[3]?o[2]?o[2].focus():o[0].focus():o[1].focus():o[3]?o[3].focus():o[0].focus())),!t&&(e=!0))})),document.contains&&be(m,"click",(function(e){e=e||window.event,R?_.contains(e.target)?z=!0:(O.hideSettings(0),z=!1):q&&g.contains(e.target)&&(z=!0)}),!0)}),100),H)"opt-out"===N.mode&&(N.mode,he(J));else{var r="boolean"==typeof j.rfc_cookie;(!r||r&&j.rfc_cookie!==N.use_rfc_cookie)&&(j.rfc_cookie=N.use_rfc_cookie,fe(N.cookie_name,JSON.stringify(j))),d=me(pe()),he(),"function"==typeof l&&l(j)}}},O.showSettings=function(e){setTimeout((function(){we(te,"show--settings"),C.setAttribute("aria-hidden","false"),R=!0,setTimeout((function(){q?p=document.activeElement:h=document.activeElement,0!==Q.length&&(Q[3]?Q[3].focus():Q[0].focus(),o=Q)}),200)}),e>0?e:0)};var he=function(e){if(N.page_scripts){var t=document.querySelectorAll("script["+N.script_selector+"]"),i=e||j.categories||[],n=function(e,t){if(t-1){s.type="text/javascript",s.removeAttribute(N.script_selector);var a=s.getAttribute("data-src");a&&s.removeAttribute("data-src");var r=ce("script");if(r.textContent=s.innerHTML,function(e,t){for(var i=t.attributes,n=i.length,s=0;s0)for(var o=0;o0?e:t?30:0)},O.hide=function(){F&&(ke(te,"show--consent"),g.setAttribute("aria-hidden","true"),q=!1,setTimeout((function(){h.focus(),o=null}),200))},O.hideSettings=function(){ke(te,"show--settings"),R=!1,C.setAttribute("aria-hidden","true"),setTimeout((function(){q?(p&&p.focus(),o=G):(h&&h.focus(),o=null),z=!1}),200)},O.accept=function(e,t){var o=e||void 0,a=t||[],r=[];if(o)if("object"==typeof o&&"number"==typeof o.length)for(var h=0;h=1)for(h=0;h0)for(var o=0;o0&&re(),i||(i=new Date),s||(s=([1e7]+-1e3+-4e3+-8e3+-1e11).replace(/[018]/g,(function(e){try{return(e^(window.crypto||window.msCrypto).getRandomValues(new Uint8Array(1))[0]&15>>e/4).toString(16)}catch(e){return""}}))),j={categories:e,revision:N.revision,data:D,rfc_cookie:N.use_rfc_cookie,consent_date:i.toISOString(),consent_uuid:s},(H||W.length>0)&&(V=!0,n=n?new Date:i,j.last_consent_update=n.toISOString(),d=me(pe()),fe(N.cookie_name,JSON.stringify(j)),he()),H&&(N.autoclear_cookies&&re(!0),"function"==typeof u&&u(O.getUserPreferences(),j),"function"==typeof l&&l(j),H=!1,"opt-in"===N.mode)||("function"==typeof c&&W.length>0&&c(j,W),U&&window.location.reload())}(r)},O.eraseCookies=function(e,t,i){var n=[],s=i?[i,"."+i]:[N.cookie_domain,"."+N.cookie_domain];if("object"==typeof e&&e.length>0)for(var o=0;o-1&&(s+=" Domain="+N.cookie_domain+";"),"https:"===window.location.protocol&&(s+=" Secure;"),document.cookie=s},ge=function(e,t,i){var n;if("one"===t){if((n=(n=document.cookie.match("(^|;)\\s*"+e+"\\s*=\\s*([^;]+)"))?i?n.pop():e:"")&&e===N.cookie_name){try{n=JSON.parse(n)}catch(e){try{n=JSON.parse(decodeURIComponent(n))}catch(e){n={}}}n=JSON.stringify(n)}}else if("all"===t){var s=document.cookie.split(/;\s*/);n=[];for(var o=0;o-1?"; domain="+i[o]:"")+"; Expires=Thu, 01 Jan 1970 00:00:01 GMT;";e[s]}};O.validCookie=function(e){return""!==ge(e,"one",!0)};var be=function(e,t,i,n){e.addEventListener(t,i,!0===n&&{passive:!0})},ve=function(e){if("object"==typeof e)return Object.keys(e)},we=function(e,t){e.classList.add(t)},ke=function(e,t){e.classList.remove(t)},Te=function(e,t){return e.classList.contains(t)};return O})}(),function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e="undefined"!=typeof globalThis?globalThis:e||self).Splide=t()}(this,(function(){"use strict";var e="(prefers-reduced-motion: reduce)",t={CREATED:1,MOUNTED:2,IDLE:3,MOVING:4,SCROLLING:5,DRAGGING:6,DESTROYED:7};function i(e){e.length=0}function n(e,t,i){return Array.prototype.slice.call(e,t,i)}function s(e){return e.bind.apply(e,[null].concat(n(arguments,1)))}var o=setTimeout,a=function(){};function r(e){return requestAnimationFrame(e)}function l(e,t){return typeof t===e}function c(e){return!m(e)&&l("object",e)}var u=Array.isArray,d=s(l,"function"),h=s(l,"string"),p=s(l,"undefined");function m(e){return null===e}function f(e){return e instanceof HTMLElement}function g(e){return u(e)?e:[e]}function y(e,t){g(e).forEach(t)}function b(e,t){return e.indexOf(t)>-1}function v(e,t){return e.push.apply(e,g(t)),e}function w(e,t,i){e&&y(t,(function(t){t&&e.classList[i?"add":"remove"](t)}))}function k(e,t){w(e,h(t)?t.split(" "):t,!0)}function T(e,t){y(t,e.appendChild.bind(e))}function C(e,t){y(e,(function(e){var i=(t||e).parentNode;i&&i.insertBefore(e,t)}))}function _(e,t){return f(e)&&(e.msMatchesSelector||e.matches).call(e,t)}function S(e,t){var i=e?n(e.children):[];return t?i.filter((function(e){return _(e,t)})):i}function E(e,t){return t?S(e,t)[0]:e.firstElementChild}var A=Object.keys;function x(e,t,i){if(e){var n=A(e);n=i?n.reverse():n;for(var s=0;s0)-+(e<0)}function le(e,t){return y(t,(function(t){e=e.replace("%s",""+t)})),e}function ce(e){return e<10?"0"+e:""+e}var ue={};function de(){var e=[];function t(e,t,i){y(e,(function(e){e&&y(t,(function(t){t.split(" ").forEach((function(t){var n=t.split(".");i(e,n[0],n[1])}))}))}))}return{bind:function(i,n,s,o){t(i,n,(function(t,i,n){var a="addEventListener"in t,r=a?t.removeEventListener.bind(t,i,s,o):t.removeListener.bind(t,s);a?t.addEventListener(i,s,o):t.addListener(s),e.push([t,i,n,s,r])}))},unbind:function(i,n,s){t(i,n,(function(t,i,n){e=e.filter((function(e){return!!(e[0]!==t||e[1]!==i||e[2]!==n||s&&e[3]!==s)||(e[4](),!1)}))}))},dispatch:function(e,t,i){var n;return"function"==typeof CustomEvent?n=new CustomEvent(t,{bubbles:true,detail:i}):(n=document.createEvent("CustomEvent")).initCustomEvent(t,true,!1,i),e.dispatchEvent(n),n},destroy:function(){e.forEach((function(e){e[4]()})),i(e)}}}var he="mounted",pe="ready",me="move",fe="moved",ge="shifted",ye="click",be="active",ve="inactive",we="visible",ke="hidden",Te="slide:keydown",Ce="refresh",_e="updated",Se="resize",Ee="resized",Ae="scroll",xe="scrolled",Pe="destroy",Me="arrows:mounted",Ie="navigation:mounted",Le="autoplay:play",Ne="autoplay:pause",Oe="lazyload:loaded";function je(e){var t=e?e.event.bus:document.createDocumentFragment(),i=de();return e&&e.event.on(Pe,i.destroy),P(i,{bus:t,on:function(e,n){i.bind(t,g(e).join(" "),(function(e){n.apply(n,u(e.detail)?e.detail:[])}))},off:s(i.unbind,t),emit:function(e){i.dispatch(t,e,n(arguments,1))}})}function De(e,t,i,n){var s,o,a=Date.now,l=0,c=!0,u=0;function d(){if(!c){if(l=e?Z((a()-s)/e,1):1,i&&i(l),l>=1&&(t(),s=a(),n&&++u>=n))return h();r(d)}}function h(){c=!0}function p(){o&&cancelAnimationFrame(o),l=0,o=0,c=!0}return{start:function(t){!t&&p(),s=a()-(t?l*e:0),c=!1,r(d)},rewind:function(){s=a(),l=0,i&&i(l)},pause:h,cancel:p,set:function(t){e=t},isPaused:function(){return c}}}var He="ArrowLeft",Fe="ArrowRight",$e="ArrowUp",qe="ArrowDown",Re="ttb",ze={width:["height"],left:["top","right"],right:["bottom","left"],x:["y"],X:["Y"],Y:["X"],ArrowLeft:[$e,Fe],ArrowRight:[qe,He]};var Be="role",Ve="tabindex",We="aria-controls",Ue="aria-current",Ke="aria-selected",Ye="aria-label",Je="aria-labelledby",Xe="aria-hidden",Ge="aria-orientation",Qe="aria-roledescription",Ze="aria-live",et="aria-busy",tt="aria-atomic",it=[Be,Ve,"disabled",We,Ue,Ye,Je,Xe,Ge,Qe],nt=X,st="splide__track",ot="splide__list",at="splide__slide",rt=at+"--clone",lt="splide__arrows",ct="splide__arrow",ut=ct+"--prev",dt=ct+"--next",ht="splide__pagination",pt=ht+"__page",mt="splide__progress__bar",ft="splide__toggle",gt="is-active",yt="is-prev",bt="is-next",vt="is-visible",wt="is-loading",kt="is-focus-in",Tt=[gt,vt,yt,bt,wt,kt],Ct={slide:at,clone:rt,arrows:lt,arrow:ct,prev:ut,next:dt,pagination:ht,page:pt,spinner:"splide__spinner"};var _t="touchstart mousedown",St="touchmove mousemove",Et="touchend touchcancel mouseup click";var At="slide",xt="loop",Pt="fade";function Mt(e,t,i,n){var o,a=je(e),r=a.on,l=a.emit,c=a.bind,u=e.Components,d=e.root,h=e.options,p=h.isNavigation,m=h.updateOnMove,f=h.i18n,g=h.pagination,y=h.slideFocus,b=u.Direction.resolve,v=F(n,"style"),k=F(n,Ye),T=i>-1,C=E(n,".splide__slide__container"),_=U(n,h.focusableNodes||"");function S(){var s=e.splides.map((function(e){var i=e.splide.Components.Slides.getAt(t);return i?i.slide.id:""})).join(" ");N(n,Ye,le(f.slideX,(T?i:t)+1)),N(n,We,s),N(n,Be,y?"button":""),y&&L(n,Qe)}function A(){o||x()}function x(){if(!o){var i=e.index;(s=P())!==q(n,gt)&&(w(n,gt,s),N(n,Ue,p&&s||""),l(s?be:ve,M)),function(){var t=function(){if(e.is(Pt))return P();var t=R(u.Elements.track),i=R(n),s=b("left",!0),o=b("right",!0);return te(t[s])<=ie(i[s])&&te(i[o])<=ie(t[o])}(),i=!t&&(!P()||T);e.state.is([4,5])||N(n,Xe,i||"");N(_,Ve,i?-1:""),y&&N(n,Ve,i?-1:0);t!==q(n,vt)&&(w(n,vt,t),l(t?we:ke,M));if(!t&&document.activeElement===n){var s=u.Slides.getAt(e.index);s&&H(s.slide)}}(),w(n,yt,t===i-1),w(n,bt,t===i+1)}var s}function P(){var n=e.index;return n===t||h.cloneStatus&&n===i}var M={index:t,slideIndex:i,slide:n,container:C,isClone:T,mount:function(){T||(n.id=d.id+"-slide"+ce(t+1),N(n,Be,g?"tabpanel":"group"),N(n,Qe,f.slide),N(n,Ye,k||le(f.slideLabel,[t+1,e.length]))),c(n,"click",s(l,ye,M)),c(n,"keydown",s(l,Te,M)),r([fe,ge,xe],x),r(Ie,S),m&&r(me,A)},destroy:function(){o=!0,a.destroy(),K(n,Tt),L(n,it),N(n,"style",v),N(n,Ye,k||"")},update:x,style:function(e,t,i){j(i&&C||n,e,t)},isWithin:function(i,n){var s=ne(i-t);return T||!h.rewind&&!e.is(xt)||(s=Z(s,e.length-s)),s<=n}};return M}var It={passive:!1,capture:!0};var Lt={Spacebar:" ",Right:Fe,Left:He,Up:$e,Down:qe};function Nt(e){return e=h(e)?e:e.key,Lt[e]||e}var Ot="keydown";var jt="data-splide-lazy",Dt="data-splide-lazy-srcset";var Ht=[" ","Enter"];var Ft=Object.freeze({__proto__:null,Media:function(t,i,n){var s=t.state,o=n.breakpoints||{},a=n.reducedMotion||{},r=de(),l=[];function c(e){e&&r.destroy()}function u(e,t){var i=matchMedia(t);r.bind(i,"change",d),l.push([e,i])}function d(){var e=s.is(7),i=n.direction,o=l.reduce((function(e,t){return M(e,t[1].matches?t[0]:{})}),{});I(n),h(o),n.destroy?t.destroy("completely"===n.destroy):e?(c(!0),t.mount()):i!==n.direction&&t.refresh()}function h(e,i){M(n,e),i&&M(Object.getPrototypeOf(n),e),s.is(1)||t.emit(_e,n)}return{setup:function(){var t="min"===n.mediaQuery;A(o).sort((function(e,i){return t?+e-+i:+i-+e})).forEach((function(e){u(o[e],"("+(t?"min":"max")+"-width:"+e+"px)")})),u(a,e),d()},destroy:c,reduce:function(t){matchMedia(e).matches&&(t?M(n,a):I(n,A(a)))},set:h}},Direction:function(e,t,i){return{resolve:function(e,t,n){var s="rtl"!==(n=n||i.direction)||t?n===Re?0:-1:1;return ze[e]&&ze[e][s]||e.replace(/width|left|right/i,(function(e,t){var i=ze[e.toLowerCase()][s]||e;return t>0?i.charAt(0).toUpperCase()+i.slice(1):i}))},orient:function(e){return e*("rtl"===i.direction?1:-1)}}},Elements:function(e,t,n){var s,o,a,r=je(e),l=r.on,c=r.bind,u=e.root,h=n.i18n,p={},m=[],f=[],g=[];function y(){s=C("."+st),o=E(s,"."+ot),Q(s&&o,"A track/list element is missing."),v(m,S(o,".splide__slide:not(."+rt+")")),x({arrows:lt,pagination:ht,prev:ut,next:dt,bar:mt,toggle:ft},(function(e,t){p[t]=C("."+e)})),P(p,{root:u,track:s,list:o,slides:m}),function(){var e=u.id||(i=X,""+i+ce(ue[i]=(ue[i]||0)+1)),t=n.role;var i;u.id=e,s.id=s.id||e+"-track",o.id=o.id||e+"-list",!F(u,Be)&&"SECTION"!==u.tagName&&t&&N(u,Be,t);N(u,Qe,h.carousel),N(o,Be,"presentation")}(),T()}function b(e){var t=it.concat("style");i(m),K(u,f),K(s,g),L([s,o],t),L(u,e?t:["style",Qe])}function T(){K(u,f),K(s,g),f=A(nt),g=A(st),k(u,f),k(s,g),N(u,Ye,n.label),N(u,Je,n.labelledby)}function C(e){var t=W(u,e);return t&&function(e,t){if(d(e.closest))return e.closest(t);for(var i=e;i&&1===i.nodeType&&!_(i,t);)i=i.parentElement;return i}(t,".splide")===u?t:void 0}function A(e){return[e+"--"+n.type,e+"--"+n.direction,n.drag&&e+"--draggable",n.isNavigation&&e+"--nav",e===nt&>]}return P(p,{setup:y,mount:function(){l(Ce,b),l(Ce,y),l(_e,T),c(document,"touchstart mousedown keydown",(function(e){a="keydown"===e.type}),{capture:!0}),c(u,"focusin",(function(){w(u,kt,!!a)}))},destroy:b})},Slides:function(e,t,n){var o=je(e),a=o.on,r=o.emit,l=o.bind,c=t.Elements,u=c.slides,p=c.list,m=[];function v(){u.forEach((function(e,t){S(e,t,-1)}))}function w(){A((function(e){e.destroy()})),i(m)}function S(t,i,n){var s=Mt(e,i,n,t);s.mount(),m.push(s)}function E(e){return e?x((function(e){return!e.isClone})):m}function A(e,t){E(t).forEach(e)}function x(e){return m.filter(d(e)?e:function(t){return h(e)?_(t.slide,e):b(g(e),t.index)})}return{mount:function(){v(),a(Ce,w),a(Ce,v),a([he,Ce],(function(){m.sort((function(e,t){return e.index-t.index}))}))},destroy:w,update:function(){A((function(e){e.update()}))},register:S,get:E,getIn:function(e){var i=t.Controller,s=i.toIndex(e),o=i.hasFocus()?1:n.perPage;return x((function(e){return oe(e.index,s,s+o-1)}))},getAt:function(e){return x(e)[0]},add:function(e,t){y(e,(function(e){if(h(e)&&(e=B(e)),f(e)){var i=u[t];i?C(e,i):T(p,e),k(e,n.classes.slide),o=e,a=s(r,Se),c=U(o,"img"),(d=c.length)?c.forEach((function(e){l(e,"load error",(function(){--d||a()}))})):a()}var o,a,c,d})),r(Ce)},remove:function(e){z(x(e).map((function(e){return e.slide}))),r(Ce)},forEach:A,filter:x,style:function(e,t,i){A((function(n){n.style(e,t,i)}))},getLength:function(e){return e?u.length:m.length},isEnough:function(){return m.length>n.perPage}}},Layout:function(e,t,i){var n,o,a=je(e),r=a.on,l=a.bind,u=a.emit,d=t.Slides,h=t.Direction.resolve,p=t.Elements,m=p.root,f=p.track,g=p.list,y=d.getAt,b=d.style;function v(){o=null,n=i.direction===Re,j(m,"maxWidth",J(i.width)),j(f,h("paddingLeft"),k(!1)),j(f,h("paddingRight"),k(!0)),w()}function w(){var e=R(m);o&&o.width===e.width&&o.height===e.height||(j(f,"height",function(){var e="";n&&(Q(e=T(),"height or heightRatio is missing."),e="calc("+e+" - "+k(!1)+" - "+k(!0)+")");return e}()),b(h("marginRight"),J(i.gap)),b("width",i.autoWidth?null:J(i.fixedWidth)||(n?"":C())),b("height",J(i.fixedHeight)||(n?i.autoHeight?null:C():T()),!0),o=e,u(Ee))}function k(e){var t=i.padding,n=h(e?"right":"left");return t&&J(t[n]||(c(t)?0:t))||"0px"}function T(){return J(i.height||R(g).width*i.heightRatio)}function C(){var e=J(i.gap);return"calc((100%"+(e&&" + "+e)+")/"+(i.perPage||1)+(e&&" - "+e)+")"}function _(e,t){var i=y(e);if(i){var n=R(i.slide)[h("right")],s=R(g)[h("left")];return ne(n-s)+(t?0:S())}return 0}function S(){var e=y(0);return e&&parseFloat(j(e.slide,h("marginRight")))||0}return{mount:function(){var e,t,i;v(),l(window,"resize load",(e=s(u,Se),function(){i||(i=De(t||0,(function(){e(),i=null}),null,1)).start()})),r([_e,Ce],v),r(Se,w)},listSize:function(){return R(g)[h("width")]},slideSize:function(e,t){var i=y(e||0);return i?R(i.slide)[h("width")]+(t?0:S()):0},sliderSize:function(){return _(e.length-1,!0)-_(-1,!0)},totalSize:_,getPadding:function(e){return parseFloat(j(f,h("padding"+(e?"Right":"Left"))))||0}}},Clones:function(e,t,n){var s,o=je(e),a=o.on,r=o.emit,l=t.Elements,c=t.Slides,u=t.Direction.resolve,d=[];function h(){(s=f())&&(!function(t){var i=c.get().slice(),s=i.length;if(s){ for(;i.lengtht.Controller.getEnd();(n<0||s)&&(i=_(i,s))}return i}(i);j(v,"transform","translate"+g("X")+"("+s+"px)"),i!==s&&a(ge)}}function _(e,t){var i=e-P(t),n=m();return e-=y(n*(ie(ne(i)/n)||1))*(t?1:-1)}function S(){C(x()),n.cancel()}function E(e){for(var i=t.Slides.get(),n=0,s=1/0,o=0;oi,l=y(_(x(),o)),o?l>=0:l<=v[g("scrollWidth")]-R(w)[g("width")])&&(S(),C(_(x(),e>i),!0)),r(4),a(me,t,i,e),n.start(t,(function(){r(3),a(fe,t,i,e),s&&s()}))},jump:T,translate:C,shift:_,cancel:S,toIndex:E,toPosition:A,getPosition:x,getLimit:P,exceededLimit:function(e,t){t=p(t)?x():t;var i=!0!==e&&y(t)y(P(!0));return i||n},reposition:k}},Controller:function(e,t,i){var n,o,a,r=je(e).on,l=t.Move,c=l.getPosition,u=l.getLimit,d=l.toPosition,m=t.Slides,f=m.isEnough,g=m.getLength,y=e.is(xt),b=e.is(At),v=s(_,!1),w=s(_,!0),k=i.start||0,T=k;function C(){n=g(!0),o=i.perMove,a=i.perPage;var e=ae(k,0,n-1);e!==k&&(k=e,l.reposition())}function _(e,t){var i=o||(I()?1:a),n=S(k+i*(e?-1:1),k,!(o||I()));return-1===n&&b&&!se(c(),u(!e),1)?e?0:A():t?n:E(n)}function S(t,s,r){if(f()){var l=A(),u=function(t){if(b&&"move"===i.trimSpace&&t!==k)for(var n=c();n===d(t,!0)&&oe(t,0,e.length-1,!i.rewind);)tl?t=o||!oe(0,t,s,!0)&&!oe(l,s,t,!0)?y?r?t<0?-(n%a||a):n:t:i.rewind?t<0?l:0:-1:x(P(t)):r&&t!==s&&(t=x(P(s)+(t=A()?n-1:e)/a)}function M(e){e!==k&&(T=k,k=e)}function I(){return!p(i.focus)||i.isNavigation}function L(){return e.state.is([4,5])&&!!i.waitForTransition}return{mount:function(){C(),r([_e,Ce],C)},go:function(e,t,i){if(!L()){var n=function(e){var t=k;if(h(e)){var i=e.match(/([+\-<>])(\d+)?/)||[],n=i[1],s=i[2];"+"===n||"-"===n?t=S(k+ +(""+n+(+s||1)),k):">"===n?t=s?x(+s):v(!0):"<"===n&&(t=w(!0))}else t=y?e:ae(e,0,A());return t}(e),s=E(n);s>-1&&(t||s!==k)&&(M(s),l.move(n,s,T,i))}},scroll:function(e,i,n,s){t.Scroll.scroll(e,i,n,(function(){M(E(l.toIndex(c()))),s&&s()}))},getNext:v,getPrev:w,getAdjacent:_,getEnd:A,setIndex:M,getIndex:function(e){return e?T:k},toIndex:x,toPage:P,toDest:function(e){var t=l.toIndex(e);return b?ae(t,0,A()):t},hasFocus:I,isBusy:L}},Arrows:function(e,t,i){var n,o,a=je(e),r=a.on,l=a.bind,c=a.emit,u=i.classes,d=i.i18n,h=t.Elements,p=t.Controller,m=h.arrows,f=h.track,g=m,y=h.prev,b=h.next,v={};function w(){!function(){var e=i.arrows;!e||y&&b||(g=m||O("div",u.arrows),y=A(!0),b=A(!1),n=!0,T(g,[y,b]),!m&&C(g,f));y&&b&&(P(v,{prev:y,next:b}),D(g,e?"":"none"),k(g,o=lt+"--"+i.direction),e&&(r([fe,Ce,xe],x),l(b,"click",s(E,">")),l(y,"click",s(E,"<")),x(),N([y,b],We,f.id),c(Me,y,b)))}(),r(_e,_)}function _(){S(),w()}function S(){a.destroy(),K(g,o),n?(z(m?[y,b]:g),y=b=null):L([y,b],it)}function E(e){p.go(e,!0)}function A(e){return B('',tClose:"Close (Esc)",tLoading:"Loading...",autoFocusLast:!0}},e.fn.magnificPopup=function(i){_();var n=e(this);if("string"==typeof i)if("open"===i){var s,o=b?n.data("magnificPopup"):n[0].magnificPopup,a=parseInt(arguments[1],10)||0;o.items?s=o.items[a]:(s=n,o.delegate&&(s=s.find(o.delegate)),s=s.eq(a)),t._openClick({mfpEl:s},n,o)}else t.isOpen&&t[i].apply(t,Array.prototype.slice.call(arguments,1));else i=e.extend(!0,{},i),b?n.data("magnificPopup",i):n[0].magnificPopup=i,t.addGroup(n,i);return n};var S,E,A,x="inline",P=function(){A&&(E.after(A.addClass(S)).detach(),A=null)};e.magnificPopup.registerModule(x,{options:{hiddenClass:"hide",markup:"",tNotFound:"Content not found"},proto:{initInline:function(){t.types.push(x),w(r+"."+x,(function(){P()}))},getInline:function(i,n){if(P(),i.src){var s=t.st.inline,o=e(i.src);if(o.length){var a=o[0].parentNode;a&&a.tagName&&(E||(S=s.hiddenClass,E=k(S),S="mfp-"+S),A=o.after(E).detach().removeClass(S)),t.updateStatus("ready")}else t.updateStatus("error",s.tNotFound),o=e("
");return i.inlineElement=o,o}return t.updateStatus("ready"),t._parseMarkup(n,{},i),n}}});var M,I="ajax",L=function(){M&&e(document.body).removeClass(M)},N=function(){L(),t.req&&t.req.abort()};e.magnificPopup.registerModule(I,{options:{settings:null,cursor:"mfp-ajax-cur",tError:'The content could not be loaded.'},proto:{initAjax:function(){t.types.push(I),M=t.st.ajax.cursor,w(r+"."+I,N),w("BeforeChange."+I,N)},getAjax:function(i){M&&e(document.body).addClass(M),t.updateStatus("loading");var n=e.extend({url:i.src,success:function(n,s,o){var a={data:n,xhr:o};T("ParseAjax",a),t.appendContent(e(a.data),I),i.finished=!0,L(),t._setFocus(),setTimeout((function(){t.wrap.addClass(m)}),16),t.updateStatus("ready"),T("AjaxContentAdded")},error:function(){L(),i.finished=i.loadError=!0,t.updateStatus("error",t.st.ajax.tError.replace("%url%",i.src))}},t.st.ajax.settings);return t.req=e.ajax(n),""}}});var O,j=function(i){if(i.data&&void 0!==i.data.title)return i.data.title;var n=t.st.image.titleSrc;if(n){if(e.isFunction(n))return n.call(t,i);if(i.el)return i.el.attr(n)||""}return""};e.magnificPopup.registerModule("image",{options:{markup:'
',cursor:"mfp-zoom-out-cur",titleSrc:"title",verticalFit:!0,tError:'The image could not be loaded.'},proto:{initImage:function(){var i=t.st.image,n=".image";t.types.push("image"),w(u+n,(function(){"image"===t.currItem.type&&i.cursor&&e(document.body).addClass(i.cursor)})),w(r+n,(function(){i.cursor&&e(document.body).removeClass(i.cursor),v.off("resize"+p)})),w("Resize"+n,t.resizeImage),t.isLowIE&&w("AfterChange",t.resizeImage)},resizeImage:function(){var e=t.currItem;if(e&&e.img&&t.st.image.verticalFit){var i=0;t.isLowIE&&(i=parseInt(e.img.css("padding-top"),10)+parseInt(e.img.css("padding-bottom"),10)),e.img.css("max-height",t.wH-i)}},_onImageHasSize:function(e){e.img&&(e.hasSize=!0,O&&clearInterval(O),e.isCheckingImgSize=!1,T("ImageHasSize",e),e.imgHidden&&(t.content&&t.content.removeClass("mfp-loading"),e.imgHidden=!1))},findImageSize:function(e){var i=0,n=e.img[0],s=function(o){O&&clearInterval(O),O=setInterval((function(){return n.naturalWidth>0?void t._onImageHasSize(e):(i>200&&clearInterval(O),void(3===++i?s(10):40===i?s(50):100===i&&s(500)))}),o)};s(1)},getImage:function(i,n){var s=0,o=function(){i&&(i.img[0].complete?(i.img.off(".mfploader"),i===t.currItem&&(t._onImageHasSize(i),t.updateStatus("ready")),i.hasSize=!0,i.loaded=!0,T("ImageLoadComplete")):200>++s?setTimeout(o,100):a())},a=function(){i&&(i.img.off(".mfploader"),i===t.currItem&&(t._onImageHasSize(i),t.updateStatus("error",r.tError.replace("%url%",i.src))),i.hasSize=!0,i.loaded=!0,i.loadError=!0)},r=t.st.image,l=n.find(".mfp-img");if(l.length){var c=document.createElement("img");c.className="mfp-img",i.el&&i.el.find("img").length&&(c.alt=i.el.find("img").attr("alt")),i.img=e(c).on("load.mfploader",o).on("error.mfploader",a),c.src=i.src,l.is("img")&&(i.img=i.img.clone()),(c=i.img[0]).naturalWidth>0?i.hasSize=!0:c.width||(i.hasSize=!1)}return t._parseMarkup(n,{title:j(i),img_replaceWith:i.img},i),t.resizeImage(),i.hasSize?(O&&clearInterval(O),i.loadError?(n.addClass("mfp-loading"),t.updateStatus("error",r.tError.replace("%url%",i.src))):(n.removeClass("mfp-loading"),t.updateStatus("ready")),n):(t.updateStatus("loading"),i.loading=!0,i.hasSize||(i.imgHidden=!0,n.addClass("mfp-loading"),t.findImageSize(i)),n)}}});var D;e.magnificPopup.registerModule("zoom",{options:{enabled:!1,easing:"ease-in-out",duration:300,opener:function(e){return e.is("img")?e:e.find("img")}},proto:{initZoom:function(){var e,i=t.st.zoom,n=".zoom";if(i.enabled&&t.supportsTransition){var s,o,a=i.duration,c=function(e){var t=e.clone().removeAttr("style").removeAttr("class").addClass("mfp-animated-image"),n="all "+i.duration/1e3+"s "+i.easing,s={position:"fixed",zIndex:9999,left:0,top:0,"-webkit-backface-visibility":"hidden"},o="transition";return s["-webkit-"+o]=s["-moz-"+o]=s["-o-"+o]=s[o]=n,t.css(s),t},u=function(){t.content.css("visibility","visible")};w("BuildControls"+n,(function(){if(t._allowZoom()){if(clearTimeout(s),t.content.css("visibility","hidden"),!(e=t._getItemToZoom()))return void u();(o=c(e)).css(t._getOffset()),t.wrap.append(o),s=setTimeout((function(){o.css(t._getOffset(!0)),s=setTimeout((function(){u(),setTimeout((function(){o.remove(),e=o=null,T("ZoomAnimationEnded")}),16)}),a)}),16)}})),w(l+n,(function(){if(t._allowZoom()){if(clearTimeout(s),t.st.removalDelay=a,!e){if(!(e=t._getItemToZoom()))return;o=c(e)}o.css(t._getOffset(!0)),t.wrap.append(o),t.content.css("visibility","hidden"),setTimeout((function(){o.css(t._getOffset())}),16)}})),w(r+n,(function(){t._allowZoom()&&(u(),o&&o.remove(),e=null)}))}},_allowZoom:function(){return"image"===t.currItem.type},_getItemToZoom:function(){return!!t.currItem.hasSize&&t.currItem.img},_getOffset:function(i){var n,s=(n=i?t.currItem.img:t.st.zoom.opener(t.currItem.el||t.currItem)).offset(),o=parseInt(n.css("padding-top"),10),a=parseInt(n.css("padding-bottom"),10);s.top-=e(window).scrollTop()-o;var r={width:n.width(),height:(b?n.innerHeight():n[0].offsetHeight)-a-o};return void 0===D&&(D=void 0!==document.createElement("p").style.MozTransform),D?r["-moz-transform"]=r.transform="translate("+s.left+"px,"+s.top+"px)":(r.left=s.left,r.top=s.top),r}}});var H="iframe",F=function(e){if(t.currTemplate[H]){var i=t.currTemplate[H].find("iframe");i.length&&(e||(i[0].src="//about:blank"),t.isIE8&&i.css("display",e?"block":"none"))}};e.magnificPopup.registerModule(H,{options:{markup:'
',srcAction:"iframe_src",patterns:{youtube:{index:"youtube.com",id:"v=",src:"//www.youtube.com/embed/%id%?autoplay=1"},vimeo:{index:"vimeo.com/",id:"/",src:"//player.vimeo.com/video/%id%?autoplay=1"},gmaps:{index:"//maps.google.",src:"%id%&output=embed"}}},proto:{initIframe:function(){t.types.push(H),w("BeforeChange",(function(e,t,i){t!==i&&(t===H?F():i===H&&F(!0))})),w(r+"."+H,(function(){F()}))},getIframe:function(i,n){var s=i.src,o=t.st.iframe;e.each(o.patterns,(function(){return s.indexOf(this.index)>-1?(this.id&&(s="string"==typeof this.id?s.substr(s.lastIndexOf(this.id)+this.id.length,s.length):this.id.call(this,s)),s=this.src.replace("%id%",s),!1):void 0}));var a={};return o.srcAction&&(a[o.srcAction]=s),t._parseMarkup(n,a,i),t.updateStatus("ready"),n}}});var q=function(e){var i=t.items.length;return e>i-1?e-i:0>e?i+e:e},R=function(e,t,i){return e.replace(/%curr%/gi,t+1).replace(/%total%/gi,i)};e.magnificPopup.registerModule("gallery",{options:{enabled:!1,arrowMarkup:'',preload:[0,2],navigateByImgClick:!0,arrows:!0,tPrev:"Previous (Left arrow key)",tNext:"Next (Right arrow key)",tCounter:"%curr% of %total%"},proto:{initGallery:function(){var i=t.st.gallery,s=".mfp-gallery";return t.direction=!0,!(!i||!i.enabled)&&(o+=" mfp-gallery",w(u+s,(function(){i.navigateByImgClick&&t.wrap.on("click"+s,".mfp-img",(function(){return t.items.length>1?(t.next(),!1):void 0})),n.on("keydown"+s,(function(e){37===e.keyCode?t.prev():39===e.keyCode&&t.next()}))})),w("UpdateStatus"+s,(function(e,i){i.text&&(i.text=R(i.text,t.currItem.index,t.items.length))})),w(c+s,(function(e,n,s,o){var a=t.items.length;s.counter=a>1?R(i.tCounter,o.index,a):""})),w("BuildControls"+s,(function(){if(t.items.length>1&&i.arrows&&!t.arrowLeft){var n=i.arrowMarkup,s=t.arrowLeft=e(n.replace(/%title%/gi,i.tPrev).replace(/%dir%/gi,"left")).addClass(g),o=t.arrowRight=e(n.replace(/%title%/gi,i.tNext).replace(/%dir%/gi,"right")).addClass(g);s.click((function(){t.prev()})),o.click((function(){t.next()})),t.container.append(s.add(o))}})),w(d+s,(function(){t._preloadTimeout&&clearTimeout(t._preloadTimeout),t._preloadTimeout=setTimeout((function(){t.preloadNearbyImages(),t._preloadTimeout=null}),16)})),void w(r+s,(function(){n.off(s),t.wrap.off("click"+s),t.arrowRight=t.arrowLeft=null})))},next:function(){t.direction=!0,t.index=q(t.index+1),t.updateItemHTML()},prev:function(){t.direction=!1,t.index=q(t.index-1),t.updateItemHTML()},goTo:function(e){t.direction=e>=t.index,t.index=e,t.updateItemHTML()},preloadNearbyImages:function(){var e,i=t.st.gallery.preload,n=Math.min(i[0],t.items.length),s=Math.min(i[1],t.items.length);for(e=1;e<=(t.direction?s:n);e++)t._preloadItem(t.index+e);for(e=1;e<=(t.direction?n:s);e++)t._preloadItem(t.index-e)},_preloadItem:function(i){if(i=q(i),!t.items[i].preloaded){var n=t.items[i];n.parsed||(n=t.parseEl(i)),T("LazyLoad",n),"image"===n.type&&(n.img=e('').on("load.mfploader",(function(){n.hasSize=!0})).on("error.mfploader",(function(){n.hasSize=!0,n.loadError=!0,T("LazyLoadError",n)})).attr("src",n.src)),n.preloaded=!0}}}});var z="retina";e.magnificPopup.registerModule(z,{options:{replaceSrc:function(e){return e.src.replace(/\.\w+$/,(function(e){return"@2x"+e}))},ratio:1},proto:{initRetina:function(){if(window.devicePixelRatio>1){var e=t.st.retina,i=e.ratio;(i=isNaN(i)?i():i)>1&&(w("ImageHasSize."+z,(function(e,t){t.img.css({"max-width":t.img[0].naturalWidth/i,width:"100%"})})),w("ElementParse."+z,(function(t,n){n.src=e.replaceSrc(n,i)})))}}}}),_()})),"object"==typeof navigator&&function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define("Plyr",t):(e="undefined"!=typeof globalThis?globalThis:e||self).Plyr=t()}(this,(function(){"use strict";function e(e,t,i){return t in e?Object.defineProperty(e,t,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[t]=i,e}function t(e,t){for(var i=0;i(i=100/l.width*(s.clientX-l.left))?i=0:100i?i-=(100-2*i)*c:50t){var i=function(e){var t="".concat(e).match(/(?:\.(\d+))?(?:[eE]([+-]?\d+))?$/);return t?Math.max(0,(t[1]?t[1].length:0)-(t[2]?+t[2]:0)):0}(t);return parseFloat(e.toFixed(i))}return Math.round(e/t)*t}(i/100*(a-o),r)}},{key:"set",value:function(t){e.enabled&&g(t)&&!t.target.disabled&&(t.preventDefault(),t.target.value=this.get(t),function(e,t){if(e&&t){var i=new Event(t,{bubbles:!0});e.dispatchEvent(i)}}(t.target,"touchend"===t.type?"change":"input"))}}],[{key:"setup",value:function(t){var i=1null!=e?e.constructor:null,w=(e,t)=>Boolean(e&&t&&e instanceof t),k=e=>null==e,T=e=>v(e)===Object,C=e=>v(e)===String,_=e=>v(e)===Function,S=e=>Array.isArray(e),E=e=>w(e,NodeList),A=e=>k(e)||(C(e)||S(e)||E(e))&&!e.length||T(e)&&!Object.keys(e).length;var x=k,P=T,$=e=>v(e)===Number&&!Number.isNaN(e),M=C,I=e=>v(e)===Boolean,L=_,N=S,O=E,j=e=>null!==e&&"object"==typeof e&&1===e.nodeType&&"object"==typeof e.style&&"object"==typeof e.ownerDocument,D=e=>w(e,Event),H=e=>w(e,KeyboardEvent),F=e=>w(e,TextTrack)||!k(e)&&C(e.kind),q=e=>{if(w(e,window.URL))return!0;if(!C(e))return!1;let t=e;e.startsWith("http://")&&e.startsWith("https://")||(t=`http://${e}`);try{return!A(new URL(t).hostname)}catch(e){return!1}},R=A;const z=(()=>{const e=document.createElement("span"),t={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd otransitionend",transition:"transitionend"},i=Object.keys(t).find((t=>void 0!==e.style[t]));return!!M(i)&&t[i]})();function B(e,t){setTimeout((()=>{try{e.hidden=!0,e.offsetHeight,e.hidden=!1}catch(e){}}),t)}const V={isIE:Boolean(window.document.documentMode),isEdge:window.navigator.userAgent.includes("Edge"),isWebkit:"WebkitAppearance"in document.documentElement.style&&!/Edge/.test(navigator.userAgent),isIPhone:/(iPhone|iPod)/gi.test(navigator.platform),isIos:"MacIntel"===navigator.platform&&navigator.maxTouchPoints>1||/(iPad|iPhone|iPod)/gi.test(navigator.platform)};function W(e,t){return t.split(".").reduce(((e,t)=>e&&e[t]),e)}function U(e={},...t){if(!t.length)return e;const i=t.shift();return P(i)?(Object.keys(i).forEach((t=>{P(i[t])?(Object.keys(e).includes(t)||Object.assign(e,{[t]:{}}),U(e[t],i[t])):Object.assign(e,{[t]:i[t]})})),U(e,...t)):e}function K(e,t){const i=e.length?e:[e];Array.from(i).reverse().forEach(((e,i)=>{const n=i>0?t.cloneNode(!0):t,s=e.parentNode,o=e.nextSibling;n.appendChild(e),o?s.insertBefore(n,o):s.appendChild(n)}))}function Y(e,t){j(e)&&!R(t)&&Object.entries(t).filter((([,e])=>!x(e))).forEach((([t,i])=>e.setAttribute(t,i)))}function J(e,t,i){const n=document.createElement(e);return P(t)&&Y(n,t),M(i)&&(n.innerText=i),n}function X(e,t,i,n){j(t)&&t.appendChild(J(e,i,n))}function G(e){O(e)||N(e)?Array.from(e).forEach(G):j(e)&&j(e.parentNode)&&e.parentNode.removeChild(e)}function Q(e){if(!j(e))return;let{length:t}=e.childNodes;for(;t>0;)e.removeChild(e.lastChild),t-=1}function Z(e,t){return j(t)&&j(t.parentNode)&&j(e)?(t.parentNode.replaceChild(e,t), e):null}function ee(e,t){if(!M(e)||R(e))return{};const i={},n=U({},t);return e.split(",").forEach((e=>{const t=e.trim(),s=t.replace(".",""),o=t.replace(/[[\]]/g,"").split("="),[a]=o,r=o.length>1?o[1].replace(/["']/g,""):"";switch(t.charAt(0)){case".":M(n.class)?i.class=`${n.class} ${s}`:i.class=s;break;case"#":i.id=t.replace("#","");break;case"[":i[a]=r}})),U(n,i)}function te(e,t){if(!j(e))return;let i=t;I(i)||(i=!e.hidden),e.hidden=i}function ie(e,t,i){if(O(e))return Array.from(e).map((e=>ie(e,t,i)));if(j(e)){let n="toggle";return void 0!==i&&(n=i?"add":"remove"),e.classList[n](t),e.classList.contains(t)}return!1}function ne(e,t){return j(e)&&e.classList.contains(t)}function se(e,t){const{prototype:i}=Element;return(i.matches||i.webkitMatchesSelector||i.mozMatchesSelector||i.msMatchesSelector||function(){return Array.from(document.querySelectorAll(t)).includes(this)}).call(e,t)}function oe(e){return this.elements.container.querySelectorAll(e)}function ae(e){return this.elements.container.querySelector(e)}function re(e=null,t=!1){j(e)&&(e.focus({preventScroll:!0}),t&&ie(e,this.config.classNames.tabFocus))}const le={"audio/ogg":"vorbis","audio/wav":"1","video/webm":"vp8, vorbis","video/mp4":"avc1.42E01E, mp4a.40.2","video/ogg":"theora"},ce={audio:"canPlayType"in document.createElement("audio"),video:"canPlayType"in document.createElement("video"),check(e,t,i){const n=V.isIPhone&&i&&ce.playsinline,s=ce[e]||"html5"!==t;return{api:s,ui:s&&ce.rangeInput&&("video"!==e||!V.isIPhone||n)}},pip:!(V.isIPhone||!L(J("video").webkitSetPresentationMode)&&(!document.pictureInPictureEnabled||J("video").disablePictureInPicture)),airplay:L(window.WebKitPlaybackTargetAvailabilityEvent),playsinline:"playsInline"in document.createElement("video"),mime(e){if(R(e))return!1;const[t]=e.split("/");let i=e;if(!this.isHTML5||t!==this.type)return!1;Object.keys(le).includes(i)&&(i+=`; codecs="${le[e]}"`);try{return Boolean(i&&this.media.canPlayType(i).replace(/no/,""))}catch(e){return!1}},textTracks:"textTracks"in document.createElement("video"),rangeInput:(()=>{const e=document.createElement("input");return e.type="range","range"===e.type})(),touch:"ontouchstart"in document.documentElement,transitions:!1!==z,reducedMotion:"matchMedia"in window&&window.matchMedia("(prefers-reduced-motion)").matches},ue=(()=>{let e=!1;try{const t=Object.defineProperty({},"passive",{get:()=>(e=!0,null)});window.addEventListener("test",null,t),window.removeEventListener("test",null,t)}catch(e){}return e})();function de(e,t,i,n=!1,s=!0,o=!1){if(!e||!("addEventListener"in e)||R(t)||!L(i))return;const a=t.split(" ");let r=o;ue&&(r={passive:s,capture:o}),a.forEach((t=>{this&&this.eventListeners&&n&&this.eventListeners.push({element:e,type:t,callback:i,options:r}),e[n?"addEventListener":"removeEventListener"](t,i,r)}))}function he(e,t="",i,n=!0,s=!1){de.call(this,e,t,i,!0,n,s)}function pe(e,t="",i,n=!0,s=!1){de.call(this,e,t,i,!1,n,s)}function me(e,t="",i,n=!0,s=!1){const o=(...a)=>{pe(e,t,o,n,s),i.apply(this,a)};de.call(this,e,t,o,!0,n,s)}function fe(e,t="",i=!1,n={}){if(!j(e)||R(t))return;const s=new CustomEvent(t,{bubbles:i,detail:{...n,plyr:this}});e.dispatchEvent(s)}function ge(){this&&this.eventListeners&&(this.eventListeners.forEach((e=>{const{element:t,type:i,callback:n,options:s}=e;t.removeEventListener(i,n,s)})),this.eventListeners=[])}function ye(){return new Promise((e=>this.ready?setTimeout(e,0):he.call(this,this.elements.container,"ready",e))).then((()=>{}))}function be(e){(e=>w(e,Promise)&&_(e.then))(e)&&e.then(null,(()=>{}))}function ve(e){return N(e)?e.filter(((t,i)=>e.indexOf(t)===i)):e}function we(e,t){return N(e)&&e.length?e.reduce(((e,i)=>Math.abs(i-t)({...e,[t/i]:[t,i]})),{});function Ce(e){return!!(N(e)||M(e)&&e.includes(":"))&&(N(e)?e:e.split(":")).map(Number).every($)}function _e(e){if(!N(e)||!e.every($))return null;const[t,i]=e,n=(e,t)=>0===t?e:n(t,e%t),s=n(t,i);return[t/s,i/s]}function Se(e){const t=e=>Ce(e)?e.split(":").map(Number):null;let i=t(e);if(null===i&&(i=t(this.config.ratio)),null===i&&!R(this.embed)&&N(this.embed.ratio)&&({ratio:i}=this.embed),null===i&&this.isHTML5){const{videoWidth:e,videoHeight:t}=this.media;i=[e,t]}return _e(i)}function Ee(e){if(!this.isVideo)return{};const{wrapper:t}=this.elements,i=Se.call(this,e);if(!N(i))return{};const[n,s]=_e(i),o=100/n*s;if(ke(`aspect-ratio: ${n}/${s}`)?t.style.aspectRatio=`${n}/${s}`:t.style.paddingBottom=`${o}%`,this.isVimeo&&!this.config.vimeo.premium&&this.supported.ui){const e=100/this.media.offsetWidth*parseInt(window.getComputedStyle(this.media).paddingBottom,10),i=(e-o)/(e/50);this.fullscreen.active?t.style.paddingBottom=null:this.media.style.transform=`translateY(-${i}%)`}else this.isHTML5&&t.classList.add(this.config.classNames.videoFixedRatio);return{padding:o,ratio:i}}function Ae(e,t,i=.05){const n=e/t,s=we(Object.keys(Te),n);return Math.abs(s-n)<=i?Te[s]:[e,t]}const xe={getSources(){return this.isHTML5?Array.from(this.media.querySelectorAll("source")).filter((e=>{const t=e.getAttribute("type");return!!R(t)||ce.mime.call(this,t)})):[]},getQualityOptions(){return this.config.quality.forced?this.config.quality.options:xe.getSources.call(this).map((e=>Number(e.getAttribute("size")))).filter(Boolean)},setup(){if(!this.isHTML5)return;const e=this;e.options.speed=e.config.speed.options,R(this.config.ratio)||Ee.call(e),Object.defineProperty(e.media,"quality",{get(){const t=xe.getSources.call(e).find((t=>t.getAttribute("src")===e.source));return t&&Number(t.getAttribute("size"))},set(t){if(e.quality!==t){if(e.config.quality.forced&&L(e.config.quality.onChange))e.config.quality.onChange(t);else{const i=xe.getSources.call(e).find((e=>Number(e.getAttribute("size"))===t));if(!i)return;const{currentTime:n,paused:s,preload:o,readyState:a,playbackRate:r}=e.media;e.media.src=i.getAttribute("src"),("none"!==o||a)&&(e.once("loadedmetadata",(()=>{e.speed=r,e.currentTime=n,s||be(e.play())})),e.media.load())}fe.call(e,e.media,"qualitychange",!1,{quality:t})}}})},cancelRequests(){this.isHTML5&&(G(xe.getSources.call(this)),this.media.setAttribute("src",this.config.blankVideo),this.media.load(),this.debug.log("Cancelled network requests"))}};function Pe(e,...t){return R(e)?e:e.toString().replace(/{(\d+)}/g,((e,i)=>t[i].toString()))}const Me=(e="",t="",i="")=>e.replace(new RegExp(t.toString().replace(/([.*+?^=!:${}()|[\]/\\])/g,"\\$1"),"g"),i.toString()),Ie=(e="")=>e.toString().replace(/\w\S*/g,(e=>e.charAt(0).toUpperCase()+e.slice(1).toLowerCase()));function Le(e){const t=document.createElement("div");return t.appendChild(e),t.innerHTML}const Ne={pip:"PIP",airplay:"AirPlay",html5:"HTML5",vimeo:"Vimeo",youtube:"YouTube"},Oe={get(e="",t={}){if(R(e)||R(t))return"";let i=W(t.i18n,e);if(R(i))return Object.keys(Ne).includes(e)?Ne[e]:"";const n={"{seektime}":t.seekTime,"{title}":t.title};return Object.entries(n).forEach((([e,t])=>{i=Me(i,e,t)})),i}};class je{constructor(t){e(this,"get",(e=>{if(!je.supported||!this.enabled)return null;const t=window.localStorage.getItem(this.key);if(R(t))return null;const i=JSON.parse(t);return M(e)&&e.length?i[e]:i})),e(this,"set",(e=>{if(!je.supported||!this.enabled)return;if(!P(e))return;let t=this.get();R(t)&&(t={}),U(t,e);try{window.localStorage.setItem(this.key,JSON.stringify(t))}catch(e){}})),this.enabled=t.config.storage.enabled,this.key=t.config.storage.key}static get supported(){try{if(!("localStorage"in window))return!1;const e="___test";return window.localStorage.setItem(e,e),window.localStorage.removeItem(e),!0}catch(e){return!1}}}function De(e,t="text"){return new Promise(((i,n)=>{try{const n=new XMLHttpRequest;if(!("withCredentials"in n))return;n.addEventListener("load",(()=>{if("text"===t)try{i(JSON.parse(n.responseText))}catch(e){i(n.responseText)}else i(n.response)})),n.addEventListener("error",(()=>{throw new Error(n.status)})),n.open("GET",e,!0),n.responseType=t,n.send()}catch(e){n(e)}}))}function He(e,t){if(!M(e))return;const i=M(t);let n=!1;const s=()=>null!==document.getElementById(t),o=(e,t)=>{e.innerHTML=t,i&&s()||document.body.insertAdjacentElement("afterbegin",e)};if(!i||!s()){const s=je.supported,a=document.createElement("div");if(a.setAttribute("hidden",""),i&&a.setAttribute("id",t),s){const e=window.localStorage.getItem(`cache-${t}`);if(n=null!==e,n){const t=JSON.parse(e);o(a,t.content)}}De(e).then((e=>{if(!R(e)){if(s)try{window.localStorage.setItem(`cache-${t}`,JSON.stringify({content:e}))}catch(e){}o(a,e)}})).catch((()=>{}))}}const Fe=e=>Math.trunc(e/60/60%60,10);function $e(e=0,t=!1,i=!1){if(!$(e))return $e(void 0,t,i);const n=e=>`0${e}`.slice(-2);let s=Fe(e);const o=(a=e,Math.trunc(a/60%60,10));var a;const r=(e=>Math.trunc(e%60,10))(e);return s=t||s>0?`${s}:`:"",`${i&&e>0?"-":""}${s}${n(o)}:${n(r)}`}const qe={getIconUrl(){const e=new URL(this.config.iconUrl,window.location),t=window.location.host?window.location.host:window.top.location.host,i=e.host!==t||V.isIE&&!window.svg4everybody;return{url:this.config.iconUrl,cors:i}},findElements(){try{return this.elements.controls=ae.call(this,this.config.selectors.controls.wrapper),this.elements.buttons={play:oe.call(this,this.config.selectors.buttons.play),pause:ae.call(this,this.config.selectors.buttons.pause),restart:ae.call(this,this.config.selectors.buttons.restart),rewind:ae.call(this,this.config.selectors.buttons.rewind),fastForward:ae.call(this,this.config.selectors.buttons.fastForward),mute:ae.call(this,this.config.selectors.buttons.mute),pip:ae.call(this,this.config.selectors.buttons.pip),airplay:ae.call(this,this.config.selectors.buttons.airplay),settings:ae.call(this,this.config.selectors.buttons.settings),captions:ae.call(this,this.config.selectors.buttons.captions),fullscreen:ae.call(this,this.config.selectors.buttons.fullscreen)},this.elements.progress=ae.call(this,this.config.selectors.progress),this.elements.inputs={seek:ae.call(this,this.config.selectors.inputs.seek),volume:ae.call(this,this.config.selectors.inputs.volume)},this.elements.display={buffer:ae.call(this,this.config.selectors.display.buffer),currentTime:ae.call(this,this.config.selectors.display.currentTime),duration:ae.call(this,this.config.selectors.display.duration)},j(this.elements.progress)&&(this.elements.display.seekTooltip=this.elements.progress.querySelector(`.${this.config.classNames.tooltip}`)),!0}catch(e){return this.debug.warn("It looks like there is a problem with your custom controls HTML",e),this.toggleNativeControls(!0),!1}},createIcon(e,t){const i="http://www.w3.org/2000/svg",n=qe.getIconUrl.call(this),s=`${n.cors?"":n.url}#${this.config.iconPrefix}`,o=document.createElementNS(i,"svg");Y(o,U(t,{"aria-hidden":"true",focusable:"false"}));const a=document.createElementNS(i,"use"),r=`${s}-${e}`;return"href"in a&&a.setAttributeNS("http://www.w3.org/1999/xlink","href",r),a.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",r),o.appendChild(a),o},createLabel(e,t={}){const i=Oe.get(e,this.config);return J("span",{...t,class:[t.class,this.config.classNames.hidden].filter(Boolean).join(" ")},i)},createBadge(e){if(R(e))return null;const t=J("span",{class:this.config.classNames.menu.value});return t.appendChild(J("span",{class:this.config.classNames.menu.badge},e)),t},createButton(e,t){const i=U({},t);let n=function(e=""){let t=e.toString();return t=function(e=""){let t=e.toString();return t=Me(t,"-"," "),t=Me(t,"_"," "),t=Ie(t),Me(t," ","")}(t),t.charAt(0).toLowerCase()+t.slice(1)}(e);const s={element:"button",toggle:!1,label:null,icon:null,labelPressed:null,iconPressed:null};switch(["element","icon","label"].forEach((e=>{Object.keys(i).includes(e)&&(s[e]=i[e],delete i[e])})),"button"!==s.element||Object.keys(i).includes("type")||(i.type="button"),Object.keys(i).includes("class")?i.class.split(" ").some((e=>e===this.config.classNames.control))||U(i,{class:`${i.class} ${this.config.classNames.control}`}):i.class=this.config.classNames.control,e){case"play":s.toggle=!0,s.label="play",s.labelPressed="pause",s.icon="play",s.iconPressed="pause";break;case"mute":s.toggle=!0,s.label="mute",s.labelPressed="unmute",s.icon="volume",s.iconPressed="muted";break;case"captions":s.toggle=!0,s.label="enableCaptions",s.labelPressed="disableCaptions",s.icon="captions-off",s.iconPressed="captions-on";break;case"fullscreen":s.toggle=!0,s.label="enterFullscreen",s.labelPressed="exitFullscreen",s.icon="enter-fullscreen",s.iconPressed="exit-fullscreen";break;case"play-large":i.class+=` ${this.config.classNames.control}--overlaid`,n="play",s.label="play",s.icon="play";break;default:R(s.label)&&(s.label=n),R(s.icon)&&(s.icon=e)}const o=J(s.element);return s.toggle?(o.appendChild(qe.createIcon.call(this,s.iconPressed,{class:"icon--pressed"})),o.appendChild(qe.createIcon.call(this,s.icon,{class:"icon--not-pressed"})),o.appendChild(qe.createLabel.call(this,s.labelPressed,{class:"label--pressed"})),o.appendChild(qe.createLabel.call(this,s.label,{class:"label--not-pressed"}))):(o.appendChild(qe.createIcon.call(this,s.icon)),o.appendChild(qe.createLabel.call(this,s.label))),U(i,ee(this.config.selectors.buttons[n],i)),Y(o,i),"play"===n?(N(this.elements.buttons[n])||(this.elements.buttons[n]=[]),this.elements.buttons[n].push(o)):this.elements.buttons[n]=o,o},createRange(e,t){const i=J("input",U(ee(this.config.selectors.inputs[e]),{type:"range",min:0,max:100,step:.01,value:0,autocomplete:"off",role:"slider","aria-label":Oe.get(e,this.config),"aria-valuemin":0,"aria-valuemax":100,"aria-valuenow":0},t));return this.elements.inputs[e]=i,qe.updateRangeFill.call(this,i),b.setup(i),i},createProgress(e,t){const i=J("progress",U(ee(this.config.selectors.display[e]),{min:0,max:100,value:0,role:"progressbar","aria-hidden":!0},t));if("volume"!==e){i.appendChild(J("span",null,"0"));const t={played:"played",buffer:"buffered"}[e],n=t?Oe.get(t,this.config):"";i.innerText=`% ${n.toLowerCase()}`}return this.elements.display[e]=i,i},createTime(e,t){const i=ee(this.config.selectors.display[e],t),n=J("div",U(i,{class:`${i.class?i.class:""} ${this.config.classNames.display.time} `.trim(),"aria-label":Oe.get(e,this.config)}),"00:00");return this.elements.display[e]=n,n},bindMenuItemShortcuts(e,t){he.call(this,e,"keydown keyup",(i=>{if(!["Space","ArrowUp","ArrowDown","ArrowRight"].includes(i.key))return;if(i.preventDefault(),i.stopPropagation(),"keydown"===i.type)return;const n=se(e,'[role="menuitemradio"]');if(!n&&["Space","ArrowRight"].includes(i.key))qe.showMenuPanel.call(this,t,!0);else{let t;"Space"!==i.key&&("ArrowDown"===i.key||n&&"ArrowRight"===i.key?(t=e.nextElementSibling,j(t)||(t=e.parentNode.firstElementChild)):(t=e.previousElementSibling,j(t)||(t=e.parentNode.lastElementChild)),re.call(this,t,!0))}}),!1),he.call(this,e,"keyup",(e=>{"Return"===e.key&&qe.focusFirstMenuItem.call(this,null,!0)}))},createMenuItem({value:e,list:t,type:i,title:n,badge:s=null,checked:o=!1}){const a=ee(this.config.selectors.inputs[i]),r=J("button",U(a,{type:"button",role:"menuitemradio",class:`${this.config.classNames.control} ${a.class?a.class:""}`.trim(),"aria-checked":o,value:e})),l=J("span");l.innerHTML=n,j(s)&&l.appendChild(s),r.appendChild(l),Object.defineProperty(r,"checked",{enumerable:!0,get:()=>"true"===r.getAttribute("aria-checked"),set(e){e&&Array.from(r.parentNode.children).filter((e=>se(e,'[role="menuitemradio"]'))).forEach((e=>e.setAttribute("aria-checked","false"))),r.setAttribute("aria-checked",e?"true":"false")}}),this.listeners.bind(r,"click keyup",(t=>{if(!H(t)||"Space"===t.key){switch(t.preventDefault(),t.stopPropagation(),r.checked=!0,i){case"language":this.currentTrack=Number(e);break;case"quality":this.quality=e;break;case"speed":this.speed=parseFloat(e)}qe.showMenuPanel.call(this,"home",H(t))}}),i,!1),qe.bindMenuItemShortcuts.call(this,r,i),t.appendChild(r)},formatTime(e=0,t=!1){return $(e)?$e(e,Fe(this.duration)>0,t):e},updateTimeDisplay(e=null,t=0,i=!1){j(e)&&$(t)&&(e.innerText=qe.formatTime(t,i))},updateVolume(){this.supported.ui&&(j(this.elements.inputs.volume)&&qe.setRange.call(this,this.elements.inputs.volume,this.muted?0:this.volume),j(this.elements.buttons.mute)&&(this.elements.buttons.mute.pressed=this.muted||0===this.volume))},setRange(e,t=0){j(e)&&(e.value=t,qe.updateRangeFill.call(this,e))},updateProgress(e){if(!this.supported.ui||!D(e))return;let t=0;const i=(e,t)=>{const i=$(t)?t:0,n=j(e)?e:this.elements.display.buffer;if(j(n)){n.value=i;const e=n.getElementsByTagName("span")[0];j(e)&&(e.childNodes[0].nodeValue=i)}};if(e)switch(e.type){case"timeupdate":case"seeking":case"seeked":n=this.currentTime,s=this.duration,t=0===n||0===s||Number.isNaN(n)||Number.isNaN(s)?0:(n/s*100).toFixed(2),"timeupdate"===e.type&&qe.setRange.call(this,this.elements.inputs.seek,t);break;case"playing":case"progress":i(this.elements.display.buffer,100*this.buffered)}var n,s},updateRangeFill(e){const t=D(e)?e.target:e;if(j(t)&&"range"===t.getAttribute("type")){if(se(t,this.config.selectors.inputs.seek)){t.setAttribute("aria-valuenow",this.currentTime);const e=qe.formatTime(this.currentTime),i=qe.formatTime(this.duration),n=Oe.get("seekLabel",this.config);t.setAttribute("aria-valuetext",n.replace("{currentTime}",e).replace("{duration}",i))}else if(se(t,this.config.selectors.inputs.volume)){const e=100*t.value;t.setAttribute("aria-valuenow",e),t.setAttribute("aria-valuetext",`${e.toFixed(1)}%`)}else t.setAttribute("aria-valuenow",t.value);V.isWebkit&&t.style.setProperty("--value",t.value/t.max*100+"%")}},updateSeekTooltip(e){var t,i;if(!this.config.tooltips.seek||!j(this.elements.inputs.seek)||!j(this.elements.display.seekTooltip)||0===this.duration)return;const n=this.elements.display.seekTooltip,s=`${this.config.classNames.tooltip}--visible`,o=e=>ie(n,s,e);if(this.touch)return void o(!1);let a=0;const r=this.elements.progress.getBoundingClientRect();if(D(e))a=100/r.width*(e.pageX-r.left);else{if(!ne(n,s))return;a=parseFloat(n.style.left,10)}a<0?a=0:a>100&&(a=100);const l=this.duration/100*a;n.innerText=qe.formatTime(l);const c=null===(t=this.config.markers)||void 0===t||null===(i=t.points)||void 0===i?void 0:i.find((({time:e})=>e===Math.round(l)));c&&n.insertAdjacentHTML("afterbegin",`${c.label}
`),n.style.left=`${a}%`,D(e)&&["mouseenter","mouseleave"].includes(e.type)&&o("mouseenter"===e.type)},timeUpdate(e){const t=!j(this.elements.display.duration)&&this.config.invertTime;qe.updateTimeDisplay.call(this,this.elements.display.currentTime,t?this.duration-this.currentTime:this.currentTime,t),e&&"timeupdate"===e.type&&this.media.seeking||qe.updateProgress.call(this,e)},durationUpdate(){if(!this.supported.ui||!this.config.invertTime&&this.currentTime)return;if(this.duration>=2**32)return te(this.elements.display.currentTime,!0),void te(this.elements.progress,!0);j(this.elements.inputs.seek)&&this.elements.inputs.seek.setAttribute("aria-valuemax",this.duration);const e=j(this.elements.display.duration);!e&&this.config.displayDuration&&this.paused&&qe.updateTimeDisplay.call(this,this.elements.display.currentTime,this.duration),e&&qe.updateTimeDisplay.call(this,this.elements.display.duration,this.duration),this.config.markers.enabled&&qe.setMarkers.call(this),qe.updateSeekTooltip.call(this)},toggleMenuButton(e,t){te(this.elements.settings.buttons[e],!t)},updateSetting(e,t,i){const n=this.elements.settings.panels[e];let s=null,o=t;if("captions"===e)s=this.currentTrack;else{if(s=R(i)?this[e]:i,R(s)&&(s=this.config[e].default),!R(this.options[e])&&!this.options[e].includes(s))return void this.debug.warn(`Unsupported value of '${s}' for ${e}`);if(!this.config[e].options.includes(s))return void this.debug.warn(`Disabled value of '${s}' for ${e}`)}if(j(o)||(o=n&&n.querySelector('[role="menu"]')),!j(o))return;this.elements.settings.buttons[e].querySelector(`.${this.config.classNames.menu.value}`).innerHTML=qe.getLabel.call(this,e,s);const a=o&&o.querySelector(`[value="${s}"]`);j(a)&&(a.checked=!0)},getLabel(e,t){switch(e){case"speed":return 1===t?Oe.get("normal",this.config):`${t}×`;case"quality":if($(t)){const e=Oe.get(`qualityLabel.${t}`,this.config);return e.length?e:`${t}p`}return Ie(t);case"captions":return Be.getLabel.call(this);default:return null}},setQualityMenu(e){if(!j(this.elements.settings.panels.quality))return;const t="quality",i=this.elements.settings.panels.quality.querySelector('[role="menu"]');N(e)&&(this.options.quality=ve(e).filter((e=>this.config.quality.options.includes(e))));const n=!R(this.options.quality)&&this.options.quality.length>1;if(qe.toggleMenuButton.call(this,t,n),Q(i),qe.checkMenu.call(this),!n)return;const s=e=>{const t=Oe.get(`qualityBadge.${e}`,this.config);return t.length?qe.createBadge.call(this,t):null};this.options.quality.sort(((e,t)=>{const i=this.config.quality.options;return i.indexOf(e)>i.indexOf(t)?1:-1})).forEach((e=>{qe.createMenuItem.call(this,{value:e,list:i,type:t,title:qe.getLabel.call(this,"quality",e),badge:s(e)})})),qe.updateSetting.call(this,t,i)},setCaptionsMenu(){if(!j(this.elements.settings.panels.captions))return;const e="captions",t=this.elements.settings.panels.captions.querySelector('[role="menu"]'),i=Be.getTracks.call(this),n=Boolean(i.length);if(qe.toggleMenuButton.call(this,e,n),Q(t),qe.checkMenu.call(this),!n)return;const s=i.map(((e,i)=>({value:i,checked:this.captions.toggled&&this.currentTrack===i,title:Be.getLabel.call(this,e),badge:e.language&&qe.createBadge.call(this,e.language.toUpperCase()),list:t,type:"language"})));s.unshift({value:-1,checked:!this.captions.toggled,title:Oe.get("disabled",this.config),list:t,type:"language"}),s.forEach(qe.createMenuItem.bind(this)),qe.updateSetting.call(this,e,t)},setSpeedMenu(){if(!j(this.elements.settings.panels.speed))return;const e="speed",t=this.elements.settings.panels.speed.querySelector('[role="menu"]');this.options.speed=this.options.speed.filter((e=>e>=this.minimumSpeed&&e<=this.maximumSpeed));const i=!R(this.options.speed)&&this.options.speed.length>1;qe.toggleMenuButton.call(this,e,i),Q(t),qe.checkMenu.call(this),i&&(this.options.speed.forEach((i=>{qe.createMenuItem.call(this,{value:i,list:t,type:e,title:qe.getLabel.call(this,"speed",i)})})),qe.updateSetting.call(this,e,t))},checkMenu(){const{buttons:e}=this.elements.settings,t=!R(e)&&Object.values(e).some((e=>!e.hidden));te(this.elements.settings.menu,!t)},focusFirstMenuItem(e,t=!1){if(this.elements.settings.popup.hidden)return;let i=e;j(i)||(i=Object.values(this.elements.settings.panels).find((e=>!e.hidden)));const n=i.querySelector('[role^="menuitem"]');re.call(this,n,t)},toggleMenu(e){const{popup:t}=this.elements.settings,i=this.elements.buttons.settings;if(!j(t)||!j(i))return;const{hidden:n}=t;let s=n;if(I(e))s=e;else if(H(e)&&"Escape"===e.key)s=!1;else if(D(e)){const n=L(e.composedPath)?e.composedPath()[0]:e.target,o=t.contains(n);if(o||!o&&e.target!==i&&s)return}i.setAttribute("aria-expanded",s),te(t,!s),ie(this.elements.container,this.config.classNames.menu.open,s),s&&H(e)?qe.focusFirstMenuItem.call(this,null,!0):s||n||re.call(this,i,H(e))},getMenuSize(e){const t=e.cloneNode(!0);t.style.position="absolute",t.style.opacity=0,t.removeAttribute("hidden"),e.parentNode.appendChild(t);const i=t.scrollWidth,n=t.scrollHeight;return G(t),{width:i,height:n}},showMenuPanel(e="",t=!1){const i=this.elements.container.querySelector(`#plyr-settings-${this.id}-${e}`);if(!j(i))return;const n=i.parentNode,s=Array.from(n.children).find((e=>!e.hidden));if(ce.transitions&&!ce.reducedMotion){n.style.width=`${s.scrollWidth}px`,n.style.height=`${s.scrollHeight}px`;const e=qe.getMenuSize.call(this,i),t=e=>{e.target===n&&["width","height"].includes(e.propertyName)&&(n.style.width="",n.style.height="",pe.call(this,n,z,t))};he.call(this,n,z,t),n.style.width=`${e.width}px`,n.style.height=`${e.height}px`}te(s,!0),te(i,!1),qe.focusFirstMenuItem.call(this,i,t)},setDownloadUrl(){const e=this.elements.buttons.download;j(e)&&e.setAttribute("href",this.download)},create(e){const{bindMenuItemShortcuts:t,createButton:i,createProgress:n,createRange:s,createTime:o,setQualityMenu:a,setSpeedMenu:r,showMenuPanel:l}=qe;this.elements.controls=null,N(this.config.controls)&&this.config.controls.includes("play-large")&&this.elements.container.appendChild(i.call(this,"play-large"));const c=J("div",ee(this.config.selectors.controls.wrapper));this.elements.controls=c;const u={class:"plyr__controls__item"};return ve(N(this.config.controls)?this.config.controls:[]).forEach((a=>{if("restart"===a&&c.appendChild(i.call(this,"restart",u)),"rewind"===a&&c.appendChild(i.call(this,"rewind",u)),"play"===a&&c.appendChild(i.call(this,"play",u)),"fast-forward"===a&&c.appendChild(i.call(this,"fast-forward",u)),"progress"===a){const t=J("div",{class:`${u.class} plyr__progress__container`}),i=J("div",ee(this.config.selectors.progress));if(i.appendChild(s.call(this,"seek",{id:`plyr-seek-${e.id}`})),i.appendChild(n.call(this,"buffer")),this.config.tooltips.seek){const e=J("span",{class:this.config.classNames.tooltip},"00:00");i.appendChild(e),this.elements.display.seekTooltip=e}this.elements.progress=i,t.appendChild(this.elements.progress),c.appendChild(t)}if("current-time"===a&&c.appendChild(o.call(this,"currentTime",u)),"duration"===a&&c.appendChild(o.call(this,"duration",u)),"mute"===a||"volume"===a){let{volume:t}=this.elements;if(j(t)&&c.contains(t)||(t=J("div",U({},u,{class:`${u.class} plyr__volume`.trim()})),this.elements.volume=t,c.appendChild(t)),"mute"===a&&t.appendChild(i.call(this,"mute")),"volume"===a&&!V.isIos){const i={max:1,step:.05,value:this.config.volume};t.appendChild(s.call(this,"volume",U(i,{id:`plyr-volume-${e.id}`})))}}if("captions"===a&&c.appendChild(i.call(this,"captions",u)),"settings"===a&&!R(this.config.settings)){const n=J("div",U({},u,{class:`${u.class} plyr__menu`.trim(),hidden:""}));n.appendChild(i.call(this,"settings",{"aria-haspopup":!0,"aria-controls":`plyr-settings-${e.id}`,"aria-expanded":!1}));const s=J("div",{class:"plyr__menu__container",id:`plyr-settings-${e.id}`,hidden:""}),o=J("div"),a=J("div",{id:`plyr-settings-${e.id}-home`}),r=J("div",{role:"menu"});a.appendChild(r),o.appendChild(a),this.elements.settings.panels.home=a,this.config.settings.forEach((i=>{const n=J("button",U(ee(this.config.selectors.buttons.settings),{type:"button",class:`${this.config.classNames.control} ${this.config.classNames.control}--forward`,role:"menuitem","aria-haspopup":!0,hidden:""}));t.call(this,n,i),he.call(this,n,"click",(()=>{l.call(this,i,!1)}));const s=J("span",null,Oe.get(i,this.config)),a=J("span",{class:this.config.classNames.menu.value});a.innerHTML=e[i],s.appendChild(a),n.appendChild(s),r.appendChild(n);const c=J("div",{id:`plyr-settings-${e.id}-${i}`,hidden:""}),u=J("button",{type:"button",class:`${this.config.classNames.control} ${this.config.classNames.control}--back`});u.appendChild(J("span",{"aria-hidden":!0},Oe.get(i,this.config))),u.appendChild(J("span",{class:this.config.classNames.hidden},Oe.get("menuBack",this.config))),he.call(this,c,"keydown",(e=>{"ArrowLeft"===e.key&&(e.preventDefault(),e.stopPropagation(),l.call(this,"home",!0))}),!1),he.call(this,u,"click",(()=>{l.call(this,"home",!1)})),c.appendChild(u),c.appendChild(J("div",{role:"menu"})),o.appendChild(c),this.elements.settings.buttons[i]=n,this.elements.settings.panels[i]=c})),s.appendChild(o),n.appendChild(s),c.appendChild(n),this.elements.settings.popup=s,this.elements.settings.menu=n}if("pip"===a&&ce.pip&&c.appendChild(i.call(this,"pip",u)),"airplay"===a&&ce.airplay&&c.appendChild(i.call(this,"airplay",u)),"download"===a){const e=U({},u,{element:"a",href:this.download,target:"_blank"});this.isHTML5&&(e.download="");const{download:t}=this.config.urls;!q(t)&&this.isEmbed&&U(e,{icon:`logo-${this.provider}`,label:this.provider}),c.appendChild(i.call(this,"download",e))}"fullscreen"===a&&c.appendChild(i.call(this,"fullscreen",u))})),this.isHTML5&&a.call(this,xe.getQualityOptions.call(this)),r.call(this),c},inject(){if(this.config.loadSprite){const e=qe.getIconUrl.call(this);e.cors&&He(e.url,"sprite-plyr")}this.id=Math.floor(1e4*Math.random());let e=null;this.elements.controls=null;const t={id:this.id,seektime:this.config.seekTime,title:this.config.title};let i,n=!0;if(L(this.config.controls)&&(this.config.controls=this.config.controls.call(this,t)),this.config.controls||(this.config.controls=[]),j(this.config.controls)||M(this.config.controls)?e=this.config.controls:(e=qe.create.call(this,{id:this.id,seektime:this.config.seekTime,speed:this.speed,quality:this.quality,captions:Be.getLabel.call(this)}),n=!1),n&&M(this.config.controls)&&(e=(e=>{let i=e;return Object.entries(t).forEach((([e,t])=>{i=Me(i,`{${e}}`,t)})),i})(e)),M(this.config.selectors.controls.container)&&(i=document.querySelector(this.config.selectors.controls.container)),j(i)||(i=this.elements.container),i[j(e)?"insertAdjacentElement":"insertAdjacentHTML"]("afterbegin",e),j(this.elements.controls)||qe.findElements.call(this),!R(this.elements.buttons)){const e=e=>{const t=this.config.classNames.controlPressed;Object.defineProperty(e,"pressed",{enumerable:!0,get:()=>ne(e,t),set(i=!1){ie(e,t,i)}})};Object.values(this.elements.buttons).filter(Boolean).forEach((t=>{N(t)||O(t)?Array.from(t).filter(Boolean).forEach(e):e(t)}))}if(V.isEdge&&B(i),this.config.tooltips.controls){const{classNames:e,selectors:t}=this.config,i=`${t.controls.wrapper} ${t.labels} .${e.hidden}`,n=oe.call(this,i);Array.from(n).forEach((e=>{ie(e,this.config.classNames.hidden,!1),ie(e,this.config.classNames.tooltip,!0)}))}},setMediaMetadata(){try{"mediaSession"in navigator&&(navigator.mediaSession.metadata=new window.MediaMetadata({title:this.config.mediaMetadata.title,artist:this.config.mediaMetadata.artist,album:this.config.mediaMetadata.album,artwork:this.config.mediaMetadata.artwork}))}catch(e){}},setMarkers(){var e,t;if(!this.duration||this.elements.markers)return;const i=null===(e=this.config.markers)||void 0===e||null===(t=e.points)||void 0===t?void 0:t.filter((({time:e})=>e>0&&eie(o,a,e);i.forEach((e=>{const t=J("span",{class:this.config.classNames.marker},""),i=e.time/this.duration*100+"%";o&&(t.addEventListener("mouseenter",(()=>{e.label||(o.style.left=i,o.innerHTML=e.label,r(!0))})),t.addEventListener("mouseleave",(()=>{r(!1)}))),t.addEventListener("click",(()=>{this.currentTime=e.time})),t.style.left=i,s.appendChild(t)})),n.appendChild(s),this.config.tooltips.seek||(o=J("span",{class:this.config.classNames.tooltip},""),n.appendChild(o)),this.elements.markers={points:s,tip:o},this.elements.progress.appendChild(n)}};function Re(e,t=!0){let i=e;if(t){const e=document.createElement("a");e.href=i,i=e.href}try{return new URL(i)}catch(e){return null}}function ze(e){const t=new URLSearchParams;return P(e)&&Object.entries(e).forEach((([e,i])=>{t.set(e,i)})),t}const Be={setup(){if(!this.supported.ui)return;if(!this.isVideo||this.isYouTube||this.isHTML5&&!ce.textTracks)return void(N(this.config.controls)&&this.config.controls.includes("settings")&&this.config.settings.includes("captions")&&qe.setCaptionsMenu.call(this));var e,t;if(j(this.elements.captions)||(this.elements.captions=J("div",ee(this.config.selectors.captions)),e=this.elements.captions,t=this.elements.wrapper,j(e)&&j(t)&&t.parentNode.insertBefore(e,t.nextSibling)),V.isIE&&window.URL){const e=this.media.querySelectorAll("track");Array.from(e).forEach((e=>{const t=e.getAttribute("src"),i=Re(t);null!==i&&i.hostname!==window.location.href.hostname&&["http:","https:"].includes(i.protocol)&&De(t,"blob").then((t=>{e.setAttribute("src",window.URL.createObjectURL(t))})).catch((()=>{G(e)}))}))}const i=ve((navigator.languages||[navigator.language||navigator.userLanguage||"en"]).map((e=>e.split("-")[0]))) ;let n=(this.storage.get("language")||this.config.captions.language||"auto").toLowerCase();"auto"===n&&([n]=i);let s=this.storage.get("captions");if(I(s)||({active:s}=this.config.captions),Object.assign(this.captions,{toggled:!1,active:s,language:n,languages:i}),this.isHTML5){const e=this.config.captions.update?"addtrack removetrack":"removetrack";he.call(this,this.media.textTracks,e,Be.update.bind(this))}setTimeout(Be.update.bind(this),0)},update(){const e=Be.getTracks.call(this,!0),{active:t,language:i,meta:n,currentTrackNode:s}=this.captions,o=Boolean(e.find((e=>e.language===i)));this.isHTML5&&this.isVideo&&e.filter((e=>!n.get(e))).forEach((e=>{this.debug.log("Track added",e),n.set(e,{default:"showing"===e.mode}),"showing"===e.mode&&(e.mode="hidden"),he.call(this,e,"cuechange",(()=>Be.updateCues.call(this)))})),(o&&this.language!==i||!e.includes(s))&&(Be.setLanguage.call(this,i),Be.toggle.call(this,t&&o)),this.elements&&ie(this.elements.container,this.config.classNames.captions.enabled,!R(e)),N(this.config.controls)&&this.config.controls.includes("settings")&&this.config.settings.includes("captions")&&qe.setCaptionsMenu.call(this)},toggle(e,t=!0){if(!this.supported.ui)return;const{toggled:i}=this.captions,n=this.config.classNames.captions.active,s=x(e)?!i:e;if(s!==i){if(t||(this.captions.active=s,this.storage.set({captions:s})),!this.language&&s&&!t){const e=Be.getTracks.call(this),t=Be.findTrack.call(this,[this.captions.language,...this.captions.languages],!0);return this.captions.language=t.language,void Be.set.call(this,e.indexOf(t))}this.elements.buttons.captions&&(this.elements.buttons.captions.pressed=s),ie(this.elements.container,n,s),this.captions.toggled=s,qe.updateSetting.call(this,"captions"),fe.call(this,this.media,s?"captionsenabled":"captionsdisabled")}setTimeout((()=>{s&&this.captions.toggled&&(this.captions.currentTrackNode.mode="hidden")}))},set(e,t=!0){const i=Be.getTracks.call(this);if(-1!==e)if($(e))if(e in i){if(this.captions.currentTrack!==e){this.captions.currentTrack=e;const n=i[e],{language:s}=n||{};this.captions.currentTrackNode=n,qe.updateSetting.call(this,"captions"),t||(this.captions.language=s,this.storage.set({language:s})),this.isVimeo&&this.embed.enableTextTrack(s),fe.call(this,this.media,"languagechange")}Be.toggle.call(this,!0,t),this.isHTML5&&this.isVideo&&Be.updateCues.call(this)}else this.debug.warn("Track not found",e);else this.debug.warn("Invalid caption argument",e);else Be.toggle.call(this,!1,t)},setLanguage(e,t=!0){if(!M(e))return void this.debug.warn("Invalid language argument",e);const i=e.toLowerCase();this.captions.language=i;const n=Be.getTracks.call(this),s=Be.findTrack.call(this,[i]);Be.set.call(this,n.indexOf(s),t)},getTracks(e=!1){return Array.from((this.media||{}).textTracks||[]).filter((t=>!this.isHTML5||e||this.captions.meta.has(t))).filter((e=>["captions","subtitles"].includes(e.kind)))},findTrack(e,t=!1){const i=Be.getTracks.call(this),n=e=>Number((this.captions.meta.get(e)||{}).default),s=Array.from(i).sort(((e,t)=>n(t)-n(e)));let o;return e.every((e=>(o=s.find((t=>t.language===e)),!o))),o||(t?s[0]:void 0)},getCurrentTrack(){return Be.getTracks.call(this)[this.currentTrack]},getLabel(e){let t=e;return!F(t)&&ce.textTracks&&this.captions.toggled&&(t=Be.getCurrentTrack.call(this)),F(t)?R(t.label)?R(t.language)?Oe.get("enabled",this.config):e.language.toUpperCase():t.label:Oe.get("disabled",this.config)},updateCues(e){if(!this.supported.ui)return;if(!j(this.elements.captions))return void this.debug.warn("No captions element to render to");if(!x(e)&&!Array.isArray(e))return void this.debug.warn("updateCues: Invalid input",e);let t=e;if(!t){const e=Be.getCurrentTrack.call(this);t=Array.from((e||{}).activeCues||[]).map((e=>e.getCueAsHTML())).map(Le)}const i=t.map((e=>e.trim())).join("\n");if(i!==this.elements.captions.innerHTML){Q(this.elements.captions);const e=J("span",ee(this.config.selectors.caption));e.innerHTML=i,this.elements.captions.appendChild(e),fe.call(this,this.media,"cuechange")}}},Ve={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:null,clickToPlay:!0,hideControls:!0,resetOnEnd:!1,disableContextMenu:!0,loadSprite:!0,iconPrefix:"plyr",iconUrl:"https://cdn.plyr.io/3.7.2/plyr.svg",blankVideo:"https://cdn.plyr.io/static/blank.mp4",quality:{default:576,options:[4320,2880,2160,1440,1080,720,576,480,360,240],forced:!1,onChange:null},loop:{active:!1},speed:{selected:1,options:[.5,.75,1,1.25,1.5,1.75,2,4]},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",pip:"PIP",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/oembed.json?url={0}"},youtube:{sdk:"https://www.youtube.com/iframe_api",api:"https://noembed.com/embed?url=https://www.youtube.com/watch?v={0}"},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"},classNames:{type:"plyr--{0}",provider:"plyr--{0}",video:"plyr__video-wrapper",embed:"plyr__video-embed",videoFixedRatio:"plyr__video-wrapper--fixed-ratio",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",marker:"plyr__progress__marker",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",previewThumbnails:{thumbContainer:"plyr__preview-thumb",thumbContainerShown:"plyr__preview-thumb--is-shown",imageContainer:"plyr__preview-thumb__image-container",timeContainer:"plyr__preview-thumb__time-container",scrubbingContainer:"plyr__preview-scrubbing",scrubbingContainerShown:"plyr__preview-scrubbing--is-shown"}},attributes:{embed:{provider:"data-plyr-provider",id:"data-plyr-embed-id",hash:"data-plyr-embed-hash"}},ads:{enabled:!1,publisherId:"",tagUrl:""},previewThumbnails:{enabled:!1,src:""},vimeo:{byline:!1,portrait:!1,title:!1,speed:!0,transparent:!1,customControls:!0,referrerPolicy:null,premium:!1},youtube:{rel:0,showinfo:0,iv_load_policy:3,modestbranding:1,customControls:!0,noCookie:!1},mediaMetadata:{title:"",artist:"",album:"",artwork:[]},markers:{enabled:!1,points:[]}},We="picture-in-picture",Ue={html5:"html5",youtube:"youtube",vimeo:"vimeo"},Ke="video",Ye=()=>{};class Je{constructor(e=!1){this.enabled=window.console&&e,this.enabled&&this.log("Debugging enabled")}get log(){return this.enabled?Function.prototype.bind.call(console.log,console):Ye}get warn(){return this.enabled?Function.prototype.bind.call(console.warn,console):Ye}get error(){return this.enabled?Function.prototype.bind.call(console.error,console):Ye}}class Xe{constructor(t){e(this,"onChange",(()=>{if(!this.enabled)return;const e=this.player.elements.buttons.fullscreen;j(e)&&(e.pressed=this.active);const t=this.target===this.player.media?this.target:this.player.elements.container;fe.call(this.player,t,this.active?"enterfullscreen":"exitfullscreen",!0)})),e(this,"toggleFallback",((e=!1)=>{if(e?this.scrollPosition={x:window.scrollX||0,y:window.scrollY||0}:window.scrollTo(this.scrollPosition.x,this.scrollPosition.y),document.body.style.overflow=e?"hidden":"",ie(this.target,this.player.config.classNames.fullscreen.fallback,e),V.isIos){let t=document.head.querySelector('meta[name="viewport"]');const i="viewport-fit=cover";t||(t=document.createElement("meta"),t.setAttribute("name","viewport"));const n=M(t.content)&&t.content.includes(i);e?(this.cleanupViewport=!n,n||(t.content+=`,${i}`)):this.cleanupViewport&&(t.content=t.content.split(",").filter((e=>e.trim()!==i)).join(","))}this.onChange()})),e(this,"trapFocus",(e=>{if(V.isIos||!this.active||"Tab"!==e.key)return;const t=document.activeElement,i=oe.call(this.player,"a[href], button:not(:disabled), input:not(:disabled), [tabindex]"),[n]=i,s=i[i.length-1];t!==s||e.shiftKey?t===n&&e.shiftKey&&(s.focus(),e.preventDefault()):(n.focus(),e.preventDefault())})),e(this,"update",(()=>{if(this.enabled){let e;e=this.forceFallback?"Fallback (forced)":Xe.native?"Native":"Fallback",this.player.debug.log(`${e} fullscreen enabled`)}else this.player.debug.log("Fullscreen not supported and fallback disabled");ie(this.player.elements.container,this.player.config.classNames.fullscreen.enabled,this.enabled)})),e(this,"enter",(()=>{this.enabled&&(V.isIos&&this.player.config.fullscreen.iosNative?this.player.isVimeo?this.player.embed.requestFullscreen():this.target.webkitEnterFullscreen():!Xe.native||this.forceFallback?this.toggleFallback(!0):this.prefix?R(this.prefix)||this.target[`${this.prefix}Request${this.property}`]():this.target.requestFullscreen({navigationUI:"hide"}))})),e(this,"exit",(()=>{if(this.enabled)if(V.isIos&&this.player.config.fullscreen.iosNative)this.target.webkitExitFullscreen(),be(this.player.play());else if(!Xe.native||this.forceFallback)this.toggleFallback(!1);else if(this.prefix){if(!R(this.prefix)){const e="moz"===this.prefix?"Cancel":"Exit";document[`${this.prefix}${e}${this.property}`]()}}else(document.cancelFullScreen||document.exitFullscreen).call(document)})),e(this,"toggle",(()=>{this.active?this.exit():this.enter()})),this.player=t,this.prefix=Xe.prefix,this.property=Xe.property,this.scrollPosition={x:0,y:0},this.forceFallback="force"===t.config.fullscreen.fallback,this.player.elements.fullscreen=t.config.fullscreen.container&&function(e,t){const{prototype:i}=Element;return(i.closest||function(){let e=this;do{if(se.matches(e,t))return e;e=e.parentElement||e.parentNode}while(null!==e&&1===e.nodeType);return null}).call(e,t)}(this.player.elements.container,t.config.fullscreen.container),he.call(this.player,document,"ms"===this.prefix?"MSFullscreenChange":`${this.prefix}fullscreenchange`,(()=>{this.onChange()})),he.call(this.player,this.player.elements.container,"dblclick",(e=>{j(this.player.elements.controls)&&this.player.elements.controls.contains(e.target)||this.player.listeners.proxy(e,this.toggle,"fullscreen")})),he.call(this,this.player.elements.container,"keydown",(e=>this.trapFocus(e))),this.update()}static get native(){return!!(document.fullscreenEnabled||document.webkitFullscreenEnabled||document.mozFullScreenEnabled||document.msFullscreenEnabled)}get usingNative(){return Xe.native&&!this.forceFallback}static get prefix(){if(L(document.exitFullscreen))return"";let e="";return["webkit","moz","ms"].some((t=>!(!L(document[`${t}ExitFullscreen`])&&!L(document[`${t}CancelFullScreen`])||(e=t,0)))),e}static get property(){return"moz"===this.prefix?"FullScreen":"Fullscreen"}get enabled(){return(Xe.native||this.player.config.fullscreen.fallback)&&this.player.config.fullscreen.enabled&&this.player.supported.ui&&this.player.isVideo}get active(){if(!this.enabled)return!1;if(!Xe.native||this.forceFallback)return ne(this.target,this.player.config.classNames.fullscreen.fallback);const e=this.prefix?this.target.getRootNode()[`${this.prefix}${this.property}Element`]:this.target.getRootNode().fullscreenElement;return e&&e.shadowRoot?e===this.target.getRootNode().host:e===this.target}get target(){return V.isIos&&this.player.config.fullscreen.iosNative?this.player.media:this.player.elements.fullscreen||this.player.elements.container}}function Ge(e,t=1){return new Promise(((i,n)=>{const s=new Image,o=()=>{delete s.onload,delete s.onerror,(s.naturalWidth>=t?i:n)(s)};Object.assign(s,{onload:o,onerror:o,src:e})}))}const Qe={addStyleHook(){ie(this.elements.container,this.config.selectors.container.replace(".",""),!0),ie(this.elements.container,this.config.classNames.uiSupported,this.supported.ui)},toggleNativeControls(e=!1){e&&this.isHTML5?this.media.setAttribute("controls",""):this.media.removeAttribute("controls")},build(){if(this.listeners.media(),!this.supported.ui)return this.debug.warn(`Basic support only for ${this.provider} ${this.type}`),void Qe.toggleNativeControls.call(this,!0);j(this.elements.controls)||(qe.inject.call(this),this.listeners.controls()),Qe.toggleNativeControls.call(this),this.isHTML5&&Be.setup.call(this),this.volume=null,this.muted=null,this.loop=null,this.quality=null,this.speed=null,qe.updateVolume.call(this),qe.timeUpdate.call(this),qe.durationUpdate.call(this),Qe.checkPlaying.call(this),ie(this.elements.container,this.config.classNames.pip.supported,ce.pip&&this.isHTML5&&this.isVideo),ie(this.elements.container,this.config.classNames.airplay.supported,ce.airplay&&this.isHTML5),ie(this.elements.container,this.config.classNames.isIos,V.isIos),ie(this.elements.container,this.config.classNames.isTouch,this.touch),this.ready=!0,setTimeout((()=>{fe.call(this,this.media,"ready")}),0),Qe.setTitle.call(this),this.poster&&Qe.setPoster.call(this,this.poster,!1).catch((()=>{})),this.config.duration&&qe.durationUpdate.call(this),this.config.mediaMetadata&&qe.setMediaMetadata.call(this)},setTitle(){let e=Oe.get("play",this.config);if(M(this.config.title)&&!R(this.config.title)&&(e+=`, ${this.config.title}`),Array.from(this.elements.buttons.play||[]).forEach((t=>{t.setAttribute("aria-label",e)})),this.isEmbed){const e=ae.call(this,"iframe");if(!j(e))return;const t=R(this.config.title)?"video":this.config.title,i=Oe.get("frameTitle",this.config);e.setAttribute("title",i.replace("{title}",t))}},togglePoster(e){ie(this.elements.container,this.config.classNames.posterEnabled,e)},setPoster(e,t=!0){return t&&this.poster?Promise.reject(new Error("Poster already set")):(this.media.setAttribute("data-poster",e),this.elements.poster.removeAttribute("hidden"),ye.call(this).then((()=>Ge(e))).catch((t=>{throw e===this.poster&&Qe.togglePoster.call(this,!1),t})).then((()=>{if(e!==this.poster)throw new Error("setPoster cancelled by later call to setPoster")})).then((()=>(Object.assign(this.elements.poster.style,{backgroundImage:`url('${e}')`,backgroundSize:""}),Qe.togglePoster.call(this,!0),e))))},checkPlaying(e){ie(this.elements.container,this.config.classNames.playing,this.playing),ie(this.elements.container,this.config.classNames.paused,this.paused),ie(this.elements.container,this.config.classNames.stopped,this.stopped),Array.from(this.elements.buttons.play||[]).forEach((e=>{Object.assign(e,{pressed:this.playing}),e.setAttribute("aria-label",Oe.get(this.playing?"pause":"play",this.config))})),D(e)&&"timeupdate"===e.type||Qe.toggleControls.call(this)},checkLoading(e){this.loading=["stalled","waiting"].includes(e.type),clearTimeout(this.timers.loading),this.timers.loading=setTimeout((()=>{ie(this.elements.container,this.config.classNames.loading,this.loading),Qe.toggleControls.call(this)}),this.loading?250:0)},toggleControls(e){const{controls:t}=this.elements;if(t&&this.config.hideControls){const i=this.touch&&this.lastSeekTime+2e3>Date.now();this.toggleControls(Boolean(e||this.loading||this.paused||t.pressed||t.hover||i))}},migrateStyles(){Object.values({...this.media.style}).filter((e=>!R(e)&&M(e)&&e.startsWith("--plyr"))).forEach((e=>{this.elements.container.style.setProperty(e,this.media.style.getPropertyValue(e)),this.media.style.removeProperty(e)})),R(this.media.style)&&this.media.removeAttribute("style")}};class Ze{constructor(t){e(this,"firstTouch",(()=>{const{player:e}=this,{elements:t}=e;e.touch=!0,ie(t.container,e.config.classNames.isTouch,!0)})),e(this,"setTabFocus",(e=>{const{player:t}=this,{elements:i}=t,{key:n,type:s,timeStamp:o}=e;if(clearTimeout(this.focusTimer),"keydown"===s&&"Tab"!==n)return;"keydown"===s&&(this.lastKeyDown=o);const a=o-this.lastKeyDown<=20;("focus"!==s||a)&&((()=>{const e=t.config.classNames.tabFocus;ie(oe.call(t,`.${e}`),e,!1)})(),"focusout"!==s&&(this.focusTimer=setTimeout((()=>{const e=document.activeElement;i.container.contains(e)&&ie(document.activeElement,t.config.classNames.tabFocus,!0)}),10)))})),e(this,"global",((e=!0)=>{const{player:t}=this;t.config.keyboard.global&&de.call(t,window,"keydown keyup",this.handleKey,e,!1),de.call(t,document.body,"click",this.toggleMenu,e),me.call(t,document.body,"touchstart",this.firstTouch),de.call(t,document.body,"keydown focus blur focusout",this.setTabFocus,e,!1,!0)})),e(this,"container",(()=>{const{player:e}=this,{config:t,elements:i,timers:n}=e;!t.keyboard.global&&t.keyboard.focused&&he.call(e,i.container,"keydown keyup",this.handleKey,!1),he.call(e,i.container,"mousemove mouseleave touchstart touchmove enterfullscreen exitfullscreen",(t=>{const{controls:s}=i;s&&"enterfullscreen"===t.type&&(s.pressed=!1,s.hover=!1);let o=0;["touchstart","touchmove","mousemove"].includes(t.type)&&(Qe.toggleControls.call(e,!0),o=e.touch?3e3:2e3),clearTimeout(n.controls),n.controls=setTimeout((()=>Qe.toggleControls.call(e,!1)),o)}));const s=()=>{if(!e.isVimeo||e.config.vimeo.premium)return;const t=i.wrapper,{active:n}=e.fullscreen,[s,o]=Se.call(e),a=ke(`aspect-ratio: ${s} / ${o}`);if(!n)return void(a?(t.style.width=null,t.style.height=null):(t.style.maxWidth=null,t.style.margin=null));const[r,l]=[Math.max(document.documentElement.clientWidth||0,window.innerWidth||0),Math.max(document.documentElement.clientHeight||0,window.innerHeight||0)],c=r/l>s/o;a?(t.style.width=c?"auto":"100%",t.style.height=c?"100%":"auto"):(t.style.maxWidth=c?l/o*s+"px":null,t.style.margin=c?"0 auto":null)},o=()=>{clearTimeout(n.resized),n.resized=setTimeout(s,50)};he.call(e,i.container,"enterfullscreen exitfullscreen",(t=>{const{target:n}=e.fullscreen;n===i.container&&(!e.isEmbed&&R(e.config.ratio)||(s(),("enterfullscreen"===t.type?he:pe).call(e,window,"resize",o)))}))})),e(this,"media",(()=>{const{player:e}=this,{elements:t}=e;if(he.call(e,e.media,"timeupdate seeking seeked",(t=>qe.timeUpdate.call(e,t))),he.call(e,e.media,"durationchange loadeddata loadedmetadata",(t=>qe.durationUpdate.call(e,t))),he.call(e,e.media,"ended",(()=>{e.isHTML5&&e.isVideo&&e.config.resetOnEnd&&(e.restart(),e.pause())})),he.call(e,e.media,"progress playing seeking seeked",(t=>qe.updateProgress.call(e,t))),he.call(e,e.media,"volumechange",(t=>qe.updateVolume.call(e,t))),he.call(e,e.media,"playing play pause ended emptied timeupdate",(t=>Qe.checkPlaying.call(e,t))),he.call(e,e.media,"waiting canplay seeked playing",(t=>Qe.checkLoading.call(e,t))),e.supported.ui&&e.config.clickToPlay&&!e.isAudio){const i=ae.call(e,`.${e.config.classNames.video}`);if(!j(i))return;he.call(e,t.container,"click",(n=>{([t.container,i].includes(n.target)||i.contains(n.target))&&(e.touch&&e.config.hideControls||(e.ended?(this.proxy(n,e.restart,"restart"),this.proxy(n,(()=>{be(e.play())}),"play")):this.proxy(n,(()=>{be(e.togglePlay())}),"play")))}))}e.supported.ui&&e.config.disableContextMenu&&he.call(e,t.wrapper,"contextmenu",(e=>{e.preventDefault()}),!1),he.call(e,e.media,"volumechange",(()=>{e.storage.set({volume:e.volume,muted:e.muted})})),he.call(e,e.media,"ratechange",(()=>{qe.updateSetting.call(e,"speed"),e.storage.set({speed:e.speed})})),he.call(e,e.media,"qualitychange",(t=>{qe.updateSetting.call(e,"quality",null,t.detail.quality)})),he.call(e,e.media,"ready qualitychange",(()=>{qe.setDownloadUrl.call(e)}));const i=e.config.events.concat(["keyup","keydown"]).join(" ");he.call(e,e.media,i,(i=>{let{detail:n={}}=i;"error"===i.type&&(n=e.media.error),fe.call(e,t.container,i.type,!0,n)}))})),e(this,"proxy",((e,t,i)=>{const{player:n}=this,s=n.config.listeners[i];let o=!0;L(s)&&(o=s.call(n,e)),!1!==o&&L(t)&&t.call(n,e)})),e(this,"bind",((e,t,i,n,s=!0)=>{const{player:o}=this,a=o.config.listeners[n],r=L(a);he.call(o,e,t,(e=>this.proxy(e,i,n)),s&&!r)})),e(this,"controls",(()=>{const{player:e}=this,{elements:t}=e,i=V.isIE?"change":"input";if(t.buttons.play&&Array.from(t.buttons.play).forEach((t=>{this.bind(t,"click",(()=>{be(e.togglePlay())}),"play")})),this.bind(t.buttons.restart,"click",e.restart,"restart"),this.bind(t.buttons.rewind,"click",(()=>{e.lastSeekTime=Date.now(),e.rewind()}),"rewind"),this.bind(t.buttons.fastForward,"click",(()=>{e.lastSeekTime=Date.now(),e.forward()}),"fastForward"),this.bind(t.buttons.mute,"click",(()=>{e.muted=!e.muted}),"mute"),this.bind(t.buttons.captions,"click",(()=>e.toggleCaptions())),this.bind(t.buttons.download,"click",(()=>{fe.call(e,e.media,"download")}),"download"),this.bind(t.buttons.fullscreen,"click",(()=>{e.fullscreen.toggle()}),"fullscreen"),this.bind(t.buttons.pip,"click",(()=>{e.pip="toggle"}),"pip"),this.bind(t.buttons.airplay,"click",e.airplay,"airplay"),this.bind(t.buttons.settings,"click",(t=>{t.stopPropagation(),t.preventDefault(),qe.toggleMenu.call(e,t)}),null,!1),this.bind(t.buttons.settings,"keyup",(t=>{["Space","Enter"].includes(t.key)&&("Enter"!==t.key?(t.preventDefault(),t.stopPropagation(),qe.toggleMenu.call(e,t)):qe.focusFirstMenuItem.call(e,null,!0))}),null,!1),this.bind(t.settings.menu,"keydown",(t=>{"Escape"===t.key&&qe.toggleMenu.call(e,t)})),this.bind(t.inputs.seek,"mousedown mousemove",(e=>{const i=t.progress.getBoundingClientRect(),n=100/i.width*(e.pageX-i.left);e.currentTarget.setAttribute("seek-value",n)})),this.bind(t.inputs.seek,"mousedown mouseup keydown keyup touchstart touchend",(t=>{const i=t.currentTarget,n="play-on-seeked";if(H(t)&&!["ArrowLeft","ArrowRight"].includes(t.key))return;e.lastSeekTime=Date.now();const s=i.hasAttribute(n),o=["mouseup","touchend","keyup"].includes(t.type);s&&o?(i.removeAttribute(n),be(e.play())):!o&&e.playing&&(i.setAttribute(n,""),e.pause())})),V.isIos){const t=oe.call(e,'input[type="range"]');Array.from(t).forEach((e=>this.bind(e,i,(e=>B(e.target)))))}this.bind(t.inputs.seek,i,(t=>{const i=t.currentTarget;let n=i.getAttribute("seek-value");R(n)&&(n=i.value),i.removeAttribute("seek-value"),e.currentTime=n/i.max*e.duration}),"seek"),this.bind(t.progress,"mouseenter mouseleave mousemove",(t=>qe.updateSeekTooltip.call(e,t))),this.bind(t.progress,"mousemove touchmove",(t=>{const{previewThumbnails:i}=e;i&&i.loaded&&i.startMove(t)})),this.bind(t.progress,"mouseleave touchend click",(()=>{const{previewThumbnails:t}=e;t&&t.loaded&&t.endMove(!1,!0)})),this.bind(t.progress,"mousedown touchstart",(t=>{const{previewThumbnails:i}=e;i&&i.loaded&&i.startScrubbing(t)})),this.bind(t.progress,"mouseup touchend",(t=>{const{previewThumbnails:i}=e;i&&i.loaded&&i.endScrubbing(t)})),V.isWebkit&&Array.from(oe.call(e,'input[type="range"]')).forEach((t=>{this.bind(t,"input",(t=>qe.updateRangeFill.call(e,t.target)))})),e.config.toggleInvert&&!j(t.display.duration)&&this.bind(t.display.currentTime,"click",(()=>{0!==e.currentTime&&(e.config.invertTime=!e.config.invertTime,qe.timeUpdate.call(e))})),this.bind(t.inputs.volume,i,(t=>{e.volume=t.target.value}),"volume"),this.bind(t.controls,"mouseenter mouseleave",(i=>{t.controls.hover=!e.touch&&"mouseenter"===i.type})),t.fullscreen&&Array.from(t.fullscreen.children).filter((e=>!e.contains(t.container))).forEach((i=>{this.bind(i,"mouseenter mouseleave",(i=>{t.controls&&(t.controls.hover=!e.touch&&"mouseenter"===i.type)}))})),this.bind(t.controls,"mousedown mouseup touchstart touchend touchcancel",(e=>{t.controls.pressed=["mousedown","touchstart"].includes(e.type)})),this.bind(t.controls,"focusin",(()=>{const{config:i,timers:n}=e;ie(t.controls,i.classNames.noTransition,!0),Qe.toggleControls.call(e,!0),setTimeout((()=>{ie(t.controls,i.classNames.noTransition,!1)}),0);const s=this.touch?3e3:4e3;clearTimeout(n.controls),n.controls=setTimeout((()=>Qe.toggleControls.call(e,!1)),s)})),this.bind(t.inputs.volume,"wheel",(t=>{const i=t.webkitDirectionInvertedFromDevice,[n,s]=[t.deltaX,-t.deltaY].map((e=>i?-e:e)),o=Math.sign(Math.abs(n)>Math.abs(s)?n:s);e.increaseVolume(o/50);const{volume:a}=e.media;(1===o&&a<1||-1===o&&a>0)&&t.preventDefault()}),"volume",!1)})),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)}handleKey(e){const{player:t}=this,{elements:i}=t,{key:n,type:s,altKey:o,ctrlKey:a,metaKey:r,shiftKey:l}=e,c="keydown"===s,u=c&&n===this.lastKey;var d;if(!(o||a||r||l)&&n)if(c){const s=document.activeElement;if(j(s)){const{editable:n}=t.config.selectors,{seek:o}=i.inputs;if(s!==o&&se(s,n))return;if("Space"===e.key&&se(s,'button, [role^="menuitem"]'))return}switch(["Space","ArrowLeft","ArrowUp","ArrowRight","ArrowDown","0","1","2","3","4","5","6","7","8","9","c","f","k","l","m"].includes(n)&&(e.preventDefault(),e.stopPropagation()),n){case"0":case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":u||(d=parseInt(n,10),t.currentTime=t.duration/10*d);break;case"Space":case"k":u||be(t.togglePlay());break;case"ArrowUp":t.increaseVolume(.1);break;case"ArrowDown":t.decreaseVolume(.1);break;case"m":u||(t.muted=!t.muted);break;case"ArrowRight":t.forward();break;case"ArrowLeft":t.rewind();break;case"f":t.fullscreen.toggle();break;case"c":u||t.toggleCaptions();break;case"l":t.loop=!t.loop}"Escape"===n&&!t.fullscreen.usingNative&&t.fullscreen.active&&t.fullscreen.toggle(),this.lastKey=n}else this.lastKey=null}toggleMenu(e){qe.toggleMenu.call(this.player,e)}}"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self&&self;var et=function(e,t){return function(e,t){e.exports=function(){var e=function(){},t={},i={},n={};function s(e,t){e=e.push?e:[e];var s,o,a,r=[],l=e.length,c=l;for(s=function(e,i){i.length&&r.push(e),--c||t(r)};l--;)o=e[l],(a=i[o])?s(o,a):(n[o]=n[o]||[]).push(s)}function o(e,t){if(e){var s=n[e];if(i[e]=t,s)for(;s.length;)s[0](e,t),s.splice(0,1)}}function a(t,i){t.call&&(t={success:t}),i.length?(t.error||e)(i):(t.success||e)(t)}function r(t,i,n,s){var o,a,l=document,c=n.async,u=(n.numRetries||0)+1,d=n.before||e,h=t.replace(/[\?|#].*$/,""),p=t.replace(/^(css|img)!/,"");s=s||0,/(^css!|\.css$)/.test(h)?((a=l.createElement("link")).rel="stylesheet",a.href=p,(o="hideFocus"in a)&&a.relList&&(o=0,a.rel="preload",a.as="style")):/(^img!|\.(png|gif|jpg|svg|webp)$)/.test(h)?(a=l.createElement("img")).src=p:((a=l.createElement("script")).src=t,a.async=void 0===c||c),a.onload=a.onerror=a.onbeforeload=function(e){var l=e.type[0];if(o)try{a.sheet.cssText.length||(l="e")}catch(e){18!=e.code&&(l="e")}if("e"==l){if((s+=1){et(e,{success:t,error:i})}))}function it(e){e&&!this.embed.hasPlayed&&(this.embed.hasPlayed=!0),this.media.paused===e&&(this.media.paused=!e,fe.call(this,this.media,e?"play":"pause"))}const nt={setup(){const e=this;ie(e.elements.wrapper,e.config.classNames.embed,!0),e.options.speed=e.config.speed.options,Ee.call(e),P(window.Vimeo)?nt.ready.call(e):tt(e.config.urls.vimeo.sdk).then((()=>{nt.ready.call(e)})).catch((t=>{e.debug.warn("Vimeo SDK (player.js) failed to load",t)}))},ready(){const e=this,t=e.config.vimeo,{premium:i,referrerPolicy:n,...s}=t;let o=e.media.getAttribute("src"),a="";R(o)?(o=e.media.getAttribute(e.config.attributes.embed.id),a=e.media.getAttribute(e.config.attributes.embed.hash)):a=function(e){const t=e.match(/^.*(vimeo.com\/|video\/)(\d+)(\?.*&*h=|\/)+([\d,a-f]+)/);return t&&5===t.length?t[4]:null}(o);const r=a?{h:a}:{};i&&Object.assign(s,{controls:!1,sidedock:!1});const l=ze({loop:e.config.loop.active,autoplay:e.autoplay,muted:e.muted,gesture:"media",playsinline:!this.config.fullscreen.iosNative,...r,...s}),c=R(u=o)?null:$(Number(u))?u:u.match(/^.*(vimeo.com\/|video\/)(\d+).*/)?RegExp.$2:u;var u;const d=J("iframe"),h=Pe(e.config.urls.vimeo.iframe,c,l);if(d.setAttribute("src",h),d.setAttribute("allowfullscreen",""),d.setAttribute("allow",["autoplay","fullscreen","picture-in-picture","encrypted-media","accelerometer","gyroscope"].join("; ")),R(n)||d.setAttribute("referrerPolicy",n),i||!t.customControls)d.setAttribute("data-poster",e.poster),e.media=Z(d,e.media);else{const t=J("div",{class:e.config.classNames.embedContainer,"data-poster":e.poster});t.appendChild(d),e.media=Z(t,e.media)} t.customControls||De(Pe(e.config.urls.vimeo.api,h)).then((t=>{!R(t)&&t.thumbnail_url&&Qe.setPoster.call(e,t.thumbnail_url).catch((()=>{}))})),e.embed=new window.Vimeo.Player(d,{autopause:e.config.autopause,muted:e.muted}),e.media.paused=!0,e.media.currentTime=0,e.supported.ui&&e.embed.disableTextTrack(),e.media.play=()=>(it.call(e,!0),e.embed.play()),e.media.pause=()=>(it.call(e,!1),e.embed.pause()),e.media.stop=()=>{e.pause(),e.currentTime=0};let{currentTime:p}=e.media;Object.defineProperty(e.media,"currentTime",{get:()=>p,set(t){const{embed:i,media:n,paused:s,volume:o}=e,a=s&&!i.hasPlayed;n.seeking=!0,fe.call(e,n,"seeking"),Promise.resolve(a&&i.setVolume(0)).then((()=>i.setCurrentTime(t))).then((()=>a&&i.pause())).then((()=>a&&i.setVolume(o))).catch((()=>{}))}});let m=e.config.speed.selected;Object.defineProperty(e.media,"playbackRate",{get:()=>m,set(t){e.embed.setPlaybackRate(t).then((()=>{m=t,fe.call(e,e.media,"ratechange")})).catch((()=>{e.options.speed=[1]}))}});let{volume:f}=e.config;Object.defineProperty(e.media,"volume",{get:()=>f,set(t){e.embed.setVolume(t).then((()=>{f=t,fe.call(e,e.media,"volumechange")}))}});let{muted:g}=e.config;Object.defineProperty(e.media,"muted",{get:()=>g,set(t){const i=!!I(t)&&t;e.embed.setVolume(i?0:e.config.volume).then((()=>{g=i,fe.call(e,e.media,"volumechange")}))}});let y,{loop:b}=e.config;Object.defineProperty(e.media,"loop",{get:()=>b,set(t){const i=I(t)?t:e.config.loop.active;e.embed.setLoop(i).then((()=>{b=i}))}}),e.embed.getVideoUrl().then((t=>{y=t,qe.setDownloadUrl.call(e)})).catch((e=>{this.debug.warn(e)})),Object.defineProperty(e.media,"currentSrc",{get:()=>y}),Object.defineProperty(e.media,"ended",{get:()=>e.currentTime===e.duration}),Promise.all([e.embed.getVideoWidth(),e.embed.getVideoHeight()]).then((t=>{const[i,n]=t;e.embed.ratio=Ae(i,n),Ee.call(this)})),e.embed.setAutopause(e.config.autopause).then((t=>{e.config.autopause=t})),e.embed.getVideoTitle().then((t=>{e.config.title=t,Qe.setTitle.call(this)})),e.embed.getCurrentTime().then((t=>{p=t,fe.call(e,e.media,"timeupdate")})),e.embed.getDuration().then((t=>{e.media.duration=t,fe.call(e,e.media,"durationchange")})),e.embed.getTextTracks().then((t=>{e.media.textTracks=t,Be.setup.call(e)})),e.embed.on("cuechange",(({cues:t=[]})=>{const i=t.map((e=>function(e){const t=document.createDocumentFragment(),i=document.createElement("div");return t.appendChild(i),i.innerHTML=e,t.firstChild.innerText}(e.text)));Be.updateCues.call(e,i)})),e.embed.on("loaded",(()=>{e.embed.getPaused().then((t=>{it.call(e,!t),t||fe.call(e,e.media,"playing")})),j(e.embed.element)&&e.supported.ui&&e.embed.element.setAttribute("tabindex",-1)})),e.embed.on("bufferstart",(()=>{fe.call(e,e.media,"waiting")})),e.embed.on("bufferend",(()=>{fe.call(e,e.media,"playing")})),e.embed.on("play",(()=>{it.call(e,!0),fe.call(e,e.media,"playing")})),e.embed.on("pause",(()=>{it.call(e,!1)})),e.embed.on("timeupdate",(t=>{e.media.seeking=!1,p=t.seconds,fe.call(e,e.media,"timeupdate")})),e.embed.on("progress",(t=>{e.media.buffered=t.percent,fe.call(e,e.media,"progress"),1===parseInt(t.percent,10)&&fe.call(e,e.media,"canplaythrough"),e.embed.getDuration().then((t=>{t!==e.media.duration&&(e.media.duration=t,fe.call(e,e.media,"durationchange"))}))})),e.embed.on("seeked",(()=>{e.media.seeking=!1,fe.call(e,e.media,"seeked")})),e.embed.on("ended",(()=>{e.media.paused=!0,fe.call(e,e.media,"ended")})),e.embed.on("error",(t=>{e.media.error=t,fe.call(e,e.media,"error")})),t.customControls&&setTimeout((()=>Qe.build.call(e)),0)}};function st(e){e&&!this.embed.hasPlayed&&(this.embed.hasPlayed=!0),this.media.paused===e&&(this.media.paused=!e,fe.call(this,this.media,e?"play":"pause"))}function ot(e){return e.noCookie?"https://www.youtube-nocookie.com":"http:"===window.location.protocol?"http://www.youtube.com":void 0}const at={setup(){if(ie(this.elements.wrapper,this.config.classNames.embed,!0),P(window.YT)&&L(window.YT.Player))at.ready.call(this);else{const e=window.onYouTubeIframeAPIReady;window.onYouTubeIframeAPIReady=()=>{L(e)&&e(),at.ready.call(this)},tt(this.config.urls.youtube.sdk).catch((e=>{this.debug.warn("YouTube API failed to load",e)}))}},getTitle(e){De(Pe(this.config.urls.youtube.api,e)).then((e=>{if(P(e)){const{title:t,height:i,width:n}=e;this.config.title=t,Qe.setTitle.call(this),this.embed.ratio=Ae(n,i)}Ee.call(this)})).catch((()=>{Ee.call(this)}))},ready(){const e=this,t=e.config.youtube,i=e.media&&e.media.getAttribute("id");if(!R(i)&&i.startsWith("youtube-"))return;let n=e.media.getAttribute("src");R(n)&&(n=e.media.getAttribute(this.config.attributes.embed.id));const s=R(o=n)?null:o.match(/^.*(youtu.be\/|v\/|u\/\w\/|embed\/|watch\?v=|&v=)([^#&?]*).*/)?RegExp.$2:o;var o;const a=J("div",{id:`${e.provider}-${Math.floor(1e4*Math.random())}`,"data-poster":t.customControls?e.poster:void 0});if(e.media=Z(a,e.media),t.customControls){const t=e=>`https://i.ytimg.com/vi/${s}/${e}default.jpg`;Ge(t("maxres"),121).catch((()=>Ge(t("sd"),121))).catch((()=>Ge(t("hq")))).then((t=>Qe.setPoster.call(e,t.src))).then((t=>{t.includes("maxres")||(e.elements.poster.style.backgroundSize="cover")})).catch((()=>{}))}e.embed=new window.YT.Player(e.media,{videoId:s,host:ot(t),playerVars:U({},{autoplay:e.config.autoplay?1:0,hl:e.config.hl,controls:e.supported.ui&&t.customControls?0:1,disablekb:1,playsinline:e.config.fullscreen.iosNative?0:1,cc_load_policy:e.captions.active?1:0,cc_lang_pref:e.config.captions.language,widget_referrer:window?window.location.href:null},t),events:{onError(t){if(!e.media.error){const i=t.data,n={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";e.media.error={code:i,message:n},fe.call(e,e.media,"error")}},onPlaybackRateChange(t){const i=t.target;e.media.playbackRate=i.getPlaybackRate(),fe.call(e,e.media,"ratechange")},onReady(i){if(L(e.media.play))return;const n=i.target;at.getTitle.call(e,s),e.media.play=()=>{st.call(e,!0),n.playVideo()},e.media.pause=()=>{st.call(e,!1),n.pauseVideo()},e.media.stop=()=>{n.stopVideo()},e.media.duration=n.getDuration(),e.media.paused=!0,e.media.currentTime=0,Object.defineProperty(e.media,"currentTime",{get:()=>Number(n.getCurrentTime()),set(t){e.paused&&!e.embed.hasPlayed&&e.embed.mute(),e.media.seeking=!0,fe.call(e,e.media,"seeking"),n.seekTo(t)}}),Object.defineProperty(e.media,"playbackRate",{get:()=>n.getPlaybackRate(),set(e){n.setPlaybackRate(e)}});let{volume:o}=e.config;Object.defineProperty(e.media,"volume",{get:()=>o,set(t){o=t,n.setVolume(100*o),fe.call(e,e.media,"volumechange")}});let{muted:a}=e.config;Object.defineProperty(e.media,"muted",{get:()=>a,set(t){const i=I(t)?t:a;a=i,n[i?"mute":"unMute"](),n.setVolume(100*o),fe.call(e,e.media,"volumechange")}}),Object.defineProperty(e.media,"currentSrc",{get:()=>n.getVideoUrl()}),Object.defineProperty(e.media,"ended",{get:()=>e.currentTime===e.duration});const r=n.getAvailablePlaybackRates();e.options.speed=r.filter((t=>e.config.speed.options.includes(t))),e.supported.ui&&t.customControls&&e.media.setAttribute("tabindex",-1),fe.call(e,e.media,"timeupdate"),fe.call(e,e.media,"durationchange"),clearInterval(e.timers.buffering),e.timers.buffering=setInterval((()=>{e.media.buffered=n.getVideoLoadedFraction(),(null===e.media.lastBuffered||e.media.lastBufferedQe.build.call(e)),50)},onStateChange(i){const n=i.target;switch(clearInterval(e.timers.playing),e.media.seeking&&[1,2].includes(i.data)&&(e.media.seeking=!1,fe.call(e,e.media,"seeked")),i.data){case-1:fe.call(e,e.media,"timeupdate"),e.media.buffered=n.getVideoLoadedFraction(),fe.call(e,e.media,"progress");break;case 0:st.call(e,!1),e.media.loop?(n.stopVideo(),n.playVideo()):fe.call(e,e.media,"ended");break;case 1:t.customControls&&!e.config.autoplay&&e.media.paused&&!e.embed.hasPlayed?e.media.pause():(st.call(e,!0),fe.call(e,e.media,"playing"),e.timers.playing=setInterval((()=>{fe.call(e,e.media,"timeupdate")}),50),e.media.duration!==n.getDuration()&&(e.media.duration=n.getDuration(),fe.call(e,e.media,"durationchange")));break;case 2:e.muted||e.embed.unMute(),st.call(e,!1);break;case 3:fe.call(e,e.media,"waiting")}fe.call(e,e.elements.container,"statechange",!1,{code:i.data})}}})}},rt={setup(){this.media?(ie(this.elements.container,this.config.classNames.type.replace("{0}",this.type),!0),ie(this.elements.container,this.config.classNames.provider.replace("{0}",this.provider),!0),this.isEmbed&&ie(this.elements.container,this.config.classNames.type.replace("{0}","video"),!0),this.isVideo&&(this.elements.wrapper=J("div",{class:this.config.classNames.video}),K(this.media,this.elements.wrapper),this.elements.poster=J("div",{class:this.config.classNames.poster}),this.elements.wrapper.appendChild(this.elements.poster)),this.isHTML5?xe.setup.call(this):this.isYouTube?at.setup.call(this):this.isVimeo&&nt.setup.call(this)):this.debug.warn("No media element found!")}};class lt{constructor(t){e(this,"load",(()=>{this.enabled&&(P(window.google)&&P(window.google.ima)?this.ready():tt(this.player.config.urls.googleIMA.sdk).then((()=>{this.ready()})).catch((()=>{this.trigger("error",new Error("Google IMA SDK failed to load"))})))})),e(this,"ready",(()=>{var e;this.enabled||((e=this).manager&&e.manager.destroy(),e.elements.displayContainer&&e.elements.displayContainer.destroy(),e.elements.container.remove()),this.startSafetyTimer(12e3,"ready()"),this.managerPromise.then((()=>{this.clearSafetyTimer("onAdsManagerLoaded()")})),this.listeners(),this.setupIMA()})),e(this,"setupIMA",(()=>{this.elements.container=J("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),google.ima.settings.setDisableCustomPlaybackForIOS10Plus(this.player.config.playsinline),this.elements.displayContainer=new google.ima.AdDisplayContainer(this.elements.container,this.player.media),this.loader=new google.ima.AdsLoader(this.elements.displayContainer),this.loader.addEventListener(google.ima.AdsManagerLoadedEvent.Type.ADS_MANAGER_LOADED,(e=>this.onAdsManagerLoaded(e)),!1),this.loader.addEventListener(google.ima.AdErrorEvent.Type.AD_ERROR,(e=>this.onAdError(e)),!1),this.requestAds()})),e(this,"requestAds",(()=>{const{container:e}=this.player.elements;try{const t=new google.ima.AdsRequest;t.adTagUrl=this.tagUrl,t.linearAdSlotWidth=e.offsetWidth,t.linearAdSlotHeight=e.offsetHeight,t.nonLinearAdSlotWidth=e.offsetWidth,t.nonLinearAdSlotHeight=e.offsetHeight,t.forceNonLinearFullSlot=!1,t.setAdWillPlayMuted(!this.player.muted),this.loader.requestAds(t)}catch(e){this.onAdError(e)}})),e(this,"pollCountdown",((e=!1)=>{if(!e)return clearInterval(this.countdownTimer),void this.elements.container.removeAttribute("data-badge-text");this.countdownTimer=setInterval((()=>{const e=$e(Math.max(this.manager.getRemainingTime(),0)),t=`${Oe.get("advertisement",this.player.config)} - ${e}`;this.elements.container.setAttribute("data-badge-text",t)}),100)})),e(this,"onAdsManagerLoaded",(e=>{if(!this.enabled)return;const t=new google.ima.AdsRenderingSettings;t.restoreCustomPlaybackStateOnAdBreakComplete=!0,t.enablePreloading=!0,this.manager=e.getAdsManager(this.player,t),this.cuePoints=this.manager.getCuePoints(),this.manager.addEventListener(google.ima.AdErrorEvent.Type.AD_ERROR,(e=>this.onAdError(e))),Object.keys(google.ima.AdEvent.Type).forEach((e=>{this.manager.addEventListener(google.ima.AdEvent.Type[e],(e=>this.onAdEvent(e)))})),this.trigger("loaded")})),e(this,"addCuePoints",(()=>{R(this.cuePoints)||this.cuePoints.forEach((e=>{if(0!==e&&-1!==e&&e{const{container:t}=this.player.elements,i=e.getAd(),n=e.getAdData();switch((e=>{fe.call(this.player,this.player.media,`ads${e.replace(/_/g,"").toLowerCase()}`)})(e.type),e.type){case google.ima.AdEvent.Type.LOADED:this.trigger("loaded"),this.pollCountdown(!0),i.isLinear()||(i.width=t.offsetWidth,i.height=t.offsetHeight);break;case google.ima.AdEvent.Type.STARTED:this.manager.setVolume(this.player.volume);break;case google.ima.AdEvent.Type.ALL_ADS_COMPLETED:this.player.ended?this.loadAds():this.loader.contentComplete();break;case google.ima.AdEvent.Type.CONTENT_PAUSE_REQUESTED:this.pauseContent();break;case google.ima.AdEvent.Type.CONTENT_RESUME_REQUESTED:this.pollCountdown(),this.resumeContent();break;case google.ima.AdEvent.Type.LOG:n.adError&&this.player.debug.warn(`Non-fatal ad error: ${n.adError.getMessage()}`)}})),e(this,"onAdError",(e=>{this.cancel(),this.player.debug.warn("Ads error",e)})),e(this,"listeners",(()=>{const{container:e}=this.player.elements;let t;this.player.on("canplay",(()=>{this.addCuePoints()})),this.player.on("ended",(()=>{this.loader.contentComplete()})),this.player.on("timeupdate",(()=>{t=this.player.currentTime})),this.player.on("seeked",(()=>{const e=this.player.currentTime;R(this.cuePoints)||this.cuePoints.forEach(((i,n)=>{t{this.manager&&this.manager.resize(e.offsetWidth,e.offsetHeight,google.ima.ViewMode.NORMAL)}))})),e(this,"play",(()=>{const{container:e}=this.player.elements;this.managerPromise||this.resumeContent(),this.managerPromise.then((()=>{this.manager.setVolume(this.player.volume),this.elements.displayContainer.initialize();try{this.initialized||(this.manager.init(e.offsetWidth,e.offsetHeight,google.ima.ViewMode.NORMAL),this.manager.start()),this.initialized=!0}catch(e){this.onAdError(e)}})).catch((()=>{}))})),e(this,"resumeContent",(()=>{this.elements.container.style.zIndex="",this.playing=!1,be(this.player.media.play())})),e(this,"pauseContent",(()=>{this.elements.container.style.zIndex=3,this.playing=!0,this.player.media.pause()})),e(this,"cancel",(()=>{this.initialized&&this.resumeContent(),this.trigger("error"),this.loadAds()})),e(this,"loadAds",(()=>{this.managerPromise.then((()=>{this.manager&&this.manager.destroy(),this.managerPromise=new Promise((e=>{this.on("loaded",e),this.player.debug.log(this.manager)})),this.initialized=!1,this.requestAds()})).catch((()=>{}))})),e(this,"trigger",((e,...t)=>{const i=this.events[e];N(i)&&i.forEach((e=>{L(e)&&e.apply(this,t)}))})),e(this,"on",((e,t)=>(N(this.events[e])||(this.events[e]=[]),this.events[e].push(t),this))),e(this,"startSafetyTimer",((e,t)=>{this.player.debug.log(`Safety timer invoked from: ${t}`),this.safetyTimer=setTimeout((()=>{this.cancel(),this.clearSafetyTimer("startSafetyTimer()")}),e)})),e(this,"clearSafetyTimer",(e=>{x(this.safetyTimer)||(this.player.debug.log(`Safety timer cleared from: ${e}`),clearTimeout(this.safetyTimer),this.safetyTimer=null)})),this.player=t,this.config=t.config.ads,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(((e,t)=>{this.on("loaded",e),this.on("error",t)})),this.load()}get enabled(){const{config:e}=this;return this.player.isHTML5&&this.player.isVideo&&e.enabled&&(!R(e.publisherId)||q(e.tagUrl))}get tagUrl(){const{config:e}=this;return q(e.tagUrl)?e.tagUrl:`https://go.aniview.com/api/adserver6/vast/?${ze({AV_PUBLISHERID:"58c25bb0073ef448b1087ad6",AV_CHANNELID:"5a0458dc28a06145e4519d21",AV_URL:window.location.hostname,cb:Date.now(),AV_WIDTH:640,AV_HEIGHT:480,AV_CDIM2:e.publisherId})}`}}function ct(e=0,t=0,i=255){return Math.min(Math.max(e,t),i)}const ut=e=>{const t=[];return e.split(/\r\n\r\n|\n\n|\r\r/).forEach((e=>{const i={};e.split(/\r\n|\n|\r/).forEach((e=>{if($(i.startTime)){if(!R(e.trim())&&R(i.text)){const t=e.trim().split("#xywh=");[i.text]=t,t[1]&&([i.x,i.y,i.w,i.h]=t[1].split(","))}}else{const t=e.match(/([0-9]{2})?:?([0-9]{2}):([0-9]{2}).([0-9]{2,3})( ?--> ?)([0-9]{2})?:?([0-9]{2}):([0-9]{2}).([0-9]{2,3})/);t&&(i.startTime=60*Number(t[1]||0)*60+60*Number(t[2])+Number(t[3])+Number(`0.${t[4]}`),i.endTime=60*Number(t[6]||0)*60+60*Number(t[7])+Number(t[8])+Number(`0.${t[9]}`))}})),i.text&&t.push(i)})),t},dt=(e,t)=>{const i={};return e>t.width/t.height?(i.width=t.width,i.height=1/e*t.width):(i.height=t.height,i.width=e*t.height),i};class ht{constructor(t){e(this,"load",(()=>{this.player.elements.display.seekTooltip&&(this.player.elements.display.seekTooltip.hidden=this.enabled),this.enabled&&this.getThumbnails().then((()=>{this.enabled&&(this.render(),this.determineContainerAutoSizing(),this.loaded=!0)}))})),e(this,"getThumbnails",(()=>new Promise((e=>{const{src:t}=this.player.config.previewThumbnails;if(R(t))throw new Error("Missing previewThumbnails.src config attribute");const i=()=>{this.thumbnails.sort(((e,t)=>e.height-t.height)),this.player.debug.log("Preview thumbnails",this.thumbnails),e()};if(L(t))t((e=>{this.thumbnails=e,i()}));else{const e=(M(t)?[t]:t).map((e=>this.getThumbnail(e)));Promise.all(e).then(i)}})))),e(this,"getThumbnail",(e=>new Promise((t=>{De(e).then((i=>{const n={frames:ut(i),height:null,urlPrefix:""};n.frames[0].text.startsWith("/")||n.frames[0].text.startsWith("http://")||n.frames[0].text.startsWith("https://")||(n.urlPrefix=e.substring(0,e.lastIndexOf("/")+1));const s=new Image;s.onload=()=>{n.height=s.naturalHeight,n.width=s.naturalWidth,this.thumbnails.push(n),t()},s.src=n.urlPrefix+n.frames[0].text}))})))),e(this,"startMove",(e=>{if(this.loaded&&D(e)&&["touchmove","mousemove"].includes(e.type)&&this.player.media.duration){if("touchmove"===e.type)this.seekTime=this.player.media.duration*(this.player.elements.inputs.seek.value/100);else{var t,i;const n=this.player.elements.progress.getBoundingClientRect(),s=100/n.width*(e.pageX-n.left);this.seekTime=this.player.media.duration*(s/100),this.seekTime<0&&(this.seekTime=0),this.seekTime>this.player.media.duration-1&&(this.seekTime=this.player.media.duration-1),this.mousePosX=e.pageX,this.elements.thumb.time.innerText=$e(this.seekTime);const o=null===(t=this.player.config.markers)||void 0===t||null===(i=t.points)||void 0===i?void 0:i.find((({time:e})=>e===Math.round(this.seekTime)));o&&this.elements.thumb.time.insertAdjacentHTML("afterbegin",`${o.label}
`)}this.showImageAtCurrentTime()}})),e(this,"endMove",(()=>{this.toggleThumbContainer(!1,!0)})),e(this,"startScrubbing",(e=>{(x(e.button)||!1===e.button||0===e.button)&&(this.mouseDown=!0,this.player.media.duration&&(this.toggleScrubbingContainer(!0),this.toggleThumbContainer(!1,!0),this.showImageAtCurrentTime()))})),e(this,"endScrubbing",(()=>{this.mouseDown=!1,Math.ceil(this.lastTime)===Math.ceil(this.player.media.currentTime)?this.toggleScrubbingContainer(!1):me.call(this.player,this.player.media,"timeupdate",(()=>{this.mouseDown||this.toggleScrubbingContainer(!1)}))})),e(this,"listeners",(()=>{this.player.on("play",(()=>{this.toggleThumbContainer(!1,!0)})),this.player.on("seeked",(()=>{this.toggleThumbContainer(!1)})),this.player.on("timeupdate",(()=>{this.lastTime=this.player.media.currentTime}))})),e(this,"render",(()=>{this.elements.thumb.container=J("div",{class:this.player.config.classNames.previewThumbnails.thumbContainer}),this.elements.thumb.imageContainer=J("div",{class:this.player.config.classNames.previewThumbnails.imageContainer}),this.elements.thumb.container.appendChild(this.elements.thumb.imageContainer);const e=J("div",{class:this.player.config.classNames.previewThumbnails.timeContainer});this.elements.thumb.time=J("span",{},"00:00"),e.appendChild(this.elements.thumb.time),this.elements.thumb.imageContainer.appendChild(e),j(this.player.elements.progress)&&this.player.elements.progress.appendChild(this.elements.thumb.container),this.elements.scrubbing.container=J("div",{class:this.player.config.classNames.previewThumbnails.scrubbingContainer}),this.player.elements.wrapper.appendChild(this.elements.scrubbing.container)})),e(this,"destroy",(()=>{this.elements.thumb.container&&this.elements.thumb.container.remove(),this.elements.scrubbing.container&&this.elements.scrubbing.container.remove()})),e(this,"showImageAtCurrentTime",(()=>{this.mouseDown?this.setScrubbingContainerSize():this.setThumbContainerSizeAndPos();const e=this.thumbnails[0].frames.findIndex((e=>this.seekTime>=e.startTime&&this.seekTime<=e.endTime)),t=e>=0;let i=0;this.mouseDown||this.toggleThumbContainer(t),t&&(this.thumbnails.forEach(((t,n)=>{this.loadedImages.includes(t.frames[e].text)&&(i=n)})),e!==this.showingThumb&&(this.showingThumb=e,this.loadImage(i)))})),e(this,"loadImage",((e=0)=>{const t=this.showingThumb,i=this.thumbnails[e],{urlPrefix:n}=i,s=i.frames[t],o=i.frames[t].text,a=n+o;if(this.currentImageElement&&this.currentImageElement.dataset.filename===o)this.showImage(this.currentImageElement,s,e,t,o,!1),this.currentImageElement.dataset.index=t,this.removeOldImages(this.currentImageElement);else{this.loadingImage&&this.usingSprites&&(this.loadingImage.onload=null);const i=new Image;i.src=a,i.dataset.index=t,i.dataset.filename=o,this.showingThumbFilename=o,this.player.debug.log(`Loading image: ${a}`),i.onload=()=>this.showImage(i,s,e,t,o,!0),this.loadingImage=i,this.removeOldImages(i)}})),e(this,"showImage",((e,t,i,n,s,o=!0)=>{this.player.debug.log(`Showing thumb: ${s}. num: ${n}. qual: ${i}. newimg: ${o}`),this.setImageSizeAndOffset(e,t),o&&(this.currentImageContainer.appendChild(e),this.currentImageElement=e,this.loadedImages.includes(s)||this.loadedImages.push(s)),this.preloadNearby(n,!0).then(this.preloadNearby(n,!1)).then(this.getHigherQuality(i,e,t,s))})),e(this,"removeOldImages",(e=>{Array.from(this.currentImageContainer.children).forEach((t=>{if("img"!==t.tagName.toLowerCase())return;const i=this.usingSprites?500:1e3;if(t.dataset.index!==e.dataset.index&&!t.dataset.deleting){t.dataset.deleting=!0;const{currentImageContainer:e}=this;setTimeout((()=>{e.removeChild(t),this.player.debug.log(`Removing thumb: ${t.dataset.filename}`)}),i)}}))})),e(this,"preloadNearby",((e,t=!0)=>new Promise((i=>{setTimeout((()=>{const n=this.thumbnails[0].frames[e].text;if(this.showingThumbFilename===n){let s;s=t?this.thumbnails[0].frames.slice(e):this.thumbnails[0].frames.slice(0,e).reverse();let o=!1;s.forEach((e=>{const t=e.text;if(t!==n&&!this.loadedImages.includes(t)){o=!0,this.player.debug.log(`Preloading thumb filename: ${t}`);const{urlPrefix:e}=this.thumbnails[0],n=e+t,s=new Image;s.src=n,s.onload=()=>{this.player.debug.log(`Preloaded thumb filename: ${t}`),this.loadedImages.includes(t)||this.loadedImages.push(t),i()}}})),o||i()}}),300)})))),e(this,"getHigherQuality",((e,t,i,n)=>{if(e{this.showingThumbFilename===n&&(this.player.debug.log(`Showing higher quality thumb for: ${n}`),this.loadImage(e+1))}),300)}})),e(this,"toggleThumbContainer",((e=!1,t=!1)=>{const i=this.player.config.classNames.previewThumbnails.thumbContainerShown;this.elements.thumb.container.classList.toggle(i,e),!e&&t&&(this.showingThumb=null,this.showingThumbFilename=null)})),e(this,"toggleScrubbingContainer",((e=!1)=>{const t=this.player.config.classNames.previewThumbnails.scrubbingContainerShown;this.elements.scrubbing.container.classList.toggle(t,e),e||(this.showingThumb=null,this.showingThumbFilename=null)})),e(this,"determineContainerAutoSizing",(()=>{(this.elements.thumb.imageContainer.clientHeight>20||this.elements.thumb.imageContainer.clientWidth>20)&&(this.sizeSpecifiedInCSS=!0)})),e(this,"setThumbContainerSizeAndPos",(()=>{const{imageContainer:e}=this.elements.thumb;if(this.sizeSpecifiedInCSS){if(e.clientHeight>20&&e.clientWidth<20){const t=Math.floor(e.clientHeight*this.thumbAspectRatio);e.style.width=`${t}px`}else if(e.clientHeight<20&&e.clientWidth>20){const t=Math.floor(e.clientWidth/this.thumbAspectRatio);e.style.height=`${t}px`}}else{const t=Math.floor(this.thumbContainerHeight*this.thumbAspectRatio);e.style.height=`${this.thumbContainerHeight}px`,e.style.width=`${t}px`}this.setThumbContainerPos()})),e(this,"setThumbContainerPos",(()=>{const e=this.player.elements.progress.getBoundingClientRect(),t=this.player.elements.container.getBoundingClientRect(),{container:i}=this.elements.thumb,n=t.left-e.left+10,s=t.right-e.left-i.clientWidth-10,o=this.mousePosX-e.left-i.clientWidth/2,a=ct(o,n,s);i.style.left=`${a}px`,i.style.setProperty("--preview-arrow-offset",o-a+"px")})),e(this,"setScrubbingContainerSize",(()=>{const{width:e,height:t}=dt(this.thumbAspectRatio,{width:this.player.media.clientWidth,height:this.player.media.clientHeight});this.elements.scrubbing.container.style.width=`${e}px`,this.elements.scrubbing.container.style.height=`${t}px`})),e(this,"setImageSizeAndOffset",((e,t)=>{if(!this.usingSprites)return;const i=this.thumbContainerHeight/t.h;e.style.height=e.naturalHeight*i+"px",e.style.width=e.naturalWidth*i+"px",e.style.left=`-${t.x*i}px`,e.style.top=`-${t.y*i}px`})),this.player=t,this.thumbnails=[],this.loaded=!1,this.lastMouseMoveTime=Date.now(),this.mouseDown=!1,this.loadedImages=[],this.elements={thumb:{},scrubbing:{}},this.load()}get enabled(){return this.player.isHTML5&&this.player.isVideo&&this.player.config.previewThumbnails.enabled}get currentImageContainer(){return this.mouseDown?this.elements.scrubbing.container:this.elements.thumb.imageContainer}get usingSprites(){return Object.keys(this.thumbnails[0].frames[0]).includes("w")}get thumbAspectRatio(){return this.usingSprites?this.thumbnails[0].frames[0].w/this.thumbnails[0].frames[0].h:this.thumbnails[0].width/this.thumbnails[0].height}get thumbContainerHeight(){if(this.mouseDown){const{height:e}=dt(this.thumbAspectRatio,{width:this.player.media.clientWidth,height:this.player.media.clientHeight});return e}return this.sizeSpecifiedInCSS?this.elements.thumb.imageContainer.clientHeight:Math.floor(this.player.media.clientWidth/this.thumbAspectRatio/4)}get currentImageElement(){return this.mouseDown?this.currentScrubbingImageElement:this.currentThumbnailImageElement}set currentImageElement(e){this.mouseDown?this.currentScrubbingImageElement=e:this.currentThumbnailImageElement=e}}const pt={insertElements(e,t){M(t)?X(e,this.media,{src:t}):N(t)&&t.forEach((t=>{X(e,this.media,t)}))},change(e){W(e,"sources.length")?(xe.cancelRequests.call(this),this.destroy.call(this,(()=>{this.options.quality=[],G(this.media),this.media=null,j(this.elements.container)&&this.elements.container.removeAttribute("class");const{sources:t,type:i}=e,[{provider:n=Ue.html5,src:s}]=t,o="html5"===n?i:"div",a="html5"===n?{}:{src:s};Object.assign(this,{provider:n,type:i,supported:ce.check(i,n,this.config.playsinline),media:J(o,a)}),this.elements.container.appendChild(this.media),I(e.autoplay)&&(this.config.autoplay=e.autoplay),this.isHTML5&&(this.config.crossorigin&&this.media.setAttribute("crossorigin",""),this.config.autoplay&&this.media.setAttribute("autoplay",""),R(e.poster)||(this.poster=e.poster),this.config.loop.active&&this.media.setAttribute("loop",""),this.config.muted&&this.media.setAttribute("muted",""),this.config.playsinline&&this.media.setAttribute("playsinline","")),Qe.addStyleHook.call(this),this.isHTML5&&pt.insertElements.call(this,"source",t),this.config.title=e.title,rt.setup.call(this),this.isHTML5&&Object.keys(e).includes("tracks")&&pt.insertElements.call(this,"track",e.tracks),(this.isHTML5||this.isEmbed&&!this.supported.ui)&&Qe.build.call(this),this.isHTML5&&this.media.load(),R(e.previewThumbnails)||(Object.assign(this.config.previewThumbnails,e.previewThumbnails),this.previewThumbnails&&this.previewThumbnails.loaded&&(this.previewThumbnails.destroy(),this.previewThumbnails=null),this.config.previewThumbnails.enabled&&(this.previewThumbnails=new ht(this))),this.fullscreen.update()}),!0)):this.debug.warn("Invalid source format")}};class mt{constructor(t,i){if(e(this,"play",(()=>L(this.media.play)?(this.ads&&this.ads.enabled&&this.ads.managerPromise.then((()=>this.ads.play())).catch((()=>be(this.media.play()))),this.media.play()):null)),e(this,"pause",(()=>this.playing&&L(this.media.pause)?this.media.pause():null)),e(this,"togglePlay",(e=>(I(e)?e:!this.playing)?this.play():this.pause())),e(this,"stop",(()=>{this.isHTML5?(this.pause(),this.restart()):L(this.media.stop)&&this.media.stop()})),e(this,"restart",(()=>{this.currentTime=0})),e(this,"rewind",(e=>{this.currentTime-=$(e)?e:this.config.seekTime})),e(this,"forward",(e=>{this.currentTime+=$(e)?e:this.config.seekTime})),e(this,"increaseVolume",(e=>{const t=this.media.muted?0:this.volume;this.volume=t+($(e)?e:0)})),e(this,"decreaseVolume",(e=>{this.increaseVolume(-e)})),e(this,"airplay",(()=>{ce.airplay&&this.media.webkitShowPlaybackTargetPicker()})),e(this,"toggleControls",(e=>{if(this.supported.ui&&!this.isAudio){const t=ne(this.elements.container,this.config.classNames.hideControls),i=void 0===e?void 0:!e,n=ie(this.elements.container,this.config.classNames.hideControls,i);if(n&&N(this.config.controls)&&this.config.controls.includes("settings")&&!R(this.config.settings)&&qe.toggleMenu.call(this,!1),n!==t){const e=n?"controlshidden":"controlsshown";fe.call(this,this.media,e)}return!n}return!1})),e(this,"on",((e,t)=>{he.call(this,this.elements.container,e,t)})),e(this,"once",((e,t)=>{me.call(this,this.elements.container,e,t)})),e(this,"off",((e,t)=>{pe(this.elements.container,e,t)})),e(this,"destroy",((e,t=!1)=>{if(!this.ready)return;const i=()=>{document.body.style.overflow="",this.embed=null,t?(Object.keys(this.elements).length&&(G(this.elements.buttons.play),G(this.elements.captions),G(this.elements.controls),G(this.elements.wrapper),this.elements.buttons.play=null,this.elements.captions=null,this.elements.controls=null,this.elements.wrapper=null),L(e)&&e()):(ge.call(this),xe.cancelRequests.call(this),Z(this.elements.original,this.elements.container),fe.call(this,this.elements.original,"destroyed",!0),L(e)&&e.call(this.elements.original),this.ready=!1,setTimeout((()=>{this.elements=null,this.media=null}),200))};this.stop(),clearTimeout(this.timers.loading),clearTimeout(this.timers.controls),clearTimeout(this.timers.resized),this.isHTML5?(Qe.toggleNativeControls.call(this,!0),i()):this.isYouTube?(clearInterval(this.timers.buffering),clearInterval(this.timers.playing),null!==this.embed&&L(this.embed.destroy)&&this.embed.destroy(),i()):this.isVimeo&&(null!==this.embed&&this.embed.unload().then(i),setTimeout(i,200))})),e(this,"supports",(e=>ce.mime.call(this,e))),this.timers={},this.ready=!1,this.loading=!1,this.failed=!1,this.touch=ce.touch,this.media=t,M(this.media)&&(this.media=document.querySelectorAll(this.media)),(window.jQuery&&this.media instanceof jQuery||O(this.media)||N(this.media))&&(this.media=this.media[0]),this.config=U({},Ve,mt.defaults,i||{},(()=>{try{return JSON.parse(this.media.getAttribute("data-plyr-config"))}catch(e){return{}}})()),this.elements={container:null,fullscreen: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 Je(this.config.debug),this.debug.log("Config",this.config),this.debug.log("Support",ce),x(this.media)||!j(this.media))return void this.debug.error("Setup failed: no suitable element passed");if(this.media.plyr)return void this.debug.warn("Target already setup");if(!this.config.enabled)return void this.debug.error("Setup failed: disabled by config");if(!ce.check().api)return void this.debug.error("Setup failed: no support");const n=this.media.cloneNode(!0);n.autoplay=!1,this.elements.original=n;const s=this.media.tagName.toLowerCase();let o=null,a=null;switch(s){case"div":if(o=this.media.querySelector("iframe"),j(o)){if(a=Re(o.getAttribute("src")),this.provider=function(e){return/^(https?:\/\/)?(www\.)?(youtube\.com|youtube-nocookie\.com|youtu\.?be)\/.+$/.test(e)?Ue.youtube:/^https?:\/\/player.vimeo.com\/video\/\d{0,9}(?=\b|\/)/.test(e)?Ue.vimeo:null}(a.toString()),this.elements.container=this.media,this.media=o,this.elements.container.className="",a.search.length){const e=["1","true"];e.includes(a.searchParams.get("autoplay"))&&(this.config.autoplay=!0),e.includes(a.searchParams.get("loop"))&&(this.config.loop.active=!0),this.isYouTube?(this.config.playsinline=e.includes(a.searchParams.get("playsinline")),this.config.youtube.hl=a.searchParams.get("hl")):this.config.playsinline=!0}}else this.provider=this.media.getAttribute(this.config.attributes.embed.provider),this.media.removeAttribute(this.config.attributes.embed.provider);if(R(this.provider)||!Object.values(Ue).includes(this.provider))return void this.debug.error("Setup failed: Invalid provider");this.type=Ke;break;case"video":case"audio":this.type=s,this.provider=Ue.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=ce.check(this.type,this.provider,this.config.playsinline),this.supported.api?(this.eventListeners=[],this.listeners=new Ze(this),this.storage=new je(this),this.media.plyr=this,j(this.elements.container)||(this.elements.container=J("div",{tabindex:0}),K(this.media,this.elements.container)),Qe.migrateStyles.call(this),Qe.addStyleHook.call(this),rt.setup.call(this),this.config.debug&&he.call(this,this.elements.container,this.config.events.join(" "),(e=>{this.debug.log(`event: ${e.type}`)})),this.fullscreen=new Xe(this),(this.isHTML5||this.isEmbed&&!this.supported.ui)&&Qe.build.call(this),this.listeners.container(),this.listeners.global(),this.config.ads.enabled&&(this.ads=new lt(this)),this.isHTML5&&this.config.autoplay&&this.once("canplay",(()=>be(this.play()))),this.lastSeekTime=0,this.config.previewThumbnails.enabled&&(this.previewThumbnails=new ht(this))):this.debug.error("Setup failed: no support")}get isHTML5(){return this.provider===Ue.html5}get isEmbed(){return this.isYouTube||this.isVimeo}get isYouTube(){return this.provider===Ue.youtube}get isVimeo(){return this.provider===Ue.vimeo}get isVideo(){return this.type===Ke}get isAudio(){return"audio"===this.type}get playing(){return Boolean(this.ready&&!this.paused&&!this.ended)}get paused(){return Boolean(this.media.paused)}get stopped(){return Boolean(this.paused&&0===this.currentTime)}get ended(){return Boolean(this.media.ended)}set currentTime(e){if(!this.duration)return;const t=$(e)&&e>0;this.media.currentTime=t?Math.min(e,this.duration):0,this.debug.log(`Seeking to ${this.currentTime} seconds`)}get currentTime(){return Number(this.media.currentTime)}get buffered(){const{buffered:e}=this.media;return $(e)?e:e&&e.length&&this.duration>0?e.end(0)/this.duration:0}get seeking(){return Boolean(this.media.seeking)}get duration(){const e=parseFloat(this.config.duration),t=(this.media||{}).duration,i=$(t)&&t!==1/0?t:0;return e||i}set volume(e){let t=e;M(t)&&(t=Number(t)),$(t)||(t=this.storage.get("volume")),$(t)||({volume:t}=this.config),t>1&&(t=1),t<0&&(t=0),this.config.volume=t,this.media.volume=t,!R(e)&&this.muted&&t>0&&(this.muted=!1)}get volume(){return Number(this.media.volume)}set muted(e){let t=e;I(t)||(t=this.storage.get("muted")),I(t)||(t=this.config.muted),this.config.muted=t,this.media.muted=t}get muted(){return Boolean(this.media.muted)}get hasAudio(){return!this.isHTML5||!!this.isAudio||Boolean(this.media.mozHasAudio)||Boolean(this.media.webkitAudioDecodedByteCount)||Boolean(this.media.audioTracks&&this.media.audioTracks.length)}set speed(e){let t=null;$(e)&&(t=e),$(t)||(t=this.storage.get("speed")),$(t)||(t=this.config.speed.selected);const{minimumSpeed:i,maximumSpeed:n}=this;t=ct(t,i,n),this.config.speed.selected=t,setTimeout((()=>{this.media&&(this.media.playbackRate=t)}),0)}get speed(){return Number(this.media.playbackRate)}get minimumSpeed(){return this.isYouTube?Math.min(...this.options.speed):this.isVimeo?.5:.0625}get maximumSpeed(){return this.isYouTube?Math.max(...this.options.speed):this.isVimeo?2:16}set quality(e){const t=this.config.quality,i=this.options.quality;if(!i.length)return;let n=[!R(e)&&Number(e),this.storage.get("quality"),t.selected,t.default].find($),s=!0;if(!i.includes(n)){const e=we(i,n);this.debug.warn(`Unsupported quality option: ${n}, using ${e} instead`),n=e,s=!1}t.selected=n,this.media.quality=n,s&&this.storage.set({quality:n})}get quality(){return this.media.quality}set loop(e){const t=I(e)?e:this.config.loop.active;this.config.loop.active=t,this.media.loop=t}get loop(){return Boolean(this.media.loop)}set source(e){pt.change.call(this,e)}get source(){return this.media.currentSrc}get download(){const{download:e}=this.config.urls;return q(e)?e:this.source}set download(e){q(e)&&(this.config.urls.download=e,qe.setDownloadUrl.call(this))}set poster(e){this.isVideo?Qe.setPoster.call(this,e,!1).catch((()=>{})):this.debug.warn("Poster can only be set for video")}get poster(){return this.isVideo?this.media.getAttribute("poster")||this.media.getAttribute("data-poster"):null}get ratio(){if(!this.isVideo)return null;const e=_e(Se.call(this));return N(e)?e.join(":"):e}set ratio(e){this.isVideo?M(e)&&Ce(e)?(this.config.ratio=_e(e),Ee.call(this)):this.debug.error(`Invalid aspect ratio specified (${e})`):this.debug.warn("Aspect ratio can only be set for video")}set autoplay(e){this.config.autoplay=I(e)?e:this.config.autoplay}get autoplay(){return Boolean(this.config.autoplay)}toggleCaptions(e){Be.toggle.call(this,e,!1)}set currentTrack(e){Be.set.call(this,e,!1),Be.setup.call(this)}get currentTrack(){const{toggled:e,currentTrack:t}=this.captions;return e?t:-1}set language(e){Be.setLanguage.call(this,e,!1)}get language(){return(Be.getCurrentTrack.call(this)||{}).language}set pip(e){if(!ce.pip)return;const t=I(e)?e:!this.pip;L(this.media.webkitSetPresentationMode)&&this.media.webkitSetPresentationMode(t?We:"inline"),L(this.media.requestPictureInPicture)&&(!this.pip&&t?this.media.requestPictureInPicture():this.pip&&!t&&document.exitPictureInPicture())}get pip(){return ce.pip?R(this.media.webkitPresentationMode)?this.media===document.pictureInPictureElement:this.media.webkitPresentationMode===We:null}setPreviewThumbnails(e){this.previewThumbnails&&this.previewThumbnails.loaded&&(this.previewThumbnails.destroy(),this.previewThumbnails=null),Object.assign(this.config.previewThumbnails,e),this.config.previewThumbnails.enabled&&(this.previewThumbnails=new ht(this))}static supported(e,t,i){return ce.check(e,t,i)}static loadSprite(e,t){return He(e,t)}static setup(e,t={}){let i=null;return M(e)?i=Array.from(document.querySelectorAll(e)):O(e)?i=Array.from(e):N(e)&&(i=e.filter(j)),R(i)?null:i.map((e=>new mt(e,t)))}}var ft;return mt.defaults=(ft=Ve,JSON.parse(JSON.stringify(ft))),mt})); //# sourceMappingURL=plugins.js.map