"object"==typeof navigator&&function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define("Plyr",t):(e="undefined"!=typeof globalThis?globalThis:e||self).Plyr=t()}(this,(function(){"use strict";!function(){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 i,n;return(t=t||{}).bubbles=!!t.bubbles,t.cancelable=!!t.cancelable,(i=document.createEvent("CustomEvent")).initCustomEvent(e,t.bubbles,t.cancelable,t.detail),n=i.preventDefault,i.preventDefault=function(){n.call(this);try{Object.defineProperty(this,"defaultPrevented",{get:function(){return!0}})}catch(e){this.defaultPrevented=!0}},i};t.prototype=window.Event.prototype,window.CustomEvent=t}}();var e="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function t(e,t){return e(t={exports:{}},t.exports),t.exports}var i=function(e){return e&&e.Math==Math&&e},n=i("object"==typeof globalThis&&globalThis)||i("object"==typeof window&&window)||i("object"==typeof self&&self)||i("object"==typeof e&&e)||function(){return this}()||Function("return this")(),s=function(e){try{return!!e()}catch(e){return!0}},r=!s((function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]})),a={}.propertyIsEnumerable,o=Object.getOwnPropertyDescriptor,l={f:o&&!a.call({1:2},1)?function(e){var t=o(this,e);return!!t&&t.enumerable}:a},c=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}},u={}.toString,h=function(e){return u.call(e).slice(8,-1)},d="".split,p=s((function(){return!Object("z").propertyIsEnumerable(0)}))?function(e){return"String"==h(e)?d.call(e,""):Object(e)}:Object,m=function(e){if(null==e)throw TypeError("Can't call method on "+e);return e},f=function(e){return p(m(e))},g=function(e){return"object"==typeof e?null!==e:"function"==typeof e},y=function(e,t){if(!g(e))return e;var i,n;if(t&&"function"==typeof(i=e.toString)&&!g(n=i.call(e)))return n;if("function"==typeof(i=e.valueOf)&&!g(n=i.call(e)))return n;if(!t&&"function"==typeof(i=e.toString)&&!g(n=i.call(e)))return n;throw TypeError("Can't convert object to primitive value")},b={}.hasOwnProperty,v=function(e,t){return b.call(e,t)},w=n.document,k=g(w)&&g(w.createElement),T=function(e){return k?w.createElement(e):{}},S=!r&&!s((function(){return 7!=Object.defineProperty(T("div"),"a",{get:function(){return 7}}).a})),E=Object.getOwnPropertyDescriptor,A={f:r?E:function(e,t){if(e=f(e),t=y(t,!0),S)try{return E(e,t)}catch(e){}if(v(e,t))return c(!l.f.call(e,t),e[t])}},C=function(e){if(!g(e))throw TypeError(String(e)+" is not an object");return e},P=Object.defineProperty,x={f:r?P:function(e,t,i){if(C(e),t=y(t,!0),C(i),S)try{return P(e,t,i)}catch(e){}if("get"in i||"set"in i)throw TypeError("Accessors not supported");return"value"in i&&(e[t]=i.value),e}},L=r?function(e,t,i){return x.f(e,t,c(1,i))}:function(e,t,i){return e[t]=i,e},I=function(e,t){try{L(n,e,t)}catch(i){n[e]=t}return t},_="__core-js_shared__",O=n[_]||I(_,{}),N=Function.toString;"function"!=typeof O.inspectSource&&(O.inspectSource=function(e){return N.call(e)});var M,R,j,$=O.inspectSource,U=n.WeakMap,q="function"==typeof U&&/native code/.test($(U)),F=t((function(e){(e.exports=function(e,t){return O[e]||(O[e]=void 0!==t?t:{})})("versions",[]).push({version:"3.10.1",mode:"global",copyright:"© 2021 Denis Pushkarev (zloirock.ru)"})})),D=0,H=Math.random(),B=function(e){return"Symbol("+String(void 0===e?"":e)+")_"+(++D+H).toString(36)},V=F("keys"),z=function(e){return V[e]||(V[e]=B(e))},W={},K=n.WeakMap;if(q){var Y=O.state||(O.state=new K),G=Y.get,X=Y.has,Q=Y.set;M=function(e,t){return t.facade=e,Q.call(Y,e,t),t},R=function(e){return G.call(Y,e)||{}},j=function(e){return X.call(Y,e)}}else{var J=z("state");W[J]=!0,M=function(e,t){return t.facade=e,L(e,J,t),t},R=function(e){return v(e,J)?e[J]:{}},j=function(e){return v(e,J)}}var Z={set:M,get:R,has:j,enforce:function(e){return j(e)?R(e):M(e,{})},getterFor:function(e){return function(t){var i;if(!g(t)||(i=R(t)).type!==e)throw TypeError("Incompatible receiver, "+e+" required");return i}}},ee=t((function(e){var t=Z.get,i=Z.enforce,s=String(String).split("String");(e.exports=function(e,t,r,a){var o,l=!!a&&!!a.unsafe,c=!!a&&!!a.enumerable,u=!!a&&!!a.noTargetGet;"function"==typeof r&&("string"!=typeof t||v(r,"name")||L(r,"name",t),(o=i(r)).source||(o.source=s.join("string"==typeof t?t:""))),e!==n?(l?!u&&e[t]&&(c=!0):delete e[t],c?e[t]=r:L(e,t,r)):c?e[t]=r:I(t,r)})(Function.prototype,"toString",(function(){return"function"==typeof this&&t(this).source||$(this)}))})),te=n,ie=function(e){return"function"==typeof e?e:void 0},ne=function(e,t){return arguments.length<2?ie(te[e])||ie(n[e]):te[e]&&te[e][t]||n[e]&&n[e][t]},se=Math.ceil,re=Math.floor,ae=function(e){return isNaN(e=+e)?0:(e>0?re:se)(e)},oe=Math.min,le=function(e){return e>0?oe(ae(e),9007199254740991):0},ce=Math.max,ue=Math.min,he=function(e){return function(t,i,n){var s,r=f(t),a=le(r.length),o=function(e,t){var i=ae(e);return i<0?ce(i+t,0):ue(i,t)}(n,a);if(e&&i!=i){for(;a>o;)if((s=r[o++])!=s)return!0}else for(;a>o;o++)if((e||o in r)&&r[o]===i)return e||o||0;return!e&&-1}},de={includes:he(!0),indexOf:he(!1)}.indexOf,pe=function(e,t){var i,n=f(e),s=0,r=[];for(i in n)!v(W,i)&&v(n,i)&&r.push(i);for(;t.length>s;)v(n,i=t[s++])&&(~de(r,i)||r.push(i));return r},me=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],fe=me.concat("length","prototype"),ge={f:Object.getOwnPropertyNames||function(e){return pe(e,fe)}},ye={f:Object.getOwnPropertySymbols},be=ne("Reflect","ownKeys")||function(e){var t=ge.f(C(e)),i=ye.f;return i?t.concat(i(e)):t},ve=function(e,t){for(var i=be(t),n=x.f,s=A.f,r=0;r0&&(!r.multiline||r.multiline&&"\n"!==e[r.lastIndex-1])&&(l="(?: "+l+")",u=" "+u,c++),i=new RegExp("^(?:"+l+")",o)),qe&&(i=new RegExp("^"+l+"$(?!\\s)",o)),$e&&(t=r.lastIndex),n=Me.call(a?i:r,u),a?n?(n.input=n.input.slice(c),n[0]=n[0].slice(c),n.index=r.lastIndex,r.lastIndex+=n[0].length):r.lastIndex=0:$e&&n&&(r.lastIndex=r.global?n.index+n[0].length:t),qe&&n&&n.length>1&&Re.call(n[0],i,(function(){for(s=1;s=74)&&(De=Ve.match(/Chrome\/(\d+)/))&&(He=De[1]);var Ye=He&&+He,Ge=!!Object.getOwnPropertySymbols&&!s((function(){return!Symbol.sham&&(Be?38===Ye:Ye>37&&Ye<41)})),Xe=Ge&&!Symbol.sham&&"symbol"==typeof Symbol.iterator,Qe=F("wks"),Je=n.Symbol,Ze=Xe?Je:Je&&Je.withoutSetter||B,et=function(e){return v(Qe,e)&&(Ge||"string"==typeof Qe[e])||(Ge&&v(Je,e)?Qe[e]=Je[e]:Qe[e]=Ze("Symbol."+e)),Qe[e]},tt=et("species"),it=!s((function(){var e=/./;return e.exec=function(){var e=[];return e.groups={a:"7"},e},"7"!=="".replace(e,"$")})),nt="$0"==="a".replace(/./,"$0"),st=et("replace"),rt=!!/./[st]&&""===/./[st]("a","$0"),at=!s((function(){var e=/(?:)/,t=e.exec;e.exec=function(){return t.apply(this,arguments)};var i="ab".split(e);return 2!==i.length||"a"!==i[0]||"b"!==i[1]})),ot=function(e){return function(t,i){var n,s,r=String(m(t)),a=ae(i),o=r.length;return a<0||a>=o?e?"":void 0:(n=r.charCodeAt(a))<55296||n>56319||a+1===o||(s=r.charCodeAt(a+1))<56320||s>57343?e?r.charAt(a):n:e?r.slice(a,a+2):s-56320+(n-55296<<10)+65536}},lt={codeAt:ot(!1),charAt:ot(!0)},ct=lt.charAt,ut=function(e,t,i){return t+(i?ct(e,t).length:1)},ht=function(e){return Object(m(e))},dt=Math.floor,pt="".replace,mt=/\$([$&'`]|\d{1,2}|<[^>]*>)/g,ft=/\$([$&'`]|\d{1,2})/g,gt=function(e,t,i,n,s,r){var a=i+e.length,o=n.length,l=ft;return void 0!==s&&(s=ht(s),l=mt),pt.call(r,l,(function(r,l){var c;switch(l.charAt(0)){case"$":return"$";case"&":return e;case"`":return t.slice(0,i);case"'":return t.slice(a);case"<":c=s[l.slice(1,-1)];break;default:var u=+l;if(0===u)return r;if(u>o){var h=dt(u/10);return 0===h?r:h<=o?void 0===n[h-1]?l.charAt(1):n[h-1]+l.charAt(1):r}c=n[u-1]}return void 0===c?"":c}))},yt=function(e,t){var i=e.exec;if("function"==typeof i){var n=i.call(e,t);if("object"!=typeof n)throw TypeError("RegExp exec method returned something other than an Object or null");return n}if("RegExp"!==h(e))throw TypeError("RegExp#exec called on incompatible receiver");return Fe.call(e,t)},bt=Math.max,vt=Math.min;!function(e,t,i,n){var r=et(e),a=!s((function(){var t={};return t[r]=function(){return 7},7!=""[e](t)})),o=a&&!s((function(){var t=!1,i=/a/;return"split"===e&&((i={}).constructor={},i.constructor[tt]=function(){return i},i.flags="",i[r]=/./[r]),i.exec=function(){return t=!0,null},i[r](""),!t}));if(!a||!o||"replace"===e&&(!it||!nt||rt)||"split"===e&&!at){var l=/./[r],c=i(r,""[e],(function(e,t,i,n,s){return t.exec===RegExp.prototype.exec?a&&!s?{done:!0,value:l.call(t,i,n)}:{done:!0,value:e.call(i,t,n)}:{done:!1}}),{REPLACE_KEEPS_$0:nt,REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE:rt}),u=c[0],h=c[1];ee(String.prototype,e,u),ee(RegExp.prototype,r,2==t?function(e,t){return h.call(e,this,t)}:function(e){return h.call(e,this)})}n&&L(RegExp.prototype[r],"sham",!0)}("replace",2,(function(e,t,i,n){var s=n.REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE,r=n.REPLACE_KEEPS_$0,a=s?"$":"$0";return[function(i,n){var s=m(this),r=null==i?void 0:i[e];return void 0!==r?r.call(i,s,n):t.call(String(s),i,n)},function(e,n){if(!s&&r||"string"==typeof n&&-1===n.indexOf(a)){var o=i(t,e,this,n);if(o.done)return o.value}var l=C(e),c=String(this),u="function"==typeof n;u||(n=String(n));var h=l.global;if(h){var d=l.unicode;l.lastIndex=0}for(var p=[];;){var m=yt(l,c);if(null===m)break;if(p.push(m),!h)break;""===String(m[0])&&(l.lastIndex=ut(c,le(l.lastIndex),d))}for(var f,g="",y=0,b=0;b=y&&(g+=c.slice(y,w)+A,y=w+v.length)}return g+c.slice(y)}]}));var wt,kt,Tt,St=!s((function(){function e(){}return e.prototype.constructor=null,Object.getPrototypeOf(new e)!==e.prototype})),Et=z("IE_PROTO"),At=Object.prototype,Ct=St?Object.getPrototypeOf:function(e){return e=ht(e),v(e,Et)?e[Et]:"function"==typeof e.constructor&&e instanceof e.constructor?e.constructor.prototype:e instanceof Object?At:null},Pt=et("iterator"),xt=!1;[].keys&&("next"in(Tt=[].keys())?(kt=Ct(Ct(Tt)))!==Object.prototype&&(wt=kt):xt=!0),(null==wt||s((function(){var e={};return wt[Pt].call(e)!==e})))&&(wt={}),v(wt,Pt)||L(wt,Pt,(function(){return this}));var Lt,It={IteratorPrototype:wt,BUGGY_SAFARI_ITERATORS:xt},_t=Object.keys||function(e){return pe(e,me)},Ot=r?Object.defineProperties:function(e,t){C(e);for(var i,n=_t(t),s=n.length,r=0;s>r;)x.f(e,i=n[r++],t[i]);return e},Nt=ne("document","documentElement"),Mt=z("IE_PROTO"),Rt=function(){},jt=function(e){return"