plyr/dist/plyr.polyfilled.min.js
2019-04-25 12:14:48 +10:00

3 lines
177 KiB
JavaScript
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

"object"==typeof navigator&&function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define("Plyr",t):(e=e||self).Plyr=t()}(this,function(){"use strict";!function(){if("undefined"!=typeof window)try{var e=new window.CustomEvent("test",{cancelable:!0});if(e.preventDefault(),!0!==e.defaultPrevented)throw new Error("Could not prevent default")}catch(e){var t=function(e,t){var n,i;return(t=t||{}).bubbles=!!t.bubbles,t.cancelable=!!t.cancelable,(n=document.createEvent("CustomEvent")).initCustomEvent(e,t.bubbles,t.cancelable,t.detail),i=n.preventDefault,n.preventDefault=function(){i.call(this);try{Object.defineProperty(this,"defaultPrevented",{get:function(){return!0}})}catch(e){this.defaultPrevented=!0}},n};t.prototype=window.Event.prototype,window.CustomEvent=t}}();var e="object"==typeof window&&window&&window.Math==Math?window:"object"==typeof self&&self&&self.Math==Math?self:Function("return this")(),t={}.hasOwnProperty,n=function(e,n){return t.call(e,n)},i=function(e){try{return!!e()}catch(e){return!0}},r=!i(function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a}),a={}.propertyIsEnumerable,o=Object.getOwnPropertyDescriptor,s={f:o&&!a.call({1:2},1)?function(e){var t=o(this,e);return!!t&&t.enumerable}:a},l=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}},c={}.toString,u=function(e){return c.call(e).slice(8,-1)},h="".split,f=i(function(){return!Object("z").propertyIsEnumerable(0)})?function(e){return"String"==u(e)?h.call(e,""):Object(e)}:Object,d=function(e){if(null==e)throw TypeError("Can't call method on "+e);return e},p=function(e){return f(d(e))},m=function(e){return"object"==typeof e?null!==e:"function"==typeof e},g=function(e,t){if(!m(e))return e;var n,i;if(t&&"function"==typeof(n=e.toString)&&!m(i=n.call(e)))return i;if("function"==typeof(n=e.valueOf)&&!m(i=n.call(e)))return i;if(!t&&"function"==typeof(n=e.toString)&&!m(i=n.call(e)))return i;throw TypeError("Can't convert object to primitive value")},v=e.document,y=m(v)&&m(v.createElement),b=function(e){return y?v.createElement(e):{}},w=!r&&!i(function(){return 7!=Object.defineProperty(b("div"),"a",{get:function(){return 7}}).a}),k=Object.getOwnPropertyDescriptor,T={f:r?k:function(e,t){if(e=p(e),t=g(t,!0),w)try{return k(e,t)}catch(e){}if(n(e,t))return l(!s.f.call(e,t),e[t])}},S=function(e){if(!m(e))throw TypeError(String(e)+" is not an object");return e},E=Object.defineProperty,A={f:r?E:function(e,t,n){if(S(e),t=g(t,!0),S(n),w)try{return E(e,t,n)}catch(e){}if("get"in n||"set"in n)throw TypeError("Accessors not supported");return"value"in n&&(e[t]=n.value),e}},x=r?function(e,t,n){return A.f(e,t,l(1,n))}:function(e,t,n){return e[t]=n,e},P="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function C(e,t){return e(t={exports:{}},t.exports),t.exports}var L,I,M,N=function(t,n){try{x(e,t,n)}catch(i){e[t]=n}return n},j=C(function(t){var n=e["__core-js_shared__"]||N("__core-js_shared__",{});(t.exports=function(e,t){return n[e]||(n[e]=void 0!==t?t:{})})("versions",[]).push({version:"3.0.1",mode:"global",copyright:"© 2019 Denis Pushkarev (zloirock.ru)"})}),O=j("native-function-to-string",Function.toString),_=e.WeakMap,R="function"==typeof _&&/native code/.test(O.call(_)),U=0,F=Math.random(),q=function(e){return"Symbol(".concat(void 0===e?"":e,")_",(++U+F).toString(36))},D=j("keys"),B=function(e){return D[e]||(D[e]=q(e))},H={},V=e.WeakMap;if(R){var z=new V,W=z.get,K=z.has,Y=z.set;L=function(e,t){return Y.call(z,e,t),t},I=function(e){return W.call(z,e)||{}},M=function(e){return K.call(z,e)}}else{var $=B("state");H[$]=!0,L=function(e,t){return x(e,$,t),t},I=function(e){return n(e,$)?e[$]:{}},M=function(e){return n(e,$)}}var G={set:L,get:I,has:M,enforce:function(e){return M(e)?I(e):L(e,{})},getterFor:function(e){return function(t){var n;if(!m(t)||(n=I(t)).type!==e)throw TypeError("Incompatible receiver, "+e+" required");return n}}},Q=C(function(t){var i=G.get,r=G.enforce,a=String(O).split("toString");j("inspectSource",function(e){return O.call(e)}),(t.exports=function(t,i,o,s){var l=!!s&&!!s.unsafe,c=!!s&&!!s.enumerable,u=!!s&&!!s.noTargetGet;"function"==typeof o&&("string"!=typeof i||n(o,"name")||x(o,"name",i),r(o).source=a.join("string"==typeof i?i:"")),t!==e?(l?!u&&t[i]&&(c=!0):delete t[i],c?t[i]=o:x(t,i,o)):c?t[i]=o:N(i,o)})(Function.prototype,"toString",function(){return"function"==typeof this&&i(this).source||O.call(this)})}),X=Math.ceil,J=Math.floor,Z=function(e){return isNaN(e=+e)?0:(e>0?J:X)(e)},ee=Math.min,te=function(e){return e>0?ee(Z(e),9007199254740991):0},ne=Math.max,ie=Math.min,re=function(e,t){var n=Z(e);return n<0?ne(n+t,0):ie(n,t)},ae=function(e){return function(t,n,i){var r,a=p(t),o=te(a.length),s=re(i,o);if(e&&n!=n){for(;o>s;)if((r=a[s++])!=r)return!0}else for(;o>s;s++)if((e||s in a)&&a[s]===n)return e||s||0;return!e&&-1}},oe=ae(!1),se=function(e,t){var i,r=p(e),a=0,o=[];for(i in r)!n(H,i)&&n(r,i)&&o.push(i);for(;t.length>a;)n(r,i=t[a++])&&(~oe(o,i)||o.push(i));return o},le=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],ce=le.concat("length","prototype"),ue={f:Object.getOwnPropertyNames||function(e){return se(e,ce)}},he={f:Object.getOwnPropertySymbols},fe=e.Reflect,de=fe&&fe.ownKeys||function(e){var t=ue.f(S(e)),n=he.f;return n?t.concat(n(e)):t},pe=function(e,t){for(var i=de(t),r=A.f,a=T.f,o=0;o<i.length;o++){var s=i[o];n(e,s)||r(e,s,a(t,s))}},me=/#|\.prototype\./,ge=function(e,t){var n=ye[ve(e)];return n==we||n!=be&&("function"==typeof t?i(t):!!t)},ve=ge.normalize=function(e){return String(e).replace(me,".").toLowerCase()},ye=ge.data={},be=ge.NATIVE="N",we=ge.POLYFILL="P",ke=ge,Te=T.f,Se=function(t,n){var i,r,a,o,s,l=t.target,c=t.global,u=t.stat;if(i=c?e:u?e[l]||N(l,{}):(e[l]||{}).prototype)for(r in n){if(o=n[r],a=t.noTargetGet?(s=Te(i,r))&&s.value:i[r],!ke(c?r:l+(u?".":"#")+r,t.forced)&&void 0!==a){if(typeof o==typeof a)continue;pe(o,a)}(t.sham||a&&a.sham)&&x(o,"sham",!0),Q(i,r,o,t)}},Ee=!i(function(){return!String(Symbol())}),Ae=j("wks"),xe=e.Symbol,Pe=function(e){return Ae[e]||(Ae[e]=Ee&&xe[e]||(Ee?xe:q)("Symbol."+e))},Ce=A.f,Le=Pe("toStringTag"),Ie=function(e,t,i){e&&!n(e=i?e:e.prototype,Le)&&Ce(e,Le,{configurable:!0,value:t})},Me={f:Pe},Ne=e,je=A.f,Oe=function(e){var t=Ne.Symbol||(Ne.Symbol={});n(t,e)||je(t,e,{value:Me.f(e)})},_e=Object.keys||function(e){return se(e,le)},Re=Array.isArray||function(e){return"Array"==u(e)},Ue=r?Object.defineProperties:function(e,t){S(e);for(var n,i=_e(t),r=i.length,a=0;r>a;)A.f(e,n=i[a++],t[n]);return e},Fe=e.document,qe=Fe&&Fe.documentElement,De=B("IE_PROTO"),Be=function(){},He=function(){var e,t=b("iframe"),n=le.length;for(t.style.display="none",qe.appendChild(t),t.src=String("javascript:"),(e=t.contentWindow.document).open(),e.write("<script>document.F=Object<\/script>"),e.close(),He=e.F;n--;)delete He.prototype[le[n]];return He()},Ve=Object.create||function(e,t){var n;return null!==e?(Be.prototype=S(e),n=new Be,Be.prototype=null,n[De]=e):n=He(),void 0===t?n:Ue(n,t)};H[De]=!0;var ze=ue.f,We={}.toString,Ke="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],Ye={f:function(e){return Ke&&"[object Window]"==We.call(e)?function(e){try{return ze(e)}catch(e){return Ke.slice()}}(e):ze(p(e))}},$e=B("hidden"),Ge=G.set,Qe=G.getterFor("Symbol"),Xe=T.f,Je=A.f,Ze=Ye.f,et=e.Symbol,tt=e.JSON,nt=tt&&tt.stringify,it=Pe("toPrimitive"),rt=s.f,at=j("symbol-registry"),ot=j("symbols"),st=j("op-symbols"),lt=j("wks"),ct=Object.prototype,ut=e.QObject,ht=!ut||!ut.prototype||!ut.prototype.findChild,ft=r&&i(function(){return 7!=Ve(Je({},"a",{get:function(){return Je(this,"a",{value:7}).a}})).a})?function(e,t,n){var i=Xe(ct,t);i&&delete ct[t],Je(e,t,n),i&&e!==ct&&Je(ct,t,i)}:Je,dt=function(e,t){var n=ot[e]=Ve(et.prototype);return Ge(n,{type:"Symbol",tag:e,description:t}),r||(n.description=t),n},pt=Ee&&"symbol"==typeof et.iterator?function(e){return"symbol"==typeof e}:function(e){return Object(e)instanceof et},mt=function(e,t,i){return e===ct&&mt(st,t,i),S(e),t=g(t,!0),S(i),n(ot,t)?(i.enumerable?(n(e,$e)&&e[$e][t]&&(e[$e][t]=!1),i=Ve(i,{enumerable:l(0,!1)})):(n(e,$e)||Je(e,$e,l(1,{})),e[$e][t]=!0),ft(e,t,i)):Je(e,t,i)},gt=function(e,t){S(e);for(var n,i=function(e){var t=_e(e),n=he.f;if(n)for(var i,r=n(e),a=s.f,o=0;r.length>o;)a.call(e,i=r[o++])&&t.push(i);return t}(t=p(t)),r=0,a=i.length;a>r;)mt(e,n=i[r++],t[n]);return e},vt=function(e){var t=rt.call(this,e=g(e,!0));return!(this===ct&&n(ot,e)&&!n(st,e))&&(!(t||!n(this,e)||!n(ot,e)||n(this,$e)&&this[$e][e])||t)},yt=function(e,t){if(e=p(e),t=g(t,!0),e!==ct||!n(ot,t)||n(st,t)){var i=Xe(e,t);return!i||!n(ot,t)||n(e,$e)&&e[$e][t]||(i.enumerable=!0),i}},bt=function(e){for(var t,i=Ze(p(e)),r=[],a=0;i.length>a;)n(ot,t=i[a++])||n(H,t)||r.push(t);return r},wt=function(e){for(var t,i=e===ct,r=Ze(i?st:p(e)),a=[],o=0;r.length>o;)!n(ot,t=r[o++])||i&&!n(ct,t)||a.push(ot[t]);return a};Ee||(Q((et=function(){if(this instanceof et)throw TypeError("Symbol is not a constructor");var e=void 0===arguments[0]?void 0:String(arguments[0]),t=q(e),i=function(e){this===ct&&i.call(st,e),n(this,$e)&&n(this[$e],t)&&(this[$e][t]=!1),ft(this,t,l(1,e))};return r&&ht&&ft(ct,t,{configurable:!0,set:i}),dt(t,e)}).prototype,"toString",function(){return Qe(this).tag}),s.f=vt,A.f=mt,T.f=yt,ue.f=Ye.f=bt,he.f=wt,r&&(Je(et.prototype,"description",{configurable:!0,get:function(){return Qe(this).description}}),Q(ct,"propertyIsEnumerable",vt,{unsafe:!0})),Me.f=function(e){return dt(Pe(e),e)}),Se({global:!0,wrap:!0,forced:!Ee,sham:!Ee},{Symbol:et});for(var kt=_e(lt),Tt=0;kt.length>Tt;)Oe(kt[Tt++]);Se({target:"Symbol",stat:!0,forced:!Ee},{for:function(e){return n(at,e+="")?at[e]:at[e]=et(e)},keyFor:function(e){if(!pt(e))throw TypeError(e+" is not a symbol");for(var t in at)if(at[t]===e)return t},useSetter:function(){ht=!0},useSimple:function(){ht=!1}}),Se({target:"Object",stat:!0,forced:!Ee,sham:!r},{create:function(e,t){return void 0===t?Ve(e):gt(Ve(e),t)},defineProperty:mt,defineProperties:gt,getOwnPropertyDescriptor:yt}),Se({target:"Object",stat:!0,forced:!Ee},{getOwnPropertyNames:bt,getOwnPropertySymbols:wt}),tt&&Se({target:"JSON",stat:!0,forced:!Ee||i(function(){var e=et();return"[null]"!=nt([e])||"{}"!=nt({a:e})||"{}"!=nt(Object(e))})},{stringify:function(e){for(var t,n,i=[e],r=1;arguments.length>r;)i.push(arguments[r++]);if(n=t=i[1],(m(t)||void 0!==e)&&!pt(e))return Re(t)||(t=function(e,t){if("function"==typeof n&&(t=n.call(this,e,t)),!pt(t))return t}),i[1]=t,nt.apply(tt,i)}}),et.prototype[it]||x(et.prototype,it,et.prototype.valueOf),Ie(et,"Symbol"),H[$e]=!0;var St=A.f,Et=e.Symbol;if(r&&"function"==typeof Et&&(!("description"in Et.prototype)||void 0!==Et().description)){var At={},xt=function(){var e=arguments.length<1||void 0===arguments[0]?void 0:String(arguments[0]),t=this instanceof xt?new Et(e):void 0===e?Et():Et(e);return""===e&&(At[t]=!0),t};pe(xt,Et);var Pt=xt.prototype=Et.prototype;Pt.constructor=xt;var Ct=Pt.toString,Lt="Symbol(test)"==String(Et("test")),It=/^Symbol\((.*)\)[^)]+$/;St(Pt,"description",{configurable:!0,get:function(){var e=m(this)?this.valueOf():this,t=Ct.call(e);if(n(At,e))return"";var i=Lt?t.slice(7,-1):t.replace(It,"$1");return""===i?void 0:i}}),Se({global:!0,forced:!0},{Symbol:xt})}Oe("iterator");var Mt=Pe("unscopables"),Nt=Array.prototype;null==Nt[Mt]&&x(Nt,Mt,Ve(null));var jt,Ot,_t,Rt=function(e){Nt[Mt][e]=!0},Ut={},Ft=function(e){return Object(d(e))},qt=!i(function(){function e(){}return e.prototype.constructor=null,Object.getPrototypeOf(new e)!==e.prototype}),Dt=B("IE_PROTO"),Bt=Object.prototype,Ht=qt?Object.getPrototypeOf:function(e){return e=Ft(e),n(e,Dt)?e[Dt]:"function"==typeof e.constructor&&e instanceof e.constructor?e.constructor.prototype:e instanceof Object?Bt:null},Vt=Pe("iterator"),zt=!1;[].keys&&("next"in(_t=[].keys())?(Ot=Ht(Ht(_t)))!==Object.prototype&&(jt=Ot):zt=!0),null==jt&&(jt={}),n(jt,Vt)||x(jt,Vt,function(){return this});var Wt={IteratorPrototype:jt,BUGGY_SAFARI_ITERATORS:zt},Kt=Wt.IteratorPrototype,Yt=function(){return this},$t=function(e,t,n){var i=t+" Iterator";return e.prototype=Ve(Kt,{next:l(1,n)}),Ie(e,i,!1),Ut[i]=Yt,e},Gt=Object.setPrototypeOf||("__proto__"in{}?function(){var e,t=!1,n={};try{(e=Object.getOwnPropertyDescriptor(Object.prototype,"__proto__").set).call(n,[]),t=n instanceof Array}catch(e){}return function(n,i){return function(e,t){if(S(e),!m(t)&&null!==t)throw TypeError("Can't set "+String(t)+" as a prototype")}(n,i),t?e.call(n,i):n.__proto__=i,n}}():void 0),Qt=Pe("iterator"),Xt=Wt.IteratorPrototype,Jt=Wt.BUGGY_SAFARI_ITERATORS,Zt=function(){return this},en=function(e,t,n,i,r,a,o){$t(n,t,i);var s,l,c,u=function(e){if(e===r&&m)return m;if(!Jt&&e in d)return d[e];switch(e){case"keys":case"values":case"entries":return function(){return new n(this,e)}}return function(){return new n(this)}},h=t+" Iterator",f=!1,d=e.prototype,p=d[Qt]||d["@@iterator"]||r&&d[r],m=!Jt&&p||u(r),g="Array"==t&&d.entries||p;if(g&&(s=Ht(g.call(new e)),Xt!==Object.prototype&&s.next&&(Ht(s)!==Xt&&(Gt?Gt(s,Xt):"function"!=typeof s[Qt]&&x(s,Qt,Zt)),Ie(s,h,!0))),"values"==r&&p&&"values"!==p.name&&(f=!0,m=function(){return p.call(this)}),d[Qt]!==m&&x(d,Qt,m),Ut[t]=m,r)if(l={values:u("values"),keys:a?m:u("keys"),entries:u("entries")},o)for(c in l)!Jt&&!f&&c in d||Q(d,c,l[c]);else Se({target:t,proto:!0,forced:Jt||f},l);return l},tn=G.set,nn=G.getterFor("Array Iterator"),rn=en(Array,"Array",function(e,t){tn(this,{type:"Array Iterator",target:p(e),index:0,kind:t})},function(){var e=nn(this),t=e.target,n=e.kind,i=e.index++;return!t||i>=t.length?(e.target=void 0,{value:void 0,done:!0}):"keys"==n?{value:i,done:!1}:"values"==n?{value:t[i],done:!1}:{value:[i,t[i]],done:!1}},"values");Ut.Arguments=Ut.Array,Rt("keys"),Rt("values"),Rt("entries");var an=function(e,t){var n=[][e];return!n||!i(function(){n.call(null,t||function(){throw 1},1)})},on=[].join,sn=f!=Object,ln=an("join",",");Se({target:"Array",proto:!0,forced:sn||ln},{join:function(e){return on.call(p(this),void 0===e?",":e)}});var cn=function(e,t,n){var i=g(t);i in e?A.f(e,i,l(0,n)):e[i]=n},un=Pe("species"),hn=function(e){return!i(function(){var t=[];return(t.constructor={})[un]=function(){return{foo:1}},1!==t[e](Boolean).foo})},fn=Pe("species"),dn=[].slice,pn=Math.max,mn=hn("slice");Se({target:"Array",proto:!0,forced:!mn},{slice:function(e,t){var n,i,r,a=p(this),o=te(a.length),s=re(e,o),l=re(void 0===t?o:t,o);if(Re(a)&&("function"!=typeof(n=a.constructor)||n!==Array&&!Re(n.prototype)?m(n)&&null===(n=n[fn])&&(n=void 0):n=void 0,n===Array||void 0===n))return dn.call(a,s,l);for(i=new(void 0===n?Array:n)(pn(l-s,0)),r=0;s<l;s++,r++)s in a&&cn(i,r,a[s]);return i.length=r,i}});var gn=Pe("toStringTag"),vn="Arguments"==u(function(){return arguments}()),yn=function(e){var t,n,i;return void 0===e?"Undefined":null===e?"Null":"string"==typeof(n=function(e,t){try{return e[t]}catch(e){}}(t=Object(e),gn))?n:vn?u(t):"Object"==(i=u(t))&&"function"==typeof t.callee?"Arguments":i},bn={};bn[Pe("toStringTag")]="z";var wn="[object z]"!==String(bn)?function(){return"[object "+yn(this)+"]"}:bn.toString,kn=Object.prototype;wn!==kn.toString&&Q(kn,"toString",wn,{unsafe:!0});var Tn=function(){var e=S(this),t="";return e.global&&(t+="g"),e.ignoreCase&&(t+="i"),e.multiline&&(t+="m"),e.unicode&&(t+="u"),e.sticky&&(t+="y"),t},Sn=/./.toString,En=i(function(){return"/a/b"!=Sn.call({source:"a",flags:"b"})}),An="toString"!=Sn.name;(En||An)&&Q(RegExp.prototype,"toString",function(){var e=S(this);return"/".concat(e.source,"/","flags"in e?e.flags:!r&&e instanceof RegExp?Tn.call(e):void 0)},{unsafe:!0});var xn=function(e,t,n){var i,r,a=String(d(e)),o=Z(t),s=a.length;return o<0||o>=s?n?"":void 0:(i=a.charCodeAt(o))<55296||i>56319||o+1===s||(r=a.charCodeAt(o+1))<56320||r>57343?n?a.charAt(o):i:n?a.slice(o,o+2):r-56320+(i-55296<<10)+65536},Pn=G.set,Cn=G.getterFor("String Iterator");en(String,"String",function(e){Pn(this,{type:"String Iterator",string:String(e),index:0})},function(){var e,t=Cn(this),n=t.string,i=t.index;return i>=n.length?{value:void 0,done:!0}:(e=xn(n,i,!0),t.index+=e.length,{value:e,done:!1})});var Ln=function(e,t,n){return t+(n?xn(e,t,!0).length:1)},In=RegExp.prototype.exec,Mn=String.prototype.replace,Nn=In,jn=function(){var e=/a/,t=/b*/g;return In.call(e,"a"),In.call(t,"a"),0!==e.lastIndex||0!==t.lastIndex}(),On=void 0!==/()??/.exec("")[1];(jn||On)&&(Nn=function(e){var t,n,i,r,a=this;return On&&(n=new RegExp("^"+a.source+"$(?!\\s)",Tn.call(a))),jn&&(t=a.lastIndex),i=In.call(a,e),jn&&i&&(a.lastIndex=a.global?i.index+i[0].length:t),On&&i&&i.length>1&&Mn.call(i[0],n,function(){for(r=1;r<arguments.length-2;r++)void 0===arguments[r]&&(i[r]=void 0)}),i});var _n=Nn,Rn=function(e,t){var n=e.exec;if("function"==typeof n){var i=n.call(e,t);if("object"!=typeof i)throw TypeError("RegExp exec method returned something other than an Object or null");return i}if("RegExp"!==u(e))throw TypeError("RegExp#exec called on incompatible receiver");return _n.call(e,t)},Un=Pe("species"),Fn=!i(function(){var e=/./;return e.exec=function(){var e=[];return e.groups={a:"7"},e},"7"!=="".replace(e,"$<a>")}),qn=!i(function(){var e=/(?:)/,t=e.exec;e.exec=function(){return t.apply(this,arguments)};var n="ab".split(e);return 2!==n.length||"a"!==n[0]||"b"!==n[1]}),Dn=function(e,t,n,r){var a=Pe(e),o=!i(function(){var t={};return t[a]=function(){return 7},7!=""[e](t)}),s=o&&!i(function(){var t=!1,n=/a/;return n.exec=function(){return t=!0,null},"split"===e&&(n.constructor={},n.constructor[Un]=function(){return n}),n[a](""),!t});if(!o||!s||"replace"===e&&!Fn||"split"===e&&!qn){var l=/./[a],c=n(a,""[e],function(e,t,n,i,r){return t.exec===_n?o&&!r?{done:!0,value:l.call(t,n,i)}:{done:!0,value:e.call(n,t,i)}:{done:!1}}),u=c[0],h=c[1];Q(String.prototype,e,u),Q(RegExp.prototype,a,2==t?function(e,t){return h.call(e,this,t)}:function(e){return h.call(e,this)}),r&&x(RegExp.prototype[a],"sham",!0)}},Bn=Math.max,Hn=Math.min,Vn=Math.floor,zn=/\$([$&`']|\d\d?|<[^>]*>)/g,Wn=/\$([$&`']|\d\d?)/g;Dn("replace",2,function(e,t,n){return[function(n,i){var r=d(this),a=null==n?void 0:n[e];return void 0!==a?a.call(n,r,i):t.call(String(r),n,i)},function(e,r){var a=n(t,e,this,r);if(a.done)return a.value;var o=S(e),s=String(this),l="function"==typeof r;l||(r=String(r));var c=o.global;if(c){var u=o.unicode;o.lastIndex=0}for(var h=[];;){var f=Rn(o,s);if(null===f)break;if(h.push(f),!c)break;""===String(f[0])&&(o.lastIndex=Ln(s,te(o.lastIndex),u))}for(var d,p="",m=0,g=0;g<h.length;g++){f=h[g];for(var v=String(f[0]),y=Bn(Hn(Z(f.index),s.length),0),b=[],w=1;w<f.length;w++)b.push(void 0===(d=f[w])?d:String(d));var k=f.groups;if(l){var T=[v].concat(b,y,s);void 0!==k&&T.push(k);var E=String(r.apply(void 0,T))}else E=i(v,s,y,b,k,r);y>=m&&(p+=s.slice(m,y)+E,m=y+v.length)}return p+s.slice(m)}];function i(e,n,i,r,a,o){var s=i+e.length,l=r.length,c=Wn;return void 0!==a&&(a=Ft(a),c=zn),t.call(o,c,function(t,o){var c;switch(o.charAt(0)){case"$":return"$";case"&":return e;case"`":return n.slice(0,i);case"'":return n.slice(s);case"<":c=a[o.slice(1,-1)];break;default:var u=+o;if(0===u)return t;if(u>l){var h=Vn(u/10);return 0===h?t:h<=l?void 0===r[h-1]?o.charAt(1):r[h-1]+o.charAt(1):t}c=r[u-1]}return void 0===c?"":c})}});var Kn=Object.is||function(e,t){return e===t?0!==e||1/e==1/t:e!=e&&t!=t};Dn("search",1,function(e,t,n){return[function(t){var n=d(this),i=null==t?void 0:t[e];return void 0!==i?i.call(t,n):new RegExp(t)[e](String(n))},function(e){var i=n(t,e,this);if(i.done)return i.value;var r=S(e),a=String(this),o=r.lastIndex;Kn(o,0)||(r.lastIndex=0);var s=Rn(r,a);return Kn(r.lastIndex,o)||(r.lastIndex=o),null===s?-1:s.index}]});var Yn=Pe("match"),$n=function(e){var t;return m(e)&&(void 0!==(t=e[Yn])?!!t:"RegExp"==u(e))},Gn=function(e){if("function"!=typeof e)throw TypeError(String(e)+" is not a function");return e},Qn=Pe("species"),Xn=function(e,t){var n,i=S(e).constructor;return void 0===i||null==(n=S(i)[Qn])?t:Gn(n)},Jn=[].push,Zn=Math.min,ei=!i(function(){return!RegExp(4294967295,"y")});Dn("split",2,function(e,t,n){var i;return i="c"=="abbc".split(/(b)*/)[1]||4!="test".split(/(?:)/,-1).length||2!="ab".split(/(?:ab)*/).length||4!=".".split(/(.?)(.?)/).length||".".split(/()()/).length>1||"".split(/.?/).length?function(e,n){var i=String(d(this)),r=void 0===n?4294967295:n>>>0;if(0===r)return[];if(void 0===e)return[i];if(!$n(e))return t.call(i,e,r);for(var a,o,s,l=[],c=(e.ignoreCase?"i":"")+(e.multiline?"m":"")+(e.unicode?"u":"")+(e.sticky?"y":""),u=0,h=new RegExp(e.source,c+"g");(a=_n.call(h,i))&&!((o=h.lastIndex)>u&&(l.push(i.slice(u,a.index)),a.length>1&&a.index<i.length&&Jn.apply(l,a.slice(1)),s=a[0].length,u=o,l.length>=r));)h.lastIndex===a.index&&h.lastIndex++;return u===i.length?!s&&h.test("")||l.push(""):l.push(i.slice(u)),l.length>r?l.slice(0,r):l}:"0".split(void 0,0).length?function(e,n){return void 0===e&&0===n?[]:t.call(this,e,n)}:t,[function(t,n){var r=d(this),a=null==t?void 0:t[e];return void 0!==a?a.call(t,r,n):i.call(String(r),t,n)},function(e,r){var a=n(i,e,this,r,i!==t);if(a.done)return a.value;var o=S(e),s=String(this),l=Xn(o,RegExp),c=o.unicode,u=(o.ignoreCase?"i":"")+(o.multiline?"m":"")+(o.unicode?"u":"")+(ei?"y":"g"),h=new l(ei?o:"^(?:"+o.source+")",u),f=void 0===r?4294967295:r>>>0;if(0===f)return[];if(0===s.length)return null===Rn(h,s)?[s]:[];for(var d=0,p=0,m=[];p<s.length;){h.lastIndex=ei?p:0;var g,v=Rn(h,ei?s:s.slice(p));if(null===v||(g=Zn(te(h.lastIndex+(ei?0:p)),s.length))===d)p=Ln(s,p,c);else{if(m.push(s.slice(d,p)),m.length===f)return m;for(var y=1;y<=v.length-1;y++)if(m.push(v[y]),m.length===f)return m;p=d=g}}return m.push(s.slice(d)),m}]},!ei);var ti={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0},ni=function(e,t,n){if(Gn(e),void 0===t)return e;switch(n){case 0:return function(){return e.call(t)};case 1:return function(n){return e.call(t,n)};case 2:return function(n,i){return e.call(t,n,i)};case 3:return function(n,i,r){return e.call(t,n,i,r)}}return function(){return e.apply(t,arguments)}},ii=Pe("species"),ri=function(e,t){var n;return Re(e)&&("function"!=typeof(n=e.constructor)||n!==Array&&!Re(n.prototype)?m(n)&&null===(n=n[ii])&&(n=void 0):n=void 0),new(void 0===n?Array:n)(0===t?0:t)},ai=function(e,t){var n=1==e,i=2==e,r=3==e,a=4==e,o=6==e,s=5==e||o,l=t||ri;return function(t,c,u){for(var h,d,p=Ft(t),m=f(p),g=ni(c,u,3),v=te(m.length),y=0,b=n?l(t,v):i?l(t,0):void 0;v>y;y++)if((s||y in m)&&(d=g(h=m[y],y,p),e))if(n)b[y]=d;else if(d)switch(e){case 3:return!0;case 5:return h;case 6:return y;case 2:b.push(h)}else if(a)return!1;return o?-1:r||a?a:b}},oi=[].forEach,si=ai(0),li=an("forEach")?function(e){return si(this,e,arguments[1])}:oi;for(var ci in ti){var ui=e[ci],hi=ui&&ui.prototype;if(hi&&hi.forEach!==li)try{x(hi,"forEach",li)}catch(e){hi.forEach=li}}var fi=Pe("iterator"),di=Pe("toStringTag"),pi=rn.values;for(var mi in ti){var gi=e[mi],vi=gi&&gi.prototype;if(vi){if(vi[fi]!==pi)try{x(vi,fi,pi)}catch(e){vi[fi]=pi}if(vi[di]||x(vi,di,mi),ti[mi])for(var yi in rn)if(vi[yi]!==rn[yi])try{x(vi,yi,rn[yi])}catch(e){vi[yi]=rn[yi]}}}var bi=Pe("iterator"),wi=!i(function(){var e=new URL("b?e=1","http://a"),t=e.searchParams;return e.pathname="c%20d",!t.sort||"http://a/c%20d?e=1"!==e.href||"1"!==t.get("e")||"a=1"!==String(new URLSearchParams("?a=1"))||!t[bi]||"a"!==new URL("https://a@b").username||"b"!==new URLSearchParams(new URLSearchParams("a=b")).get("a")||"xn--e1aybc"!==new URL("http://тест").host||"#%D0%B1"!==new URL("http://a#б").hash}),ki=function(e,t,n){if(!(e instanceof t))throw TypeError("Incorrect "+(n?n+" ":"")+"invocation");return e},Ti=Object.assign,Si=!Ti||i(function(){var e={},t={},n=Symbol();return e[n]=7,"abcdefghijklmnopqrst".split("").forEach(function(e){t[e]=e}),7!=Ti({},e)[n]||"abcdefghijklmnopqrst"!=_e(Ti({},t)).join("")})?function(e,t){for(var n=Ft(e),i=arguments.length,r=1,a=he.f,o=s.f;i>r;)for(var l,c=f(arguments[r++]),u=a?_e(c).concat(a(c)):_e(c),h=u.length,d=0;h>d;)o.call(c,l=u[d++])&&(n[l]=c[l]);return n}:Ti,Ei=function(e,t,n,i){try{return i?t(S(n)[0],n[1]):t(n)}catch(t){var r=e.return;throw void 0!==r&&S(r.call(e)),t}},Ai=Pe("iterator"),xi=Array.prototype,Pi=function(e){return void 0!==e&&(Ut.Array===e||xi[Ai]===e)},Ci=Pe("iterator"),Li=function(e){if(null!=e)return e[Ci]||e["@@iterator"]||Ut[yn(e)]},Ii=function(e){var t,n,i,r,a=Ft(e),o="function"==typeof this?this:Array,s=arguments.length,l=s>1?arguments[1]:void 0,c=void 0!==l,u=0,h=Li(a);if(c&&(l=ni(l,s>2?arguments[2]:void 0,2)),null==h||o==Array&&Pi(h))for(n=new o(t=te(a.length));t>u;u++)cn(n,u,c?l(a[u],u):a[u]);else for(r=h.call(a),n=new o;!(i=r.next()).done;u++)cn(n,u,c?Ei(r,l,[i.value,u],!0):i.value);return n.length=u,n},Mi=/[^\0-\u007E]/,Ni=/[\u002E\u3002\uFF0E\uFF61]/g,ji="Overflow: input needs wider integers to process",Oi=Math.floor,_i=String.fromCharCode,Ri=function(e){return e+22+75*(e<26)},Ui=function(e,t,n){var i=0;for(e=n?Oi(e/700):e>>1,e+=Oi(e/t);e>455;i+=36)e=Oi(e/35);return Oi(i+36*e/(e+38))},Fi=function(e){var t,n,i=[],r=(e=function(e){for(var t=[],n=0,i=e.length;n<i;){var r=e.charCodeAt(n++);if(r>=55296&&r<=56319&&n<i){var a=e.charCodeAt(n++);56320==(64512&a)?t.push(((1023&r)<<10)+(1023&a)+65536):(t.push(r),n--)}else t.push(r)}return t}(e)).length,a=128,o=0,s=72;for(t=0;t<e.length;t++)(n=e[t])<128&&i.push(_i(n));var l=i.length,c=l;for(l&&i.push("-");c<r;){var u=2147483647;for(t=0;t<e.length;t++)(n=e[t])>=a&&n<u&&(u=n);var h=c+1;if(u-a>Oi((2147483647-o)/h))throw RangeError(ji);for(o+=(u-a)*h,a=u,t=0;t<e.length;t++){if((n=e[t])<a&&++o>2147483647)throw RangeError(ji);if(n==a){for(var f=o,d=36;;d+=36){var p=d<=s?1:d>=s+26?26:d-s;if(f<p)break;var m=f-p,g=36-p;i.push(_i(Ri(p+m%g))),f=Oi(m/g)}i.push(_i(Ri(f))),s=Ui(o,h,c==l),o=0,++c}}++o,++a}return i.join("")},qi=function(e,t,n){for(var i in t)Q(e,i,t[i],n);return e},Di=function(e){var t=Li(e);if("function"!=typeof t)throw TypeError(String(e)+" is not iterable");return S(t.call(e))},Bi=Pe("iterator"),Hi=G.set,Vi=G.getterFor("URLSearchParams"),zi=G.getterFor("URLSearchParamsIterator"),Wi=/\+/g,Ki=Array(4),Yi=function(e){return Ki[e-1]||(Ki[e-1]=RegExp("((?:%[\\da-f]{2}){"+e+"})","gi"))},$i=function(e){try{return decodeURIComponent(e)}catch(t){return e}},Gi=function(e){for(var t=e.replace(Wi," "),n=4;n;)t=t.replace(Yi(n--),$i);return t},Qi=/[!'()~]|%20/g,Xi={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+"},Ji=function(e){return Xi[e]},Zi=function(e){return encodeURIComponent(e).replace(Qi,Ji)},er=function(e,t){if(t)for(var n,i,r=t.split("&"),a=0;a<r.length;)(n=r[a++]).length&&(i=n.split("="),e.push({key:Gi(i.shift()),value:Gi(i.join("="))}));return e},tr=function(e){this.entries.length=0,er(this.entries,e)},nr=function(e,t){if(e<t)throw TypeError("Not enough arguments")},ir=$t(function(e,t){Hi(this,{type:"URLSearchParamsIterator",iterator:Di(Vi(e).entries),kind:t})},"Iterator",function(){var e=zi(this),t=e.kind,n=e.iterator.next(),i=n.value;return n.done||(n.value="keys"===t?i.key:"values"===t?i.value:[i.key,i.value]),n}),rr=function(){ki(this,rr,"URLSearchParams");var e,t,i,r,a,o,s,l=arguments.length>0?arguments[0]:void 0,c=[];if(Hi(this,{type:"URLSearchParams",entries:c,updateURL:null,updateSearchParams:tr}),void 0!==l)if(m(l))if("function"==typeof(e=Li(l)))for(t=e.call(l);!(i=t.next()).done;){if((a=(r=Di(S(i.value))).next()).done||(o=r.next()).done||!r.next().done)throw TypeError("Expected sequence with length 2");c.push({key:a.value+"",value:o.value+""})}else for(s in l)n(l,s)&&c.push({key:s,value:l[s]+""});else er(c,"string"==typeof l?"?"===l.charAt(0)?l.slice(1):l:l+"")},ar=rr.prototype;qi(ar,{append:function(e,t){nr(arguments.length,2);var n=Vi(this);n.entries.push({key:e+"",value:t+""}),n.updateURL&&n.updateURL()},delete:function(e){nr(arguments.length,1);for(var t=Vi(this),n=t.entries,i=e+"",r=0;r<n.length;)n[r].key===i?n.splice(r,1):r++;t.updateURL&&t.updateURL()},get:function(e){nr(arguments.length,1);for(var t=Vi(this).entries,n=e+"",i=0;i<t.length;i++)if(t[i].key===n)return t[i].value;return null},getAll:function(e){nr(arguments.length,1);for(var t=Vi(this).entries,n=e+"",i=[],r=0;r<t.length;r++)t[r].key===n&&i.push(t[r].value);return i},has:function(e){nr(arguments.length,1);for(var t=Vi(this).entries,n=e+"",i=0;i<t.length;)if(t[i++].key===n)return!0;return!1},set:function(e,t){nr(arguments.length,1);for(var n,i=Vi(this),r=i.entries,a=!1,o=e+"",s=t+"",l=0;l<r.length;l++)(n=r[l]).key===o&&(a?r.splice(l--,1):(a=!0,n.value=s));a||r.push({key:o,value:s}),i.updateURL&&i.updateURL()},sort:function(){var e,t,n,i=Vi(this),r=i.entries,a=r.slice();for(r.length=0,t=0;t<a.length;t++){for(e=a[t],n=0;n<t;n++)if(r[n].key>e.key){r.splice(n,0,e);break}n===t&&r.push(e)}i.updateURL&&i.updateURL()},forEach:function(e){for(var t,n=Vi(this).entries,i=ni(e,arguments.length>1?arguments[1]:void 0,3),r=0;r<n.length;)i((t=n[r++]).value,t.key,this)},keys:function(){return new ir(this,"keys")},values:function(){return new ir(this,"values")},entries:function(){return new ir(this,"entries")}},{enumerable:!0}),Q(ar,Bi,ar.entries),Q(ar,"toString",function(){for(var e,t=Vi(this).entries,n=[],i=0;i<t.length;)e=t[i++],n.push(Zi(e.key)+"="+Zi(e.value));return n.join("&")},{enumerable:!0}),Ie(rr,"URLSearchParams"),Se({global:!0,forced:!wi},{URLSearchParams:rr});var or,sr={URLSearchParams:rr,getState:Vi},lr=e.URL,cr=sr.URLSearchParams,ur=sr.getState,hr=G.set,fr=G.getterFor("URL"),dr=Math.pow,pr=/[a-zA-Z]/,mr=/[a-zA-Z0-9+\-.]/,gr=/\d/,vr=/^(0x|0X)/,yr=/^[0-7]+$/,br=/^\d+$/,wr=/^[0-9A-Fa-f]+$/,kr=/\u0000|\u0009|\u000A|\u000D|\u0020|#|%|\/|:|\?|@|\[|\\|\]/,Tr=/\u0000|\u0009|\u000A|\u000D|\u0020|#|\/|:|\?|@|\[|\\|\]/,Sr=/^[\u0000-\u001F\u0020]+|[\u0000-\u001F\u0020]+$/g,Er=/\u0009|\u000A|\u000D/g,Ar=function(e,t){var n,i,r;if("["==t.charAt(0)){if("]"!=t.charAt(t.length-1))return"Invalid host";if(!(n=Pr(t.slice(1,-1))))return"Invalid host";e.host=n}else if(_r(e)){if(t=function(e){var t,n,i=[],r=e.toLowerCase().replace(Ni,".").split(".");for(t=0;t<r.length;t++)n=r[t],i.push(Mi.test(n)?"xn--"+Fi(n):n);return i.join(".")}(t),kr.test(t))return"Invalid host";if(null===(n=xr(t)))return"Invalid host";e.host=n}else{if(Tr.test(t))return"Invalid host";for(n="",i=Ii(t),r=0;r<i.length;r++)n+=jr(i[r],Lr);e.host=n}},xr=function(e){var t,n,i,r,a,o,s,l=e.split(".");if(""==l[l.length-1]&&l.length&&l.pop(),(t=l.length)>4)return e;for(n=[],i=0;i<t;i++){if(""==(r=l[i]))return e;if(a=10,r.length>1&&"0"==r.charAt(0)&&(a=vr.test(r)?16:8,r=r.slice(8==a?1:2)),""===r)o=0;else{if(!(10==a?br:8==a?yr:wr).test(r))return e;o=parseInt(r,a)}n.push(o)}for(i=0;i<t;i++)if(o=n[i],i==t-1){if(o>=dr(256,5-t))return null}else if(o>255)return null;for(s=n.pop(),i=0;i<n.length;i++)s+=n[i]*dr(256,3-i);return s},Pr=function(e){var t,n,i,r,a,o,s,l=[0,0,0,0,0,0,0,0],c=0,u=null,h=0,f=function(){return e.charAt(h)};if(":"==f()){if(":"!=e.charAt(1))return;h+=2,u=++c}for(;f();){if(8==c)return;if(":"!=f()){for(t=n=0;n<4&&wr.test(f());)t=16*t+parseInt(f(),16),h++,n++;if("."==f()){if(0==n)return;if(h-=n,c>6)return;for(i=0;f();){if(r=null,i>0){if(!("."==f()&&i<4))return;h++}if(!gr.test(f()))return;for(;gr.test(f());){if(a=parseInt(f(),10),null===r)r=a;else{if(0==r)return;r=10*r+a}if(r>255)return;h++}l[c]=256*l[c]+r,2!=++i&&4!=i||c++}if(4!=i)return;break}if(":"==f()){if(h++,!f())return}else if(f())return;l[c++]=t}else{if(null!==u)return;h++,u=++c}}if(null!==u)for(o=c-u,c=7;0!=c&&o>0;)s=l[c],l[c--]=l[u+o-1],l[u+--o]=s;else if(8!=c)return;return l},Cr=function(e){var t,n,i,r;if("number"==typeof e){for(t=[],n=0;n<4;n++)t.unshift(e%256),e=Math.floor(e/256);return t.join(".")}if("object"==typeof e){for(t="",i=function(e){for(var t=null,n=1,i=null,r=0,a=0;a<8;a++)0!==e[a]?(r>n&&(t=i,n=r),i=null,r=0):(null===i&&(i=a),++r);return r>n&&(t=i,n=r),t}(e),n=0;n<8;n++)r&&0===e[n]||(r&&(r=!1),i===n?(t+=n?":":"::",r=!0):(t+=e[n].toString(16),n<7&&(t+=":")));return"["+t+"]"}return e},Lr={},Ir=Si({},Lr,{" ":1,'"':1,"<":1,">":1,"`":1}),Mr=Si({},Ir,{"#":1,"?":1,"{":1,"}":1}),Nr=Si({},Mr,{"/":1,":":1,";":1,"=":1,"@":1,"[":1,"\\":1,"]":1,"^":1,"|":1}),jr=function(e,t){var i=xn(e,0);return i>32&&i<127&&!n(t,e)?e:encodeURIComponent(e)},Or={ftp:21,file:null,gopher:70,http:80,https:443,ws:80,wss:443},_r=function(e){return n(Or,e.scheme)},Rr=function(e){return""!=e.username||""!=e.password},Ur=function(e){return!e.host||e.cannotBeABaseURL||"file"==e.scheme},Fr=function(e,t){var n;return 2==e.length&&pr.test(e.charAt(0))&&(":"==(n=e.charAt(1))||!t&&"|"==n)},qr=function(e){var t;return e.length>1&&Fr(e.slice(0,2))&&(2==e.length||"/"===(t=e.charAt(2))||"\\"===t||"?"===t||"#"===t)},Dr=function(e){var t=e.path,n=t.length;!n||"file"==e.scheme&&1==n&&Fr(t[0],!0)||t.pop()},Br=function(e){return"."===e||"%2e"===e.toLowerCase()},Hr={},Vr={},zr={},Wr={},Kr={},Yr={},$r={},Gr={},Qr={},Xr={},Jr={},Zr={},ea={},ta={},na={},ia={},ra={},aa={},oa={},sa={},la={},ca=function(e,t,i,r){var a,o,s,l,c,u=i||Hr,h=0,f="",d=!1,p=!1,m=!1;for(i||(e.scheme="",e.username="",e.password="",e.host=null,e.port=null,e.path=[],e.query=null,e.fragment=null,e.cannotBeABaseURL=!1,t=t.replace(Sr,"")),t=t.replace(Er,""),a=Ii(t);h<=a.length;){switch(o=a[h],u){case Hr:if(!o||!pr.test(o)){if(i)return"Invalid scheme";u=zr;continue}f+=o.toLowerCase(),u=Vr;break;case Vr:if(o&&(mr.test(o)||"+"==o||"-"==o||"."==o))f+=o.toLowerCase();else{if(":"!=o){if(i)return"Invalid scheme";f="",u=zr,h=0;continue}if(i&&(_r(e)!=n(Or,f)||"file"==f&&(Rr(e)||null!==e.port)||"file"==e.scheme&&!e.host))return;if(e.scheme=f,i)return void(_r(e)&&Or[e.scheme]==e.port&&(e.port=null));f="","file"==e.scheme?u=ta:_r(e)&&r&&r.scheme==e.scheme?u=Wr:_r(e)?u=Gr:"/"==a[h+1]?(u=Kr,h++):(e.cannotBeABaseURL=!0,e.path.push(""),u=oa)}break;case zr:if(!r||r.cannotBeABaseURL&&"#"!=o)return"Invalid scheme";if(r.cannotBeABaseURL&&"#"==o){e.scheme=r.scheme,e.path=r.path.slice(),e.query=r.query,e.fragment="",e.cannotBeABaseURL=!0,u=la;break}u="file"==r.scheme?ta:Yr;continue;case Wr:if("/"!=o||"/"!=a[h+1]){u=Yr;continue}u=Qr,h++;break;case Kr:if("/"==o){u=Xr;break}u=aa;continue;case Yr:if(e.scheme=r.scheme,o==or)e.username=r.username,e.password=r.password,e.host=r.host,e.port=r.port,e.path=r.path.slice(),e.query=r.query;else if("/"==o||"\\"==o&&_r(e))u=$r;else if("?"==o)e.username=r.username,e.password=r.password,e.host=r.host,e.port=r.port,e.path=r.path.slice(),e.query="",u=sa;else{if("#"!=o){e.username=r.username,e.password=r.password,e.host=r.host,e.port=r.port,e.path=r.path.slice(),e.path.pop(),u=aa;continue}e.username=r.username,e.password=r.password,e.host=r.host,e.port=r.port,e.path=r.path.slice(),e.query=r.query,e.fragment="",u=la}break;case $r:if(!_r(e)||"/"!=o&&"\\"!=o){if("/"!=o){e.username=r.username,e.password=r.password,e.host=r.host,e.port=r.port,u=aa;continue}u=Xr}else u=Qr;break;case Gr:if(u=Qr,"/"!=o||"/"!=f.charAt(h+1))continue;h++;break;case Qr:if("/"!=o&&"\\"!=o){u=Xr;continue}break;case Xr:if("@"==o){d&&(f="%40"+f),d=!0,s=Ii(f);for(var g=0;g<s.length;g++){var v=s[g];if(":"!=v||m){var y=jr(v,Nr);m?e.password+=y:e.username+=y}else m=!0}f=""}else if(o==or||"/"==o||"?"==o||"#"==o||"\\"==o&&_r(e)){if(d&&""==f)return"Invalid authority";h-=Ii(f).length+1,f="",u=Jr}else f+=o;break;case Jr:case Zr:if(i&&"file"==e.scheme){u=ia;continue}if(":"!=o||p){if(o==or||"/"==o||"?"==o||"#"==o||"\\"==o&&_r(e)){if(_r(e)&&""==f)return"Invalid host";if(i&&""==f&&(Rr(e)||null!==e.port))return;if(l=Ar(e,f))return l;if(f="",u=ra,i)return;continue}"["==o?p=!0:"]"==o&&(p=!1),f+=o}else{if(""==f)return"Invalid host";if(l=Ar(e,f))return l;if(f="",u=ea,i==Zr)return}break;case ea:if(!gr.test(o)){if(o==or||"/"==o||"?"==o||"#"==o||"\\"==o&&_r(e)||i){if(""!=f){var b=parseInt(f,10);if(b>65535)return"Invalid port";e.port=_r(e)&&b===Or[e.scheme]?null:b,f=""}if(i)return;u=ra;continue}return"Invalid port"}f+=o;break;case ta:if(e.scheme="file","/"==o||"\\"==o)u=na;else{if(!r||"file"!=r.scheme){u=aa;continue}if(o==or)e.host=r.host,e.path=r.path.slice(),e.query=r.query;else if("?"==o)e.host=r.host,e.path=r.path.slice(),e.query="",u=sa;else{if("#"!=o){qr(a.slice(h).join(""))||(e.host=r.host,e.path=r.path.slice(),Dr(e)),u=aa;continue}e.host=r.host,e.path=r.path.slice(),e.query=r.query,e.fragment="",u=la}}break;case na:if("/"==o||"\\"==o){u=ia;break}r&&"file"==r.scheme&&!qr(a.slice(h).join(""))&&(Fr(r.path[0],!0)?e.path.push(r.path[0]):e.host=r.host),u=aa;continue;case ia:if(o==or||"/"==o||"\\"==o||"?"==o||"#"==o){if(!i&&Fr(f))u=aa;else if(""==f){if(e.host="",i)return;u=ra}else{if(l=Ar(e,f))return l;if("localhost"==e.host&&(e.host=""),i)return;f="",u=ra}continue}f+=o;break;case ra:if(_r(e)){if(u=aa,"/"!=o&&"\\"!=o)continue}else if(i||"?"!=o)if(i||"#"!=o){if(o!=or&&(u=aa,"/"!=o))continue}else e.fragment="",u=la;else e.query="",u=sa;break;case aa:if(o==or||"/"==o||"\\"==o&&_r(e)||!i&&("?"==o||"#"==o)){if(".."===(c=(c=f).toLowerCase())||"%2e."===c||".%2e"===c||"%2e%2e"===c?(Dr(e),"/"==o||"\\"==o&&_r(e)||e.path.push("")):Br(f)?"/"==o||"\\"==o&&_r(e)||e.path.push(""):("file"==e.scheme&&!e.path.length&&Fr(f)&&(e.host&&(e.host=""),f=f.charAt(0)+":"),e.path.push(f)),f="","file"==e.scheme&&(o==or||"?"==o||"#"==o))for(;e.path.length>1&&""===e.path[0];)e.path.shift();"?"==o?(e.query="",u=sa):"#"==o&&(e.fragment="",u=la)}else f+=jr(o,Mr);break;case oa:"?"==o?(e.query="",u=sa):"#"==o?(e.fragment="",u=la):o!=or&&(e.path[0]+=jr(o,Lr));break;case sa:i||"#"!=o?o!=or&&("'"==o&&_r(e)?e.query+="%27":e.query+="#"==o?"%23":jr(o,Lr)):(e.fragment="",u=la);break;case la:o!=or&&(e.fragment+=jr(o,Ir))}h++}},ua=function(e){var t,n,i=ki(this,ua,"URL"),a=arguments.length>1?arguments[1]:void 0,o=String(e),s=hr(i,{type:"URL"});if(void 0!==a)if(a instanceof ua)t=fr(a);else if(n=ca(t={},String(a)))throw TypeError(n);if(n=ca(s,o,null,t))throw TypeError(n);var l=s.searchParams=new cr,c=ur(l);c.updateSearchParams(s.query),c.updateURL=function(){s.query=String(l)||null},r||(i.href=fa.call(i),i.origin=da.call(i),i.protocol=pa.call(i),i.username=ma.call(i),i.password=ga.call(i),i.host=va.call(i),i.hostname=ya.call(i),i.port=ba.call(i),i.pathname=wa.call(i),i.search=ka.call(i),i.searchParams=Ta.call(i),i.hash=Sa.call(i))},ha=ua.prototype,fa=function(){var e=fr(this),t=e.scheme,n=e.username,i=e.password,r=e.host,a=e.port,o=e.path,s=e.query,l=e.fragment,c=t+":";return null!==r?(c+="//",Rr(e)&&(c+=n+(i?":"+i:"")+"@"),c+=Cr(r),null!==a&&(c+=":"+a)):"file"==t&&(c+="//"),c+=e.cannotBeABaseURL?o[0]:o.length?"/"+o.join("/"):"",null!==s&&(c+="?"+s),null!==l&&(c+="#"+l),c},da=function(){var e=fr(this),t=e.scheme,n=e.port;if("blob"==t)try{return new URL(t.path[0]).origin}catch(e){return"null"}return"file"!=t&&_r(e)?t+"://"+Cr(e.host)+(null!==n?":"+n:""):"null"},pa=function(){return fr(this).scheme+":"},ma=function(){return fr(this).username},ga=function(){return fr(this).password},va=function(){var e=fr(this),t=e.host,n=e.port;return null===t?"":null===n?Cr(t):Cr(t)+":"+n},ya=function(){var e=fr(this).host;return null===e?"":Cr(e)},ba=function(){var e=fr(this).port;return null===e?"":String(e)},wa=function(){var e=fr(this),t=e.path;return e.cannotBeABaseURL?t[0]:t.length?"/"+t.join("/"):""},ka=function(){var e=fr(this).query;return e?"?"+e:""},Ta=function(){return fr(this).searchParams},Sa=function(){var e=fr(this).fragment;return e?"#"+e:""},Ea=function(e,t){return{get:e,set:t,configurable:!0,enumerable:!0}};if(r&&Ue(ha,{href:Ea(fa,function(e){var t=fr(this),n=String(e),i=ca(t,n);if(i)throw TypeError(i);ur(t.searchParams).updateSearchParams(t.query)}),origin:Ea(da),protocol:Ea(pa,function(e){var t=fr(this);ca(t,String(e)+":",Hr)}),username:Ea(ma,function(e){var t=fr(this),n=Ii(String(e));if(!Ur(t)){t.username="";for(var i=0;i<n.length;i++)t.username+=jr(n[i],Nr)}}),password:Ea(ga,function(e){var t=fr(this),n=Ii(String(e));if(!Ur(t)){t.password="";for(var i=0;i<n.length;i++)t.password+=jr(n[i],Nr)}}),host:Ea(va,function(e){var t=fr(this);t.cannotBeABaseURL||ca(t,String(e),Jr)}),hostname:Ea(ya,function(e){var t=fr(this);t.cannotBeABaseURL||ca(t,String(e),Zr)}),port:Ea(ba,function(e){var t=fr(this);Ur(t)||(""==(e=String(e))?t.port=null:ca(t,e,ea))}),pathname:Ea(wa,function(e){var t=fr(this);t.cannotBeABaseURL||(t.path=[],ca(t,e+"",ra))}),search:Ea(ka,function(e){var t=fr(this);""==(e=String(e))?t.query=null:("?"==e.charAt(0)&&(e=e.slice(1)),t.query="",ca(t,e,sa)),ur(t.searchParams).updateSearchParams(t.query)}),searchParams:Ea(Ta),hash:Ea(Sa,function(e){var t=fr(this);""!=(e=String(e))?("#"==e.charAt(0)&&(e=e.slice(1)),t.fragment="",ca(t,e,la)):t.fragment=null})}),Q(ha,"toJSON",function(){return fa.call(this)},{enumerable:!0}),Q(ha,"toString",function(){return fa.call(this)},{enumerable:!0}),lr){var Aa=lr.createObjectURL,xa=lr.revokeObjectURL;Aa&&Q(ua,"createObjectURL",function(e){return Aa.apply(lr,arguments)}),xa&&Q(ua,"revokeObjectURL",function(e){return xa.apply(lr,arguments)})}function Pa(e){return(Pa="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Ca(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function La(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}function Ia(e,t,n){return t&&La(e.prototype,t),n&&La(e,n),e}function Ma(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Na(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=[],i=!0,r=!1,a=void 0;try{for(var o,s=e[Symbol.iterator]();!(i=(o=s.next()).done)&&(n.push(o.value),!t||n.length!==t);i=!0);}catch(e){r=!0,a=e}finally{try{i||null==s.return||s.return()}finally{if(r)throw a}}return n}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}function ja(e){return function(e){if(Array.isArray(e)){for(var t=0,n=new Array(e.length);t<e.length;t++)n[t]=e[t];return n}}(e)||function(e){if(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e))return Array.from(e)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance")}()}Ie(ua,"URL"),Se({global:!0,forced:!wi,sham:!r},{URL:ua}),function(e){var t=function(){try{return!!Symbol.iterator}catch(e){return!1}}(),n=function(e){var n={next:function(){var t=e.shift();return{done:void 0===t,value:t}}};return t&&(n[Symbol.iterator]=function(){return n}),n},i=function(e){return encodeURIComponent(e).replace(/%20/g,"+")},r=function(e){return decodeURIComponent(String(e).replace(/\+/g," "))};"URLSearchParams"in e&&"a=1"===new e.URLSearchParams("?a=1").toString()||function(){var r=function e(t){Object.defineProperty(this,"_entries",{writable:!0,value:{}});var n=Pa(t);if("undefined"===n);else if("string"===n)""!==t&&this._fromString(t);else if(t instanceof e){var i=this;t.forEach(function(e,t){i.append(t,e)})}else{if(null===t||"object"!==n)throw new TypeError("Unsupported input's type for URLSearchParams");if("[object Array]"===Object.prototype.toString.call(t))for(var r=0;r<t.length;r++){var a=t[r];if("[object Array]"!==Object.prototype.toString.call(a)&&2===a.length)throw new TypeError("Expected [string, any] as entry at index "+r+" of URLSearchParams's input");this.append(a[0],a[1])}else for(var o in t)t.hasOwnProperty(o)&&this.append(o,t[o])}},a=r.prototype;a.append=function(e,t){e in this._entries?this._entries[e].push(String(t)):this._entries[e]=[String(t)]},a.delete=function(e){delete this._entries[e]},a.get=function(e){return e in this._entries?this._entries[e][0]:null},a.getAll=function(e){return e in this._entries?this._entries[e].slice(0):[]},a.has=function(e){return e in this._entries},a.set=function(e,t){this._entries[e]=[String(t)]},a.forEach=function(e,t){var n;for(var i in this._entries)if(this._entries.hasOwnProperty(i)){n=this._entries[i];for(var r=0;r<n.length;r++)e.call(t,n[r],i,this)}},a.keys=function(){var e=[];return this.forEach(function(t,n){e.push(n)}),n(e)},a.values=function(){var e=[];return this.forEach(function(t){e.push(t)}),n(e)},a.entries=function(){var e=[];return this.forEach(function(t,n){e.push([n,t])}),n(e)},t&&(a[Symbol.iterator]=a.entries),a.toString=function(){var e=[];return this.forEach(function(t,n){e.push(i(n)+"="+i(t))}),e.join("&")},e.URLSearchParams=r}();var a=e.URLSearchParams.prototype;"function"!=typeof a.sort&&(a.sort=function(){var e=this,t=[];this.forEach(function(n,i){t.push([i,n]),e._entries||e.delete(i)}),t.sort(function(e,t){return e[0]<t[0]?-1:e[0]>t[0]?1:0}),e._entries&&(e._entries={});for(var n=0;n<t.length;n++)this.append(t[n][0],t[n][1])}),"function"!=typeof a._fromString&&Object.defineProperty(a,"_fromString",{enumerable:!1,configurable:!1,writable:!1,value:function(e){if(this._entries)this._entries={};else{var t=[];this.forEach(function(e,n){t.push(n)});for(var n=0;n<t.length;n++)this.delete(t[n])}var i,a=(e=e.replace(/^\?/,"")).split("&");for(n=0;n<a.length;n++)i=a[n].split("="),this.append(r(i[0]),i.length>1?r(i[1]):"")}})}(void 0!==P?P:"undefined"!=typeof window?window:"undefined"!=typeof self?self:P),function(e){var t,n,i;if(function(){try{var t=new e.URL("b","http://a");return t.pathname="c%20d","http://a/c%20d"===t.href&&t.searchParams}catch(e){return!1}}()||(t=e.URL,i=(n=function(t,n){"string"!=typeof t&&(t=String(t));var i,r=document;if(n&&(void 0===e.location||n!==e.location.href)){(i=(r=document.implementation.createHTMLDocument("")).createElement("base")).href=n,r.head.appendChild(i);try{if(0!==i.href.indexOf(n))throw new Error(i.href)}catch(e){throw new Error("URL unable to set base "+n+" due to "+e)}}var a=r.createElement("a");if(a.href=t,i&&(r.body.appendChild(a),a.href=a.href),":"===a.protocol||!/:/.test(a.href))throw new TypeError("Invalid URL");Object.defineProperty(this,"_anchorElement",{value:a});var o=new e.URLSearchParams(this.search),s=!0,l=!0,c=this;["append","delete","set"].forEach(function(e){var t=o[e];o[e]=function(){t.apply(o,arguments),s&&(l=!1,c.search=o.toString(),l=!0)}}),Object.defineProperty(this,"searchParams",{value:o,enumerable:!0});var u=void 0;Object.defineProperty(this,"_updateSearchParams",{enumerable:!1,configurable:!1,writable:!1,value:function(){this.search!==u&&(u=this.search,l&&(s=!1,this.searchParams._fromString(this.search),s=!0))}})}).prototype,["hash","host","hostname","port","protocol"].forEach(function(e){!function(e){Object.defineProperty(i,e,{get:function(){return this._anchorElement[e]},set:function(t){this._anchorElement[e]=t},enumerable:!0})}(e)}),Object.defineProperty(i,"search",{get:function(){return this._anchorElement.search},set:function(e){this._anchorElement.search=e,this._updateSearchParams()},enumerable:!0}),Object.defineProperties(i,{toString:{get:function(){var e=this;return function(){return e.href}}},href:{get:function(){return this._anchorElement.href.replace(/\?$/,"")},set:function(e){this._anchorElement.href=e,this._updateSearchParams()},enumerable:!0},pathname:{get:function(){return this._anchorElement.pathname.replace(/(^\/?)/,"/")},set:function(e){this._anchorElement.pathname=e},enumerable:!0},origin:{get:function(){var e={"http:":80,"https:":443,"ftp:":21}[this._anchorElement.protocol],t=this._anchorElement.port!=e&&""!==this._anchorElement.port;return this._anchorElement.protocol+"//"+this._anchorElement.hostname+(t?":"+this._anchorElement.port:"")},enumerable:!0},password:{get:function(){return""},set:function(e){},enumerable:!0},username:{get:function(){return""},set:function(e){},enumerable:!0}}),n.createObjectURL=function(e){return t.createObjectURL.apply(t,arguments)},n.revokeObjectURL=function(e){return t.revokeObjectURL.apply(t,arguments)},e.URL=n),void 0!==e.location&&!("origin"in e.location)){var r=function(){return e.location.protocol+"//"+e.location.hostname+(e.location.port?":"+e.location.port:"")};try{Object.defineProperty(e.location,"origin",{get:r,enumerable:!0})}catch(t){setInterval(function(){e.location.origin=r()},100)}}}(void 0!==P?P:"undefined"!=typeof window?window:"undefined"!=typeof self?self:P);var Oa=Pe("isConcatSpreadable"),_a=!i(function(){var e=[];return e[Oa]=!1,e.concat()[0]!==e}),Ra=hn("concat"),Ua=function(e){if(!m(e))return!1;var t=e[Oa];return void 0!==t?!!t:Re(e)};Se({target:"Array",proto:!0,forced:!_a||!Ra},{concat:function(e){var t,n,i,r,a,o=Ft(this),s=ri(o,0),l=0;for(t=-1,i=arguments.length;t<i;t++)if(a=-1===t?o:arguments[t],Ua(a)){if(l+(r=te(a.length))>9007199254740991)throw TypeError("Maximum allowed index exceeded");for(n=0;n<r;n++,l++)n in a&&cn(s,l,a[n])}else{if(l>=9007199254740991)throw TypeError("Maximum allowed index exceeded");cn(s,l++,a)}return s.length=l,s}});var Fa=ai(2),qa=hn("filter");Se({target:"Array",proto:!0,forced:!qa},{filter:function(e){return Fa(this,e,arguments[1])}});var Da=ai(5),Ba=!0;"find"in[]&&Array(1).find(function(){Ba=!1}),Se({target:"Array",proto:!0,forced:Ba},{find:function(e){return Da(this,e,arguments.length>1?arguments[1]:void 0)}}),Rt("find");var Ha=Pe("iterator"),Va=!1;try{var za=0;({next:function(){return{done:!!za++}},return:function(){Va=!0}})[Ha]=function(){return this}}catch(e){}var Wa=function(e,t){if(!t&&!Va)return!1;var n=!1;try{var i={};i[Ha]=function(){return{next:function(){return{done:n=!0}}}},e(i)}catch(e){}return n},Ka=!Wa(function(e){});Se({target:"Array",stat:!0,forced:Ka},{from:Ii});var Ya=ae(!0);Se({target:"Array",proto:!0},{includes:function(e){return Ya(this,e,arguments.length>1?arguments[1]:void 0)}}),Rt("includes");var $a=ai(1),Ga=hn("map");Se({target:"Array",proto:!0,forced:!Ga},{map:function(e){return $a(this,e,arguments[1])}});var Qa=function(e,t,n){var i,r=t.constructor;return r!==n&&"function"==typeof r&&(i=r.prototype)!==n.prototype&&m(i)&&Gt&&Gt(e,i),e},Xa="\t\n\v\f\r    \u2028\u2029\ufeff",Ja="["+Xa+"]",Za=RegExp("^"+Ja+Ja+"*"),eo=RegExp(Ja+Ja+"*$"),to=function(e,t){return e=String(d(e)),1&t&&(e=e.replace(Za,"")),2&t&&(e=e.replace(eo,"")),e},no=ue.f,io=T.f,ro=A.f,ao=e.Number,oo=ao.prototype,so="Number"==u(Ve(oo)),lo="trim"in String.prototype,co=function(e){var t,n,i,r,a,o,s,l,c=g(e,!1);if("string"==typeof c&&c.length>2)if(43===(t=(c=lo?c.trim():to(c,3)).charCodeAt(0))||45===t){if(88===(n=c.charCodeAt(2))||120===n)return NaN}else if(48===t){switch(c.charCodeAt(1)){case 66:case 98:i=2,r=49;break;case 79:case 111:i=8,r=55;break;default:return+c}for(o=(a=c.slice(2)).length,s=0;s<o;s++)if((l=a.charCodeAt(s))<48||l>r)return NaN;return parseInt(a,i)}return+c};if(ke("Number",!ao(" 0o1")||!ao("0b1")||ao("+0x1"))){for(var uo,ho=function(e){var t=arguments.length<1?0:e,n=this;return n instanceof ho&&(so?i(function(){oo.valueOf.call(n)}):"Number"!=u(n))?Qa(new ao(co(t)),n,ho):co(t)},fo=r?no(ao):"MAX_VALUE,MIN_VALUE,NaN,NEGATIVE_INFINITY,POSITIVE_INFINITY,EPSILON,isFinite,isInteger,isNaN,isSafeInteger,MAX_SAFE_INTEGER,MIN_SAFE_INTEGER,parseFloat,parseInt,isInteger".split(","),po=0;fo.length>po;po++)n(ao,uo=fo[po])&&!n(ho,uo)&&ro(ho,uo,io(ao,uo));ho.prototype=oo,oo.constructor=ho,Q(e,"Number",ho)}var mo=i(function(){_e(1)});Se({target:"Object",stat:!0,forced:mo},{keys:function(e){return _e(Ft(e))}});var go=function(e,t,n){if($n(t))throw TypeError("String.prototype."+n+" doesn't accept regex");return String(d(e))},vo=Pe("match"),yo=function(e){var t=/./;try{"/./"[e](t)}catch(n){try{return t[vo]=!1,"/./"[e](t)}catch(e){}}return!1},bo=yo("includes");Se({target:"String",proto:!0,forced:!bo},{includes:function(e){return!!~go(this,e,"includes").indexOf(e,arguments.length>1?arguments[1]:void 0)}});var wo=!i(function(){return Object.isExtensible(Object.preventExtensions({}))}),ko=C(function(e){var t=q("meta"),i=A.f,r=0,a=Object.isExtensible||function(){return!0},o=function(e){i(e,t,{value:{objectID:"O"+ ++r,weakData:{}}})},s=e.exports={REQUIRED:!1,fastKey:function(e,i){if(!m(e))return"symbol"==typeof e?e:("string"==typeof e?"S":"P")+e;if(!n(e,t)){if(!a(e))return"F";if(!i)return"E";o(e)}return e[t].objectID},getWeakData:function(e,i){if(!n(e,t)){if(!a(e))return!0;if(!i)return!1;o(e)}return e[t].weakData},onFreeze:function(e){return wo&&s.REQUIRED&&a(e)&&!n(e,t)&&o(e),e}};H[t]=!0}),To=(ko.REQUIRED,ko.fastKey,ko.getWeakData,ko.onFreeze,C(function(e){var t={};(e.exports=function(e,n,i,r,a){var o,s,l,c,u,h=ni(n,i,r?2:1);if(a)o=e;else{if("function"!=typeof(s=Li(e)))throw TypeError("Target is not iterable");if(Pi(s)){for(l=0,c=te(e.length);c>l;l++)if((r?h(S(u=e[l])[0],u[1]):h(e[l]))===t)return t;return}o=s.call(e)}for(;!(u=o.next()).done;)if(Ei(o,h,u.value,r)===t)return t}).BREAK=t})),So=ko.getWeakData,Eo=G.set,Ao=G.getterFor,xo=ai(5),Po=ai(6),Co=0,Lo=function(e){return e.frozen||(e.frozen=new Io)},Io=function(){this.entries=[]},Mo=function(e,t){return xo(e.entries,function(e){return e[0]===t})};Io.prototype={get:function(e){var t=Mo(this,e);if(t)return t[1]},has:function(e){return!!Mo(this,e)},set:function(e,t){var n=Mo(this,e);n?n[1]=t:this.entries.push([e,t])},delete:function(e){var t=Po(this.entries,function(t){return t[0]===e});return~t&&this.entries.splice(t,1),!!~t}};var No={getConstructor:function(e,t,i,r){var a=e(function(e,n){ki(e,a,t),Eo(e,{type:t,id:Co++,frozen:void 0}),null!=n&&To(n,e[r],e,i)}),o=Ao(t),s=function(e,t,n){var i=o(e),r=So(S(t),!0);return!0===r?Lo(i).set(t,n):r[i.id]=n,e};return qi(a.prototype,{delete:function(e){var t=o(this);if(!m(e))return!1;var i=So(e);return!0===i?Lo(t).delete(e):i&&n(i,t.id)&&delete i[t.id]},has:function(e){var t=o(this);if(!m(e))return!1;var i=So(e);return!0===i?Lo(t).has(e):i&&n(i,t.id)}}),qi(a.prototype,i?{get:function(e){var t=o(this);if(m(e)){var n=So(e);return!0===n?Lo(t).get(e):n?n[t.id]:void 0}},set:function(e,t){return s(this,e,t)}}:{add:function(e){return s(this,e,!0)}}),a}};C(function(t){var n,r=G.enforce,a=!e.ActiveXObject&&"ActiveXObject"in e,o=Object.isExtensible,s=function(e){return function(){return e(this,arguments.length>0?arguments[0]:void 0)}},l=t.exports=function(t,n,r,a,o){var s=e[t],l=s&&s.prototype,c=s,u=a?"set":"add",h={},f=function(e){var t=l[e];Q(l,e,"add"==e?function(e){return t.call(this,0===e?0:e),this}:"delete"==e?function(e){return!(o&&!m(e))&&t.call(this,0===e?0:e)}:"get"==e?function(e){return o&&!m(e)?void 0:t.call(this,0===e?0:e)}:"has"==e?function(e){return!(o&&!m(e))&&t.call(this,0===e?0:e)}:function(e,n){return t.call(this,0===e?0:e,n),this})};if(ke(t,"function"!=typeof s||!(o||l.forEach&&!i(function(){(new s).entries().next()}))))c=r.getConstructor(n,t,a,u),ko.REQUIRED=!0;else if(ke(t,!0)){var d=new c,p=d[u](o?{}:-0,1)!=d,g=i(function(){d.has(1)}),v=Wa(function(e){new s(e)}),y=!o&&i(function(){for(var e=new s,t=5;t--;)e[u](t,t);return!e.has(-0)});v||((c=n(function(e,n){ki(e,c,t);var i=Qa(new s,e,c);return null!=n&&To(n,i[u],i,a),i})).prototype=l,l.constructor=c),(g||y)&&(f("delete"),f("has"),a&&f("get")),(y||p)&&f(u),o&&l.clear&&delete l.clear}return h[t]=c,Se({global:!0,forced:c!=s},h),Ie(c,t),o||r.setStrong(c,t,a),c}("WeakMap",s,No,!0,!0);if(R&&a){n=No.getConstructor(s,"WeakMap",!0),ko.REQUIRED=!0;var c=l.prototype,u=c.delete,h=c.has,f=c.get,d=c.set;qi(c,{delete:function(e){if(m(e)&&!o(e)){var t=r(this);return t.frozen||(t.frozen=new n),u.call(this,e)||t.frozen.delete(e)}return u.call(this,e)},has:function(e){if(m(e)&&!o(e)){var t=r(this);return t.frozen||(t.frozen=new n),h.call(this,e)||t.frozen.has(e)}return h.call(this,e)},get:function(e){if(m(e)&&!o(e)){var t=r(this);return t.frozen||(t.frozen=new n),h.call(this,e)?f.call(this,e):t.frozen.get(e)}return f.call(this,e)},set:function(e,t){if(m(e)&&!o(e)){var i=r(this);i.frozen||(i.frozen=new n),h.call(this,e)?d.call(this,e,t):i.frozen.set(e,t)}else d.call(this,e,t);return this}})}});Se({target:"Object",stat:!0,forced:Object.assign!==Si},{assign:Si});var jo=function(e){return i(function(){return!!Xa[e]()||"…"!="…"[e]()||Xa[e].name!==e})}("trim");Se({target:"String",proto:!0,forced:jo},{trim:function(){return to(this,3)}});var Oo="".repeat||function(e){var t=String(d(this)),n="",i=Z(e);if(i<0||i==1/0)throw RangeError("Wrong number of repetitions");for(;i>0;(i>>>=1)&&(t+=t))1&i&&(n+=t);return n},_o=1..toFixed,Ro=Math.floor,Uo=[0,0,0,0,0,0],Fo=function(e,t){for(var n=-1,i=t;++n<6;)i+=e*Uo[n],Uo[n]=i%1e7,i=Ro(i/1e7)},qo=function(e){for(var t=6,n=0;--t>=0;)n+=Uo[t],Uo[t]=Ro(n/e),n=n%e*1e7},Do=function(){for(var e=6,t="";--e>=0;)if(""!==t||0===e||0!==Uo[e]){var n=String(Uo[e]);t=""===t?n:t+Oo.call("0",7-n.length)+n}return t},Bo=function(e,t,n){return 0===t?n:t%2==1?Bo(e,t-1,n*e):Bo(e*e,t/2,n)};Se({target:"Number",proto:!0,forced:_o&&("0.000"!==8e-5.toFixed(3)||"1"!==.9.toFixed(0)||"1.25"!==1.255.toFixed(2)||"1000000000000000128"!==(0xde0b6b3a7640080).toFixed(0))||!i(function(){_o.call({})})},{toFixed:function(e){var t,n,i,r,a=function(e){if("number"!=typeof e&&"Number"!=u(e))throw TypeError("Incorrect invocation");return+e}(this),o=Z(e),s="",l="0";if(o<0||o>20)throw RangeError("Incorrect fraction digits");if(a!=a)return"NaN";if(a<=-1e21||a>=1e21)return String(a);if(a<0&&(s="-",a=-a),a>1e-21)if(n=(t=function(e){for(var t=0,n=e;n>=4096;)t+=12,n/=4096;for(;n>=2;)t+=1,n/=2;return t}(a*Bo(2,69,1))-69)<0?a*Bo(2,-t,1):a/Bo(2,t,1),n*=4503599627370496,(t=52-t)>0){for(Fo(0,n),i=o;i>=7;)Fo(1e7,0),i-=7;for(Fo(Bo(10,i,1),0),i=t-1;i>=23;)qo(1<<23),i-=23;qo(1<<i),Fo(1,1),qo(2),l=Do()}else Fo(0,n),Fo(1<<-t,0),l=Do()+Oo.call("0",o);return l=o>0?s+((r=l.length)<=o?"0."+Oo.call("0",o-r)+l:l.slice(0,r-o)+"."+l.slice(r-o)):s+l}});var Ho=s.f,Vo=function(e,t){for(var n,i=p(e),r=_e(i),a=r.length,o=0,s=[];a>o;)Ho.call(i,n=r[o++])&&s.push(t?[n,i[n]]:i[n]);return s};Se({target:"Object",stat:!0},{entries:function(e){return Vo(e,!0)}}),Se({target:"Object",stat:!0},{values:function(e){return Vo(e)}});var zo={addCSS:!0,thumbWidth:15,watch:!0};Se({target:"Number",stat:!0},{isNaN:function(e){return e!=e}});var Wo=function(e){return null!=e?e.constructor:null},Ko=function(e,t){return Boolean(e&&t&&e instanceof t)},Yo=function(e){return null==e},$o=function(e){return Wo(e)===Object},Go=function(e){return Wo(e)===String},Qo=function(e){return Array.isArray(e)},Xo=function(e){return Ko(e,NodeList)},Jo={nullOrUndefined:Yo,object:$o,number:function(e){return Wo(e)===Number&&!Number.isNaN(e)},string:Go,boolean:function(e){return Wo(e)===Boolean},function:function(e){return Wo(e)===Function},array:Qo,nodeList:Xo,element:function(e){return Ko(e,Element)},event:function(e){return Ko(e,Event)},empty:function(e){return Yo(e)||(Go(e)||Qo(e)||Xo(e))&&!e.length||$o(e)&&!Object.keys(e).length}};function Zo(e,t){if(t<1){var n=(i="".concat(t).match(/(?:\.(\d+))?(?:[eE]([+-]?\d+))?$/))?Math.max(0,(i[1]?i[1].length:0)-(i[2]?+i[2]:0)):0;return parseFloat(e.toFixed(n))}var i;return Math.round(e/t)*t}Dn("match",1,function(e,t,n){return[function(t){var n=d(this),i=null==t?void 0:t[e];return void 0!==i?i.call(t,n):new RegExp(t)[e](String(n))},function(e){var i=n(t,e,this);if(i.done)return i.value;var r=S(e),a=String(this);if(!r.global)return Rn(r,a);var o=r.unicode;r.lastIndex=0;for(var s,l=[],c=0;null!==(s=Rn(r,a));){var u=String(s[0]);l[c]=u,""===u&&(r.lastIndex=Ln(a,te(r.lastIndex),o)),c++}return 0===c?null:l}]});var es,ts,ns,is=function(){function e(t,n){Ca(this,e),Jo.element(t)?this.element=t:Jo.string(t)&&(this.element=document.querySelector(t)),Jo.element(this.element)&&Jo.empty(this.element.rangeTouch)&&(this.config=Object.assign({},zo,n),this.init())}return Ia(e,[{key:"init",value:function(){e.enabled&&(this.config.addCSS&&(this.element.style.userSelect="none",this.element.style.webKitUserSelect="none",this.element.style.touchAction="manipulation"),this.listeners(!0),this.element.rangeTouch=this)}},{key:"destroy",value:function(){e.enabled&&(this.listeners(!1),this.element.rangeTouch=null)}},{key:"listeners",value:function(e){var t=this,n=e?"addEventListener":"removeEventListener";["touchstart","touchmove","touchend"].forEach(function(e){t.element[n](e,function(e){return t.set(e)},!1)})}},{key:"get",value:function(t){if(!e.enabled||!Jo.event(t))return null;var n,i=t.target,r=t.changedTouches[0],a=parseFloat(i.getAttribute("min"))||0,o=parseFloat(i.getAttribute("max"))||100,s=parseFloat(i.getAttribute("step"))||1,l=o-a,c=i.getBoundingClientRect(),u=100/c.width*(this.config.thumbWidth/2)/100;return(n=100/c.width*(r.clientX-c.left))<0?n=0:n>100&&(n=100),n<50?n-=(100-2*n)*u:n>50&&(n+=2*(n-50)*u),a+Zo(l*(n/100),s)}},{key:"set",value:function(t){e.enabled&&Jo.event(t)&&!t.target.disabled&&(t.preventDefault(),t.target.value=this.get(t),function(e,t){if(e&&t){var n=new Event(t);e.dispatchEvent(n)}}(t.target,"touchend"===t.type?"change":"input"))}}],[{key:"setup",value:function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=null;if(Jo.empty(t)||Jo.string(t)?i=Array.from(document.querySelectorAll(Jo.string(t)?t:'input[type="range"]')):Jo.element(t)?i=[t]:Jo.nodeList(t)?i=Array.from(t):Jo.array(t)&&(i=t.filter(Jo.element)),Jo.empty(i))return null;var r=Object.assign({},zo,n);Jo.string(t)&&r.watch&&new MutationObserver(function(n){Array.from(n).forEach(function(n){Array.from(n.addedNodes).forEach(function(n){if(Jo.element(n)&&function(){return Array.from(document.querySelectorAll(i)).includes(this)}.call(n,i=t)){var i;new e(n,r)}})})}).observe(document.body,{childList:!0,subtree:!0});return i.map(function(t){return new e(t,n)})}},{key:"enabled",get:function(){return"ontouchstart"in document.documentElement}}]),e}(),rs=e.setImmediate,as=e.clearImmediate,os=e.process,ss=e.MessageChannel,ls=e.Dispatch,cs=0,us={},hs=function(){var e=+this;if(us.hasOwnProperty(e)){var t=us[e];delete us[e],t()}},fs=function(e){hs.call(e.data)};rs&&as||(rs=function(e){for(var t=[],n=1;arguments.length>n;)t.push(arguments[n++]);return us[++cs]=function(){("function"==typeof e?e:Function(e)).apply(void 0,t)},es(cs),cs},as=function(e){delete us[e]},"process"==u(os)?es=function(e){os.nextTick(ni(hs,e,1))}:ls&&ls.now?es=function(e){ls.now(ni(hs,e,1))}:ss?(ns=(ts=new ss).port2,ts.port1.onmessage=fs,es=ni(ns.postMessage,ns,1)):e.addEventListener&&"function"==typeof postMessage&&!e.importScripts?(es=function(t){e.postMessage(t+"","*")},e.addEventListener("message",fs,!1)):es="onreadystatechange"in b("script")?function(e){qe.appendChild(b("script")).onreadystatechange=function(){qe.removeChild(this),hs.call(e)}}:function(e){setTimeout(ni(hs,e,1),0)});var ds,ps,ms,gs,vs,ys,bs,ws={set:rs,clear:as},ks=e.navigator,Ts=ks&&ks.userAgent||"",Ss=T.f,Es=ws.set,As=e.MutationObserver||e.WebKitMutationObserver,xs=e.process,Ps=e.Promise,Cs="process"==u(xs),Ls=Ss(e,"queueMicrotask"),Is=Ls&&Ls.value;Is||(ds=function(){var e,t;for(Cs&&(e=xs.domain)&&e.exit();ps;){t=ps.fn,ps=ps.next;try{t()}catch(e){throw ps?gs():ms=void 0,e}}ms=void 0,e&&e.enter()},Cs?gs=function(){xs.nextTick(ds)}:As&&!/(iPhone|iPod|iPad).*AppleWebKit/i.test(Ts)?(vs=!0,ys=document.createTextNode(""),new As(ds).observe(ys,{characterData:!0}),gs=function(){ys.data=vs=!vs}):Ps&&Ps.resolve?(bs=Ps.resolve(void 0),gs=function(){bs.then(ds)}):gs=function(){Es.call(e,ds)});var Ms,Ns,js,Os=Is||function(e){var t={fn:e,next:void 0};ms&&(ms.next=t),ps||(ps=t,gs()),ms=t},_s=function(e){var t,n;this.promise=new e(function(e,i){if(void 0!==t||void 0!==n)throw TypeError("Bad Promise constructor");t=e,n=i}),this.resolve=Gn(t),this.reject=Gn(n)},Rs={f:function(e){return new _s(e)}},Us=function(e,t){if(S(e),m(t)&&t.constructor===e)return t;var n=Rs.f(e);return(0,n.resolve)(t),n.promise},Fs=function(e){try{return{error:!1,value:e()}}catch(e){return{error:!0,value:e}}},qs=function(e){return"function"==typeof e?e:void 0},Ds=Pe("species"),Bs=function(t){var n=function(t,n){return arguments.length<2?qs(Ne[t])||qs(e[t]):Ne[t]&&Ne[t][n]||e[t]&&e[t][n]}(t),i=A.f;r&&n&&!n[Ds]&&i(n,Ds,{configurable:!0,get:function(){return this}})},Hs="Promise",Vs=ws.set,zs=Pe("species"),Ws=G.get,Ks=G.set,Ys=G.getterFor(Hs),$s=e.Promise,Gs=e.TypeError,Qs=e.document,Xs=e.process,Js=e.fetch,Zs=Xs&&Xs.versions,el=Zs&&Zs.v8||"",tl=Rs.f,nl=tl,il="process"==u(Xs),rl=!!(Qs&&Qs.createEvent&&e.dispatchEvent),al=ke(Hs,function(){var e=$s.resolve(1),t=function(){},n=(e.constructor={})[zs]=function(e){e(t,t)};return!((il||"function"==typeof PromiseRejectionEvent)&&e.then(t)instanceof n&&0!==el.indexOf("6.6")&&-1===Ts.indexOf("Chrome/66"))}),ol=al||!Wa(function(e){$s.all(e).catch(function(){})}),sl=function(e){var t;return!(!m(e)||"function"!=typeof(t=e.then))&&t},ll=function(e,t,n){if(!t.notified){t.notified=!0;var i=t.reactions;Os(function(){for(var r=t.value,a=1==t.state,o=0,s=function(n){var i,o,s,l=a?n.ok:n.fail,c=n.resolve,u=n.reject,h=n.domain;try{l?(a||(2===t.rejection&&fl(e,t),t.rejection=1),!0===l?i=r:(h&&h.enter(),i=l(r),h&&(h.exit(),s=!0)),i===n.promise?u(Gs("Promise-chain cycle")):(o=sl(i))?o.call(i,c,u):c(i)):u(r)}catch(e){h&&!s&&h.exit(),u(e)}};i.length>o;)s(i[o++]);t.reactions=[],t.notified=!1,n&&!t.rejection&&ul(e,t)})}},cl=function(t,n,i){var r,a;rl?((r=Qs.createEvent("Event")).promise=n,r.reason=i,r.initEvent(t,!1,!0),e.dispatchEvent(r)):r={promise:n,reason:i},(a=e["on"+t])?a(r):"unhandledrejection"===t&&function(t,n){var i=e.console;i&&i.error&&(1===arguments.length?i.error(t):i.error(t,n))}("Unhandled promise rejection",i)},ul=function(t,n){Vs.call(e,function(){var e,i=n.value;if(hl(n)&&(e=Fs(function(){il?Xs.emit("unhandledRejection",i,t):cl("unhandledrejection",t,i)}),n.rejection=il||hl(n)?2:1,e.error))throw e.value})},hl=function(e){return 1!==e.rejection&&!e.parent},fl=function(t,n){Vs.call(e,function(){il?Xs.emit("rejectionHandled",t):cl("rejectionhandled",t,n.value)})},dl=function(e,t,n,i){return function(r){e(t,n,r,i)}},pl=function(e,t,n,i){t.done||(t.done=!0,i&&(t=i),t.value=n,t.state=2,ll(e,t,!0))},ml=function(e,t,n,i){if(!t.done){t.done=!0,i&&(t=i);try{if(e===n)throw Gs("Promise can't be resolved itself");var r=sl(n);r?Os(function(){var i={done:!1};try{r.call(n,dl(ml,e,i,t),dl(pl,e,i,t))}catch(n){pl(e,i,n,t)}}):(t.value=n,t.state=1,ll(e,t,!1))}catch(n){pl(e,{done:!1},n,t)}}};al&&($s=function(e){ki(this,$s,Hs),Gn(e),Ms.call(this);var t=Ws(this);try{e(dl(ml,this,t),dl(pl,this,t))}catch(e){pl(this,t,e)}},(Ms=function(e){Ks(this,{type:Hs,done:!1,notified:!1,parent:!1,reactions:[],rejection:!1,state:0,value:void 0})}).prototype=qi($s.prototype,{then:function(e,t){var n=Ys(this),i=tl(Xn(this,$s));return i.ok="function"!=typeof e||e,i.fail="function"==typeof t&&t,i.domain=il?Xs.domain:void 0,n.parent=!0,n.reactions.push(i),0!=n.state&&ll(this,n,!1),i.promise},catch:function(e){return this.then(void 0,e)}}),Ns=function(){var e=new Ms,t=Ws(e);this.promise=e,this.resolve=dl(ml,e,t),this.reject=dl(pl,e,t)},Rs.f=tl=function(e){return e===$s||e===js?new Ns(e):nl(e)},"function"==typeof Js&&Se({global:!0,enumerable:!0,forced:!0},{fetch:function(t){return Us($s,Js.apply(e,arguments))}})),Se({global:!0,wrap:!0,forced:al},{Promise:$s}),Ie($s,Hs,!1),Bs(Hs),js=Ne.Promise,Se({target:Hs,stat:!0,forced:al},{reject:function(e){var t=tl(this);return t.reject.call(void 0,e),t.promise}}),Se({target:Hs,stat:!0,forced:al},{resolve:function(e){return Us(this,e)}}),Se({target:Hs,stat:!0,forced:ol},{all:function(e){var t=this,n=tl(t),i=n.resolve,r=n.reject,a=Fs(function(){var n=[],a=0,o=1;To(e,function(e){var s=a++,l=!1;n.push(void 0),o++,t.resolve(e).then(function(e){l||(l=!0,n[s]=e,--o||i(n))},r)}),--o||i(n)});return a.error&&r(a.value),n.promise},race:function(e){var t=this,n=tl(t),i=n.reject,r=Fs(function(){To(e,function(e){t.resolve(e).then(n.resolve,i)})});return r.error&&i(r.value),n.promise}});var gl=yo("startsWith"),vl="".startsWith;Se({target:"String",proto:!0,forced:!gl},{startsWith:function(e){var t=go(this,e,"startsWith"),n=te(Math.min(arguments.length>1?arguments[1]:void 0,t.length)),i=String(e);return vl?vl.call(t,i,n):t.slice(n,n+i.length)===i}});var yl=function(e){return null!=e?e.constructor:null},bl=function(e,t){return Boolean(e&&t&&e instanceof t)},wl=function(e){return null==e},kl=function(e){return yl(e)===Object},Tl=function(e){return yl(e)===String},Sl=function(e){return Array.isArray(e)},El=function(e){return bl(e,NodeList)},Al=function(e){return wl(e)||(Tl(e)||Sl(e)||El(e))&&!e.length||kl(e)&&!Object.keys(e).length},xl={nullOrUndefined:wl,object:kl,number:function(e){return yl(e)===Number&&!Number.isNaN(e)},string:Tl,boolean:function(e){return yl(e)===Boolean},function:function(e){return yl(e)===Function},array:Sl,weakMap:function(e){return bl(e,WeakMap)},nodeList:El,element:function(e){return bl(e,Element)},textNode:function(e){return yl(e)===Text},event:function(e){return bl(e,Event)},keyboardEvent:function(e){return bl(e,KeyboardEvent)},cue:function(e){return bl(e,window.TextTrackCue)||bl(e,window.VTTCue)},track:function(e){return bl(e,TextTrack)||!wl(e)&&Tl(e.kind)},promise:function(e){return bl(e,Promise)},url:function(e){if(bl(e,window.URL))return!0;if(!Tl(e))return!1;var t=e;e.startsWith("http://")&&e.startsWith("https://")||(t="http://".concat(e));try{return!Al(new URL(t).hostname)}catch(e){return!1}},empty:Al},Pl=function(){var e=!1;try{var t=Object.defineProperty({},"passive",{get:function(){return e=!0,null}});window.addEventListener("test",null,t),window.removeEventListener("test",null,t)}catch(e){}return e}();function Cl(e,t,n){var i=this,r=arguments.length>3&&void 0!==arguments[3]&&arguments[3],a=!(arguments.length>4&&void 0!==arguments[4])||arguments[4],o=arguments.length>5&&void 0!==arguments[5]&&arguments[5];if(e&&"addEventListener"in e&&!xl.empty(t)&&xl.function(n)){var s=t.split(" "),l=o;Pl&&(l={passive:a,capture:o}),s.forEach(function(t){i&&i.eventListeners&&r&&i.eventListeners.push({element:e,type:t,callback:n,options:l}),e[r?"addEventListener":"removeEventListener"](t,n,l)})}}function Ll(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=arguments.length>2?arguments[2]:void 0,i=!(arguments.length>3&&void 0!==arguments[3])||arguments[3],r=arguments.length>4&&void 0!==arguments[4]&&arguments[4];Cl.call(this,e,t,n,!0,i,r)}function Il(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=arguments.length>2?arguments[2]:void 0,i=!(arguments.length>3&&void 0!==arguments[3])||arguments[3],r=arguments.length>4&&void 0!==arguments[4]&&arguments[4];Cl.call(this,e,t,n,!1,i,r)}function Ml(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",i=arguments.length>2?arguments[2]:void 0,r=!(arguments.length>3&&void 0!==arguments[3])||arguments[3],a=arguments.length>4&&void 0!==arguments[4]&&arguments[4];Cl.call(this,e,n,function o(){Il(e,n,o,r,a);for(var s=arguments.length,l=new Array(s),c=0;c<s;c++)l[c]=arguments[c];i.apply(t,l)},!0,r,a)}function Nl(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};if(xl.element(e)&&!xl.empty(t)){var r=new CustomEvent(t,{bubbles:n,detail:Object.assign({},i,{plyr:this})});e.dispatchEvent(r)}}function jl(e,t){return t.split(".").reduce(function(e,t){return e&&e[t]},e)}function Ol(){for(var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length,n=new Array(t>1?t-1:0),i=1;i<t;i++)n[i-1]=arguments[i];if(!n.length)return e;var r=n.shift();return xl.object(r)?(Object.keys(r).forEach(function(t){xl.object(r[t])?(Object.keys(e).includes(t)||Object.assign(e,Ma({},t,{})),Ol(e[t],r[t])):Object.assign(e,Ma({},t,r[t]))}),Ol.apply(void 0,[e].concat(n))):e}function _l(e,t){var n=e.length?e:[e];Array.from(n).reverse().forEach(function(e,n){var i=n>0?t.cloneNode(!0):t,r=e.parentNode,a=e.nextSibling;i.appendChild(e),a?r.insertBefore(i,a):r.appendChild(i)})}function Rl(e,t){xl.element(e)&&!xl.empty(t)&&Object.entries(t).filter(function(e){var t=Na(e,2)[1];return!xl.nullOrUndefined(t)}).forEach(function(t){var n=Na(t,2),i=n[0],r=n[1];return e.setAttribute(i,r)})}function Ul(e,t,n){var i=document.createElement(e);return xl.object(t)&&Rl(i,t),xl.string(n)&&(i.innerText=n),i}function Fl(e,t,n,i){xl.element(t)&&t.appendChild(Ul(e,n,i))}function ql(e){xl.nodeList(e)||xl.array(e)?Array.from(e).forEach(ql):xl.element(e)&&xl.element(e.parentNode)&&e.parentNode.removeChild(e)}function Dl(e){if(xl.element(e))for(var t=e.childNodes.length;t>0;)e.removeChild(e.lastChild),t-=1}function Bl(e,t){return xl.element(t)&&xl.element(t.parentNode)&&xl.element(e)?(t.parentNode.replaceChild(e,t),e):null}function Hl(e,t){if(!xl.string(e)||xl.empty(e))return{};var n={},i=Ol({},t);return e.split(",").forEach(function(e){var t=e.trim(),r=t.replace(".",""),a=t.replace(/[[\]]/g,"").split("="),o=Na(a,1)[0],s=a.length>1?a[1].replace(/["']/g,""):"";switch(t.charAt(0)){case".":xl.string(i.class)?n.class="".concat(i.class," ").concat(r):n.class=r;break;case"#":n.id=t.replace("#","");break;case"[":n[o]=s}}),Ol(i,n)}function Vl(e,t){if(xl.element(e)){var n=t;xl.boolean(n)||(n=!e.hidden),n?e.setAttribute("hidden",""):e.removeAttribute("hidden")}}function zl(e,t,n){if(xl.nodeList(e))return Array.from(e).map(function(e){return zl(e,t,n)});if(xl.element(e)){var i="toggle";return void 0!==n&&(i=n?"add":"remove"),e.classList[i](t),e.classList.contains(t)}return!1}function Wl(e,t){return xl.element(e)&&e.classList.contains(t)}function Kl(e,t){return function(){return Array.from(document.querySelectorAll(t)).includes(this)}.call(e,t)}function Yl(e){return this.elements.container.querySelectorAll(e)}function $l(e){return this.elements.container.querySelector(e)}function Gl(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];xl.element(e)&&(e.focus({preventScroll:!0}),t&&zl(e,this.config.classNames.tabFocus))}var Ql,Xl,Jl,Zl=(Ql=document.createElement("span"),Xl={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd otransitionend",transition:"transitionend"},Jl=Object.keys(Xl).find(function(e){return void 0!==Ql.style[e]}),!!xl.string(Jl)&&Xl[Jl]);function ec(e){setTimeout(function(){try{Vl(e,!0),e.offsetHeight,Vl(e,!1)}catch(e){}},0)}var tc,nc={isIE:!!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:/(iPad|iPhone|iPod)/gi.test(navigator.platform)},ic={"audio/ogg":"vorbis","audio/wav":"1","video/webm":"vp8, vorbis","video/mp4":"avc1.42E01E, mp4a.40.2","video/ogg":"theora"},rc={audio:"canPlayType"in document.createElement("audio"),video:"canPlayType"in document.createElement("video"),check:function(e,t,n){var i=nc.isIPhone&&n&&rc.playsinline,r=rc[e]||"html5"!==t;return{api:r,ui:r&&rc.rangeInput&&("video"!==e||!nc.isIPhone||i)}},pip:!(nc.isIPhone||!xl.function(Ul("video").webkitSetPresentationMode)&&(!document.pictureInPictureEnabled||Ul("video").disablePictureInPicture)),airplay:xl.function(window.WebKitPlaybackTargetAvailabilityEvent),playsinline:"playsInline"in document.createElement("video"),mime:function(e){if(xl.empty(e))return!1;var t=Na(e.split("/"),1)[0],n=e;if(!this.isHTML5||t!==this.type)return!1;Object.keys(ic).includes(n)&&(n+='; codecs="'.concat(ic[e],'"'));try{return Boolean(n&&this.media.canPlayType(n).replace(/no/,""))}catch(e){return!1}},textTracks:"textTracks"in document.createElement("video"),rangeInput:(tc=document.createElement("input"),tc.type="range","range"===tc.type),touch:"ontouchstart"in document.documentElement,transitions:!1!==Zl,reducedMotion:"matchMedia"in window&&window.matchMedia("(prefers-reduced-motion)").matches};function ac(e){return!!(xl.array(e)||xl.string(e)&&e.includes(":"))&&(xl.array(e)?e:e.split(":")).map(Number).every(xl.number)}function oc(e){if(!xl.array(e)||!e.every(xl.number))return null;var t=Na(e,2),n=t[0],i=t[1],r=function e(t,n){return 0===n?t:e(n,t%n)}(n,i);return[n/r,i/r]}function sc(e){var t=function(e){return ac(e)?e.split(":").map(Number):null},n=t(e);if(null===n&&(n=t(this.config.ratio)),null===n&&!xl.empty(this.embed)&&xl.array(this.embed.ratio)&&(n=this.embed.ratio),null===n&&this.isHTML5){var i=this.media;n=oc([i.videoWidth,i.videoHeight])}return n}function lc(e){if(!this.isVideo)return{};var t=sc.call(this,e),n=Na(xl.array(t)?t:[0,0],2),i=100/n[0]*n[1];if(this.elements.wrapper.style.paddingBottom="".concat(i,"%"),this.isVimeo&&this.supported.ui){var r=(240-i)/4.8;this.media.style.transform="translateY(-".concat(r,"%)")}else this.isHTML5&&this.elements.wrapper.classList.toggle(this.config.classNames.videoFixedRatio,null!==t);return{padding:i,ratio:t}}var cc={getSources:function(){var e=this;return this.isHTML5?Array.from(this.media.querySelectorAll("source")).filter(function(t){var n=t.getAttribute("type");return!!xl.empty(n)||rc.mime.call(e,n)}):[]},getQualityOptions:function(){return cc.getSources.call(this).map(function(e){return Number(e.getAttribute("size"))}).filter(Boolean)},extend:function(){if(this.isHTML5){var e=this;lc.call(e),Object.defineProperty(e.media,"quality",{get:function(){var t=cc.getSources.call(e).find(function(t){return t.getAttribute("src")===e.source});return t&&Number(t.getAttribute("size"))},set:function(t){var n=cc.getSources.call(e).find(function(e){return Number(e.getAttribute("size"))===t});if(n){var i=e.media,r=i.currentTime,a=i.paused,o=i.preload,s=i.readyState;e.media.src=n.getAttribute("src"),("none"!==o||s)&&(e.once("loadedmetadata",function(){e.currentTime=r,a||e.play()}),e.media.load()),Nl.call(e,e.media,"qualitychange",!1,{quality:t})}}})}},cancelRequests:function(){this.isHTML5&&(ql(cc.getSources.call(this)),this.media.setAttribute("src",this.config.blankVideo),this.media.load(),this.debug.log("Cancelled network requests"))}};function uc(e){return xl.array(e)?e.filter(function(t,n){return e.indexOf(t)===n}):e}var hc=Pe("match"),fc=A.f,dc=ue.f,pc=e.RegExp,mc=pc.prototype,gc=/a/g,vc=/a/g,yc=new pc(gc)!==gc;if(ke("RegExp",r&&(!yc||i(function(){return vc[hc]=!1,pc(gc)!=gc||pc(vc)==vc||"/a/i"!=pc(gc,"i")})))){for(var bc=function(e,t){var n=this instanceof bc,i=$n(e),r=void 0===t;return!n&&i&&e.constructor===bc&&r?e:Qa(yc?new pc(i&&!r?e.source:e,t):pc((i=e instanceof bc)?e.source:e,i&&r?Tn.call(e):t),n?this:mc,bc)},wc=function(e){e in bc||fc(bc,e,{configurable:!0,get:function(){return pc[e]},set:function(t){pc[e]=t}})},kc=dc(pc),Tc=0;Tc<kc.length;)wc(kc[Tc++]);mc.constructor=bc,bc.prototype=mc,Q(e,"RegExp",bc)}function Sc(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),i=1;i<t;i++)n[i-1]=arguments[i];return xl.empty(e)?e:e.toString().replace(/{(\d+)}/g,function(e,t){return n[t].toString()})}function Ec(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";return e.replace(new RegExp(t.toString().replace(/([.*+?^=!:${}()|[\]\/\\])/g,"\\$1"),"g"),n.toString())}function Ac(){return(arguments.length>0&&void 0!==arguments[0]?arguments[0]:"").toString().replace(/\w\S*/g,function(e){return e.charAt(0).toUpperCase()+e.substr(1).toLowerCase()})}function xc(){var e=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:"").toString();return(e=function(){var e=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:"").toString();return e=Ec(e,"-"," "),e=Ec(e,"_"," "),Ec(e=Ac(e)," ","")}(e)).charAt(0).toLowerCase()+e.slice(1)}function Pc(e){var t=document.createElement("div");return t.appendChild(e),t.innerHTML}Bs("RegExp");var Cc={pip:"PIP",airplay:"AirPlay",html5:"HTML5",vimeo:"Vimeo",youtube:"YouTube"},Lc=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(xl.empty(e)||xl.empty(t))return"";var n=jl(t.i18n,e);if(xl.empty(n))return Object.keys(Cc).includes(e)?Cc[e]:"";var i={"{seektime}":t.seekTime,"{title}":t.title};return Object.entries(i).forEach(function(e){var t=Na(e,2),i=t[0],r=t[1];n=Ec(n,i,r)}),n},Ic=function(){function e(t){Ca(this,e),this.enabled=t.config.storage.enabled,this.key=t.config.storage.key}return Ia(e,[{key:"get",value:function(t){if(!e.supported||!this.enabled)return null;var n=window.localStorage.getItem(this.key);if(xl.empty(n))return null;var i=JSON.parse(n);return xl.string(t)&&t.length?i[t]:i}},{key:"set",value:function(t){if(e.supported&&this.enabled&&xl.object(t)){var n=this.get();xl.empty(n)&&(n={}),Ol(n,t),window.localStorage.setItem(this.key,JSON.stringify(n))}}}],[{key:"supported",get:function(){try{if(!("localStorage"in window))return!1;return window.localStorage.setItem("___test","___test"),window.localStorage.removeItem("___test"),!0}catch(e){return!1}}}]),e}();function Mc(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"text";return new Promise(function(n,i){try{var r=new XMLHttpRequest;if(!("withCredentials"in r))return;r.addEventListener("load",function(){if("text"===t)try{n(JSON.parse(r.responseText))}catch(e){n(r.responseText)}else n(r.response)}),r.addEventListener("error",function(){throw new Error(r.status)}),r.open("GET",e,!0),r.responseType=t,r.send()}catch(e){i(e)}})}function Nc(e,t){if(xl.string(e)){var n=xl.string(t),i=function(){return null!==document.getElementById(t)},r=function(e,t){e.innerHTML=t,n&&i()||document.body.insertAdjacentElement("afterbegin",e)};if(!n||!i()){var a=Ic.supported,o=document.createElement("div");if(o.setAttribute("hidden",""),n&&o.setAttribute("id",t),a){var s=window.localStorage.getItem("".concat("cache","-").concat(t));if(null!==s){var l=JSON.parse(s);r(o,l.content)}}Mc(e).then(function(e){xl.empty(e)||(a&&window.localStorage.setItem("".concat("cache","-").concat(t),JSON.stringify({content:e})),r(o,e))}).catch(function(){})}}}var jc=Math.ceil,Oc=Math.floor;Se({target:"Math",stat:!0},{trunc:function(e){return(e>0?Oc:jc)(e)}});var _c=function(e){return Math.trunc(e/60/60%60,10)},Rc=function(e){return Math.trunc(e/60%60,10)},Uc=function(e){return Math.trunc(e%60,10)};function Fc(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if(!xl.number(e))return Fc(null,t,n);var i=function(e){return"0".concat(e).slice(-2)},r=_c(e),a=Rc(e),o=Uc(e);return r=t||r>0?"".concat(r,":"):"","".concat(n&&e>0?"-":"").concat(r).concat(i(a),":").concat(i(o))}var qc={getIconUrl:function(){var e=new URL(this.config.iconUrl,window.location).host!==window.location.host||nc.isIE&&!window.svg4everybody;return{url:this.config.iconUrl,cors:e}},findElements:function(){try{return this.elements.controls=$l.call(this,this.config.selectors.controls.wrapper),this.elements.buttons={play:Yl.call(this,this.config.selectors.buttons.play),pause:$l.call(this,this.config.selectors.buttons.pause),restart:$l.call(this,this.config.selectors.buttons.restart),rewind:$l.call(this,this.config.selectors.buttons.rewind),fastForward:$l.call(this,this.config.selectors.buttons.fastForward),mute:$l.call(this,this.config.selectors.buttons.mute),pip:$l.call(this,this.config.selectors.buttons.pip),airplay:$l.call(this,this.config.selectors.buttons.airplay),settings:$l.call(this,this.config.selectors.buttons.settings),captions:$l.call(this,this.config.selectors.buttons.captions),fullscreen:$l.call(this,this.config.selectors.buttons.fullscreen)},this.elements.progress=$l.call(this,this.config.selectors.progress),this.elements.inputs={seek:$l.call(this,this.config.selectors.inputs.seek),volume:$l.call(this,this.config.selectors.inputs.volume)},this.elements.display={buffer:$l.call(this,this.config.selectors.display.buffer),currentTime:$l.call(this,this.config.selectors.display.currentTime),duration:$l.call(this,this.config.selectors.display.duration)},xl.element(this.elements.progress)&&(this.elements.display.seekTooltip=this.elements.progress.querySelector(".".concat(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:function(e,t){var n=qc.getIconUrl.call(this),i="".concat(n.cors?"":n.url,"#").concat(this.config.iconPrefix),r=document.createElementNS("http://www.w3.org/2000/svg","svg");Rl(r,Ol(t,{role:"presentation",focusable:"false"}));var a=document.createElementNS("http://www.w3.org/2000/svg","use"),o="".concat(i,"-").concat(e);return"href"in a&&a.setAttributeNS("http://www.w3.org/1999/xlink","href",o),a.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",o),r.appendChild(a),r},createLabel:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=Lc(e,this.config);return Ul("span",Object.assign({},t,{class:[t.class,this.config.classNames.hidden].filter(Boolean).join(" ")}),n)},createBadge:function(e){if(xl.empty(e))return null;var t=Ul("span",{class:this.config.classNames.menu.value});return t.appendChild(Ul("span",{class:this.config.classNames.menu.badge},e)),t},createButton:function(e,t){var n=this,i=Ol({},t),r=xc(e),a={element:"button",toggle:!1,label:null,icon:null,labelPressed:null,iconPressed:null};switch(["element","icon","label"].forEach(function(e){Object.keys(i).includes(e)&&(a[e]=i[e],delete i[e])}),"button"!==a.element||Object.keys(i).includes("type")||(i.type="button"),Object.keys(i).includes("class")?i.class.split(" ").some(function(e){return e===n.config.classNames.control})||Ol(i,{class:"".concat(i.class," ").concat(this.config.classNames.control)}):i.class=this.config.classNames.control,e){case"play":a.toggle=!0,a.label="play",a.labelPressed="pause",a.icon="play",a.iconPressed="pause";break;case"mute":a.toggle=!0,a.label="mute",a.labelPressed="unmute",a.icon="volume",a.iconPressed="muted";break;case"captions":a.toggle=!0,a.label="enableCaptions",a.labelPressed="disableCaptions",a.icon="captions-off",a.iconPressed="captions-on";break;case"fullscreen":a.toggle=!0,a.label="enterFullscreen",a.labelPressed="exitFullscreen",a.icon="enter-fullscreen",a.iconPressed="exit-fullscreen";break;case"play-large":i.class+=" ".concat(this.config.classNames.control,"--overlaid"),r="play",a.label="play",a.icon="play";break;default:xl.empty(a.label)&&(a.label=r),xl.empty(a.icon)&&(a.icon=e)}var o=Ul(a.element);return a.toggle?(o.appendChild(qc.createIcon.call(this,a.iconPressed,{class:"icon--pressed"})),o.appendChild(qc.createIcon.call(this,a.icon,{class:"icon--not-pressed"})),o.appendChild(qc.createLabel.call(this,a.labelPressed,{class:"label--pressed"})),o.appendChild(qc.createLabel.call(this,a.label,{class:"label--not-pressed"}))):(o.appendChild(qc.createIcon.call(this,a.icon)),o.appendChild(qc.createLabel.call(this,a.label))),Ol(i,Hl(this.config.selectors.buttons[r],i)),Rl(o,i),"play"===r?(xl.array(this.elements.buttons[r])||(this.elements.buttons[r]=[]),this.elements.buttons[r].push(o)):this.elements.buttons[r]=o,o},createRange:function(e,t){var n=Ul("input",Ol(Hl(this.config.selectors.inputs[e]),{type:"range",min:0,max:100,step:.01,value:0,autocomplete:"off",role:"slider","aria-label":Lc(e,this.config),"aria-valuemin":0,"aria-valuemax":100,"aria-valuenow":0},t));return this.elements.inputs[e]=n,qc.updateRangeFill.call(this,n),is.setup(n),n},createProgress:function(e,t){var n=Ul("progress",Ol(Hl(this.config.selectors.display[e]),{min:0,max:100,value:0,role:"progressbar","aria-hidden":!0},t));if("volume"!==e){n.appendChild(Ul("span",null,"0"));var i={played:"played",buffer:"buffered"}[e],r=i?Lc(i,this.config):"";n.innerText="% ".concat(r.toLowerCase())}return this.elements.display[e]=n,n},createTime:function(e,t){var n=Hl(this.config.selectors.display[e],t),i=Ul("div",Ol(n,{class:"".concat(n.class?n.class:""," ").concat(this.config.classNames.display.time," ").trim(),"aria-label":Lc(e,this.config)}),"00:00");return this.elements.display[e]=i,i},bindMenuItemShortcuts:function(e,t){var n=this;Ll(e,"keydown keyup",function(i){if([32,38,39,40].includes(i.which)&&(i.preventDefault(),i.stopPropagation(),"keydown"!==i.type)){var r,a=Kl(e,'[role="menuitemradio"]');if(!a&&[32,39].includes(i.which))qc.showMenuPanel.call(n,t,!0);else 32!==i.which&&(40===i.which||a&&39===i.which?(r=e.nextElementSibling,xl.element(r)||(r=e.parentNode.firstElementChild)):(r=e.previousElementSibling,xl.element(r)||(r=e.parentNode.lastElementChild)),Gl.call(n,r,!0))}},!1),Ll(e,"keyup",function(e){13===e.which&&qc.focusFirstMenuItem.call(n,null,!0)})},createMenuItem:function(e){var t=this,n=e.value,i=e.list,r=e.type,a=e.title,o=e.badge,s=void 0===o?null:o,l=e.checked,c=void 0!==l&&l,u=Hl(this.config.selectors.inputs[r]),h=Ul("button",Ol(u,{type:"button",role:"menuitemradio",class:"".concat(this.config.classNames.control," ").concat(u.class?u.class:"").trim(),"aria-checked":c,value:n})),f=Ul("span");f.innerHTML=a,xl.element(s)&&f.appendChild(s),h.appendChild(f),Object.defineProperty(h,"checked",{enumerable:!0,get:function(){return"true"===h.getAttribute("aria-checked")},set:function(e){e&&Array.from(h.parentNode.children).filter(function(e){return Kl(e,'[role="menuitemradio"]')}).forEach(function(e){return e.setAttribute("aria-checked","false")}),h.setAttribute("aria-checked",e?"true":"false")}}),this.listeners.bind(h,"click keyup",function(e){if(!xl.keyboardEvent(e)||32===e.which){switch(e.preventDefault(),e.stopPropagation(),h.checked=!0,r){case"language":t.currentTrack=Number(n);break;case"quality":t.quality=n;break;case"speed":t.speed=parseFloat(n)}qc.showMenuPanel.call(t,"home",xl.keyboardEvent(e))}},r,!1),qc.bindMenuItemShortcuts.call(this,h,r),i.appendChild(h)},formatTime:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return xl.number(e)?Fc(e,_c(this.duration)>0,t):e},updateTimeDisplay:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];xl.element(e)&&xl.number(t)&&(e.innerText=qc.formatTime(t,n))},updateVolume:function(){this.supported.ui&&(xl.element(this.elements.inputs.volume)&&qc.setRange.call(this,this.elements.inputs.volume,this.muted?0:this.volume),xl.element(this.elements.buttons.mute)&&(this.elements.buttons.mute.pressed=this.muted||0===this.volume))},setRange:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;xl.element(e)&&(e.value=t,qc.updateRangeFill.call(this,e))},updateProgress:function(e){var t=this;if(this.supported.ui&&xl.event(e)){var n,i,r=0;if(e)switch(e.type){case"timeupdate":case"seeking":case"seeked":n=this.currentTime,i=this.duration,r=0===n||0===i||Number.isNaN(n)||Number.isNaN(i)?0:(n/i*100).toFixed(2),"timeupdate"===e.type&&qc.setRange.call(this,this.elements.inputs.seek,r);break;case"playing":case"progress":!function(e,n){var i=xl.number(n)?n:0,r=xl.element(e)?e:t.elements.display.buffer;if(xl.element(r)){r.value=i;var a=r.getElementsByTagName("span")[0];xl.element(a)&&(a.childNodes[0].nodeValue=i)}}(this.elements.display.buffer,100*this.buffered)}}},updateRangeFill:function(e){var t=xl.event(e)?e.target:e;if(xl.element(t)&&"range"===t.getAttribute("type")){if(Kl(t,this.config.selectors.inputs.seek)){t.setAttribute("aria-valuenow",this.currentTime);var n=qc.formatTime(this.currentTime),i=qc.formatTime(this.duration),r=Lc("seekLabel",this.config);t.setAttribute("aria-valuetext",r.replace("{currentTime}",n).replace("{duration}",i))}else if(Kl(t,this.config.selectors.inputs.volume)){var a=100*t.value;t.setAttribute("aria-valuenow",a),t.setAttribute("aria-valuetext","".concat(a.toFixed(1),"%"))}else t.setAttribute("aria-valuenow",t.value);nc.isWebkit&&t.style.setProperty("--value","".concat(t.value/t.max*100,"%"))}},updateSeekTooltip:function(e){var t=this;if(this.config.tooltips.seek&&xl.element(this.elements.inputs.seek)&&xl.element(this.elements.display.seekTooltip)&&0!==this.duration){var n=0,i=this.elements.progress.getBoundingClientRect(),r="".concat(this.config.classNames.tooltip,"--visible"),a=function(e){zl(t.elements.display.seekTooltip,r,e)};if(this.touch)a(!1);else{if(xl.event(e))n=100/i.width*(e.pageX-i.left);else{if(!Wl(this.elements.display.seekTooltip,r))return;n=parseFloat(this.elements.display.seekTooltip.style.left,10)}n<0?n=0:n>100&&(n=100),qc.updateTimeDisplay.call(this,this.elements.display.seekTooltip,this.duration/100*n),this.elements.display.seekTooltip.style.left="".concat(n,"%"),xl.event(e)&&["mouseenter","mouseleave"].includes(e.type)&&a("mouseenter"===e.type)}}},timeUpdate:function(e){var t=!xl.element(this.elements.display.duration)&&this.config.invertTime;qc.updateTimeDisplay.call(this,this.elements.display.currentTime,t?this.duration-this.currentTime:this.currentTime,t),e&&"timeupdate"===e.type&&this.media.seeking||qc.updateProgress.call(this,e)},durationUpdate:function(){if(this.supported.ui&&(this.config.invertTime||!this.currentTime)){if(this.duration>=Math.pow(2,32))return Vl(this.elements.display.currentTime,!0),void Vl(this.elements.progress,!0);xl.element(this.elements.inputs.seek)&&this.elements.inputs.seek.setAttribute("aria-valuemax",this.duration);var e=xl.element(this.elements.display.duration);!e&&this.config.displayDuration&&this.paused&&qc.updateTimeDisplay.call(this,this.elements.display.currentTime,this.duration),e&&qc.updateTimeDisplay.call(this,this.elements.display.duration,this.duration),qc.updateSeekTooltip.call(this)}},toggleMenuButton:function(e,t){Vl(this.elements.settings.buttons[e],!t)},updateSetting:function(e,t,n){var i=this.elements.settings.panels[e],r=null,a=t;if("captions"===e)r=this.currentTrack;else{if(r=xl.empty(n)?this[e]:n,xl.empty(r)&&(r=this.config[e].default),!xl.empty(this.options[e])&&!this.options[e].includes(r))return void this.debug.warn("Unsupported value of '".concat(r,"' for ").concat(e));if(!this.config[e].options.includes(r))return void this.debug.warn("Disabled value of '".concat(r,"' for ").concat(e))}if(xl.element(a)||(a=i&&i.querySelector('[role="menu"]')),xl.element(a)){this.elements.settings.buttons[e].querySelector(".".concat(this.config.classNames.menu.value)).innerHTML=qc.getLabel.call(this,e,r);var o=a&&a.querySelector('[value="'.concat(r,'"]'));xl.element(o)&&(o.checked=!0)}},getLabel:function(e,t){switch(e){case"speed":return 1===t?Lc("normal",this.config):"".concat(t,"&times;");case"quality":if(xl.number(t)){var n=Lc("qualityLabel.".concat(t),this.config);return n.length?n:"".concat(t,"p")}return Ac(t);case"captions":return Hc.getLabel.call(this);default:return null}},setQualityMenu:function(e){var t=this;if(xl.element(this.elements.settings.panels.quality)){var n=this.elements.settings.panels.quality.querySelector('[role="menu"]');xl.array(e)&&(this.options.quality=uc(e).filter(function(e){return t.config.quality.options.includes(e)}));var i=!xl.empty(this.options.quality)&&this.options.quality.length>1;if(qc.toggleMenuButton.call(this,"quality",i),Dl(n),qc.checkMenu.call(this),i){var r=function(e){var n=Lc("qualityBadge.".concat(e),t.config);return n.length?qc.createBadge.call(t,n):null};this.options.quality.sort(function(e,n){var i=t.config.quality.options;return i.indexOf(e)>i.indexOf(n)?1:-1}).forEach(function(e){qc.createMenuItem.call(t,{value:e,list:n,type:"quality",title:qc.getLabel.call(t,"quality",e),badge:r(e)})}),qc.updateSetting.call(this,"quality",n)}}},setCaptionsMenu:function(){var e=this;if(xl.element(this.elements.settings.panels.captions)){var t=this.elements.settings.panels.captions.querySelector('[role="menu"]'),n=Hc.getTracks.call(this),i=Boolean(n.length);if(qc.toggleMenuButton.call(this,"captions",i),Dl(t),qc.checkMenu.call(this),i){var r=n.map(function(n,i){return{value:i,checked:e.captions.toggled&&e.currentTrack===i,title:Hc.getLabel.call(e,n),badge:n.language&&qc.createBadge.call(e,n.language.toUpperCase()),list:t,type:"language"}});r.unshift({value:-1,checked:!this.captions.toggled,title:Lc("disabled",this.config),list:t,type:"language"}),r.forEach(qc.createMenuItem.bind(this)),qc.updateSetting.call(this,"captions",t)}}},setSpeedMenu:function(e){var t=this;if(xl.element(this.elements.settings.panels.speed)){var n=this.elements.settings.panels.speed.querySelector('[role="menu"]');xl.array(e)?this.options.speed=e:(this.isHTML5||this.isVimeo)&&(this.options.speed=[.5,.75,1,1.25,1.5,1.75,2]),this.options.speed=this.options.speed.filter(function(e){return t.config.speed.options.includes(e)});var i=!xl.empty(this.options.speed)&&this.options.speed.length>1;qc.toggleMenuButton.call(this,"speed",i),Dl(n),qc.checkMenu.call(this),i&&(this.options.speed.forEach(function(e){qc.createMenuItem.call(t,{value:e,list:n,type:"speed",title:qc.getLabel.call(t,"speed",e)})}),qc.updateSetting.call(this,"speed",n))}},checkMenu:function(){var e=this.elements.settings.buttons,t=!xl.empty(e)&&Object.values(e).some(function(e){return!e.hidden});Vl(this.elements.settings.menu,!t)},focusFirstMenuItem:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(!this.elements.settings.popup.hidden){var n=e;xl.element(n)||(n=Object.values(this.elements.settings.panels).find(function(e){return!e.hidden}));var i=n.querySelector('[role^="menuitem"]');Gl.call(this,i,t)}},toggleMenu:function(e){var t=this.elements.settings.popup,n=this.elements.buttons.settings;if(xl.element(t)&&xl.element(n)){var i=t.hidden,r=i;if(xl.boolean(e))r=e;else if(xl.keyboardEvent(e)&&27===e.which)r=!1;else if(xl.event(e)){var a=xl.function(e.composedPath)?e.composedPath()[0]:e.target,o=t.contains(a);if(o||!o&&e.target!==n&&r)return}n.setAttribute("aria-expanded",r),Vl(t,!r),zl(this.elements.container,this.config.classNames.menu.open,r),r&&xl.keyboardEvent(e)?qc.focusFirstMenuItem.call(this,null,!0):r||i||Gl.call(this,n,xl.keyboardEvent(e))}},getMenuSize:function(e){var t=e.cloneNode(!0);t.style.position="absolute",t.style.opacity=0,t.removeAttribute("hidden"),e.parentNode.appendChild(t);var n=t.scrollWidth,i=t.scrollHeight;return ql(t),{width:n,height:i}},showMenuPanel:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",n=arguments.length>1&&void 0!==arguments[1]&&arguments[1],i=this.elements.container.querySelector("#plyr-settings-".concat(this.id,"-").concat(t));if(xl.element(i)){var r=i.parentNode,a=Array.from(r.children).find(function(e){return!e.hidden});if(rc.transitions&&!rc.reducedMotion){r.style.width="".concat(a.scrollWidth,"px"),r.style.height="".concat(a.scrollHeight,"px");var o=qc.getMenuSize.call(this,i);Ll.call(this,r,Zl,function t(n){n.target===r&&["width","height"].includes(n.propertyName)&&(r.style.width="",r.style.height="",Il.call(e,r,Zl,t))}),r.style.width="".concat(o.width,"px"),r.style.height="".concat(o.height,"px")}Vl(a,!0),Vl(i,!1),qc.focusFirstMenuItem.call(this,i,n)}},setDownloadUrl:function(){var e=this.elements.buttons.download;xl.element(e)&&e.setAttribute("href",this.download)},create:function(e){var t=this,n=qc.bindMenuItemShortcuts,i=qc.createButton,r=qc.createProgress,a=qc.createRange,o=qc.createTime,s=qc.setQualityMenu,l=qc.setSpeedMenu,c=qc.showMenuPanel;this.elements.controls=null,this.config.controls.includes("play-large")&&this.elements.container.appendChild(i.call(this,"play-large"));var u=Ul("div",Hl(this.config.selectors.controls.wrapper));this.elements.controls=u;var h={class:"plyr__controls__item"};return uc(this.config.controls).forEach(function(s){if("restart"===s&&u.appendChild(i.call(t,"restart",h)),"rewind"===s&&u.appendChild(i.call(t,"rewind",h)),"play"===s&&u.appendChild(i.call(t,"play",h)),"fast-forward"===s&&u.appendChild(i.call(t,"fast-forward",h)),"progress"===s){var l=Ul("div",{class:"".concat(h.class," plyr__progress__container")}),f=Ul("div",Hl(t.config.selectors.progress));if(f.appendChild(a.call(t,"seek",{id:"plyr-seek-".concat(e.id)})),f.appendChild(r.call(t,"buffer")),t.config.tooltips.seek){var d=Ul("span",{class:t.config.classNames.tooltip},"00:00");f.appendChild(d),t.elements.display.seekTooltip=d}t.elements.progress=f,l.appendChild(t.elements.progress),u.appendChild(l)}if("current-time"===s&&u.appendChild(o.call(t,"currentTime",h)),"duration"===s&&u.appendChild(o.call(t,"duration",h)),"mute"===s||"volume"===s){var p=t.elements.volume;if(xl.element(p)&&u.contains(p)||(p=Ul("div",Ol({},h,{class:"".concat(h.class," plyr__volume").trim()})),t.elements.volume=p,u.appendChild(p)),"mute"===s&&p.appendChild(i.call(t,"mute")),"volume"===s){var m={max:1,step:.05,value:t.config.volume};p.appendChild(a.call(t,"volume",Ol(m,{id:"plyr-volume-".concat(e.id)})))}}if("captions"===s&&u.appendChild(i.call(t,"captions",h)),"settings"===s&&!xl.empty(t.config.settings)){var g=Ul("div",Ol({},h,{class:"".concat(h.class," plyr__menu").trim(),hidden:""}));g.appendChild(i.call(t,"settings",{"aria-haspopup":!0,"aria-controls":"plyr-settings-".concat(e.id),"aria-expanded":!1}));var v=Ul("div",{class:"plyr__menu__container",id:"plyr-settings-".concat(e.id),hidden:""}),y=Ul("div"),b=Ul("div",{id:"plyr-settings-".concat(e.id,"-home")}),w=Ul("div",{role:"menu"});b.appendChild(w),y.appendChild(b),t.elements.settings.panels.home=b,t.config.settings.forEach(function(i){var r=Ul("button",Ol(Hl(t.config.selectors.buttons.settings),{type:"button",class:"".concat(t.config.classNames.control," ").concat(t.config.classNames.control,"--forward"),role:"menuitem","aria-haspopup":!0,hidden:""}));n.call(t,r,i),Ll(r,"click",function(){c.call(t,i,!1)});var a=Ul("span",null,Lc(i,t.config)),o=Ul("span",{class:t.config.classNames.menu.value});o.innerHTML=e[i],a.appendChild(o),r.appendChild(a),w.appendChild(r);var s=Ul("div",{id:"plyr-settings-".concat(e.id,"-").concat(i),hidden:""}),l=Ul("button",{type:"button",class:"".concat(t.config.classNames.control," ").concat(t.config.classNames.control,"--back")});l.appendChild(Ul("span",{"aria-hidden":!0},Lc(i,t.config))),l.appendChild(Ul("span",{class:t.config.classNames.hidden},Lc("menuBack",t.config))),Ll(s,"keydown",function(e){37===e.which&&(e.preventDefault(),e.stopPropagation(),c.call(t,"home",!0))},!1),Ll(l,"click",function(){c.call(t,"home",!1)}),s.appendChild(l),s.appendChild(Ul("div",{role:"menu"})),y.appendChild(s),t.elements.settings.buttons[i]=r,t.elements.settings.panels[i]=s}),v.appendChild(y),g.appendChild(v),u.appendChild(g),t.elements.settings.popup=v,t.elements.settings.menu=g}if("pip"===s&&rc.pip&&u.appendChild(i.call(t,"pip",h)),"airplay"===s&&rc.airplay&&u.appendChild(i.call(t,"airplay",h)),"download"===s){var k=Ol({},h,{element:"a",href:t.download,target:"_blank"}),T=t.config.urls.download;!xl.url(T)&&t.isEmbed&&Ol(k,{icon:"logo-".concat(t.provider),label:t.provider}),u.appendChild(i.call(t,"download",k))}"fullscreen"===s&&u.appendChild(i.call(t,"fullscreen",h))}),this.isHTML5&&s.call(this,cc.getQualityOptions.call(this)),l.call(this),u},inject:function(){var e=this;if(this.config.loadSprite){var t=qc.getIconUrl.call(this);t.cors&&Nc(t.url,"sprite-plyr")}this.id=Math.floor(1e4*Math.random());var n=null;this.elements.controls=null;var i={id:this.id,seektime:this.config.seekTime,title:this.config.title},r=!0;xl.function(this.config.controls)&&(this.config.controls=this.config.controls.call(this,i)),this.config.controls||(this.config.controls=[]),xl.element(this.config.controls)||xl.string(this.config.controls)?n=this.config.controls:(n=qc.create.call(this,{id:this.id,seektime:this.config.seekTime,speed:this.speed,quality:this.quality,captions:Hc.getLabel.call(this)}),r=!1);var a,o=function(e){var t=e;return Object.entries(i).forEach(function(e){var n=Na(e,2),i=n[0],r=n[1];t=Ec(t,"{".concat(i,"}"),r)}),t};if(r&&(xl.string(this.config.controls)?n=o(n):xl.element(n)&&(n.innerHTML=o(n.innerHTML))),xl.string(this.config.selectors.controls.container)&&(a=document.querySelector(this.config.selectors.controls.container)),xl.element(a)||(a=this.elements.container),a[xl.element(n)?"insertAdjacentElement":"insertAdjacentHTML"]("afterbegin",n),xl.element(this.elements.controls)||qc.findElements.call(this),!xl.empty(this.elements.buttons)){var s=function(t){var n=e.config.classNames.controlPressed;Object.defineProperty(t,"pressed",{enumerable:!0,get:function(){return Wl(t,n)},set:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];zl(t,n,e)}})};Object.values(this.elements.buttons).filter(Boolean).forEach(function(e){xl.array(e)||xl.nodeList(e)?Array.from(e).filter(Boolean).forEach(s):s(e)})}if(nc.isEdge&&ec(a),this.config.tooltips.controls){var l=this.config,c=l.classNames,u=l.selectors,h="".concat(u.controls.wrapper," ").concat(u.labels," .").concat(c.hidden),f=Yl.call(this,h);Array.from(f).forEach(function(t){zl(t,e.config.classNames.hidden,!1),zl(t,e.config.classNames.tooltip,!0)})}}};function Dc(e){var t=e;if(!(arguments.length>1&&void 0!==arguments[1])||arguments[1]){var n=document.createElement("a");n.href=t,t=n.href}try{return new URL(t)}catch(e){return null}}function Bc(e){var t=new URLSearchParams;return xl.object(e)&&Object.entries(e).forEach(function(e){var n=Na(e,2),i=n[0],r=n[1];t.set(i,r)}),t}var Hc={setup:function(){if(this.supported.ui)if(!this.isVideo||this.isYouTube||this.isHTML5&&!rc.textTracks)xl.array(this.config.controls)&&this.config.controls.includes("settings")&&this.config.settings.includes("captions")&&qc.setCaptionsMenu.call(this);else{var e,t;if(xl.element(this.elements.captions)||(this.elements.captions=Ul("div",Hl(this.config.selectors.captions)),e=this.elements.captions,t=this.elements.wrapper,xl.element(e)&&xl.element(t)&&t.parentNode.insertBefore(e,t.nextSibling)),nc.isIE&&window.URL){var n=this.media.querySelectorAll("track");Array.from(n).forEach(function(e){var t=e.getAttribute("src"),n=Dc(t);null!==n&&n.hostname!==window.location.href.hostname&&["http:","https:"].includes(n.protocol)&&Mc(t,"blob").then(function(t){e.setAttribute("src",window.URL.createObjectURL(t))}).catch(function(){ql(e)})})}var i=uc((navigator.languages||[navigator.language||navigator.userLanguage||"en"]).map(function(e){return e.split("-")[0]})),r=(this.storage.get("language")||this.config.captions.language||"auto").toLowerCase();if("auto"===r)r=Na(i,1)[0];var a=this.storage.get("captions");if(xl.boolean(a)||(a=this.config.captions.active),Object.assign(this.captions,{toggled:!1,active:a,language:r,languages:i}),this.isHTML5){var o=this.config.captions.update?"addtrack removetrack":"removetrack";Ll.call(this,this.media.textTracks,o,Hc.update.bind(this))}setTimeout(Hc.update.bind(this),0)}},update:function(){var e=this,t=Hc.getTracks.call(this,!0),n=this.captions,i=n.active,r=n.language,a=n.meta,o=n.currentTrackNode,s=Boolean(t.find(function(e){return e.language===r}));this.isHTML5&&this.isVideo&&t.filter(function(e){return!a.get(e)}).forEach(function(t){e.debug.log("Track added",t),a.set(t,{default:"showing"===t.mode}),t.mode="hidden",Ll.call(e,t,"cuechange",function(){return Hc.updateCues.call(e)})}),(s&&this.language!==r||!t.includes(o))&&(Hc.setLanguage.call(this,r),Hc.toggle.call(this,i&&s)),zl(this.elements.container,this.config.classNames.captions.enabled,!xl.empty(t)),(this.config.controls||[]).includes("settings")&&this.config.settings.includes("captions")&&qc.setCaptionsMenu.call(this)},toggle:function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];if(this.supported.ui){var n=this.captions.toggled,i=this.config.classNames.captions.active,r=xl.nullOrUndefined(e)?!n:e;if(r!==n){if(t||(this.captions.active=r,this.storage.set({captions:r})),!this.language&&r&&!t){var a=Hc.getTracks.call(this),o=Hc.findTrack.call(this,[this.captions.language].concat(ja(this.captions.languages)),!0);return this.captions.language=o.language,void Hc.set.call(this,a.indexOf(o))}this.elements.buttons.captions&&(this.elements.buttons.captions.pressed=r),zl(this.elements.container,i,r),this.captions.toggled=r,qc.updateSetting.call(this,"captions"),Nl.call(this,this.media,r?"captionsenabled":"captionsdisabled")}}},set:function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n=Hc.getTracks.call(this);if(-1!==e)if(xl.number(e))if(e in n){if(this.captions.currentTrack!==e){this.captions.currentTrack=e;var i=n[e],r=(i||{}).language;this.captions.currentTrackNode=i,qc.updateSetting.call(this,"captions"),t||(this.captions.language=r,this.storage.set({language:r})),this.isVimeo&&this.embed.enableTextTrack(r),Nl.call(this,this.media,"languagechange")}Hc.toggle.call(this,!0,t),this.isHTML5&&this.isVideo&&Hc.updateCues.call(this)}else this.debug.warn("Track not found",e);else this.debug.warn("Invalid caption argument",e);else Hc.toggle.call(this,!1,t)},setLanguage:function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];if(xl.string(e)){var n=e.toLowerCase();this.captions.language=n;var i=Hc.getTracks.call(this),r=Hc.findTrack.call(this,[n]);Hc.set.call(this,i.indexOf(r),t)}else this.debug.warn("Invalid language argument",e)},getTracks:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return Array.from((this.media||{}).textTracks||[]).filter(function(n){return!e.isHTML5||t||e.captions.meta.has(n)}).filter(function(e){return["captions","subtitles"].includes(e.kind)})},findTrack:function(e){var t,n=this,i=arguments.length>1&&void 0!==arguments[1]&&arguments[1],r=Hc.getTracks.call(this),a=function(e){return Number((n.captions.meta.get(e)||{}).default)},o=Array.from(r).sort(function(e,t){return a(t)-a(e)});return e.every(function(e){return!(t=o.find(function(t){return t.language===e}))}),t||(i?o[0]:void 0)},getCurrentTrack:function(){return Hc.getTracks.call(this)[this.currentTrack]},getLabel:function(e){var t=e;return!xl.track(t)&&rc.textTracks&&this.captions.toggled&&(t=Hc.getCurrentTrack.call(this)),xl.track(t)?xl.empty(t.label)?xl.empty(t.language)?Lc("enabled",this.config):e.language.toUpperCase():t.label:Lc("disabled",this.config)},updateCues:function(e){if(this.supported.ui)if(xl.element(this.elements.captions))if(xl.nullOrUndefined(e)||Array.isArray(e)){var t=e;if(!t){var n=Hc.getCurrentTrack.call(this);t=Array.from((n||{}).activeCues||[]).map(function(e){return e.getCueAsHTML()}).map(Pc)}var i=t.map(function(e){return e.trim()}).join("\n");if(i!==this.elements.captions.innerHTML){Dl(this.elements.captions);var r=Ul("span",Hl(this.config.selectors.caption));r.innerHTML=i,this.elements.captions.appendChild(r),Nl.call(this,this.media,"cuechange")}}else this.debug.warn("updateCues: Invalid input",e);else this.debug.warn("No captions element to render to")}},Vc={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.5.4/plyr.svg",blankVideo:"https://cdn.plyr.io/static/blank.mp4",quality:{default:576,options:[4320,2880,2160,1440,1080,720,576,480,360,240]},loop:{active:!1},speed:{selected:1,options:[.5,.75,1,1.25,1.5,1.75,2]},keyboard:{focused:!0,global:!1},tooltips:{controls:!1,seek:!0},captions:{active:!1,language:"auto",update:!1},fullscreen:{enabled:!0,fallback:!0,iosNative:!1},storage:{enabled:!0,key:"plyr"},controls:["play-large","play","progress","current-time","mute","volume","captions","settings","pip","airplay","fullscreen"],settings:["captions","quality","speed"],i18n:{restart:"Restart",rewind:"Rewind {seektime}s",play:"Play",pause:"Pause",fastForward:"Forward {seektime}s",seek:"Seek",seekLabel:"{currentTime} of {duration}",played:"Played",buffered:"Buffered",currentTime:"Current time",duration:"Duration",volume:"Volume",mute:"Mute",unmute:"Unmute",enableCaptions:"Enable captions",disableCaptions:"Disable captions",download:"Download",enterFullscreen:"Enter fullscreen",exitFullscreen:"Exit fullscreen",frameTitle:"Player for {title}",captions:"Captions",settings:"Settings",menuBack:"Go back to previous menu",speed:"Speed",normal:"Normal",quality:"Quality",loop:"Loop",start:"Start",end:"End",all:"All",reset:"Reset",disabled:"Disabled",enabled:"Enabled",advertisement:"Ad",qualityBadge:{2160:"4K",1440:"HD",1080:"HD",720:"HD",576:"SD",480:"SD"}},urls:{download:null,vimeo:{sdk:"https://player.vimeo.com/api/player.js",iframe:"https://player.vimeo.com/video/{0}?{1}",api:"https://vimeo.com/api/v2/video/{0}.json"},youtube:{sdk:"https://www.youtube.com/iframe_api",api:"https://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",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"}},ads:{enabled:!1,publisherId:"",tagUrl:""},previewThumbnails:{enabled:!1,src:""},vimeo:{byline:!1,portrait:!1,title:!1,speed:!0,transparent:!1},youtube:{noCookie:!1,rel:0,showinfo:0,iv_load_policy:3,modestbranding:1}},zc="picture-in-picture",Wc="inline",Kc={html5:"html5",youtube:"youtube",vimeo:"vimeo"},Yc={audio:"audio",video:"video"};var $c=function(){},Gc=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];Ca(this,e),this.enabled=window.console&&t,this.enabled&&this.log("Debugging enabled")}return Ia(e,[{key:"log",get:function(){return this.enabled?Function.prototype.bind.call(console.log,console):$c}},{key:"warn",get:function(){return this.enabled?Function.prototype.bind.call(console.warn,console):$c}},{key:"error",get:function(){return this.enabled?Function.prototype.bind.call(console.error,console):$c}}]),e}();function Qc(){if(this.enabled){var e=this.player.elements.buttons.fullscreen;xl.element(e)&&(e.pressed=this.active),Nl.call(this.player,this.target,this.active?"enterfullscreen":"exitfullscreen",!0),nc.isIos||function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(xl.element(e)){var n=Yl.call(this,"button:not(:disabled), input:not(:disabled), [tabindex]"),i=n[0],r=n[n.length-1];Cl.call(this,this.elements.container,"keydown",function(e){if("Tab"===e.key&&9===e.keyCode){var t=document.activeElement;t!==r||e.shiftKey?t===i&&e.shiftKey&&(r.focus(),e.preventDefault()):(i.focus(),e.preventDefault())}},t,!1)}}.call(this.player,this.target,this.active)}}function Xc(){var e=this,t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(t?this.scrollPosition={x:window.scrollX||0,y:window.scrollY||0}:window.scrollTo(this.scrollPosition.x,this.scrollPosition.y),document.body.style.overflow=t?"hidden":"",zl(this.target,this.player.config.classNames.fullscreen.fallback,t),nc.isIos){var n=document.head.querySelector('meta[name="viewport"]'),i="viewport-fit=cover";n||(n=document.createElement("meta")).setAttribute("name","viewport");var r=xl.string(n.content)&&n.content.includes(i);t?(this.cleanupViewport=!r,r||(n.content+=",".concat(i))):this.cleanupViewport&&(n.content=n.content.split(",").filter(function(e){return e.trim()!==i}).join(",")),setTimeout(function(){return ec(e.target)},100)}Qc.call(this)}var Jc=function(){function e(t){var n=this;Ca(this,e),this.player=t,this.prefix=e.prefix,this.property=e.property,this.scrollPosition={x:0,y:0},this.forceFallback="force"===t.config.fullscreen.fallback,Ll.call(this.player,document,"ms"===this.prefix?"MSFullscreenChange":"".concat(this.prefix,"fullscreenchange"),function(){Qc.call(n)}),Ll.call(this.player,this.player.elements.container,"dblclick",function(e){xl.element(n.player.elements.controls)&&n.player.elements.controls.contains(e.target)||n.toggle()}),this.update()}return Ia(e,[{key:"update",value:function(){var t;this.enabled?(t=this.forceFallback?"Fallback (forced)":e.native?"Native":"Fallback",this.player.debug.log("".concat(t," fullscreen enabled"))):this.player.debug.log("Fullscreen not supported and fallback disabled");zl(this.player.elements.container,this.player.config.classNames.fullscreen.enabled,this.enabled)}},{key:"enter",value:function(){this.enabled&&(nc.isIos&&this.player.config.fullscreen.iosNative?this.target.webkitEnterFullscreen():!e.native||this.forceFallback?Xc.call(this,!0):this.prefix?xl.empty(this.prefix)||this.target["".concat(this.prefix,"Request").concat(this.property)]():this.target.requestFullscreen())}},{key:"exit",value:function(){if(this.enabled)if(nc.isIos&&this.player.config.fullscreen.iosNative)this.target.webkitExitFullscreen(),this.player.play();else if(!e.native||this.forceFallback)Xc.call(this,!1);else if(this.prefix){if(!xl.empty(this.prefix)){var t="moz"===this.prefix?"Cancel":"Exit";document["".concat(this.prefix).concat(t).concat(this.property)]()}}else(document.cancelFullScreen||document.exitFullscreen).call(document)}},{key:"toggle",value:function(){this.active?this.exit():this.enter()}},{key:"usingNative",get:function(){return e.native&&!this.forceFallback}},{key:"enabled",get:function(){return(e.native||this.player.config.fullscreen.fallback)&&this.player.config.fullscreen.enabled&&this.player.supported.ui&&this.player.isVideo}},{key:"active",get:function(){return!!this.enabled&&(!e.native||this.forceFallback?Wl(this.target,this.player.config.classNames.fullscreen.fallback):(this.prefix?document["".concat(this.prefix).concat(this.property,"Element")]:document.fullscreenElement)===this.target)}},{key:"target",get:function(){return nc.isIos&&this.player.config.fullscreen.iosNative?this.player.media:this.player.elements.container}}],[{key:"native",get:function(){return!!(document.fullscreenEnabled||document.webkitFullscreenEnabled||document.mozFullScreenEnabled||document.msFullscreenEnabled)}},{key:"prefix",get:function(){if(xl.function(document.exitFullscreen))return"";var e="";return["webkit","moz","ms"].some(function(t){return!(!xl.function(document["".concat(t,"ExitFullscreen")])&&!xl.function(document["".concat(t,"CancelFullScreen")]))&&(e=t,!0)}),e}},{key:"property",get:function(){return"moz"===this.prefix?"FullScreen":"Fullscreen"}}]),e}(),Zc=Math.sign||function(e){return 0==(e=+e)||e!=e?e:e<0?-1:1};function eu(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;return new Promise(function(n,i){var r=new Image,a=function(){delete r.onload,delete r.onerror,(r.naturalWidth>=t?n:i)(r)};Object.assign(r,{onload:a,onerror:a,src:e})})}Se({target:"Math",stat:!0},{sign:Zc});var tu={addStyleHook:function(){zl(this.elements.container,this.config.selectors.container.replace(".",""),!0),zl(this.elements.container,this.config.classNames.uiSupported,this.supported.ui)},toggleNativeControls:function(){arguments.length>0&&void 0!==arguments[0]&&arguments[0]&&this.isHTML5?this.media.setAttribute("controls",""):this.media.removeAttribute("controls")},build:function(){var e=this;if(this.listeners.media(),!this.supported.ui)return this.debug.warn("Basic support only for ".concat(this.provider," ").concat(this.type)),void tu.toggleNativeControls.call(this,!0);xl.element(this.elements.controls)||(qc.inject.call(this),this.listeners.controls()),tu.toggleNativeControls.call(this),this.isHTML5&&Hc.setup.call(this),this.volume=null,this.muted=null,this.loop=null,this.quality=null,this.speed=null,qc.updateVolume.call(this),qc.timeUpdate.call(this),tu.checkPlaying.call(this),zl(this.elements.container,this.config.classNames.pip.supported,rc.pip&&this.isHTML5&&this.isVideo),zl(this.elements.container,this.config.classNames.airplay.supported,rc.airplay&&this.isHTML5),zl(this.elements.container,this.config.classNames.isIos,nc.isIos),zl(this.elements.container,this.config.classNames.isTouch,this.touch),this.ready=!0,setTimeout(function(){Nl.call(e,e.media,"ready")},0),tu.setTitle.call(this),this.poster&&tu.setPoster.call(this,this.poster,!1).catch(function(){}),this.config.duration&&qc.durationUpdate.call(this)},setTitle:function(){var e=Lc("play",this.config);if(xl.string(this.config.title)&&!xl.empty(this.config.title)&&(e+=", ".concat(this.config.title)),Array.from(this.elements.buttons.play||[]).forEach(function(t){t.setAttribute("aria-label",e)}),this.isEmbed){var t=$l.call(this,"iframe");if(!xl.element(t))return;var n=xl.empty(this.config.title)?"video":this.config.title,i=Lc("frameTitle",this.config);t.setAttribute("title",i.replace("{title}",n))}},togglePoster:function(e){zl(this.elements.container,this.config.classNames.posterEnabled,e)},setPoster:function(e){var t=this;return arguments.length>1&&void 0!==arguments[1]&&!arguments[1]||!this.poster?(this.media.setAttribute("poster",e),function(){var e=this;return new Promise(function(t){return e.ready?setTimeout(t,0):Ll.call(e,e.elements.container,"ready",t)}).then(function(){})}.call(this).then(function(){return eu(e)}).catch(function(n){throw e===t.poster&&tu.togglePoster.call(t,!1),n}).then(function(){if(e!==t.poster)throw new Error("setPoster cancelled by later call to setPoster")}).then(function(){return Object.assign(t.elements.poster.style,{backgroundImage:"url('".concat(e,"')"),backgroundSize:""}),tu.togglePoster.call(t,!0),e})):Promise.reject(new Error("Poster already set"))},checkPlaying:function(e){var t=this;zl(this.elements.container,this.config.classNames.playing,this.playing),zl(this.elements.container,this.config.classNames.paused,this.paused),zl(this.elements.container,this.config.classNames.stopped,this.stopped),Array.from(this.elements.buttons.play||[]).forEach(function(e){e.pressed=t.playing}),xl.event(e)&&"timeupdate"===e.type||tu.toggleControls.call(this)},checkLoading:function(e){var t=this;this.loading=["stalled","waiting"].includes(e.type),clearTimeout(this.timers.loading),this.timers.loading=setTimeout(function(){zl(t.elements.container,t.config.classNames.loading,t.loading),tu.toggleControls.call(t)},this.loading?250:0)},toggleControls:function(e){var t=this.elements.controls;if(t&&this.config.hideControls){var n=this.touch&&this.lastSeekTime+2e3>Date.now();this.toggleControls(Boolean(e||this.loading||this.paused||t.pressed||t.hover||n))}}},nu=function(){function e(t){Ca(this,e),this.player=t,this.lastKey=null,this.focusTimer=null,this.lastKeyDown=null,this.handleKey=this.handleKey.bind(this),this.toggleMenu=this.toggleMenu.bind(this),this.setTabFocus=this.setTabFocus.bind(this),this.firstTouch=this.firstTouch.bind(this)}return Ia(e,[{key:"handleKey",value:function(e){var t=this.player,n=t.elements,i=e.keyCode?e.keyCode:e.which,r="keydown"===e.type,a=r&&i===this.lastKey;if(!(e.altKey||e.ctrlKey||e.metaKey||e.shiftKey)&&xl.number(i)){if(r){var o=document.activeElement;if(xl.element(o)){var s=t.config.selectors.editable;if(o!==n.inputs.seek&&Kl(o,s))return;if(32===e.which&&Kl(o,'button, [role^="menuitem"]'))return}switch([32,37,38,39,40,48,49,50,51,52,53,54,56,57,67,70,73,75,76,77,79].includes(i)&&(e.preventDefault(),e.stopPropagation()),i){case 48:case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:a||(t.currentTime=t.duration/10*(i-48));break;case 32:case 75:a||t.togglePlay();break;case 38:t.increaseVolume(.1);break;case 40:t.decreaseVolume(.1);break;case 77:a||(t.muted=!t.muted);break;case 39:t.forward();break;case 37:t.rewind();break;case 70:t.fullscreen.toggle();break;case 67:a||t.toggleCaptions();break;case 76:t.loop=!t.loop}27===i&&!t.fullscreen.usingNative&&t.fullscreen.active&&t.fullscreen.toggle(),this.lastKey=i}else this.lastKey=null}}},{key:"toggleMenu",value:function(e){qc.toggleMenu.call(this.player,e)}},{key:"firstTouch",value:function(){var e=this.player,t=e.elements;e.touch=!0,zl(t.container,e.config.classNames.isTouch,!0)}},{key:"setTabFocus",value:function(e){var t=this.player,n=t.elements;if(clearTimeout(this.focusTimer),"keydown"!==e.type||9===e.which){"keydown"===e.type&&(this.lastKeyDown=e.timeStamp);var i,r=e.timeStamp-this.lastKeyDown<=20;if("focus"!==e.type||r)i=t.config.classNames.tabFocus,zl(Yl.call(t,".".concat(i)),i,!1),this.focusTimer=setTimeout(function(){var e=document.activeElement;n.container.contains(e)&&zl(document.activeElement,t.config.classNames.tabFocus,!0)},10)}}},{key:"global",value:function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],t=this.player;t.config.keyboard.global&&Cl.call(t,window,"keydown keyup",this.handleKey,e,!1),Cl.call(t,document.body,"click",this.toggleMenu,e),Ml.call(t,document.body,"touchstart",this.firstTouch),Cl.call(t,document.body,"keydown focus blur",this.setTabFocus,e,!1,!0)}},{key:"container",value:function(){var e=this.player,t=e.config,n=e.elements,i=e.timers;!t.keyboard.global&&t.keyboard.focused&&Ll.call(e,n.container,"keydown keyup",this.handleKey,!1),Ll.call(e,n.container,"mousemove mouseleave touchstart touchmove enterfullscreen exitfullscreen",function(t){var r=n.controls;r&&"enterfullscreen"===t.type&&(r.pressed=!1,r.hover=!1);var a=0;["touchstart","touchmove","mousemove"].includes(t.type)&&(tu.toggleControls.call(e,!0),a=e.touch?3e3:2e3),clearTimeout(i.controls),i.controls=setTimeout(function(){return tu.toggleControls.call(e,!1)},a)});var r=function(t){if(!t)return lc.call(e);var i=n.container.getBoundingClientRect(),r=i.width,a=i.height;return lc.call(e,"".concat(r,":").concat(a))},a=function(){window.clearTimeout(i.resized),i.resized=window.setTimeout(r,50)};Ll.call(e,n.container,"enterfullscreen exitfullscreen",function(t){var i=e.fullscreen,o=i.target,s=i.usingNative;if(e.isEmbed&&o===n.container){var l="enterfullscreen"===t.type,c=r(l);c.padding;!function(t,n,i){if(e.isVimeo){var r=e.elements.wrapper.firstChild,a=Na(t,2)[1],o=Na(sc.call(e),2),s=o[0],l=o[1];r.style.maxWidth=i?"".concat(a/l*s,"px"):null,r.style.margin=i?"0 auto":null}}(c.ratio,0,l),s||(l?Ll.call(e,window,"resize",a):Il.call(e,window,"resize",a))}})}},{key:"media",value:function(){var e=this,t=this.player,n=t.elements;if(Ll.call(t,t.media,"timeupdate seeking seeked",function(e){return qc.timeUpdate.call(t,e)}),Ll.call(t,t.media,"durationchange loadeddata loadedmetadata",function(e){return qc.durationUpdate.call(t,e)}),Ll.call(t,t.media,"canplay loadeddata",function(){Vl(n.volume,!t.hasAudio),Vl(n.buttons.mute,!t.hasAudio)}),Ll.call(t,t.media,"ended",function(){t.isHTML5&&t.isVideo&&t.config.resetOnEnd&&t.restart()}),Ll.call(t,t.media,"progress playing seeking seeked",function(e){return qc.updateProgress.call(t,e)}),Ll.call(t,t.media,"volumechange",function(e){return qc.updateVolume.call(t,e)}),Ll.call(t,t.media,"playing play pause ended emptied timeupdate",function(e){return tu.checkPlaying.call(t,e)}),Ll.call(t,t.media,"waiting canplay seeked playing",function(e){return tu.checkLoading.call(t,e)}),t.supported.ui&&t.config.clickToPlay&&!t.isAudio){var i=$l.call(t,".".concat(t.config.classNames.video));if(!xl.element(i))return;Ll.call(t,n.container,"click",function(r){([n.container,i].includes(r.target)||i.contains(r.target))&&(t.touch&&t.config.hideControls||(t.ended?(e.proxy(r,t.restart,"restart"),e.proxy(r,t.play,"play")):e.proxy(r,t.togglePlay,"play")))})}t.supported.ui&&t.config.disableContextMenu&&Ll.call(t,n.wrapper,"contextmenu",function(e){e.preventDefault()},!1),Ll.call(t,t.media,"volumechange",function(){t.storage.set({volume:t.volume,muted:t.muted})}),Ll.call(t,t.media,"ratechange",function(){qc.updateSetting.call(t,"speed"),t.storage.set({speed:t.speed})}),Ll.call(t,t.media,"qualitychange",function(e){qc.updateSetting.call(t,"quality",null,e.detail.quality)}),Ll.call(t,t.media,"ready qualitychange",function(){qc.setDownloadUrl.call(t)});var r=t.config.events.concat(["keyup","keydown"]).join(" ");Ll.call(t,t.media,r,function(e){var i=e.detail,r=void 0===i?{}:i;"error"===e.type&&(r=t.media.error),Nl.call(t,n.container,e.type,!0,r)})}},{key:"proxy",value:function(e,t,n){var i=this.player,r=i.config.listeners[n],a=!0;xl.function(r)&&(a=r.call(i,e)),a&&xl.function(t)&&t.call(i,e)}},{key:"bind",value:function(e,t,n,i){var r=this,a=!(arguments.length>4&&void 0!==arguments[4])||arguments[4],o=this.player,s=o.config.listeners[i],l=xl.function(s);Ll.call(o,e,t,function(e){return r.proxy(e,n,i)},a&&!l)}},{key:"controls",value:function(){var e=this,t=this.player,n=t.elements,i=nc.isIE?"change":"input";if(n.buttons.play&&Array.from(n.buttons.play).forEach(function(n){e.bind(n,"click",t.togglePlay,"play")}),this.bind(n.buttons.restart,"click",t.restart,"restart"),this.bind(n.buttons.rewind,"click",t.rewind,"rewind"),this.bind(n.buttons.fastForward,"click",t.forward,"fastForward"),this.bind(n.buttons.mute,"click",function(){t.muted=!t.muted},"mute"),this.bind(n.buttons.captions,"click",function(){return t.toggleCaptions()}),this.bind(n.buttons.download,"click",function(){Nl.call(t,t.media,"download")},"download"),this.bind(n.buttons.fullscreen,"click",function(){t.fullscreen.toggle()},"fullscreen"),this.bind(n.buttons.pip,"click",function(){t.pip="toggle"},"pip"),this.bind(n.buttons.airplay,"click",t.airplay,"airplay"),this.bind(n.buttons.settings,"click",function(e){e.stopPropagation(),qc.toggleMenu.call(t,e)}),this.bind(n.buttons.settings,"keyup",function(e){var n=e.which;[13,32].includes(n)&&(13!==n?(e.preventDefault(),e.stopPropagation(),qc.toggleMenu.call(t,e)):qc.focusFirstMenuItem.call(t,null,!0))},null,!1),this.bind(n.settings.menu,"keydown",function(e){27===e.which&&qc.toggleMenu.call(t,e)}),this.bind(n.inputs.seek,"mousedown mousemove",function(e){var t=n.progress.getBoundingClientRect(),i=100/t.width*(e.pageX-t.left);e.currentTarget.setAttribute("seek-value",i)}),this.bind(n.inputs.seek,"mousedown mouseup keydown keyup touchstart touchend",function(e){var n=e.currentTarget,i=e.keyCode?e.keyCode:e.which;if(!xl.keyboardEvent(e)||39===i||37===i){t.lastSeekTime=Date.now();var r=n.hasAttribute("play-on-seeked"),a=["mouseup","touchend","keyup"].includes(e.type);r&&a?(n.removeAttribute("play-on-seeked"),t.play()):!a&&t.playing&&(n.setAttribute("play-on-seeked",""),t.pause())}}),nc.isIos){var r=Yl.call(t,'input[type="range"]');Array.from(r).forEach(function(t){return e.bind(t,i,function(e){return ec(e.target)})})}this.bind(n.inputs.seek,i,function(e){var n=e.currentTarget,i=n.getAttribute("seek-value");xl.empty(i)&&(i=n.value),n.removeAttribute("seek-value"),t.currentTime=i/n.max*t.duration},"seek"),this.bind(n.progress,"mouseenter mouseleave mousemove",function(e){return qc.updateSeekTooltip.call(t,e)}),this.bind(n.progress,"mousemove touchmove",function(e){var n=t.previewThumbnails;n&&n.loaded&&n.startMove(e)}),this.bind(n.progress,"mouseleave click",function(){var e=t.previewThumbnails;e&&e.loaded&&e.endMove(!1,!0)}),this.bind(n.progress,"mousedown touchstart",function(e){var n=t.previewThumbnails;n&&n.loaded&&n.startScrubbing(e)}),this.bind(n.progress,"mouseup touchend",function(e){var n=t.previewThumbnails;n&&n.loaded&&n.endScrubbing(e)}),nc.isWebkit&&Array.from(Yl.call(t,'input[type="range"]')).forEach(function(n){e.bind(n,"input",function(e){return qc.updateRangeFill.call(t,e.target)})}),t.config.toggleInvert&&!xl.element(n.display.duration)&&this.bind(n.display.currentTime,"click",function(){0!==t.currentTime&&(t.config.invertTime=!t.config.invertTime,qc.timeUpdate.call(t))}),this.bind(n.inputs.volume,i,function(e){t.volume=e.target.value},"volume"),this.bind(n.controls,"mouseenter mouseleave",function(e){n.controls.hover=!t.touch&&"mouseenter"===e.type}),this.bind(n.controls,"mousedown mouseup touchstart touchend touchcancel",function(e){n.controls.pressed=["mousedown","touchstart"].includes(e.type)}),this.bind(n.controls,"focusin",function(){var n=t.config,i=t.elements,r=t.timers;zl(i.controls,n.classNames.noTransition,!0),tu.toggleControls.call(t,!0),setTimeout(function(){zl(i.controls,n.classNames.noTransition,!1)},0);var a=e.touch?3e3:4e3;clearTimeout(r.controls),r.controls=setTimeout(function(){return tu.toggleControls.call(t,!1)},a)}),this.bind(n.inputs.volume,"wheel",function(e){var n=e.webkitDirectionInvertedFromDevice,i=Na([e.deltaX,-e.deltaY].map(function(e){return n?-e:e}),2),r=i[0],a=i[1],o=Math.sign(Math.abs(r)>Math.abs(a)?r:a);t.increaseVolume(o/50);var s=t.media.volume;(1===o&&s<1||-1===o&&s>0)&&e.preventDefault()},"volume",!1)}}]),e}(),iu=A.f,ru=Function.prototype,au=ru.toString,ou=/^\s*function ([^ (]*)/;!r||"name"in ru||iu(ru,"name",{configurable:!0,get:function(){try{return au.call(this).match(ou)[1]}catch(e){return""}}});var su=Math.max,lu=Math.min,cu=hn("splice");Se({target:"Array",proto:!0,forced:!cu},{splice:function(e,t){var n,i,r,a,o,s,l=Ft(this),c=te(l.length),u=re(e,c),h=arguments.length;if(0===h?n=i=0:1===h?(n=0,i=c-u):(n=h-2,i=lu(su(Z(t),0),c-u)),c+n-i>9007199254740991)throw TypeError("Maximum allowed length exceeded");for(r=ri(l,i),a=0;a<i;a++)(o=u+a)in l&&cn(r,a,l[o]);if(r.length=i,n<i){for(a=u;a<c-i;a++)s=a+n,(o=a+i)in l?l[s]=l[o]:delete l[s];for(a=c;a>c-i+n;a--)delete l[a-1]}else if(n>i)for(a=c-i;a>u;a--)s=a+n-1,(o=a+i-1)in l?l[s]=l[o]:delete l[s];for(a=0;a<n;a++)l[a+u]=arguments[a+2];return l.length=c-i+n,r}});var uu=C(function(e,t){e.exports=function(){var e=function(){},t={},n={},i={};function r(e,t){if(e){var r=i[e];if(n[e]=t,r)for(;r.length;)r[0](e,t),r.splice(0,1)}}function a(t,n){t.call&&(t={success:t}),n.length?(t.error||e)(n):(t.success||e)(t)}function o(t,n,i,r){var a,s,l=document,c=i.async,u=(i.numRetries||0)+1,h=i.before||e,f=t.replace(/^(css|img)!/,"");r=r||0,/(^css!|\.css$)/.test(t)?((s=l.createElement("link")).rel="stylesheet",s.href=f,(a="hideFocus"in s)&&s.relList&&(a=0,s.rel="preload",s.as="style")):/(^img!|\.(png|gif|jpg|svg)$)/.test(t)?(s=l.createElement("img")).src=f:((s=l.createElement("script")).src=t,s.async=void 0===c||c),s.onload=s.onerror=s.onbeforeload=function(e){var l=e.type[0];if(a)try{s.sheet.cssText.length||(l="e")}catch(e){18!=e.code&&(l="e")}if("e"==l){if((r+=1)<u)return o(t,n,i,r)}else if("preload"==s.rel&&"style"==s.as)return s.rel="stylesheet";n(t,l,e.defaultPrevented)},!1!==h(t,s)&&l.head.appendChild(s)}function s(e,n,i){var s,l;if(n&&n.trim&&(s=n),l=(s?i:n)||{},s){if(s in t)throw"LoadJS";t[s]=!0}function c(t,n){!function(e,t,n){var i,r,a=(e=e.push?e:[e]).length,s=a,l=[];for(i=function(e,n,i){if("e"==n&&l.push(e),"b"==n){if(!i)return;l.push(e)}--a||t(l)},r=0;r<s;r++)o(e[r],i,n)}(e,function(e){a(l,e),t&&a({success:t,error:n},e),r(s,e)},l)}if(l.returnPromise)return new Promise(c);c()}return s.ready=function(e,t){return function(e,t){e=e.push?e:[e];var r,a,o,s=[],l=e.length,c=l;for(r=function(e,n){n.length&&s.push(e),--c||t(s)};l--;)a=e[l],(o=n[a])?r(a,o):(i[a]=i[a]||[]).push(r)}(e,function(e){a(t,e)}),s},s.done=function(e){r(e,[])},s.reset=function(){t={},n={},i={}},s.isDefined=function(e){return e in t},s}()});function hu(e){return new Promise(function(t,n){uu(e,{success:t,error:n})})}function fu(e){e&&!this.embed.hasPlayed&&(this.embed.hasPlayed=!0),this.media.paused===e&&(this.media.paused=!e,Nl.call(this,this.media,e?"play":"pause"))}var du={setup:function(){var e=this;zl(this.elements.wrapper,this.config.classNames.embed,!0),lc.call(this),xl.object(window.Vimeo)?du.ready.call(this):hu(this.config.urls.vimeo.sdk).then(function(){du.ready.call(e)}).catch(function(t){e.debug.warn("Vimeo SDK (player.js) failed to load",t)})},ready:function(){var e=this,t=this,n=t.config.vimeo,i=Bc(Ol({},{loop:t.config.loop.active,autoplay:t.autoplay,muted:t.muted,gesture:"media",playsinline:!this.config.fullscreen.iosNative},n)),r=t.media.getAttribute("src");xl.empty(r)&&(r=t.media.getAttribute(t.config.attributes.embed.id));var a,o=(a=r,xl.empty(a)?null:xl.number(Number(a))?a:a.match(/^.*(vimeo.com\/|video\/)(\d+).*/)?RegExp.$2:a),s=Ul("iframe"),l=Sc(t.config.urls.vimeo.iframe,o,i);s.setAttribute("src",l),s.setAttribute("allowfullscreen",""),s.setAttribute("allowtransparency",""),s.setAttribute("allow","autoplay");var c=Ul("div",{poster:t.poster,class:t.config.classNames.embedContainer});c.appendChild(s),t.media=Bl(c,t.media),Mc(Sc(t.config.urls.vimeo.api,o),"json").then(function(e){if(!xl.empty(e)){var n=new URL(e[0].thumbnail_large);n.pathname="".concat(n.pathname.split("_")[0],".jpg"),tu.setPoster.call(t,n.href).catch(function(){})}}),t.embed=new window.Vimeo.Player(s,{autopause:t.config.autopause,muted:t.muted}),t.media.paused=!0,t.media.currentTime=0,t.supported.ui&&t.embed.disableTextTrack(),t.media.play=function(){return fu.call(t,!0),t.embed.play()},t.media.pause=function(){return fu.call(t,!1),t.embed.pause()},t.media.stop=function(){t.pause(),t.currentTime=0};var u=t.media.currentTime;Object.defineProperty(t.media,"currentTime",{get:function(){return u},set:function(e){var n=t.embed,i=t.media,r=t.paused,a=t.volume,o=r&&!n.hasPlayed;i.seeking=!0,Nl.call(t,i,"seeking"),Promise.resolve(o&&n.setVolume(0)).then(function(){return n.setCurrentTime(e)}).then(function(){return o&&n.pause()}).then(function(){return o&&n.setVolume(a)}).catch(function(){})}});var h=t.config.speed.selected;Object.defineProperty(t.media,"playbackRate",{get:function(){return h},set:function(e){t.embed.setPlaybackRate(e).then(function(){h=e,Nl.call(t,t.media,"ratechange")}).catch(function(e){"Error"===e.name&&qc.setSpeedMenu.call(t,[])})}});var f=t.config.volume;Object.defineProperty(t.media,"volume",{get:function(){return f},set:function(e){t.embed.setVolume(e).then(function(){f=e,Nl.call(t,t.media,"volumechange")})}});var d=t.config.muted;Object.defineProperty(t.media,"muted",{get:function(){return d},set:function(e){var n=!!xl.boolean(e)&&e;t.embed.setVolume(n?0:t.config.volume).then(function(){d=n,Nl.call(t,t.media,"volumechange")})}});var p,m=t.config.loop;Object.defineProperty(t.media,"loop",{get:function(){return m},set:function(e){var n=xl.boolean(e)?e:t.config.loop.active;t.embed.setLoop(n).then(function(){m=n})}}),t.embed.getVideoUrl().then(function(e){p=e,qc.setDownloadUrl.call(t)}).catch(function(t){e.debug.warn(t)}),Object.defineProperty(t.media,"currentSrc",{get:function(){return p}}),Object.defineProperty(t.media,"ended",{get:function(){return t.currentTime===t.duration}}),Promise.all([t.embed.getVideoWidth(),t.embed.getVideoHeight()]).then(function(n){var i=Na(n,2),r=i[0],a=i[1];t.embed.ratio=[r,a],lc.call(e)}),t.embed.setAutopause(t.config.autopause).then(function(e){t.config.autopause=e}),t.embed.getVideoTitle().then(function(n){t.config.title=n,tu.setTitle.call(e)}),t.embed.getCurrentTime().then(function(e){u=e,Nl.call(t,t.media,"timeupdate")}),t.embed.getDuration().then(function(e){t.media.duration=e,Nl.call(t,t.media,"durationchange")}),t.embed.getTextTracks().then(function(e){t.media.textTracks=e,Hc.setup.call(t)}),t.embed.on("cuechange",function(e){var n=e.cues,i=(void 0===n?[]:n).map(function(e){return t=e.text,n=document.createDocumentFragment(),i=document.createElement("div"),n.appendChild(i),i.innerHTML=t,n.firstChild.innerText;var t,n,i});Hc.updateCues.call(t,i)}),t.embed.on("loaded",function(){(t.embed.getPaused().then(function(e){fu.call(t,!e),e||Nl.call(t,t.media,"playing")}),xl.element(t.embed.element)&&t.supported.ui)&&t.embed.element.setAttribute("tabindex",-1)}),t.embed.on("play",function(){fu.call(t,!0),Nl.call(t,t.media,"playing")}),t.embed.on("pause",function(){fu.call(t,!1)}),t.embed.on("timeupdate",function(e){t.media.seeking=!1,u=e.seconds,Nl.call(t,t.media,"timeupdate")}),t.embed.on("progress",function(e){t.media.buffered=e.percent,Nl.call(t,t.media,"progress"),1===parseInt(e.percent,10)&&Nl.call(t,t.media,"canplaythrough"),t.embed.getDuration().then(function(e){e!==t.media.duration&&(t.media.duration=e,Nl.call(t,t.media,"durationchange"))})}),t.embed.on("seeked",function(){t.media.seeking=!1,Nl.call(t,t.media,"seeked")}),t.embed.on("ended",function(){t.media.paused=!0,Nl.call(t,t.media,"ended")}),t.embed.on("error",function(e){t.media.error=e,Nl.call(t,t.media,"error")}),setTimeout(function(){return tu.build.call(t)},0)}};function pu(e){e&&!this.embed.hasPlayed&&(this.embed.hasPlayed=!0),this.media.paused===e&&(this.media.paused=!e,Nl.call(this,this.media,e?"play":"pause"))}function mu(e){return e.noCookie?"https://www.youtube-nocookie.com":"http:"===window.location.protocol?"http://www.youtube.com":void 0}var gu={setup:function(){var e=this;zl(this.elements.wrapper,this.config.classNames.embed,!0),xl.object(window.YT)&&xl.function(window.YT.Player)?gu.ready.call(this):(hu(this.config.urls.youtube.sdk).catch(function(t){e.debug.warn("YouTube API failed to load",t)}),window.onYouTubeReadyCallbacks=window.onYouTubeReadyCallbacks||[],window.onYouTubeReadyCallbacks.push(function(){gu.ready.call(e)}),window.onYouTubeIframeAPIReady=function(){window.onYouTubeReadyCallbacks.forEach(function(e){e()})})},getTitle:function(e){var t=this;Mc(Sc(this.config.urls.youtube.api,e)).then(function(e){if(xl.object(e)){var n=e.title,i=e.height,r=e.width;t.config.title=n,tu.setTitle.call(t),t.embed.ratio=[r,i]}lc.call(t)}).catch(function(){lc.call(t)})},ready:function(){var e=this,t=e.media.getAttribute("id");if(xl.empty(t)||!t.startsWith("youtube-")){var n=e.media.getAttribute("src");xl.empty(n)&&(n=e.media.getAttribute(this.config.attributes.embed.id));var i,r,a=(i=n,xl.empty(i)?null:i.match(/^.*(youtu.be\/|v\/|u\/\w\/|embed\/|watch\?v=|&v=)([^#&?]*).*/)?RegExp.$2:i),o=(r=e.provider,"".concat(r,"-").concat(Math.floor(1e4*Math.random()))),s=Ul("div",{id:o,poster:e.poster});e.media=Bl(s,e.media);var l=function(e){return"https://i.ytimg.com/vi/".concat(a,"/").concat(e,"default.jpg")};eu(l("maxres"),121).catch(function(){return eu(l("sd"),121)}).catch(function(){return eu(l("hq"))}).then(function(t){return tu.setPoster.call(e,t.src)}).then(function(t){t.includes("maxres")||(e.elements.poster.style.backgroundSize="cover")}).catch(function(){});var c=e.config.youtube;e.embed=new window.YT.Player(o,{videoId:a,host:mu(c),playerVars:Ol({},{autoplay:e.config.autoplay?1:0,hl:e.config.hl,controls:e.supported.ui?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},c),events:{onError:function(t){if(!e.media.error){var n=t.data,i={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."}[n]||"An unknown error occured";e.media.error={code:n,message:i},Nl.call(e,e.media,"error")}},onPlaybackRateChange:function(t){var n=t.target;e.media.playbackRate=n.getPlaybackRate(),Nl.call(e,e.media,"ratechange")},onReady:function(t){if(!xl.function(e.media.play)){var n=t.target;gu.getTitle.call(e,a),e.media.play=function(){pu.call(e,!0),n.playVideo()},e.media.pause=function(){pu.call(e,!1),n.pauseVideo()},e.media.stop=function(){n.stopVideo()},e.media.duration=n.getDuration(),e.media.paused=!0,e.media.currentTime=0,Object.defineProperty(e.media,"currentTime",{get:function(){return Number(n.getCurrentTime())},set:function(t){e.paused&&!e.embed.hasPlayed&&e.embed.mute(),e.media.seeking=!0,Nl.call(e,e.media,"seeking"),n.seekTo(t)}}),Object.defineProperty(e.media,"playbackRate",{get:function(){return n.getPlaybackRate()},set:function(e){n.setPlaybackRate(e)}});var i=e.config.volume;Object.defineProperty(e.media,"volume",{get:function(){return i},set:function(t){i=t,n.setVolume(100*i),Nl.call(e,e.media,"volumechange")}});var r=e.config.muted;Object.defineProperty(e.media,"muted",{get:function(){return r},set:function(t){var i=xl.boolean(t)?t:r;r=i,n[i?"mute":"unMute"](),Nl.call(e,e.media,"volumechange")}}),Object.defineProperty(e.media,"currentSrc",{get:function(){return n.getVideoUrl()}}),Object.defineProperty(e.media,"ended",{get:function(){return e.currentTime===e.duration}}),e.options.speed=n.getAvailablePlaybackRates(),e.supported.ui&&e.media.setAttribute("tabindex",-1),Nl.call(e,e.media,"timeupdate"),Nl.call(e,e.media,"durationchange"),clearInterval(e.timers.buffering),e.timers.buffering=setInterval(function(){e.media.buffered=n.getVideoLoadedFraction(),(null===e.media.lastBuffered||e.media.lastBuffered<e.media.buffered)&&Nl.call(e,e.media,"progress"),e.media.lastBuffered=e.media.buffered,1===e.media.buffered&&(clearInterval(e.timers.buffering),Nl.call(e,e.media,"canplaythrough"))},200),setTimeout(function(){return tu.build.call(e)},50)}},onStateChange:function(t){var n=t.target;switch(clearInterval(e.timers.playing),e.media.seeking&&[1,2].includes(t.data)&&(e.media.seeking=!1,Nl.call(e,e.media,"seeked")),t.data){case-1:Nl.call(e,e.media,"timeupdate"),e.media.buffered=n.getVideoLoadedFraction(),Nl.call(e,e.media,"progress");break;case 0:pu.call(e,!1),e.media.loop?(n.stopVideo(),n.playVideo()):Nl.call(e,e.media,"ended");break;case 1:e.config.autoplay||!e.media.paused||e.embed.hasPlayed?(pu.call(e,!0),Nl.call(e,e.media,"playing"),e.timers.playing=setInterval(function(){Nl.call(e,e.media,"timeupdate")},50),e.media.duration!==n.getDuration()&&(e.media.duration=n.getDuration(),Nl.call(e,e.media,"durationchange"))):e.media.pause();break;case 2:e.muted||e.embed.unMute(),pu.call(e,!1)}Nl.call(e,e.elements.container,"statechange",!1,{code:t.data})}}})}}},vu={setup:function(){this.media?(zl(this.elements.container,this.config.classNames.type.replace("{0}",this.type),!0),zl(this.elements.container,this.config.classNames.provider.replace("{0}",this.provider),!0),this.isEmbed&&zl(this.elements.container,this.config.classNames.type.replace("{0}","video"),!0),this.isVideo&&(this.elements.wrapper=Ul("div",{class:this.config.classNames.video}),_l(this.media,this.elements.wrapper),this.elements.poster=Ul("div",{class:this.config.classNames.poster}),this.elements.wrapper.appendChild(this.elements.poster)),this.isHTML5?cc.extend.call(this):this.isYouTube?gu.setup.call(this):this.isVimeo&&du.setup.call(this)):this.debug.warn("No media element found!")}},yu=function(){function e(t){var n=this;Ca(this,e),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(function(e,t){n.on("loaded",e),n.on("error",t)}),this.load()}return Ia(e,[{key:"load",value:function(){var e=this;this.enabled&&(xl.object(window.google)&&xl.object(window.google.ima)?this.ready():hu(this.player.config.urls.googleIMA.sdk).then(function(){e.ready()}).catch(function(){e.trigger("error",new Error("Google IMA SDK failed to load"))}))}},{key:"ready",value:function(){var e,t=this;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(function(){t.clearSafetyTimer("onAdsManagerLoaded()")}),this.listeners(),this.setupIMA()}},{key:"setupIMA",value:function(){this.elements.container=Ul("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.requestAds()}},{key:"requestAds",value:function(){var e=this,t=this.player.elements.container;try{this.loader=new google.ima.AdsLoader(this.elements.displayContainer),this.loader.addEventListener(google.ima.AdsManagerLoadedEvent.Type.ADS_MANAGER_LOADED,function(t){return e.onAdsManagerLoaded(t)},!1),this.loader.addEventListener(google.ima.AdErrorEvent.Type.AD_ERROR,function(t){return e.onAdError(t)},!1);var n=new google.ima.AdsRequest;n.adTagUrl=this.tagUrl,n.linearAdSlotWidth=t.offsetWidth,n.linearAdSlotHeight=t.offsetHeight,n.nonLinearAdSlotWidth=t.offsetWidth,n.nonLinearAdSlotHeight=t.offsetHeight,n.forceNonLinearFullSlot=!1,n.setAdWillPlayMuted(!this.player.muted),this.loader.requestAds(n)}catch(e){this.onAdError(e)}}},{key:"pollCountdown",value:function(){var e=this;if(!(arguments.length>0&&void 0!==arguments[0]&&arguments[0]))return clearInterval(this.countdownTimer),void this.elements.container.removeAttribute("data-badge-text");this.countdownTimer=setInterval(function(){var t=Fc(Math.max(e.manager.getRemainingTime(),0)),n="".concat(Lc("advertisement",e.player.config)," - ").concat(t);e.elements.container.setAttribute("data-badge-text",n)},100)}},{key:"onAdsManagerLoaded",value:function(e){var t=this;if(this.enabled){var n=new google.ima.AdsRenderingSettings;n.restoreCustomPlaybackStateOnAdBreakComplete=!0,n.enablePreloading=!0,this.manager=e.getAdsManager(this.player,n),this.cuePoints=this.manager.getCuePoints(),this.manager.addEventListener(google.ima.AdErrorEvent.Type.AD_ERROR,function(e){return t.onAdError(e)}),Object.keys(google.ima.AdEvent.Type).forEach(function(e){t.manager.addEventListener(google.ima.AdEvent.Type[e],function(e){return t.onAdEvent(e)})}),this.trigger("loaded")}}},{key:"addCuePoints",value:function(){var e=this;xl.empty(this.cuePoints)||this.cuePoints.forEach(function(t){if(0!==t&&-1!==t&&t<e.player.duration){var n=e.player.elements.progress;if(xl.element(n)){var i=100/e.player.duration*t,r=Ul("span",{class:e.player.config.classNames.cues});r.style.left="".concat(i.toString(),"%"),n.appendChild(r)}}})}},{key:"onAdEvent",value:function(e){var t=this,n=this.player.elements.container,i=e.getAd(),r=e.getAdData();switch(function(e){var n="ads".concat(e.replace(/_/g,"").toLowerCase());Nl.call(t.player,t.player.media,n)}(e.type),e.type){case google.ima.AdEvent.Type.LOADED:this.trigger("loaded"),this.pollCountdown(!0),i.isLinear()||(i.width=n.offsetWidth,i.height=n.offsetHeight);break;case google.ima.AdEvent.Type.STARTED:this.manager.setVolume(this.player.volume);break;case google.ima.AdEvent.Type.ALL_ADS_COMPLETED:this.loadAds();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:r.adError&&this.player.debug.warn("Non-fatal ad error: ".concat(r.adError.getMessage()))}}},{key:"onAdError",value:function(e){this.cancel(),this.player.debug.warn("Ads error",e)}},{key:"listeners",value:function(){var e,t=this,n=this.player.elements.container;this.player.on("canplay",function(){t.addCuePoints()}),this.player.on("ended",function(){t.loader.contentComplete()}),this.player.on("timeupdate",function(){e=t.player.currentTime}),this.player.on("seeked",function(){var n=t.player.currentTime;xl.empty(t.cuePoints)||t.cuePoints.forEach(function(i,r){e<i&&i<n&&(t.manager.discardAdBreak(),t.cuePoints.splice(r,1))})}),window.addEventListener("resize",function(){t.manager&&t.manager.resize(n.offsetWidth,n.offsetHeight,google.ima.ViewMode.NORMAL)})}},{key:"play",value:function(){var e=this,t=this.player.elements.container;this.managerPromise||this.resumeContent(),this.managerPromise.then(function(){e.manager.setVolume(e.player.volume),e.elements.displayContainer.initialize();try{e.initialized||(e.manager.init(t.offsetWidth,t.offsetHeight,google.ima.ViewMode.NORMAL),e.manager.start()),e.initialized=!0}catch(t){e.onAdError(t)}}).catch(function(){})}},{key:"resumeContent",value:function(){this.elements.container.style.zIndex="",this.playing=!1,this.player.media.play()}},{key:"pauseContent",value:function(){this.elements.container.style.zIndex=3,this.playing=!0,this.player.media.pause()}},{key:"cancel",value:function(){this.initialized&&this.resumeContent(),this.trigger("error"),this.loadAds()}},{key:"loadAds",value:function(){var e=this;this.managerPromise.then(function(){e.manager&&e.manager.destroy(),e.managerPromise=new Promise(function(t){e.on("loaded",t),e.player.debug.log(e.manager)}),e.requestAds()}).catch(function(){})}},{key:"trigger",value:function(e){for(var t=this,n=arguments.length,i=new Array(n>1?n-1:0),r=1;r<n;r++)i[r-1]=arguments[r];var a=this.events[e];xl.array(a)&&a.forEach(function(e){xl.function(e)&&e.apply(t,i)})}},{key:"on",value:function(e,t){return xl.array(this.events[e])||(this.events[e]=[]),this.events[e].push(t),this}},{key:"startSafetyTimer",value:function(e,t){var n=this;this.player.debug.log("Safety timer invoked from: ".concat(t)),this.safetyTimer=setTimeout(function(){n.cancel(),n.clearSafetyTimer("startSafetyTimer()")},e)}},{key:"clearSafetyTimer",value:function(e){xl.nullOrUndefined(this.safetyTimer)||(this.player.debug.log("Safety timer cleared from: ".concat(e)),clearTimeout(this.safetyTimer),this.safetyTimer=null)}},{key:"enabled",get:function(){var e=this.config;return this.player.isHTML5&&this.player.isVideo&&e.enabled&&(!xl.empty(e.publisherId)||xl.url(e.tagUrl))}},{key:"tagUrl",get:function(){var e=this.config;if(xl.url(e.tagUrl))return e.tagUrl;var t={AV_PUBLISHERID:"58c25bb0073ef448b1087ad6",AV_CHANNELID:"5a0458dc28a06145e4519d21",AV_URL:window.location.hostname,cb:Date.now(),AV_WIDTH:640,AV_HEIGHT:480,AV_CDIM2:this.publisherId};return"".concat("https://go.aniview.com/api/adserver6/vast/","?").concat(Bc(t))}}]),e}(),bu=ai(6),wu=!0;"findIndex"in[]&&Array(1).findIndex(function(){wu=!1}),Se({target:"Array",proto:!0,forced:wu},{findIndex:function(e){return bu(this,e,arguments.length>1?arguments[1]:void 0)}}),Rt("findIndex");var ku=function(){function e(t){Ca(this,e),this.player=t,this.thumbnails=[],this.loaded=!1,this.lastMouseMoveTime=Date.now(),this.mouseDown=!1,this.loadedImages=[],this.elements={thumb:{},scrubbing:{}},this.load()}return Ia(e,[{key:"load",value:function(){var e=this;this.player.elements.display.seekTooltip&&(this.player.elements.display.seekTooltip.hidden=this.enabled),this.enabled&&this.getThumbnails().then(function(){e.render(),e.determineContainerAutoSizing(),e.loaded=!0})}},{key:"getThumbnails",value:function(){var e=this;return new Promise(function(t){var n=e.player.config.previewThumbnails.src;if(xl.empty(n))throw new Error("Missing previewThumbnails.src config attribute");var i=(xl.string(n)?[n]:n).map(function(t){return e.getThumbnail(t)});Promise.all(i).then(function(){e.thumbnails.sort(function(e,t){return e.height-t.height}),e.player.debug.log("Preview thumbnails",e.thumbnails),t()})})}},{key:"getThumbnail",value:function(e){var t=this;return new Promise(function(n){Mc(e).then(function(i){var r,a,o={frames:(r=i,a=[],r.split(/\r\n\r\n|\n\n|\r\r/).forEach(function(e){var t={};e.split(/\r\n|\n|\r/).forEach(function(e){if(xl.number(t.startTime)){if(!xl.empty(e.trim())&&xl.empty(t.text)){var n=e.trim().split("#xywh="),i=Na(n,1);if(t.text=i[0],n[1]){var r=Na(n[1].split(","),4);t.x=r[0],t.y=r[1],t.w=r[2],t.h=r[3]}}}else{var a=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})/);a&&(t.startTime=60*Number(a[1]||0)*60+60*Number(a[2])+Number(a[3])+Number("0.".concat(a[4])),t.endTime=60*Number(a[6]||0)*60+60*Number(a[7])+Number(a[8])+Number("0.".concat(a[9])))}}),t.text&&a.push(t)}),a),height:null,urlPrefix:""};o.frames[0].text.startsWith("/")||o.frames[0].text.startsWith("http://")||o.frames[0].text.startsWith("https://")||(o.urlPrefix=e.substring(0,e.lastIndexOf("/")+1));var s=new Image;s.onload=function(){o.height=s.naturalHeight,o.width=s.naturalWidth,t.thumbnails.push(o),n()},s.src=o.urlPrefix+o.frames[0].text})})}},{key:"startMove",value:function(e){if(this.loaded&&xl.event(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=this.player.elements.progress.getBoundingClientRect(),n=100/t.width*(e.pageX-t.left);this.seekTime=this.player.media.duration*(n/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=Fc(this.seekTime)}this.showImageAtCurrentTime()}}},{key:"endMove",value:function(){this.toggleThumbContainer(!1,!0)}},{key:"startScrubbing",value:function(e){!1!==e.button&&0!==e.button||(this.mouseDown=!0,this.player.media.duration&&(this.toggleScrubbingContainer(!0),this.toggleThumbContainer(!1,!0),this.showImageAtCurrentTime()))}},{key:"endScrubbing",value:function(){var e=this;this.mouseDown=!1,Math.ceil(this.lastTime)===Math.ceil(this.player.media.currentTime)?this.toggleScrubbingContainer(!1):Ml.call(this.player,this.player.media,"timeupdate",function(){e.mouseDown||e.toggleScrubbingContainer(!1)})}},{key:"listeners",value:function(){var e=this;this.player.on("play",function(){e.toggleThumbContainer(!1,!0)}),this.player.on("seeked",function(){e.toggleThumbContainer(!1)}),this.player.on("timeupdate",function(){e.lastTime=e.player.media.currentTime})}},{key:"render",value:function(){this.elements.thumb.container=Ul("div",{class:this.player.config.classNames.previewThumbnails.thumbContainer}),this.elements.thumb.imageContainer=Ul("div",{class:this.player.config.classNames.previewThumbnails.imageContainer}),this.elements.thumb.container.appendChild(this.elements.thumb.imageContainer);var e=Ul("div",{class:this.player.config.classNames.previewThumbnails.timeContainer});this.elements.thumb.time=Ul("span",{},"00:00"),e.appendChild(this.elements.thumb.time),this.elements.thumb.container.appendChild(e),xl.element(this.player.elements.progress)&&this.player.elements.progress.appendChild(this.elements.thumb.container),this.elements.scrubbing.container=Ul("div",{class:this.player.config.classNames.previewThumbnails.scrubbingContainer}),this.player.elements.wrapper.appendChild(this.elements.scrubbing.container)}},{key:"showImageAtCurrentTime",value:function(){var e=this;this.mouseDown?this.setScrubbingContainerSize():this.setThumbContainerSizeAndPos();var t=this.thumbnails[0].frames.findIndex(function(t){return e.seekTime>=t.startTime&&e.seekTime<=t.endTime}),n=t>=0,i=0;this.mouseDown||this.toggleThumbContainer(n),n&&(this.thumbnails.forEach(function(n,r){e.loadedImages.includes(n.frames[t].text)&&(i=r)}),t!==this.showingThumb&&(this.showingThumb=t,this.loadImage(i)))}},{key:"loadImage",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,n=this.showingThumb,i=this.thumbnails[t],r=i.urlPrefix,a=i.frames[n],o=i.frames[n].text,s=r+o;if(this.currentImageElement&&this.currentImageElement.dataset.filename===o)this.showImage(this.currentImageElement,a,t,n,o,!1),this.currentImageElement.dataset.index=n,this.removeOldImages(this.currentImageElement);else{this.loadingImage&&this.usingSprites&&(this.loadingImage.onload=null);var l=new Image;l.src=s,l.dataset.index=n,l.dataset.filename=o,this.showingThumbFilename=o,this.player.debug.log("Loading image: ".concat(s)),l.onload=function(){return e.showImage(l,a,t,n,o,!0)},this.loadingImage=l,this.removeOldImages(l)}}},{key:"showImage",value:function(e,t,n,i,r){var a=!(arguments.length>5&&void 0!==arguments[5])||arguments[5];this.player.debug.log("Showing thumb: ".concat(r,". num: ").concat(i,". qual: ").concat(n,". newimg: ").concat(a)),this.setImageSizeAndOffset(e,t),a&&(this.currentImageContainer.appendChild(e),this.currentImageElement=e,this.loadedImages.includes(r)||this.loadedImages.push(r)),this.preloadNearby(i,!0).then(this.preloadNearby(i,!1)).then(this.getHigherQuality(n,e,t,r))}},{key:"removeOldImages",value:function(e){var t=this;Array.from(this.currentImageContainer.children).forEach(function(n){if("img"===n.tagName.toLowerCase()){var i=t.usingSprites?500:1e3;if(n.dataset.index!==e.dataset.index&&!n.dataset.deleting){n.dataset.deleting=!0;var r=t.currentImageContainer;setTimeout(function(){r.removeChild(n),t.player.debug.log("Removing thumb: ".concat(n.dataset.filename))},i)}}})}},{key:"preloadNearby",value:function(e){var t=this,n=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];return new Promise(function(i){setTimeout(function(){var r=t.thumbnails[0].frames[e].text;if(t.showingThumbFilename===r){var a;a=n?t.thumbnails[0].frames.slice(e):t.thumbnails[0].frames.slice(0,e).reverse();var o=!1;a.forEach(function(e){var n=e.text;if(n!==r&&!t.loadedImages.includes(n)){o=!0,t.player.debug.log("Preloading thumb filename: ".concat(n));var a=t.thumbnails[0].urlPrefix+n,s=new Image;s.src=a,s.onload=function(){t.player.debug.log("Preloaded thumb filename: ".concat(n)),t.loadedImages.includes(n)||t.loadedImages.push(n),i()}}}),o||i()}},300)})}},{key:"getHigherQuality",value:function(e,t,n,i){var r=this;if(e<this.thumbnails.length-1){var a=t.naturalHeight;this.usingSprites&&(a=n.h),a<this.thumbContainerHeight&&setTimeout(function(){r.showingThumbFilename===i&&(r.player.debug.log("Showing higher quality thumb for: ".concat(i)),r.loadImage(e+1))},300)}}},{key:"toggleThumbContainer",value:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=this.player.config.classNames.previewThumbnails.thumbContainerShown;this.elements.thumb.container.classList.toggle(n,e),!e&&t&&(this.showingThumb=null,this.showingThumbFilename=null)}},{key:"toggleScrubbingContainer",value:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=this.player.config.classNames.previewThumbnails.scrubbingContainerShown;this.elements.scrubbing.container.classList.toggle(t,e),e||(this.showingThumb=null,this.showingThumbFilename=null)}},{key:"determineContainerAutoSizing",value:function(){this.elements.thumb.imageContainer.clientHeight>20&&(this.sizeSpecifiedInCSS=!0)}},{key:"setThumbContainerSizeAndPos",value:function(){if(!this.sizeSpecifiedInCSS){var e=Math.floor(this.thumbContainerHeight*this.thumbAspectRatio);this.elements.thumb.imageContainer.style.height="".concat(this.thumbContainerHeight,"px"),this.elements.thumb.imageContainer.style.width="".concat(e,"px")}this.setThumbContainerPos()}},{key:"setThumbContainerPos",value:function(){var e=this.player.elements.progress.getBoundingClientRect(),t=this.player.elements.container.getBoundingClientRect(),n=this.elements.thumb.container,i=t.left-e.left+10,r=t.right-e.left-n.clientWidth-10,a=this.mousePosX-e.left-n.clientWidth/2;a<i&&(a=i),a>r&&(a=r),n.style.left="".concat(a,"px")}},{key:"setScrubbingContainerSize",value:function(){this.elements.scrubbing.container.style.width="".concat(this.player.media.clientWidth,"px"),this.elements.scrubbing.container.style.height="".concat(this.player.media.clientWidth/this.thumbAspectRatio,"px")}},{key:"setImageSizeAndOffset",value:function(e,t){if(this.usingSprites){var n=this.thumbContainerHeight/t.h;e.style.height="".concat(Math.floor(e.naturalHeight*n),"px"),e.style.width="".concat(Math.floor(e.naturalWidth*n),"px"),e.style.left="-".concat(t.x*n,"px"),e.style.top="-".concat(t.y*n,"px")}}},{key:"enabled",get:function(){return this.player.isHTML5&&this.player.isVideo&&this.player.config.previewThumbnails.enabled}},{key:"currentImageContainer",get:function(){return this.mouseDown?this.elements.scrubbing.container:this.elements.thumb.imageContainer}},{key:"usingSprites",get:function(){return Object.keys(this.thumbnails[0].frames[0]).includes("w")}},{key:"thumbAspectRatio",get:function(){return this.usingSprites?this.thumbnails[0].frames[0].w/this.thumbnails[0].frames[0].h:this.thumbnails[0].width/this.thumbnails[0].height}},{key:"thumbContainerHeight",get:function(){return this.mouseDown?Math.floor(this.player.media.clientWidth/this.thumbAspectRatio):Math.floor(this.player.media.clientWidth/this.thumbAspectRatio/4)}},{key:"currentImageElement",get:function(){return this.mouseDown?this.currentScrubbingImageElement:this.currentThumbnailImageElement},set:function(e){this.mouseDown?this.currentScrubbingImageElement=e:this.currentThumbnailImageElement=e}}]),e}(),Tu={insertElements:function(e,t){var n=this;xl.string(t)?Fl(e,this.media,{src:t}):xl.array(t)&&t.forEach(function(t){Fl(e,n.media,t)})},change:function(e){var t=this;jl(e,"sources.length")?(cc.cancelRequests.call(this),this.destroy.call(this,function(){t.options.quality=[],ql(t.media),t.media=null,xl.element(t.elements.container)&&t.elements.container.removeAttribute("class");var n=e.sources,i=e.type,r=Na(n,1)[0],a=r.provider,o=void 0===a?Kc.html5:a,s=r.src,l="html5"===o?i:"div",c="html5"===o?{}:{src:s};Object.assign(t,{provider:o,type:i,supported:rc.check(i,o,t.config.playsinline),media:Ul(l,c)}),t.elements.container.appendChild(t.media),xl.boolean(e.autoplay)&&(t.config.autoplay=e.autoplay),t.isHTML5&&(t.config.crossorigin&&t.media.setAttribute("crossorigin",""),t.config.autoplay&&t.media.setAttribute("autoplay",""),xl.empty(e.poster)||(t.poster=e.poster),t.config.loop.active&&t.media.setAttribute("loop",""),t.config.muted&&t.media.setAttribute("muted",""),t.config.playsinline&&t.media.setAttribute("playsinline","")),tu.addStyleHook.call(t),t.isHTML5&&Tu.insertElements.call(t,"source",n),t.config.title=e.title,vu.setup.call(t),t.isHTML5&&Object.keys(e).includes("tracks")&&Tu.insertElements.call(t,"track",e.tracks),(t.isHTML5||t.isEmbed&&!t.supported.ui)&&tu.build.call(t),t.isHTML5&&t.media.load(),t.previewThumbnails&&t.previewThumbnails.load(),t.fullscreen.update()},!0)):this.debug.warn("Invalid source format")}};var Su,Eu=function(){function e(t,n){var i=this;if(Ca(this,e),this.timers={},this.ready=!1,this.loading=!1,this.failed=!1,this.touch=rc.touch,this.media=t,xl.string(this.media)&&(this.media=document.querySelectorAll(this.media)),(window.jQuery&&this.media instanceof jQuery||xl.nodeList(this.media)||xl.array(this.media))&&(this.media=this.media[0]),this.config=Ol({},Vc,e.defaults,n||{},function(){try{return JSON.parse(i.media.getAttribute("data-plyr-config"))}catch(e){return{}}}()),this.elements={container:null,captions:null,buttons:{},display:{},progress:{},inputs:{},settings:{popup:null,menu:null,panels:{},buttons:{}}},this.captions={active:null,currentTrack:-1,meta:new WeakMap},this.fullscreen={active:!1},this.options={speed:[],quality:[]},this.debug=new Gc(this.config.debug),this.debug.log("Config",this.config),this.debug.log("Support",rc),!xl.nullOrUndefined(this.media)&&xl.element(this.media))if(this.media.plyr)this.debug.warn("Target already setup");else if(this.config.enabled)if(rc.check().api){var r=this.media.cloneNode(!0);r.autoplay=!1,this.elements.original=r;var a=this.media.tagName.toLowerCase(),o=null,s=null;switch(a){case"div":if(o=this.media.querySelector("iframe"),xl.element(o)){if(s=Dc(o.getAttribute("src")),this.provider=function(e){return/^(https?:\/\/)?(www\.)?(youtube\.com|youtube-nocookie\.com|youtu\.?be)\/.+$/.test(e)?Kc.youtube:/^https?:\/\/player.vimeo.com\/video\/\d{0,9}(?=\b|\/)/.test(e)?Kc.vimeo:null}(s.toString()),this.elements.container=this.media,this.media=o,this.elements.container.className="",s.search.length){var l=["1","true"];l.includes(s.searchParams.get("autoplay"))&&(this.config.autoplay=!0),l.includes(s.searchParams.get("loop"))&&(this.config.loop.active=!0),this.isYouTube?(this.config.playsinline=l.includes(s.searchParams.get("playsinline")),this.config.youtube.hl=s.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(xl.empty(this.provider)||!Object.keys(Kc).includes(this.provider))return void this.debug.error("Setup failed: Invalid provider");this.type=Yc.video;break;case"video":case"audio":this.type=a,this.provider=Kc.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=rc.check(this.type,this.provider,this.config.playsinline),this.supported.api?(this.eventListeners=[],this.listeners=new nu(this),this.storage=new Ic(this),this.media.plyr=this,xl.element(this.elements.container)||(this.elements.container=Ul("div",{tabindex:0}),_l(this.media,this.elements.container)),tu.addStyleHook.call(this),vu.setup.call(this),this.config.debug&&Ll.call(this,this.elements.container,this.config.events.join(" "),function(e){i.debug.log("event: ".concat(e.type))}),(this.isHTML5||this.isEmbed&&!this.supported.ui)&&tu.build.call(this),this.listeners.container(),this.listeners.global(),this.fullscreen=new Jc(this),this.config.ads.enabled&&(this.ads=new yu(this)),this.isHTML5&&this.config.autoplay&&setTimeout(function(){return i.play()},10),this.lastSeekTime=0,this.config.previewThumbnails.enabled&&(this.previewThumbnails=new ku(this))):this.debug.error("Setup failed: no support")}else this.debug.error("Setup failed: no support");else this.debug.error("Setup failed: disabled by config");else this.debug.error("Setup failed: no suitable element passed")}return Ia(e,[{key:"play",value:function(){var e=this;return xl.function(this.media.play)?(this.ads&&this.ads.enabled&&this.ads.managerPromise.then(function(){return e.ads.play()}).catch(function(){return e.media.play()}),this.media.play()):null}},{key:"pause",value:function(){this.playing&&xl.function(this.media.pause)&&this.media.pause()}},{key:"togglePlay",value:function(e){(xl.boolean(e)?e:!this.playing)?this.play():this.pause()}},{key:"stop",value:function(){this.isHTML5?(this.pause(),this.restart()):xl.function(this.media.stop)&&this.media.stop()}},{key:"restart",value:function(){this.currentTime=0}},{key:"rewind",value:function(e){this.currentTime=this.currentTime-(xl.number(e)?e:this.config.seekTime)}},{key:"forward",value:function(e){this.currentTime=this.currentTime+(xl.number(e)?e:this.config.seekTime)}},{key:"increaseVolume",value:function(e){var t=this.media.muted?0:this.volume;this.volume=t+(xl.number(e)?e:0)}},{key:"decreaseVolume",value:function(e){this.increaseVolume(-e)}},{key:"toggleCaptions",value:function(e){Hc.toggle.call(this,e,!1)}},{key:"airplay",value:function(){rc.airplay&&this.media.webkitShowPlaybackTargetPicker()}},{key:"toggleControls",value:function(e){if(this.supported.ui&&!this.isAudio){var t=Wl(this.elements.container,this.config.classNames.hideControls),n=void 0===e?void 0:!e,i=zl(this.elements.container,this.config.classNames.hideControls,n);if(i&&this.config.controls.includes("settings")&&!xl.empty(this.config.settings)&&qc.toggleMenu.call(this,!1),i!==t){var r=i?"controlshidden":"controlsshown";Nl.call(this,this.media,r)}return!i}return!1}},{key:"on",value:function(e,t){Ll.call(this,this.elements.container,e,t)}},{key:"once",value:function(e,t){Ml.call(this,this.elements.container,e,t)}},{key:"off",value:function(e,t){Il(this.elements.container,e,t)}},{key:"destroy",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(this.ready){var i=function(){document.body.style.overflow="",t.embed=null,n?(Object.keys(t.elements).length&&(ql(t.elements.buttons.play),ql(t.elements.captions),ql(t.elements.controls),ql(t.elements.wrapper),t.elements.buttons.play=null,t.elements.captions=null,t.elements.controls=null,t.elements.wrapper=null),xl.function(e)&&e()):(function(){this&&this.eventListeners&&(this.eventListeners.forEach(function(e){var t=e.element,n=e.type,i=e.callback,r=e.options;t.removeEventListener(n,i,r)}),this.eventListeners=[])}.call(t),Bl(t.elements.original,t.elements.container),Nl.call(t,t.elements.original,"destroyed",!0),xl.function(e)&&e.call(t.elements.original),t.ready=!1,setTimeout(function(){t.elements=null,t.media=null},200))};this.stop(),clearTimeout(this.timers.loading),clearTimeout(this.timers.controls),clearTimeout(this.timers.resized),this.isHTML5?(tu.toggleNativeControls.call(this,!0),i()):this.isYouTube?(clearInterval(this.timers.buffering),clearInterval(this.timers.playing),null!==this.embed&&xl.function(this.embed.destroy)&&this.embed.destroy(),i()):this.isVimeo&&(null!==this.embed&&this.embed.unload().then(i),setTimeout(i,200))}}},{key:"supports",value:function(e){return rc.mime.call(this,e)}},{key:"isHTML5",get:function(){return Boolean(this.provider===Kc.html5)}},{key:"isEmbed",get:function(){return Boolean(this.isYouTube||this.isVimeo)}},{key:"isYouTube",get:function(){return Boolean(this.provider===Kc.youtube)}},{key:"isVimeo",get:function(){return Boolean(this.provider===Kc.vimeo)}},{key:"isVideo",get:function(){return Boolean(this.type===Yc.video)}},{key:"isAudio",get:function(){return Boolean(this.type===Yc.audio)}},{key:"playing",get:function(){return Boolean(this.ready&&!this.paused&&!this.ended)}},{key:"paused",get:function(){return Boolean(this.media.paused)}},{key:"stopped",get:function(){return Boolean(this.paused&&0===this.currentTime)}},{key:"ended",get:function(){return Boolean(this.media.ended)}},{key:"currentTime",set:function(e){if(this.duration){var t=xl.number(e)&&e>0;this.media.currentTime=t?Math.min(e,this.duration):0,this.debug.log("Seeking to ".concat(this.currentTime," seconds"))}},get:function(){return Number(this.media.currentTime)}},{key:"buffered",get:function(){var e=this.media.buffered;return xl.number(e)?e:e&&e.length&&this.duration>0?e.end(0)/this.duration:0}},{key:"seeking",get:function(){return Boolean(this.media.seeking)}},{key:"duration",get:function(){var e=parseFloat(this.config.duration),t=(this.media||{}).duration,n=xl.number(t)&&t!==1/0?t:0;return e||n}},{key:"volume",set:function(e){var t=e;xl.string(t)&&(t=Number(t)),xl.number(t)||(t=this.storage.get("volume")),xl.number(t)||(t=this.config.volume),t>1&&(t=1),t<0&&(t=0),this.config.volume=t,this.media.volume=t,!xl.empty(e)&&this.muted&&t>0&&(this.muted=!1)},get:function(){return Number(this.media.volume)}},{key:"muted",set:function(e){var t=e;xl.boolean(t)||(t=this.storage.get("muted")),xl.boolean(t)||(t=this.config.muted),this.config.muted=t,this.media.muted=t},get:function(){return Boolean(this.media.muted)}},{key:"hasAudio",get:function(){return!this.isHTML5||(!!this.isAudio||(Boolean(this.media.mozHasAudio)||Boolean(this.media.webkitAudioDecodedByteCount)||Boolean(this.media.audioTracks&&this.media.audioTracks.length)))}},{key:"speed",set:function(e){var t=this,n=null;xl.number(e)&&(n=e),xl.number(n)||(n=this.storage.get("speed")),xl.number(n)||(n=this.config.speed.selected);var i=this.minimumSpeed,r=this.maximumSpeed;n=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:255;return Math.min(Math.max(e,t),n)}(n,i,r),this.config.speed.selected=n,setTimeout(function(){t.media.playbackRate=n},0)},get:function(){return Number(this.media.playbackRate)}},{key:"minimumSpeed",get:function(){return this.isYouTube?Math.min.apply(Math,ja(this.options.speed)):this.isVimeo?.5:.0625}},{key:"maximumSpeed",get:function(){return this.isYouTube?Math.max.apply(Math,ja(this.options.speed)):this.isVimeo?2:16}},{key:"quality",set:function(e){var t=this.config.quality,n=this.options.quality;if(n.length){var i=[!xl.empty(e)&&Number(e),this.storage.get("quality"),t.selected,t.default].find(xl.number),r=!0;if(!n.includes(i)){var a=function(e,t){return xl.array(e)&&e.length?e.reduce(function(e,n){return Math.abs(n-t)<Math.abs(e-t)?n:e}):null}(n,i);this.debug.warn("Unsupported quality option: ".concat(i,", using ").concat(a," instead")),i=a,r=!1}t.selected=i,this.media.quality=i,r&&this.storage.set({quality:i})}},get:function(){return this.media.quality}},{key:"loop",set:function(e){var t=xl.boolean(e)?e:this.config.loop.active;this.config.loop.active=t,this.media.loop=t},get:function(){return Boolean(this.media.loop)}},{key:"source",set:function(e){Tu.change.call(this,e)},get:function(){return this.media.currentSrc}},{key:"download",get:function(){var e=this.config.urls.download;return xl.url(e)?e:this.source},set:function(e){xl.url(e)&&(this.config.urls.download=e,qc.setDownloadUrl.call(this))}},{key:"poster",set:function(e){this.isVideo?tu.setPoster.call(this,e,!1).catch(function(){}):this.debug.warn("Poster can only be set for video")},get:function(){return this.isVideo?this.media.getAttribute("poster"):null}},{key:"ratio",get:function(){if(!this.isVideo)return null;var e=oc(sc.call(this));return xl.array(e)?e.join(":"):e},set:function(e){this.isVideo?xl.string(e)&&ac(e)?(this.config.ratio=e,lc.call(this)):this.debug.error("Invalid aspect ratio specified (".concat(e,")")):this.debug.warn("Aspect ratio can only be set for video")}},{key:"autoplay",set:function(e){var t=xl.boolean(e)?e:this.config.autoplay;this.config.autoplay=t},get:function(){return Boolean(this.config.autoplay)}},{key:"currentTrack",set:function(e){Hc.set.call(this,e,!1)},get:function(){var e=this.captions,t=e.toggled,n=e.currentTrack;return t?n:-1}},{key:"language",set:function(e){Hc.setLanguage.call(this,e,!1)},get:function(){return(Hc.getCurrentTrack.call(this)||{}).language}},{key:"pip",set:function(e){if(rc.pip){var t=xl.boolean(e)?e:!this.pip;xl.function(this.media.webkitSetPresentationMode)&&this.media.webkitSetPresentationMode(t?zc:Wc),xl.function(this.media.requestPictureInPicture)&&(!this.pip&&t?this.media.requestPictureInPicture():this.pip&&!t&&document.exitPictureInPicture())}},get:function(){return rc.pip?xl.empty(this.media.webkitPresentationMode)?this.media===document.pictureInPictureElement:this.media.webkitPresentationMode===zc:null}}],[{key:"supported",value:function(e,t,n){return rc.check(e,t,n)}},{key:"loadSprite",value:function(e,t){return Nc(e,t)}},{key:"setup",value:function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=null;return xl.string(t)?i=Array.from(document.querySelectorAll(t)):xl.nodeList(t)?i=Array.from(t):xl.array(t)&&(i=t.filter(xl.element)),xl.empty(i)?null:i.map(function(t){return new e(t,n)})}}]),e}();return Eu.defaults=(Su=Vc,JSON.parse(JSON.stringify(Su))),Eu});
//# sourceMappingURL=plyr.polyfilled.min.js.map