"object"==typeofnavigator&&function(e,t){"object"==typeofexports&&"undefined"!=typeofmodule?module.exports=t():"function"==typeofdefine&&define.amd?define("Plyr",t):(e="undefined"!=typeofglobalThis?globalThis:e||self).Plyr=t()}(this,(function(){"use strict";functione(e,t,i){return(t=function(e){vart=function(e,t){if("object"!=typeofe||null===e)returne;vari=e[Symbol.toPrimitive];if(void0!==i){vars=i.call(e,t||"default");if("object"!=typeofs)returns;thrownewTypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeoft?t:String(t)}(t))ine?Object.defineProperty(e,t,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[t]=i,e}functiont(e,t){for(vari=0;i<t.length;i++){vars=t[i];s.enumerable=s.enumerable||!1,s.configurable=!0,"value"ins&&(s.writable=!0),Object.defineProperty(e,s.key,s)}}functioni(e,t,i){returntine?Object.defineProperty(e,t,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[t]=i,e}functions(e,t){vari=Object.keys(e);if(Object.getOwnPropertySymbols){vars=Object.getOwnPropertySymbols(e);t&&(s=s.filter((function(t){returnObject.getOwnPropertyDescriptor(e,t).enumerable}))),i.push.apply(i,s)}returni}functionn(e){for(vart=1;t<arguments.length;t++){varn=null!=arguments[t]?arguments[t]:{};t%2?s(Object(n),!0).forEach((function(t){i(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):s(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}returne}vara={addCSS:!0,thumbWidth:15,watch:!0};varl=function(e){returnnull!=e?e.constructor:null},r=function(e,t){return!!(e&&t&&einstanceoft)},o=function(e){returnnull==e},c=function(e){returnl(e)===Object},u=function(e){returnl(e)===String},h=function(e){returnArray.isArray(e)},d=function(e){returnr(e,NodeList)},m={nullOrUndefined:o,object:c,number:function(e){returnl(e)===Number&&!Number.isNaN(e)},string:u,boolean:function(e){returnl(e)===Boolean},function:function(e){returnl(e)===Function},array:h,nodeList:d,element:function(e){returnr(e,Element)},event:function(e){returnr(e,Event)},empty:function(e){returno(e)||(u(e)||h(e)||d(e))&&!e.length||c(e)&&!Object.keys(e).length}};functionp(e,t){if(1>t){vari=function(e){vart="".concat(e).match(/(?:\.(\d+))?(?:[eE]([+-]?\d+))?$/);returnt?Math.max(0,(t[1]?t[1].length:0)-(t[2]?+t[2]:0)):0}(t);returnparseFloat(e.toFixed(i))}returnMath.round(e/t)*t}varg=function(){functione(t,i){(function(e,t){if(!(einstanceoft))thrownewTypeError("Cannot call a class as a function")})(this,e),m.element(t)?this.element=t:m.string(t)&&(this.element=document.querySelector(t)),m.element(this.element)&&m.empty(this.element.rangeTouch)&&(this.config=n({},a,{},i),this.init())}returnfunction(e,i,s){i&&t(e.prototype,i),s&&t(e,s)}(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.config.addCSS&&(this.element.style.userSelect="",this.element.style.webKitUserSelect="",this.element.style.touchAction=""),this.listeners(!1),this.element.rangeTouch=null)}},{key:"listeners",value:function(e){vart=this,i=e?"addEventListener":"removeEventListener";["touchstart","touchmove","touchend"].forEach((function(e){t.element[i](e,(function(e){returnt.set(e)}),!1)}))}},{key:"get",value:function(t){if(!e.enabled||!m.event(t))returnnull;vari,s=t.target,n=t.changedTouches[0],a=parseFloat(s.getAttribute("min"))||0,l=parseFloat(s.getAttribute("max"))||100,r=parseFloat(s.getAttribute("step"))||1,o=s.getBoundingClientRect(),c=100/o.width*(this.config.thumbWidth/2)/100;return0>(i=100/o.width*(n.clientX-o.left))?i=0:100<i&&(i=100),50>i?i-=(100-2*i)*c:50<i&&(i+=2*(i-50)*c),a+p(i/100*(l-a),r)}},{key:"set",value:function(t){e.enabled&&m.event(t)&&!t.target.disabled&&(t.preventDefault(),t.target.value=this.get(t),function(e,